dark_light changed the topic of #ocaml to: OCaml 3.09.2 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/
shawn__ has quit [Read error: 110 (Connection timed out)]
jcreigh has joined #ocaml
Carillon has joined #ocaml
ziggurat has joined #ocaml
EsotericMoniker has joined #ocaml
pango_ has joined #ocaml
Carillon_ has quit [Connection timed out]
Carillon is now known as Carillon_
pango has quit [Remote closed the connection]
<wkh> why do french people talk in sing-song so much
<Smerdyakov> They have head problem.
<wkh> need political re-education, eh comrade?
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- The future of IRC"]
mwc has joined #ocaml
mwc has left #ocaml []
Eelis_ has joined #ocaml
dibblego has joined #ocaml
Eelis has quit [Read error: 110 (Connection timed out)]
mwc_ has joined #ocaml
mwc_ has left #ocaml []
wkh has quit [Read error: 110 (Connection timed out)]
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
Mr_Awesome has joined #ocaml
<Mr_Awesome> can a functor take multiple arguments?
Mr_Awesome has left #ocaml []
Smerdyakov has quit ["Leaving"]
youknow365 has joined #ocaml
_velco has joined #ocaml
Wild_Cat has joined #ocaml
shawn__ has joined #ocaml
Wild_Cat has quit []
smimou has joined #ocaml
dibblego has quit ["Leaving"]
velco has joined #ocaml
Wild_Cat has joined #ocaml
|Lupin| has joined #ocaml
<|Lupin|> Hi.
<youknow365> Holà
<|Lupin|> hi youknow365
<youknow365> Como Estàs
<|Lupin|> youknow365: please, speak english
<youknow365> I willl try
<youknow365> qué tú necesitan
<youknow365> ?
<youknow365> what do you need ........sorry
<youknow365> |Lupin|: ^^
<|Lupin|> mhhhh
<|Lupin|> Wrote a Printf-likefunction but this doesn't work, in fact
<youknow365> Printf.printf "fdsdfsdf"
<flux__> it will not work, use Pritnf.ksprintf :)
<flux__> Printf even
<youknow365> flux__: ^^
<|Lupin|> flux__: ok
<youknow365> lol
<flux__> so, like: let debug_magic = Printf.ksprintf (fun str -> if !debug then output_string str else ())
<flux__> hm, maybe
<flux__> no, you need parameter 'fmt' there also
<flux__> let debug_magic fmt = Printf.ksprintf (fun str -> if !debug then output_string stdout str else ()) fmt
<|Lupin|> flux__: yeah it's exactly the kindof thing I'm trying to do !!
<youknow365> proquè no Printf.printf "fsfsdf"
<|Lupin|> flux__: you werethere yesterday ?
<flux__> yes
<flux__> let debug = ref false before that and that debug_magic works perfectly
<flux__> debug := true afterwards naturally changes the status
<pango_> s/ksprintf/kprintf/, and the "else ()" can be made implicit
smimou has quit ["bli"]
<flux__> pango_, Printf-manualpage says kprintf is depreciated
<flux__> hm, s/ciated/cated/
<pango_> mmh but I don't see the other form in printf.ml{,i}... Guess it's a change in 3.09 ?
<flux__> maybe so
<pango_> yes, lots of changes around Printf... http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/stdlib/printf.mli.diff?r1=1.41;r2=1.42 (& many other commits)
<pango_> the only problem with that implementation is the cost when !debug = false ... debugging messages are evaluated, to be immediately discarded...
<flux__> yes
<flux__> it would require some language extension to go over that
<flux__> or explicitly stating the if-statement all over the code
<flux__> (hm, s/statement/expression/)
<zvrba> camlp4 magic?
<pango_> seems so
Carillon has joined #ocaml
Carillon_ has quit [Read error: 110 (Connection timed out)]
Carillon is now known as Carillon_
Eelis_ is now known as Eelis
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
finelemo1 has joined #ocaml
_velco has quit [niven.freenode.net irc.freenode.net]
_velco has joined #ocaml
finelemon has quit [Read error: 110 (Connection timed out)]
<|Lupin|> How can onesee the ChangeLog of OCaml between, say, 3.08.3 and 3.09.2 ?
<|Lupin|> Thanks
pango_ has quit ["brb"]
<|Lupin|> flux__: still here ?
pango has joined #ocaml
ziggurat has quit ["This computer has gone to sleep"]
ziggurat has joined #ocaml
<flux__> yes
<|Lupin|> flux__: Do you know howthe function yousuggestedthis morning could be written with OCaml 3.08 ?
<|Lupin|> flux__: it seemsthat the ksprintf functio was introduced onli in 3.09...
<flux__> |lupin|, pango suggested kprintf
<|Lupin|> oh, yes
<|Lupin|> flux__: But this becomes deprecated starting from 3.09 ?
<flux__> yes
<|Lupin|> So, there is no clean solution... ?
<|Lupin|> Hmm I guessThe bestthing would be to have a code dependent on which version of Caml is installed...
<flux__> just use the older function
<flux__> or just support the latest ocaml
<flux__> simple options ;)
<|Lupin|> flux__: My preference would be toSupport only the latest Caml, but there are some users of mytool under Windows, there are no binaries for Cygwin for the latest versionof Caml, and when we tried to compile it + find lib, it failed, so I'm indeed going to use theolderfunction...
<flux__> |lupin|, how is developing software for windows with ocaml going on for you?
<flux__> |lupin|, are you writing command line/server-software or something with a gui?
ziggurat has quit ["Leaving"]
f78 has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
<|Lupin|> flux__: no gui.
<|Lupin|> flux__: just a command-line oriented program, in this good old-fashioned but efficient Unix way.
gottreu has joined #ocaml
|Lupin| has quit ["leaving"]
<gottreu> I remember finding a book in a library several years ago that taught compiler construction using OCaml or ML and assumed no great prior knowledge of either.
<gottreu> Does anyone know of any similar online resource(s)?
Smerdyakov has joined #ocaml
<pango> gottreu: came across min-caml (http://alan.petitepomme.net/cwn/2005.03.08.html#5) not so long ago, but you're probably referring to something else...
piggybox has joined #ocaml
<gottreu> pango: i was most likely thinking of http://www.cs.princeton.edu/~appel/modern/
<gottreu> why I am interesting, is that 1) I've been wanting to learn OCaml for a good long while now, and 2) I want to do source level transformation of C++ code, and writing that in Perl wouldn't be 'elegant' enough
<gottreu> why i'm *interested*
<Smerdyakov> gottreu, see this for C++ analysis: http://www.cubewano.org/oink-stack/
<flux__> I recall there was a tool around that converted c++ into simplified c++
<Smerdyakov> This one does that and more.
<flux__> hm, what language is oink written in?
<Smerdyakov> C++
<Smerdyakov> I certainly wouldn't use it, but then I don't care about C++.
<Smerdyakov> However, I don't think there is anything else available to can compare to Oink for functionality.
<Smerdyakov> It is basically impossible that you could write real C++ transformations without using Oink unless you are willing to spend 4 years developing your own infrastructure.
<velco> heh
velco has quit ["Ex-Chat"]
<pango> gottreu: it's interesting to compare the size the of errata for the first editions of the books... 11 screens for C version, 10 for Java, 7 for ML :)
<gottreu> perhaps i misspoke when i said transformations, want I want is automatic inclusion of code at function and loop starts...no real refactoring or heavy lifting
<Smerdyakov> gottreu, what does your code need to understand about its input C++ sources?
<gottreu> nothing semantic, initially just where the beginning of a function definition is
<gottreu> i'm trying to reinvent the wheel of source level profiling
<Smerdyakov> Why are you using C++, anyway?
<Smerdyakov> And are you planning to do simple 'grep'-style replacement, or do you actually want to parse C++ source?
smimou has joined #ocaml
Wild_Cat has quit ["Leaving"]
<Eelis> C++ parsing is not for the faint of heart. even seemingly simple things like distinguishing between variable declaration and function call require the construction of a full compiler.
<Smerdyakov> Yup. See Oink. :)
<Smerdyakov> They can parse the majority of Debian packages.
<zvrba> hm, why not use gcc-xml ?
<Smerdyakov> Are you kidding? You really want to work with XML representations?
<Smerdyakov> I'm not familiar with gcc-xml, but I know that Oink compiles code into a simplified internal language. Does gcc-xml do that?
<flux__> apparently gcc-xml doesn't support c++ function bodies
<Eelis> the representation hardly seems like a big issue, converting XML into something else is easy
<gottreu> Smerdyakov: i don't want to do replacement, cause i'd still have to manually put in initial placeholder. I just want to be able to place a few c++ statements at the beginning of every (or almost every) c++ function
<gottreu> and I want a valid-ish reason to learn OCaml
<Smerdyakov> gottreu, I don't think you've answered either of my questions.
<zvrba> Smerdyakov: it dumps xml syntax tree :)
<Smerdyakov> zvrba, if it's the source-level syntax, then it's mostly worthless.
<zvrba> gottreu: it might be easier to instrument object code, there are good tools for that (like PIN)
<Smerdyakov> zvrba, C++ is too complicated to make working with source syntax practical.
<gottreu> Smerdyakov: sorry, i'll retry after lunch...
<zvrba> i don't know the details though
gottreu is now known as gottreu-afk
<zvrba> Smerdyakov: what kind of simplified language is oink?
<zvrba> i.e. translates it to
<Smerdyakov> zvrba, the main author describes it as a core Java-like language.
pango has quit ["Leaving"]
pango has joined #ocaml
f78 has joined #ocaml
EsotericMoniker has quit [Remote closed the connection]
Snark has joined #ocaml
DRMacIver has joined #ocaml
DRMacIve1 has quit [Read error: 104 (Connection reset by peer)]
gottreu-afk is now known as gottreu
Snark has quit ["Leaving"]
_fab has quit [Read error: 104 (Connection reset by peer)]
_fab has joined #ocaml
_jol_ has joined #ocaml
<gottreu> zvrba: (referring to the comments made a little over 3 hours ago) source has a few nice advantages to object code, one is that if you create an locally scoped object then when the function ends (regardless of the number of exit points) the object's desctructor will be called
<gottreu> Smerdyakov: would you mind restating your questions?
<zvrba> gottreu: huh, it'll be also called in the object code
<zvrba> gottreu: source code doesn't call anything
postalchris has joined #ocaml
<gottreu> zvrba: i mean if in the source you add the object creation, then the destructor is automatically called. I assume that with object code you'd either have to add function exiting code at multiple places (if the function returns in multiple spots) or change the object code around to have only 1 exit point
<gottreu> zvrba: but keep in mind i'm speaking about things at the edge of my knowledge, so i might be wrong
<zvrba> what are you talking about, it's the compiler who generates code so that destructors are called whenever object goes out of scope
chessguy has joined #ocaml
<gottreu> zvrba: i'm trying to say that if c++ parsing wasn't such a pain, it should be easier to automatically add code at the entrance and exit to a function at the source code level, than at the object code level
<gottreu> because in source code, you can get the compiler to do stuff for you when it compiles, but if you add stuff to object code, you'd have to do those things yourself
<gottreu> zvrba: sorry if i'm not clear, like i said i'm somewhat out of my league on this topic, and sorry to anyone else who finds this a little bit too offtopic for an OCaml channel ;)
shawn__ has quit ["This computer has gone to sleep"]
_jol_ has quit ["co'o rodo"]
Carillon has joined #ocaml
<_velco> gottreu: alternatively one could instrument the various intermediate representations of GCC itself
<_velco> like it's dont in mudflap, for instance
<_velco> s/dont/done/
EsotericMoniker has joined #ocaml
Carillon_ has quit [Connection timed out]
Carillon is now known as Carillon_
postalchris has quit [Read error: 113 (No route to host)]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- The professional IRC Client"]
dark_ has joined #ocaml
Wild_Cat has joined #ocaml
DRMacIver has quit [Read error: 104 (Connection reset by peer)]
DRMacIver has joined #ocaml
f78 has quit [Remote closed the connection]
dark_ has quit ["Leaving"]
Wild_Cat has quit []
gottreu has left #ocaml []
cratuki has joined #ocaml
<cratuki> Has anyone here done web programming with ocaml? What do you use in the place of an ORM? I have complex needs, and want to buffer data between page loads and before a commit
<cratuki> Keeping a transaction open might serve my needs..
<smimou> you might want to have a look at dedicated extensions like ocsigen.org
<cratuki> That seems to operate at the templating level. I want a managed translation layer to bridge a relational database to ocaml in such a way that the ocaml compiler can thereby pick up invalid relationships.
smimou has quit ["bli"]
beschmi has joined #ocaml
danly has left #ocaml []
danly has joined #ocaml