dylan changed the topic of #ocaml to: OCaml 3.09.1 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/
smimou has quit ["bli"]
<love-pingoo> I think I agree with Caml here..
<love-pingoo> the value returned by the else branch isn't a list
<love-pingoo> you probably meant [{ path= ... }] (don't forget to put that single element in a list)
<love-pingoo> besides, the map will return a list of list of entries, which you'll need to concatenate
<love-pingoo> cause what you really want here as a result is a list of entries
levi has quit []
<pauld> love-pingoo, ok, i suspected that
<pauld> thanks
pauld has quit [Read error: 110 (Connection timed out)]
_fab has quit [Remote closed the connection]
mikeX has quit ["zzz"]
khaladan has quit [Read error: 104 (Connection reset by peer)]
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
Submarine has quit ["Leaving"]
xanavim has quit ["Who moved my Mac512?"]
tspier2 has joined #ocaml
<tspier2> Hello
<tspier2> pango, you here?
<tspier2> Well, I will be back tomorrow. I need to go to sleep, so I will ask my questions tomorrow.
tspier2 has quit ["Leaving"]
khaladan has joined #ocaml
levi has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
Mister_C has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
MisterC has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
bzzbzz has quit ["leaving"]
Snark has joined #ocaml
vodka-goo has joined #ocaml
love-pingoo has quit [Read error: 104 (Connection reset by peer)]
slipstream-- has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
pauld has joined #ocaml
bluestorm has joined #ocaml
khaladan has quit [" HydraIRC -> http://www.hydrairc.com <- IRC has never been so good"]
levi has quit [Read error: 110 (Connection timed out)]
pango is now known as pangoafk
pangoafk is now known as pango
_fab has joined #ocaml
gim has quit [Remote closed the connection]
<pauld> How do I convert a structure like "type tree = Leaf of string | Node of tree list" to a string list? Is there som common pattern?
<pauld> "/som/some"
<bluestorm> hum
<bluestorm> what do you call "common pattern" ?
<bluestorm> i think just doing a recursion with a list concatenation would be ok
<bluestorm> let rec list_of_tree = function
<bluestorm> Leaf str -> str
<bluestorm> | Node list -> List.concat (List.map list_of_tree list)
<bluestorm> in
<bluestorm> (not tested)
jave has joined #ocaml
<jave> anyone using swig here?
<pauld> Mmm. Thanks. had to change "-> str" to "-> [str]"
<jave> im trying to make a swig wrapper for libmagic to use in ocaml
<jave> i have made a toplevel which includes libmagic, but my example segfaults when calling a function
<pauld> Phuu. this ML thing is hard! How long time before you people really understood it / could be productive?
<bluestorm> jave, never used swig, sorry
<jave> ok
<bluestorm> pauld, what is so hard (compared to what ?)
<pauld> bluestorm, if find it hard to understand compared to imperative programming.
<bluestorm> hum
<bluestorm> in some case functional programming is much more easier
<bluestorm> (don't you find this tree_to_list function easy ?)
<pauld> I suppose removing complicated state will pay of when building larger systems
<pauld> I'm just so very used to it
<pauld> bluestorm, yes very simple but I would have figured it out myself.
<bluestorm> hum
<bluestorm> did you have something as cool as strong static typing and 'no-pointer' when using imperative languages ?
<jave> i dont know ocaml very well, but it helps knowing lisp a bit
<pauld> bluestorm, don't misunderstand me. I'm not bashing ocaml. More like bashing myself
<jave> a 100 lines of java code is 3 ocaml lines, thats makes it easier to understand
<bluestorm> pauld, :p
<pauld> jave, yes I'm watching the "Structure and interpration of computer" videos. It's very, very cool.
<jave> what are those?
<pauld> "/computer/computer languages/"
<pauld> it's a course held at MIT in the eighties on LISP. http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
<jave> ah, k
<jave> lisp is more verbose than ocaml imho
<jave> im just hacking some ocaml so my brain wont rot from all java/python/c++ crap
<pauld> i'm taking a break from a big java project. java kills souls.
<jave> indeed
<pango> "common pattern" here is high order functions (HOF)
<bluestorm> pango,
<bluestorm> hum
<bluestorm> what you mean by 'common pattern' is implemented a _fold_left function, that provide higher re-usability ?
<bluestorm> (graouh, s/implemented/the implementation of /)
<pango> yes, pauld asked for a "common pattern" for functions on complex datastructures, using HOF is one of them
<pango> tree_fold_left can be used in other functions than list_of_tree, so you don't have to write recursive visit again and again
<bluestorm> i see
Mister_C has quit [Remote closed the connection]
mikeX has joined #ocaml
gim has joined #ocaml
joshcryer has quit [Client Quit]
bzzbzz has joined #ocaml
mikeX has quit ["later"]
vodka-goo is now known as love-pingoo
gim has quit ["x-restart"]
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
<pauld> pango, thanks. It took me like 40 minutes to do substitution on that thing but I've got it now.
<pauld> :)
<bluestorm> :p
Snark has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
levi has joined #ocaml
mikeX has joined #ocaml
bzzbzz has quit ["leaving"]
Smerdyakov has joined #ocaml
bzzbzz has joined #ocaml
Submarine has joined #ocaml
<Smerdyakov> Submarine, what is the meaning of this ucsc.edu address?
<Submarine> the meaning is that I'm staying temporarily at UCSC
<Smerdyakov> Who's your host?
<Submarine> Martin Abadi and Luca de Alfaro
<Submarine> talking about this, would your team be interested in a talk about Astree?
<Smerdyakov> Absolutely.
<Smerdyakov> Though I don't really know that I belong to a team anymore, but we have a ~20 people group that meets to discuss PL issues each week.
<Submarine> who should I mail about this?
<Smerdyakov> George would probably be a good bet.
<Smerdyakov> This is faculty hiring season, so there are a lot of job talks going on, but I'm sure we can find a slot for you. :)
<Submarine> the only trouble is that I'm supposed to go to Taiwan for one week at some point but I don't know when
<dylan> Gah.
<Smerdyakov> Submarine, well, if you let me know that you have e-mailed George, I will follow up in person at my advising meeting tomorrow.
<dylan> HP's ACPI-DSDT team could use a software verifier. The ACPI code in the bios is horribly broken with regards to temperature reading
<dylan> actually, it appears that the removed temperature reading on purpose...
<dylan> Although even a decent testing policy would have caught this (if it isn't on purpose)... I mean, how many CPUs operate at 0 degrees C?
zzxxcc has joined #ocaml
smimou has joined #ocaml
pango is now known as pangoafk
pangoafk is now known as pango
zzxxcc has quit ["离开"]
twobitsprite has quit [Read error: 110 (Connection timed out)]
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
Snark has quit ["Leaving"]
Submarine has quit [Read error: 110 (Connection timed out)]
khaladan has joined #ocaml
xanavim has joined #ocaml
bzzbzz has quit ["leaving"]
Submarine has joined #ocaml
mrsolo has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
love-pingoo has quit ["Connection reset by by pear"]
bluestorm has quit [Remote closed the connection]
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
Submarine has quit [Connection timed out]
mlh has joined #ocaml
kryptt has joined #ocaml
Submarine has joined #ocaml
khaladan has quit [Read error: 104 (Connection reset by peer)]
levi has quit []
smimou has quit ["bli"]