smimou changed the topic of #ocaml to: OCaml 3.08.3 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
mr_pengy has joined #ocaml
Skal has quit [Remote closed the connection]
mr_pengy has quit [Remote closed the connection]
mr_pengy has joined #ocaml
mr_pengy has quit [Remote closed the connection]
mhankins has joined #ocaml
ulfdoz has joined #ocaml
humasect has quit ["Leaving.."]
ulfdoz_ has quit [Read error: 60 (Operation timed out)]
cjohnson has quit ["Leaving"]
mhankins has quit ["Leaving"]
msh has left #ocaml []
vdrab has quit [Read error: 60 (Operation timed out)]
beschmi has joined #ocaml
<beschmi> hi
picard has quit ["Leaving"]
vezenchio has joined #ocaml
Snark has joined #ocaml
__DL__ has joined #ocaml
Snark has quit ["Leaving"]
vdrab has joined #ocaml
vdrab has quit ["Leaving"]
Submarine has joined #ocaml
_JusSx_ has joined #ocaml
smimou has joined #ocaml
ejt has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
gpciceri has joined #ocaml
gpciceri has left #ocaml []
gim_ has quit [Read error: 113 (No route to host)]
gim_ has joined #ocaml
vdrab has joined #ocaml
gim__ has joined #ocaml
gim_ has quit [Read error: 60 (Operation timed out)]
mattam has joined #ocaml
mattam has quit [Read error: 145 (Connection timed out)]
CosmicRay has joined #ocaml
mattam has joined #ocaml
bzzbzz has joined #ocaml
Nutssh has quit ["Client exiting"]
mr_pengy has joined #ocaml
Snark has joined #ocaml
vdrab has quit ["Leaving"]
cjohnson has joined #ocaml
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
vezenchio has joined #ocaml
<Smerdyakov> Yesterday I finished proving the soundness of a Typed Assembly Language type checker with Coq!
<Submarine> kudos
pango_ has joined #ocaml
<Smerdyakov> Only 15k lines. :)
pango__ has quit [Read error: 60 (Operation timed out)]
xkb has joined #ocaml
<xkb> does ocaml have a built-in take function?
<xkb> I cant find List.take
<Submarine> take?
<xkb> yeah, to take the first n elements of a list
<xkb> like this
<xkb> List.take 3 [1,2,3,4,5]
* xkb returns [1,2,3]
<xkb> hmm what am I doing wrong here:
<xkb> let rec take n s =
<xkb> match s with
<xkb> [] ->
<xkb> (match n with
<xkb> 0 -> []
<xkb> | n -> raise FaultyContent)
<xkb> | (x::y) ->
<xkb> (match n with
<xkb> 0 -> []
<xkb> | n when (n < 0) -> raise FaultyContent
<xkb> | _ ->
<xkb> x :: (take (n - 1) y)) ;;
<xkb> aargh
<xkb> not the whole part
<xkb> take 2 [1,2] returns the exception
<xkb> where it should return the list
<_fab> [1,2] ist a list with one member
<_fab> (a tuple)
<_fab> what you want is [1;2]
<xkb> oh... darn
<xkb> haskell to ocaml :D
<xkb> _fab: thanks
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
<xkb> is it possible to expres this: take 3 procesList [1;2;3;0];;
<xkb> without using ( ) ?
<xkb> procesList is just a map
<_fab> i don't think so, only if you do the call of processList in the take function
<xkb> ok
<_fab> (which would'nt make sense)
<xkb> indeed
<_fab> why not use ( ) ?
<xkb> readability reasons
<xkb> or a weird quirck in my mind
<xkb> :D
<xkb> Im trying to show that ocaml uses strict eval and always evaluates the "error" part of the list
<xkb> the procesList does 10/0 on the argument list
<xkb> eh 10/n
<_fab> well, you could use the lazy module of ocaml to show that it wont :)
<xkb> hehe.. but the idea is to contrast lazy vs eager eval. :D
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
<mflux> I'm trying to return a bar (from type foo = { a : int; b: string; c : bool } type bar = V1 | V2 of foo) from a c-function, but I keep crashing.. any suggestions?
<mflux> I tried looking for similar code on the ocaml source, but after Unix I don't have ideas where to look for more (it didn't return such values)
<mflux> (my problem being that I segfault at caml_interprete after returning my value and trying to pattern match/output it)
<mflux> also, I have been able to return a simple record, but for some reason when it is wrapped into another type it fails
Snark has quit ["Leaving"]
_JusSx_ has joined #ocaml
<mflux> and the episode has apparently finished. stupid bug..
ejt has quit [Read error: 110 (Connection timed out)]
znutar has joined #ocaml
xkb has quit []
mattam_ has quit [sterling.freenode.net irc.freenode.net]
__DL__ has quit [sterling.freenode.net irc.freenode.net]
_fab has quit [sterling.freenode.net irc.freenode.net]
dan2 has quit [sterling.freenode.net irc.freenode.net]
joey_ has quit [sterling.freenode.net irc.freenode.net]
Smerdyakov has quit [sterling.freenode.net irc.freenode.net]
j_n has quit [sterling.freenode.net irc.freenode.net]
ooo has quit [sterling.freenode.net irc.freenode.net]
det has quit [sterling.freenode.net irc.freenode.net]
Amorphous has quit [sterling.freenode.net irc.freenode.net]
ooo has joined #ocaml
j_n has joined #ocaml
smimou has quit [Read error: 60 (Operation timed out)]
mattam has joined #ocaml
rossberg has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
_fab has joined #ocaml
joey_ has joined #ocaml
__DL__ has joined #ocaml
Amorphous has joined #ocaml
dan2 has joined #ocaml
smimou has joined #ocaml
_JusSx_ has quit ["leaving"]
picard has joined #ocaml
Submarine has quit ["Leaving"]
cjohnson has quit [Read error: 54 (Connection reset by peer)]
__DL__ has quit ["Bye Bye"]
cjohnson has joined #ocaml
mr_pengy has quit ["WeeChat 0.1.0"]
mlh has joined #ocaml
mattam has quit [Read error: 113 (No route to host)]
CosmicRay has quit ["Client exiting"]
mattam has joined #ocaml
Gueben has joined #ocaml
afa has joined #ocaml
afa has quit [""feed Odin with java programmers""]
Gueben has quit ["Leaving"]
smimou has quit ["?"]
jinterest has joined #ocaml