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/
chambart has quit [Ping timeout: 246 seconds]
<wmeyer``> adrien: I just commited another three patches
wmeyer`` is now known as wmeyer
<pippijn> interesting: runtests.native takes an average of 0.000024s for each perl call, and runtests.byte takes 0.000027s on average
gustav_ is now known as gustav___
<pippijn> => ocaml bytecode is pretty fast :)
<wmeyer> on most architectures it's a direct threaded interpreter BTW :)
<wmeyer> (interestingly, all written in C)
<pippijn> of course in C
<pippijn> ocaml is slooow
<pippijn> ;)
<pippijn> seriously though, written in ocaml, that would be at least an order of magnitude slower :\
<pippijn> wmeyer: new challenge: write an ocaml interpreter in ocaml
<wmeyer> that's an interesting one
<wmeyer> I suppose you could traverse the typed tree
<wmeyer> and use "closure compilation"
<pippijn> oh
<pippijn> interpreting the ast?
<wmeyer> yes
<pippijn> ok, that's also possible
<pippijn> but probably slow
<wmeyer> very slow
<wmeyer> the bytecode interpeter would be just a bit faster
<pippijn> doesn't ocamlopt use c--?
<pippijn> anyway, I was thinking more along the lines of an ocaml bytecode interpreter in ocaml
Drup has quit [Quit: Leaving.]
talzeus has quit [Read error: Connection reset by peer]
<wmeyer> pippijn: I know you were thinking about bytecode interpreter in ocaml
<wmeyer> but you could also interpret any of the IRs
<wmeyer> like lambda or c--
<pippijn> you know
<pippijn> I was under the impression that C-- had optimisers
<wmeyer> it does, but the optimisers are younger than OCaml
<pippijn> ah
<pippijn> so ocaml didn't track the c-- development
<wmeyer> the problem is also that c-- (as other compilers other than gcc and LLVM) is stale
<wmeyer> and noboby bothered
<wmeyer> but you are right, we could pipe the code to QuickC--
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
<pippijn> this is interesting: https://paste.xinu.at/ZaY/ocaml
<wmeyer> however the C-- part is one, the other one are bits&pieces in assembly
<wmeyer> pippijn: nice idea
csakatoku has joined #ocaml
* wmeyer going to bed, night
<pippijn> good night
lopex has quit [Ping timeout: 268 seconds]
f[x] has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest15122
madroach has quit [Ping timeout: 264 seconds]
talzeus has joined #ocaml
madroach has joined #ocaml
Kelet has quit [Ping timeout: 260 seconds]
f[x] has quit [Ping timeout: 260 seconds]
chrisdotcode has joined #ocaml
milosn has quit [Ping timeout: 246 seconds]
milosn has joined #ocaml
f[x] has joined #ocaml
GlenK has joined #ocaml
<GlenK> haha. hi again. so if any jerks like me come on here complaining about opa again, just tell them to look in tools/dependencies/. should fix them right up. maybe.
<pippijn> GlenK: I'll remember this completely useless (to me) piece of information
Guest15122 has quit [Remote host closed the connection]
skchrko has quit [Quit: Leaving]
<GlenK> pippijn: haha, fair enough. seems like I've been bugging this channel for days now though.
<pippijn> GlenK: feel free to bug more :)
<pippijn> it's just that I tend to remember lots of useless tiny pieces of information
yacks has quit [Quit: Leaving]
yacks has joined #ocaml
weie_ has quit [Quit: Leaving...]
lopex has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
lopex has quit [Ping timeout: 245 seconds]
cantstanya has joined #ocaml
gour has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
yacks has quit [Quit: Leaving]
cdidd has quit [Read error: Operation timed out]
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
lopex has joined #ocaml
n06rin has joined #ocaml
ggole has joined #ocaml
ben_zen has joined #ocaml
<wmeyer> pippijn: hello.
<wmeyer> adrien: ping
<companion_cube> heya
<wmeyer> hey companion_cube
<pippijn> hi wmeyer
<adrien> morning
<adrien> wmeyer: pong (but I don't have tons of time right now)
<wmeyer> morning
<wmeyer> I've commited three patches
<wmeyer> I sent you an email
<wmeyer> there is some failure, that I have to fix, if you can help today, that's great
<wmeyer> it seems like we almost have the cross compiler :-)
<adrien> I was expecting likelihood_of_failure(n_tests) = 1/n_tests
<adrien> or something like that
<adrien> probably more like = 1
n06rin has quit [Ping timeout: 256 seconds]
<wmeyer> i am not surprised there are failures, these are complicated patch
<wmeyer> patches
<wmeyer> but maybe this time it's something trivial
<adrien> wmeyer: only bsd fails?
<adrien> (can't remember the ci address)
<wmeyer> I think more than BSD but there is some problem with ci at the moment
<adrien> the failure you sent might be pretty obvious: is "make clean" run on the systems before building?
<wmeyer> might be a general problem, maybe because I haven't commited everything and it was late night
<wmeyer> should be
ttamttam has joined #ocaml
<wmeyer> adrien: actually here is a tail: http://pastebin.com/betma0kQ
ggole has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
f[x] has quit [Ping timeout: 246 seconds]
Simn has joined #ocaml
<adrien> wmeyer: linux slaves are fine but openbsd is not?
<adrien> am I reading right?
<wmeyer> it seems like only openbsd and mingw64 has run
<adrien> ah, ok
<adrien> the @ in rules is fairly annoying: I can't see which rule fails
<pippijn> use omake :)
<pippijn> it hides successful rules by default
boogie has quit [Remote host closed the connection]
<pippijn> actually I also did that with gnu make before
<adrien> ah
<adrien> make -C /config -f Makefile.switch-compiler disable COMPILER=CAMLC VARIANT=BYTE
<adrien> make: *** /config: No such file or directory. Stop.
<adrien> Makefile.nt:305: recipe for target `partialclean' failed
<adrien> make: *** [partialclean] Error 2
<pippijn> printing the command line on failure
<adrien> fuck
<wmeyer> adrien: no worry, this happens :-)
n06rin has joined #ocaml
<adrien> wmeyer: I don't have time to test right now but I'd probably checkout right before the last commit, build everything, then move to the current one, run "make clean"
<wmeyer> please submit a patch against the trunk and we will fix it
<adrien> that should fail
<wmeyer> yes yes
<wmeyer> please submit a patch against the tip
<adrien> now, try with "|| true" at the end of the $(SWITCH_COMPILER) calls in the make clean recipes
<adrien> well, not much time right now
<adrien> going to try
<pippijn> good
<pippijn> me too
<pippijn> let's cry together
* pippijn cries about the meeting he's having in 1.5h
<wmeyer> that's fine, if we can sort it asap, but certainly not in rush then it's good
<pippijn> oh, try
<pippijn> :)
<adrien> building; hope it's done by the time I'm out of the shower :P
<wmeyer> :D
<wmeyer> i doubt
<pippijn> I'm not really happy about this: https://paste.xinu.at/FncI/
<pippijn> and I don't really understand how that happens
boogie has joined #ocaml
Snark has joined #ocaml
boogie has quit [Remote host closed the connection]
cesar_ has joined #ocaml
<wmeyer> adrien: I built that on my machine, and it didn't fail
<wmeyer> so it's a mingw/BSD specific problem?
cesar_ is now known as Guest9459
<adrien> don't think so
<adrien> you built HEAD minus the last commit, then checkout'ed HEAD and tried "make clean"?
<adrien> ah but
<adrien> the file that is missing is a by-product of compilation
<adrien> so moving between revisions will not remove it if you've already built
<adrien> so
<wmeyer> no, I am building trunk now
<adrien> build HEAD~
<adrien> rm config/ocamlcomp
<adrien> checkout HEAD
<adrien> build
Guest9459 has quit [Remote host closed the connection]
<wmeyer> ah I see
<wmeyer> so how to fix that?
<adrien> actually, I hadn't read the error properly:
<adrien> make -C /config -f Makefile.switch-compiler disable COMPILER=CAMLC VARIANT=BYTE
<adrien> /config
<adrien> so, $(ROOTDIR) evals to the emptry strng
<adrien> ah
<adrien> because it will be defined by ./configure
<adrien> which hasn't run yet
<adrien> so, same issue
* adrien going to think about it in the shower
<adrien> alright
<adrien> probably: append || test -z "$(ROOTDIR)"
<adrien> so the command won't fail if ROOTDIR hasn't been defined yet
<adrien> bit hacky
<adrien> but should do it and we can remove it in a few months (4.02) when people have migrated
Kakadu has joined #ocaml
djcoin has joined #ocaml
UncleVasya has joined #ocaml
yezariaely has joined #ocaml
ggole has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
paddymahoney has quit [Ping timeout: 245 seconds]
paddymahoney has joined #ocaml
boogie has joined #ocaml
<wmeyer> adrien: feel free to attach the patch
<wmeyer> I am going to apply it today evening
<wmeyer> anyway
djcoin has quit [Quit: WeeChat 0.4.1]
* wmeyer is going to work
djcoin has joined #ocaml
chrisdotcode has quit [Ping timeout: 248 seconds]
<adrien> wmeyer: testing a bit but it fixes "make clean" at least
<adrien> but win32 has another issue:
<adrien> ../build/mk_shell_and_ocamlbuild_config.sh
<adrien> /bin/sh: -c: line 56: syntax error near unexpected token `('
<adrien> /bin/sh: -c: line 56: `echo IFLEXDIR="\"-I"C:\Program Files (x86)\flexdll"\""; \'
<adrien> and found an additional one one bsd: make -C /home/ci/workspace/trunk-openbsd-32/config -f Makefile.switch-compiler disable COMPILER=CAMLC VARIANT=BYTE
<adrien> make: unknown option -- C
<adrien> ...
<adrien> right, since you'd only commit the change this evening, I'm going to wait until this evening to make the patch(es) because I don't have that much time right now (I couldn't do everything cleanly)
<adrien> the only difficult one will be the win32 one above
boogie has quit [Ping timeout: 264 seconds]
ggole has quit [Read error: Connection reset by peer]
f[x] has joined #ocaml
ggole has joined #ocaml
ontologiae has joined #ocaml
n06rin has quit [Ping timeout: 264 seconds]
ggole has quit [Ping timeout: 264 seconds]
ttamttam has quit [Ping timeout: 260 seconds]
boogie has joined #ocaml
cantstanya has quit [Ping timeout: 240 seconds]
boogie has quit [Ping timeout: 252 seconds]
mika1 has joined #ocaml
cago has joined #ocaml
ttamttam has joined #ocaml
Simn is now known as Simn|gone
Neros has quit [Ping timeout: 248 seconds]
ggole has joined #ocaml
ollehar has joined #ocaml
chambart has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
troydm has quit [Ping timeout: 264 seconds]
<CissWit> hi, im still trying to figure out how to use channels and Unix.select together properly. Here is what im doing: http://pastebin.com/2wqY1TZm that sadly doesn't work as id except.
<CissWit> note: the lexbuf was initialized with Lexing.from_channel, using the channel from Unix.in_channel_of_descr
thomasga has joined #ocaml
<mrvn> CissWit: select tells you at least one byte is ready for read or the socket was closed. It doesn't say a whole message has arrived.
Kakadu has quit [Remote host closed the connection]
<CissWit> my problem is that channel buffers too much byte which makes my second call to select hang (as there's no byte to read anymore in the file_descr) so i can either read myself from the file_descr and loose the easiness of channels, or find a "select like" for channels
Kakadu has joined #ocaml
<mrvn> CissWit: So I would expect that to block (with blocking IO) or fail (with non-blocking IO).
<mrvn> CissWit: that too. you need to keep parsing till you hit EAGAIN
<def-lkb> AFAICT, No way you can get channel buffering works well with Unix, so just write you lexbuf from a string and refill function
zpe has quit [Remote host closed the connection]
<adrien_oww> don't mix buffered and unbuffered I/O
<adrien_oww> never do that :)
<mrvn> CissWit: Can you get at the length of the next message somehow?
<CissWit> i know the message ends with a "\n" which makes the manual retrieve of a message easy. I was just wondering if there was a way to manage multiple connections properly (that is, using a select like function) and still being able to use channels which helps a lot too
<adrien_oww> don't think so
<CissWit> i don't want to make loops of non-blocking reads
<adrien_oww> have you looked at lwt?
<mrvn> CissWit: as def-lkb saikd: write your lexbuf from a string
n06rin has joined #ocaml
<mrvn> CissWit: you do select, read all the data that is there and append i to whatever is buffered. When you find a \n you create a substring and parse that.
<CissWit> adrien_oww: no, in my understanding it was a threading library and i was trying to find a way to do this without depending on threads
<adrien_oww> well, for I/O it can do a lot
<CissWit> mrvn: yes, i guess that's what im going to do.
<mrvn> CissWit: beware that you can receive multiple messages in one go. So if you find one \n you have to keep looking for more.
<mrvn> It's too bad there isn't a continuation based version of the Lexing module.
<CissWit> or a select implementation on channels that internally checks if there's still byte to read in the channel before calling the unix syscall.
<mrvn> CissWit: that wouldn't work for a mix of channels and fds.
<mrvn> CissWit: but a function to check how much a channel has buffered or just if it has data buffered would do.
chambart has quit [Ping timeout: 256 seconds]
<CissWit> well i don't really want to mix channels and fds, if i could i'd only use channels
ontologiae_ has joined #ocaml
<mrvn> CissWit: you could use batteries
boogie has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
boogie has quit [Ping timeout: 260 seconds]
Simn|gone is now known as Simn
troydm has joined #ocaml
j0sh has quit [Ping timeout: 264 seconds]
j0sh has joined #ocaml
zpe has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
chambart has joined #ocaml
zpe has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
cantstanya has joined #ocaml
boogie has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
beckerb has joined #ocaml
ben_zen has quit [Ping timeout: 256 seconds]
f[x] has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
ollehar1 has quit [Ping timeout: 248 seconds]
malo has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
Drup has joined #ocaml
dsheets has joined #ocaml
Drup has quit [Ping timeout: 256 seconds]
ggole_ has joined #ocaml
weie has joined #ocaml
ggole has quit [Ping timeout: 264 seconds]
rwmjones has quit [Ping timeout: 248 seconds]
talzeus has quit [Remote host closed the connection]
gnuvince has quit [Ping timeout: 260 seconds]
beckerb has quit [Ping timeout: 245 seconds]
ttamttam has quit [Quit: ttamttam]
rwmjones has joined #ocaml
n06rin has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
n06rin has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
Neros has joined #ocaml
q66 has joined #ocaml
ontologiae_ has quit [Ping timeout: 260 seconds]
Neros has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
* gour installed opam-1.1.0b...so far, it works nicely under fish shell :-)
justdit has joined #ocaml
ggole_ has quit [Read error: Connection reset by peer]
<pippijn> :)
<gour> all in all, nice progress of opam
Drup has joined #ocaml
beckerb has joined #ocaml
ben_zen has joined #ocaml
_andre has joined #ocaml
ggole_ has joined #ocaml
darkf has quit [Quit: Leaving]
malo has quit [Ping timeout: 256 seconds]
ggole_ is now known as ggole
<gour> :-)
<Drup> exponential would be weird, ocaml it's not such a big community :D
<Drup> is not*
boogie has joined #ocaml
ggole has quit [Ping timeout: 256 seconds]
boogie has quit [Ping timeout: 245 seconds]
Neros has quit [Ping timeout: 245 seconds]
<mrvn> Drup: it's a question of how much it is growing.
Neros has joined #ocaml
n06rin has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
ollehar has joined #ocaml
ontologiae_ has joined #ocaml
ben_zen has quit [Ping timeout: 248 seconds]
<ggole> You know that thing where you erase an element from a dynamic array by moving the element at the end into its spot? Is there a nice name for that?
<companion_cube> no idea actually, I don't think I read this anywhere
<mrvn> to trivial to have a name
<ggole> At the moment I have, cough, unordered_remove_one_if
<flux> hardly worse than swap_element_tail_remove I thought of :-)
breakds has joined #ocaml
<companion_cube> unordered_remove is nice
<flux> but it appears to be that it removes first that matches condition
<flux> (so it's a good name if it does that ;))
<ggole> Yeah
<ggole> val unordered_remove_one_if: ('a -> bool) -> 'a t -> unit
<flux> if only compilers would infer the implementation just from names ;-)
<ggole> val dwim: 'a -> 'b
<companion_cube> oh I see
<ggole> If you remove all of them there's no need for the unordered_, since there is a good fast algorithm for that.
<ggole> (That maintains order.)
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
<Drup> flux: do you know the ruby library that let you insert some specific words into method names and stil get the correct function ? :D
<mrvn> ggole: unordered_filter_one
Neros has quit [Ping timeout: 245 seconds]
<ggole> Hmm, filter
<ggole> Doesn't that keep what the predicate returns true for though?
<ggole> Yeah, not quite right. Good suggestion though.
<mrvn> Sometimes I wish one could hint the compiler to produce optimized versions of a function for some given special inputs and outputs. Like val : filter : 'a t -> ('a -> bool) -> ('a t * 'a t). Add a hint for the compiler to provide optimized versions for let (x, _) = filter ... and let (_, x) = filter ....
<companion_cube> mrvn: meta-ocaml? :)
<flux> drup, happily, no ;-)
<flux> although I know it, and python, and probably some other languages, have a way to hook unknown method calls, in a dynamic fashion
<ggole> Like compiler-macros, but data-flow driven?
hto has quit [Ping timeout: 245 seconds]
ggole has quit [Ping timeout: 260 seconds]
<whitequark> hrm, how do you debug segfaults in ocaml when the stack is smashed?
<whitequark> I'm somewhat at a loss
<mrvn> whitequark: that isn't in ocaml, it's your C code.
<mrvn> try valgrind or adding random printfs to narrow it down.
<mrvn> on that note: Does ocamlopt have an option to add stack guards around function calls?
boogie has joined #ocaml
<whitequark> mrvn: well yes, of course it isn't in ocaml
hto has joined #ocaml
<whitequark> mrvn: actually it *was* in ocaml!
<whitequark> I had an infinite recursion. I guess ocaml would catch the stack overflow, but the C code of course did not
boogie has quit [Ping timeout: 248 seconds]
ggole has joined #ocaml
tobiasBora has joined #ocaml
mcclurmc has joined #ocaml
skchrko has joined #ocaml
<chris2> will keeping track of installed files ever be in scope of opam?
justdit has quit [Quit: Lost terminal]
Neros has joined #ocaml
dnm_ has joined #ocaml
dnm has quit [Ping timeout: 264 seconds]
bogen has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
<bogen> hi. Can the ocaml runtime be compied for an embedded system (not one with with linux, but a system targetted with arm-none-eabi-gcc) ?
<bogen> s/be compied/be compiled/
<whitequark> not directly.
<whitequark> but if you want to spend some time porting the runtime, I expect it to be not very hard.
<adrien_oww> you mean you have no OS?
<bogen> adrien_oww: that is correct, an arm target that is not capable of running linux
<adrien_oww> bogen: you can look at "ocapic"
<adrien_oww> it's ocaml on pic
<whitequark> adrien_oww: isn't that a reimplementation of bytecode interpreter?
<adrien_oww> obviously, it's quite special
<adrien_oww> oh and open mirage!
<adrien_oww> it's ocaml on bare metal
<bogen> ocaml on bare metal arm is what I'd be most interested in
Neros has quit [Remote host closed the connection]
<adrien_oww> well, open mirage but I don't know the specifics
<adrien_oww> but its doc is fairly good
<adrien_oww> and if you have more specific questions, avsm should be able to answer
<bogen> ok, I'm looking at ocapic and open mirage now
<bacam> bogen: Out of curiosity, which processor are you targetting?
<bogen> STM32F407ZGT6 Cortex-M4 210DMIPS, 1MB Flash, 196KB RAM
<bacam> Hmm... I'm not sure if the ocaml native code compiler will produce suitable assembler for that.
<adrien_oww> why not?
<bacam> It's one of the microcontroller series, they've got a limited instruction set.
<whitequark> that would be thumb-2
<bogen> I don't require native code, for my applications I could use a bytecode interpreter
<whitequark> then you're fine. note however that you're low on RAM.
<bacam> That'll probably be OK.
<bacam> There's probably no hardware floating point, though.
<whitequark> cortex-m4 is a DSP core, it has FPU
<bogen> yes
<bogen> it does
<bacam> I don't think that's what the DSP does.
<adrien_oww> thought about the RAM too but ocapic has like 24KB
<adrien_oww> fits on 24KB*
<adrien_oww> with a different GC though
zpe_ has quit [Read error: No route to host]
zpe has joined #ocaml
<bacam> whitequark: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0439d/index.html
<bacam> Go to programmer's model, instruction set summary
<adrien_oww> you'll probably have to reduce space_overhead in the GC quite a lot (easy way to save lots of memory)
<bogen> 196K to me is quite a bit of RAM. However, the applications I plan to develop are not all that big/complex
<adrien_oww> as for the specific, I don't know what will work with ocaml but if you don't find an answer, ask on the ML
<whitequark> bacam: I know that DSP != has FPU, however it's generally strange to have one without another.
<bacam> Ah, that particular core *also* has a single precision FPU
<whitequark> yep
malo has joined #ocaml
<bogen> ok, I will ask on the ML. I'm just looking at feasibility right now. What I'm looking to end up with is a bytecode interpreter running coopertatively ocaml app, that I can feed in more bytecode at runtime (start a new task, replace an existing task, or interpret a bytecode sequence in an existing task.) The framework for this on the embedded target could be in C (not assembly).
<adrien_oww> sounds pretty close to how ocapic is used
boogie has joined #ocaml
yezariaely has quit [Quit: Leaving.]
boogie has quit [Ping timeout: 245 seconds]
tizoc has quit [Ping timeout: 245 seconds]
tizoc has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
chrisdotcode has joined #ocaml
tane has joined #ocaml
<bogen> Ok, I asked on the ML.
<adrien_oww> :)
reynir has joined #ocaml
Kakadu has quit []
chrisdotcode has quit [Remote host closed the connection]
Drup has quit [Read error: Operation timed out]
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
<bogen> adrien_oww: would the process to "reduce space_overhead" be able to done from the C byte code interpreter (which would also be a round robin tasker if I have to write/port one) when all tasks are sleeping (waiting on some event, be it I/O, a message from another task, timeout, etc).
boogie has joined #ocaml
<bogen> (or every so many passes of the round robin, or at some time interval
Drup has joined #ocaml
q66 has quit [Quit: Leaving]
<adrien_oww> bogen: well, it's a GC param; it trades memory for cpu
<adrien_oww> well, you'll have a look at the Gc module but I thought it was worth pointing it out
<adrien_oww> it's for later but it shoudl be handy hten
<adrien_oww> then*
boogie has quit [Ping timeout: 252 seconds]
q66 has joined #ocaml
tobiasBora has quit [Ping timeout: 246 seconds]
morolin has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
ben_zen has joined #ocaml
<reynir> I am looking at json libraries. Any tips / recommendations?
bogen has left #ocaml []
<rks`> reynir: yojson.
<reynir> Thank you!
<pippijn> yes
<pippijn> reynir: yojson is *very* fast
<pippijn> and works well
<pippijn> and I made camlp4 quotations for it :)
ollehar has joined #ocaml
<pippijn> reynir: https://github.com/pippijn/pa_json *shameless self-advertisement*
chambart has joined #ocaml
<reynir> Man I'm really rusty with ocaml
<Drup> there is also the deriving stuff which work with yojson, iirc
<pippijn> atdgen?
<pippijn> oh yeah, there is deriving (Json)
<Drup> yes
<pippijn> for most applications, I would recommend atdgen, though
<pippijn> it's more flexible and much faster
<Drup> atdgen is probably far more heavy to use
<pippijn> yes
<pippijn> but also much more flexible and much faster
<pippijn> and it uses yojson's parser primitives
<pippijn> but not the data structure
Neros has joined #ocaml
skchrko has quit [Quit: Leaving]
ben_zen is now known as marius
marius is now known as Guest49598
Guest49598 is now known as ben_zen
Neros_ has joined #ocaml
q66 has quit [Quit: Leaving]
Neros has quit [Ping timeout: 245 seconds]
gereedy has quit [Ping timeout: 240 seconds]
q66 has joined #ocaml
gereedy has joined #ocaml
shinnya has joined #ocaml
q66 has quit [Client Quit]
q66 has joined #ocaml
ontologiae_ has quit [Ping timeout: 252 seconds]
boogie has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
cdidd has quit [Remote host closed the connection]
q66 has quit [Quit: Leaving]
q66 has joined #ocaml
ygrek has joined #ocaml
talzeus has joined #ocaml
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
Guest60186 has joined #ocaml
mreca has joined #ocaml
zpe_ has quit [Remote host closed the connection]
Neros_ has quit [Ping timeout: 246 seconds]
pango has quit [Quit: Client exiting]
beckerb has quit [Quit: Konversation terminated!]
boogie has joined #ocaml
q66 has quit [Quit: Leaving]
* chris2 learns about 42l and 42L.
yezariaely has joined #ocaml
q66 has joined #ocaml
pango has joined #ocaml
tobiasBora has joined #ocaml
djcoin has quit [Quit: WeeChat 0.4.1]
thomasga has quit [Quit: Leaving.]
cdidd has joined #ocaml
Neros has joined #ocaml
dsheets has quit [Read error: Operation timed out]
<nickmeharry> Is there any way to provide default behavior for a virtual method?
<nickmeharry> I'm trying to present a set of hooks for a subclass to override, but not all need to be overridden.
yacks has joined #ocaml
zpe has joined #ocaml
tobiasBora has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 248 seconds]
ygrek has quit [Ping timeout: 245 seconds]
Drup has quit [Read error: Operation timed out]
<adrien> wmeyer: \o/
Drup has joined #ocaml
tobiasBora has joined #ocaml
<technomancy> I'm having trouble with Sys.signal; I'm able to refer to it in utop but not in my own codebase (I get "Unbound Value Sys.signal). Could it be from opening Core.Std or Async.Std?
<ggole> Do you open something in .ocamlinit?
<ggole> Never mind, I see it and I don't have either installed.
<technomancy> I suspect Core is messing with scope but don't know how to get to the original non-core Sys
tobiasBora has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
<ggole> Hmm
clog has quit [^C]
clog has joined #ocaml
<adrien> wmeyer: around?
<def-lkb> technomancy: Caml.Sys.signal
<def-lkb> it's just that standard Sys is shadowed by Core one after open
dsheets has joined #ocaml
<technomancy> def-lkb: perfect; thanks
<reynir> What do you guys use for http/https requests?
<adrien> send/receive?
chambart has quit [Ping timeout: 246 seconds]
<technomancy> one more question =) I'm doing FFI with ctypes, and libreadline says you need to set the rl_completion_entry_function variable to a function pointer. I don't see documentation on how to do that.
<adrien> cthuluh: around?
squagel has joined #ocaml
<cthuluh> adrien: yup
<adrien> cthuluh: would you mind testing a build of ocaml for me? I need a make which doesn't have -C :) (I'm going to try with my slackware's pmake which apparently doesn't understand it either)
<cthuluh> hmm... I fail to see the point
<cthuluh> just never use -C and be done with it? :)
<adrien> I broke trunk on openbsd by using "make -C $somedir" and iirc you're on openbsd
<adrien> yeah but I need to test the fix
<adrien> I've already managed to piss some people off :D
<adrien> (I broke three configurations in a row, in three distinct ways)
<cthuluh> ok, np
<adrien> (let's say that ocaml doesn't build anywhere currently ;p )
malo has quit [Quit: Leaving]
<squagel> when wrapping a C library do you need to do anything special if the lib sometimes reallocs?
<squagel> Given that I want the ocaml gc to manage the memory
<adrien> cthuluh: hmm, btw, "pmake all" fails on my machine and I fail to understand why
<adrien> cthuluh: xz compression is fine?
<ggole> If the lib reallocs, the GC does not manage that memory.
<cthuluh> adrien: I was assuming that you'd give me a patch ;)
<cthuluh> -SWITCH_COMPILER=make -C $(ROOTDIR)/config -f Makefile.switch-compiler
<cthuluh> +SWITCH_COMPILER=cd $(ROOTDIR)/config && $(MAKE) -f Makefile.switch-compiler
<cthuluh> ?
<adrien> actually there are a few more changes; the archive is at http://notk.org/~adrien/ocaml-adrien-a-tout-KC.tar.xz but I can also push patches
<cthuluh> adrien: wrt. xz, it uses more memory at decompression time, but I have no idea whether that is a problem on machines that can run OCaml
<adrien> and
<adrien> with the compression setting I've used, extraction would have used 64MB of memory
<adrien> cthuluh: ah, "pmake all" works fine; the issue was elsewhere
<adrien> (hmmm, I think so)
<cthuluh> is world.opt enough?
<adrien> yup
pango has quit [Remote host closed the connection]
<pippijn> squagel: what does it realloc?
pango has joined #ocaml
rwmjones has quit [Ping timeout: 248 seconds]
<squagel> pippijn its a bitset data structure that grows on demand
<pippijn> squagel: ok, so you will give ocaml a pointer to that
<pippijn> if you want, you can let the ocaml gc manage that pointer
<ggole> That requires changing the code, surely?
<squagel> ahh. how do I do that?
<squagel> changing the guts of the c lib?
<ggole> If it's your lib, you can change the allocations so that OCaml knows about them.
<ggole> Yeah.
<pippijn> no
<pippijn> with a custom block containing the pointer
<ggole> That would risk a leak.
<ggole> Unless there's something I'm missing.
<pippijn> how so?
<squagel> its not my lib. if possible I'd prefer to use it as is
<ggole> In the usual way? The custom block goes away, the pointer isn't freed?
<pippijn> why isn't the pointer freed?
<pippijn> that's the point of the custom block
<pippijn> to have a custom finaliser that frees the pointer
gour has quit [Disconnected by services]
<ggole> Oh, finalisers -_-
<ggole> Ugh
gour_ has joined #ocaml
<ggole> Yeah, I guess so
cdidd has quit [Read error: Connection reset by peer]
<pippijn> why ugh?
<ggole> It's not as problematic for memory as it is for fds and other such resources
<ggole> Because finalisers might never run
<pippijn> that's true
<pippijn> if the bitset gets large, it can become problematic
<ggole> I'd suggest writing one in OCaml, but there might be a bit of a performance difference.
<ggole> Depending on what low-level shenanigans this library gets up to.
darkf has joined #ocaml
squagel has quit [Remote host closed the connection]
tobiasBora has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
* ggole hopes he didn't put squagel off
<adrien> cthuluh: any news? (sorry to ask again so quickly)
rwmjones has joined #ocaml
guest631 has joined #ocaml
gour_ is now known as gour
tobiasBora has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
UncleVasya has quit [Read error: Connection reset by peer]
tobiasBora has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
<cthuluh> adrien: world.opt ended successfuly
yezariaely has quit [Quit: Leaving.]
gour has quit [Quit: WeeChat 0.4.1]
<adrien> cthuluh: thanks!
tani has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
Simn has quit [Quit: Leaving]
guest631 is now known as squagel
tane has quit [Ping timeout: 260 seconds]
<squagel> ggole you didn't. I'm on a lousy mobile irc client that died mysteriously
chambart has joined #ocaml
q66 has quit [Quit: Leaving]
<ggole> \o/
<ggole> Aargh, excessively late night hacking
ggole has quit []
q66 has joined #ocaml
chambart has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
guest631 has joined #ocaml
squagel has quit [Ping timeout: 260 seconds]
Drup has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
<Anarchos> hi everybody
<GlenK> hi
<Anarchos> whops 4.01.0 is out !!!
Drup has joined #ocaml
smondet has quit [Remote host closed the connection]
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
saml has quit [Quit: Leaving]
chambart has joined #ocaml
<guest631> ppijn is caml_alloc_custom what I want?
guest631 is now known as squagel
ollehar has joined #ocaml
q66 has quit [Quit: Leaving]
q66 has joined #ocaml
<Anarchos> squagel what for ? It allocates a custom block
chambart has quit [Quit: Quitte]
arquebus has joined #ocaml
arquebus has quit [Quit: Konversation terminated!]
<squagel> Anarchos I'm attempting to wrap s c lib that calls realloc as needed
<squagel> wrap A c lib rather
<Anarchos> custom blocks allow you to overwrite finalization functions called when destroying the block
<Anarchos> and other things too. Did you read its description in the manual ?
Anarchos has quit [Quit: Vision[0.9.7-H-280704]: i've been blurred!]
chrisdotcode has joined #ocaml
ollehar has quit [Remote host closed the connection]
derek_c has joined #ocaml
<squagel> Anarchos: I've not read thean page yet. It was recommended to me in this channel hours ago
<squagel> I have no preference. I just want to use this (compressed bitset) lib and have cooperate with Gc
Xom has joined #ocaml
guest631 has joined #ocaml
squagel has quit [Ping timeout: 264 seconds]
Xom_ has joined #ocaml
Xom has quit [Ping timeout: 260 seconds]
Xom_ is now known as Xom
ollehar has joined #ocaml
guest6311 has joined #ocaml
guest631 has quit [Ping timeout: 260 seconds]
ben_zen has quit [Quit: dinner]
tani has quit [Quit: Verlassend]