adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<smondet> Algebr: I ended up with some ugly hacks to make sure Lwt_daemon is really the first thing called, not pretty.
<Algebr> this is ridiculous, could you not find the root cause of problem.
<Algebr> should have an lwt hackathon, like the compiler hackathons
<smondet> also, it's interesting how a lot of feedback was "don't daemonize" :)
<smondet> the root of the problem must some global variables used by Lwt I guess, maybe even in C code
<Algebr> So there's an idea of how to fix it but no one is taking up the task i take it
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
badon has joined #ocaml
ollehar has quit [Quit: ollehar]
yunxing has quit [Ping timeout: 250 seconds]
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
thegameg has quit [Ping timeout: 260 seconds]
thegameg has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
manizzle has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
jeffmo_ has quit [Quit: jeffmo_]
tennix has quit [Ping timeout: 248 seconds]
newbie has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
Algebr` has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
struk|desk|away is now known as struk|desk
Emmanuel`_ has joined #ocaml
yunxing has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
ygrek_ has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
tennix has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
sh0t has quit [Ping timeout: 268 seconds]
struk|desk is now known as struk|desk|away
therac25 has quit [Quit: therac25]
struk|desk|away is now known as struk|desk
teknozulu has joined #ocaml
<teknozulu> I have a record type, http://pastebin.com/1kg4Uy6b . The compiler sees the variant on the bottom as "([> `Active | `New of 'input list Async.Std.Deferred.t ] as 'a)
<teknozulu> ", and tells me 'a is unbound. What's with this "as 'a" business?
<def`> your bundler field has a polymorphic type: the variant is open, so it can be instantiated to many different types
<def`> you have to explicitly bind the corresponding type variable
jeffmo has joined #ocaml
<def`> put the as '@
<def`> as 'a
<def`> and either bind 'a in the declaration of the type
<def`> type ('a, 'input, 'output) t = ...
<def`> or in the method:
<def`> ; bundler : 'a . int -> ...
<def`> last option: make it monomorphic, remove the > in the variant
<teknozulu> I just wrote out a parametrized sum type for it because I precisely want it to be instantiated to the same 'input
<teknozulu> thanks
<def`> That's unrelated
<def`> using 'input is fine, it is bound earlier soninside the record it is monomorphic
<def`> the problem is thebopen variant.
<teknozulu> Oh I see now
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
yunxing has quit [Read error: Connection reset by peer]
Emmanuel`_ has joined #ocaml
seangrove has quit [Ping timeout: 268 seconds]
copy` has quit [Quit: Connection closed for inactivity]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
aantron has quit [Remote host closed the connection]
struk|desk has quit [Read error: Connection reset by peer]
nichola__ has joined #ocaml
nicholasf has quit [Ping timeout: 252 seconds]
ygrek_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
struk|desk has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
antkong has quit [Quit: antkong]
MercurialAlchemi has joined #ocaml
seangrove has joined #ocaml
Algebr` has quit [Remote host closed the connection]
johnf_ has joined #ocaml
johnf has quit [Ping timeout: 260 seconds]
nichola__ has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
nicholasf has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
cdidd has quit [Remote host closed the connection]
slicefd has joined #ocaml
struk|desk is now known as struk|desk|away
nicholasf has joined #ocaml
mettekou has joined #ocaml
mettekou has quit [Client Quit]
mettekou has joined #ocaml
ggole has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
nicholasf has quit [Ping timeout: 246 seconds]
nicholasf has joined #ocaml
AlexRussia has quit [Ping timeout: 260 seconds]
nicholasf has quit [Remote host closed the connection]
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nicholasf has joined #ocaml
orbifx has quit [Ping timeout: 244 seconds]
therac25 has joined #ocaml
nicholasf has quit [Ping timeout: 264 seconds]
toolslive has quit [Ping timeout: 246 seconds]
kushal has joined #ocaml
butts_butts has joined #ocaml
butts_butts_ has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
toolslive has joined #ocaml
butts_butts_ has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
nicholasf has quit [Client Quit]
therac25 has quit [Quit: therac25]
therac25 has joined #ocaml
silver has joined #ocaml
larhat has joined #ocaml
larhat has quit [Remote host closed the connection]
sgnb has joined #ocaml
Haudegen has joined #ocaml
therac25 has quit [Quit: therac25]
therac25 has joined #ocaml
ygrek_ has quit [Ping timeout: 244 seconds]
mettekou has joined #ocaml
ontologiae has joined #ocaml
malc_ has joined #ocaml
Simn has joined #ocaml
cdidd has joined #ocaml
therac25 has quit [Quit: therac25]
therac25 has joined #ocaml
SIGILL has quit [Quit: update]
Vintila has joined #ocaml
tane has joined #ocaml
SIGILL has joined #ocaml
therac25 has quit [Quit: therac25]
therac25 has joined #ocaml
sepp2k has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kakadu has joined #ocaml
therac25 has quit [Quit: therac25]
jwatzman|work has joined #ocaml
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
orbifx has joined #ocaml
ibor has joined #ocaml
pierpa has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
darkf has quit [Quit: Leaving]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
mau has joined #ocaml
nicholasf has quit [Remote host closed the connection]
<mau> Hi, is this the right place to ask about ctypes? Specifically, the cstub part
<mrvn> you can ask
<mau> I'm not really sure how I should phrase this, I'll try my best
<mau> I was playing around with Tcl/Tk
<mau> I tried to get Tk to work, so I produce the C part of the Tk bindings using Cstubs.Types.write_c
<mau> If I did not add the Tk header (#include <tk.h>), it will compile, but it gives me warnings about implicit declaration of functions due to not adding the header
<mau> But if I add the tk header,
copy` has joined #ocaml
<mau> It asked me to include the X11 headers, and when I added that one, I got an error, saying that I had an error, "expected identifier Bool" from ctypes_primitives.h, and then it also points out that the X11 header defined Bool as int
<mau> So, when I checked the file ctypes_primitives.h, I found out that it was defined as an enum
<mau> And now, I'm stuck.
_andre has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
kushal has quit [Quit: Leaving]
ibor has quit [Ping timeout: 244 seconds]
mrvn has quit [Ping timeout: 260 seconds]
mrvn has joined #ocaml
slicefd has quit [Quit: WeeChat 1.4]
<Drup> mau: I think you should report that on the bug tracker
mrvn has quit [Ping timeout: 244 seconds]
mrvn has joined #ocaml
<mau> Ah damn :(
<mau> Alright, I'll report that. Thanks.
mrvn has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 248 seconds]
mrvn has joined #ocaml
mrvn has quit [Ping timeout: 248 seconds]
djellemah has quit [Remote host closed the connection]
mrvn has joined #ocaml
mrvn has quit [Ping timeout: 260 seconds]
mrvn has joined #ocaml
mettekou has joined #ocaml
averell has quit [Ping timeout: 268 seconds]
<sgronblo> I was trying to define a parser type like this: type 'a parser = Parser of (string -> ('a option, string))
<sgronblo> But I am getting a syntax error
Haudegen has quit [Ping timeout: 250 seconds]
mrvn has quit [Ping timeout: 276 seconds]
mrvn has joined #ocaml
djellemah_ has joined #ocaml
<ggole> sgronblo: * for tuples, not ,
<sgronblo> ggole: aaargh, thanks
tobast has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ontologiae has joined #ocaml
djellemah_ has quit [Quit: Leaving]
djellemah has joined #ocaml
averell has joined #ocaml
noddy has joined #ocaml
Haudegen has joined #ocaml
newbie has joined #ocaml
sh0t has joined #ocaml
emias has quit [Ping timeout: 244 seconds]
emias has joined #ocaml
tennix has quit [Ping timeout: 248 seconds]
rossberg has quit [Ping timeout: 264 seconds]
Vintila has quit [Ping timeout: 252 seconds]
kushal has joined #ocaml
AlexRussia has joined #ocaml
rossberg has joined #ocaml
djellemah has quit [Ping timeout: 244 seconds]
<companion_cube> sgronblo: this sounds incredibly inefficient :)
<flux> companion_cube, but elegant :(
<companion_cube> you can do exactly the same with bigarrays
manizzle has joined #ocaml
<companion_cube> and it would be far less inefficient
<companion_cube> or by replacing string by `string * int`
aantron has joined #ocaml
th5 has joined #ocaml
jeffmo has joined #ocaml
tennix has joined #ocaml
<ggole> Yeah. It could work in Haskell because strings are lazy lists of chars, but in OCaml it doesn't really fly.
<Drup> yes and no. those strings in haskell are horribly inefficient too, and most people use Text or Bytestring ..
noddy has quit [Ping timeout: 260 seconds]
<ggole> Not as inefficient as parsing a 10MB file by reading the first char and then allocating a 10MB - 1 string to represent the rest of the file, etc.
<companion_cube> sure
<ggole> But yes, there are better ways.
<companion_cube> bigstrings are more efficient for this
<Maelan> if i understood correctly, Nat is supposed to be internal and we should use Num instead?
<Maelan> is the overhead neglectible?
BitPuffin has joined #ocaml
<Drup> You should use non of them and use zarith
struk|desk|away is now known as struk|desk
<Drup> none*
<Maelan> between Nat and Num there is also Big_int but since it has no nice operators my guess is that Num is the preferred way again
<Maelan> but Big_int has sqrt…
<ggole> Big_int is documented and meant to be used, but you should just use zarith
<Maelan> Big_int.add_int_big_int
<Maelan> Drup, ggole, what are the advantages of zarith compared to Big_int?
<pierpa> zarith is a wrapper around GMP
<Maelan> performance? i see it is based on GMP. is Big_int only a naive implementation?
<Drup> It's not "naive", but it's not fast
<Drup> also, zarith is nicer to use
<Drup> (nice operators and all that)
<Drup> (zarith is not simply a wrapper around GMP, it also has a dual representation. It uses normal integers for small ints and gmp integers for big ints)
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<Maelan> oops, opam-installing zarith apparently invites many packages to recompile
<Maelan> hm nevermind, there were to be recompiled anyway (probably ocamlbuild being externalized)
freehck has quit [Remote host closed the connection]
jeffmo has quit [Quit: jeffmo]
struk|desk is now known as struk|desk|away
MercurialAlchemi has quit [Remote host closed the connection]
struk|desk|away is now known as struk|desk
<seangrove> What's %! in Printf.printf "%s\n%!"?
<ggole> flush. Do you have a copy of or a link to the manual?
<seangrove> %! isn't very googleable, so just thought I'd ask here
<ggole> http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html has a nice explanation of all the printf junk
ygrek_ has joined #ocaml
<flux> l
MercurialAlchemi has joined #ocaml
noddy has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
tane has quit [Quit: Verlassend]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
d0nn1e has joined #ocaml
slash^ has joined #ocaml
shinnya has joined #ocaml
Kakadu has quit [Quit: Page closed]
Kakadu has joined #ocaml
yunxing has joined #ocaml
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djellemah has joined #ocaml
johnf has joined #ocaml
johnf_ has quit [Ping timeout: 240 seconds]
johnf_ has joined #ocaml
johnf has quit [Ping timeout: 240 seconds]
<Algebr> lwt daemonize has caused great great pain to me.
<seangrove> Algebr: Oh? Can you expand?
mettekou has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
<Algebr> causing all kinds of inconsistent crazy behavior, smondet talked about his pains yesterday too and has many github issues about it
<Algebr> will verify my theory today
<flux> just use systemd for making daemons!
<Algebr> yes, I might end up doing that
<Algebr> systemd is hassle and now have to learn more crap, but I guess more beneficial/correct in the long run
<flux> no you didn't play this right, you should have been offended :(
<Algebr> lol
orbifx has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 276 seconds]
<flux> cool, ocaml-systemd -- OCaml module for native access to the systemd facilities
ygrek_ has quit [Ping timeout: 244 seconds]
<mrvn> Algebr: now rewrite systemd in ocaml please so it is also correct code.
Kakadu has quit [*.net *.split]
<flux> an init system with proofs to go with it would be pretty awesome
<flux> sadly such an init would probably be nowhere as featureful as systemd
<companion_cube> s/sadly/happily/
<flux> well, if it were just as featureful as sysvinit, we would still remain in the world of sleep-based hacks (just grep -c sleep /etc/init.d/*) that work some time, some time don't ;)
<companion_cube> meh, tracking dependencies shouldn't be that hard
<companion_cube> it's all graphs ;)
ggole has quit []
<Algebr> interesting, ocaml-systemd looks good
sepp2k has quit [Quit: Leaving.]
<Drup> I'm having a module problem
<Drup> I have this module which contains only type, and this functor which returns a module that uses those types
<Drup> and I would like to add, inside the first module (let's call him T) a type which would depend on the functor
<Drup> huum
<mrvn> so recursive modules
<Drup> You see
<Drup> this is exactly for this kind of occasion that I did https://github.com/Drup/No.
sgnb has quit [Remote host closed the connection]
<Drup> I really should host an instance
<mrvn> 404
<Drup> add the dot
<flux> you should really just have the both, as it's semistandard to drop . from urls so they work at the end of sentences ;)
<Drup> I could rename it in github, and both would redirect
<Drup> let's do that
<flux> source: I wrote an url grabber for irc and it does this (as does gnome-terminal)
seangrove has quit [Ping timeout: 240 seconds]
<Drup> done !
sh0t has quit [Ping timeout: 248 seconds]
<flux> I'm a bit disappointed, so many source files but it doesn't seem to generate a kernel that serves only No :/
<Drup> flux: that's exactly what it does
<flux> hmm, indeed, but no mention of mirage in _tags
<Drup> no need, mirage does it
<flux> right. haven't looked at mirage-based kernels before and din't know what to loko :). but thanks, now I'm satisfied!
<Drup> flux: even better, it's multilingual :3
mettekou has quit [Read error: Connection reset by peer]
ygrek_ has joined #ocaml
ibor has joined #ocaml
<toolslive> @Algebr : I also suffered from lwt daemonization. We first had the idea to do daemonization as late as possible, but you need to do it before you do anything else that's lwt related.
<Algebr> yep, I'm moving it way back now. need to write in all bold on lwt page about this
noddy has joined #ocaml
butts_butts has joined #ocaml
jeffmo has joined #ocaml
slicefd has joined #ocaml
manizzle has quit [Read error: No route to host]
Haudegen has quit [Ping timeout: 244 seconds]
manizzle has joined #ocaml
newbie has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Kakadu has joined #ocaml
tia has joined #ocaml
nicholasf has quit [Remote host closed the connection]
Anarchos has joined #ocaml
djellemah_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
tia has quit [Quit: Leaving]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Haudegen has joined #ocaml
yunxing has quit [Remote host closed the connection]
ibor1 has joined #ocaml
slash^ has quit [Ping timeout: 260 seconds]
ibor has quit [Ping timeout: 240 seconds]
<Anarchos> How to debug an oUnit test failing ?
therac25 has joined #ocaml
sh0t has joined #ocaml
<Algebr> doesn't it tell you what's failing?
<Anarchos> it just tells wich test is failing
seangrove has joined #ocaml
<zozozo> try and reproduce the test in a top-level ?
orbifx has joined #ocaml
seliopou_ has quit [Ping timeout: 260 seconds]
jrslepak has quit [Ping timeout: 260 seconds]
zaltekk has quit [Ping timeout: 260 seconds]
<orbifx> hello alll
zaltekk has joined #ocaml
jrslepak has joined #ocaml
<Anarchos> zozozo i would prefer a solution with ocamldebug
seliopou has joined #ocaml
TheLemonMan has joined #ocaml
<Algebr> ocamldebug would mean compiling for byte code with -g and then running under ocamldebug with a breakpoint
darkf has joined #ocaml
shinnya has joined #ocaml
dwillems has joined #ocaml
rand__ has joined #ocaml
BitPuffin has quit [Ping timeout: 276 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Bobbejaantje has joined #ocaml
<Bobbejaantje> Is there a way with compiling like a -dynamic flag to dynamically link against system libraries rather than statically?
<Bobbejaantje> dynlink seems to be a module which is unusual.
<Algebr> curious, what's your use-case/issue
<Bobbejaantje> Algebr, well, I'm learning ocaml by re-implementing more or less daemontools which involves many small supervisor processes in how its architecture is designed which with static linking each seem tot ae 5MB of RAM which is pretty hefty
<Bobbejaantje> I'm using Core for this which seems to take a lot of RAM, would be great if that could be loaded in a shared library
<Algebr> ah, the statically linked binary is hefty with core i guess
<Bobbejaantje> I guess that would be fine if you only had one process.
struk|desk is now known as struk|desk|away
<Bobbejaantje> But the entire idea of daemontools' architecture is many small processes
<flux> bobbejaantje, daemontools runs internally many small processes?
<Algebr> flux: no looks like daemontools is a collections of small utilities
<flux> ok, so many small programs. well, a practical alternative would be to provide a single multi-call binary, that branches off from the main function to those operations
<flux> an impractical alternative might be to make Core dynloadable :)
<flux> (or just not use Core if it's too big)
<Bobbejaantje> flux, no, they run at the same time.
<flux> I wonder though if Core really consumes a lot of memory or is it just virtual memory that's mapped from the hdd
<Bobbejaantje> The way daemontools works is that it spawns a different supervision process for every service it monitors.
<flux> ..which might never be mapped in if some functions are not called
<flux> bobbejaantje, well, you can use fork to just create a new process, in which case a lot of memory may remain shared with the parent
<flux> (though due to the way garbage collection works, I have a feeling it might be a good idea to run a major collection before the fork)
<Bobbejaantje> You can I suppose, but that seems like a hack, daemontools' design clearly wants fork-exec.
<adrien> mfp's ld.ocaml is awesome but could enjoy some more love
<Bobbejaantje> Basically there is an svscan process that continually monitors a directory which contains service descriptions, and if a new one appears in it then a new supervise process is started for that directory
<adrien> s/but/and/
larhat has joined #ocaml
<Bobbejaantje> So I take it there is no way for OCaml to be dynamically linked against the system libraries?
<flux> seems an open Core Printf.printf "hello"-program takes 500k stripped, where as the Batteries version takes 2.3 megabytes, unless my test is flawed
<flux> bobbejaantje, by system libraries you mean the operating system libraries? or ocaml libraries?
<flux> because the former are dynamically linked in
<Algebr> libc is dynamically linked yes
<flux> the latter are not feasible unless you take the bits of https://github.com/mfp/ld.ocaml and make it work again
<mrvn> and break cross module inlining.
<flux> I doubt it's going to work as is, given it's 6 years old :)
<Bobbejaantje> flux, well, ocaml libraries, core in particular
<Bobbejaantje> And async_unix, both of whom I use.
<flux> bobbejaantje, in practice you're not going to be able to load those dynamically
<Bobbejaantje> Ahh, hmm.
<Bobbejaantje> Pity.
<mrvn> core is pretty well split so you only get what you need.
<Bobbejaantje> Really?
<mrvn> 21:33 < flux> seems an open Core Printf.printf "hello"-program takes 500k
<Bobbejaantje> I found that a trivial "hello world" opening up core generated a huge executable.
<Bobbejaantje> h, I missed that.
<Bobbejaantje> THat's still pretty large though.
<mrvn> make sure you have a new enough core and ocaml
<flux> without even Core, the program takes 300k
<flux> actually 340k
<Bobbejaantje> My core is apparently 113.33.00
<flux> so that's the smaller you can probably go
<mrvn> flux: stdlib is less split up than core? :)
<mrvn> flux: was that bytecode or binary?
<flux> native
<orbifx> guys, are interfaces written in C generally reentrant? In terms of ocaml function calls.
<mrvn> -rw-r--r-- 1 mrvn mrvn 39 Mar 22 21:37 foo.ml
<mrvn> -rw-r--r-- 1 mrvn mrvn 2.3K Mar 22 21:37 foo.o
<mrvn> -rwxr-xr-x 1 mrvn mrvn 449K Mar 22 21:37 foo*
<mrvn> 64bit
<flux> and using print_string I get 136 k
<mrvn> -rwxr-xr-x 1 mrvn mrvn 185K Mar 22 21:38 foo*
<flux> batteries:2346144 core:554240 stdlib:344960 stdlib with print_string:136000
<flux> on my 64-bit debian unstable with 4.02.3
<flux> after stripping
<mrvn> let () = (): -rwxr-xr-x 1 mrvn mrvn 185K Mar 22 21:39 foo*
<mrvn> 133K stripped
<mrvn> So I assume those 133k are just the ocaml GC and init code.
<flux> maybe it's possible to replace some stuff with -nostdlib, but I couldn't get anything to compile with it ;)
_andre has quit [Quit: leaving]
<orbifx> guys, are interfaces written in C generally reentrant? In terms of ocaml function calls.
mettekou has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
<flux> really depends on the interface? I guess modern interfaces usually are, legacy interfaces not.
<flux> or do you mean if C-bindings are written so that they release the ocaml lock?
<flux> then perhaps not, I think most often libraries that do 'big tasks' choose to release the lock
darkf has joined #ocaml
slicefd has quit [Quit: WeeChat 1.4]
mettekou has quit [Read error: Connection reset by peer]
yunxing has joined #ocaml
deko-pyon has quit [Quit: ... the fear fades away.]
larhat has quit [Quit: Leaving.]
pyon has joined #ocaml
th5 has quit [Quit: th5]
Haudegen has quit [Ping timeout: 248 seconds]
mettekou has joined #ocaml
<Anarchos> flux it reminds me when i interfaced ocaml with a multithreaded C++ api . Was kinda fun to do
mau has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
<orbifx> flux: thanks, will get back to you as soon as I finish writing something
nicholasf has joined #ocaml
noddy has quit [Ping timeout: 260 seconds]
larhat has joined #ocaml
hugomg has joined #ocaml
<Algebr> Sys.getcwd and Unix.getcwd.
MercurialAlchemi has quit [Ping timeout: 252 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
dwillems has quit [Quit: Leaving]
johnf_ has quit [Read error: Connection reset by peer]
noddy has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
johnf_ has joined #ocaml
sh0t has quit [Quit: Leaving]
mettekou has quit [Ping timeout: 268 seconds]
<mrvn> when ocaml thows an exception back to C code how do I pretty print that from C?
butts_butts has quit [Ping timeout: 244 seconds]
darkf_ has joined #ocaml
djellemah_ has quit [Ping timeout: 252 seconds]
darkf has quit [Ping timeout: 248 seconds]
seangrove has quit [Ping timeout: 276 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
nodrai has joined #ocaml
seangrove has joined #ocaml
nodrai has quit [Quit: Saindo]
seangrove has quit [Ping timeout: 240 seconds]
* mrvn listens to https://www.youtube.com/watch?v=hWTFG3J1CP8 while he watches his Tetrix pices drop. Now if only the KeyEvent would be done...
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
seangrove has joined #ocaml
rand__ has quit [Quit: leaving]
mettekou has joined #ocaml
ollehar has joined #ocaml
<ollehar> sorry, but how to do a newline in a printf expression?
<ollehar> \n get printed as \n
<Algebr> ollehar: show snippet?
ibor1 has quit [Ping timeout: 246 seconds]
<ollehar> raise (MyException (sprintf "%s\n %s\n" something somethingelse))
<mrvn> that doesn't print anything
Emmanuel`_ has quit [Quit: Konversation terminated!]
<ollehar> mrvn: well, no. wait...
<mrvn> the exception pretty printer will escape the \n when it shows them to you on crash
Emmanuel`_ has joined #ocaml
<ollehar> mrvn: right. can I avoid that?
<mrvn> catch it, print it
<ollehar> ok
<Algebr> plain print_endline?
<mrvn> no, \n ins printf is just fine
<ollehar> I did print_endline, but I've got so many of them I need to tell them apart from exceptions ><
<ollehar> thanks
<mrvn> you might want to add %! to flush the output at some places
<ollehar> hm
<orbifx> anyone here running OCaml in Arch?
<Drup> yeah
<orbifx> Drup could you do me a big favour and run a small piece of test code?
<orbifx> I have two arch machines in which it crashes
<Drup> sure
<orbifx> but kakadu has an Ubuntu which doesn't
hugomg has quit [Quit: Ex-Chat]
<orbifx> Have you got lablqt installed?
<orbifx> you need that, and the program is this: https://github.com/orbifx/lablqt/tree/master/qml/propmap_stress_test
<orbifx> I accidentaly committed some object files I will be deleting
<orbifx> hold on
Nordrai has joined #ocaml
<orbifx> Drup: ready
mettekou has quit [Read error: Connection reset by peer]
Nordrai has quit [Quit: Page closed]
<Drup> File "main.ml", line 11, characters 14-28:
<Drup> Error: Unbound module PropMap
mettekou has joined #ocaml
<Kakadu> orbifx: You didn't mention dev repo for lablqt
<Kakadu> opam remote add lablqt-dev http://kakadu.github.io/lablqt/opam-dev
<Kakadu> PropMap is kind of new stuff
ollehar has quit [Quit: ollehar]
<orbifx> Drup: kakadu has a point, that is the remote he has provided there
<Drup> can I just pin one thing or do I need the full repo ?
<orbifx> I think it only has one package, kakadu ?
<Kakadu> I think that it will work, but I never tried, Drup
mettekou has quit [Read error: Connection reset by peer]
<Drup> You should add an opam file inside your repo
<orbifx> Drup, coming right back, I updated my whole system just in case
<orbifx> (in case it makes any difference with this issue)
<orbifx> brb
orbifx has quit [Quit: WeeChat 1.4]
<Algebr> does Sys.command use bash or plain sh
<Drup> kakadu: also, your opam files in your repo are wrong
<Drup> (look at the one in opam-repository)
<Kakadu> They are just old but do their job
orbifx has joined #ocaml
<orbifx> Drup: back
<Drup> ugh, I have to install core
<orbifx> It's for a good cause :-P
<orbifx> kakadu: why does it need core?
<Drup> kakadu: you should really make your package pin-proof
<Drup> it's annoying
<Drup> I don't want to add new remotes
<orbifx> Drup: Drupi gather he is just learning the opam ropes.
<orbifx> I can only suspect the distro, so I would like someone more experienced to verify that.
<Kakadu> it locks for me too now
<Drup> core finally done compiling, let's test your thing
<orbifx> Ramen :-P
<orbifx> Drup thanks
<Drup> what is it supposed to do ?
<Kakadu> it supposed to crash :)
<Kakadu> all program with C are supposed to crash
<Drup> wait
<orbifx> Lol
<Drup> orbifx: which system package do I need ?
ibor has joined #ocaml
<orbifx> System package? You mean from pacman?
<Drup> I was missing qml
<orbifx> Ow, got it ok?
<Drup> It opens a window, with numbers counting, then when I press "Fire", it coredumps
<orbifx> Ok
<Drup> ASSERT failure in Val_QVariant: "Type is not supported:userType() == 6", file propMap_stubs.c, line 37
<Drup> zsh: abort (core dumped) ./test.native
<orbifx> Let it run without clicking fire.
<orbifx> How far does your count get to?
<Drup> well, it keeps counting.
<Drup> and burning my CPU
<Drup> ah, the window is frozen now
<Kakadu> hangs?
Simn has quit [Quit: Leaving]
<Drup> at 1417
<Kakadu> all programs with threads a supposed to deadlock
<Drup> now it keeps going
<orbifx> Thanks drup. It's random, most likely because of a racing condition
<Drup> have fun debuging !
johnf_ has quit [Ping timeout: 260 seconds]
<orbifx> It won't move once it's frozen. Did you restart it?
<Drup> yes
Vintila has joined #ocaml
johnf has joined #ocaml
<Drup> kakadu: those dependencies are wrong
<Drup> you're missing core_kernel
<Kakadu> maybe I should go to sleep
<orbifx> Thanks Drup. I appreciate the testing.
<Kakadu> sorry for noize
<orbifx> Kakadu me too, will be back first thing tomorrow.
<orbifx> Atleast we can resproduce it now.
Kakadu has quit [Remote host closed the connection]
<orbifx> Drup, any experience with threading and wrapping C?
johnf has quit [Read error: Connection reset by peer]
<Drup> nope
<orbifx> Anyone here with expertise on caml allocations via the C interface?
johnf has joined #ocaml
johnf_ has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
<Algebr> what is your question, just ask
darkf_ is now known as darkf
cdidd has quit [Remote host closed the connection]
johnf has joined #ocaml
<orbifx> I suspect the code mentioned above has some racing issues which probably occur during allocations
johnf has quit [Read error: Connection reset by peer]
johnf has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
<orbifx> If someone could take a look at the interface it could help a lot.
<orbifx> Link coming up.
johnf has joined #ocaml
johnf_ has quit [Ping timeout: 268 seconds]
cdidd has joined #ocaml
johnf_ has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
johnf__ has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
<orbifx> Back
<orbifx> Could these C function be susceptible to raising conditions?
<Algebr> what the heck is this for: const QVariant& var
<Algebr> dude, what... (*((QQmlPropertyMap **) &Field(_ans, 0))) = propMap;, I was copy pasting that here and firefox literally crashed.
<seangrove> Drup: Seems like you're making progress on the new ppx tyxml stuff
<orbifx> Algebr hahha