<thelema>
_habnabit: that works? it seems a bit complex.
<thelema>
zorun: I don't mean AND. Think of it as a projection of which bits I want to keep. The first int is an ordered collection of bits, and I'm taking the subset of those bits corresponding to the 1's in the second int.
<thelema>
The first int is a point in Z_2^n, and the second int indicates which dimensions to keep. So 0b11xy11 keep 0b001100 = 0bxy
joewilliams is now known as joewilliams_away
mdelaney has quit [Ping timeout: 260 seconds]
mdelaney has joined #ocaml
dnolen has quit [Quit: dnolen]
dnolen has joined #ocaml
flux has quit [Remote host closed the connection]
flux has joined #ocaml
mdelaney has quit [Quit: mdelaney]
mdelaney has joined #ocaml
mdelaney has quit [Ping timeout: 240 seconds]
mdelaney has joined #ocaml
sebz has joined #ocaml
lamawithonel_ has joined #ocaml
lamawithonel has quit [Ping timeout: 245 seconds]
mjonsson has quit [Remote host closed the connection]
<bobry>
well, debian folks got it from *somewhere* obviously :)
<flux>
the debian folk keep the original source package around
<bobry>
i guess i'd have to use debian sources then
<flux>
that repo is in the format that there's the added debian directory and it has debian/patches with debian-specific additions
<flux>
(they all seem reasonable patches, btw ;))
<bobry>
yup, i've looked through them yesterday :)
zorun has quit [Quit: Lost terminal]
zorun has joined #ocaml
mcclurmc_ is now known as mcclurmc
sebz has quit [Quit: Computer has gone to sleep.]
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
ikaros has joined #ocaml
lopex has joined #ocaml
mdelaney has quit [Read error: Connection reset by peer]
mdelaney_ has joined #ocaml
Yoric has joined #ocaml
surikator has joined #ocaml
ttamttam has joined #ocaml
jaar has joined #ocaml
avsm has joined #ocaml
yezariaely has quit [Quit: leaving]
yezariaely has joined #ocaml
_andre has joined #ocaml
Snark_ has joined #ocaml
Snark_ is now known as Snark
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
dnolen has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 252 seconds]
Yoric has quit [Quit: Leaving.]
hto has quit [Quit: Lost terminal]
iratsu has quit [Ping timeout: 245 seconds]
hto has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
asmanur_ has quit [Read error: Operation timed out]
asmanur has joined #ocaml
iratsu has joined #ocaml
<adrien>
for a _quick_ way to copy a file, does anyone know better than Sys.command?
flx_ has joined #ocaml
flux has quit [Read error: Connection reset by peer]
flx_ is now known as flux
<thelema>
adrien: let file_copy source dest = File.with_in_file source (fun ic -> File.with_out_file dest (fun oc -> IO.copy ic oc))
<adrien>
batteries ='(
<adrien>
I think I'll install more things on this windows box but not today: probably tomorrow (ahhhh, deadline)
<thelema>
ah, windows ='(
MaCo_ has joined #ocaml
<MaCo_>
Hi evrybody
jaar has quit [Quit: Quitte]
jimmyrcom has joined #ocaml
<adrien>
hi MaCo_
MaCo_ has left #ocaml []
MaCo_ has joined #ocaml
bouzu has joined #ocaml
bouzu has left #ocaml []
jaar has joined #ocaml
dnolen has quit [Quit: dnolen]
lopex has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
Cyanure has quit [Remote host closed the connection]
kurtosis has joined #ocaml
<kurtosis>
Can I use List.fold_left to fold a list of elements under some function f that takes more arguments than just the list?
<thelema>
curry f first:
<thelema>
err, partially apply f first
<thelema>
let f arg1 arg2 x acc = ... in
<thelema>
List.fold_left (f arg1 arg2) x0 xlist
<thelema>
kurtosis: does that help?
sebz has joined #ocaml
<kurtosis>
what are x and acc?
<thelema>
they're reversed, but x is supposed to be the value coming in from the list and acc is the accumulator for the fold, that keeps the partial value so far
<thelema>
let f arg1 arg2 acc x = ... in List.fold_left (f arg1 arg2) acc0 xlist
<thelema>
^^ this is more correct
<kurtosis>
ah I see, thanks
mad has joined #ocaml
bobry has quit [Ping timeout: 245 seconds]
lopex has joined #ocaml
ttamttam has quit [Quit: ttamttam]
joewilliams_away is now known as joewilliams
MaCo_ has left #ocaml []
surikator has quit [Quit: surikator]
jaar has quit [Quit: Quitte]
avsm1 has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
metasyntax|work has quit [Ping timeout: 276 seconds]
surikator has joined #ocaml
surikator has quit [Client Quit]
elehack has joined #ocaml
bobry has joined #ocaml
<_habnabit>
thelema, in practice, the complexity is dwarfed by the complexity of the calculations that it's doing
<_habnabit>
thelema, this is a pretty minor part of the thing
<thelema>
_habnabit: not the runtime complexity of your solution, the programming complexity of it.
<_habnabit>
thelema, yes, I'm aware.
<thelema>
using both a variant type and passing modules around
<_habnabit>
thelema, but I have a `type t = (module N) * init_param` that I use, and it's easy from there.
Yoric has joined #ocaml
arubin has joined #ocaml
<thelema>
if you say so.
<Yoric>
Hi
<thelema>
Yoric: long time no see
<adrien>
Yoric: that was a good news :-)
<_habnabit>
thelema, I got about halfway ther ewith what we'd discussed before, but it ended up being a very complex change. especially since the existing code which I was trying to adapt to this system already uses modules.
<Yoric>
thelema: yep :)
<Yoric>
How are you?
<Yoric>
adrien: what news?
<thelema>
_habnabit: fair enough.
<adrien>
OPA open-sourced
<Yoric>
:)
<thelema>
Yoric: I'm doing well. classes begin again tomorrow.
<Yoric>
thelema: best wishes, then
<thelema>
Yoric: thank you. I see Opa getting some press, but not being well understood by many people
<Yoric>
Well, that was always the risk.
<Yoric>
But then, so was Java initially.
<thelema>
true.
mdelaney_ has quit [Quit: mdelaney_]
<zorun>
I don't know if it's the best example to draw on :)
<thelema>
zorun: all it'll take mlstate is sun-level resources to make Opa successful. Heck, maybe even less than that.
metasyntax|work has joined #ocaml
<zorun>
yeah, the stdlib is already pretty impressive
<zorun>
hi metasyntax|work
<zorun>
metasyntax|work: tpowa does not seem very responsive about the bug report...
<bitbckt>
I wonder what the interconnect cost of the embedded "database" is.
<bitbckt>
The docs imply every server speaks to every other to share the db.
<Yoric>
thelema: :)
<metasyntax|work>
zorun: Yeah, I sort of figure it's lower priority for the project probably.
<metasyntax|work>
(Internet service is terrible here today.)
<zorun>
metasyntax|work: true... don't you hesitate to post a comment, I hope he gets a mail each time :)
mad has quit [Quit: bye]
* Yoric
does.
MaCo__ has joined #ocaml
mdelaney has joined #ocaml
<elehack>
thelema: What is the status on the Batteries hashtbl vs. OCaml 3.12.1 issue?
<thelema>
elehack: you mean the 3.13 issue?
<thelema>
afaik, no work has been done on it. It'll require some rewriting of batteries hashtbl
<elehack>
ok :(
<elehack>
Could you (or someone else who actually knows what the problem is) put an entry for it in the Github issue tracker so we can track it (and I can put a note in the GODI stuff pointing interested parties to it)?
* elehack
doesn't actually know what the problem is - just that there is one
<thelema>
It's a terrible bug report - I'll put a bit more detail in it now
<elehack>
ok :)
<elehack>
I had searched for both "3.12.1" and "Hashtbl" and didn't find it.
<elehack>
so is this just a problem with the weak hashtable stuff, not the Hashtbl module?
<thelema>
it's not broken in 3.12.1, only in SVN (which will become 3.13)
<elehack>
ok, great, I'll update the GODI package then.
<thelema>
the weak hashtable is the first place that reports an error
<thelema>
but it'll have to be fixed in both places
<thelema>
I'm really looking forward to the new hashtbl code - the current hashtable has been useless for my purposes and I've been forced to use map refs instead
ankit9 has quit [Ping timeout: 245 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz
elehack is now known as elehack|lunch
lpereira has joined #ocaml
eb4890 has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
elehack|lunch is now known as elehack
Anarchos has joined #ocaml
fraggle_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
ikaros has quit [Quit: Ex-Chat]
mdelaney has quit [Quit: mdelaney]
mdelaney has joined #ocaml
mdelaney has quit [Ping timeout: 250 seconds]
mdelaney has joined #ocaml
MaCo__ has quit [Quit: This computer has gone to sleep]
mdelaney has quit [Quit: mdelaney]
mdelaney has joined #ocaml
<adrien>
elehack: \o/
BiDOrD has quit [Read error: Operation timed out]
<elehack>
adrien: ?
BiDOrD has joined #ocaml
elehack has quit [Quit: Headed out, possibly to home]
<adrien>
elwdamn
<adrien>
was for batteries in godi
zorun has quit [Ping timeout: 260 seconds]
zorun has joined #ocaml
eb4890 has quit [Ping timeout: 260 seconds]
Snark has quit [Quit: Quitte]
<_habnabit>
in tuareg-mode, is there a way to see if a function is tail-recursive via its annot file?
<thelema>
_habnabit: IIRC, that's a requested feature, but not implemented
<_habnabit>
ah, dang.
<thelema>
and pretty unlikely to be implemented, if it comes down to just the inria crew. Luckily more people are hacking on the compiler.
ftrvxmtrx has joined #ocaml
lpereira has quit [Quit: Leaving.]
ygrek has quit [Remote host closed the connection]
avsm has joined #ocaml
_andre has quit [Quit: leaving]
eb4890 has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
<_habnabit>
also, is there a simple way to go from the symbol names produced by $x.p.native to the source location?
<_habnabit>
e.g. camlBatenum__get_1124'2
<_habnabit>
BatEnum, even.
eb4890 has quit [Ping timeout: 260 seconds]
<thelema>
_habnabit: BatEnum.get
<_habnabit>
well, right, but that's _1124'2
<_habnabit>
s/that/what/
<_habnabit>
or, worse: camlPplacer_run__fun_10871
<thelema>
if there's 20 things all called BatEnum.get, the final tag distinguishes them.
<thelema>
anonymous functions are hard to pin down in a stack trace.
<_habnabit>
this doesn't correspond with, say, something in the .annot file?
<_habnabit>
I mean, these exact identifiers aren't used anywhere else?
<adrien>
is *_fun_i supposed to be before *_fun_(i+1) in the code?
<_habnabit>
well, I'm /pretty/ sure I don't have 10871 anonymous functions defined.
<thelema>
maybe you can use -dlambda to match up the identifiers
<thelema>
adrien: yes
<thelema>
or maybe -dparsetree
<adrien>
thelema: thanks, that's at least one thing
DimitryKakadu has quit [Quit: Konversation terminated!]
<_habnabit>
man, google is completely usless.
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
<_habnabit>
hmm, how are you supposed to use -dlambda/-dparsetree with ocmalbuild
<_habnabit>
ocamlbuild, even.
<thelema>
_habnabit: I think you'll have to make your own tag.
<_habnabit>
ah.
<thelema>
modify myocamlbuild
eb4890 has joined #ocaml
<_habnabit>
there doesn't seem to be documentation on what -dlambda /does/. does it compile as normal and also generate a .lambda file, or what?
<thelema>
the documentation for -dlambda is: "(undocumented)"
<zorun>
:)
<zorun>
very explicit, I think
<thelema>
it spits out a kind of AST to stdout.
<_habnabit>
ah, to stdout.
<_habnabit>
fun.
<thelema>
yup, this is why it doesn't mix well with ocamlbuild
<_habnabit>
haha, what. camlBatStd__$7c$3e_1176
<thelema>
BatStd.(|>)
<_habnabit>
oh, that makes sense.
<thelema>
It's a bit disappointing that |> is in the stack trace, and isn't inlined. Maybe OcamlPro will achieve this.
<_habnabit>
looks like |- is called 21k times and |> is called 7.5k times.
<_habnabit>
but very little time was spent in them compared to the rest of the program.
<thelema>
sure, they only cause problems inside core loops.
<_habnabit>
any particular reason it's not inlined? seems like a simple thing to inline.
<thelema>
HOFs aren't inlined.
<_habnabit>
ahh.
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
flux has quit [Remote host closed the connection]
flux has joined #ocaml
Yoric has quit [Quit: Leaving.]
Morphous has quit [Read error: Operation timed out]
eb4890 has quit [Ping timeout: 260 seconds]
<_habnabit>
is there some way to make a self-contained binary that uses camomile? it seems that it stores absolute paths to places which contain its various database files? even if I could specify a relative path somehow, that would be fine.
<thelema>
all of batteries' use of camomile is through BatCamomile, so changing that to provide your desired camomile functor implementation should do what you want
<thelema>
If you make something cool configurable, send it upstream
<_habnabit>
(could I putenv before I `open Batteries` and have it Do What I Mean? I don't know in what order code is executed.)
<thelema>
the coolest I made is in batCamomile-0.8.1
<thelema>
code is executed in linking order.
<thelema>
so no, you couldn't putenv before open Batteries and have it affect batteries
<thelema>
I think you may have to patch batteries to get the functionality you want.
<_habnabit>
hm.
<thelema>
I can't think of any way to change a module dependency between two modules already loaded, which is what you'd need to do to affect things in your code.
<_habnabit>
(if I was going to do that, I might just remove the camomile dependency; I'm not sure that it's even used.)
<thelema>
_habnabit: if you can, switch to batteries v2 -- no camomile dependency
<_habnabit>
hmm, I could try that.
<thelema>
that said, the interfaces are not guaranteed as stable as the v1 interfaces
<thelema>
I'm not agressively changing things, but some more interfaces might get depreciated in the v1 branch and deleted in the v2.
<thelema>
otoh, I don't think there'll be that many more v1 releases
<thelema>
so not much time for this deprecation to happen
Morphous has joined #ocaml
<_habnabit>
are there snapshots somewhere, or should I just take it from a git tag?
<thelema>
_habnabit: no snapshots, just take from git v2 branch
<thelema>
I've been meaning to make a v2beta1 release...
<thelema>
hold on, I'll tag the current version and that'll be the snalshot