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!)
cmeme has quit [Excess Flood]
cmeme has joined #ocaml
beterraba has joined #ocaml
schme``` has joined #ocaml
screwt840 has joined #ocaml
Abo-Marwan14 has joined #ocaml
schme`` has quit [Connection timed out]
jlouis has joined #ocaml
crathman has joined #ocaml
seafoodX has joined #ocaml
yminsky has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
smimou has quit ["bli"]
seafoodX has quit [Connection reset by peer]
jlouis_ has joined #ocaml
beterraba has quit ["Ex-Chat"]
jlouis 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
buluca has quit ["Leaving."]
yminsky has quit []
seafoodX has left #ocaml []
seafoodX has joined #ocaml
jlouis has joined #ocaml
phlpp has quit ["Lost terminal"]
jlouis_ has quit [Read error: 110 (Connection timed out)]
robozni has joined #ocaml
david_koontz has quit []
zvrba_ has joined #ocaml
zvrba has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
crathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]"]
mvitale has quit [Read error: 110 (Connection timed out)]
pantsd has quit [Read error: 110 (Connection timed out)]
aij has quit [Remote closed the connection]
aij has joined #ocaml
seafood has quit [Remote closed the connection]
Abo-Marwan91 has joined #ocaml
zvrba_ is now known as zvrba
bebui_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
bebui has quit [Read error: 110 (Connection timed out)]
tristram has quit [Read error: 110 (Connection timed out)]
pattern has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pattern has joined #ocaml
tristram has joined #ocaml
pango has joined #ocaml
screwt840 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan14 has quit [Read error: 104 (Connection reset by peer)]
screwt898 has joined #ocaml
mattam has joined #ocaml
seafood has joined #ocaml
pattern has quit ["Reconnecting to server - dircproxy 1.1.0"]
pattern has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
love-pingoo has joined #ocaml
mrsolo has quit ["Leaving"]
filp has joined #ocaml
schme``` is now known as schme
dss has joined #ocaml
jlouis_ has joined #ocaml
schme` has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
amt2 has joined #ocaml
amt2 has left #ocaml []
schme has quit [Read error: 110 (Connection timed out)]
darinm has joined #ocaml
dss has quit [Connection reset by peer]
ygrek has joined #ocaml
jlouis has joined #ocaml
schme` is now known as schme
jlouis_ has quit [Read error: 110 (Connection timed out)]
darinm has left #ocaml []
jlouis has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
ygrek has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
buluca has joined #ocaml
asmanur has joined #ocaml
Tetsuo has joined #ocaml
vpalle has joined #ocaml
vpalle has quit ["Leaving"]
vpalle has joined #ocaml
seafoodX has quit [Read error: 104 (Connection reset by peer)]
seafoodX has joined #ocaml
filp has quit [Read error: 104 (Connection reset by peer)]
filp has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]
mvitale has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
smimou has quit ["bli"]
buluca has joined #ocaml
piggybox has quit [Connection timed out]
Tetsuo has quit [Remote closed the connection]
seafoodX_ has joined #ocaml
seafoodX has quit [Read error: 110 (Connection timed out)]
austin__ has joined #ocaml
<austin__> heya, is anyone here?
austin__ has quit [Client Quit]
seafoodX_ has quit []
seafoodX has joined #ocaml
seafoodX has quit [Client Quit]
piggybox has joined #ocaml
det has joined #ocaml
Demitar has joined #ocaml
<det> So this seems like a pretty significant event.
crathman has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
vpalle has quit [Read error: 110 (Connection timed out)]
Abo-Marwan91 has quit [Remote closed the connection]
screwt898 has quit [Success]
filp has quit ["Bye"]
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi again
Yoric[DT] has quit ["Ex-Chat"]
Yoric[DT] has joined #ocaml
screwt898 has joined #ocaml
sladegen has joined #ocaml
gunark has joined #ocaml
vpalle has joined #ocaml
pants1 has joined #ocaml
vpalle_ has joined #ocaml
vpalle_ has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan91 has joined #ocaml
<Yoric[DT]> Now, back to attempting to pre-process a non-OCaml file using Camlp4...
vpalle has quit [Connection timed out]
<sladegen> any known problems with compiling ocaml with gcc4? i'm getting errors in otherlibs/unix/stat.c about atime, mtime etc in CAMLlocal5 call...
* sladegen curses softly.
<asmanur> sladegen: the error is ?
<sladegen> stat.c:50: error: 'atime' undeclared (first use in this function)
<sladegen> but it might be because i'm doing it very messly...
<sladegen> trying to work on some NAS box with toolchain in strange place... workaround is defining CFLAGS... etc.
* Yoric[DT] has gcc 4.1.2 and compilation took place flawlessly.
filp has joined #ocaml
<sladegen> lots of implicit function defs...
<sladegen> blah.
david_koontz has joined #ocaml
<asmanur> sladegen: and how is defined CFLAGS ?
<sladegen> CFLAGS="-I/mnt/array1/atool/include -I/mnt/array1/atool/usr/include -I/mnt/array1/atool/usr/local/include"
<asmanur> doh
<sladegen> because root of toolchain is in /mnt/array1 ... it's mess because someone else made it and included some files which i do not want to overwrite in /
<asmanur> hum
<sladegen> asmanur: well there is no /usr/include here at all ;)
<asmanur> and other implicit-defined functions are ?
<sladegen> well: stat.c:49: warning: implicit declaration of function 'CAMLparam0'
<sladegen> stat.c:50: warning: implicit declaration of function 'CAMLlocal5'
* sladegen sighs
<asmanur> hum
<sladegen> it's gcc 4.1.1
<sladegen> hum, exactly.
<asmanur> sladegen: apparently, somehow the file doesn't include the caml-header memory.h where is defined CAMLparam0() (or CAMLparam0() is not defined in your memory.h)
<asmanur> maybe you can fix it in a ad-hoc way ...
<sladegen> btw, it did not like no ; after Begin_root(res) on line 46 in signals.c
<sladegen> not sure if this ; is supposed to be there... but seeing it in other places and it went on after i placed it there.
<sladegen> ok, will see.
<sladegen> hmm... <lightbulb> perhaps i should put $CFLAGS after -I../../byterun :-o
<sladegen> yay ;) thanks asmanur
<sladegen> C is silly. unix sucks... sladegen idioten.
<asmanur> :p
<asmanur> C isn't silly.
ita has joined #ocaml
pants1 has quit [Connection timed out]
Tetsuo has joined #ocaml
bluestorm_ has joined #ocaml
Le-Chuck_ITA has joined #ocaml
<Le-Chuck_ITA> Hi all
<ita> Le-Chuck_ITA: hey
<Le-Chuck_ITA> I was a great fan of ocaml some years ago, but time has passed and I don't remember many things
<Le-Chuck_ITA> in particular: is there a simple pretty-printer/parser generator for data types?
<Le-Chuck_ITA> maybe with camlp4
<Le-Chuck_ITA> ita are you italian?
<ita> Le-Chuck_ITA: no :-)
<Le-Chuck_ITA> I mean: the ocaml toplevel can print values, and the ocaml compiler can read values
<Le-Chuck_ITA> is there access to these two functions somewhere in the libs?
<flux> I think the toplevel has some special information that comes from reading the interface files
<flux> or some backdoor to the compiler in cases when that's not available..
<Le-Chuck_ITA> and there is no tool capable of generating a parser and a pretty printer from a module?
<Le-Chuck_ITA> even external
<flux> there are some tools, perhaps in caml humps
<flux> but they are somewhat primitive
<flux> and can't tell characters and integers from each other
<flux> well, there's only one tool I can think of (I don't remember its name, though), so you can drop the plurals there..
<Le-Chuck_ITA> thanks
<flux> so what are you doing?
<Le-Chuck_ITA> I am pretty printing an AST by hand
<Le-Chuck_ITA> implementing a printing function
<flux> I've used sexplib to great effectiveness for serialising and unserialising datastructures
<flux> for debugging purposes_
<flux> ?
<pango> tywith ?
<flux> yeah, tywith can do lots of that stuff too
<Le-Chuck_ITA> tywith?
<Le-Chuck_ITA> reading now :)
<Le-Chuck_ITA> I see it's the tool at least for pretty printing
<flux> btw, anyone heard any news on sexplib for 3.10.x?
<flux> hm, what's this, sexplib 3.0.1..
<flux> or atleast 3.0.0; humps says 3.0.1 but the real page says 3.0.0
<Le-Chuck_ITA> thanks, tywith is exactly the tool I am looking for
<Le-Chuck_ITA> I am happy to be back to caml :)
<Le-Chuck_ITA> by the way is the ubuntu ocaml maintainer reading this channel?
<flux> I don't think so
<Le-Chuck_ITA> ok thanks
pants1 has joined #ocaml
* Yoric[DT] would like 3.10 in Ubuntu, too.
<Yoric[DT]> flux: so you suggest using sexplib ?
* Yoric[DT] was essentially going to reimplement that stuff by hand.
Torment has joined #ocaml
<flux> I've used sexplib to great effect, yes
<flux> mostly for protocols on programs that are under development: much easier to what needs to go down the socket (or unix-domain-socket)
<Yoric[DT]> fair enough
<Yoric[DT]> I'm currently parsing/serializing s-expressions as comments in code.
<flux> infact I wrote a sexplib-compatiblt s-expression-library for c++ also..
<Le-Chuck_ITA> just a newbie question: how do I tell camlp4 to find camlp4 files in a local directory instead of /usr/lib/ocaml/.... ?
<Le-Chuck_ITA> ehm
<Le-Chuck_ITA> how do I tell OCamlMakefile
Jedai has quit [Read error: 110 (Connection timed out)]
<Le-Chuck_ITA> hmm thanks anyway, got to run :)
Le-Chuck_ITA has left #ocaml []
screwt898 has quit [Remote closed the connection]
Abo-Marwan91 has quit [Remote closed the connection]
screwt898 has joined #ocaml
p_a_u_l has joined #ocaml
centrinia has joined #ocaml
pants1 has quit ["Leaving."]
ygrek has joined #ocaml
zulzul_ has joined #ocaml
schme` has joined #ocaml
asmanur has quit [Read error: 104 (Connection reset by peer)]
* Yoric[DT] is now writing his own custom pre-processor largely without Camlp4.
<sladegen> ay, another "problem", does ocaml support 'ARM926EJ-Sid(wb) rev 0 (v5l)' natively?
schme has quit [Connection timed out]
<Yoric[DT]> What the heck is that ?
<Yoric[DT]> A processor ?
<Yoric[DT]> A combo processor + OS ?
<sladegen> "gcc -c -DSYS_linux -o arm.o arm.S" doesn't love me, starting with: arm.S:112: Error: selected processor does not support `stfd f0,[sp,#-8]!'
<sladegen> it's 'grep "^Proce" /proc/cpuinfo'
* Yoric[DT] is too scared to answer. Even if he did know the answer, which he doesn't.
<sladegen> heh, np, i have a feeling this qualifies for ocaml mailing list better ;)
<Yoric[DT]> :)
ygrek_ has joined #ocaml
* sladegen hugs pango
buluca has quit [No route to host]
* Yoric[DT] kicks his stream parser.
buluca has joined #ocaml
ygrek has quit [Remote closed the connection]
filp has quit ["Bye"]
vpalle has joined #ocaml
centrinia has quit ["Leaving"]
ygrek_ has quit [Remote closed the connection]
piggybox has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
Le-Chuck_ITA has joined #ocaml
<Le-Chuck_ITA> hi all, I am, as suggested here today, using tywith
<Le-Chuck_ITA> I have a compilation problem, though: functions like "string_of_MY_TYPE" derived with tywith
<Le-Chuck_ITA> are not seen by the compiler
<Le-Chuck_ITA> whoa
<Le-Chuck_ITA> I managed
<Le-Chuck_ITA> and it works so well :)
<Le-Chuck_ITA> bye all
Le-Chuck_ITA has left #ocaml []
filp has joined #ocaml
crathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]"]
ita has quit [Remote closed the connection]
bluestorm_ has quit ["Konversation terminated!"]
Abo-Marwan91 has joined #ocaml
filp has quit [Remote closed the connection]
zulzul_ has quit ["++"]
claudiotainen has joined #ocaml
<claudiotainen> hello how can I match a non-empty list using pattern matching ?
<mbishop> use _?
<tristram> match list with x::[] -> foo ; | _ -> bar ;;
<claudiotainen> well I thought about it, but what if I don't insert a list, then
<claudiotainen> I mean, _ stands for everything, doesnt' it ?
<tristram> _ matches also an empty list
<claudiotainen> ok, but in the snippet you wrote works fine because the case "empty list" is the first to be considered
Tetsuo has quit ["Leaving"]
<tristram> gosh... forget what I wrote
<tristram> x::y and not x::[] to match an non empty list
<claudiotainen> ah ok
<tristram> x::[] would match a list with one element
<claudiotainen> with ONE element ?
<claudiotainen> by the way, I've tried to use a int with that matching, and caml says there's and error, because he's expecting an 'a lsit
<claudiotainen> * an 'a list
<claudiotainen> that means it does understand the input expected is a list
<claudiotainen> I wonder if it's that [] which lets it make this assumption ...
pants1 has joined #ocaml
<tristram> can you paste the code ? (btw : does anyone knows a pastie that supports caml ? )
<tristram> x::[] would math [2] but wouldn't match 2 as you do the matching on a list
<claudiotainen> here it is: http://pastie.caboo.se/110606
<claudiotainen> ok my snippet is a bit different, since it is meant to sum the elements of an int list
<tristram> you need an ending condition :) let rec somma x = match x with h::t -> h + (somma t) | _-> 0;
<tristram> but for that precise thing you would use fold_right :)
<claudiotainen> oh I posted the wrong code
<tristram> :)
<claudiotainen> yes I did insert that very condition
<claudiotainen> so what I was thinking was: what if I write " somma_lista 2 ;;
<tristram> 2 is an int, and somma_list works on lists, you cannot mix both
<claudiotainen> uhm ok, and what's the element that lets ocaml understand the function works on lists ?
<Yoric[DT]> Good night everyone.
Yoric[DT] has quit ["Ex-Chat"]
<tristram> that's the type inference
<tristram> as you do a match on h::t, the parameter can only be a list
<tristram> furthermore, as your do h + .. h is an int
<claudiotainen> ok
<claudiotainen> now it's all clear
<claudiotainen> thank you a lot, tristram :)
<tristram> you're welcome
<tristram> it's not always easy to understand the caml way to think (functional, type inference etc.)
<tristram> but it's really worth it !
<claudiotainen> yeah, it's DEFINITELY not easy
<tristram> it's easy, just a bit to much different
<claudiotainen> well I only used imperative languages before I had to study ocaml, and I'm feeling a bit "out of place"
<tristram> :)
love-pingoo has quit ["Connection reset by pear"]
jlouis has joined #ocaml
<claudiotainen> tristam would you be so kind to take a look at another function ?
<claudiotainen> I get a syntax error and I can't figure out whats wrong with the code ...
<tristram> errr, I was about to go to bed, so you have 1 minute :)
<claudiotainen> syntax error on the second String.length stringa
<claudiotainen> the one inside the recursive call
vpalle has quit ["Leaving"]
<tristram> let c = String.get stringa 0 in
piggybox has joined #ocaml
<tristram> the "in" is important (kinda "local" variable)
<claudiotainen> in ?
<tristram> well, actually the a few things to say
<claudiotainen> well ok don't bother too much
<tristram> lista @ [c]; <= this shouldn't be there :)
<claudiotainen> I mean go to bed, I've already abused of your helpfullness ;)
<tristram> see you tomorrow :)
<claudiotainen> bye ;)
claudiotainen has quit ["leafChat IRC client: http://www.leafdigital.com/Software/leafChat/"]
det has quit [Remote closed the connection]
jlouis_ has joined #ocaml