Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | 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/
vezenchio has quit ["haibane·renmei"]
gim has quit ["assert(sleep(8*3600)=0);"]
<det> Smerdyakov: PackWord32 :)
<det> oh
<det> this is #ocaml
skylan has joined #ocaml
hangman4 has quit [Read error: 60 (Operation timed out)]
hangman4 has joined #ocaml
pacroon_ has joined #ocaml
pacroon has quit [Read error: 104 (Connection reset by peer)]
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
monochrom has quit ["hello"]
hangman4 has quit [Read error: 101 (Network is unreachable)]
hangman4 has joined #ocaml
pacroon_ has quit [Read error: 113 (No route to host)]
pacroon has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
<judge> `is there a way to serialize/deserialize ocaml datastructures?
<judge> speficly a way which would throw exceptions if the input data is of the wrong type
_fab has quit [Remote closed the connection]
<Nutssh> I believe there is in the library, but it is not safe.
<judge> :(
<judge> Marshal stuff looks inadequate
<judge> it has a warning that it's not currently typesafe
<judge> is there a lib that is typesafe for this kind of stuff?
<Nutssh> No. It can't be.. Because the serializer would have to have type 'a -> string and deserializeer string -> 'a
<vincenz> Nutssh: well....not entirely accurate
<vincenz> Nutssh: you could store type-information and have an exception if the type doesn't correspond
<vincenz> Of course that'd only work for bytecode versions
<Nutssh> That would require passing a type as an argument to the serializer. A higher order type system.
<vincenz> hmm
<vincenz> not really
<vincenz> if you look at the jocaml system
<vincenz> they basically enforce that the variable where the result is to be stored has a type
<vincenz> so a type is not store in ocaml code, but in the layer underneath
<vincenz> (aka you can not manipulate types in ocaml)
<vincenz> of course this -would- require at least some degree of change in the runtime system
<Nutssh> That would mean that the serialization would be told what its inferred type was at the callsite so that it could check for correctness, and that type would have to be concrete and not polymorphic... I can see how it'd work.
* vincenz nods
<vincenz> jocaml uses it to transport code from one location to another
<vincenz> too bad it's no longer maintianed :/
<Nutssh> ok.
_fab has joined #ocaml
<judge> i looked at camlp4
<judge> maybe one could add additional type checking at preprocessor stage
<Nutssh> That makes my brain hurt how to attempt to do that and seperate compilation.
<vincenz> Nothing better than a milkshake in the morning :)
<Nutssh> I'll need a triple latte to get rid of that headache, and I *hate* coffee.
<vincenz> Well...time to head to work
<vincenz> adios
<pango> gcaml also provides some safe marshalling
Submarine has joined #ocaml
kinners has joined #ocaml
smimou has joined #ocaml
pango has quit ["brb"]
pango has joined #ocaml
srv_ has quit [Read error: 104 (Connection reset by peer)]
srv has joined #ocaml
Submarine has quit ["Leaving"]
slashvar[TP] has quit [Read error: 104 (Connection reset by peer)]
slashvar[TP] has joined #ocaml
yakker has joined #ocaml
<yakker> function str nod -> ()
Submarine has joined #ocaml
<yakker> I'm using this to return a Hashtbl iterator function that does nothing
<yakker> compiling it gives me a syntax error on the second argument that I can't figure out
<kinners> yakker: that code is basically 'fun x -> match x with str nod -> ()'
<yakker> kinners: don't understand.
<yakker> the function i'm returning is to be passed 2 parameters
<yakker> so does that mean that i can't simply do a 'fun param1 param2 param3 -> defn' ?
<kinners> yakker: 'function' is a shortcut for a function that takes 1 parameter and does pattern matching on it, 'fun' is what you want I guess
<yakker> yeeks. silly me. that's right, it works now.
<yakker> thanks.
<kinners> np
smimou has quit ["?"]
yakker has quit [Read error: 54 (Connection reset by peer)]
karryall has joined #ocaml
_fab has quit []
pango is now known as pangoafk
kinners has quit ["leaving"]
pangoafk is now known as pango
vezenchio has joined #ocaml
* vincenz grins and proposes an improve option
<vincenz> type 'a option = None | One of 'a | Some of 'a list
<vincenz> s/improve/improved
<mrvn> Breaks too much code.
<vincenz> I was only kidding
<vincenz> but I -am- gonna use it
<mrvn> Some [] == None?
<vincenz> mrvn: yah
<mrvn> One foo == Some (foo::[])?
<vincenz> yah
<mrvn> so just use 'a list
<vincenz> it's handy if you have to be able to handle ambiguous trees, but want to quickly check which parts are no longer ambiguous
<mrvn> match l with [] -> None | x::[] -> One | _ -> Some
<vincenz> meh
<vincenz> match Expr with | One AddExp -> ... | One SubExp -> ... | Some -> handle ambiguity
<mrvn> If you have a lot of One's then it's probably better.
<mrvn> Does "match foo with One -> | Two -> | Three -> | Four ->" get optimized into a jump table?
<vincenz> mrvn: well ideally you have no ambiguities
<mrvn> (not One foo | One bar things, but the simple ones).
<vincenz> no idea
<vincenz> mrvn: Most likely in a similar way as "case"
_fab has joined #ocaml
mrvn_ has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
terpstra has joined #ocaml
terpstra has quit [Read error: 104 (Connection reset by peer)]
CosmicRay has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
<vincenz> dumteedum
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
Submarine has quit ["Leaving"]
Submarine has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
fragbot has joined #ocaml
bwlang has joined #ocaml
monochrom has joined #ocaml
karryall has quit ["..."]
mattam has joined #ocaml
Kevin_ has joined #ocaml
Submarine has quit ["Leaving"]
pango has quit ["brb"]
pango has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
Godeke has quit [Remote closed the connection]
Godeke has joined #ocaml
Submarine has joined #ocaml
smimou has joined #ocaml
Submarine has quit ["Leaving"]
gim has joined #ocaml
Submarine has joined #ocaml
magnus-- has joined #ocaml
zzorn_away has joined #ocaml
jao has joined #ocaml
Kevin_ has quit ["Quit"]
Submarine has quit ["Leaving"]
fragbot has left #ocaml []
karryall has joined #ocaml
<Excedrin> ocaml book review on slashdot today
<karryall> which one ?
<karryall> hmm the O'Reilly one
<monochrom> w00h00
smimou has quit [tolkien.freenode.net irc.freenode.net]
mattam has quit [tolkien.freenode.net irc.freenode.net]
skylan has quit [tolkien.freenode.net irc.freenode.net]
Nutssh has quit [tolkien.freenode.net irc.freenode.net]
rossberg_ has quit [tolkien.freenode.net irc.freenode.net]
drz has quit [tolkien.freenode.net irc.freenode.net]
tewk_ has quit [tolkien.freenode.net irc.freenode.net]
creichen has quit [tolkien.freenode.net irc.freenode.net]
skylan has joined #ocaml
tewk has joined #ocaml
creichen has joined #ocaml
<jao> nice (except for the usual totally uninformed, offtopic or plain wrong reader comments, of course)
magnus-- has quit ["Leaving"]
<TheDracle> God.. I read that book. It's probably one of the best by example programming books I've ever read.
<TheDracle> A compiler example, desktop calculator, minesweeper.
<TheDracle> How can you pack so much damn stuff into one book!/
mattam has joined #ocaml
<TheDracle> Blah.. This means more dorks will be using Ocaml though. Which is bad, because I usually can feel all cool and suave using it as opposed to other languages; and criticize people who don't.
smimou has joined #ocaml
Nutssh has joined #ocaml
rossberg_ has joined #ocaml
drz has joined #ocaml
tewk_ has joined #ocaml
tewk_ has quit [Connection reset by peer]
rossberg__ has joined #ocaml
rossberg_ has quit [Read error: 104 (Connection reset by peer)]
smimram has joined #ocaml
smimou has quit [Connection reset by peer]
Walnutssh has joined #ocaml
Nutssh has quit [Read error: 104 (Connection reset by peer)]
gim has quit [Read error: 110 (Connection timed out)]
CosmicRay has quit ["Client exiting"]
<vincenz> yeah :)
zzorn_away has quit ["........"]
mattam has quit ["Lost terminal"]
smimram has quit ["?"]