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!)
Submarine has joined #ocaml
gunark has quit [Read error: 104 (Connection reset by peer)]
gunark has joined #ocaml
seafoodX has joined #ocaml
smimram has quit ["bli"]
rubenz has joined #ocaml
m3ga has joined #ocaml
<rubenz> How do I pattern match against a list in ocaml?
<m3ga> match l with [] -> (* empty list *) | ht :: tl -> (* non-empty head, possibly empty tail *)
<pango> lists are basically a variant type with two constructors: empty list and cons... something like type 'a list = [] | :: of 'a * 'a list
<pango> so when pattern matching, you also need (at least) two cases, as m3ga said
m3ga has quit ["disappearing into the sunset"]
seafoodX has quit []
<rubenz> oh I see. That's what I thought. Thanks
bluestorm_ has quit ["Konversation terminated!"]
slipstream-- has quit [Read error: 110 (Connection timed out)]
seafoodX has joined #ocaml
Submarine has quit [Remote closed the connection]
qwwqe has quit ["Leaving"]
seafoodX has quit []
david_koontz has quit ["Leaving"]
seafoodX has joined #ocaml
slipstream has joined #ocaml
shawn has left #ocaml []
noteventime has quit [Remote closed the connection]
<seafoodX> Anyone here tried to use OcaIDE on Mac OS X?
brother1 is now known as brothers
krumms has joined #ocaml
piggybox_ has joined #ocaml
qwwqe has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
robyonrails has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
<krumms> http://www.vector-seven.com/2007/07/17/thumper-my-ugly-little-ocaml-web-server/ - anybody care to take a peep at my little Ocaml web server? Looking for suggestions/opinions/etc.
<rubenz> Is there a simple way to obtain a list of all integer pairs (x,y) where 0<=x<=n and 0<=y<=m in OCaml?
ygrek has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
<pango> a function?
<krumms> rubenz: http://pastebin.com/me2d1a23 ?
<rubenz> yes, although I have figured it out now.
<krumms> substituting 15/20 for n/m
Smerdyakov has quit ["Leaving"]
<pango> wouldn't be a great idea to use such function in a real OCaml program, though. OCaml is eagerly evaluated, so the whole list will be constructed in ram
<pango> that's only ok for "small" values of m and n
<Mr_Awesome> make it lazy! :)
<pango> yup, for example
zarvok has quit ["BitchX-1.1-final -- just do it."]
<krumms> for example?
Mr_Awesome has quit ["time to impregnate a moth"]
<rubenz> bye. thanks for the answers to my questions
rubenz has quit [Remote closed the connection]
<pango> another way would be to avoid using such list at all, if possible; It's often just a foreign idiom for loops, that may be better translated using plain for loops, recursive functions or custom HoFs
<krumms> HoFs?
<pango> high order functions
<krumms> ah sure
<krumms> so there's nothing like say ... what generator functions do for Python?
<pango> never used Python, but probably not
krumms has quit ["Leaving"]
smimou has joined #ocaml
souk_ has quit [Client Quit]
kelaouchi has joined #ocaml
souk_ has joined #ocaml
smimram has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
rwmjones_ has quit ["This computer has gone to sleep"]
seafood has quit [Read error: 104 (Connection reset by peer)]
seafoodX_ has joined #ocaml
seafoodX has quit [Read error: 101 (Network is unreachable)]
smimou has quit [Read error: 110 (Connection timed out)]
seafoodX has joined #ocaml
seafoodX_ has quit [Read error: 104 (Connection reset by peer)]
seafoodX_ has joined #ocaml
seafoodX has quit [Read error: 113 (No route to host)]
flux has quit [Read error: 131 (Connection reset by peer)]
flux has joined #ocaml
souk_ has left #ocaml []
bluestorm_ has joined #ocaml
buluca has joined #ocaml
Tychom has quit []
ygrek has quit [Remote closed the connection]
robyonrails has quit ["me ne vo'"]
ygrek has joined #ocaml
DirkT has joined #ocaml
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
robyonrails has joined #ocaml
seafoodX_ has quit []
leo037 has joined #ocaml
piggybox_ has quit [Read error: 110 (Connection timed out)]
_blackdog has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
seafoodX has joined #ocaml
seafoodX_ has joined #ocaml
seafoodX has quit [Read error: 110 (Connection timed out)]
noteventime has joined #ocaml
tsuyoshi has quit ["Lost terminal"]
piggybox_ has joined #ocaml
piggybox_ is now known as piggybox
DirkT has quit ["Leaving."]
_blackdog has quit ["Ex-Chat"]
jlouis_ has quit ["leaving"]
jlouis has joined #ocaml
_blackdog has joined #ocaml
brothers has quit ["Leaving."]
screwt8 has quit [Remote closed the connection]
screwt8 has joined #ocaml
buluca has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
noteventime has quit [Remote closed the connection]
slipstream has quit [Remote closed the connection]
visage has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
ulfdoz has joined #ocaml
qwwqe has quit ["Leaving"]
love-pingoo has joined #ocaml
noteventime has joined #ocaml
noteventime has quit [Remote closed the connection]
love-pingoo has quit ["Connection reset by pear"]
visage has quit []
robyonrails has quit [Read error: 104 (Connection reset by peer)]
robyonrails has joined #ocaml
noteventime has joined #ocaml
robyonrails has quit ["me ne vo'"]
leo037 has quit ["Leaving"]
seafoodX_ has quit []
robyonrails has joined #ocaml
Cin has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
slipstream has joined #ocaml
screwt8 has quit [Read error: 104 (Connection reset by peer)]
pango has quit [Remote closed the connection]
noteventime has quit [Read error: 104 (Connection reset by peer)]
pango has joined #ocaml
screwt8 has joined #ocaml
noteventime has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
slipstream-- has joined #ocaml
zarvok has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
xavierbot has quit [Remote closed the connection]
xavierbot has joined #ocaml
david_koontz has joined #ocaml
ygrek has quit ["Leaving"]
Mr_Awesome has joined #ocaml
buluca has joined #ocaml
paf has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
piggybox has joined #ocaml
masteraka has joined #ocaml
<masteraka> hey, anybody here knows how cameleon works?
<masteraka> i've installed it from an ubuntu repository and would like to know how to start it up now
rwmjones_ has joined #ocaml
<rwmjones_> xavierbot, restart
<xavierbot> Objective Caml version 3.10.0
<xavierbot> Camlp4 Parsing version 3.10.0
<Ober> let _ = forkbomb;
<rwmjones_> let rec loop () = loop () ;;
<xavierbot> val loop : unit -> 'a = <fun>
<rwmjones_> loop () ;;
<xavierbot> Objective Caml version 3.10.0
<xavierbot> Camlp4 Parsing version 3.10.0
<Ober> heh
<rwmjones_> Unix.fork ;;
<xavierbot> Characters 0-9:
<xavierbot> Unix.fork ;;
<xavierbot> ^^^^^^^^^
<xavierbot> Unbound value Unix.fork
<Ober> restarted
_blackdog has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
masteraka has quit [Connection timed out]
shawn has quit ["This computer has gone to sleep"]
masteraka has joined #ocaml
pango has joined #ocaml
rwmjones_ has quit ["This computer has gone to sleep"]
rwmjones_ has joined #ocaml
smimram has quit ["bli"]
rwmjones_ has quit ["This computer has gone to sleep"]
rwmjones_ has joined #ocaml
noteventime has quit [Remote closed the connection]
_blackdog has joined #ocaml
shawn has joined #ocaml