vezenchio has quit ["I live in a yurt on the steppes of Sheepfuckistan. That's why."]
vezenchio has joined #ocaml
CosmicRay has joined #ocaml
eyda|mon has joined #ocaml
znutar has quit [Connection timed out]
jewel has joined #ocaml
CosmicRay has quit ["Client exiting"]
eyda|mon has left #ocaml []
Zaius has quit []
pango has quit [zelazny.freenode.net irc.freenode.net]
Sonarman has quit [Read error: 104 (Connection reset by peer)]
jewel has quit [Connection reset by peer]
Sonarman has joined #ocaml
<tewk>
How do I print the current execution stack to stdout, say module name and line# ?
<Smerdyakov>
Set environment variable OCAMLRUNPARAM=b to have that done when an exception goes uncaught (for a bytecode program).
<tewk>
No way to do this in code?
<Smerdyakov>
I don't know.
<tewk>
I have some ugly caml code written by someone else and I'm trying to figure it out.
<Smerdyakov>
You can always make up a new exception and throw it, if you don't mind stopping the program there. :-)
<tewk>
Is there a doxygen type tool for ocaml?
<tewk>
The exception idea isn't bad.
vezenchio has quit ["I live in a yurt on the steppes of Sheepfuckistan. That's why."]
<mflux>
tewk, ocaml is distributed with ocamldoc?
jewel has joined #ocaml
<tewk>
mflux: thanks
zzorn has joined #ocaml
Snark has joined #ocaml
zzorn is now known as zzorn_away
Sonarman has quit ["leaving"]
jewel has quit [Read error: 110 (Connection timed out)]
Submarine has joined #ocaml
pango has joined #ocaml
Snark has quit ["Leaving"]
mlh has quit ["who are you people and what are you doing in my computer!?"]
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
jewel has joined #ocaml
vdrab has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
ejt has joined #ocaml
vdrab has quit ["bye"]
Submarine has quit ["Leaving"]
pango has quit [Remote closed the connection]
mayhem has joined #ocaml
<mayhem>
morning
<ejt>
morning
svenl has quit [Read error: 60 (Operation timed out)]
svenl has joined #ocaml
MirrorLynx_ has quit [Read error: 60 (Operation timed out)]
MirrorLynx has quit [Read error: 113 (No route to host)]
dan2 has quit [Read error: 113 (No route to host)]
kHebSkik has quit [Remote closed the connection]
kHebSkik has joined #ocaml
MirrorLynx_ has joined #ocaml
MirrorLynx has joined #ocaml
nlv11757__ has joined #ocaml
smimou has joined #ocaml
mrvn has joined #ocaml
<nlv11757__>
is there a function to escape all " in a string?
<mellum>
no
mrvn__ has joined #ocaml
<nlv11757__>
ok this is the deal; i have the following string: "blabalbla \"foo\" blablabal" but i want it printed exactly like that
<nlv11757__>
so with the \" explicit
mrvn_ has quit [Read error: 60 (Operation timed out)]
<nlv11757__>
escaped : string -> string
<nlv11757__>
so there *is* a function like that
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
jewel has quit [Connection timed out]
mrvn__ has quit [Read error: 110 (Connection timed out)]
mrvn_ is now known as mrvn
jewel has joined #ocaml
Snark has joined #ocaml
dan2 has joined #ocaml
jewel has quit [Read error: 60 (Operation timed out)]
hangman4 has joined #ocaml
Skal has joined #ocaml
Snark has quit ["Leaving"]
gim has joined #ocaml
<nlv11757__>
what alternative is there to string_of_float to obtain a string representation of a float that *doesnt* return things like "12." but "12.0" instead?
<nlv11757__>
let foo d = (string_of_float d) ^ "0" works
<nlv11757__>
but maybe theres something standard
<ejt>
printf ?
<mrvn>
Printf.printf
<nlv11757__>
i need the string
<mrvn>
sprintf
<nlv11757__>
printf puts it on stdout no?
<nlv11757__>
ok
<nlv11757__>
i will look it up
<mrvn>
you have to find the right format string though to add the .0 I think.
<nlv11757__>
not just "%f.0" or something like that
<mrvn>
that would produce 0.50 for 0.5
<nlv11757__>
ok maybe my initial solution of always adding a 0 is better than
<nlv11757__>
it was just an example of course the "%f.0" i've never worked with ocaml printf, i was merely wondering if it worked in the same way
<nlv11757__>
sprintf "%f0" probably works
<mrvn>
it is mostly like C
<mrvn>
%.1f
<nlv11757__>
if im not overseeing other notations for floats, doing %f0 probably don't change the floats in nasty ways right?
<mrvn>
that just prints the float (possibly without .) and then a 0
<nlv11757__>
the %f possibly print the float without 0?
<mrvn>
hmm, the docs seem to be wrong.
<mrvn>
000000000000000000.;;
<mrvn>
# f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
<mrvn>
# F: convert a floating-point argument in Caml syntax (dddd.ddd with a mandatory .).
<mrvn>
But %f always prints dddd.ddd while %F prints e.g. 1e+18.
<nlv11757__>
mandatory . means always doing a . right?
<nlv11757__>
it seems like %f always print a . too from the documentation
<mrvn>
That's how I learned it. So the docs must be wrong. %f has a mandatory .
<mrvn>
%F prints no . on 1e+18
_JusSx_ has joined #ocaml
<mrvn>
%f is just normal and %F scientific notation.
<nlv11757__>
yeah
<nlv11757__>
weird
<nlv11757__>
so why isn't "%f0" enough then?
<nlv11757__>
if %f always produces something with a . in it
<nlv11757__>
adding a zero doesn't do any harm so it seems
<mrvn>
nlv11757__: adding a zero just prints a zero. "%ffoo" will print foo after the float too.
<nlv11757__>
yeah, but thats what i wanted right? i wanted to get rid of the 12. notations ending in a point.
<nlv11757__>
or am i overlooking something
yakker has joined #ocaml
<yakker>
let globlist = ref [] in ... globlist:=some_list
<yakker>
does someone know why this doesn't work?
<smimou>
it's is supposed to
<smimou>
maybe some more code would help to understand the problem
<Nutssh>
Could it be the value restriction on references?
<Nutssh>
What if you do 'let globlist : blah list ref = ref [] in ...'
CosmicRay has joined #ocaml
pango has joined #ocaml
mellum_ has joined #ocaml
mellum has quit [Read error: 104 (Connection reset by peer)]
ejt has quit [Read error: 60 (Operation timed out)]
<tewk>
Does anyone use handy ocaml plugins for vim.
<tewk>
I need a prettyprinter, vim's doesn't work so well and takes forever