ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
mv has quit [Remote host closed the connection]
swgillespie has joined #ocaml
<rgrinberg> feel free to correct it
<rgrinberg> ;D
<Drup> bah.
ontologiae has joined #ocaml
araujo has quit [Quit: Leaving]
avsm has joined #ocaml
javamonn has joined #ocaml
sigjuice has joined #ocaml
ollehar has quit [Quit: ollehar]
javamonn_ has joined #ocaml
javamonn has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
javamonn_ has quit [Remote host closed the connection]
<rgrinberg> Drup: progress!
javamonn has joined #ocaml
javamonn has quit [Remote host closed the connection]
seanmcl has joined #ocaml
<Drup> > give 500 instead of 404
<Drup> > "works"
<Drup> :D
yomimono has joined #ocaml
<rgrinberg> Drup: unfortuntaly you can't see the stacktraces for how these were thrown
<rgrinberg> it's very annoying
<Drup> really ?
<rgrinberg> well i haven't figured out how
<Drup> even with OCAMLRUNPARAM ?
<rgrinberg> These exceptions are caught though
<Drup> Oh.
avsm has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest57991
avsm has quit [Client Quit]
Guest57991 has quit [Ping timeout: 256 seconds]
nullcat__ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
7GHABBL8P has joined #ocaml
7GHABBL8P has quit [Client Quit]
djellemah_ has joined #ocaml
djellemah has quit [Ping timeout: 250 seconds]
<rgrinberg> Drup: I suppose we can stop catching them :D
<Drup> well, yes and no
<Drup> not catching at all is very bad, you still want the webserver running and returning error 500
<Drup> what you really want is the backtrace in the error log
<rgrinberg> Drup: anyway to include it? This is where we transform the exn to a string https://github.com/ocsigen/ocsigenserver/blob/21f2e9ac081a51cabbbab278fe7a6b65b3443f11/src/server/ocsigen_cohttp_server.ml#L75
<Drup> Lwt_log.ign_error(_f)
<Drup> and you can pass the exception as argument and it will print the backtrace by itself
<Drup> actually, give me a sec, I have various modif related ;)
<rgrinberg> Drup: what do I set LWT_LOG to again?
<Drup> shouldn't need to change it
<Drup> if you run with the given ocsigenserver.conf, it will log in var/log/error.log
<rgrinberg> Drup: without the stacktrace though
<Drup> then, print the backtrace manually
<Drup> (still with Lwt_log, just pass the whole string :p)
<rgrinberg> Lwt_log.ign_error isn't showing me anything which is why I've asked about LWT_LOG
<rgrinberg> oh nvm it is but without a backtrace :/
<rgrinberg> let me enable debug
<Drup> Just checked lwt
<Drup> if the backtrace is available, the ~exn will show it
<Drup> so, OCAMLRUNPARAM=b
<Drup> ;)
<rgrinberg> Drup: was not enough. Had to ./configure --enable-debug
<Drup> ah
<Drup> yes.
<Drup> I actually changed that recently, to enable it by default
<Drup> but it's not in the cohttp branch
<Drup> (I wonder why it was not done before ...)
<Drup> huuum, I didn't pushed it
<rgrinberg> Drup: pasted the backtraces in the PR
<Drup> rgrinberg: done, enabled by default everywhere now.
<rgrinberg> Drup: thanks. How to show all lwt logs again?
<rgrinberg> E.g. what to set LWT_LOG to
<Drup> rgrinberg: should I produce a backtraces for all the exceptions or only for the unknown one causing an error 500 ?
<Drup> I haven't added the loging yet ;)
<rgrinberg> Drup: there's already useful info logging i'd like to see
<rgrinberg> Drup: and I'm not sure, I think adding backtraces everywhere is fine
<rgrinberg> Drup: I doubt it's going to be a bottleneck for something
<Drup> sure, but some exceptions are normal, not errors
<Drup> clearly not enough loging in this new ocsigen_cohttp_server
<Drup> outch.
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg> OK So I think the second backtrace I posted is fine
<rgrinberg> it's just that dinosaure changed the format of the error
<rgrinberg> message
<Drup> rgrinberg: are there other places where you want me to log stuff ?
<Drup> I love this XXX comments.
<rgrinberg> Drup: could you update the debugging instructions in the readme as well
<rgrinberg> which say a word or two about LWT_LOG
<rgrinberg> s/which/which should/
<Drup> you don't need any LWT_LOG thingy now
<rgrinberg> how come i don't see the info messages then :O
<Drup> with the commit I just pushed, you just need OCAMLRUNPARAM=b
<Drup> and then you look at the log files
<rgrinberg> so why does this not get turned into a 404?
<Drup> I don't know ? é_è
<rgrinberg> Drup: p.s. can you add conduit.lwt-unix to the merlin file
<Drup> done.
<Drup> is the logging working now ?
<Drup> (you did ./configure again, right ?)
<rgrinberg> Drup: yes I did
<rgrinberg> wtf the backtrace ends up being totally wrong though
<rgrinberg> ocsigenserver.opt: ocsigen:cohttp: Error while handling request.: Ocsigen_extensions.Ocsigen_http_error(_)
<rgrinberg> ocsigenserver.opt: ocsigen:cohttp: backtrace:
<rgrinberg> ocsigenserver.opt: ocsigen:cohttp: Raised at file "hashtbl.ml", line 136, characters 19-28
<rgrinberg> ocsigenserver.opt: ocsigen:cohttp: Called from file "netexn.ml", line 74, characters 18-44
<Drup> I smell some try with stupidity in the middle of Lwt stuff
<Drup> ok, time I review the cohttp part :D
<Drup> let put Llvm2Smt aside for a moment. :p
<rgrinberg> Drup: cohttp actually has its own easier way of serving static files
<rgrinberg> but i suspect that it we switch to it we will break more subtle stuff
<Drup> rgrinberg: yeah, that's very dangerous to change
<Drup> because user config.
<rgrinberg> IMO it's way mroe benign than switching to Uri -_-
<Drup> people use the ocsigenserver.conf file with rules and stuff
<Drup> oh ?
<rgrinberg> Drup: yeah but i don't mean breaking the config
<rgrinberg> I mean reimplementing staticmod using cohttp
ygrek_ has joined #ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
<Drup> ah
<Drup> well, if you think it's easy
<rgrinberg> Drup: putting yuor logging statement before teh Printexc.to_string fixes the backtraces wtf
<Drup> waou.
<Drup> that's ... impressive
javamonn has joined #ocaml
<rgrinberg> Printexc.to_string has some effect?
<Drup> not that I am aware of
javamonn has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ontologiae has quit [Ping timeout: 250 seconds]
shinnya has joined #ocaml
<Drup> straight from Printexc.ml : "if Obj.tag x <> 0 then (Obj.magic (Obj.field x 0) : string)"
<Drup> ETOOMUCHMAGIC é_è
<Drup> (ok, it's justified here)
<rgrinberg> what is the equivalent of this match statement in master?
<Drup> ahah, oh that's tricky
<Drup> rgrinberg: so, Printexc.get_backtrace get "the most recent backtrace"
<Drup> but Printexn.to_string uses an exception internally.
<Drup> :D
<Drup> rgrinberg: I pushed the fix
<rgrinberg> To the exn logging thing?
<Drup> yes
<rgrinberg> Any ideas about the match statement?
<Drup> I'm looking
<rgrinberg> how does the extension system even work
<rgrinberg> it looks very mystical
<Drup> it's because it is
<Drup> dynamic loading magic with various tactically placed handlers
<rgrinberg> PS Drup it looks like a bastardized version of opium's middleware system ;)
<Drup> bastardized with what ? x)
<rgrinberg> Drup: i'm just using the word that you used for opium although i might have misquoted you
<rgrinberg> it's definitely more complicated and i don't see any extra power
netrobyatmobile has joined #ocaml
<Drup> ahah
<Drup> I never argued about the intrinsic quality of ocsigenserver.
<rgrinberg> Drup: ok thanks that's useful. But this is what i don't understand
<rgrinberg> neither one of those match statements emits a 404
<Drup> it does this job, nobody touched it for years, the insides are horribly designed and the exterior is rather ok.
<rgrinberg> how do you get a 404 then?
<Drup> rgrinberg: the first case, I suppose
<rgrinberg> oh
lordkryss has quit [Quit: Connection closed for inactivity]
<Drup> rgrinberg: "git grep 404" reveals where it's emited
<rgrinberg> Drup: i know where it's emitted i don't know what happens to it after @_@
<rgrinberg> b/c that's where the magic starts
<Drup> I know.
<Drup> apparently, Ocsigen_http_error is declared multipled time è_é
<rgrinberg> Drup: i was just gonna ask taht
<rgrinberg> WHY???
<rgrinberg> btw i think other exceptions are defined multiple times as well
<Drup> it's a dinosaure addition, so my guess is it's either original refactoring mistake or rebasing spagetti
<rgrinberg> dinosaure: you sure?
<rgrinberg> Drup: you sure?
<rgrinberg> i'm pretty sure it's the cause of teh bug here btw
<rgrinberg> scratch that i'm 100% sure
<Drup> oh, it's clearly a big
<Drup> bug*
<Drup> fixing it
<rgrinberg> we're hitting this clause
<rgrinberg> instead of the first one
<rgrinberg> Drup: maybe dinosaure thinks that exceptions are structurally typed or something :O
cesar_ has joined #ocaml
<Drup> I don't know, I doubt so
<rgrinberg> Drup: ok if you're getting rid of the duplicated exceptions that should fix the 404
seanmcl has joined #ocaml
cesar_ is now known as Guest84857
<Drup> do you see any other duplicated exceptions ?
<Drup> oh yes, there is another one.
<Drup> Failed_404
<rgrinberg> Is_a_directory as well
<Drup> Is_a_directory should have been fixed
<Drup> there was a commit about that
<rgrinberg> Not_concerned
<Drup> Failed_404 is actually already duplicated in master :x
<Drup> same for Not_concerned
<Drup> woaw, that's impressive.
<rgrinberg> Drup: see, why is that?
<rgrinberg> there's a bunch more duplicated btw
<rgrinberg> too many to list
<Drup> I have no idea.
<Drup> Oh !
<rgrinberg> maybe to break dependencies?
<rgrinberg> dynlink related?
<Drup> yes, maybe dynlink
<Drup> it's in the extension system
<Drup> and I know there is some stuff between dynlink and extensions
Guest84857 has quit [Ping timeout: 265 seconds]
<rgrinberg> all this effort to be able to write a config file in xml :/
<Drup> I know ...
<rgrinberg> would be better to write a little script to convert the xml to an ocaml module
shinnya has quit [Ping timeout: 264 seconds]
<rgrinberg> I saw that before
<rgrinberg> you mean vincent balat's comments?
<Drup> I mean that this patchset's purpose it to be able to simply be able to define a configuration in ml
<Drup> for now, you can't really do it
<rgrinberg> Drup: oh ok, cool
<rgrinberg> Drup: also, can you add a logging statement in that | exn -> ... catch all
darkf has joined #ocaml
<Drup> which one ?
<rgrinberg> the one that transforms an ocsigen response to a cohttp response
<Drup> give me a sec, redefining exceptions.
<Drup> rgrinberg: isn't the logging on top enough ?
<rgrinberg> Drup: well you basically always have to know if it's the 1st case or the catch all b/c your log alone isn't enough to tell whether the 500 was expected or not
<Drup> hum.
<Drup> I'll log the first one in debug and the other one in error
<Drup> seems more sensible
<rgrinberg> i have a feeling we'll run into more duplicate exceptions slipping by
<rgrinberg> yeah
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> don't forget the -V argument for debuging.
<rgrinberg> Drup: ok
<Drup> (and potentially "LWT_LOG=debug" but I don't think it's necessary
<rgrinberg> you can also combine the fact that the exception is in the catch all
<rgrinberg> and log after the response
<rgrinberg> that way you'll have one log statement but a little more book keepign
<Drup> oh but, no, that's not going to work
<Drup> it's after the Printexn.to_string ...
<rgrinberg> haha
<rgrinberg> lolcaml
<Drup> rgrinberg: just checked Is_a_directory : It's okay, it's redefined, not a new exception.
<Drup> (The patch was indeed in, I didn't missed it in a rebase, pfiou)
<Drup> rgrinberg: the backtrace is still wrong because of lwt stuff, I think
<rgrinberg> pfiou?
dubosec has joined #ocaml
idegen has quit [Ping timeout: 272 seconds]
c74d has quit [Read error: Connection reset by peer]
dubosec has quit [Quit: Leaving]
c74d has joined #ocaml
nullcat has joined #ocaml
javamonn has joined #ocaml
javamonn has quit [Ping timeout: 265 seconds]
uris77 has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
<dinosaure> rgrinberg: Drup: I'll search the bug
<Drup> which one ?
huza has joined #ocaml
<dinosaure> 500 internal error ?
<rgrinberg> dinosaure: i think it's fixed
<Drup> that one is solved
<rgrinberg> we are fresh out of bugs :P
<dinosaure> ok :)
<Drup> I would say "out"
<rgrinberg> we need more tests
<rgrinberg> and more importantl, RFC's for extension removal
<rgrinberg> (i'm looking at you cgimod)
<Drup> Personally my proposition is
<Drup> we merge the new_interface stuff
<Drup> do a release that preserve compat
<Drup> and break everything :>
<dinosaure> and replace ocamlnet by re and uri :}
<Drup> and kill dynlink
<Drup> (ok, that one is going to be hard)
<rgrinberg> Drup: anyway we need to test more than just static files :P have you tried running any eliom app on top of it yet?
<Drup> dinosaure: I think it's time for some cumulus testing
<Drup> smondet: ping, can you do some too ? :D
<dinosaure> Drup: yes, I try
<rgrinberg> nullcat: you around?
<nullcat> ,
<nullcat> just back home
<rgrinberg> nullcat: haha nice
<rgrinberg> we're gonna have another big testing effort
<nullcat> ᕦ(ò_óˇ)ᕤ
<rgrinberg> Drup: waht's the cumulus url agian?
<rgrinberg> found it http://cumulus.mirai.fr/
<dinosaure> yes :)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg> love how the site is half english half french
<rgrinberg> "Get the next links"
<rgrinberg> "Connexion"
<nullcat> i remember this site is built by @lamagicien on Twitter?
<Drup> x)
<dinosaure> nullcat: yes and jpdeplaix and me
<nullcat> r u also on Twitter?
<nullcat> rgrinberg: so what's the job?
<dinosaure> @Dinoosaure :)
<Drup> rgrinberg: the technical term is "frenglish" or "franglais" :3
<rgrinberg> nullcat: dinosaure and Drup will tell us the game plan
<rgrinberg> Drup: haha I've heard those dialects before from my compatriots
swgillespie has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
<Drup> a linguist friend call that "international english".
<Drup> anyway
<nullcat> good. I'll wait here while writing my assignment report...
<Drup> I'm adding some logging stuff in ocsigenserver now
<Drup> dinosaure should test with cumulus
<Drup> I know smondet has websites using eliom, but I don't know where the sources are
<Drup> rgrinberg: what you can do is run the eliom so called "test suite"
<rgrinberg> nullcat: ok so I guess we try and run cumulus with the cohttp branch of ocsigenserver
<rgrinberg> Drup: got it
<rgrinberg> Drup: do i still need a special eliom branch?
<Drup> yes
<Drup> the cohttp branch
shinnya has joined #ocaml
<dinosaure> i'll compile eliom :}
<rgrinberg> oh god i kind of liked working with ocsigenserver because it would build fast
<rgrinberg> ocamlbuild is really pumping the breaks on my build times :/
<rgrinberg> 1:21 for a clean build
<Drup> rgrinberg: that's clearly the only good point of ocsigenserver's build system ...
<nullcat> XCode??
<Drup> pretty sure you need eliom to be installed for the test suite to run
<nullcat> rgrinberg: so can you be more specific on what we should do?
cesar_ has joined #ocaml
cesar_ is now known as Guest15636
<rgrinberg> nullcat: run the eliom test suite against cohttp
<nullcat> install 'cohttp' branch of ocsigenserver first?
<rgrinberg> nullcat: or you can try and run cumulus locally against cohttp
<Drup> nullcat: 1) install the "cohttp_rebased" branch of ocsigenserver
<Drup> 2) install the "cohttp" branch of eliom
Guest15636 has quit [Ping timeout: 256 seconds]
<Drup> 3) either run the test suite of eliom or cumulus
<rgrinberg> Drup: rm distillery-mobilemake[3]: unlink: distillery-mobile: Operation not permitted
<rgrinberg> anyway, why is it copying stuff stuff around :O
<Drup> I'm not going to say it's weird, because there is a good reason I don't add stuff in this test suite.
<Drup> hum, rgrinberg
<rgrinberg> Drup: i hope it didn't rm -rf anything :(
<dinosaure> I hate the great firewall
<Drup> in the opam file, you restricted to opam >= 0.16.0
<Drup> which is unreleased :<
<rgrinberg> Drup: just pin the dev repo master == 0.16.0 for now
<dinosaure> in branch, I have an overlay of opam for cohttp
<Drup> right.
<Drup> dinosaure: I got rid of this shit
<dinosaure> ah :d
<Drup> (no seriously, it had *nothing* to do there)
<Drup> It followed the same path than swear words in comments.
<nullcat> "./configure && make && make install" fails at "make install" when installing cohttp_rebased branch of ocsigenserver
mcclurmc has joined #ocaml
<nullcat> File "ocsigen_cohttp_server.ml", line 186, characters 15-26: Error: Unbound value Server.make
<Drup> nullcat: don't make install, use opam
<rgrinberg> nullcat: it doesn't fail it's just stupid
<nullcat> use opam pin?
<rgrinberg> nullcat: Drup's advice is even better
<Drup> yes
<nullcat> wait..how to use opam-pin on a specific branch?
<nullcat> i see
<Drup> add #branch
<nullcat> #RTFM
<nullcat> thx..
<dinosaure> cumulus does not compile :s
mcclurmc_ has quit [Ping timeout: 248 seconds]
<Drup> that's a problem.
<dinosaure> it's type problem between string and Bytes.t in pgocaml
<dinosaure> D/
c74d has quit [Ping timeout: 265 seconds]
<dinosaure> I ran test suite of eliom
<dinosaure> and no problem for me
<dinosaure> for cumulus, I can fork pgocaml to replace string by Bytes.t
<Drup> or just remove -safe-string
<Drup> and string = bytes
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
<dinosaure> oh yes :)
<dinosaure> it's compile :=
c74d has joined #ocaml
<rgrinberg> dinosaure: does it work?
<dinosaure> not yet :d
jbrown has quit [Ping timeout: 250 seconds]
<nullcat> ok installed both lib
<Drup> ok, back
jbrown has joined #ocaml
<Drup> let's see if I can revive some of my old website for the sake of testing
<nullcat> Test suites of eliom are in the repo?
<Drup> yes
<rgrinberg> They didn't run for me though
<dinosaure> nullcat: make test.opt
<nullcat> result of running $make tests.opt under eliom dir: https://gist.github.com/marklrh/d8ae3451488414f69b62
<Drup> I have literally no idea what it's doing.
struktured has quit [Ping timeout: 256 seconds]
<nullcat> um...sorry to hear that
<Drup> wow, plenty of errors
<nullcat> just tell me if you want to do any tests
<nullcat> I have plenty of time today
<Drup> after "make test.opt"
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> you need to do "make run.opt.local"
<Drup> actually, use the bytes version it's a better idea
MercurialAlchemi has joined #ocaml
<nullcat> Drup: result of running "make run.opt.local": https://gist.github.com/marklrh/d8ae3451488414f69b62
<nullcat> second file
<nullcat> no the first
<Drup> ah yeah
<nullcat> the first one is the result of "make run.opt.local"
<Drup> "opam install sqlite3"
<Drup> wait for all the recompilation
<Drup> and retry
swgillespie has joined #ocaml
<Drup> and in byte ?
<nullcat> and in byte??
<Drup> you did "make run.opt.local"
<Drup> just do "make run.local"
<nullcat> yes
<Drup> in bytecode
<nullcat> oooh i see
<nullcat> same error
<nullcat> ocsigenserver: main: Fatal - While loading /Users/runhang/.opam/4.02.1/lib/sqlite3/sqlite3.cma: error loading shared library: /Users/runhang/.opam/4.02.1/lib/stublibs/dllsqlite3_stubs.so: dlopen(/Users/runhang/.opam/4.02.1/lib/stublibs/dllsqlite3_stubs.so, 138): Symbol not found: _sqlite3_enable_load_extension
<Drup> this is very weird.
<Drup> ok, fix so that you can still do things
<Drup> edit tests/eliom.conf
<Drup> and do s/sqlite/dbm/
<Drup> I think it will work.
<Drup> dinosaure, rgrinberg: so, hum
<Drup> the testsuite, on the cohttp branch, returns only empty pages
<rgrinberg> ship it
<Drup> :D
<rgrinberg> Drup: i get the error nullcat gets as well btw
<rgrinberg> Drup: anything interesting in the logs?
<Drup> yes
<nullcat> ocsigenserver: main: Fatal - While loading /Users/runhang/.opam/4.02.1/lib/ocsigenserver/extensions/ocsipersist-dbm.cma: Ocsigen_extensions.Error_in_config_file("Bad tag database")
<nullcat> I simply change line 32 to <extension findlib-package="ocsigenserver.ext.ocsipersist-dbm">
<Drup> I must say, I have no idea what's wrong
<nullcat> feel this is not correct, but i don't know anything so I just did that...
<Drup> it should be correct
<Drup> well, roll back to sqlite
<Drup> wait
<Drup> you do have sqlite installed, right ? :D
<nullcat> and I can say dbm package is install, version 1.0
<Drup> I mean, the real sqlite, not the ocaml binding
<nullcat> ...................
<nullcat> no I did not.......
<nullcat> wtf
<dinosaure> hmmhmm
<Drup> ahah
<Drup> so
<Drup> apparently
<nullcat> in previous OS X, sqlite is installed by default
<nullcat> at least in OS X 10.9...
<dinosaure> I have Ocsigen_http_error :d
<Drup> the cohttp branches passes around "/localhost%3A8080/"
<Drup> while the master branch passes round ""
<Drup> around*
<Drup> and you end up with : ocsigenserver: ocsigen:ext: site "miniwiki" does not match url "/localhost%3A8080/miniwiki".
<Drup> while it should match
<dinosaure> ok, again a problem with url
<rgrinberg> dinosaure: drup added some logging for those
<dinosaure> yes, I'll eat and go back to fix it
<dinosaure> otherwise, cumulus run :}
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> oh ?
<dinosaure> with the same error :d
<Drup> only blank pages ?
<Drup> so it doesn't run
<Drup> it lanches, maybe
<Drup> but that's hardly running
<nullcat> change conf back to sqlite yields "ocsigenserver: main: Fatal - While loading /Users/runhang/.opam/4.02.1/lib/sqlite3/sqlite3.cma: error loading shared library: /Users/runhang/.opam/4.02.1/lib/stublibs/dllsqlite3_stubs.so: dlopen(/Users/runhang/.opam/4.02.1/lib/stublibs/dllsqlite3_stubs.so, 138): Symbol not found: _sqlite3_enable_load_extension"
<nullcat> if conf uses "dbm", I have "ocsigenserver: main: Fatal - While loading /Users/runhang/.opam/4.02.1/lib/ocsigenserver/extensions/ocsipersist-dbm.cma: Ocsigen_extensions.Error_in_config_file("Bad tag database")"
<nullcat> sqlite installed
<nullcat> using "brew install sqlite"
<rgrinberg> i already sqlite installed and it didn't help unfortunately
<nullcat> OS X 10.10 with compiler 4.02.1
<nullcat> 10.10.2 actually
<Drup> can you load sqlite3 at all
<Drup> ?
<Drup> (utop, require, try to do something with it)
<rgrinberg> Drup: nope its borked
<Drup> ok
<rgrinberg> same error
<Drup> so it's not an eliom issue
<Drup> I'm not sure if I should be relieved or not
<nullcat> #require "sqlite3" in utop, same exactly error showed up
<Drup> well, try to debug that one, I can't really offer any help there :/
<nullcat> first step: copy the error message to Google
<nullcat> searching "Symbol not found: _sqlite3_enable_load_extension" gives some results...
<rgrinberg> maybe that
<Drup> ok
<Drup> better solution
<Drup> maybe
<Drup> replace the whole tag about ocsigenserver.ext.ocsipersist-sqlite
<Drup> by the thing commented just under.
<Drup> hum, nope
uris77 has quit [Quit: leaving]
<Drup> by <extension findlib-package="ocsigenserver.ext.ocsipersist-dbm"/>
<Drup> that works
<Drup> (at least for me)
<nullcat> adding a "/"?
pyon has quit [Ping timeout: 255 seconds]
<Drup> yes, and no subtags
<Drup> just this line remove the whole xml block
<nullcat> ok this time it looks good and the test is still running
<nullcat> no output for about one minute already
<Drup> "no output" ?
<Drup> once the server is launched, it serves files on localhost:8080, it doesn't output anything by itself :D
<Drup> as I said, it's not automated, you have to browse stuff and see if it's behave as expected
<Drup> but anyway, it's bugged now, it serves empty pages
<rgrinberg> Drup: paste some logs
<nullcat> good
<nullcat> so it now works for me
<Drup> rgrinberg: you can't make it work with dbm ?
<nullcat> and just put a conclusion here for me, line 32 "extension findlib-package="ocsigenserver.ext.ocsipersist-dbm"/>" only works
swgillespie has joined #ocaml
<Drup> and removing the 3 following lines, right ?
cesar_ has joined #ocaml
cesar_ is now known as Guest71124
pyon has joined #ocaml
<nullcat> yes
<Drup> rgrinberg: ^
<Drup> log with master : https://bpaste.net/show/d475f35eccb1
<Drup> log with cohttp : https://bpaste.net/show/ca3579a95c32
<Drup> both on acceding localhost:8080/
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> (well, master is served on 8081, but whatever)
Guest71124 has quit [Ping timeout: 256 seconds]
<Drup> (note: they both are on the same verbosity setting, the cohttp branches *really* need some more logging)
<Drup> branch*
<rgrinberg> hmm it looks like it's the url
<rgrinberg> why is the port colon percent encoded?
<Drup> rgrinberg: "/localhost%3A8080/" shouldn't be there at all
<Drup> it should be ""
<rgrinberg> ocsigenserver.opt: main: Fatal - Error in configuration file: Error while parsing configuration file: Eliom: while loading /Users/rgrinberg/.opam/4.02.1/lib/eliom/server/monitor/eliom_monitor_main.cmxs: error loading shared library: dlopen(/Users/rgrinberg/.opam/4.02.1/lib/eliom/server/monitor/eliom_monitor_main.cmxs, 138): Symbol not found: _camlEliom_monitor__content_html_4115
<rgrinberg> really strange stuff
<Drup> yes, I saw that one
<Drup> just use bytes
<Drup> not opt
<rgrinberg> Drup: so you're saying you're getting blank pages?
<Drup> rgrinberg: on which url ?
<rgrinberg> localhost:8080
<Drup> huuum
<Drup> Oooooh
<Drup> rgrinberg: past content of the page please
<Drup> paste*
<rgrinberg> <!DOCTYPE html><!-- Page generated by OCaml with Ocsigen.
<rgrinberg> See http://ocsigen.org/ and http://caml.inria.fr/ for information -->
<rgrinberg> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>
<rgrinberg> not much
<Drup> ok, yes
<Drup> I have the same
<Drup> it's not empty
<Drup> it's badly truncated
<Drup> and apparently it returns a 404 too
<rgrinberg> Drup: cohttp 0.16.0 fixes a truncation error (is_empty stuff was a work around)
<rgrinberg> perhaps it's somehow rearing it's head?
<Drup> which is just wrong
<rgrinberg> maybe try cohttp 0.15.2
<rgrinberg> both should still wokr
<Drup> so we have two bugs: 404 is wrong, bu truncation too
<Drup> rgrinberg: I should have waited a bit before integrating your patch for is_empty into the whole thing.
<Drup> (I believed you ! :p)
<rgrinberg> Drup: honestly my story is far fetched now
<rgrinberg> the bug is fixed
<rgrinberg> i tested it
<rgrinberg> etc.
<dinosaure> I come back
<Drup> dinosaure: an idea were truncation could happen ?
swgillespie has joined #ocaml
<rgrinberg> dinosaure: for some context, i removed your is_empty hack b/c my fix (link above) should have made it unnecessary
<dinosaure> yes, I see
<dinosaure> I'll search
lewis1711 has joined #ocaml
<rgrinberg> Drup: we probably don't even need eliom to reproduce this error
<lewis1711> what's the recommended way to save a datastructure to disk on ocaml? doesn't have to be human readable
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> lewis1711: ppx_deriving_yojson
<rgrinberg> lewis1711: Marshall
<Drup> no, not marshall x)
<rgrinberg> can we test that bit somehow?
<lewis1711> what's wrong with Marshal?
<Drup> it's unsafe
<MercurialAlchemi> Drup: out of curiosity, is it possible to get the list of endpoints known by eliom?
<Drup> it the data you marshalled is of the wrong type it will segfault
<lewis1711> also... it appears "Marshal" is mispelled in ocaml (:
<Drup> if*
<Drup> MercurialAlchemi: I don't think you can
<Drup> there are both good and bad reasons for that
<lewis1711> (reminds me of the time I spent hours figuring out why I couldn't create a new object for my ruby class... I wrote def "initialise" instead of US english "initialize")
<Drup> lewis1711: and ruby happily gobbled the whole without error :D
<lewis1711> yeap. but I digress
<lewis1711> Marshal sounds fine. it's a command line App, it's just associating weights with flashcards. nothing too complex
<Drup> except if you change caml version
<lewis1711> oh
<Drup> but don't change the file
<Drup> or change the type
<MercurialAlchemi> Drup: well, why wouldn't it?
<Drup> or try to load one file with an old version of the app, or conversely
<Drup> and then, it segfaults
<MercurialAlchemi> Drup: (talking about Ruby)
<Drup> don't use Marshal.
<Drup> It's the object.magic of serialization
<Drup> Obj.magic*
<Drup> (I'm not even talking about the security implications of loading some file in your memory as a raw ocaml layout)
<MercurialAlchemi> so what's the go-to serialization system if you don't got for object.magic?
<MercurialAlchemi> ppx_deriving_yojson?
<Drup> I personally think so, yes. there are other solutions dependings of what you need more precisely
<Drup> search for "listdir"
Gama11 has joined #ocaml
<Drup> (this extension is going to make you cringe, it's totally apache rewritten)
<lewis1711> I might just read and write to CSV files actually. json sounds like a whole 'nother kettle of fish
<Drup> lewis1711: why ?
<MercurialAlchemi> I had a thought the other day, that if you wanted fast, short-term serialization, you could use Marshal first, and then unmarshal+json in a process outside of the main loop
<lewis1711> Drup, it's flat data
<MercurialAlchemi> of course, this would only be interesting if yojson was very slow compared to Marshal
<Drup> well, if it's really a big table, then yeah, csv
<Drup> no ppx_deriving for you, though
<MercurialAlchemi> the advantage with CSV is that you can read it one row at a time
<MercurialAlchemi> (eg, if you need to print something, you don't need to load the entire thing in memory)
<lewis1711> I think it'd be a pain in ocaml to read a CSV file and say... modifiy the first value in each row
<Drup> not really
Gama11_ has joined #ocaml
<MercurialAlchemi> in my memory, the csv package on opam is decent
<Drup> yes
<MercurialAlchemi> (well, as far as CSV goes, that is - don't rely on it if you need interop guarantees with eg, Excel, without doing a lot of testing)
Gama11 has quit [Ping timeout: 264 seconds]
<Drup> It has some compat mode with excel
<Drup> not sure how much it works, but it exists
huza has quit [Ping timeout: 250 seconds]
<lewis1711> ah yes the undocumented CSV module. I'll just do it myself. it's just storing simple data, no excel needed
nullcat has quit [Quit: gone...]
<Drup> rgrinberg, dinosaure: I gotta go. If none of you added it, I will try to add some more logging.
<dinosaure> ok :)
djellemah has joined #ocaml
kakadu has joined #ocaml
djellemah_ has quit [Ping timeout: 252 seconds]
swgillespie has joined #ocaml
ggole has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
<dinosaure> Drup: rgrinberg: I revert the 'is_empty' commit and it's ready !
<dinosaure> cumuus works !
<Drup> push the new commit please
<dinosaure> volà
Submarine has joined #ocaml
Gama11 has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Gama11_ has quit [Ping timeout: 264 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest64609
rwmjones_hol has quit [Read error: Network is unreachable]
ingsoc has joined #ocaml
rwmjones_hol has joined #ocaml
matason has joined #ocaml
Guest64609 has quit [Ping timeout: 265 seconds]
matason has quit [Ping timeout: 264 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
dav- has joined #ocaml
bjorkintosh has quit [Read error: Connection reset by peer]
bjorkintosh has joined #ocaml
dav- has quit [Ping timeout: 265 seconds]
jbrown has quit [Ping timeout: 252 seconds]
milosn has quit [Ping timeout: 255 seconds]
jbrown has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
nojb has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
ggole has quit []
rand000 has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cross has quit [Ping timeout: 255 seconds]
Simn has joined #ocaml
Gama11_ has joined #ocaml
Haudegen has joined #ocaml
Gama11 has quit [Ping timeout: 252 seconds]
kakadu has quit []
kakadu has joined #ocaml
lordkryss has joined #ocaml
The_Mad_Pirate has quit [Quit: Konversation terminated!]
tane has joined #ocaml
The_Mad_Pirate has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest1029
Guest1029 has quit [Ping timeout: 256 seconds]
<apache2> json :( how about flatbuffers / protocolbuffers? or msgpack, if you HAVE to have inline schemas?
swgillespie has joined #ocaml
avsm has joined #ocaml
<lewis1711> huh, so utop is taking up over half my ram somehow... is it known to have leaks?
tane has quit [Quit: Verlassend]
milosn has joined #ocaml
matason has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
<kakadu> lewis1711: There is a probablity that it is normal behavior
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kakadu> lewis1711: For example, if you have created a very big array and saved it with some binding.
The_Mad_Pirate has quit [Quit: Konversation terminated!]
The_Mad_Pirate has joined #ocaml
ontologiae has joined #ocaml
Hannibal_Smith has joined #ocaml
The_Mad_Pirate has quit [Quit: Konversation terminated!]
avsm has quit [Quit: Leaving.]
The_Mad_Pirate has joined #ocaml
kushal has joined #ocaml
nojb has quit [Quit: nojb]
sdothum has joined #ocaml
rgrinberg has joined #ocaml
<lewis1711> kakadu, no clue what it was. wasn't dealing with any huge arrays. *shrug*
BitPuffin has joined #ocaml
<lewis1711> is it possible to load a script in an ocaml source file? as in, not compile it, but interpret it?
<lewis1711> like a config.ml or some such
rgrinberg has quit [Ping timeout: 256 seconds]
<mrvn> bytecode can invoke the toplevel with a string
ygrek_ has quit [Ping timeout: 252 seconds]
<lewis1711> mrvn, I am kind of wanting some compiled module to interpret another file, one that could have settings and be edited without recompiling everything else. not sure if possible
nojb has joined #ocaml
<mrvn> you can write your own parser and interpreter
<lewis1711> haha, as fun as that sounds, I thought I'd see if there's a way around it
<lewis1711> I think C# lets you do it
cesar_ has joined #ocaml
cesar_ is now known as Guest70078
<mrvn> well, ocaml can do it in bytecode because there you have the interpreter right there. Not so in native code.
<mrvn> You need some interpreter if you want to run the script.
<reynir> I haven't used it, but could Dynlink be relevant?
<lewis1711> yeah but F# had some deal where you could intepret *from* compiled code
<lewis1711> *C#
<lewis1711> but in the absence of that, I'll just parse a little text file
<lewis1711> no big deal, just thought the other option would be cleaner if it existed
Guest70078 has quit [Ping timeout: 265 seconds]
<apache2> F# / C# share the .net "common language runtime (CLR)" bytecode interpreter. compilation from code to cil will require having the intermediate parser/compiler in memory.
<lewis1711> there was a scheme you could do it from as well... can't remember which
Nahra has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
<nojb> should I be careful if allocating lots and lots of small bigstrings (I am not sure how bigstrings and the gc interact...) ?
<mrvn> nojb: aren't bitstrings just strings underneath?
<nojb> sorry s/bitstrings/bigstrings
<nojb> bigstrings = 1-dim bigarray of chars
<mrvn> That has a small ocaml block in the GC and a large block allocated outside.
<nojb> yes, but when is the large block outside collected ?
<mrvn> It can fragement your address space, which would only be a problem for 32bit.
<mrvn> nojb: it's collected when nothing references it anymore. Problem is they can't be moved (which is alos its advantage)
<nojb> are they allocated with malloc ?
<mrvn> nojb: yes
<nojb> so it could happen that using a lot of small bigarrays would cause the heap to grow quite a bit because of fragmentation ?
<mrvn> nojb: yes.
<mrvn> or rather it might prevent it from shrinking again when you free only some.
<nojb> right
<mrvn> if you keep creating and freeing bigstrings then memory will be reused.
<nojb> it looks like maybe it would be useful to define a little 'malloc' on the ocaml side giving out slices of a big bigarray to avoid this problem ...
<mrvn> depends on your libc and your exact use case
<nojb> right
<nojb> thanks much !
<mrvn> if you have a small number of sizes that are use verry frequent then you can do a lot better than a generic malloc.
<nojb> mrvn: could you elaborate ?
Haudegen has joined #ocaml
<mrvn> The generic malloc has to deal with objects of all sizes and you get fragmentation and have to split/merge memory blocks. If you know you will need about a million 64byte blocks you can just allocate 64MB and hand that out in 64byte chunks far more efficient.
<nojb> right - and I could do this easily from the ocaml side
<mrvn> you can write your own module that includes Bigstring but uses it's own C function to allocate new strings. It's pretty easy.
<nojb> thanks
cmtptr has quit [Quit: rebooting]
cmtptr has joined #ocaml
psy_ has quit [Remote host closed the connection]
keen____ has quit [Read error: Connection reset by peer]
keen____ has joined #ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
avsm has joined #ocaml
avsm has quit [Client Quit]
milosn has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
struktured has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
Hannibal_Smith has quit [Remote host closed the connection]
vivien_ has joined #ocaml
<vivien_> Hello dear OCaml users, I have managed to tell oasis to build the API for my project, but now I would like to install it. ocaml setup.ml -configure pretends that it will be installed in $datarootdir/doc/$pkg_name, but "ocaml setup.ml -install" won't do it. Is there a command-line option for "-install" ?
govg has quit [Remote host closed the connection]
<vivien_> The online manual (http://oasis.forge.ocamlcore.org/MANUAL.html#ocaml-setup.ml--install) clearly reads : "ocaml setup.ml -install / This step is mandatory. Install what has been built in build and doc step."
<vivien_> My bad. I didn't look in the right place. Sorry.
vivien_ has quit [Quit: Konversation terminated!]
milosn has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest84974
Guest84974 has quit [Ping timeout: 256 seconds]
idegen has joined #ocaml
ygrek_ has joined #ocaml
nojb has quit [Quit: nojb]
govg has joined #ocaml
nojb has joined #ocaml
jbrown has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
jbrown has joined #ocaml
ollehar has joined #ocaml
kushal has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Ping timeout: 250 seconds]
tel has joined #ocaml
kushal has joined #ocaml
<tel> Anyone use Goji? I had a pleasant experience writing a binding with it yesterday, but I'd like to see if it can be used to structure larger projects.
ollehar has quit [Ping timeout: 264 seconds]
<tel> In particular, I'm having trouble getting it to work nicely with larger bindings when they're split into several modules
<tel> Which I guess could just be a normal OCaml shared library issue
myst has quit [Read error: Connection reset by peer]
dav has joined #ocaml
dav_ has quit [Ping timeout: 272 seconds]
<tel> Apparently I have to compile a .cmxs file for each component and package independently and "generate" them all with goji?
darkf has quit [Quit: Leaving]
myyst has joined #ocaml
myyst is now known as myst
rgrinberg has joined #ocaml
ggole has joined #ocaml
tel has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
nojb has quit [Quit: nojb]
cesar_ has joined #ocaml
cesar_ is now known as Guest77120
ingsoc has quit [Ping timeout: 248 seconds]
Guest77120 has quit [Ping timeout: 256 seconds]
nojb has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
<rgrinberg> dinosaure Drup: i ended up falling asleep. so what happened?
nojb has quit [Quit: nojb]
<adrien> the rapture
<rgrinberg> looks like I slept through church too :/
<adrien> you and I got left behind: everyone else was chosen but us ='(
BitPuffin has joined #ocaml
troydm has joined #ocaml
nojb has joined #ocaml
tel has joined #ocaml
Simn has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
Simn has joined #ocaml
psy_ has joined #ocaml
<tel> What's a good way to learn how to use Assemblage? Is it stable enough for public consumption?
<nojb> no
<Drup> tel: can you link to your library ? I'm happy to see goji users
<Drup> can't answer your question though, sorry
BitPuffin has quit [Ping timeout: 255 seconds]
<tel> Drup: it's hardly anything at the moment, I'm still struggling to get the pieces together, but https://github.com/tel/ocaml-meteor-bindings
<Drup> lewis1711: sure you can use the interpreter (in bytecode, as mrvn said). It's compiled and will work well. You can look at utop
<Drup> meteor ? hum.
<Drup> I'm a bit puzzled at the actual utility in ocaml, but why not
<tel> Drup: hah, yeah
<mrvn> tel: No README.md that describes what that even is?
<tel> I took at stab at it because I was conveniently reading through the documentation recently, the ROI is uncertain
<tel> mrvn This certainly isn't ready for public consumption yet... It's like an hour's work. But, https://www.meteor.com/
<Drup> krkr, "fast", "nodejs"
<mrvn> Which gives just a white page. Thank you from writing html pages in js.
<Drup> well, that's kinda the concept of meteor to begin with
<Drup> it's basically eliom in node.js
<mrvn> one can still provide stuff on a webpage that doesn't need java scripts to show up
<Drup> (hence why I doubt the utility, tel ;)
<Drup> (especially since, considering your background, getting up to speed with a complicated library shouldn't cause you that much trouble ;))
<tel> Drup Somehow I hadn't even run across Eliom yet. I honestly get quite turned away by the Ocsigen website
<Drup> mrvn: I agree, but heh.
<Drup> tel: ah yes, I know.
<Drup> don't worry, you're not the first one and I don't disagree.
<mrvn> Drup: absolute minimum would be "Your browser does not support java script"
<Drup> mrvn: yes
<dinosaure> rgrinberg: I fix the bug of truncate page with a revert of is_empty commit
<rgrinberg> tel: please solve streaming io for OCaml instead :P
<dinosaure> cumulus works now :)
<rgrinberg> dinosaure: fully works?
<rgrinberg> dinosaure: for the life of me I don't know how my fix didn't do it :/
<rgrinberg> oh well the lesson here is to write tests next time
<dinosaure> rgrinberg: I don't know too :(
<Drup> rgrinberg: tbh, I don't think tel's solutions are very practical.
<tel> How do Eliom and Ocsigen relate to one another? I had the impression Ocsigen is for static pages?
<dinosaure> I can create an instance of cumulus in my server for a stress test with an old dump of database
<rgrinberg> tel: ocsigen is a server, eliom is a framework
<Drup> actually, no
<Drup> Ocsigen is the whole project
<Drup> the server happen to be called "ocsigenserver"
<Drup> and eliom is the framework, yes
<tel> rgrinberg Drup: I basically agree. I think they're sensible in Haskell, but I'm not terrifically sure that such idioms translate practically to OCaml
<Drup> tel: did you tried a bit of benchmarking ?
<Drup> well, I could try with lilis
<tel> Drup Huhh. So, Eliom produces applications which run on both the client and the server? I think I got quite turned around at some point.
<Drup> yes
<rgrinberg> tel: yeah the solutions don't translate but the problems definitely do. It's a real pain point in OCaml for me :/
<Drup> As long as you avoid leftovers n__n
<tel> Drup: No, not yet. Tbh, I wrote them initially to just practice writing non-trivial things in OCaml. I'm still getting my head around the right way to think about optimization when you don't have the aggressive inlining I'm used to ;)
<rgrinberg> you might not have to think so hard about it in the future
<rgrinberg> how's Pierre Chambart's branch doing?
<Drup> well, next ocaml version, you will have agressive inlining :D
<tel> :D
<mrvn> tel: ocaml does coss module inlining all on its own. Much better than what you get in C/C++
<Drup> rgrinberg: almost ready to be merged :3
<Drup> mrvn: err, yes, but no
ollehar has quit [Ping timeout: 248 seconds]
<rgrinberg> Drup: do we have some general wisdom on how much slower compilation will be?
<rgrinberg> with the inlining pass of course
<tel> mrvn I'm used to Haskell. Pretty much everything w.r.t. streaming in Haskell is getting it to compile away code.
<Drup> rgrinberg: not all that much
<Drup> I think
<rgrinberg> Drup: constant time if you use camlp4 i bet ;)
<mrvn> tel: doesn't haskell do a whole programm optimization till your dead?
<Drup> rgrinberg: you can test, it's one switch away :D
<Drup> rgrinberg: and considering the crazy performance gain ...
<tel> mrvn Nah, it has module boundaries and doesn't inline recursive things. The module boundaries leave inlining hints though so it can do a little cross-module inlining.
<Drup> (on Lilis, pierre told me it was around ~20/30%
<tel> !!
<mrvn> Drup: Does the new code inline closures?
<Drup> it inlines *everything*
<tel> Drup Everything? Like -O99 whole program optimization? ;D
<Drup> tel: well, no, there is the inline argument for size constraint
<Drup> which is actually significant now, as opposed to before
<mrvn> does it specialize types after inlining, e.g. the (=) : int -> int -> bool instead of 'a -> 'a -> bool?
<Drup> some big ocaml program used to have -inline 10000
<tel> haha
<Drup> with that, pierre's branch get out of memory by trying to inline Core.
<Drup> :D
<rgrinberg> Drup: :O
<rgrinberg> core isn't even that big
<mrvn> What's that number? 10000 expressions?
<Drup> rgrinberg: if you are trying to inline it in every functions, it is :D
<Drup> mrvn: the allowed size augmentation by function
<mrvn> Drup: size being measured as what?
<tel> What's the branch switch?
<Drup> 4.02.0dev+pr132
<tel> And then I'm going to dive into Eliom. Because I'd really like to not write a Javascript front-end *in* Javascript.
<Drup> tel: :D
<rgrinberg> tel: \o/
<rgrinberg> tel: do you like the ocaml way of doing everything on github?
<rgrinberg> (apart from bug reports but we don't talk about that)
ingsoc has joined #ocaml
<mrvn> rgrinberg: Is that the official way now? No longer just an experiment?
<rgrinberg> mrvn: i don't mean just the compiler. opam, the website, etc.
<Drup> (funny story about chambart's branch: if you write an eval function on some AST term with the type ('a -> 'b) t -> 'a -> 'b, "eval t" is statically evaluated by the inliner)
<Drup> (:D)
<tel> rgrinberg There's a lot to like offhand, just loving Github.
<tel> rgrinberg: But as I said on Twitter... The biggest pain point is missing out on centralized documentation. Or even just standardized.
<mrvn> Drup: so it's not just inlining but also evaluating constexpressions?
<tel> I saw codoc recently, which I think is what you referred to
<Drup> mrvn: well, it's mostly inlining
<Drup> mrvn: it stopped being an experiment when xavier and damien started doing PR that way
<rgrinberg> tel: yeah this is because tooling is still balkanized
<rgrinberg> tel: after assemblage is out we will have a crusade if it's any good
<Drup> (codoc is going to be ~fabulous~ )
<rgrinberg> get everyone to switch
<tel> !!
<mrvn> Drup: if I write a factorial and then 'Printf.printf "fac 10 = %d\n" (fac 10)' will it generate code for puts("fac 10 = 12345\n");?
<Drup> mrvn: maybe not inside the string
<Drup> but probably evaluated the fac 10
<Drup> oh, actually, since format's are a nice pure GADT now, maybe inside the format, yes
<mrvn> Drup: Yeah, evaluating the format conversion might be too much to ask. But Printf.printf "fac 10 = %d\n" 12345 is already a lot.
<Drup> yeah
<tel> Drup is there any local control to inlining?
<Drup> tel: not yet, but pierre plans to
<Drup> with [@@ocaml.inline]
<mrvn> Drup: Problem is that you easily run into the halting problem there. What if I write an ackerman function and ack(10,10)?
<tel> Drup and did you mean 4.03.0dev+pr132? 4.02 seems to not exist? Or maybe I just don't know how to use opam switch quite right yet
<Drup> mrvn: indeed, that's why it's parametrized by the size
<mrvn> Drup: before or after optimizing the arguments?
<ggole> tel: 4.02.1, probably
<Drup> Pretty sure it's before
<Drup> mrvn: I don't know the details.
<ggole> tel: you can use opam switch -a to see all the possibilities
<rgrinberg> make sure to opam update as well
<mrvn> Drup: so fac(10) becomes 10 * fac(9) becomes 10 * 9 * fac(8) ... and in the end it evaluates it. Then that would quickly abort for ack()
<Drup> tel: "opam switch install 4.02.0dev+pr132"
<tel> aha, opam update >_<
<Drup> mrvn: yes
<Drup> I think.
<mrvn> Drup: Would it generate a fac(1), fac(2), ..., fac(5) and then fac(n) = n * (n-1) * (n-2) * (n-3) * (n-4) * fac(n-5)?
<mrvn> I think gcc can do that sometimes
<Drup> mrvn: your question is too technical, please try by yourself :D
<rgrinberg> -_-
<Drup> I'm still wondering occasionally
<tel> Why does opam only do fast switches off the system compiler?
<Drup> what do you mean ?
<tel> If I want an isolated package set and use `opam switch -A 4.02.1 myproj` it reinstalls 4.02.1, but if I do `opam switch -A system myproj` it doesn't need to apparently?
<Drup> ah, yes, it's because of the ocamlfind tree, I think
<Drup> there was a discussion about it on the bug tracker at some point
f[x] has joined #ocaml
<tel> It's not the worst thing in the world since the compilers are actually remarkably fast to compile themselves, but it just seemed odd
ygrek_ has quit [Ping timeout: 255 seconds]
<lewis1711> i'd use it if it had more libraries...
<rgrinberg> tel: there was a comment by some ocaml dev not long ago "it takes less time to compile ocaml itself than a random package from hackage" ^_^
<rgrinberg> lewis1711: are you missing anything in particular?
<tel> rgrinberg: ugh, yes
<lewis1711> rgrinberg, I'm fundamentally lazy. I'd probably use ocaml for everything if it had more libraries. off the top of my head... something like mechanize for web-scraping
<tel> rgrinberg: I *love* lens, but I could do without compiling it ever again. Let alone in any given project.
<lewis1711> or are you talking about SML? because even ocaml doesn't have enough stuff for me really
<Drup> ahah, lens.
<Drup> tel: about switches
<tel> Drup: lens ~= Core, yeah? ;)
<rgrinberg> lewis1711: i'm talking about OCaml. SML is like a fossil - planeted by the devil to deceive us :/
<rgrinberg> lewis1711: something like mechanize would be nice
<Drup> I personally have a set of switch (and alias switch) for various purposes pre-made and I locally enter them using eval `opam config env --switch FOO`
<lewis1711> yeah, mechanize is great. though I could imagine someone implementing it as some overly typed thing that was more painful to use
<Drup> (I have one with stable eliom to answers question, one on trunk, one on my dev version, one on last stable to do non-compiler dev)
<lewis1711> if I wasn't so lazy I'd use Ctypes to embed ruby in ocaml
f[x] has quit [Ping timeout: 246 seconds]
<tel> Drup I'll try to evolve my usage that direction and see how it feels. :)
<Drup> I'm very satisfied with this setup
<tel> Ugh. Darwin. pkg-config not found
<Drup> I can, at the same time, hack on 4.03+trunk, answer a question about stable eliom and recompile dev eliom :D
<rgrinberg> lewis1711: i don't think typing makes it harder look at hxt in haskell
<rgrinberg> although it's dooubtful if we can port it over to OCaml :O
<Drup> (and it's *awesome*)
dav_ has joined #ocaml
<tel> :D
<Drup> (if a tiny bit overkill)
<Drup> (but it's so easy to do !)
Haudegen has quit [Ping timeout: 246 seconds]
<tel> haha
<lewis1711> rgrinberg, I saw "Control.Arrow" and stopped reading
<Drup> lewis1711: arrows are cool :(
<lewis1711> I'm a filthy impure functional person. I use Option and that's about it
<rgrinberg> in general you can't learn much from the haskellwiki unless you know 90% of what you're trying to learn
<tel> rgrinberg: Ha, so true..
<Drup> lewis1711: well, it's different
<lewis1711> your name reminds me of forth Drup. DROP DUP
dav has quit [Ping timeout: 264 seconds]
<Drup> don't worry
<Drup> the joke as already been made, in different format, by various people :D
octachron has joined #ocaml
<lewis1711> here I was thinking I was original
<tel> lewis1711: Arrows sort of capture the same idea as functions. If you are used to programs which can be composed from pipelines of functions then a similar thing happens for Arrows. But they're weird, have a new syntax, and generally lots of somewhat confusing documentation.
<Drup> (along with the incredible incapacity of english speaker to pronounce the "u" sound :D)
cesar_ has joined #ocaml
<lewis1711> Drup, what language?
<tel> Drup: as an english speaker I'm curious---how are you supposed to pronounce "Drup"?
cesar_ is now known as Guest15853
<Drup> https://fr.wiktionary.org/wiki/luth listen to this u
ontologiae has joined #ocaml
<tel> I hear that as "luh yu teh", so "druh yu peh"?
<tel> (not sure if that translates, hah)
<Drup> english basically doesn't have this sound and every english speaker I know pronounce it almost like "Drop"
<Drup> tel: I don't know where you "yu" comes from :D
<tel> I'd been mentally saying "droop"
<rgrinberg> i say droop
<Drup> yes, I know :D
<ousado> and there I thought it was a slightly harsh suggestion to get a PhD
<tel> haha
<rgrinberg> like the drup in drupal
Guest15853 has quit [Ping timeout: 265 seconds]
dav_ has quit [Ping timeout: 265 seconds]
<Drup> well, I always pronounced drupal with a u as in french luth x)
dav has joined #ocaml
<tel> Or "drup" rhyming with "cup", but I wouldn't go there first. Huh.
<Drup> anyway, as I was saying, english speaker don't have this sound so it's rather unimportant, I accept all pronunciations :D
<tel> haha, fair enough
<Drup> (it's not their fault, poor english speakers :D)
<lewis1711> sounds kind of like german ü
<Drup> german do have that sound, yes
<lewis1711> if only ocaml strings could understand them
<Drup> they can
Haudegen has joined #ocaml
<lewis1711> hmmm utop doesn't like it when I try and put chinese characters in strings. the cursor loses track of where it's supposed to be (presumably because they are double wide)
<Drup> that's weird
<lewis1711> so the visual position of the cursor gets out of synch with the actual position of it
<Drup> are you inputing in utf8 ?
<lewis1711> you know I don't even know... I just assumed. I use whatever sunpinyin gives me
<lewis1711> not even sure how you test if a glyph is utf-8
The_Mad_Pirate has quit [Ping timeout: 250 seconds]
<octachron> I have never tested that before, but I can also reproduce the bug with utop and japanese kanji
<Drup> ah yes, japanese kanji, there is a bug like that
<Drup> but "ü" works fine
<lewis1711> ah, yes I meant characters like "華" which have a common subset with kanji I beleive
<lewis1711> double wide
nojb has quit [Quit: nojb]
<Drup> right
<octachron> yes, kanji were imported from China
<rgrinberg> octachron: kanji is like most other things then
ollehar has joined #ocaml
WraithM has joined #ocaml
<octachron> The behavior with devanagari(देवनागरी ) is also funny. Probably the diacritic signs?
ollehar has quit [Client Quit]
<tel> Do you need to use all of the specialized build tools to make ocsigen work? I think I used them last time I tried to dig into this, but I'd like to see if I can generalize my knowledge of ocamlbuild now.
<rgrinberg> tel: aren't those specialized build tools just thin wrappers around ocamlbuild?
<tel> rgrinberg: I have no idea :) Just trying to learn
<Drup> rgrinberg: eliom-distillery produces a makefile
<Drup> tel: I would advise against trying to understand eliom's compilation scheme at the beginning
<tel> Hm. Just use distillery, eh?
<Drup> yes.
<rgrinberg> Drup: didn't jpdepliax port some build stuff to an ocamlbuild plugin?
<Drup> it has shortcoming, but I'll get you started quickly
<rgrinberg> maybe i'm confusing my irc history
<Drup> rgrinberg: that's what I linked
<rgrinberg> Drup: ah ok
<Drup> but he refused to make an eliom-distillery template despite ... insistent encouragements. :3
<tel> Drup: I'm happy going that way, but I want to note what was driving me to want to compile it on my own. I saw the "Hello world" example here: http://ocsigen.org/tuto/4.2/manual/how-to-make-hello-world-in-ocsigen
<tel> And wanted to get a quick win... but there's no clear way to compile that directly
<Drup> tel: eliom-destillery basically produces the hello world for you =')
<Drup> distillery*
<tel> The compile page suggests the distillery, but it doesn't answer the question on my mind of "how do I make this page run"... even if the distillery itself would drop me into that pagee
<Drup> it doesn't ?
<Drup> hum.
<Drup> http://ocsigen.org/tuto/4.2/manual/application first tutorial, first paragraph
<Drup> come on !
<Drup> okay, *second* paragraph
<tel> Haha, not saying it doesn't! :)
<tel> Just that I saw that hello world page and got a little confused
<Drup> we definitly need to clean up the story on the introduction to eliom, you are totally right.
<Drup> it's .. surprisingly difficult.
<Drup> (or maybe we are just terrible at pedagogy)
<tel> Drup: Taking off my genuine beginner hat... I think there's just a lot of content. It can be harder to handle that before you've got a firm footing.
<tel> Having one "blessed" intro tutorial and making it clear that it's the first thing you should do could be helpful.
<tel> Or if there is one of those already... maybe I just missed it :(
<Drup> there is one of those, which is the one I linked, but the path from the frontpage to it is not as direct and clear as it should be.
<Drup> also, the issue with the "blessed" tutorial is that people people say "but I want only the client/ not client/server stuff/.."
<Drup> and think eliom is not for them and imediatly leave
<tel> haha, I can see that happening
<tel> Sorry, yeah, to be clear... I'm just trying to share my experiences, not suggest that I know any better than you guys how to put this stuff together! :)
<Drup> tel: don't worry, it's very valuable, keep doing it
<Drup> (a step by step ultra-detailed report of what a beginner is doing/thinking when trying to learn eliom would be *incredibly* valuable)
<rgrinberg> Drup: if tel can't get started than it's a problem :P
kushal has quit [Ping timeout: 255 seconds]
<tel> I think I jumped and clicked on the "Hello world" example because it is such a repeatedly used intro project. I skipped over "Client/Server application" because I felt it'd be overview material.
<tel> rgrinberg: I wouldn't overestimate me ;)
<Drup> rgrinberg: "but, this client/server interaction could totally be modeled in a purelly functional fashion with a comonad in the category of Shoubidoo, as demonstrated by Oleg in his paper about Badabum endomorphism" :<
<Drup> </#haskell>
<Drup> :D
<tel> I dunno, Shoubidoo doesn't have a good story for non-locality which you'd probably want for client/server stuff
<tel> ;)
<Drup> (the badabum endomorphism should totally be a thing)
<tel> It sounds like something Conor McBride would write
<Drup> oh, yes :D
kushal has joined #ocaml
<Drup> with a nice little algebraic structure on top of it
<tel> And now I'm already looking for the long range pun. It's gotta be something that people don't realize was going on for a solid week.
<Drup> "You can apply the derivation operator on badabum endomorphisms to obtain bibimbaps, which are delicious and continuous"
<tel> Hmm. Does merlin dislike .eliom files? Or might there be a configuration issue?
<Drup> (and now I want to go to a korean restaurant))
<tel> haha
<rgrinberg> does oleg even talk about category theory much?
<tel> A live down the street from one. It's dangerous.
<Drup> rgrinberg: not so much, no, only when relevant to practical concerns
<tel> rgrinberg: Not so much. I tend to think of him as playing with continuations.
<Drup> tel: and staging.
<tel> yeah
<Drup> tel: merlin do dislike eliom files
<Drup> It's ... complicated to solve
octachron has quit [Quit: Leaving]
<tel> :(
<Drup> I know
kushal has quit [Ping timeout: 246 seconds]
<Drup> we might get around it, eventually, but for now, you'll have to do without it
<Drup> it's unfortunate, because the tooling that was available when .eliom files were designed work rather well (.annot + tuareg mode), but the new tooling is too clever, and try to look at the files too closely and notice how the syntax is not regular ocaml :(
Tekilla has joined #ocaml
<tel> ahh, I noticed that merlin's issues have been gathering people troubled by their favorite syntax extensions not working
<Drup> yes
<Drup> It gets much better with ppx
Gama11 has joined #ocaml
<tel> Oomph. And now I'm hit by sqlite3 again on Darwin. That's definitely my own issue, but it's a bit weird to see it fail to get linked in on this example page.
<Drup> tel: open the Makefile.options
<Drup> locate the line with sqlite on it
<Drup> replace by dbm
<Drup> (and install dbm if not already done)
Gama11_ has quit [Ping timeout: 272 seconds]
<tel> Nice!
Anarchos has joined #ocaml
Hannibal_Smith has joined #ocaml
<tel> Thanks for the help and conversation everyone. I'm gonna drop off for a bit--cheers!
jbrown has quit [Ping timeout: 250 seconds]
tel has quit [Ping timeout: 248 seconds]
jbrown has joined #ocaml
swgillespie has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest98528
mcc has joined #ocaml
Guest98528 has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
c355E3B has joined #ocaml
matason has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Ping timeout: 250 seconds]
ingsoc has quit [Read error: Connection reset by peer]
Denommus has joined #ocaml
yomimono has joined #ocaml
pyon is now known as dysfunc-pyon-al
Denommus has quit [Read error: Connection reset by peer]
Denommus has joined #ocaml
milosn has quit [Ping timeout: 256 seconds]
milosn has joined #ocaml
nullcat has joined #ocaml
<nullcat> Does OCaml put limit on the number of elements a tuple can have?
<ggole> Same as array length iirc
<ggole> The type checker might not like that many though.
yomimono has quit [Ping timeout: 244 seconds]
matason has joined #ocaml
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 256 seconds]
<mrvn> nullcat: the GC can only handle chunks of a maximum size.
<mrvn> Nothing in the language itself sets a limit
ggole has quit []
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
Simn has quit [Quit: Leaving]
<lewis1711> the only way to initialise a module with some state is to pass another module into a functor, right? like I can't just have some int that's passed in?
Denommus` is now known as Denommus
<lewis1711> I am assuming if I want something like that I do the function that creates objects thing
Denommus has quit [Read error: Connection reset by peer]
c355E3B has quit [Quit: Leaving]
Denommus has joined #ocaml
<rgrinberg> lewis1711: you can always write a function that takes the "state" and returns the module (if htat's what you mean by state)
<rgrinberg> why can't you just use a record or an object though?
dav_ has joined #ocaml
<Drup> functors taking a module with only a single value inside are fine
<Drup> at least I think so
<Drup> I use this trick for the same purpose that you said, to initialize some state. For example LLvm/Z3's "contexte"
<Drup> -e
<Drup> it has the sort of "bonus" that if you pass the same module (with the same context) twice, the types in the functor are equal, which is generally what you want for context-like things
cesar_ has joined #ocaml
cesar_ is now known as Guest81803
dav has quit [Ping timeout: 256 seconds]
<lewis1711> I am tempted to use an object over a class if it's just a single value. rather than go through the ceremony of creating a module just to wrap a value
<lewis1711> but I am stil new to ocaml modules
<Drup> bah, no such ceremony
<Drup> module let x = v ed
<Drup> end*
<flux> ..is there a place you can put that fragment as-is?
Guest81803 has quit [Ping timeout: 265 seconds]
rwmjones_hol has quit [Read error: Connection reset by peer]
<Drup> in a functor call :D
rwmjones_hol has joined #ocaml
yomimono has joined #ocaml
<Drup> oh yes, s/module/struct/
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nojb has joined #ocaml
<mcc> Is it surprising if Merlin is, um
<mcc> attempting to typecheck my C++ files
<mcc> (and failing)
<flux> well, it would be more surprising if it succeeded
<flux> maybe the next version..
tane has joined #ocaml
<flux> maybe you have slightly misconfigured emacs?-o
<flux> ie. using the merlin mode in C++ buffers as well?
<Drup> that would be very audacious :D
swgillespie has joined #ocaml
matason has quit [Ping timeout: 264 seconds]
malc_ has joined #ocaml
Nahra has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mcc> wait, wait, hold on, now i'm confused
<mcc> i was wrong
<mcc> it is attempting to syntax-check my C++ files, AND SUCCEEDING
<flux> cool \o/
<mcc> did i just accidentally enable some kind of vi syntax mode at the same time I was enabling merlin?? D:
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
Denommus has quit [Ping timeout: 244 seconds]
Denommus has joined #ocaml
Meths has joined #ocaml
<Meths> Are there devs here familiar with building ocaml? I'm getting link time undefined symbol errors. Can I get help with that here or do I need to ask on the ML or open a ticket in the bug tracker?
<nojb> which symbols ?
<nojb> how are you building ocaml ?
c355E3B has joined #ocaml
<Meths> From source inside a build framework that unifies our environment. Host OS is SmartOS (Solaris). Using GCC.
malc_ has quit [Quit: leaving]
shinnya has quit [Ping timeout: 264 seconds]
<nojb> sorry - no idea
<Drup> do you know what your "unifying build framework" is calling to build ocaml ?
<Meths> Is calling where? Our make is gmake, gnu as, solaris ld.
BitPuffin has joined #ocaml
<Drup> which commands
BitPuffin has quit [Remote host closed the connection]
<Drup> I doubt you replaced ocaml's build system (that would be literally insane) so you are using it, how ?
BitPuffin has joined #ocaml
<Meths> Just standard call to configure, make world opt opt.opt... http://pastie.org/private/tj7j9yqxyvqw90i8s5owwg
<Drup> huum
<Drup> Meths: I guess the issue solaris, so you are good for a mantis ticket.
<Meths> Okay, thanks.
<Meths> I also found the build didn't get this far when I tried in parallel suggesting the build isn't parallel safe. Is that a known issue or something else to raise?
<Drup> it's occasionally parallel safe. :D
<Meths> hah :)
Hannibal_Smith has quit [Remote host closed the connection]
ollehar has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 265 seconds]
adrien has quit [Quit: leaving]
adrien has joined #ocaml
lewis1711 has quit [Ping timeout: 264 seconds]
tane has quit [Quit: Verlassend]
kakadu has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
ollehar has quit [Quit: ollehar]
Gama11 has quit [Read error: Connection reset by peer]
yomimono has quit [Ping timeout: 256 seconds]
nojb has quit [Quit: nojb]
Denommus has quit [Ping timeout: 255 seconds]
Denommus has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest45286
Guest45286 has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
<rgrinberg> Drup: so are there any outstandings bugs with cohttp ocsigen?
<Meths> Drup: Found some more illumos/Solaris platforms to build on and they work so will need to continue investigating as it doesn't appear to be a general Solaris bug.
rand000 has quit [Quit: leaving]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
seangrove has joined #ocaml
Denommus has quit [Quit: Bye]
struktured has quit [Ping timeout: 265 seconds]
seangrove has quit [Ping timeout: 246 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
dav_ has quit [Ping timeout: 246 seconds]
dav has joined #ocaml
dav has joined #ocaml
dav has quit [Changing host]
keen_____ has joined #ocaml