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