<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>
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...
<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>
(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
<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" ?
<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>
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
<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
<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"?
<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
<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>
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
<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]
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?
<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!]