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/
q66 has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 245 seconds]
sw2wolf has joined #ocaml
Icarot has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Quit: emmanuelux]
amaloz has joined #ocaml
amaloz has quit [Remote host closed the connection]
amaloz has joined #ocaml
ohama has quit [Read error: Operation timed out]
Icarot has quit [Ping timeout: 264 seconds]
ohama has joined #ocaml
manud has quit [Ping timeout: 245 seconds]
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
darkf has joined #ocaml
ollehar has joined #ocaml
Icarot has joined #ocaml
pkrnj has joined #ocaml
yezariaely has joined #ocaml
derek_c has joined #ocaml
travisbrady has joined #ocaml
derek_c has quit [Client Quit]
derek_c has joined #ocaml
oriba has quit [Quit: oriba]
bru` has quit [Ping timeout: 245 seconds]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
mattrepl has quit [Quit: mattrepl]
darkf has quit [Ping timeout: 264 seconds]
darkf has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
Icarot has quit [Ping timeout: 260 seconds]
walter|r has quit [Quit: This computer has gone to sleep]
travisbrady has quit [Quit: travisbrady]
yacks has joined #ocaml
weie has quit [Ping timeout: 260 seconds]
manud has joined #ocaml
manud has quit [Quit: Leaving]
weie has joined #ocaml
paddymahoney has quit [Remote host closed the connection]
karswell` has quit [Ping timeout: 252 seconds]
jave has quit [Read error: Operation timed out]
jave has joined #ocaml
derek_c has quit [Ping timeout: 252 seconds]
Icarot has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
noam_ has joined #ocaml
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
noam has quit [Ping timeout: 252 seconds]
Icarot has quit [Ping timeout: 260 seconds]
adotbrown has quit [Ping timeout: 264 seconds]
derek_c has joined #ocaml
mfp has quit [Ping timeout: 272 seconds]
sw2wolf has left #ocaml []
derek_c has quit [Quit: Lost terminal]
darkf_ has joined #ocaml
noam_ has quit [Ping timeout: 240 seconds]
darkf has quit [Ping timeout: 256 seconds]
noam has joined #ocaml
Yoric has joined #ocaml
karswell has joined #ocaml
ttamttam has joined #ocaml
Snark has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
noam_ has joined #ocaml
Kakadu has joined #ocaml
noam has quit [Ping timeout: 245 seconds]
Cyanure has joined #ocaml
darkf_ is now known as darkf
mcclurmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
hkBst has joined #ocaml
awm22 has quit [Quit: Leaving.]
yroeht1 is now known as yroeht
wwilly has quit [Remote host closed the connection]
Cyanure has quit [Remote host closed the connection]
wwilly has joined #ocaml
<wwilly> Bonjour
Yoric has joined #ocaml
<adrien_oww> o/
mika1 has joined #ocaml
ttamttam has quit [Quit: ttamttam]
cago has joined #ocaml
ttamttam has joined #ocaml
bru` has joined #ocaml
ontologiae has joined #ocaml
ottbot has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
yacks has quit [Ping timeout: 260 seconds]
Snark has quit [Remote host closed the connection]
ollehar has joined #ocaml
tane has joined #ocaml
yacks has joined #ocaml
mcclurmc has quit [Ping timeout: 258 seconds]
thomasga has joined #ocaml
thomasga1 has joined #ocaml
mfp has joined #ocaml
thomasga has quit [Ping timeout: 240 seconds]
milosn_ is now known as milosn
dwmw2_gone is now known as dwmw2
Yoric has joined #ocaml
awm22 has joined #ocaml
SanderM has joined #ocaml
thomasga1 is now known as thomasga
Yoric has quit [Ping timeout: 264 seconds]
toolslive has joined #ocaml
beckerb has joined #ocaml
<toolslive> hi I'm trying to get typerex to work here, I installed everything through opam, but compilation does not generate .cmt files. The FAQ tells me to use the ocp-ocamlc compiler wrapper, but I don't have this present.
<toolslive> I do have lots of other ocp-* present, but no ocp-ocaml*
gustav_ has joined #ocaml
mcclurmc has joined #ocaml
ttamttam has quit [Quit: ttamttam]
_andre has joined #ocaml
Yoric has joined #ocaml
spanish has joined #ocaml
<spanish> hi
<spanish> is there for a coincidence somebody working (or that have had compiled) mtasc?
<spanish> I know nothing about ocaml, and can't compile any of the mtasc versions I've seen on the internet from source
ttamttam has joined #ocaml
<thomasga> toolslive: typerex packaged in OPAM is v2 as the docs on typerex.org as for v1
<thomasga> I agree this is *very* confusing
<thomasga> you should use the new -bin-annot option from the compiler yourself to generate the .cmt files
toolslive has quit [Ping timeout: 258 seconds]
<Kakadu> so ocp-* compiler executables are deprecated?
<Kakadu> sounds great
<Kakadu> I hope that this -bin-annot option does not slow compilation too much
<thomasga> it's much faster than -annot
<thomasga> as it just dumps the typedtree
<thomasga> so yes, the ocp-* compilers are deprecated
<thomasga> the things are basically upstreamed now
<thomasga> (that's not totally compatible though, so you can't use typerex1 with the cmt produced by 4.00.0 compilers ...)
<orbitz> thomasga: 1.0.0 pull request sent for nixpkgs, should be in by tonight
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
<orbitz> thomasga1: 1.0.0 pull request sent for nixpkgs, should be in by tonight
<thomasga1> orbitz: thanks!
<spanish> can somebody give me some input on this: http://pastebin.cross-lfs.org/230831
<spanish> I removed the "download" target due to mtasc's source code not even being available from author's cvs anymore, I used sourceforge's comunity fork instead
toolslive has joined #ocaml
<Kakadu> spanish: have u tried to fix .mli file?
<spanish> I've been looking at it Kakadu, but I'm still getting familiarized with ocaml, I'm completely new to it
<spanish> the problem reported is specific to the software I'm trying to compile? or is it that it collides with ocaml's definitions?
<Kakadu> find line with "val create"
<spanish> I'm compiling this old software with ocaml 4
ontologiae has quit [Ping timeout: 245 seconds]
<spanish> I'm a bit confused because it has a directory called extlib-dev, but I also compiled bleeding edge version of extlib, after findlib
nitro_ has joined #ocaml
Snark has joined #ocaml
<spanish> ok, if I do this "val create : ?random:bool -> int -> ('a, 'b) t" it compiles fine
q66 has joined #ocaml
ttamttam has quit [Quit: ttamttam]
<Kakadu> well played
<spanish> hehe thanks, was a kludge and the only error
Yoric has quit [Ping timeout: 252 seconds]
<spanish> now I'll see if I can make mtasc call gnu's cpp on each input file, as it's a bit of an scarce compiler
<flux> the site says haxe is its successor, but haxe cannot compile actionscript 2, can it?
Pantoufle has joined #ocaml
ontologiae has joined #ocaml
<spanish> I don't know, but haxe is a programming language on it's onw, while what I want is to write actionscript code
<spanish> actually, no, haxe is a programming language the made out of the blue
<adrien_oww> and the compiler targets flash, C++ and a few others
walter has joined #ocaml
<spanish> it's seens I even have the code to call cpp written already
<spanish> *seems
<spanish> but still I'm gonna need mtasc to accept -DSOMETHING command-line options so I can integrate it fully with my project, well, with autoconf/automake in general
yacks has quit [Ping timeout: 260 seconds]
mikurubeam has joined #ocaml
mikurubeam has quit [Client Quit]
ollehar has quit [Ping timeout: 264 seconds]
yacks has joined #ocaml
Yoric has joined #ocaml
<thomasga1> Kakadu: I've added a warning on typerex website, hope things are less confusing now
mikurubeam has joined #ocaml
mikurubeam has quit [Client Quit]
cdidd has quit [Ping timeout: 246 seconds]
spanish has quit [Quit: spanish]
travisbrady has joined #ocaml
nitro_ has quit [Quit: Lost terminal]
mikurubeam has joined #ocaml
mikurubeam has quit [Client Quit]
sgnb has quit [Remote host closed the connection]
sgnb` has joined #ocaml
Icarot has joined #ocaml
Icarot has quit [Ping timeout: 258 seconds]
ttamttam has joined #ocaml
UncleVasya has joined #ocaml
bru` has quit [Ping timeout: 264 seconds]
Icarot has joined #ocaml
ollehar has joined #ocaml
ttamttam has left #ocaml []
ollehar has quit [Ping timeout: 264 seconds]
Icarot has quit [Ping timeout: 255 seconds]
mattrepl has joined #ocaml
ggole has joined #ocaml
Icarot has joined #ocaml
<ggole> Hmm, when clauses are kind of strange
<ggole> Suppose you have something like function | _, a | a, _ when a = 1 -> ...
<ggole> The clause only applies to the first a :/
<ggole> Does anybody else find that strange?
amaloz has joined #ocaml
<Kakadu> | (_,a) is the same as | _
<Kakadu> aaah
<ggole> It's guarded
<Kakadu> never seen that guards are called clauses
<ggole> I called it "when clause" :)
<ggole> Seems reasonable
<ggole> Anyway, I found it quite bizarre that they only apply to the first variable mention
Icarot has quit [Ping timeout: 260 seconds]
mikurubeam has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
beckerb has quit [Ping timeout: 245 seconds]
Kakadu has quit []
<thelema_> # match (1,2) with | _,a | a,_ when a = 1 -> true | _ -> false;;
<thelema_> Warning 12: this sub-pattern is unused.
<thelema_> - : bool = false
<thelema_> ggole: in this case the when clause only applies to _,a because between _,a and a,_, the first will always match
<thelema_> and the second is unused.
<thelema_> as indicated by the warning.
<thelema_> also, for this particular example, you probably want:
<thelema_> # match (1,2) with | _,1 | 1,_ -> true | _ -> false;;
<thelema_> - : bool = true
ottbot has quit [Quit: WeeChat 0.4.0]
<ggole> Unfortunately that doesn't work for the actual code that inspired the (simplified) example
<ggole> Which compares equality between two parts of the deconstructed value
<ggole> :(
<thelema_> then you're stuck doing something like:
<thelema_> # match (1,2) with | _,a when a = 1 -> true | a,_ when a = 1 -> true | _ -> false;;
<ggole> I can just write a function and call it twice
<thelema_> - : bool = true
<ggole> Well
<ggole> The code in the match is quite large
<thelema_> then make it a function
<ggole> ~16 lines
<ggole> Yeah
rixed has quit [Remote host closed the connection]
skd_ has joined #ocaml
<ggole> Well, that was quite a nasty bug :/
* ggole goes looking for other such uses of when
<skd_> hello, can someone please tell me if this allowed/feasible to have nested sum types? type alpha = beta | gamma; type delta = alpha | beta .. can the type system disambiguate between alpha and delta?
ottbot has joined #ocaml
<ggole> skd_: not with usual sum types, but polymorphic variants allow something similar
<skd_> cheers, thanks ggole , will look into polymorphic variants then
<ggole> type alpha = [`Beta | `Gamma] type delta = [alpha | `Delta]
<ggole> Something like that
<skd_> ok .. thank you :)
<skd_> that answers my query perfectly
<ggole> And there is some pattern matching machinery for the inclusion case, | #alpha I think
<skd_> i see, ok, i will dig that up ..
<thelema_> ggole: it's not really a bug, it's just that pattern matching is first match
<ggole> thelema_: it was a bug in my code
<thelema_> ggole: ok, true.
<thelema_> and it's not a particularly obvious semantics
<ggole> And it still seems like very unfriendly semantics
<ggole> But, no big deal
<thelema_> the alternative is to resume matching at a different place when a 'when' fails...
<ggole> Yeah, I can see the performance pitfalls
<ggole> A warning would have been nice though
<thelema_> I got a warning about unused match case
<ggole> My original code, sadly, did not
<thelema_> that is unfortunate
NaCl_ is now known as NaCl
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
darkf has quit [Quit: Leaving]
hkBst has quit [Quit: Konversation terminated!]
skd_ has left #ocaml []
yacks has quit [Quit: Leaving]
yacks has joined #ocaml
ttamttam has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
weie has quit [Quit: Leaving...]
Fullma has quit [Ping timeout: 260 seconds]
chrisdone has joined #ocaml
<chrisdone> 12 years imported :) http://ircbrowse.net/browse/ocaml
travisbrady has quit [Quit: travisbrady]
Kakadu has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
travisbrady has joined #ocaml
mikurubeam has quit [Ping timeout: 260 seconds]
mikurubeam has joined #ocaml
fraggle_laptop has joined #ocaml
<mfp> chrisdone: nice! I guess gathering the logs was quite a hard chore
dwmw2 is now known as dwmw2_gone
awm22 has quit [Quit: Leaving.]
mcclurmc has quit [Ping timeout: 264 seconds]
SanderM has quit [Remote host closed the connection]
wwilly has quit [Remote host closed the connection]
breakds has joined #ocaml
ggole has quit [Quit: Ex-Chat]
thomasga has joined #ocaml
travisbrady has quit [Quit: travisbrady]
thomasga has quit [Quit: Leaving.]
stevej has joined #ocaml
ttamttam has quit [Ping timeout: 245 seconds]
fraggle_laptop has quit [Ping timeout: 256 seconds]
mikurubeam has quit [Ping timeout: 264 seconds]
jbrown has quit [Quit: Client exiting]
mikurubeam has joined #ocaml
ttamttam has joined #ocaml
travisbrady has joined #ocaml
fraggle_laptop has joined #ocaml
<chrisdone> mfp: importing them from tunes.org into the db took about 20 minutes per channel, but other than that i had a good time learning about optimizing postgresql =)
ttamttam has quit [Ping timeout: 256 seconds]
yacks has quit [Quit: Leaving]
fraggle_laptop has quit [Ping timeout: 256 seconds]
ottbot has quit [Ping timeout: 276 seconds]
chrisdone has left #ocaml []
ontologiae has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
eikke has joined #ocaml
<thelema_> Tentative Dissertation Subject
<thelema_> Deep Packet Inspection algorithms and TCAM Ruleset Compression
<thelema_> Comprehensive examination areas
<eikke> OCaml RTS with SystemTap static probes
<adrien> oh =)
<orbitz> i have no idea what it does, but sounds sexy!
<eikke> final goal is to make it possible to insert probe points in native ml code as well, not only the (C) RTS
<eikke> orbitz: think DTrace, but for Linux
<thelema_> eikke: meaning that the probe points aren't compiled in, but dynamically inserted?
<orbitz> I know that much! just not the Ocaml part
<eikke> thelema_: they are compiled in, but they are 'free'
<eikke> thelema_: as in: during normal operation they're just a single 'nop' instruction (and some notes ELF sections which aren't mapped in anyway)
<eikke> only when you enable a certain probe some (minimal) overhead is introduced, replacing the 'nop' with a call
<eikke> when you stop tracing (remove the probe), it becomes a 'nop' again
<eikke> or wasn't that the question :)
<thelema_> that was the question, and well answered.
<thelema_> although how to fit a call in the single byte for a nop, I don't know
<thelema_> must be a multi-byte nop
<flux> does it matter? I mean, why is there even a nop? if you are going to replace it anyway.
<thelema_> flux: there's a nop so you have room to put something else
<eikke> thelema_: good point... seems to be single-byte though. no idea what the do exactly then :$
<flux> thelema_, well, just put whatever there was into the place where you put the probe to
<thelema_> eikke: interesting
<thelema_> flux: you don't want anything there most of the time
<flux> thelema_, exactly
<thelema_> otherwise it'll run the profiling code
<eikke> flux: that complicates things a lot
<flux> thelema_, it would be zero changes when the probe is enabled
<flux> but maybe that can cause issues with relative memory access
<thelema_> flux: how to skip the probe when it's turned off?
<flux> thelema_, 1) have original, uninstrumented code, running at 100% performance 2) when required, patch the probe places, losing some performance 3) when you're done with probes, restore old code
<eikke> flux: then you need to keep track of what-was-replaced-where and what the original code was
<thelema_> flux: if you insert or remove bytes from the middle of an executable, you have to rewrite all sorts of relative pointers that are kept in the executable
<eikke> now it's just "replace all probe points with nop" when tracing stops
<flux> eikke, sure. computers are great at that.. :)
<eikke> but it's more complex anyway :) and seriously, nop is... free
<thelema_> meaning that you can't do it "live" - when the program is running
<flux> thelema_, I didn't mean any changes that can adjust byte offsets
<flux> eikke, but you might still not want to put the probe place inside an inner loop :)
<flux> in any case, super nice to have that for ocaml, even more so when it works with native code. keep up the good work :)
breakds has quit [Ping timeout: 245 seconds]
<thelema_> flux: nop is more free in inner loop than at other places, unless it's been super optimized
<thelema_> main cost of nop is reading it from memory.
<thelema_> and in inner loop, it's cached
<flux> good point. but evaluating it still costs something.
<thelema_> in terms of power used by the CPU, yes. In terms of the speed the code runs at, actually no.
mikurubeam has quit [Read error: Connection reset by peer]
mikurubeam has joined #ocaml
mikurubeam has quit [Ping timeout: 256 seconds]
<flux> I'm going to be surprised if inserting 8 nops into a matrix multiplication inner loop has zero effect in runtime..
<flux> I mean, how likely the CPU is optimized for running nops?
<thelema_> If they're spaced out, then no problem.
<eikke> flux: it is
<thelema_> but if they're adjacent, it might take up the instruction decode block for long enough to blip the performance
<flux> thelema_, they wouldn't be spaced out, to make room for the probe call
<eikke> flux: nops are rather commonly used to align code (so also in 'blocks'), so CPUs are trained to 'ignore' them
<flux> eikke, a nop here and there sure, but multiple adjacent ones?
<thelema_> flux: there's wide nop opcodes that would keep instruction decode busy much less than 8 single-byte opcodes
<flux> http://www.modeemi.fi/~flux/foo.c - without nops 6.21 seconds, with nops 15.5 seconds
breakds has joined #ocaml
fraggle_laptop has joined #ocaml
<flux> but I suppose I need to find more modern hardware to benchmark on..
<thelema_> flux: I get 21s vs. 25s for without/with
<thelema_> compiled without any optimizations
<flux> I used -O3
<thelema_> although if I remove one nop from the sequence, I'm back to 21s
<thelema_> so up to 7 nops are free?
<flux> I just went straight to 8 nops, so I didn't try
<thelema_> I'm guessing most of the difference has to do with gcc's optimizations
<thelema_> i.e. having the inline assembly changes the codegen
<thelema_> although maybe not...
<thelema_> hmm, I still get 5.3s for one nop -O3, and 10.7s for 7 nops, -O3
<flux> 2x3.4Ghz XEON 64 bit does that in 4s/11s
<eikke> thelema_: using -O3 -march=native (on i5) generates pretty straight-forward code, nothing fancy optimizations going on :)
<flux> there is zero difference (other than nops) between the nop and non-nop versions for me
<flux> but indeed, just removing one of the nops and it's back to 4 seconds :)
<eikke> there are 8 of them
<thelema_> so there is a limit on number of consecutive nops that are basically free, but it's enough for this kind of patching to be not a problem
<eikke> exactly the length of instruction pipeline, by accident?
<flux> eikke, by accident in the sense that it seemed like a realistic number. but it may be a bit over the real probe size?
<flux> I was thinking an absolute 64-bit pointer would be 8 bytes
<eikke> flux: real probe size is 1 nop (when the probe is disabled)
<eikke> so a single byte
<eikke> not 8 of them
<bitbckt> you should probably use a multi-byte nop, if you want a specific delay.
<bitbckt> or... what exactly are you trying to measure here?
<eikke> bitbckt: impact of a single nop instruction as used by SystemTap tracing probes
<bitbckt> ah.
<flux> eikke, ok, then indeed it's free :). but how does the single nop make it easier to implement than zero..
<flux> I mean, the real probe hook is not going to fit in a single byte?
<flux> it doesn't use break points does it?
<eikke> flux: I wish I could tell you :)
Yoric has joined #ocaml
_andre has quit [Quit: leaving]
<flux> ah, internet suggests it does use breakpoints
<flux> and a breakpoint fits in one instruction, so that's how
<flux> s/instruction/byte/
Kakadu has quit [Ping timeout: 252 seconds]
<flux> lttng boasts how their system doesn't use breakpoints, but systemtap and dtrace do..
fraggle_laptop has quit [Remote host closed the connection]
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<bitbckt> a trap is probably an optional method, where a jmp couldn't be patched in.
<bitbckt> the USENIX paper is a good start...
<bitbckt> in hotspot, dtrace probes are patched against delay slots added by the server compiler.
<eikke> hmh, looks like they use int3 indeed
Snark has quit [Quit: Quitte]
pkrnj has joined #ocaml
Kakadu has joined #ocaml
metasyntax has quit [Quit: it's the freakin' weekend]
ontologiae has joined #ocaml
Anarchos has joined #ocaml
breakds has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
ttamttam has left #ocaml []
<Kakadu> I call Ocaml classe's methods from C++ but it seems that it's body is not executed
<Kakadu> but this method returns a Block value
* Kakadu confused
<Kakadu> Field(_ans,0) is always 4318304
<Kakadu> Wosize_val(block) 4
<Kakadu> Tag_val(block) 247
<Kakadu> Interesting, waht is that
<Kakadu> Closure_tag
gnuvince has quit [Quit: brb]
gnuvince has joined #ocaml
<thelema_> Kakadu: not calling with enough parameters?
<Kakadu> Yeah, it sounds like that but
<Kakadu> 1) Parameters count is correct if only it is not another methods of another object
<Kakadu> 2) If I add fake argument body works but crashes somewhere
<thelema_> first argument is object?
<Kakadu> aaah
<Kakadu> really 1st argument should be an object
<Kakadu> I'm an idiot
<thelema_> yes, you still have to pass the object
ollehar has joined #ocaml
<Kakadu> many thanks
cdidd has joined #ocaml
eikke has quit [Ping timeout: 256 seconds]
<Kakadu> well, it works. DataModel in C++, ListView in QML
<Kakadu> s/C++/OCaml/
<thelema_> nice.
travisbrady has joined #ocaml
Kakadu has quit []
stevej has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zorun has quit [Quit: ♥]
travisbrady has quit [Quit: travisbrady]
zorun has joined #ocaml
zorun has quit [Quit: Reconnecting]
zorun has joined #ocaml
gnuvince has quit [Quit: restarting irc client]
gnuvince has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ulfdoz has joined #ocaml
mattrepl has quit [Quit: mattrepl]
jbrown has joined #ocaml
UncleVasya has quit [Ping timeout: 264 seconds]
emmanuelux has joined #ocaml
travisbrady has joined #ocaml