wtetzner has quit [Read error: Connection reset by peer]
digcon9 has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
ulfdoz_ is now known as ulfdoz
struktured has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
digcon9 has quit [Ping timeout: 252 seconds]
digcon9 has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
<wmeyer>
thelema: now bootstraping from _oasis is possible, checkout the pull request
<wmeyer>
thelema: sorry it's been taking that long - I sat down finally to odb today
digcon9 has quit [Ping timeout: 252 seconds]
digcon9 has joined #ocaml
sivoais has quit [Ping timeout: 248 seconds]
smerz has quit [Ping timeout: 244 seconds]
smerz has joined #ocaml
digcon9 has quit [Ping timeout: 265 seconds]
smerz has quit [Read error: Operation timed out]
smerz has joined #ocaml
digcon9 has joined #ocaml
digcon9 has quit [Read error: No route to host]
sivoais has joined #ocaml
smerz has quit [Read error: Connection reset by peer]
tautologico has quit [Quit: tautologico]
tertl3 has joined #ocaml
tertl3 has quit [Ping timeout: 256 seconds]
NaCl has quit [Ping timeout: 250 seconds]
tertl3 has joined #ocaml
tertl3 has quit [Ping timeout: 260 seconds]
ulfdoz has quit [Ping timeout: 265 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
pango is now known as pangoafk
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 260 seconds]
err404 has joined #ocaml
ftrvxmtrx_ has joined #ocaml
tertl3 has joined #ocaml
<adrien>
yarg
<adrien>
most annoying thing when expanding lablgtk's API: not breaking API-compatibility for everyone =/
Tobu has quit [Ping timeout: 248 seconds]
digcon9 has joined #ocaml
Tobu has joined #ocaml
mika1 has joined #ocaml
cago has joined #ocaml
ocp has joined #ocaml
avsm has joined #ocaml
digcon9 has quit [Ping timeout: 245 seconds]
digcon9 has joined #ocaml
thomasga has joined #ocaml
err404 has quit [Remote host closed the connection]
munga has joined #ocaml
eni has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
<ssbr_>
Is there any function like this in the stdlib? fun a b ->(a, b)
<rixed>
ssbr_: None that I know of. Intererstingly, there does not seams to have one in Batteries.Tuple2 neither :-(
<ssbr_>
That is just weird. :(
<rixed>
I think constructors are curryable in SML (bot not in OCaml), if this is what you are after. Although writting such a function would be trivial.
<ssbr_>
rixed: nah, I'm building an association list from two lists
<ssbr_>
List.map2 (fun a b -> (a,b)) list1 list2
<adrien>
val combine : 'a list -> 'b list -> ('a * 'b) list
<ssbr_>
Oh.
<rixed>
ssbr_: So List.map2 Cons list1 list2 may be valid SML (or close)
<ssbr_>
Well that's convenient
ftrvxmtrx_ has quit [Quit: Leaving]
<ssbr_>
what kind of bot is adrien?
<ssbr_>
it's a little weird to be able to pick the function that does what I want like that
<ssbr_>
(List.combine is a thing that exists)
<adrien>
sorry, forgot to mention that came from "man List" :-)
<ssbr_>
adrien: what, you're human?
<ssbr_>
maaaaaan
ftrvxmtrx_ has joined #ocaml
<ssbr_>
you said it __right__ after I gave the function definition
<ssbr_>
it was creepy.
<ssbr_>
adrien: but thanks! :)
<adrien>
I'd be more worrying if someone had managed to make a bot that reads IRC and properly gives such hints :-)
<Qrntz>
a xavierbot with fuzzy logic
<adrien>
(although we need a bette topic, an faq, and a bot which can lookup functions according to their types)
<ssbr_>
well I was thinking how hard a problem it was. Figuring out which function in the stdlib is equivalent to a provided snippet of code is, well, undecidable to begin with
<rixed>
ssbr_: actually, adrien is able to mimick a real person if you chat with him. But he is a bot obviously, you spotted it
<adrien>
or a human who didn't have enough sleep and is waiting for some hardware to reboot =)
<flux>
hah hah, how jolly and believeable nonsense those markov chains can generate!
<ssbr_>
hum, data constructors aren't first class, huh?
<ssbr_>
uhhh, why did I say "data"
<flux>
ssbr_, sadly correct
<ssbr_>
I have two constructors that mean the exact same thing except for one bit of extra information (logical negation). I do not like copy-pasting code like this. :<
<ssbr_>
(I didn't make this design don't look at me.)
<flux>
iirc there's a campl4 extension that achieves that trick
<flux>
basically by generating functions for each constructor
<flux>
well, it might not cover all cases of first-classfulness
<ssbr_>
hyagh, and I can't even do (let a = (b, c) in SomeThing a) for SomeThing of a * b
<flux>
use SomeThing of (a * b), they are succinctly different
<flux>
of course, if that's what you already have, then never mind :)
<ssbr_>
Why aren't all constructors nullary or unary?
<ssbr_>
is there a benefit to SomeThing of a * b over SomeThing of (a * b) ?
<ssbr_>
they aren't curried so there isn't that.
<flux>
SomeThing of a * b has a more efficient memory representation, with some downsides as you noticed
<flux>
with that the a and b are directly accompanied by the constructor, with the () form they are dereferenced through a pointer
<ssbr_>
flux: I figured. Although I also figured that ocaml can certainly unbox things itself if it wants to. But I guess this is here so that the programmer can control it?
<ssbr_>
except if it's here for programmer control, it sure is inconvenient
<rixed>
ssbr_: OCamlc does not perform such complex things at code generation level.
<rixed>
ssbr_: which is fine I think (predictability)
<flux>
well, that kind of stuff affects the interfaces as well, so they cannot really be optimized. but, I suppose it could automatically do some conversion when extracting sub-patterns, although that would result in == perhaps not working in the expected way - but probably code relying on that would be broken on some level already anyway ;)
<ssbr_>
rixed: well, it's only predictable if you read the type definition
<ssbr_>
and you could always make it controllable by specifying whether you want the tuple to be boxed or unboxed
<ssbr_>
(at said type definition). I just don't like that the interface is so different between the two
<ssbr_>
especially in ways that make my life harder :<
<rixed>
ssbr_: I don't like this particular "syntax" neither. I'm just happy with a compiler that does not sometime inline the same data structures and sometime don't.
<flux>
I just use always (a * b)
<flux>
unless I have special performance needs
<ssbr_>
flux: I think this is smart.
<flux>
(haven't found such a situation yet)
Hussaind has joined #ocaml
<ssbr_>
so sad that this isn't my code. :<
<rixed>
flux: notice that if you have the requirement to deconstruct the type very fast then the ()ed form might be faster
<flux>
rixed, well, true
Hussaind has left #ocaml []
err404 has joined #ocaml
wmeyer` has joined #ocaml
wmeyer has quit [Ping timeout: 246 seconds]
wmeyer`` has joined #ocaml
wmeyer` has quit [Ping timeout: 246 seconds]
Snark has joined #ocaml
err404 has quit [Ping timeout: 264 seconds]
tertl3 has quit [Ping timeout: 244 seconds]
avsm has quit [Quit: Leaving.]
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
snearch has joined #ocaml
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
avsm has joined #ocaml
digcon9 has quit [Ping timeout: 244 seconds]
digcon9 has joined #ocaml
smondet has joined #ocaml
digcon9 has quit [Read error: Operation timed out]
<orbitz>
Anyone know which godi works with Core?
<orbitz>
Or at least I can install oasis with
<smondet>
orbitz: Hi, last time I tried Core did not build with godi
<smondet>
The core package in godi is quite outdated
<orbitz>
Unfortunately
<orbitz>
I'm trying to get godi to install oasis for me though
<orbitz>
but that fails beause it depends o bin_prot?
cixaxa has joined #ocaml
<smondet>
no, I think oasis depends only on type-conv (?)
<orbitz>
Which it can't install :(
tufisi has quit [Ping timeout: 252 seconds]
<orbitz>
And installing oasis by hand looks annoing
<orbitz>
Not terrible annoying, just the kind of annoying I don't feel like I should have to deal with in 2012
<smondet>
I'e been there (but not on Mac): I got type-conv from godi, then compiled Oasis-0.3rc3 from sources, then got core from the bitbucket repo (and I had to put some code in comments)
<orbitz>
Haha
<orbitz>
Insanity
* orbitz
shakes fist at Ocaml's poor build environment
<flux>
careful with that fist or you might break the poor build environment even further :(
<orbitz>
Hah
<orbitz>
I wish we could replace the ocamlc ommunity with haskell since I want to write Ocaml and not Haskell but their build tools are awesome!
<avsm>
the tarballs shouldnt need OASIS to be istnalled
<orbitz>
For Core?
<orbitz>
The proble mwith the Core tarball is it won't build for me, some 32bit 64bit missmatch error
<orbitz>
I've taken to hacking godi database to fix the jane st deps
emmanuelux has joined #ocaml
mika1 has quit [Quit: Leaving.]
cago has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
tufisi has joined #ocaml
<hcarty>
orbitz: If you need/want to install oasis you can give odb a try
<hcarty>
ocamlbrew uses odb for bootstrapping an OCaml + base set of libraries
<hcarty>
orbitz: What version of OCaml?
<orbitz>
3.12.0
<orbitz>
Do I need latest?
<hcarty>
orbitz: I don't think so? But it's possible. It works here for 3.12.1
<hcarty>
orbitz: thelema may be able to help
<orbitz>
Hrm, turning stacktrace on doesn't give me a stack trace...
<hcarty>
The toplevel doesn't give traces
* orbitz
shakes fist in rage yet again
<hcarty>
Indeed
<hcarty>
orbitz: Might I recommend Batteries? :-)
<orbitz>
I want to play wtih Async :)
<hcarty>
Lwt! :-)
<hcarty>
I haven't tried Async so I can't compare the two
<orbitz>
I've done Lwt, and like it, curious to see what Async is like
<orbitz>
I have a feeling I won't like how Async handles errors
ocp has quit [Read error: Operation timed out]
<orbitz>
One advantage of Async apaprenly is the amount of C code is very small in it
Tobu has quit [Ping timeout: 248 seconds]
djcoin has joined #ocaml
<orbitz>
hcarty: Hrm, same eror ron Ocaml 3.12.1
<hcarty>
orbitz: Do you get the same error if you run odb.ml without any arguments?
<orbitz>
Nope, i get a list of packages
<hcarty>
orbitz: What is the command you are running?
<orbitz>
ocaml odb.ml oasis
smerz has joined #ocaml
<hcarty>
thelema: It looks like orbitz found a bug :-)
<hcarty>
orbitz: I tested against the latest and got the same
<orbitz>
Phew! Not jus tme
<hcarty>
I must have had an outdated version of odb
<orbitz>
I've got ot head to the airport thouhg, I'll check back tomorrow
<hcarty>
orbitz: It will most likely be fixed by then
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
brooksbp has joined #ocaml
fooc has quit [Ping timeout: 244 seconds]
fooc has joined #ocaml
ocp has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
ikaros has joined #ocaml
struktured has quit [Ping timeout: 252 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
emmanuelux has quit [Remote host closed the connection]
ggherdov has joined #ocaml
ggherdov has left #ocaml []
emmanuelux has joined #ocaml
emmanuel__ has joined #ocaml
<pippijn>
does ocsigen support SSL client authentication?
pangoafk is now known as pango
emmanuel__ has quit [Ping timeout: 264 seconds]
emmanuelux has quit [Ping timeout: 264 seconds]
emmanuelux has joined #ocaml
<pippijn>
alternatively, does Lwt_ssl?
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<thelema>
hcarty: thanks for sending the bug report, I just noticed it, and it was a stupid mistake in testing whether a package name was a URI
<thelema>
It should be fixed now. Thanks orbitz as well
nimred_ has joined #ocaml
nimred_ has quit [Client Quit]
<hcarty>
thelema: You're welcome - I'm glad it was a quick fix
<thelema>
If only the jane street people would put their tarballs on some website, odb could easily install the new core
<wmeyer``>
thelema: :)
<wmeyer``>
thelema: I put the pull request "yesterday"
<thelema>
wmeyer``: yes, I was looking through it.
<thelema>
I hadn't gotten to where the buildtype detection was done
<thelema>
ah, I see, the new function enclosure "try build using"
<wmeyer``>
thelema: So it's a state machine - in simple words it tries first everything, and then when even make file files and the _oasis is present it tries to bootstrap by calling this function again with the Oasis_bootstrap, and the tries Oasis again - in fact in the begining I was thinking that we might want to try again everything, but the prefered order is setup.ml first anyway.
<wmeyer``>
Maybe we should refactor how it's done currently in general the control flow in this function - I might have time to have a go today. Usually i think about monads at these times.
<thelema>
wmeyer``: sorry, distracted by conference call, will chat more when it's done.
<wmeyer``>
thelema: No problem, i am here whole evening.
fraggle_ has quit [Read error: Connection reset by peer]
<pippijn>
smondet: that's a client
<pippijn>
smondet: what does the server side look like?
<pippijn>
ah, there is a qserver part
<pippijn>
nice
<pippijn>
smondet: thanks, that looks good
<smondet>
pippijn: This part is the kind-of C.A.-independent part, you still need to check that certificates have not been revokated (and that depends on the CA implementation, I don't think it is standardized anywhere)
<pippijn>
yeah
<pippijn>
does ocaml have openssl ca bindings?
<wmeyer``>
pippijn: I think I've seen some package doing that..
<wmeyer``>
thelema: OK. I simplified a bit, added a commit to it
<pippijn>
I could just call the openssl binary
<pippijn>
but getting error codes from that is pretty crude
<pippijn>
"failed" or "succeeded"
<smondet>
I did not find any, I started trying to parse the files generated by openssl ca, but then I switched to create my own CA-like (I have a DB of users and roles already)
<pippijn>
I'm not going to parse the console output from openssl
<pippijn>
smondet: hm, maybe I'll do that..
<pippijn>
the advantage of using openssl crl is that I can inspect it from outside with the openssl program
<smondet>
pippijn: For inspection... I use sexplib.syntax + emacs :)
<mrvn>
all ocaml packages need the ocaml they where build with.
<pippijn>
I don't understand this
<mrvn>
pippijn: file a bug for a binNMU.
<pippijn>
oh, it doesn't exist for my architecture
<pippijn>
it only exists in squeeze for my architecture
<pippijn>
that's why..
<mrvn>
The ocaml compiler produces object files that are incompatible between versions. So every time a new compiler version is uploaded all ocaml packages need to be recompiled.
<mrvn>
pippijn: ahh, that explains why it wasn't rebuild then
<pippijn>
mrvn: libgv-ocaml doesn't exist in testing
<mrvn>
Check the bugs against ftp.debian.org, libgv-ocaml or the Removals.txt to see why it was removed.
<mrvn>
or ask in debian-ocaml or on the ML.
<pippijn>
[auto-cruft] NBS (no longer built by graphviz)
<pippijn>
Debian Bug report logs: Bugs in package libgv-ocaml
<pippijn>
No reports found!
<mrvn>
so check the graphviz source why it stoped building it.
<pippijn>
it needs --enable-ocaml
<pippijn>
as far as I can tell, it didn't stop
<pippijn>
there is even a libgv-ocaml.install in the debian directory
pango has quit [Quit: kernel upgrade]
bitbckt has quit [Ping timeout: 245 seconds]
pango has joined #ocaml
<thelema>
wmeyer``: simpler is better, looking at new commit now
bitbckt has joined #ocaml
<mrvn>
less code - less bugs. :)
<thelema>
mrvn: yes, I was sad when I crossed the 500LoC boundary on odb.ml
<mrvn>
* Remove ocaml bindings (Closes: #647435)
fraggle_ has joined #ocaml
<mrvn>
pippijn: Seems to have been removed for lack of use. So if you have a use case just ask for it to be added back.
<mrvn>
and add a fix for the bug
Xizor has joined #ocaml
<thelema>
wmeyer``: I think I like the simpler code better. What about if oasis isn't installed - auto-installing it?
wmeyer has joined #ocaml
<mfp>
argh why does epoll_wait specify the timeout in milliseconds
<flux>
what are you doing where you need 1000 us sleeps?
<adrien>
Sleep(1);
<flux>
mfp, btw, what happens if you sleep for 0.002 s?
<mrvn>
flesk: then you wake up some time after 0.002s have passed
<mrvn>
flux: ^^^
<mfp>
I have a lwt thread which writes to disk (and can fsync), which is awaken when there's dirty data. But I want to amortize the write/fsync cost by doing group commits, and thus not Lwt.wakeup (actually, Lwt_condition.broadcast) right away, but after say 0.1ms (small delay so as to avoid adding too much latency in the non-fsync, non-concurrent case)
<mrvn>
I hope you don't delay the write too
<mfp>
?
<mrvn>
if you write and then wait before the fsync then the FS has a chance to already write the data
<mfp>
flux: Lwt_unix.sleep 0.002 gives these times 0.0058191 0.0039639 0.0039780 0.0040021 0.0041711 0.0038090 0.0039890 0.0039980 0.0039930
<mfp>
mrvn: I don't control the fsync time myself; I'm writing to a leveldb DB and setting a fsync:bool param on write.
<mfp>
I guess I could write with fsync:false and then perform a dummy fsynced write, so they'll go to the same append-only file and flush at once, but I don't really see the point (unless I want to allow non-fsynced commits, but that's another story)
<mrvn>
that would just write the data twice.
Tobu has quit [Ping timeout: 248 seconds]
<mfp>
would it? I mean the dummy fsynced write would not carry the same data (just some dummy record)
<mrvn>
it would still need to write at least one block. The point of doing the fsync later would be so that the fsync wouldn't block
<mfp>
btw. Thread.delay 0.0001 gives a very constant 0.0001581 delay
<mfp>
the fsync is done in a separate thread, not the main one with the Lwt event loop
<mfp>
so no blocking
<mfp>
select(0, [], [], [], {0, 10}) = 0 (Timeout) <0.000079> so there's no pb sleeping for ~100us
<flux>
ah, I realized that epoll_wait cannot do shorter sleeps than 1 millisecond
Tobu has joined #ocaml
<flux>
new cool interface for the win?
<flux>
someone somewhere decided that a new interface should only do sleeps >= 1000 us :)
Snark has quit [Quit: Quitte]
<flux>
well, you could probably use setitimer to get shorter sleeps
brooksbp has quit [Quit: Leaving]
<flux>
mfp, maybe you can choose to use some other async backend
<mfp>
yeah, could switch to the one based on select
<mfp>
but can also keep the libev one and synthesize a faster Lwt_unix.sleep by sleeping in a new thread and sending a notification; that would add some 20+20us latency or so
* mfp
afk
<adrien>
aren't you overengineering this a bit?
<mrvn>
That's a bit like if (time < 1000) { for i = 0; i < time * 3438; ++i) { } } else { usleep(time); }
<bitbckt>
cd
<bitbckt>
oops :)
<bitbckt>
>_> <_<
<jonafan>
LOL NOOB!!!!!!
<jonafan>
let's keep it on topic bitbckt
<bitbckt>
cd ~/src/ocaml?
<jonafan>
better
<bitbckt>
:P
zorun has quit [Read error: Operation timed out]
zorun has joined #ocaml
Kakadu has joined #ocaml
eni has quit [Ping timeout: 246 seconds]
ocp has quit [Ping timeout: 260 seconds]
everyonemines has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Submarine has quit [Quit: Leaving]
andreypopp has quit [Quit: Computer has gone to sleep.]
ftrvxmtrx has joined #ocaml
ocp has joined #ocaml
andreypopp has joined #ocaml
tertl3 has quit [Ping timeout: 248 seconds]
andreypopp has quit [Quit: Computer has gone to sleep.]
err404 has joined #ocaml
<pippijn>
oasis supports packs
<pippijn>
that's nice
err404 has quit [Remote host closed the connection]
ocp has quit [Ping timeout: 244 seconds]
tertl3 has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
tmaedaZ has quit [Ping timeout: 252 seconds]
munga has quit [Ping timeout: 276 seconds]
tmaedaZ has joined #ocaml
eikke has joined #ocaml
snearch has quit [Quit: Verlassend]
zuymanto has joined #ocaml
tertl3 has quit [Ping timeout: 252 seconds]
<eikke>
is there any way to create a 'string' using alloca() in ocaml? :P
<eikke>
some code in which I would create a small (like, 16-byte) buffer which will never escape local scope, but will be mutated in the algorithm
<pippijn>
when I make a connection, it starts using 100% CPU time
<pippijn>
eikke: okay.. in ocaml, you don't allocate a lot of things on the stack
<eikke>
I'm aware of that
<eikke>
we're (more as a challenge) trying to squeeze the last overhead out of some very tight loop
<eikke>
in a couple of languages, comparing generated asm,...
<pippijn>
ah
j2d2j2d2 has left #ocaml []
<pippijn>
well, if you don't mind the challenge, try storing the bytes of that string in a few ints
<eikke>
ocaml is pretty good, but calling camlBuffer__add_char is painful (I wish that could be inlined :D)
<pippijn>
uh
<pippijn>
before you start using Buffer, try just using a string
<pippijn>
if you want performance
<pippijn>
String.make 16 ' '
<pippijn>
it won't be on the stack, but that probably doesn't matter too much
<pippijn>
ocaml's runtime is pretty good with locality of reference
<smondet>
pippijn: I think Lwt_ssl.accept needs to ba called on a socket already accepted by Lwt_unix.accept (I think I found readable server-side code in ocsigenserver's darcs)
<wmeyer``>
thelema: I think it should be highly sort of optional to install oasis
<wmeyer``>
thelema: the problem is that we don't want developers just to rely on this feature - right?
<wmeyer``>
thelema: I would think that oasis might be the first thing to install - but do you do it with autotools? btw however it's the only day way you can do with the source control.
<eikke>
pippijn: fwiw, using a string increases runtime with >100% and more-than-doubles GC rate in a microbench ;)
<pippijn>
eikke: vs. using a Buffer?
<eikke>
sorta, yes
<eikke>
it's already usign a buffer
<pippijn>
how about using a global string?
<pippijn>
or a semi-global one
<eikke>
thought about that as well, but I always think that feels really ugly and not really concurrency-safe
<pippijn>
you can pass the string in
<pippijn>
as a context
<eikke>
that pushes allocation cost to the caller, wont help. + I might need to enlarge the string on-the-go
<pippijn>
can you pre-calculate the maximum string size?