flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
rwmjones has joined #ocaml
ohama has joined #ocaml
q66 has quit [Quit: Leaving]
q66 has joined #ocaml
q66 has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
derek_c has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
talzeus has joined #ocaml
caseyjames has quit [Quit: Page closed]
nikki93 has quit [Remote host closed the connection]
chrisdotcode has quit [Ping timeout: 245 seconds]
TDJACR has quit [Ping timeout: 260 seconds]
Neros has quit [Ping timeout: 245 seconds]
Drup has quit [Ping timeout: 260 seconds]
chrisdotcode has joined #ocaml
Drup has joined #ocaml
derek_c has quit [Quit: Lost terminal]
nikki93 has joined #ocaml
chrisdotcode has quit [Ping timeout: 241 seconds]
nikki93 has quit [Ping timeout: 268 seconds]
chrisdotcode has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
Drup has quit [Quit: Leaving.]
chrisdotcode has quit [Ping timeout: 245 seconds]
nikki93 has joined #ocaml
chrisdotcode has joined #ocaml
ygrek has joined #ocaml
cantstanya has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Quit: Leaving.]
gour has joined #ocaml
<adrien> morning
ygrek has quit [Ping timeout: 256 seconds]
<gour> morning
cdidd has joined #ocaml
chrisdotcode has quit [Ping timeout: 252 seconds]
talzeus has quit [Remote host closed the connection]
chrisdotcode has joined #ocaml
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
Snark has joined #ocaml
<pippijn> morning
weie_ has quit [Read error: Connection reset by peer]
weie has joined #ocaml
Simn has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
davekong has quit [Ping timeout: 240 seconds]
davekong has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
ulfdoz has joined #ocaml
darkf has quit [Write error: Connection reset by peer]
darkf has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
nikki93 has quit [Remote host closed the connection]
ggole has joined #ocaml
zpe has joined #ocaml
nikki93 has joined #ocaml
chrisdotcode has quit [Ping timeout: 248 seconds]
nikki93 has quit [Ping timeout: 248 seconds]
ollehar has joined #ocaml
q66 has joined #ocaml
mfp has joined #ocaml
Yoric has joined #ocaml
dnm_ has quit [Ping timeout: 245 seconds]
mfp has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
yacks has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
ontologiae_ has joined #ocaml
snearch has joined #ocaml
darkf has quit [Quit: Leaving]
<gasche_> adrien: I'm following your instructions re. ocamlbuild bootstrap
<gasche_> but I don't understand the details (eg. the difference between building-pre-ocamlcomp.sh-change and then trunk, or just building trunk from scratch directly), so this may be wrong
<gasche_> should I commit the new bootstrap directly (I'm just now checking that it doesn't break the build), or do you have a way to check that it behaves as you expect?
<gasche_> hm
<gasche_> I think I understand the difference: the old bootstrap is still looking for ocamlcomp.sh
gasche_ is now known as gasche
zpe has quit [Remote host closed the connection]
ARM9 has joined #ocaml
<adrien> gasche: basically, I changed ocamlbuild will fail building if ocamlcomp.sh is not in the build directory
<adrien> as long as you have it, it will build
<adrien> the only goal of building before the change is to keep this file
<adrien> oh, hadn't read your last message :D
nikki93 has joined #ocaml
dtg has quit [Read error: Connection reset by peer]
dtg has joined #ocaml
<gasche> commited
<adrien> thanks :)
nikki93 has quit [Ping timeout: 260 seconds]
ARM9 has left #ocaml []
snearch has quit [Quit: Verlassend]
Neros has joined #ocaml
ontologiae_ has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
zpe has joined #ocaml
<adrien> gasche: jenkins is turning blue again :)
<adrien> there seems to still be an issue with windows and ocamlbuild though
<gasche> yep
<gasche> I'm afraid I will not look into this in the next few hours, I'll be at ICFP
<gasche> but it can wait
<gasche> adrien: have you seen http://caml.inria.fr/mantis/view.php?id=6188 ?
<adrien> I'm going to buy a book on awk
<adrien> well
<adrien> breaking compat with some systems is a good way to learn that you still have users on these systems
<adrien> at least that one is not because of I :)
<adrien> seems fairly obvious: -e 's|%%PACKLD%%|ld -r -o\|' \
<mrvn> \|?
<adrien> but I don't understand how it works on other systems
<mrvn> mrvn@frosties:~% sed -e 's|%%PACKLD%%|ld -r -o\|'
<mrvn> sed: -e expression #1, char 24: unterminated `s' command
<mrvn> adrien: it doesn't.
<mrvn> adrien: the \ must be sunOS specific
<adrien> ah
<adrien> -e 's|%%PACKLD%%|$(PACKLD)|' \
<adrien> from a makefile
<mrvn> so PACKLD is set to something broken
<adrien> it's from configure:
<adrien> echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \ | sed -e 's/ $/\\ /' >> Makefile
<mrvn> make does not honor \ as escape character and hapily splits "foo\ bar" at the " "
<adrien> on two lines, split between '\' and '| sed'
<adrien> is SunOS' shell retarded?
<mrvn> is there a space after \`
<mrvn> ?`
ollehar has quit [Ping timeout: 268 seconds]
<mrvn> never mind, that still wouldn't caus a \ in the output
<adrien> no
ontologiae_ has joined #ocaml
<adrien> omg
<adrien> SunOS 5.x is from June 1992
<adrien> poor people who still have to use it
frankjeager has joined #ocaml
belaid_ has joined #ocaml
frankjeager has quit [Read error: Connection reset by peer]
belaid_ has quit [Remote host closed the connection]
<adrien> ah, no, it's actually Solaris 10!
frankjeager has joined #ocaml
frankjeager has quit [Remote host closed the connection]
frankjeager has joined #ocaml
<adrien> joined #illumos and asked them about this construct
nikki93 has joined #ocaml
<orbitz> adrien: attending OUD this week?
nikki93 has quit [Ping timeout: 248 seconds]
<adrien> but actually the sed is responisble for the \
<adrien> orbitz: bit far for me I think :P
<orbitz> adrien: take a row boat :)
Drup has joined #ocaml
<adrien> gasche: I'll spawn a Windows VM later on today to look at the mingw* issue
wwilly has joined #ocaml
mcclurmc has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 248 seconds]
TDJACR has joined #ocaml
ollehar has joined #ocaml
frankjeager has quit [Quit: Quitte]
ben_zen has quit [Quit: leaving]
ollehar has quit [Quit: ollehar]
nikki93 has joined #ocaml
ygrek has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
cantstanya has joined #ocaml
nikki93 has joined #ocaml
cdidd has quit [Ping timeout: 252 seconds]
nikki93 has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
mika1 has joined #ocaml
ontologiae_ has quit [Ping timeout: 252 seconds]
cago has joined #ocaml
yacks has quit [Quit: Leaving]
nikki93 has joined #ocaml
dnm has joined #ocaml
nikki93 has quit [Ping timeout: 256 seconds]
talzeus has joined #ocaml
mika2 has joined #ocaml
mika1 has quit [Read error: Connection reset by peer]
cago has quit [Quit: Leaving.]
talzeus has quit [Remote host closed the connection]
mika2 has quit [Client Quit]
rwmjones has quit [Ping timeout: 248 seconds]
wmeyer has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
zpe has quit [Remote host closed the connection]
rwmjones has joined #ocaml
ben_zen has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 267 seconds]
<adrien> wmeyer: hi, I saw the issues, I'll take a closer look tonight
ygrek has quit [Ping timeout: 256 seconds]
<wmeyer> adrien: thank you
mika1 has joined #ocaml
nikki93 has joined #ocaml
<adrien> wmeyer: to be honest I'm quite annoyed with the msvc one
boogie has joined #ocaml
<wmeyer> adrien: I'm not surprised
<adrien> solving it might involve a gnu-makisms
<adrien> which is fine on windows/cygwin
mika1 has quit [Quit: Leaving.]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
rossberg has quit [Ping timeout: 259 seconds]
cago has joined #ocaml
rossberg has joined #ocaml
ulfdoz has quit [Ping timeout: 268 seconds]
<wmeyer> adrien: let's go for the simple solution
<adrien> the gnu-make-ism should also benefit build times on windows
mcclurmc has joined #ocaml
yacks has joined #ocaml
cago has quit [Quit: Leaving.]
cago has joined #ocaml
mika1 has joined #ocaml
<mrvn> anyone know a DHT (distributed hash table) for ocaml?
<adrien> mrvn: mldonkey will have one ;-)
<adrien> or two
<adrien> if not three
<mrvn> but probaly just interface to C libs
<adrien> I haven't noticed such libs as requirements
<adrien> yeah, no such dependency
<adrien> also, mldonkey had that very early compared to others
demonimin has quit [Ping timeout: 246 seconds]
demonimin has joined #ocaml
boogie has quit [Remote host closed the connection]
mcclurmc has quit [Quit: Leaving.]
<flux> sadly I've noticed that not all parts of mldonkey are easily detached from it.. for example the manipulation of bittorrent files.
<companion_cube> mrvn: I had a kind of toy DHT
<companion_cube> but it's far from really working
<companion_cube> https://github.com/c-cube/ocaml-chord just in case
ulfdoz has joined #ocaml
cago has quit [Quit: Leaving.]
mika1 has quit [Quit: Leaving.]
rwmjones has quit [Ping timeout: 248 seconds]
<mrvn> I want to stroe keys based on file content in a DHT. So each client says what files it has based on their sha256. I wonder about making a protocol that minimizes the information leakage. Idealy I want only clients that has a file to know who else has that file.
<companion_cube> flux: is the network/DHT part of it easily extractable?
<flux> companion_cube, no idea
<technomancy> I'm interested in doing some FFI, but the API I'm using requires me to set a C variable to a function pointer. is that something that would be handled by the ctypes library, or is it more general?
* adrien has no experience with ctypes
<technomancy> happy to do it without ctypes too =)
<technomancy> I guess there's two parts: how to set C variables, and how to provide an OCaml function in a way the C lib can interface with
<technomancy> looks like the latter is covered here: http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual033.html#toc148
<ggole> I imagine you'll need to write C to do it, and call that
Snark has quit [Quit: leaving]
<technomancy> I don't want to learn C =\
rwmjones has joined #ocaml
<ggole> One assignment shouldn't be too hard.
<mrvn> calling the pointer needs a bit of C i bet.
gour has quit [Disconnected by services]
gour_ has joined #ocaml
<ggole> If the function pointer needs to actually do something, you mean?
<technomancy> ggole: is that because ocaml doesn't have any way of mapping C names to memory locations?
<technomancy> the lib is readline; I want to set a completer function: http://tiswww.case.edu/php/chet/readline/readline.html#SEC44
<technomancy> rl_completion_entry_function in particular
<ggole> Well, C function pointers are not OCaml functions
<ggole> The calling conventions and, well, basically everything are different.
<mrvn> so you need a C function pointer that then calls your ocaml function?
<ggole> Yeah, a little wrapper
<technomancy> ctypes supports passing ocaml functions as args
<technomancy> but setting an existing variable is different
<mrvn> do you have just the function pointer or also a data pointer that gets passed as argument to the function?
<ggole> I'm afraid I know nothing about ctypes.
gour_ is now known as gour
<technomancy> mrvn: readline provides args, but I don't need to give any of my own
<ggole> typedef char *rl_compentry_func_t (const char *, int);
<ggole> Does it free the pointers though?
<mrvn> Then you are screwed and can only provide one callback in the module. Unless you build trampoline code dynamiclly (don't)
<ggole> This documentation is pretty poor.
<technomancy> yeah, I better try the ctypes mailing list I think; thanks
<mrvn> I hate libraries that don't have a private pointer in callbacks. Makes it so inflexible.
<ggole> Indeed.
<companion_cube> bring your own closures!
<pippijn> mrvn: makes it non-reentrant
<mrvn> pippijn: huh?
<pippijn> you can always have a global variable holding the private data
<mrvn> pippijn: nope
<pippijn> ok, not always
<pippijn> but often
<mrvn> pippijn: the point is that the private data is flexible while the function pointer needs static code.
<mrvn> s/flexible/dynamic/
<pippijn> yes
<mrvn> so e.g. you put the ocaml closure into the private data and a generic C function to invoke the closure into the function pointer
shinnya has quit [Ping timeout: 268 seconds]
<companion_cube> you can still put the OCaml closure in a global variable
<companion_cube> just before you call
<mrvn> companion_cube: Then how do you know which closure to call?
nikki93 has quit [Remote host closed the connection]
<mrvn> you could have thousands of them
<companion_cube> hmm
<companion_cube> I meant, instead of some_c_function(c_callback, c_closure); you do global_foo = c_closure; some_c_function(c_callback)
<companion_cube> and the c_callback will look in global_foo
<mrvn> companion_cube: that isn't reentrant or thread save
<companion_cube> indeed
<companion_cube> but that's better than nothing :)
<mrvn> so basically never works
<ggole> You could use threadlocal
<ggole> Still pretty awful
<mrvn> you might have more than one callback pending at a time even with a single thread
weie_ has joined #ocaml
ggole has quit []
weie has quit [Ping timeout: 245 seconds]
gour has quit [Quit: WeeChat 0.4.1]
cago has joined #ocaml
mika1 has joined #ocaml
boogie has joined #ocaml
derek_c has joined #ocaml
boogie has quit [Ping timeout: 246 seconds]
transendens has joined #ocaml
darkf has joined #ocaml
ollehar has joined #ocaml
ollehar1 has quit [Ping timeout: 252 seconds]
tani has joined #ocaml
tane has quit [Read error: Operation timed out]
nikki93 has joined #ocaml
transendens has quit [Ping timeout: 252 seconds]
manud has joined #ocaml
ben_zen has quit [Ping timeout: 256 seconds]
mika1 has quit [Quit: Leaving.]
mika2 has joined #ocaml
<adrien> wmeyer, gasche : ah, the issues on windows are the same for msvc and mingw: "make -f Makefile.nt otherlibraries" fails
Simn has quit [Quit: Leaving]
mika2 has quit [Quit: Leaving.]
nikki93 has quit [Remote host closed the connection]
cago has left #ocaml []
wwilly has quit [Quit: Leaving]
<wmeyer> adrien: thanks for investigating that
<wmeyer> so how to fix it?
q66_ has joined #ocaml
q66 has quit [Read error: Operation timed out]
tani has quit [Quit: Verlassend]
<adrien> wmeyer: the root of the issue is that a unix path is given to ocamlmklib
<adrien> I'll add a call to cygpath; I'm not very fond of it but it should be efficient
<wmeyer> adrien: OK
<wmeyer> whatever works
<adrien> cool, fixed
derek_c has quit [Ping timeout: 260 seconds]
<wmeyer> thanks :-)
<wmeyer> I'll aplly the patch, once you upload it
nikki93 has joined #ocaml
derek_c has joined #ocaml
johnelse has joined #ocaml
<adrien> wmeyer: btw, hold on for the next set of patches; not only because it'll be better to have things settle a bit but also because I've noticed something weird (probably before me)
<adrien> ok, that first issue is fixed
<adrien> now I need to understand why building the debugger looked for a .so file
<adrien> (maybe a wrong manipulation on my end)
<adrien> yeah, probably forgot a -f Makefile.nt
<adrien> \o/
<wmeyer> so it works now?
<adrien> yup
<wmeyer> ok good
<wmeyer> please submit against the trunk
<adrien> well, "world" finished but that's what was failing; I'm running "opt" now
<adrien> (while I submit)
<wmeyer> should I apply both?
<wmeyer> and they will fix the problem?
<adrien> wmeyer: yes
<adrien> yes
<adrien> I'm not sure why but "make world.opt" didn't trigger the issue while "make world" did
<adrien> the sheer number of configurations is frightening
<adrien> wmeyer: going to bed; good night
* adrien hopes he'll wake up with blue buttons on his screen
<whitequark> blue bottons ?
<whitequark> *buttons
<adrien> inria jenkins for ocaml
<adrien> my patches broke every target
<adrien> some could "self-heal"
<adrien> because you only had to wait for a second build
<adrien> bsd required a patch
<adrien> windows (both mingw and msvc) required patches too
derek_c has quit [Quit: Lost terminal]
<whitequark> so it should work now? \o/
<adrien> no :P
<adrien> well
<adrien> it works again
<adrien> but cross-compilation still requires a few changes
<adrien> which should go fairly smoothly
<adrien> really really tired, good night
<whitequark> night!
<wmeyer> I commited these patches thanks :)
<wmeyer> and good night
<johnelse> can anyone help me out with ctypes? I'm trying to represent an empty struct - i.e. one where none of the internal fields are exposed in the library
<johnelse> sealing the struct without adding any fields means libffi complains - which I guess makes sense since it's not actually empty
<johnelse> I've tried abstract too - but abstract types don't seem to be passable as arguments
<whitequark> just a wild guess (never used ctypes): try void* instead?
<whitequark> or is it passed by value?
<johnelse> yeah, needs to be passed by value
<whitequark> then you have to know how large exactly it is
<whitequark> at least
<whitequark> I guess it would be easiest to fill it with the same members as in C, to avoid dealing with alignment manually, and then hide its internal structure with some other means
<johnelse> problem is I don't know what the members are :) just the size
<whitequark> can ctypes represent packed structs?
<whitequark> if yes, fill it with char[sizeof] and mark as packed
<whitequark> otherwise, uh, pull out the C ABI documentation for your platform, and try to figure out how exactly to fill it to correct size
<johnelse> hmm, that might work
<johnelse> ok, I'll keep poking, thanks for the help!
<whitequark> sure
ulfdoz has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 245 seconds]
ontologiae_ has joined #ocaml
weie has joined #ocaml
weie_ has quit [Ping timeout: 248 seconds]
ben_zen has joined #ocaml
beginner42 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
beginner42 has quit [Client Quit]
boogie has joined #ocaml
ollehar has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml