Banana changed the topic of #ocaml to: OCaml 3.08.4 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/
BenoitXVI has quit [Remote closed the connection]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
<Schmurtz> when somebody will compile it...
Smerdyakov has joined #ocaml
vezenchio has quit ["\o/ in mochintin namocniuh \o/"]
Skal has quit [Remote closed the connection]
UziMonkey has quit [Remote closed the connection]
znutar has quit [Read error: 110 (Connection timed out)]
kinners has joined #ocaml
UziMonkey has joined #ocaml
noj has quit [brown.freenode.net irc.freenode.net]
threeve has quit []
o[WildChild]o has joined #ocaml
kinners has quit ["leaving"]
<Revision17> is there any easy (maybe predone?) way to merge hash tables?
<Revision17> hmm, I guess folding one into the other wouldn't be hard
<Smerdyakov> I think hash tables are pretty deficient in general, in terms of enough functions to do things nicely with them.
<Smerdyakov> I often use exceptions to build efficient operations out of fold.
<Revision17> it'd be kinda cool if there were an efficient immutable hash table class in the standard library
<Smerdyakov> I don't think anyone knows a way to create such an implementation.
<Smerdyakov> Map provides the same ADT, too.
<Smerdyakov> s/too/though
<Amorphous> Revision17: what's wrong with Hashtbl.iter (....Hashtbl.add table2....) table
<Revision17> with this being used for as the function passed to fold it worked well: let hash_join key value init = Hashtbl.add init key value; init;;
* Revision17 is still new to functional programming
<Smerdyakov> Revision17, silly to use fold for that.... the folding doesn't change your accumulator.
<Revision17> this is going to be used in a ocamlyacc parser; each level returns a hashtable to the previous level, and this seemed like the best way to avoid using side effects; there's probably a better way to do this though
<Smerdyakov> You can't use hash tables without side effects.
Smerdyakov has quit []
o[WildChild]o has left #ocaml []
ionOS_ has joined #ocaml
ionOS_ has left #ocaml []
monochrom has quit ["good morning, sweet dream"]
Revision17 has quit [Connection timed out]
Revision17 has joined #ocaml
Revision17 has quit [Connection timed out]
UziMonkey has quit ["Leaving"]
pango_ has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
BenoitXVI has joined #ocaml
petter_ has joined #ocaml
pango_ has quit [Remote closed the connection]
__DL__ has joined #ocaml
pango has joined #ocaml
kothog has quit [Read error: 110 (Connection timed out)]
UziMonkey has joined #ocaml
JohGro has joined #ocaml
Snark has joined #ocaml
<haakonn> doesn't Map count as a hash table? and isn't that a side-effect-less module?
<Saulzar> Map is a tree
Zyroth has joined #ocaml
<Zyroth> Can anyone help me with types and pattern matching? http://rafb.net/paste/results/An6E3z36.html
<Zyroth> it's quite short, but I didn't want to type it =)
<mflux> | Zero _ | GreaterThanZero _ -> true
<mflux> or just | _ -> true
<Zyroth> ah thx
<mflux> (suitable for that case but I wouldn't use it on a random enumeration, because I would like the compiler to notify on missing cases)
<Zyroth> well I just wanted to know how to let totally different patterns execute the same code
mlh_ has quit [Client Quit]
Gueben has joined #ocaml
Skal has joined #ocaml
BenoitXVI has quit [Read error: 101 (Network is unreachable)]
Saulzar_ has joined #ocaml
Saulzar has quit [Read error: 60 (Operation timed out)]
Revision17 has joined #ocaml
Zyroth has quit ["(sleep) Weblog: http://zyroth.ggnore.net"]
Zyr has joined #ocaml
Revision17 has quit ["Leaving"]
Revision17 has joined #ocaml
Zyr has quit ["(sleep) Weblog: http://zyroth.ggnore.net"]
threeve has joined #ocaml
Pita has joined #ocaml
Pita has quit []
vezenchio has joined #ocaml
Pita has joined #ocaml
<Pita> Hello there
<Pita> I rarely see activities here
<Schmurtz> but there are some
<Pita> Schmurtz: how long have you been using ocaml?
noj has joined #ocaml
<Schmurtz> I started 6 years ago
<Schmurtz> however I've never used it for the last 4 year
<Schmurtz> (I've restarted to use it 2 month ago)
<Schmurtz> (- 've)
<Pita> Schmurtz: do you mind if I ask few questions?
<Pita> I am thinking about switching over from Lisp
<Schmurtz> perhaps ;)
<Schmurtz> however I've never used lisp
<Pita> Does OCAML have good supports for using C libraries?
<Schmurtz> yes
<Pita> what do you use ocaml for?
<Pita> I programmed in ML back in c ollege long ... long ago
<Schmurtz> graph manipulation
<Pita> Schmurtz: any GUI?
<Schmurtz> no real GUI, just a window with some drawing
<Schmurtz> however, you may use Gtk or Tcl/Tk
<Schmurtz> a good list of ocaml libraries and C library bindings
<Pita> Schmurtz: do you use TK or GTK for drawing?
<Schmurtz> no, I use the internal ocaml drawing functions
<Schmurtz> you have only one drawing window and functions like moveto, lineto draw_circle...
<Pita> Schmurtz: hmm. so what does that ocaml drawing function use? does it use X?
<Schmurtz> it's very basic, but also easy ti use
<Schmurtz> it use X on unix system
<Schmurtz> on windows I think it use Windows internal libraries
<Pita> ok
<Pita> thanks :)
<Schmurtz> for the built-in drawing system
<mflux> even though the standard graphics library is, well, somewhat poor for real-world stuff, it's great to have it because it's so simple to visualize algorithms ;)
<Pita> Have you tried using BerkeleyDB with Ocaml?
<Pita> I really like Lisp
<Pita> but i got frustrated when it's hard to find modules and supports
<Pita> What's a very good reading for starting caml very quickly?
<mflux> many nice tutorials should be easily found with google
Smerdyakov has joined #ocaml
haelix has joined #ocaml
JohGro has quit ["Chatzilla 0.9.68.5 [Firefox 1.0.6/20050717]"]
<Pita> I cannot find a nice introductory material on how to perform basic file IO
<Smerdyakov> The Pervasives documentation should have enough information.
<mfurr> Pita: I found this book helpful when I first started learning OCaml: http://caml.inria.fr/pub/docs/oreilly-book/html/index.html
Smerdyakov has quit ["work"]
Saulzar_ has quit [Read error: 110 (Connection timed out)]
znutar has joined #ocaml
Pita has left #ocaml []
pango has quit ["Leaving"]
moea has joined #ocaml
<moea> anyone know if there's an easy way to switch the byte order of an integer of ocaml?
pango has joined #ocaml
<Schmurtz> moea, there's no standard function for that
<Schmurtz> normaly, you don't need it.
<mflux> yeah, because normally you don't see the byte order of integers
<mflux> if you want to send data to file/network, you will need to construct the data byte per byte anyway
<moea> yeah, i am going to send it over the network
<moea> thanks
<Schmurtz> how to you send it ?
<Schmurtz> do you use the marshaling functions ?
<moea> im not sure yet, i've only implemented the data conversion part of the protocol
<moea> but part of the protocol specifies the endianness of some of the words
<Schmurtz> dont forget that, if you use standard ocaml APIs, you never have to deal with endianess
<moea> ok
<Schmurtz> moea, do you speak with non caml programs ?
__DL__ has quit [Remote closed the connection]
<Schmurtz> if you are in this case, you may need to deal iwth endianess directly
Saulzar has joined #ocaml
<Schmurtz> also be carefull with ocaml integers, they are 31 bits or 63 bits integers (depending on your processor)
<Schmurtz> not 32 or 64 bits
moea has quit [Read error: 104 (Connection reset by peer)]
Purice has joined #ocaml
moea has joined #ocaml
<moea> back
<moea> yeah, i will be talking to non-ocaml programs
<Schmurtz> did you know that ocaml integers are only 31 bits ?
<Schmurtz> and not 32bits
<moea> i think so yeah, i looked at NativeInt and Int64
<moea> brb
<Schmurtz> :)
moea has quit [Client Quit]
znutar has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
monochrom has joined #ocaml
jussx has joined #ocaml
znutar has joined #ocaml
jussx_ has joined #ocaml
Purice has quit ["Leaving"]
jussx has quit [Read error: 110 (Connection timed out)]
zigong has joined #ocaml
jussx has joined #ocaml
Gueben is now known as pypote
pypote is now known as Gueben
jussx_ has quit [Read error: 110 (Connection timed out)]
ayrnieu has joined #ocaml
* Snark is dissatisfied with his build system
* mfurr is currently trying out omake
zigong has quit ["using sirc version 2.211+KSIRC/1.3.11"]
Snark has left #ocaml []
jussx has quit ["leaving"]
petter_ has quit [Read error: 110 (Connection timed out)]
Hadaka has quit [Read error: 145 (Connection timed out)]
Naked has joined #ocaml
Naked is now known as Hadaka
threeve has quit []
Hadaka has quit [Read error: 145 (Connection timed out)]
UziMonkey has quit [Read error: 104 (Connection reset by peer)]
Gueben has quit [Remote closed the connection]
ulfdoz has joined #ocaml
__DL__ has joined #ocaml
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
__DL__ has quit [Remote closed the connection]
mlh_ has joined #ocaml