mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
_blackdog has joined #ocaml
_blackdog has left #ocaml []
pantsd has joined #ocaml
david_koontz has quit ["Leaving"]
seafoodX has joined #ocaml
lmbdwr has quit ["Leaving"]
david_koontz has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
<mbishop> Anyone know how I can get this program to close when someone clicks the "x"? http://ocaml.pastebin.com/m88c47cd
G_ has joined #ocaml
<Mr_Awesome> mbishop: you have to intercept the SDL_QUIT event and exit when you receive
<Mr_Awesome> this allows you to take an action (like prompting to save) before the application quits
G__ has joined #ocaml
G has quit [Connection timed out]
G_ has quit [Connection timed out]
yminsky has joined #ocaml
yminsky has quit []
Smerdyakov has quit ["Leaving"]
thesoko has joined #ocaml
diakopter has left #ocaml []
netx has quit ["Leaving"]
netx has joined #ocaml
G has joined #ocaml
shawn has joined #ocaml
G__ has quit [Connection timed out]
magnus has quit ["Lost terminal"]
gaja has quit [Read error: 110 (Connection timed out)]
gaja has joined #ocaml
david_koontz has quit ["Leaving"]
bos has joined #ocaml
bos has left #ocaml []
bos has joined #ocaml
bos has left #ocaml []
pantsd has quit [Read error: 110 (Connection timed out)]
r2d4 has joined #ocaml
r2d4 has quit ["Ex-Chat"]
pantsd has joined #ocaml
<flux> something like this would be fun in ocaml: http://srfi.schemers.org/srfi-26/srfi-26.html
<flux> anyone up for the camlp4-writing?-)
<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__> and i want to use a 3x3 array for it
<mbishop> check out the Bigarray library
<mc__> mbishop: thank you
<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)]
Cygal has quit []
david_koontz has quit ["Leaving"]
david_koontz has joined #ocaml
Sparkles has quit [Remote closed the connection]