dylan changed the topic of #ocaml to: OCaml 3.09.1 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/
Schmurtz has quit ["Plouf !"]
smimou has quit ["bli"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Raziel has quit ["Yo soy goma. Tú eres cola."]
Submarine_ has joined #ocaml
<erik> anyone here familiar with ocaml, amd64, and shared libraries
<erik> ?
<malc_> erik: there is a BTS entry on the subject, and some work was in 3.09.1 if i remember correctly
<erik> yeah, I made the BTS entry :)
<erik> I've worked on a patch to finish making PIC work but could really use some help
<malc_> Full PIC? with GOT/PLT and other crap?
<erik> yes
<malc_> nice
<erik> anyone that has an amd64 is welcome to take a look at http://ebourget.net/~erik/picattempt.diff
<erik> it winds down into stack hell at the moment
<erik> but i think the concepts are solid
<malc_> does one loose on GPR for PIC on amd64?
<erik> ?
<erik> oh
<erik> not the way I've done it
<malc_> s/on/one
<erik> but really you should spend a register to store the GOT address
<malc_> yeah
<malc_> ebx for i386 ABI
<erik> I do crazy 14 step juggling acts to push an address on the stack for example
<erik> cf. PICPUSH/PICPOP
<malc_> well.. i do have amd64, what i don't have is a 64bit OS
<erik> aww
<malc_> are you doing anything special wrt copy relocs btw?
<erik> ?
<erik> not sure what a 'copy reloc' is
<malc_> consider yourself lucky then
<erik> well maybe I am and I don't know that I have :)
<malc_> ignorance is bliss as they say :)
<erik> so you know how amd64 asm/linking/etc works?
<erik> can you look at the #define PICPUSH(sym) and tell me if my towers of hanoi thing is valid?
<erik> specifically wrt storing a temporary value at sym@GOTPCREL(%rip)?
<malc_> no sorry, this amd64 box is just for decoration here.. i used to be somewhat proficient in ia32/linking/etc/ocaml, but not anymore
<erik> well
<erik> movq %r12, sym@GOTPCREL(%rip)
<malc_> you can take the questions to the binutils ML
<erik> is that valid?
<erik> i want to put the value of %r12 into the memory pointed to by sym
<malc_> does look innocent, but i'd rather not comment on stuff i am not familiar with
<erik> yah
Raziel has joined #ocaml
<erik> thanks :)
<malc_> uhm.. np, i didn't do anything worth thanking for however
<erik> "looks innocent" makes me think I'm at least not totally retarded :)
<malc_> ;)
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
malc_ has quit ["leaving"]
pango_ has joined #ocaml
pango has quit [Read error: 145 (Connection timed out)]
Submarine_ has quit [Read error: 110 (Connection timed out)]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Herrchen_ has joined #ocaml
Herrchen has quit [Read error: 110 (Connection timed out)]
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramki has joined #ocaml
mauke has quit [Remote closed the connection]
pattern has quit [clarke.freenode.net irc.freenode.net]
rossberg has quit [clarke.freenode.net irc.freenode.net]
samx has quit [clarke.freenode.net irc.freenode.net]
oxygene has quit [clarke.freenode.net irc.freenode.net]
samx has joined #ocaml
rossberg has joined #ocaml
Demitar has quit [clarke.freenode.net irc.freenode.net]
erik has quit [clarke.freenode.net irc.freenode.net]
pnou has quit [clarke.freenode.net irc.freenode.net]
skylan has quit [clarke.freenode.net irc.freenode.net]
Hadaka has quit [clarke.freenode.net irc.freenode.net]
chimikal has quit [clarke.freenode.net irc.freenode.net]
TaXules has quit [clarke.freenode.net irc.freenode.net]
pattern has joined #ocaml
skylan has joined #ocaml
Demitar has joined #ocaml
TaXules has joined #ocaml
pnou has joined #ocaml
erik has joined #ocaml
chimikal has joined #ocaml
mauke has joined #ocaml
oxygene has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
ramki is now known as ramkrsna
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Revision17 has quit ["Leaving"]
ramkrsna is now known as rK|Indiana
rK|Indiana is now known as ramkrsna
smimou has joined #ocaml
Snark has joined #ocaml
Submarine has joined #ocaml
rillig_ has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
rillig has quit [Read error: 110 (Connection timed out)]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
taw has joined #ocaml
<taw> hello :-)
<taw> any easy way of loading a text formatted file (9 floats per line, separated by a single space) in ocaml ?
<flux__> well
<flux__> there's the Str-module
<flux__> which provides splitting strings by regular expressions
<flux__> regular expression in this case would be " "
<flux__> so maybe like: let fields = Str.split (Str.regexp " ") "1.0 2.0 3.0" in List.map float_of_string fields
<flux__> or you could use the lexer which has builtin support for simple things such as floats and strings
<flux__> provided by module Genlex
<taw> is there something like scanf that reads data directly from the file ?
Raziel has quit ["Yo soy goma. Tú eres cola."]
<pango_> taw: what about the Scanf module ?
<taw> wow ^_^
<taw> nice
Skal has joined #ocaml
Submarine has quit [Read error: 110 (Connection timed out)]
<flux__> grh, why can't Printf.sprintf "%t" take the same kinds of arguments as Printf.printf "%t"
<flux__> maybe related to the inability to create custom output_channel objects :/
<flux__> it appears I need to provide not only output for my records, but also to_string
<flux__> infact that %t for unit -> string seems quite pointless, why not just use %s in that case
zigong has joined #ocaml
malc_ has joined #ocaml
zigong has quit ["using sirc version 2.211+KSIRC/1.3.12"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
<dylan> hmm, I can't seem to reach the ocaml site...
<dylan> All packets die at FranceTelecom.atdn.net, according to a traceroute...
<zmdkrbou> neither do i
<dylan> hmm, now everything dies at brion.inria.fr
<zmdkrbou> the machines are up but the web servers don't seem to work
<dylan> My ISP regularly thinks it shouldn't be able to route to europe, so, didn't know if it was at this end or not. :)
<zmdkrbou> it's a problem at inria, as i can't reach it
ramkrsna is now known as rK|dinner
_DL_ has joined #ocaml
__DL__ has quit [Read error: 110 (Connection timed out)]
<flux__> am I imagining stuff, or does debian's ocaml 3.09 no longer have caml-types.el (C-c C-t used to work) or ocamltags
rillig_ has quit [Remote closed the connection]
Raziel has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
zigong has joined #ocaml
pattern has quit ["Terminated with extreme prejudice - dircproxy 1.1.0"]
<taw> is there any way of getting location information from exceptions ?
<taw> Fatal error: exception Invalid_argument("index out of bounds")
<taw> is very unhelpful :-/
<flux__> taw, OCAMLRUNPARAM=b
pattern has joined #ocaml
<taw> thx
<flux__> it doesn't work with the toplevel, though
Skal has quit ["Client exiting"]
<taw> i found the bug :-)
zigong has quit ["using sirc version 2.211+KSIRC/1.3.12"]
gim has quit []
<taw> uhm
<taw> does ocaml buffers printf output somehow ?
<taw> if i do let _ = printf "X\n" in long_computation () it doesn't print anything
<taw> (at least until the computation finishes)
<malc_> taw: use %!
<taw> but with let _ = (printf "X\n"; failwith "Y") in long_computation ()
<malc_> to flush the channel
<taw> it is immediate
<flux__> failwith propably flushes
<flux__> hngh, I need to get away from by probably-typo-problem :)
<flux__> (I suppose it's a beginning that I notice it always)
<taw> yeah, but why isn't per-line flushing not default, like in every other unix language :-)
<taw> and how to turn off the buffering or sth
<flux__> I don't think you can
<flux__> for fatal errors you might want to use Printf.eprintf which does flush
<flux__> or build your own printf with ksprintf
<dylan> you can also use %!
<dylan> e.g. Printf.printf "Hello, world!\n%!"
<dylan> and I see malc_ already said that. So, n/m.
<taw> uhm, just wondering
<taw> can i profile ocaml program to see how much time it spends in Array.sort ?
<flux__> ocaml comes with profiling facilities, yes
<flux__> or rather, you can use gprof on ocaml-compiled native binaries
<flux__> and there's ocamlprof
<flux__> I suppose there isn't a fast way to convert string to array char?
<flux__> char array even
<flux__> Obj.magic wasn't one :)
<taw> uhm, i can't find anything in man ocamlopt, and man ocamlprof seems to be only referring to bytecode-executed programs
<flux__> ocamlprof documentation has an example
<flux__> 17.4 Time Profiling
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
<taw> exactly what i need, thx
<taw> compare_val
<taw> uhm, what's that :-) ?
<taw> it takes 22% of the time
<taw> and is called 111604700 times
<malc_> generically compares to values
<malc_> s/to/two
rK|dinner is now known as ramkrsna
Yorick has joined #ocaml
chimikal has quit [Read error: 110 (Connection timed out)]
simon___ has joined #ocaml
simon has quit [Remote closed the connection]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
ski has joined #ocaml
Snark has quit ["Leaving"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
chimikal has joined #ocaml
zigong has joined #ocaml
quamaretto has joined #ocaml
_DL_ has quit [Remote closed the connection]
zigong has quit [Remote closed the connection]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Yorick has left #ocaml []
Revision17 has joined #ocaml