gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
valross has joined #ocaml
dark has quit [Ping timeout: 250 seconds]
dark has joined #ocaml
vk0 has quit [Ping timeout: 265 seconds]
vk0 has joined #ocaml
drunK has quit [Remote host closed the connection]
Amorphous has quit [Ping timeout: 264 seconds]
vk0 has quit [Ping timeout: 255 seconds]
Amorphous has joined #ocaml
elehack has joined #ocaml
vk0 has joined #ocaml
jeff2 has joined #ocaml
erikc has joined #ocaml
elehack has quit [Quit: not a typewriter]
cods has quit [Ping timeout: 255 seconds]
cods has joined #ocaml
joewilliams is now known as joewilliams_away
ulfdoz has joined #ocaml
joewilliams_away is now known as joewilliams
<thelema> wow, ocaml
<julm> hm?
<thelema> 's (=) used to do (=) for immutable values and (==) for mutable values
<flux> when was that?
<thelema> around the time of concurrent caml light - 1994
<thelema> 1993
<flux> well, it makes in a certain level
<flux> atleast it automatically avoids infinite loops in comparisons
<flux> except for the let rec-extension to create infinite lists
<thelema> true.
<flux> but I can imagine how inconvenient it can be at times..
<thelema> I'm trying to think when I'd want to use (==) on immutable structures or (=) on mutable ones... I can think of uses for the second, but the first...
<flux> well, you could be using immutables values as some sort of tags for purposes of creating unique ids or something, and you'd == compare against those.. but pretty rare case, asuming = fastpaths on == as well
<thelema> ints would make better tags
ikaros has joined #ocaml
<flux> but to create them you need a multi-threaded program to have your own locking..
<flux> but yeah, they generally are nicer, because they provide < etc as well :)
hto has quit [Remote host closed the connection]
hto has joined #ocaml
vk0 has quit [Ping timeout: 265 seconds]
vk0 has joined #ocaml
<ulfdoz> to avoid the concurrency bottleneck of generating ids, you could allocate them in pools. However, this sometimes makes an odd semantic of comparisons.
<flux> I've lately just used Object.id (object end)
<flux> but I suppose without a release mechanism it could prevent long-running apps on 32-bit platforms..
dark has quit [Ping timeout: 276 seconds]
dark has joined #ocaml
<jeff2> why is '0l == 0l' false?
ulfdoz has quit [Ping timeout: 265 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
<flux> 0l is a boxed value, so it is basically a pointer to a dynamically allocated block of memory
valross has quit [Quit: Ex-Chat]
<flux> I suppose on 64-bit platforms int32 wouldn't need to be boxed, but apparently it is
larhat has joined #ocaml
erikc has quit []
jeff2 has quit [Quit: This computer has gone to sleep]
Snark has joined #ocaml
joewilliams is now known as joewilliams_away
dark has quit [Ping timeout: 265 seconds]
Leonidas has quit [Ping timeout: 250 seconds]
Tianon has quit [Ping timeout: 272 seconds]
hcube has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
tmaeda has quit [Ping timeout: 255 seconds]
tmaeda has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ttamttam has joined #ocaml
Yoric has joined #ocaml
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
trch has joined #ocaml
ftrvxmtrx has joined #ocaml
_andre has joined #ocaml
ttamttam has quit [Remote host closed the connection]
trch has left #ocaml []
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
<thomasga> any idea why : ocamlc str.cma --> OK but camlp4 str.cma --> Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib/ocaml/str.cma", "error loading shared library: dllcamlstr.so: dynamic loading not supported on this platform") ?
tmaeda has quit [Ping timeout: 250 seconds]
<thomasga> using 3.11.2, 'camlp4 str.cma' doens't give me an error message ... should be a bug then :-)
tmaeda has joined #ocaml
hyperboreean has quit [Ping timeout: 276 seconds]
hyperboreean has joined #ocaml
<flux> thomasga, try camlp4 dynlink.cma str.cma ?
ttamttam has joined #ocaml
<f[x]> ocamlc doesn't load cma - it links it in
<f[x]> it doesn't care whether so is available at link time
<f[x]> * '.so'
<f[x]> camlp4 instead tries to load cma and searches for referenced shared lib
rks has joined #ocaml
Leonidas has joined #ocaml
<thomasga> flux: doesn't work either
<thomasga> f[x]: so what should I do to make camlp4 happy with str.cma ?
<f[x]> > dynamic loading not supported on this platform
<f[x]> figure why you get reference to shared library in str.cma on such a platform
<f[x]> btw what is the OS/arch?
<thomasga> debian lenny / i686; you think it's a problem with the build of ocaml (I am using a slighty modified one)
<f[x]> slightly modified by whom?
<thomasga> by me :-)
<f[x]> very funny
Amorphous has quit [Ping timeout: 255 seconds]
<thomasga> you were right f[x], I was using ./configure -no-shared-libs [...] so the .so files were not produced ... fixed now, thx!
<hcube> hi! i'd like to embed my ocaml program in my c application. currently it works with ocamlc -output-obj. but now i'd like use ocaml packages (e.g. ocamlnet). What's the standard way to do this?
<hcube> ocamlmklib?
<f[x]> thomasga, hm, then it sounds like a bug indeed, ocaml should have linked str.cma in custom mode with -no-shared-libs
Amorphous has joined #ocaml
<f[x]> mfp, why are topic messages delivered faster?
<f[x]> btw enabling sqlite wal speeds up things noticeably
<f[x]> maybe ocamlmq should provide option to set arbitrary sqlite pragmas on the database
<f[x]> (wal is persistent so it can be set manually, but others (like journal_mode) are not)
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx_ has joined #ocaml
<mfp> f[x]: they are not persistent
<f[x]> btw libsqlite from lenny doesn't understand SAVEPOINT
<f[x]> ah, I see
<mfp> libsqlite, not libsqlite3 ?
<f[x]> libsqlite3-0
<f[x]> not a big deal, jfyi
<mfp> "SAVEPOINT first appeared in 3.6.8."
<mfp> I can add a note in the README at the very least
<mfp> (3.6.8 released on 2009 Jan 12, old enough I guess)
<f[x]> and check version at start if you want to be very-very kind to users :)
<mfp> good idea
* f[x] currently looks at 400K long backtrace of ocammq in gdb..
<f[x]> and it has 6G rss with maxmsg 1M
<mfp> huh
<f[x]> repeating same frame - http://paste.in.ua/1409/ - not sure whether I can trust gdb here
<f[x]> hm, ok, I have 5k connections, that means 5k lwt threads
<mfp> does that happen when it tries to flush?
<mfp> or is it crashing before that?
<mfp> at any rate, 1M is way too big, it won't make things much faster than say 100000. You can use :memory: as the DB name to keep it in-mem.
<mfp> the 5k threads should be no pb, apart from the O(n) perf of select if you're not running a recent Lwt based on libev
<f[x]> apparently it is not doing anything, just looping with 100% cpu, all consumers and producers disconnected
<f[x]> I will try to collect more info
<mfp> does it also happen if you lower the maxmsgs limit?
<mfp> in my tests, I sent over 2.5 M msgs in non-consecutive runs
<mfp> against the same DB
<f[x]> yes, just happened with maxmsgs 100k
<f[x]> after I killed producers
<f[x]> i.e. run ocamlmq, run 5k producers into 5k queues, wait, kill producers
<f[x]> and eats memory
<mfp> what's you fd limit?
<mfp> *your
<f[x]> 8k
ski_ has joined #ocaml
ikaros has joined #ocaml
ski has quit [Ping timeout: 240 seconds]
ski_ is now known as ski
<hcube> hi
<hcube> do you know a good ocaml hight level network library without 3dr party c lib deps?
<hcube> *3rd
<hcube> *high
<hcarty> hcube: ocamlnet has a mixture of high and low level functions
<hcarty> It does depend on pcre
<hcarty> Ooh, a JIT-compiled toplevel. Nifty.
<rixed> hcarty: I'd rather like a native-code toplevel.
joewilliams_away is now known as joewilliams
init1 has joined #ocaml
<hcarty> rixed: It's there, it just doesn't play nicely with findlib
<hcarty> It sounds like this JIT byte-to-native version would work with findlib
larhat has quit [Quit: Leaving.]
ftrvxmtrx_ has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
avsm has joined #ocaml
vk0 has quit [Ping timeout: 276 seconds]
vk0 has joined #ocaml
jeff2 has joined #ocaml
<rixed> hcarty: It's there ? A native toplevel ? where ?
<thelema> It's the one part of the natdynlink branch that didn't get merged with ocaml head
init1 has quit [Quit: Quitte]
ftrvxmtrx has quit [Quit: Leaving]
<hcarty> thelema: It's there, just not compiled by default
<hcarty> You need to do a separate "make nattop" or similar step
<hcarty> Or it was with 3.11.x - I haven't tried with 3.12.x
init1 has joined #ocaml
<hcarty> It does not seem intended as anything other than an experiment though - I tried reporting a bug or two against it on Mantis and got a response saying as much.
<hcarty> Ah, I think it's "make ocamlnat"
<rixed> thelema: yes, but from this page you can read : "It is not planned to include this native toplevel in a future official version of OCaml, though.
<rixed> thelema: so for me its a dead end
<hcarty> rixed: If enough interest is expressed then it may gain some traction. But in its current state it's not much more than a "oh neat-o" toy
<rixed> hcarty: Ah, good. I though from this comment that there was no hope whatsoever.
<hcarty> rixed: There isn't much :-) But if you have an interest it wouldn't hurt to make it known.
boscop__ is now known as boscop
<rixed> hcarty: The problem refraining me to use it for now is that I'm working mainly on ARM and MIPS platforms, which does not support dynlink for now...
jeff2 has quit [Quit: This computer has gone to sleep]
Yoric has quit [Quit: Yoric]
<hcube> i've checked ocamlmklib and ocamlfind documentation but it's not clear how can i build an all in one (many ocaml lib + c stubs) static linked (libMyModule.a) archive.
<hcube> here is what i have (currently it generates c) ocamlfind ocamlc -output-obj -package atdgen,netclient -linkpkg SearchBroadcast.mli SearchBroadcast.ml ocamlCA.ml -o ocamlCA.c
<hcube> but i'd like to get a libCA.a
<hcube> can you help me?
<hcube> from main.c i'd like to call only the caml_startup function. an i;d lik to compile this like: gcc -o prog main.c -CA
<hcube> *link
<hcube> gcc -o prog main.c -lCA
ztfw has joined #ocaml
ttamttam has quit [Remote host closed the connection]
avsm has quit [Ping timeout: 264 seconds]
<hcube> maybe -make-runtime is what i need :)
hcube has quit [Ping timeout: 240 seconds]
drunK has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
ygrek has joined #ocaml
adrien is now known as adrien_
Edward has joined #ocaml
adrien_ is now known as adrien__
adrien__ is now known as adrien___
adrien___ is now known as adrien
Yoric has joined #ocaml
ulfdoz has joined #ocaml
hcube has joined #ocaml
yezariaely has joined #ocaml
_andre has quit [Quit: leaving]
yezariaely has left #ocaml []
<adrien> regarding hyperthreading on intel cpus, afaik, HT is mostly a way to run a second thread while a first one is starving for data but I'm everything but sure about this, can anyone confirm or infirm this? (been trying to find more infos but had little success)
<orbitz> mfp: does ocamlmq support receipts?
init1 has quit [Quit: Quitte]
<mfp> orbitz: it honors the standard STOMP receipt: header and only sends the RECEIPT with the corresponding receipt-id after the message has been saved (... to disk & fsynced, depending on the options)
<orbitz> ah so a receipt isn't for an ACK it's just saving to disk
<mfp> you can request a receipt for an ACK too
<mfp> by using the receipt: xxx header in the ACK frame
<orbitz> err what i meant was, a receipt isn't a way of guaranteeinga message was delivered, just that the emssage has been properly persisted somewhere
<mfp> right; in STOMP, you don't get a receipt when the message is delivered. RECEIPT is only a manually requested ack to the frame you just sent.
<orbitz> thanks
<mfp> if you get a RECEIPT frame corresponding to a message, you know it'll be delivered eventually, though
<mfp> when somebody subscribes to the queue
<orbitz> almost ready to start hitting ocamlmq with requests!
Edward_ has joined #ocaml
<mfp> orbitz: I did my best to explain the diff durability options in README; if you find something unclear tell me and I'll expand on it
<mfp> by default, it flushes to the sqlite3 store once a second and doesn't use a binlog, so you could lose as much as 1s worth of messages if ocamlmq or the system crash
Edward has quit [Ping timeout: 255 seconds]
hcube has quit [Ping timeout: 276 seconds]
ztfw has quit [Remote host closed the connection]
<gildor> adrien: AFAIK, HT was a way to "take" advantage of pipeline bubble by having the possibility to switch to another context
<gildor> adrien: on a process without bubble, performance gain is 0
jonafan_ has joined #ocaml
ftrvxmtrx has joined #ocaml
jonafan has quit [Ping timeout: 240 seconds]
Snark has quit [Quit: Ex-Chat]
jonafan_ has quit [Ping timeout: 272 seconds]
boscop has quit [Ping timeout: 240 seconds]
boscop has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
ygrek has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
jonafan has joined #ocaml
snarkyboojum_ is now known as snarkyboojum
valross has joined #ocaml
<adrien> gildor: ok, thanks :-)
<adrien> wasn't sure why it disappeared for a while and was reintroduced later, maybe they had changed something
Yoric has quit [Quit: Yoric]
hyperboreean has quit [Ping timeout: 255 seconds]
hyperboreean has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
Tobu has quit [Ping timeout: 272 seconds]
Edward_ has quit []
tmaeda has quit [Ping timeout: 265 seconds]
tmaeda has joined #ocaml