flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
ottbot has quit [Ping timeout: 260 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
noam has quit [Ping timeout: 240 seconds]
pkrnj has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
ctult has joined #ocaml
dwmw2 is now known as dwmw2_gone
noam has joined #ocaml
q66 has quit [Remote host closed the connection]
ctult has quit [Quit: _sigh_]
darkf has joined #ocaml
thomasga has quit [Quit: Leaving.]
travisbrady has quit [Quit: travisbrady]
yacks has quit [Quit: Leaving]
srcerer has joined #ocaml
mfp has quit [Ping timeout: 258 seconds]
wmeyer``` has quit [Ping timeout: 248 seconds]
travisbrady has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
oriba has quit [Quit: oriba]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
pkrnj has joined #ocaml
Icarot has quit [Ping timeout: 264 seconds]
Icarot has joined #ocaml
Icarot has quit [Ping timeout: 252 seconds]
fraggle_ has quit [Ping timeout: 255 seconds]
Icarot has joined #ocaml
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
amaloz has joined #ocaml
fraggle_ has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
sw2wolf has joined #ocaml
amaloz has quit [Read error: Connection reset by peer]
amaloz has joined #ocaml
travisbrady has quit [Quit: travisbrady]
LukeSun has left #ocaml []
hto has quit [Quit: Lost terminal]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
walter|r has joined #ocaml
alxbl_ is now known as alxbl
alxbl has quit [Changing host]
alxbl has joined #ocaml
walter|r has quit [Quit: This computer has gone to sleep]
yacks has joined #ocaml
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mye has joined #ocaml
<flux> adrien, well, the list was advertised many times in the caml mailing list, probably not anymore though :)
Icarot has quit [Ping timeout: 252 seconds]
Cyanure has joined #ocaml
Icarot has joined #ocaml
ulfdoz has joined #ocaml
josch has joined #ocaml
<josch> hi, i have a library that specifies the operators <% and >%, specifically here is the mli file
<josch> http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/cudf.git;a=blob;f=cudf.mli
<josch> my problem is that this works:
<josch> Cudf.(<%)
<josch> but this doesnt:
<josch> Cudf.(>%)
<josch> and I get:
<josch> Error: Unbound value Cudf.>%
<josch> what could the reason be?
adotbrown has quit [Ping timeout: 240 seconds]
<flux> strange. this works: module Z = struct let (<%) a b = () let (>%) a b = () end;; and then Z.(<%) and Z.(>%)
<flux> are you certain you have that version installed?
<josch> even if i had a different version - there never was a version with just one operator but not the other
<josch> in fact there was
<josch> what the...
<josch> okay back in a minute...
<josch> flux: damn... that's it
<josch> head -> table
<josch> flux: thanks for your time anyways :)
<flux> josch, :)
mye has quit [Quit: mye]
Cyanure has quit [Remote host closed the connection]
Yoric has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
Yoric has quit [Ping timeout: 264 seconds]
<adrien> flux: well, I remmeber seeing the "platform" mentionned but I also don't understand why talking about namespaces was on that list
<orbitz> I that platform group is supposed to be a big driver ofchange in ocaml itself from now on ...?
ttamttam has joined #ocaml
<adrien> hmmm, missing verb ;-)
<flux> the reason was that namespaces were deemed to be a pre-condition to building the platform
<flux> probably starting from 'should we pack everything into a single module, no, that won't work, well how about naming modules ocaml_platform_blahblah, well that won't work either'
<adrien> yeah but it still doesn't feel like something for only that ML
<adrien> anyway
<adrien> it was actually gasche who started the topic on the mailing-list and he started by saying that is was users asking for some "packing"
mye has joined #ocaml
<adrien> and the topic is completely missing from the cwn
ulfdoz has quit [Ping timeout: 264 seconds]
<orbitz> I think they should just fix packs
<orbitz> this namespace stuff seems overly complicated
<orbitz> packs + module absolute paths covered all the cases I saw before ignoring the convo
awm22 has quit [Quit: Leaving.]
Kakadu has joined #ocaml
sw2wolf has left #ocaml []
hkBst has joined #ocaml
djcoin has joined #ocaml
mye has quit [Quit: mye]
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
Icarot has quit [Remote host closed the connection]
cago has joined #ocaml
mika1 has joined #ocaml
thm_prover has joined #ocaml
<thm_prover> what functio is like "print_newline" except instead of unit->unit, it's channel->unit?
<thm_prover> i.e. I want to print a newline to an _output channel_, not stdout
<Kakadu> fun ch -> Printf.fprintf ch "\n"
* Kakadu uses Printf module almost everywhere
<thm_prover> Kakadu: it compiled; thanks!
mcclurmc has joined #ocaml
ottbot has joined #ocaml
thm_prover has quit [Quit: Page closed]
anderse has joined #ocaml
anderse has quit [Client Quit]
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
Icarot has joined #ocaml
mfp has joined #ocaml
weie has quit [Quit: Leaving...]
Icarot has quit [Remote host closed the connection]
Icarot has joined #ocaml
Icarot has quit [Remote host closed the connection]
Icarot has joined #ocaml
Yoric has joined #ocaml
jpdeplaix has quit [Quit: WeeChat 0.3.9.2]
anderse has joined #ocaml
ollehar has joined #ocaml
jpdeplaix has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
anderse has quit [Quit: anderse]
Yoric has joined #ocaml
yacks has quit [Ping timeout: 264 seconds]
yacks has joined #ocaml
thomasga has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9.2]
tane has joined #ocaml
romildo has joined #ocaml
dwmw2_gone is now known as dwmw2
<romildo> What unicode library for ocaml would be recommended for an application to draw boxes on a terminal (http://en.wikipedia.org/wiki/Box-drawing_character)?
<adrien_oww> which operations do you want?
<romildo> I want to use unicode characters such as ┌ (U+250C) in strings, and I need the following string operations: concatenation, length, split
<adrien_oww> I only know of camomile :P
<flux> sounds like you might want to use ncurses
<flux> (or termcap, which probably comes along with some ncurses bindings)
<romildo> I just want to display an abstract syntax tree (the application is a toy compiler) with nodes nicely formatted within boxes in a terminal. I've done it in Java easily without any curses library. Just need to ability to work with unicode strings, as the characters needed to draw the boxes are not ascii.
<flux> well, you don't actually need to deal with unicode strings if you just output the stuff
<flux> if you can insert unicode characters (sequences) in your source code, inside strings
<flux> and then just concatenate them
<flux> let top_left_corner = "⌜"
<flux> ..although I probably picked the wrong character, I have no doubt ncurses (/termcap) corners would look better :)
<companion_cube> romildo: if you do it, consider making a small library out of it ;)
_andre has joined #ocaml
<romildo> Here is the output of running my Java application that draws the tree using unicode chars: http://dpaste.com/1022594/
<companion_cube> don't you fear AST are going to grow too big for this kind of display?
<companion_cube> (I tend to use DOT to display trees)
<romildo> I would like to the same in my ocaml version of the application.
<romildo> Yes, it would grow too big. But it would be very useful for verifying what my compiler is getting with small programs.
<flux> I don't see why you couldn't just copy&paste those ┐-characteres to your ocaml program and go with that
<flux> isn't that what you're doing in the java application?
<flux> but graphviz is indeed nice for viewing graphs generated for various purposes, such as debugging
<romildo> I wrote a small libraries for laying out boxes (box.ml), and I have a function to convert an ast to a multi-way tree, and another that converts a multi-way tree to a box.
<romildo> My box libraries has some functions to combine smaller boxes, like put one above the other, or one besides the other, etc...
<companion_cube> sounds nice
UncleVasya has joined #ocaml
<romildo> These operations with boxes relies on some string manipulation. Currently I am using the String module from the standard library, like length and (^).
<flux> I thought you would not take string lengths of those box strings
<romildo> Also I am using Str.split.
<flux> of course, if your input data is UTF8, you need to use a unicode library
<flux> such as camomile or the one that comes with batteries
<flux> I would probably use Pcre instead of Str. I think it can probably do unicode as well, not sure how nicely the interface works with batteries/camomile though..
<companion_cube> oh my, dot -Txlib rocks
<romildo> A box is implemented as a list of strings, and each string in this list should have the same size.
<romildo> My application can also render the ast in asymptote, and in graphviz. But with those extra work is need to compile the ast to an image format, and using an external program to visualize it.
<companion_cube> indeed
<romildo> I use Str.split only as a mean of quickly splitting a string into individual lines. It is not crucial and can be implemented without using regular expressions.
<romildo> As I have never used an unicode string library in ocaml, I do not know which would be better to use in this application.
<flux> Str is evil, because if you ever use threads, you can expect trouble from it
awm22 has joined #ocaml
<flux> (even from functions that seem safe, like Str.split)
<flux> Camomile is the complete unicode solution for ocaml, but its interface is a bit big
<flux> I haven't looked, but I believe Batteries' unicode is quite light, but should be sufficient for this
dwmw2 has quit [Ping timeout: 245 seconds]
<romildo> Does ocaml-core also have unicode support?
beginner42 has joined #ocaml
dwmw2_gone has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
<beginner42> i use Printf.fprintf to write the content of a larger ocamlgraph (100000+ nodes) to a file, and it takes almost 12 hours. is there a way to accelerate that?
weie has joined #ocaml
Yoric has joined #ocaml
gnuvince has quit [Ping timeout: 245 seconds]
<flux> beginner42, wow, that's slow. even if you output 100 bytes per node, that's only like 10 megabytes
<flux> beginner42, profile it?
<flux> beginner42, also adjusting GC parameters can do wonders, or at least it used to do, nowadays the defaults are more sane
<beginner42> mfp: thank you. i will give it a try
<beginner42> flux: the resulting file has ten million lines, but i was also very surprised that it took so long to compile
gnuvince has joined #ocaml
dwmw2_gone is now known as dwmw2
Yoric has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
Icarot has quit [Ping timeout: 264 seconds]
q66 has joined #ocaml
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
Icarot has joined #ocaml
walter|r has joined #ocaml
smondet has joined #ocaml
adrien_o1w has joined #ocaml
Icarot has quit [Ping timeout: 272 seconds]
adrien_oww has quit [Ping timeout: 240 seconds]
cgaebel has joined #ocaml
adrien_o1w is now known as adrien_oww
wwilly has joined #ocaml
<wwilly> Bonjour
<adrien_oww> o/
Icarot has joined #ocaml
cgaebel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
travisbrady has joined #ocaml
kaustuv has joined #ocaml
<kaustuv> thomasga: A tiny patch to opam: http://kaustuv.chaudhuri.info/uncat/opam-typos-fix.patch
<kaustuv> (I'm too lazy to fork opam and submit a pull request for such a minor thing...)
<flux> there should be a standard one-line format for pull requests, that would be irc-compatible.. :)
<rixed> kaustuv: Did you know you can edit a file on github GUI directly?
<flux> actually git should have a command to generate the command line required to (inspect&) merge the branch :)
<kaustuv> rixed: I despise github's javascript-heavy web interface and hardly ever use it
<adrien_oww> yes!
ollehar has joined #ocaml
<thomasga> kaustuv: thx! your patch is in
kaustuv has left #ocaml []
travisbrady has quit [Quit: travisbrady]
Icarot has quit [Ping timeout: 246 seconds]
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
awm22 has quit [Ping timeout: 255 seconds]
Yoric has joined #ocaml
travisbrady has joined #ocaml
awm22 has joined #ocaml
amaloz has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
ousado has quit [Read error: Operation timed out]
ousado has joined #ocaml
Icarot has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
cago has quit [Quit: Leaving.]
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
amaloz has joined #ocaml
noam has quit [Ping timeout: 264 seconds]
Icarot has quit [Ping timeout: 245 seconds]
amaloz has quit [Client Quit]
amaloz has joined #ocaml
Icarot has joined #ocaml
osa1 has joined #ocaml
gnuvince has quit [Ping timeout: 255 seconds]
hkBst has quit [Quit: Konversation terminated!]
noam has joined #ocaml
Kakadu has quit []
mika1 has quit [Quit: Leaving.]
darkf has quit [Quit: Leaving]
ttamttam has quit [Quit: ttamttam]
rwmjones has quit [Ping timeout: 256 seconds]
cow-orker has joined #ocaml
rwmjones has joined #ocaml
Kakadu has joined #ocaml
anderse has joined #ocaml
anderse has quit [Client Quit]
Icarot has quit [Ping timeout: 260 seconds]
awm22 has quit [Quit: Leaving.]
romildo has quit [Quit: Leaving]
Yoric has quit [Ping timeout: 272 seconds]
Icarot has joined #ocaml
dwmw2 is now known as dwmw2_gone
mcclurmc has quit [Ping timeout: 245 seconds]
ttamttam has joined #ocaml
ulfdoz has joined #ocaml
ontologi1e has quit [Read error: Operation timed out]
ottbot has quit [Ping timeout: 256 seconds]
ollehar has joined #ocaml
awm22 has joined #ocaml
ottbot has joined #ocaml
oriba has joined #ocaml
Anarchos has joined #ocaml
Cyanure has joined #ocaml
ontologiae has joined #ocaml
Yoric has joined #ocaml
ttamttam has left #ocaml []
yacks has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 276 seconds]
ulfdoz has quit [Ping timeout: 260 seconds]
UncleVasya has quit [Quit: UncleVasya]
_andre has quit [Quit: leaving]
bru` has joined #ocaml
<bru`> Bonjour
<thelema_> bru`: #ocaml-fr
<bru`> woops
<bru`> *Hello
<thelema_> hello
<bru`> I'm currently compiling a program with ocaml-C++ bindings... and it's getting ugly
<thelema_> bru`: what's the problem?
<bru`> I'm stuck at the last command: when I want to link everything together
<bru`> "ocamlopt -I . --cclib ......."
<bru`> I need to add another library (minisat)
<bru`> I have libminisat.a, how can I tell ocamlopt to take it?
<bru`> I've tried -l but ocamlopt does not recognize it
<bru`> Am I doing something wrong, or just failing to find the correct command?
<thelema_> -cclib -lminisat -L .
<thelema_> maybe more --ccopts for the -L.
<bru`> Does the order matter? ocamlopt does not seem to like -L ., and if I add --ccopts (or -copts) it still complains
<bru`> before trying to include the .a the command was:
<bru`> ocamlopt -I . -cclib -lstdc++ problem.cmxa caller.ml -o caller.opt
<bru`> *ccopt
<bru`> that was the first problem :)
<bru`> Okay... so the final command is ocamlopt -I . -cclib -lminisat -cclib -lstdc++ -ccopt "-L ." problem.cmxa caller.ml -o caller.opt
<bru`> and now I have unrelated problems :) thank you very much thelema_
<thelema_> bru`: you're welcome
ottbot has quit [Ping timeout: 276 seconds]
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
<bru`> Question about linking: the code for minisat uses zlib.h, and so it is needed to compile my program: ocamopt currently complains that the references to "gzread", "gzopen" etc. are undefined.
<bru`> Would you happen to know what's the best way to link it against the current system's
<bru`> ?
<thelema_> --cclib -lz ?
travisbrady has quit [Quit: travisbrady]
osa1 has quit [Ping timeout: 264 seconds]
ottbot has joined #ocaml
<adrien> -cclib "$(pkg-config --libs minisat)" -ccopt "$(pkg-config --cflags minisat)"
<adrien> if the library doesn't provide pkg-config support, complain to the devs
<bru`> I'm kind of lost in the compilation hell, thank you all for your help :)
<bru`> It's working, but...
<bru`> it is minisat's main that's executed, not caller.ml!!
travisbrady has joined #ocaml
<orbitz> bru`: moduels don't have main's in ocaml
<orbitz> they just get executed
<adrien> minisat, as a library, shouldn't have a "main" function, right?
gnuvince has joined #ocaml
asmanur_ is now known as asmanur
cgaebel has joined #ocaml
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
beginner42 has quit [Remote host closed the connection]
cgaebel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ulfdoz has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Snark has joined #ocaml
Kakadu has quit []
gustav_ has quit [Remote host closed the connection]
smondet has quit [Ping timeout: 252 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
mcclurmc has joined #ocaml
Icarot has quit [Ping timeout: 258 seconds]
Yoric has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 264 seconds]
Snark has quit [Quit: Quitte]
adotbrown has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Icarot has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 258 seconds]
thomasga has quit [Quit: Leaving.]
ottbot has quit [Ping timeout: 245 seconds]
tane has quit [Quit: Verlassend]
ollehar has joined #ocaml
thomasga has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
manud has joined #ocaml
thomasga has quit [Quit: Leaving.]
Icarot has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ocaml
yezariaely has quit [Quit: changing servers]
ontologiae has joined #ocaml