<flux>
although a compact syntax should be there.. _ could act as the empty slot, but indicating the scope would need also some keyword or operator (or perhaps [; _ / 42 ;])
<flux>
(but that is a bit punctuation heavy)
<Mr_Awesome>
that is a pretty cool srfi. i havent seen that one
pants1 has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
shawn has quit ["This computer has gone to sleep"]
<flux>
I think I originally read about such a feature in Mathematica, on comp.lang.functional, but I guess it's an old idea..
seafoodX_ has joined #ocaml
seafoodX has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
seafoodX_ has quit []
loufoque has joined #ocaml
noteventime has joined #ocaml
shawn has joined #ocaml
buluca has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
buluca is now known as cheshai2
cheshai2 is now known as buluca
netx has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
Mr_Awesome has quit ["time to impregnate a moth"]
Vadim has joined #ocaml
piggybox has joined #ocaml
buluca is now known as cheshai2
cheshai2 is now known as buluca
piggybox_ has quit [Connection timed out]
alhusema has joined #ocaml
Vadim has quit []
yminsky has joined #ocaml
yminsky has quit [Client Quit]
eroyf has joined #ocaml
G_ has joined #ocaml
G has quit [Read error: 110 (Connection timed out)]
G_ is now known as G
_blackdog has joined #ocaml
_blackdog has left #ocaml []
netx has joined #ocaml
smimou has quit ["bli"]
ramkrsna_ is now known as ramkrsna
netx has quit [Connection timed out]
the_dormant has joined #ocaml
the_dormant has quit [Connection timed out]
netx has joined #ocaml
netx has quit [Connection timed out]
smimou has joined #ocaml
gunark has quit [Remote closed the connection]
slipstream has joined #ocaml
slipstream-- has quit [Read error: 113 (No route to host)]
screwt8 has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
screwt8 has joined #ocaml
Cygal has joined #ocaml
pango has joined #ocaml
piggybox_ has joined #ocaml
loufoque has quit ["Quitte"]
Smerdyakov has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
pedro has joined #ocaml
Mr_Awesome has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
seafoodX has joined #ocaml
seafoodX has quit []
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
david_koontz has joined #ocaml
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
jlouis_ has joined #ocaml
mc__ has joined #ocaml
<mc__>
Hello! is there a shorthand for accesing a specific field in a 2-dimensional array?
<mc__>
atm i do it like this: let arr2=Array.get arr 1;; Array.get arr2 1;;
<xavierbot>
Characters 0-3:
<xavierbot>
atm i do it like this: let arr2=Array.get arr 1;; Array.get arr2 1;;
<xavierbot>
^^^
<xavierbot>
Unbound value atm
<xavierbot>
Characters 6-8:
<xavierbot>
Parse error: illegal begin of top_phrase
<mc__>
let arr = Array.make_matris 3 3 ' ';;
<xavierbot>
Characters 11-28:
<xavierbot>
let arr = Array.make_matris 3 3 ' ';;
<xavierbot>
^^^^^^^^^^^^^^^^^
<xavierbot>
Unbound value Array.make_matris
<xavierbot>
Characters 33-34:
<xavierbot>
Parse error: illegal begin of top_phrase
<mbishop>
heh
<mbishop>
use arr2.[1];;
<xavierbot>
Characters 1-4:
<xavierbot>
use arr2.[1];;
<xavierbot>
^^^
<xavierbot>
Unbound value use
<mbishop>
xavierbot: shut the hell up
<xavierbot>
xavierbot goes to sleep (do 'xavierbot wake' to wake)
<mc__>
let arr = Array.make_matrix 3 3 ' ';;
jlouis has quit [Read error: 110 (Connection timed out)]
<mc__>
mbishop: i would like to something like arr[2][3]
<mbishop>
ah right, 2 dimensional
<mbishop>
hmm
<mc__>
or maybe my intention is wrong,im very new to OCaml,im trying to write a simple text-based tic-tac-toe
<mc__>
mbishop: but is this a good way to do it in OCaml? Or is there some better more-beautiful (functional) approach?
G has quit [Connection timed out]
<mc__>
anyways i cant figure out how to use Bigarrays in OCaml code the site only tells me how to access them from c. I also didnt find anything with google
<flux>
mc__, let a = Array.make_matrix 3 3 ' ' in a.(1).(1) <- 'Z' works?
<flux>
mc__, although the functional approach would be to use a map (from tuples to characters)
<mc__>
flux: why tuples?
<flux>
well you want coordinates, a pair on numbers, a tuple of numbers..
<mc__>
flux: yes that works but what does the "<-" mean?
<flux>
assignment
gunark has joined #ocaml
jlouis has joined #ocaml
<mbishop>
short hand for Array.set
* mc__
feels enlightend
jlouis_ has quit [Read error: 110 (Connection timed out)]
thesoko has quit [Remote closed the connection]
thesoko has joined #ocaml
mc__ has quit []
zmdkrbou_ has joined #ocaml
zmdkrbou has quit [Read error: 104 (Connection reset by peer)]
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
leo037 has joined #ocaml
G has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
thesoko has quit [Remote closed the connection]
thesoko has joined #ocaml
zmdkrbou_ has quit [Remote closed the connection]
zmdkrbou has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
alhusema has quit [Read error: 110 (Connection timed out)]
leo037 has quit ["Leaving"]
noteventime has left #ocaml []
noteventime has joined #ocaml
noteventime has left #ocaml []
Demitar has joined #ocaml
smimou has quit ["bli"]
hajhouse has quit [Read error: 104 (Connection reset by peer)]