gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
sebz has quit [Ping timeout: 246 seconds]
sebz has joined #ocaml
lopexx has quit []
<_habnabit> well, ocaml is fun again now that I have batteries. e.g. (!) |- (+.) &&& (:=) |- uncurry (|-)
<thelema> _habnabit: ?? wtf?
<_habnabit> it's the same thing as `fun r x -> r := x +. !r`
<thelema> hmm, maybe batteries should have +! and +.! (or something) for ref operations
<bitbckt> technomancy: #load "str.cma" perhaps?
metasyntax has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
pheredhel has quit [Ping timeout: 252 seconds]
pheredhel has joined #ocaml
dnolen has quit [Quit: dnolen]
metasyntax has quit [Quit: Leaving]
technomancy has quit [Ping timeout: 240 seconds]
khia0 has joined #ocaml
khia0 has left #ocaml []
dnolen has joined #ocaml
sebz has joined #ocaml
joewilliams is now known as joewilliams_away
sebz has quit [Quit: Computer has gone to sleep.]
arubin has quit [Quit: arubin]
iratsu has quit [Ping timeout: 255 seconds]
sebz has joined #ocaml
ulfdoz has joined #ocaml
bobry has joined #ocaml
junsuijin has quit [Quit: Leaving.]
ulfdoz has quit [Read error: Operation timed out]
dnolen has quit [Quit: dnolen]
bobry1 has joined #ocaml
chrissbx has joined #ocaml
ankit9 has quit [Quit: Leaving]
ttamttam has joined #ocaml
larhat has joined #ocaml
Ptival has quit [Quit: Quat]
thomasga has joined #ocaml
hyperboreean has quit [Ping timeout: 260 seconds]
hyperboreean has joined #ocaml
Cyanure has joined #ocaml
avsm has joined #ocaml
ankit9 has joined #ocaml
thomasga has quit [Quit: Leaving.]
Ptival has joined #ocaml
thomasga has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 246 seconds]
avsm has quit [Quit: Leaving.]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
avsm has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
avsm has quit [Quit: Leaving.]
zorun has quit [Read error: Operation timed out]
lopex has joined #ocaml
Amorphous has quit [Ping timeout: 260 seconds]
sebz has joined #ocaml
zorun has joined #ocaml
Amorphous has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
_andre has joined #ocaml
ttamttam has quit [Remote host closed the connection]
avsm has joined #ocaml
metasyntax|work has joined #ocaml
dnolen has joined #ocaml
metasyntax|work has quit [Quit: Leaving]
<hcarty> philtor: The GODI + PCRE problem is a known issue and apparently fixed now
<hcarty> philtor: The upstream package had unintentionally changed
avsm has quit [Quit: Leaving.]
munga has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
khia0 has joined #ocaml
khia0 has left #ocaml []
sebz has quit [Quit: Computer has gone to sleep.]
StepanKuzmin has joined #ocaml
ankit9 has quit [Ping timeout: 264 seconds]
aspect has left #ocaml []
iratsu has joined #ocaml
hnrgrgr has quit [Remote host closed the connection]
ankit9 has joined #ocaml
hnrgrgr has joined #ocaml
gno has quit [Ping timeout: 240 seconds]
ankit9 has quit [Ping timeout: 255 seconds]
dnolen has quit [Quit: dnolen]
ttamttam has joined #ocaml
lopex has quit []
iratsu has quit [Ping timeout: 255 seconds]
cynddl has joined #ocaml
<cynddl> hi
bobry1 has quit [Quit: Leaving.]
<munga> can anybody point me to a simple ocamlyacc example that handles multi line comments ?
lopex has joined #ocaml
joewilliams_away is now known as joewilliams
philtor has quit [Remote host closed the connection]
iratsu has joined #ocaml
technomancy has joined #ocaml
ttamttam has quit [Remote host closed the connection]
<technomancy> bitbckt: that's it; thanks. guess I've got some more reading to do
<bitbckt> technomancy: no problem.
qdl_ has joined #ocaml
<technomancy> the hickey book only mentions #load once without really any explanation of what it does. can you suggest a better source from which to learn about big-picture build and project issues?
<qdl_> Hi, is here anyone familiar with OCaml on MacOS X?
kfx has left #ocaml []
<qdl_> I haven't been using OCAMl for a while. I'm currently setting up a working environment again. Is it possible to use the tuareg mode with "Aquamacs"?
<bitbckt> technomancy: the manual is fairly exhaustive, and ocaml-tutorial.org is decent.
larhat has quit [Quit: Leaving.]
<bitbckt> build and project issues are largely ill-defined, though. OASIS aims to change that.
bobry has quit [Quit: Leaving.]
bobry has joined #ocaml
<technomancy> oasis, huh; I'll take a look
<technomancy> ocaml-tutorial.org doesn't resolve
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
<bitbckt> There's a mirror.
<bitbckt> it's been awhile since I've needed these things. if they aren't meeting your needs, let us know.
<technomancy> thanks
<mcclurmc> qdl_: aquamacs is just emacs with a mac gui, right? i'd be really surprised if you had any trouble running tuareg under aquamacs if that's the case
<technomancy> aquamacs does have subtle incompatibilities with GNU emacs
<qdl_> @mcclurmc
<qdl_> @mcclurmc: First of all, I wasn't quite sure, how to "install" the tuareg mode. It seems Aquamacs uses different folders for those files.
Anarchos has joined #ocaml
<qdl_> I"ll try it that way.
<technomancy> qdl_: my friends on OS X always recommend http://emacsformacosx.com rather than aquamacs
<technomancy> I don't know how set you are on aquamacs, but running a fork always increases the chance of incompatibilities
<qdl_> @technomancy: Thanks, I'll take a look at that one as well ...
<qdl_> I found Aquamacs on macupdate.com
<technomancy> at some point I may look at packaging tuareg up for marmalade to streamline the install process
<technomancy> would be nice to have M-x package-install tuareg and bam; you're done
<qdl_> OK, I got it to work with Aquamacs.
<cynddl> qdl_: otherwise, textmate is quite good for ocaml
<qdl_> @cynddl: Never heard of that. An editor?
ulfdoz has joined #ocaml
<cynddl> qdl_: yep http://macromates.com/
<qdl_> I use Emacs/Tuareg for learning purposes. The interactive OCaml shell is good for checking out stuff.
<qdl_> Usually AlphaX is my preferred editor.
<qdl_> I forgot almost everything. How can I write a comment in an OCaml source?
<bitbckt> (* *)
<technomancy> M-; =)
Ptival has quit [Quit: Leaving]
<bitbckt> Or that. :)
* bitbckt notes the sudden change to #emacs with pleasure
<bitbckt> technomancy: you have that effect, I think.
<technomancy> haha; guilty as charged.
<qdl_> @technomancy: ?
<technomancy> qdl_: in emacs, pressing M-; toggles the commentedness of the region.
<qdl_> M- is ESC, isn't it?
<technomancy> qdl_: or alt or command, depending on your system
<qdl_> Aha.
<qdl_> OK. Works with ALT.
bobry has quit [Ping timeout: 252 seconds]
bobry has joined #ocaml
sepp2k has joined #ocaml
Ptival has joined #ocaml
qdl_ has left #ocaml []
sepp2k has quit [Ping timeout: 240 seconds]
metasyntax|work has joined #ocaml
ankit9 has joined #ocaml
Associat0r has joined #ocaml
betta_y_omega has quit [Ping timeout: 276 seconds]
betta_y_omega has joined #ocaml
thomasga has quit [Quit: Leaving.]
hnrgrgr has quit [Remote host closed the connection]
sepp2k has joined #ocaml
qdl_ has joined #ocaml
<qdl_> Hello, could someone answer me some question on the compiler "ocmalc"?
<qdl_> * "ocamlc"?
<hcarty> qdl_: Ask away - if someone can help then you'll get an answer :-)
<qdl_> As I understood the compiler produces a object "foo.cmo: from a source code "foo.ml", which has to be linked to a bytecode executable with a second compiler run. Can that be done in one step, as well?
<hcarty> qdl_: You want a stand-alone bytecode executable?
<qdl_> I assume.
<hcarty> I think the -custom flag is what you need, but it's been a while since I've used the compilers directly.
<hcarty> ocamlbuild, OCamlMakefile and oasis hide all of these things quite nicely.
<qdl_> Could I get an example of the usage?
<qdl_> With the -custom option ocamlc produces a file called a.out. Is there an option to set the name?
<hcarty> qdl_: The ocamlc documentation covers the command line flags, I don't remember them off the top of my head
<hcarty> Probably something like "-o my_exe"
<qdl_> @hcarty: Yepp, thanks.
<hcarty> qdl_: You're welcome
<adrien> qdl_: ocamlc without -custom creates an a.out file too but the first thing this file will do is to run "ocamlrun(.exe)" to interpret it (it = a.out)
<adrien> with -custom, ocamlrun(.exe) and the a.out file are merged into the same executable
<qdl_> @adrian: OK. I haven't found a.out when I was looking the first time. I was searching for foo.out.
<qdl_> Cool. I think I understood something.
avsm has joined #ocaml
<technomancy> qdl_: for the record, you can drop the @ sign; we're not (currently) on twitter =)
<qdl_> technomancy: OK. But, what is twitter?
<technomancy> qdl_: using the at sign to refer to someone is comes from twitter.com, a social network site
<qdl_> Ah, OK. I never use a social or anti-social networks.
<qdl_> I know the @ from somewhere else.
ygrek has joined #ocaml
<metasyntax|work> In order to get backtraces for exceptions in native code (ocamlopt -g) do I need to have everything I link against compiled with -g as well?
sepp2k has quit [Quit: Leaving.]
Associat0r has quit [Quit: Associat0r]
<adrien> metasyntax|work: no, but you might miss bits of info
<adrien> basically, you get names for what has been compiled with -g
<technomancy> I get a segfault running the oasis linux installer.
<technomancy> anything I can do to debug?
<adrien> segfault or another error? and simply running it under gdb might help
<technomancy> just a segfault
<technomancy> I've never used gdb
<technomancy> maybe I should start with ocamlbuild or something else?
<technomancy> the only thing that's in apt is omake; is that a reasonable place to start?
<technomancy> not a huge fan of makefiles in general, but it may be unavoidable
<metasyntax|work> adrien: OK, I must be doing something wrong then, because I'm getting no back trace at all. Trouble is I've got a larger program, so I'll try to trim it down and maybe I'll figure it out. Thanks.
milosn has quit [Remote host closed the connection]
milosn has joined #ocaml
<technomancy> oasis looks really convenient, modulo the whole segfault thing
<adrien> technomancy: "gdb oasisfoo", then "run", and when it crashes, type "bt"
<adrien> technomancy: omake has basically nothing to do with make
<adrien> metasyntax|work: do you use OCAMLRUNPARAM="b" ?
<technomancy> found a similar bug reported on oasis that recommended strace, so I attached that output to a new bug report
<technomancy> we'll see
<metasyntax|work> adrien: Oh, I see that's required even when not using ocamlrun. Thanks for the pointer!
<adrien> metasyntax|work: might be possible to enable it from code directly too, not sure about that however
<hcarty> technomancy: If you want to start playing with oasis in the mean time, you can try odb
<hcarty> technomancy: Although the download link there is wrong...
<hcarty> You would want to curl -O https://raw.github.com/thelema/odb/master/odb.ml
<hcarty> technomancy: That will, assuming no early-development-related issues, allow you to build oasis in your home directory
<hcarty> gildor: Just a note - the odb download link on the oasis-db website it incorrect
<hcarty> gildor: https://raw.github.com/thelema/odb/master/odb.ml is the correct URL. I'm not sure if this is due to a github change or something else.
<hcarty> ygrek: Should extlib 1.5.2 be pushed from unstable to testing on oasis-db?
<ygrek> hcarty, what does that mean?
<technomancy> hcarty: taking a look; thanks
<hcarty> ygrek: Sorry ... I should have provided some context :-)
<hcarty> ygrek: It looks like you uploaded a newer version of extlib to oasis-db
<hcarty> ygrek: By default, it ends up in the "unstable" tree of packages
<hcarty> ygrek: odb pulls from testing by default
<hcarty> technomancy: Good luck!
<ygrek> so I guess somebody has to pull it from unstable and verify that it works and then promote to testing?
<technomancy> hcarty: syntax error running odb.ml on line 1
<technomancy> oh dang; it's just an html redirect, never mind
<technomancy> curl being stupid
<technomancy> wget does the right thing
_andre has quit [Quit: leaving]
<hcarty> technomancy: Yes, that's why I sent the other URL :-) I ran into the same thing a few days ago when running a test
<hcarty> Apparently curl doesn't follow redirects by default
<technomancy> is odb a pretty recent development?
<bitbckt> ocaml has had (prob. still has) pretty awful package management systems.
Modius has joined #ocaml
<adrien> technomancy: definitely
<bitbckt> and yes, odb et al. are very new.
<technomancy> for clojure we were able to piggy-back on existing JVM mechanisms, which helped with bootstrapping a lot
<bitbckt> yes. ocaml typically uses OS-specific packages, right now.
<bitbckt> if any at all.
<bitbckt> the real core of the matter is that very few people use it in an industrial setting.
<hcarty> GODI is quite nice in a lot of ways, but the setup and interface are apparently troublesome on anything other than Linux.
<bitbckt> if doesn't bite INRIA, it doesn't get blessed.
<technomancy> or jane street, it looks like?
<hcarty> bitbckt: I think most of the industry users have their own tools, and/or use GODI.
<bitbckt> hcarty: that's right.
<bitbckt> ergo, no blessed toolset.
<hcarty> technomancy: X. Leroy has made it clear that packaging is a community job in their eyes. Their blessing seems to comes in the form of trying not to interfere :-)
<hcarty> bitbckt: ^^
<bitbckt> hcarty: I know.
<hcarty> There have been some positive steps from the core OCaml folks, such as built-in support for ocamlfind in ocamlbuild.
<bitbckt> + dpkg is our current system.
<hcarty> And the yearly OCaml meetings have been quite nice from the videos and presentations I've seen online
<bitbckt> oasis is a nice addition.
<bitbckt> I haven't had a need for a CPAN-alike, yet.
<hcarty> ygrek: If there are no backwards-incompatible changes then it could be pushed over. Ideally someone would so some basic tests first.
<hcarty> bitbckt: I used odb for the first time in order to get oasis up and running
<avsm> so whats the state of all the various CPAN-like things for ocaml? is there one I can try yet?
<hcarty> avsm: odb is in a usable, if limited, state
<bitbckt> hcarty: Reasonable idea. I maintain an OS package for ocaml, ocamlfind and oasis and go from there.
<avsm> im just updating all the various openbsd ocaml ports, and it is such a royal pain in the ass making packaging work on bytecode-only architectures
<hcarty> avsm: It builds on oasis-db's server side components
<avsm> odb...cool, not seen that one. will take a gander
<bitbckt> I don't really use external libs, though.
<avsm> bitbckt: indeed, thats the problem. i use that set + Lwt
<hcarty> bitbckt: There isn't much need for anything beyond OCaml + findlib + oasis then :-)
<bitbckt> hcarty: nope )
thomasga has joined #ocaml
<bitbckt> :)
<avsm> in fact, the Lwt top-level is aliased to 'ocaml' on my machine. It's absolutely amazing, with autocomplete, history, etc
thomasga has quit [Client Quit]
<bitbckt> avsm: I do the same thing.
<hcarty> avsm: utop seems to be lwt-toplevel++
<hcarty> Adding basic highlighting and better completion
<bitbckt> utop is on my "check it out" list.
<bitbckt> +1, I guess.
<hcarty> (that was the next package I turned to odb for...)
<ygrek> hcarty, what I miss in odb is --verbose
<avsm> not tried it yet. I'm just hacking together a jquery-based ocamlbrowser-replacement for Mirage
<ygrek> to show all http requests and locally touched directories
<avsm> should be reusable for the stdlib; uses the xen ocamldoc_json generator
<ygrek> Successfully installed extlib
<ygrek> Exception: Invalid_argument "String.sub".
<ygrek> o_O
<hcarty> ygrek: The latest version has a flag to let you pass options into the underlying package builds. That may help.'
<hcarty> ygrek: Yes, I've seen that before too. I'm not sure where it comes from.
<hcarty> ygrek: thelema may be able to track it down if you submit a bug on github
<technomancy> I like the look of odb, but it doesn't have xlib, which I need. is there an alternative I could check?
<technomancy> or I guess an alternative to xlib that is in odb?
<hcarty> technomancy: I don't know of any package for the OCaml xlib library
<hcarty> technomancy: Cairo may be a reasonable alternative, but it is not ready to go in odb yet due to lablgtk2 not being ready for odb yet
<technomancy> this is what I was looking at: http://www.linux-nantes.org/~fmonnier/OCaml/Xlib/
<technomancy> seems relatively approachable
<ygrek> hcarty, it is easy to track just looking at the code
<technomancy> my needs are pretty simple; just accept one char of input at a time and display a list of words
<technomancy> but if there are more convenient odb-friendly alternatives I'm all ears
<hcarty> It looks like xlib uses a custom Makefile to build, so it may not work in odb without significant tweaking
<hcarty> technomancy: ANSITerminal may do what you want from a terminal
<hcarty> I haven't used it, but it looks interesting
<ygrek> hcarty, thelema, http://paste.in.ua/2880/
<technomancy> no, I definitely need X. I'm porting dmenu: http://tools.suckless.org/dmenu/
goncalo has quit [Ping timeout: 258 seconds]
sebz has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ftrvxmtrx has joined #ocaml
zorun has quit [Ping timeout: 258 seconds]
chrissbx has quit [Ping timeout: 258 seconds]
chrissbx has joined #ocaml
jamii has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Reaganomicon has joined #ocaml
Cyanure has quit [Ping timeout: 252 seconds]
jamii has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
lopex has quit [Ping timeout: 260 seconds]
iratsu has quit [Read error: Operation timed out]
sebz has joined #ocaml
lopex has joined #ocaml
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
<_habnabit> was the sexp stuff dropped from batteries? I see some references to it now and then, but it doesn't seem to be in the latest batteries.
<hcarty> _habnabit: It was dropped sometime before the 1.0 release
<_habnabit> ah.
<_habnabit> is there any serialization stuff in batteries?
<hcarty> If you find references to it then a bug report would be helpful to eliminate those
<hcarty> I don't think that there is, beyond the printing infrastructure.
<_habnabit> trying to find out what's going on in some code, but getting at the data is exceedingly annoying.
<hcarty> BatPrintf.printf "%a%!" (List.print Int.print) my_int_list;
<hcarty> _habnabit: ^^ Would something like that help?
<_habnabit> specifically, trying to print a map from (string option * StringSet.t) to ((string option * StringSet.t) * int)
<hcarty> See the matching Foo.print functions to get some nice console output
<_habnabit> oh, no, it's to ((string option * StringSet.t list) * int)
<hcarty> That should still be quite workable by combining the appropriate *.print functions.
<_habnabit> I've tried to use .print functions before with limited success. does (most) everything have a .print function?
<hcarty> Something like: Map.print (Tuple.print (Option.print String.print) StringSet.print) (....
iratsu has joined #ocaml
<_habnabit> ah.
<hcarty> Everything should. If it doesn't then it's probably a bug.
<hcarty> Parent_structure.print Child1.print Child2.print ... stdout; is another way to use the print functions, without bothering with *printf
<hcarty> The functions take a bit of getting used to, but they work very well together and can be easily implemented for your own types.
<_habnabit> it looks like Tuple2.print assumes an ('a * 'b) tuple.
<_habnabit> errrr, ('a * 'b)
<_habnabit> ah, .printn
<hcarty> Oh, right, I forgot about that
avsm has quit [Quit: Leaving.]
iratsu has quit [Ping timeout: 255 seconds]
<_habnabit> QuestionMap.print (Tuple2.printn (Option.print String.print) (ColorSet.print String.print)) (Tuple2.printn (Tuple2.printn (Option.print String.print) (List.print (ColorSet.print String.print))) Int.print)
<_habnabit> fun.
<_habnabit> hmm. the output is almost unintelligible.
<_habnabit> so... is there a way to make it easier to read?
iratsu has joined #ocaml
ygrek has quit [Quit: Leaving]
<technomancy> is there a way to tell whether you're in the toplevel?
<_habnabit> !Sys.interactive
<technomancy> _habnabit: thanks!
StepanKuzmin has quit [Ping timeout: 260 seconds]
khia0 has joined #ocaml
khia0 has left #ocaml []
dnolen has joined #ocaml
Ptival has quit [Read error: Connection reset by peer]
<technomancy> so it turns out I don't need xlib at all; the Graphics module gives me everything I need: http://p.hagelb.org/erythrina.ml.html yay
Modius has joined #ocaml
<technomancy> I'm a little confused about regexps though; why is this false? Str.string_match (Str.regexp "a") "what" 0;;