<Drup>
(stop asking me questions about libraries I don't know ! :D)
<rgrinberg>
Drup: i know ocsigen as much as you know re :P
<Drup>
yes and no
<rgrinberg>
besides you don't need to know the internals, the snippet of code is self contained you have a match that's 0 length how do you advance your position and how do you mutate the replacement buffer?
<dmbaturin>
Is there a complete list of ocaml type rules somewhere?
<Drup>
dmbaturin: outch.
<Drup>
hum, no, there is not
<Drup>
and frankly, I'm not sure that's a reasonable query
<rgrinberg>
ah yes, OCaml is one of those languages without a "standard"
<Drup>
ocaml's type system is just too big and too complicated at this point for a complete formalization.
<Drup>
(some little bits have been formalized independently in various papers, but not the whole and certainly not the implementation)
<dmbaturin>
Did anyone formalize polymorphic variants?
ygrek has joined #ocaml
<dmbaturin>
I don't really need it for anything, just curious.
netrobyatmobile has quit [Quit: Connection closed for inactivity]
<Hannibal_Smith>
Drup, for now I found myself only Types and programming language and the one that I linked before
<Hannibal_Smith>
I was curious because are both good books
<Hannibal_Smith>
So I questioned myself if I can found some other interesting perls searching for simply CS books that uses OCaml :-P
<Hannibal_Smith>
Ahahaha *pearls
<Drup>
the TAPL is rather well known :p
s1n4 has quit [Quit: leaving]
curiosity has joined #ocaml
<curiosity>
is there some consent which build tool not to use?
matason has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
<Drup>
on which topic ? :D
<curiosity>
Drup: i thought i ve read here that some users are quite unhappy with some of the existing build tools? was curious, which are recommended here. Jenga, OCamlmakefile and so on?
<Drup>
ah, build tools.
<Drup>
there is no consent on which tool to use
<Drup>
there is consent that none of them are satisfactory.
<curiosity>
thats why i didnt ask, which build tools is the best :)
<Drup>
jenga is not to be used unless you have an enormous code base
<Drup>
for small/medium size, it's not the right tool
<curiosity>
whats the reason behind that? Is the description too complex for small projects?
<Drup>
yes, and it uses core
<curiosity>
so whats been used in the commercial environment? oasis or plain makefiles?
<adrien>
well, JST has built Jenga
<adrien>
but it's for large projects
<rgrinberg>
curiosity: use obuild :P
<Drup>
curiosity: pretty sure each uses a different build system
<Drup>
rgrinberg: which one, there are two :D
<rgrinberg>
it's the simplest thing that's fast and works 90% of the time
<Drup>
rgrinberg: is the parsing and error reporting as terrible and badly defined as oasis ?
c355E3B has quit [Quit: Leaving]
<curiosity>
thanks
<rgrinberg>
parsing/error reporting of the .obuild file?
<Drup>
yes
<rgrinberg>
it's pretty bad but much more hackable
<Drup>
in oasis, it's ridiculously bad
<rgrinberg>
the whole thing is very minimalstic
<rgrinberg>
i tried reading through oasis once
<rgrinberg>
told myself, never again
monod has quit [Ping timeout: 244 seconds]
<Drup>
yeah ...
<nojb>
oasis seems like someting stuck in a previous era - I don't think it even knows about -use-ocamlfind flag in ocamlbuild ...
<rgrinberg>
nojb: yes i don't think it's seriously maintained anymore
olibjerd has joined #ocaml
<Drup>
no it doesn't, and no it's not maintaned
<adrien>
nojb: you just pointed out why the "stuck in a previous era"
<adrien>
oasis was born too early
<rgrinberg>
adrien: it was born to an alcoholic mother :(
<adrien>
it was born at the beginning of a transition
<adrien>
but I'm not sure it wasn't one of the cause of that transition
<adrien>
rgrinberg: it was meant in a really different context
<rgrinberg>
Drup: if only obuild did
<rgrinberg>
adrien: i know, bad joke :D
<adrien>
I don't know if you've lived with the ocaml build ecosystem from around 7 years ago
<nojb>
but are there any really good build system in *any* language ?
<adrien>
:)
<rgrinberg>
Drup: if obuild didn't mandate dependency fascism it would be ideal
<Drup>
?
<rgrinberg>
the original author wrote it pre-opam so he disallowd all external dependencies
<rgrinberg>
so the command line interface is Arg based :(
freling has quit [Quit: Leaving.]
<Drup>
ah, yes, ccubism.
<Drup>
:D
<adrien>
well
<Drup>
(that's unfair, I know x)
<adrien>
make opam work on windows
<adrien>
with a decent performance
<adrien>
(I'm laughing a lot on that last point)
<rgrinberg>
Drup: ccubism?
<Drup>
companion_cubism.
<rgrinberg>
yes but how does it relate
<Drup>
he can occasionally be very dependency-adverse.
<rgrinberg>
ah, i did not notice that myself
<Drup>
averse*
<bernardofpc>
well, sometimes that's good, as in not replicating the dep madness of heskell-land
<Drup>
they have an additional problem in haskell-land due to typeclasses
<rgrinberg>
bernardofpc: it's unlikely we'll ever have those problems b/c we don't have something as bad as hackage
<Drup>
it makes modularity very hard
<Leonidas>
cabal install cabal-install
<Drup>
(and hackage)
<Leonidas>
fails
nojb has quit [Quit: nojb]
cesar_ has joined #ocaml
cesar_ is now known as Guest65070
Jefffrey has joined #ocaml
<Jefffrey>
Morning
A1977494 has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
swgillespie has joined #ocaml
<yminsky>
For those of you discussing build systems: I don't think it's right to say that Jenga is only good for large projects.
<yminsky>
I think Jenga scales reasonably well for large projects, but there's no fundamental reason it shouldn't work for small ones as well.
<yminsky>
The real problem with Jenga is that it's just not ready for use outside of Jane Street.
<yminsky>
For that, we need a good story for modular distribution of build rules, and we're not quite there yet.
<Drup>
yminsky: the constraint for building core before building your project is rather important, for small projects.
<Drup>
of*
<yminsky>
I disagree. You need a good bootstrap story, but one could be found.
<yminsky>
For example, one could perhaps distribute a byte-code only Jenga.
<adrien>
yminsky: I meant that the work involved in using jenga is currently not really worth it for smaller projects
<yminsky>
adrien: I think the work involved isn't worth it for large or small projects!
<adrien>
that's how I understood it at least but that would be solved by modular rules
<adrien>
(being available)
<yminsky>
The build rules we've written are a big part of the puzzle, and those aren't fully shareable yet.
<Drup>
yminsky: I have various bad memories about distributing byte code for a certain build system.
<yminsky>
drup: sorry, not getting it. Which one?
<Drup>
but maybe you can do better :p
<Drup>
ocp-build.
<yminsky>
Ah, sure.
<adrien>
please, no bytecode blobs ='(
<yminsky>
The other bootstrapping story is that Jenga can emit makefiles that don't do dynamic dependency discovery, but can execute the build in its current form.
<yminsky>
That allows packages to be built without having Jenga installed.
<adrien>
that's how people build most of the time
<Drup>
ah, that's nice.
<adrien>
so that sounds perfectly fine
jonludlam has quit [Ping timeout: 272 seconds]
<yminsky>
So, you'd need to build Jenga to actually develop, but your packages wouldn't inherit a build-time dependency.
<yminsky>
Yeah, that's my favorite solution.
<Drup>
If you generate makefiles in the end, I'm not sure you really need jenga's complexity, though, but I don't know it all that well.
<yminsky>
drup: I think it is. Think of the makefiles as just a convenient way of computing the trace of the build. Computing dependencies is still quite important, and Jenga is a natural vehicle for doing so.
<Jefffrey>
So I'm having a weird error. And the first few results on google regarding this error are the ocaml implementation on github.
<yminsky>
With something like Jenga, you get to write those rules in a real language, and not in make.
<Drup>
yminsky: It's a big vehicule.
<Jefffrey>
I have a class, and I'm trying to inherit from two other classes.
<Drup>
Jefffrey: show the code :3
<yminsky>
drup: well, you can always use ninja or somesuch if you don't want this kind of support.
<adrien>
izegrjkzerkjzegrzekrezklze
<adrien>
sorry
<Drup>
:D
<adrien>
I always get a nervous reaction when someone mentions google crap^Wtools
<adrien>
it it possible to have tools from one of the richest company on earth that handle cross-compilation?
<Jefffrey>
Drup: Nevermind. Solved by explaining the problem. As always. :P
<adrien>
ninja isn't really the one to blame here but gyp is and both are very close
<adrien>
and they're throwing gyp away, they're making a new tool
<adrien>
also, it seems packagers hate it
<adrien>
actually, packagers hate anything from google
<yminsky>
Anyway, I think Jenga isn't ready for people to try seriously yet outside of JS. We can talk about it more productively when it's closer to being usable, I think.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Algebr has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 244 seconds]
Guest65070 has quit [Remote host closed the connection]
mort___ has joined #ocaml
rwmjones has quit [Read error: Connection reset by peer]
rwmjones has joined #ocaml
Hannibal_Smith has joined #ocaml
codeitagile has quit [Remote host closed the connection]
Jefffrey has quit [Quit: Leaving...]
monod has joined #ocaml
freling has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
mv has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<curiosity>
rgrinberg: how can i pack multiple modules in different subfolders into one library using obuild? is there some example like this?
<rgrinberg>
curiosity: not sure that you can, i don't even know how to do that in oasis either
<rgrinberg>
in general, the pattern is a directory can contain 1 or more libs
<Drup>
that's rather easy in oasis, just indicate the paths ...
<Drup>
Modules: foo/Bar bla/Thingy
<rgrinberg>
try doing that in obuild as well
<rgrinberg>
no idea if it will work as I've never tried it
mort___ has quit [Quit: Leaving.]
<curiosity>
foo/Bar does not work
<curiosity>
so how do i tell obuild to look into subfolders as well?
<rgrinberg>
add them as libraries
<curiosity>
src-dir: /lib, /lib/subfolder
<curiosity>
like that
<curiosity>
?
<rgrinberg>
curiosity: is your code somewhere where I can see it?
<curiosity>
rgrinberg: no, i am just playing with a minimal example
<struktured>
thats what I thought, just like switch would usually be faster in c/c++/java etc.
<Drup>
the compiler optimize that into a dichotomy search over char codes
<struktured>
for chars specifically, or other datatypes as well?
<Drup>
for sum types, it creates an optimal decision tree
<Drup>
(there are several papers about that)
<Drup>
for ints (and floats ?) it's a regular search (using bounds and masks stuff)
<Drup>
char = ints
<struktured>
very cool. the space of sum types is [polymorphic] variants and the open sum type like exception?
<Drup>
for string ... it's mostly magical. It matches the individual words as ints and do the search tree with that.
nojb has joined #ocaml
<Drup>
yes
<Drup>
well, poly variants and sum types are a bit slower, but mostly, yes
<struktured>
I feel like you defined most ocaml data types at this point then. what's missing?
<Drup>
arrays
<struktured>
ah
<Drup>
and all C things :p
<Drup>
and records
<Drup>
well records and array are pretty much the same, here
<struktured>
so what if you match on variants of different records? I imagine multiple entries of the variant tag (but w/different record values) wouldn't be optimized.
<Drup>
actually, no, records are irrelevant, the match can't fail
<struktured>
what do you mean by that?
<Drup>
struktured: like "function { foo = Foo x } -> .. | { foo = Bar y } -> ...
<Drup>
?
<struktured>
"records are irrelevant"
<Drup>
well, you can always express a pattern match as a field access
<Drup>
"let { .. } = e" canno't fail.
<struktured>
so how is that one optimized if foo=George as well? it would be indexed intelligently as you mentioned before?
<Drup>
yes
<struktured>
cool
<struktured>
ok I guess I will add a comment to the commit about this
<struktured>
thanks, and yes those are some fancy graphical renderings!
A1977494 has joined #ocaml
<Drup>
Luc maranget is "Mr pattern match" for the ocaml compiler, he has rights of life and death over any courageous contributor brave enough to enter this territory of the compiler. :D
<rgrinberg>
curiosity: NP ask on the bug tracker if you have more questions
Gama11 has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
A1977494 has left #ocaml [#ocaml]
hilquias has joined #ocaml
6A4AB5H65 has joined #ocaml
freling 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]
axiles has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest35495
jonludlam has joined #ocaml
Guest35495 has quit [Ping timeout: 255 seconds]
govg has joined #ocaml
swgillespie has joined #ocaml
Anarchos has joined #ocaml
seangrove has quit [Ping timeout: 250 seconds]
troydm has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
<curiosity>
rgrinberg: i am using core, but get this error, when i try to link my executable
<curiosity>
Error: No implementations provided for the following modules:
<curiosity>
Thread referenced from
<curiosity>
also mutex, condition and event
<nojb>
have to add -thread to the compiler flags
freling has quit [Quit: Leaving.]
<curiosity>
and where should i set that inside the .obuild file?
<nojb>
you should add Thread to the list of deps I think
<nojb>
and Mutex, Condition and Event while you are at it
nojb has quit [Quit: nojb]
<curiosity>
its referenced from core, shouldnt it be enough to link with core? ocamlfind list does not show mutex for example
<rgrinberg>
Yeah I don't think you're supposed to add threads
<rgrinberg>
but even if you do, i don't think it will help
<rgrinberg>
I've run into this bug today with core_bench