<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]
<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?
<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