rwmjones changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.1 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
psnively has quit []
goalieca has joined #ocaml
zmdkrbou has quit [Read error: 113 (No route to host)]
middayc has joined #ocaml
<mbishop> Snrrrub: the mailing list?
hkBst has quit ["Konversation terminated!"]
ita has quit ["Hasta luego!"]
zmdkrbou has joined #ocaml
<Snrrrub> Good call. Also, I might as well just mention it here. I've just put up a tarball of OCamlPAM, a wrapper library for PAM. It's downloadable from http://sharvil.nanavati.net/ocamlpam/
<goalieca> remind yourself never to mention anything remotely bad about haskell on reddit. :/
<jlouis> goalieca: why?
<goalieca> you get called stupid and downmodded
<goalieca> mostly because any idiot can do category theory after reading a tutorial of course
LordMetroid has quit ["Leaving"]
<mwc> Haskell's a good language to know
<mwc> Ocaml's just vastly more practical
<mbishop> Too bad it's already getting a Ruby-like fanbase
<mwc> heh
<mwc> Haskell on Helicopters?
<mbishop> Heh
<mwc> Ocaml on... Camls?
<mwc> *camels
<mbishop> Ocaml on Ostriches?
<mwc> Camel on Ostrich action. <paris_hilton>that's hot</paris_hilton>
<jlouis> I generally like the ML's more because they are so damn effective when you have a problem you need solved
Mr_Awesome has joined #ocaml
<jlouis> and you can basically do anything the Haskell guys can do, more or less if you bend the metal right
<goalieca> haskell is a good language to know.. i like learning it
<goalieca> i just don't like how any faults i have with the language are because i'm too stupid
<goalieca> and not because the language has flaws
<jlouis> I generally find Haskell to be more combinator-heavy than ML
<jlouis> so there is a larger standard library to learn
<mwc> I'm unimpressed with the implementations
<jlouis> (And category theory is not entirely uninteresting, mind you, hehe)
<mwc> GHC regularly breaks for me
<goalieca> i never studied lambda calculus or anything. i studied computer engineering. should i have to know category theory to be able to use a language? no...
<mwc> granted I use strange hardware like PowerPC running linux
<goalieca> i run macosx too
<goalieca> ghc is hard to get working
<mwc> so I spend around half the year without a working GHC
<mwc> Same reason I switched to git from darcs.
<mwc> Git is better I now realized, but I couldn't use darcs on my linux powerbook
<mwc> *now realize
<goalieca> i'm still using svn. i've been meaning to use GIT
<mwc> I almost want to release a Haskell project using git just to hear the wailing on #haskell :)
<jlouis> It is mercurial here :)
<mwc> that's the other thing about haskell, the community is deeply fanatical about haskell everything
<mwc> they stick with darcs despite it being broken because it's written in Haskell
<mwc> and they just learn how to avoid invoking the O(n!) behaviour
<mbishop> sounds like C
<goalieca> hmm. i also don't like how they show haskell can be fast pointing to debian language shootout. take a look at the nbody.hs
<goalieca> basically it's hacked ot use pointers
<mbishop> "such and such is broken." "That's ok, we'll just figure out complicated ways to get around it without actually fixing the problem!"
<jlouis> goalieca: indeed. Many of the faster haskell programs exhibit that problem
<goalieca> hmm. i asked for help to do things the right way. but then they always have me simulating c in haskell
<goalieca> so it was actually harder
<goalieca> then they tell me i'm stupid :D
<jlouis> hehe
<goalieca> anywho. the ocaml community seems large enough but is fairly quiet and well grounded. haskell community is really a few loud people
<jlouis> When you are to write a program, about 95% of it will be "slow" -- but elegant. The last 5% will be optimized to hell, but the shootout problems completely defeats that purpose
<mbishop> If only Smerdyakov cared enough about OCaml to go ranting about it like he does with SML, then we could be loud too!
<mbishop> :)
<jlouis> goalieca: Most of us are too busy doing research, hehe
<goalieca> yeh. dons spends too much time talking about haskell and not enough doing haskell :P
<mwc> I don't understand how dons manages to have posted about 30% of the programming.reddit's content at any given time
<jlouis> mwc: He probably distills what others post in IRC channels
<mwc> hahah
<goalieca> he also just posts everything on planet haskell
<Smerdyakov> The Haskell community has a very high fanboy-to-actual-contributor ratio.
<mwc> "Fear of Intimacy"
<mwc> best protein name ever
<jlouis> Smerdyakov: indeed.
<Smerdyakov> Almost everyone using OCaml is a serious hacker.
<goalieca> i like fear of intimacy too
<goalieca> well i have real work to do.. so fighting a language is not fun.
<goalieca> that's why i'm learning ocaml. and i got productive fast enough
<goalieca> a little rougher syntax wise but then again look at c++..
<mwc> indeed, we need a revised revised syntax
<jlouis> Hmm, R6RS....
<mwc> that's the nice thing about p4
<jlouis> They got the semantics wrong 6 times now ;)
<mwc> our revised syntaxes are completely compatible
<goalieca> if syntax was really a huge issue then perl wouldn't be used at all
<mwc> I don't know
<mwc> I sometimes find obscure bugs in my programs
<mwc> that come from misreading the whitespace
<mwc> I have to stare at it for a while
<mwc> and then I realize it
<mwc> I've never had that happen with haskell's syntax
<mwc> a bunch of times with ocaml's
jstanley has left #ocaml []
<Smerdyakov> A Galois spy!
<goalieca> well python has mandatory whitespace
<jlouis> Smerdyakov: I thought the same, hehe
<mwc> speaking reddit
<mwc> what was with calling http://www.freedom-to-tinker.com/?p=1257 a "new class of attack on cryptosystems"
<mwc> first off, it's not an attack on the cryptosystem, it's an attack on an implementation
<jlouis> mwc: It is idiotic. It requires physical access
<mwc> secondly, is reading the key an attack?
<jlouis> And a can of liquid nitrogen
<mwc> indeed
<mwc> I know the point of encrypting a file system is specifically to protect against theft of the actual disks
<mwc> but regardless of that
<mwc> a
<mwc> a cryptosystem is math.
<mwc> this isn't math. this is an attack on a cryptosystem in the same way that sending a spy to sleep with the guy who copies the embassy's message is an attack on a cryptosystem
<jlouis> Your important data should be on encrypted disks inside a safe with thermite charges on top of the disks
<Smerdyakov> I have to disagree.
<Smerdyakov> Cryptosystems are supposed to be immune to in-person tampering.
ikatz has joined #ocaml
<jlouis> of course it can be exploited. If you get, say, the laptop and quickly put in into liquid nitrogen
<jlouis> and in general, when speaking security, any attack is as good as another
<goalieca> it should be much harder to crack the system than get the password/key through other means
<goalieca> like kidnapping etc :P
<mwc> right, or subverting the actual system
<mwc> If during WW2, allied commando's broke into german naval headquarters and stole the enigma codes and algorithm, we wouldn't call that a break
<mwc> What Turing did was an attack on a cryptosystem
<mwc> this doesn't help you read the plaintext without the key
hsuh has joined #ocaml
vpalle_ has quit [Read error: 110 (Connection timed out)]
<goalieca> hmm.. well my paper got accepted. but i know i won't get funding to go to paris to present :(
<goalieca> the whole reason to target the conference was to go to paris :P
<Smerdyakov> Which conference?
<goalieca> my school is in serious deficit right now
<goalieca> isbi
<goalieca> its an ieee one
middayc has left #ocaml []
seafood_ has joined #ocaml
seafood__ has joined #ocaml
seafood_ has quit [Connection timed out]
maayhem has quit [Read error: 110 (Connection timed out)]
maayhem has joined #ocaml
hsuh has quit [""emacs is food for thought""]
coucou747 has quit ["bye ca veut dire tchao en anglais"]
maayhme has joined #ocaml
maayhem has quit [Read error: 110 (Connection timed out)]
evn has joined #ocaml
coucou747 has joined #ocaml
<ikatz> ocamlyacc question:
<ikatz> i have a lexer and a parser set up to read some input
<ikatz> its all first-order logic sentences:
<ikatz> MyPredicate1(x, y, z) | MyPredicate2(x, y, z)
<ikatz> the sentences can have any number of predicates, separated by "|" and the predicates can have any number of terms, separated by ", "
<ikatz> earlier today i thought i had the parser working and moved on to other things
<ikatz> but on closer inspection, it is copying the first list item to all subsequent itmes
<ikatz> so for my previous example:
<ikatz> MyPredicate1(x, y, z) | MyPredicate2(x, y, z)
<ikatz> that becomes
<ikatz> oops let me back up
<ikatz> say i have this:
<ikatz> MyPredicate1(a, b, c) | MyPredicate2(x, y, z)
<ikatz> it parss as
<ikatz> MyPredicate1(a, b, c) | MyPredicate1(a, b, c)
<evn> i cannot get godi to use my right library paths
<evn> i am trying to install the sqlite binding
<evn> and even if i add /opt/local to SEARCH_LIBS the Makefile still gets emitted with -lsqlite3 -L/usr/lib
<evn> which is too old
<evn> halp :(
<evn> "GODI never uses the LD_LIBRARY_PATH feature" has foiled the obvious solution
l_a_m has quit [Remote closed the connection]
mwc has quit ["Leaving"]
maayhme has quit [Read error: 110 (Connection timed out)]
<coucou747> omg... i've made something who've malloc 1.5 Go....
<coucou747> I've only 1 go :(
coucou747 has quit ["bye ca veut dire tchao en anglais"]
AxleLonghorn has left #ocaml []
<flux> evn, did you try configuring package conf-sqlite, which I suppose exists?
<evn> i did actually, and eventually got it to work (had to rebuild the gobi-ocaml-sqlite afterwards). but i need to do the same thing for readline for gobi-omake and there is no conf-readline
<evn> so i still need some other solution :/
<evn> flux: but thanks for the suggestion
<flux> evn, maybe this will help you if you don't already know them: on linux, -rpath /opt/local/lib is the switch you want to pass to the linker
<flux> (for gcc it would be -Wl,-rpath,/opt/local/lib)
<evn> this is osx :/
<evn> either way, how do i manually add a linker switch
<evn> to the godi build process
<flux> it might be -R /opt/local/lib there
<evn> that sounds right
<flux> would it be easier to add that path to the global library search path? I hear solaris got that feature lately, maybe it has been in BSD for a while too
<evn> i'm not sure how to do that
<evn> $DYLD_LIBRARY_PATH seems to be ignored by GODI
<evn> and LD_LIBRARY_PATH is in the doc as being definitely ignored
<flux> I don't mean an environment variable but something more global; solaris has a file in /etc, linux has /etc/ld.so.conf
<evn> hmmm
<flux> although I think there should be some other solution too :)
<evn> i know that ld_library_path is kinda shady but i wish that godi would just support it anyway :/
<evn> i kinda think that the default paths for os x's ld are hardcoded in :/
<evn> maybe they're in some xml somewhere
<evn> just says what they are
<flux> have you tried LD_RUN_PATH?
<flux> where do you put the SERACH_LIBS variable, in the environment I suppose, exported etc?
evn_ has joined #ocaml
<flux> hm
<flux> have you checket out the defs.*.mk -files?
<evn_> i did not try LD_RUN_PATH
<flux> this document refers to it: http://godi.ocaml-programming.de/project-doc/finding_libraries.txt (search for string '+++ Makefile variables +++')
<evn_> what would i set it to exactly
<evn_> ok searching
<flux> similar to LD_LIBRARY_PATH but for compile time
<evn_> and i can set it in godi.conf?
<flux> no, LD_RUN_PATH would be an environment variable
<flux> but it appears the proper place to set SEARCH_LIBS would be the defs.*.mk -file in godi/build/mk
<evn_> ok ill try that first
<evn_> is bsd.pkg.defaults.mk used by everything
<evn_> defs.Darwin.mk doesn't have an SEARCH_PATHS
<evn_> LIBS rather
<flux> I think you can still add it, Linux.mk doesn't either..
<evn_> i added it in godi.conf which is supposed to prepend but it still seems to be finding the system version and not the opt version
<evn_> i wonder what happens if i just move the system one out of the way temporarily
<flux> ah, that may well be an issue.. I thought the problem was not finding the library at all
<flux> didn't notice that one message
<evn_> no it claims to find it but then fails to build because its too old
<flux> perhaps there is a godi mailing list you could try
<evn_> i dunno which header it is using, even
<evn_> ok
<flux> one approach would be to modify sqlite3 makefile
<flux> or the part where it decides where it finds the stuff
<evn_> godi loves to clobber your changes when you request an install tho
<evn_> not sure how to hand-hold that process
<flux> does the sqlite3 package support building sqlite3 of its own?
<evn_> dont think so
<evn_> it is the readline i am concerned about now though
<evn_> conf-sqlite worked once i recompiled its dependent items
<flux> hm
<flux> did you configure conf-sqlite?
<flux> you haven't mentioned GODI_SQLITE3_LIBDIR or GODI_SQLITE3_INCDIR
<flux> which are the two parameters you can configure with conf-sqlite3
<evn_> sqlite is fine now
<flux> ok
<evn_> i need readline for omake
<evn_> and there is no conf-readline
<flux> is there another kind of readline package? I can't find one from my godi..
<evn_> no... its a system dependency in omake
<flux> omake has its own readline bindings?
<evn_> guess so
<evn_> + gcc -O2 -I/opt/godi/include -L/opt/godi/lib -g -O2 -Wall -Werror -Wno-unused -DREADLINE_ENABLED -DREADLINE_GNU -DNCURSES -DFAM_ENABLED -DFAM_PSEUDO -DFAM_KQUEUE -DHAVE_STRING_H -DHAVE_STRINGS_H -DHAVE_SNPRINTF -DDETECT_FS_CASE_SENSITIVE_GETATTRLIST -I. -I/opt/godi/lib/ocaml/std-lib -I. -c -o readline.o readline.c
<evn_> *** omake: 1144/1159 targets are up to date
<flux> so what's the problem with readline?
<evn_> its getting the old version from /usr/ somewhere instead of the up to date one in /opt/local
<evn_> cc1: warnings being treated as errors
<evn_> readline.c: In function ‘readline_raw’:
<evn_> readline.c:1228: warning: implicit declaration of function ‘rl_on_new_line’
<flux> maybe you can install a more recent one directly to the godi path ;)
<evn_> is my bug
<evn_> oh... hmm thats a sneaky idea
<flux> or make it compile without readline
<evn_> are other libraries likely to depend on readline too or not really
<flux> not very likely
<flux> omake isn't a library either
<evn_> yeah... its a dependency of some other apps tho
<evn_> hmm godi_omake doesn't have a 'c' option
<evn_> where do i go to set the readline disable option
<flux> would be modifying the makefiles -approach again
<evn_> ok
<goalieca> hmm. how come ocaml interpreter doesn't allow me to push "up" arrow key for history
<thelema> goalieca: licensing - compiler (including toplevel) has QPL license, readline is GPL
<evn_> flux: if i remove the readline in /opt it uses libedit in /usr appropriately i think. but then it says:
<evn_> gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
<evn_> _caml_sync
<evn_> and fails out again
<evn_> i am on CVS ocaml, could that be a problem?
<evn_> (i need the dynlib ability to use ocaml extensions in other languages on osx)
<flux> no idea
<flux> goalieca, however, there are many tools to remedy that problem
<flux> goalieca, I use rlwrap, but there is ledit too
<goalieca> ledit is emacs :(
<goalieca> same with rlwrap
<evn_> Patching failed due to modified patch file(s): patch-ab-cldbm
<evn_> but i modified it on purpose :/
<evn_> struggling with dbm now, gave up on omake
<evn_> (ocsigen dependency)
seafood__ has quit []
<evn_> ah
<evn_> foiled it by changing the sh1
<evn_> sha1
<evn_> the dbm binding fails because a patch to a comment doesn't match the current gdbm source :/
thermoplyae has quit ["daddy's in space"]
kelaouchi has joined #ocaml
<flux> evn_, in general, how difficult has it been to set up godi in osx?
<evn_> the initial setup was easy, even getting CVS ocaml to work
<evn_> all my troubles are external dependency issues
<evn_> The usual construction to show that a given "thing" is a proper class is to show that such a "thing" has at least as many elements as there are ordinal numbers.
<evn_> oops
<evn_> wrong channel
<evn_> crap
<evn_> i still can't install ocsigen
<evn_> i get a version conflict with package godi-ocaml
<evn_> but it doesnt tell me what packages are conflicting
<evn_> i.e. requesting the wrong ocaml version
<evn_> ugh camlduce doesn't install either
<evn_> only the simplest libraries work
pango has quit [Remote closed the connection]
pango has joined #ocaml
thelema has quit [Read error: 110 (Connection timed out)]
|Catch22| has quit []
Linktim has joined #ocaml
kelaouch1 has joined #ocaml
Snrrrub has quit [Read error: 110 (Connection timed out)]
<flux> maybe ocisgen is not yet upgraded to 3.10.x?
<evn_> one dependency reported it needed 3.10.0 and 20 others said 3.10.1
<evn_> oh are you thinking ocsigen itself is the one without the updated version
<evn_> that is likely
lnostdal has joined #ocaml
kelaouchi has quit [Read error: 110 (Connection timed out)]
<julm> cl
<julm> oops
ygrek has joined #ocaml
evn_ has quit []
vpalle_ has joined #ocaml
seafood_ has joined #ocaml
filp has joined #ocaml
thelema has joined #ocaml
vpalle_ has quit ["Leaving"]
<ygrek> hello. can someone point me a working example of simple project using ocamlbuild + extlib ?
<ygrek> irony is I managed to compile it on windows but fail on debian
<ygrek> with the same command (path to extlib adjusted)
<ygrek> ocamlbuild module.byte -classic-display -I /usr/lib/ocaml/3.10.0/extlib -libs extlib -verbose 1
<ygrek> and when it comes to lexer.mll i fails
<ygrek> /usr/bin/ocamlc.opt -c -o lexer.cmo lexer.ml
<ygrek> no extlib here but lexer.mll uses it
seafood_ has left #ocaml []
seafood_ has joined #ocaml
<pango> goalieca: echo set editing-mode vi > ~/.inputrc; rlwrap ocaml
filp has quit [Remote closed the connection]
<ygrek> ocamlbuild $@.byte -classic-display -lflags -I,/usr/lib/ocaml/3.10.0/extlib/ -cflags -I,/usr/lib/ocaml/3.10.0/extlib/ -I /usr/lib/ocaml/3.10.0/extlib -libs extLib,str -verbose 1
<ygrek> works
<ygrek> it is awful
<ygrek> I'm certainly doing something wring
<ygrek> * wrong
jderque has joined #ocaml
bluestorm has joined #ocaml
olleolleolle has joined #ocaml
l_a_m has joined #ocaml
goalieca has quit [Remote closed the connection]
authentic has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
LordMetroid has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
kelaouch1 has quit [Client Quit]
jeremiah has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
coucou747 has joined #ocaml
<coucou747> salut all
<julm> bonjour coucou747
jeremiah has joined #ocaml
nicom has joined #ocaml
nicom has quit [Client Quit]
middayc has joined #ocaml
middayc has quit [Client Quit]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
middayc has joined #ocaml
ita has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
seafood_ has quit []
jderque has quit ["leaving"]
eelte has joined #ocaml
coucou747 has quit [Read error: 104 (Connection reset by peer)]
middayc_ has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
lordmetroid_ has joined #ocaml
lordmetroid__ has joined #ocaml
LordMetroid has quit [Success]
rogo has left #ocaml []
jderque has joined #ocaml
lordmetroid_ has quit [Connection timed out]
ita has quit [Remote closed the connection]
authentic has left #ocaml []
love-pingoo has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
<ertai> ygrek: Do you use the same version of ocamlbuild on windows and linux?
zenhacker_rouan has joined #ocaml
pango has quit [Remote closed the connection]
Morphous has joined #ocaml
pango has joined #ocaml
AxleLonghorn has joined #ocaml
Amorphous has quit [Nick collision from services.]
Morphous is now known as Amorphous
middayc_ has quit [Read error: 110 (Connection timed out)]
<ikatz> anyone have experience with ocamlyacc?
jlouis_ has joined #ocaml
<bluestorm> ikatz: depends on how much you need
letrec has quit []
middayc has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
<ikatz> bluestorm: nothing too crazy... just a problem building lists
<ikatz> say i have this:
<ikatz> MyPredicate1(a, b, c) | MyPredicate2(x, y, z)
<ikatz> first-order logic sentences that i want to parse
<ikatz> so i have the lexer and the parser made and they seem to work
<ikatz> but when i print the things back out i get
<ikatz> MyPredicate1(a, b, c) | MyPredicate1(a, b, c)
<thelema> ikatz: what's your rule for |?
<ikatz> '|' { PIPE }
<ikatz> and then in the parser its:
<ikatz> sentence:
jderque has quit [Read error: 113 (No route to host)]
<ikatz> | literal { $1 :: [] }
<ikatz> | literal PIPE sentence { $1 :: $3 }
<ikatz> does that look right for building lists using the parser?
<thelema> I don't see a problem there...
<ikatz> i'm going to double check my print function
<thelema> for literal?
olleolleolle has quit []
<ikatz> literal:
<ikatz> | NOT predicate { Negative ($2) }
<ikatz> | predicate { Positive ($1) }
<thelema> double-check your printer
<ikatz> but if it looks basically ok to you, i'm probably screwing something else up. i just needed a sanity check.
<ikatz> yeah, i'll check that now
<ikatz> yep that was it... amazing how much clearer it looks today than yesterday at 2am :)
middayc has quit []
Snrrrub has joined #ocaml
ttamttam has joined #ocaml
<eelte> bye
eelte has quit ["bye ca veut dire tchao en anglais"]
jderque has joined #ocaml
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
<ygrek> ertai, I think yes, though I am not fully sure - can't check right now
delamarche has joined #ocaml
middayc has joined #ocaml
thermoplyae has joined #ocaml
delamarche has quit [Client Quit]
delamarche has joined #ocaml
Yoric[DT] has joined #ocaml
goalieca has joined #ocaml
middayc has quit []
AxleLonghorn has left #ocaml []
<flux> ocsigen apparently has no javascript interoperability at all,
<flux> atleast so that google would know about it
ita has joined #ocaml
middayc has joined #ocaml
<evn> flux: no... apparently not
<flux> has anyone used ocsigen for something interesting?
<flux> even for toys?-)
<evn> it was used to make the ocsigen website...
<evn> it doesnt look very practical tome
<evn> the webserver might be pretty nice though
<flux> "We are also working on two major enhancement of the system:one concerns the automatic generation of (well typed) Javascriptcode to be executed on the browser [22]. This extension will al.."
<flux> 2006..
middayc has quit [Read error: 110 (Connection timed out)]
<flux> put ocsigen, add javascript generation, finish relational and package them all together, and you have a killer app ;)
lordmetroid__ is now known as LordMetroid
<flux> I wonder if you could convert ocaml into javascript with camlp4
<flux> like, don't go through the whole compilation process; rather, translate from language to language
<flux> and if the ocaml code would also be compiled, the compiler would give static typing guarantees
<ikatz> does camlp4 actually do translation between languages?
<ikatz> as a follow-up, can you generate c code from ocaml code?
<flux> not by itself, of course there would be code to be written
<thelema> ikatz: it can do pretty arbitrary modifications to text
<flux> yes. there was actually a presentation on that exact matter.
<ikatz> have a link?
<ikatz> or is that the ocsigen thing you were talking about
<flux> no
<flux> can't find it now
<flux> someone here surely remembers the presentation..
<flux> the idea was to parse makefiles and produce c-files which, when compiled, would do the make
goalieca has quit [Remote closed the connection]
<flux> now, if we had a factoid-storing bot here, important nuggets of information such as this wouldn't get lost ;)
<ikatz> factoids;;
<ikatz> let factoids = ref [];;
<ikatz> damn... ocaml interpreter bot is missing too
<bluestorm> ikatz: you can see camlp4 as a big framework intended at manipulating pieces of Abstact Syntax Tree
<bluestorm> a generic AST layer is supported, but you have a sophisticated OCaml AST too
<bluestorm> everything you want to do involving syntaxic manipulation of ocaml code (eg. creating ASTs when parsing slightly modified ocaml sources, that is, syntax extensions) is possible
<bluestorm> you theorically could use camlp4 to create a OCaml -> C translator
<bluestorm> but 1) the C logic isn't handled by camlp4 itself, you have to do it
<bluestorm> 2) it would be only at the syntax level : you wouldn't have the usual semantic informations (typing, etc.)
ttamttam has left #ocaml []
<ikatz> i reject that theory on the grounds that i'm lazy
<bluestorm> so in practice, camlp4 would not be the right tool for that
<ikatz> :)
<bluestorm> (as it is only a syntax-manipulation program)
<ikatz> thats cool
<bluestorm> ikatz: if you want to do ocaml -> another language translation, a maybe more powerful approach would to use an internal representation of the ocaml compiler tools
<bluestorm> there is one that look like (untype) lisp very much, for example
<ikatz> interesting
<bluestorm> (ocamlc -drawlambda foo.ml)
<ikatz> i guess i could also check out the capabilities of interfacing ocaml and c libraries
<bluestorm> (but on that topic i can't help you, i don't know ocaml internals at all)
<flux> bluestorm, but for ocaml->javascript it should be more doable
<flux> bluestorm, because usually you can just drop typing information and things just work..
<flux> tco might be tricky..
<flux> but for ajax purposes it wouldn't IMO need to be perfect; it would be mostly used as a glue
evn has quit []
evn has joined #ocaml
<bluestorm> flux: i think there are representation more adapted than the AST for that purpose
<bluestorm> iirc, most Haskell compilers have an simplified internal langage, named "Core", that is suited to that kind of things
bluestorm has quit ["Konversation terminated!"]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
ygrek has quit [Remote closed the connection]
julm has quit [Read error: 104 (Connection reset by peer)]
Linktim has quit [Remote closed the connection]
thermoplyae has quit [Remote closed the connection]
thermoplyae has joined #ocaml
jderque has quit ["leaving"]
seafood_ has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
delamarche has quit []
ita has quit [Remote closed the connection]
thelema has quit [Read error: 110 (Connection timed out)]
jlouis has quit ["leaving"]
jlouis has joined #ocaml
LordMetroid has quit ["Leaving"]
<_W_> this is off topic, but I figure people here are likely to know. Are there any decent protocol definition languages? Something that can be used to define a protocol in a machine-readable format to be compiled into APIs in multiple programming languages?
<_W_> (if you know of a better place to dig, or people to ask, that's appreciated as well)
<love-pingoo> I've heard several researchers present this as a long-term goal but I don't know about any established usable tool for that :\
<_W_> got any names?
<_W_> I mean I could start writing my own stuff, but it'd likely be far from generic enough, and full off kludges
<Smerdyakov> Sort of related: http://www.padsproj.org/
<_W_> well, it's something to base it off, but then again you could just use EBNF or something
<ikatz> does anyone know of a function that can turn a list into a tuple?
middayc has joined #ocaml
<ikatz> because i think i just wrote one
<ikatz> and i have no idea how it works
<Smerdyakov> It's easy with Obj.magic or other unsafe nasties, impossible otherwise.
<ikatz> but it is taking lists that i give it and turning them into tuples that contain all the list elements
<ikatz> in order
<ikatz> ????
<Smerdyakov> No, it isn't, unless you're using some unsafe library.
<ikatz> no nasties... List.fold_left
<ikatz> i'm as surprised as you are
<Smerdyakov> Paste a link to the code.
<ikatz> will do
<ikatz> i'm rewriting it as a function specifically to do this
<thermoplyae> probably something like [a;b;c] |-> (a, (b, (c, [])))
<thermoplyae> not a tuple like we're all thinking
<ikatz> hmm
<ikatz> you tell me... one sec