fantasti` has quit [Remote host closed the connection]
fantasticsid has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ocaml
fantasticsid has joined #ocaml
spearalot has quit [Quit: Computer has gone to sleep]
philtor has quit [Ping timeout: 252 seconds]
letrec has quit [Remote host closed the connection]
letrec has joined #ocaml
edwin has joined #ocaml
pilki has joined #ocaml
pilki has quit [Client Quit]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 255 seconds]
ulfdoz_ is now known as ulfdoz
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sebz has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
beginner has quit [Quit: Leaving]
milosn_ has quit [Ping timeout: 260 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
fridim_ has joined #ocaml
Snark has joined #ocaml
ftrvxmtrx has joined #ocaml
fridim_ has quit [Ping timeout: 240 seconds]
bacam_ is now known as bacam
milosn has joined #ocaml
Schadenfreude has quit [Ping timeout: 252 seconds]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 240 seconds]
sebz has joined #ocaml
iago has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
ikaros has joined #ocaml
fantasticsid has joined #ocaml
ftrvxmtrx has quit [Remote host closed the connection]
Cyanure has joined #ocaml
fantasticsid has quit [Ping timeout: 252 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
mnabil has joined #ocaml
fantasticsid has joined #ocaml
ikaros has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
ikaros has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
pilki has joined #ocaml
pilki has quit [Quit: This computer has gone to sleep]
<Drakken>
Happy New Year, camlrs.]
<thelema_>
happy new year
<Drakken>
Hi thelema.
<Drakken>
Is oasis intended for use during development?
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Drakken>
It seems better for building entire projects after they're done.
<thelema_>
Drakken what is difference?
<Drakken>
modular compilation. How do I build one module or part of a project while I'm working on it?
<thelema_>
? why build only one module?
<thelema_>
ocamlbuild takes care of compiling only what's needed
<adrien>
Drakken: do you have separate sub-libraries in your project?
<thelema_>
if your project doesn't need to be compiled at once, it's probably not one project
<Drakken>
thelema_ because I'm working on a lower-level module the top-level module isn't done yet.
<thelema_>
stub it out so you can compile?
<thelema_>
or if the project is simple enough, just use ocamlbuild directly to compile
<adrien>
or tell _oasis to build the lower-level module now and change it later
<Drakken>
What's the point of having modular compilation at all? It's so you can develop pieces of an app or library without having to keep recompiling the whole thing like you do in C++.
<thelema_>
_oasis may help with setting ocamlbuild up for external deps, camp4, etc.
<Drakken>
adrien yes.
<Drakken>
OCaml has this great modular-compilation system, and it seems like oasis sabotages it. What if the entry point is still buggy and I'm developing the code from the bottom up:? What if the app is gargantuan and it takes a long time to compile?
<thelema_>
Drakken: it's probably sufficient to #use your source files in the toplevel to be able to play with them
<thelema_>
ocaml has very good compile times, that's probably not a problem
<adrien>
Drakken: have you looked inside the _build folder? you have all the modules compiled separately; you can use that to pick only a specific one if you want
<thelema_>
as for bottom-up development with a buggy entry point - make more entry points with test programs
<adrien>
also, on my slow laptop, ocamlbuild goes over 500 targets in a couple of seconds
<Drakken>
adrien I'm talking about my own project, not one I've downloaded.
<thelema_>
Drakken: you want to test the parts of your project that you've finished without having a complete project, yes?
<thelema_>
Drakken: if that's what you want to do, make a test program that uses those parts of the program and use ocamlbuild to compile it
<adrien>
Drakken: yes, but if you use oasis and ocamlbuild, it will put the .cma/cmo/cmx/cmxa files there and you will have the lower-level modules available even if you don't make a stub for the higher-level module
<Drakken>
thelema_ the short answer is yes. Where do I store the args for ocamlbuild for a single test? Don't they need to be specified somewhere?
<thelema_>
if your project uses _oasis, it sets up ocamlbuild for all the deps already
<thelema_>
you just have to run `ocamlbuild test.native`
<adrien>
and when you run "ocaml setup.ml -build", oasis says "running command: ocamlbuild -bunch -of -args target1 target2 target3"
<thelema_>
adrien: really? should be few args, no?
<Drakken>
thelema_ where does oasis put the info that ocamlbuild needs for each piece of the project?
<thelema_>
_tags, myocamlbuild
<thelema_>
.ml
<adrien>
thelema_: yes actually, it's like 4 args I think
<thelema_>
adrien: blah.
<adrien>
reading _tags and going over myocamlbuild.ml are good thing when using ocamlbuild/oasis; it really shows how it's working
<Drakken>
are those documented somewhere?
<Drakken>
I don't see anything about _tags or myocamlbuild.ml in the oasis user manual.
<adrien>
myocamlbuild.ml is in ocamlbuild's doc; but you can quite simply open both files, take one tag from _tags and search for it in myocamlbuild.ml
<adrien>
_tags is also ocamlbuild stuff actually
<adrien>
most people believe oasis does a lot of magic while it doesn't
<Drakken>
adrien I don't really know what oasis does. It could be the greatest build system in the world, but I can't tell from reading the docs.
<Drakken>
ocamlfind: When using -syntax, the META variable 'preprocessor' must be set
<Drakken>
This is in a godi installation.
<adrien>
Drakken: oasis is a front-end to other build systems: it creates configuration files for them; these files include data like: what to build, with which options (CFLAGS for instance), and how to install a corresponding package
sebz has quit [Quit: Computer has gone to sleep.]
<Drakken>
adrien I guess I'll have to run oasis and see what it does.
<adrien>
Drakken: for your camlp4 thing: you are preprocessing a file or making a syntax extension?
<adrien>
or using camlp4 to do something yourslef
<adrien>
yourself*
<Drakken>
adrien I want to see the camlp4[o|r] grammar so I know what I'm extending.
<Drakken>
adrien yes, I want to play around with making my own syntax extensions.
<adrien>
because -syntax camlp4[or] is only for when you are _using_ a syntax extension in your code iirc
<adrien>
so I think you can simply drop that
<Drakken>
or when you want to print the grammar. It's empty until you load the syntax.
<hcarty>
gildor: Without that, everything with an oasis-generated setup.ml will fail under OCaml 3.13.x
<thelema_>
hcarty: trying to get ocaml trunk brewable?
<hcarty>
thelema_: trunk is brewable, but output from oasis breaks with trunk due to a bug fix in format handling
<hcarty>
So while trunk brews, oasis'd libraries do not
<thelema_>
so most odb libraries don't build. :(
<hcarty>
That's correct
<hcarty>
There are problems with version/3.12 too
<thelema_>
oh?
<hcarty>
oasis's version checking rejects "3.12.2+dev4 (2011-10-11)" - or whatever the proper date suffix is - as being >= 3.12.0
<hcarty>
So, for example, type-conv fails to install
<thelema_>
blah. Luckily, my dumb version testing would compare them correctly.
<hcarty>
I got the 11 and 10 swapped in the date, but that's not particularly important...
<hcarty>
I wonder if something simple-minded like splitting on '.' then doing a string comparison on each resulting piece until a comparison comes back as not equal would work
<hcarty>
3 = 3; 12 = 12; 1 < 2+dev4 (2011-11-10)
<thelema_>
actually, split on [0-9]+
<hcarty>
At least as a fall back mechanism
<thelema_>
and do number comparisons on numbers and string comparisons on strings
<hcarty>
[^0-9]+?
<hcarty>
Ah
<thelema_>
try Str.full_split (Str.regexp "[^0-9]+") v |> List.map to_ver
<thelema_>
you're right, but it doesn't really matter, since full split keeps both the text and the delimiters
philtor has joined #ocaml
<thelema_>
so removing the ^ just switches the two
<hcarty>
Cool
<hcarty>
There may be a way to tell oasis to ignore the version check
<thelema_>
hcarty: patching the setup.ml? blah.
<thelema_>
that's the problem with generated code - you have to fix the codegenerator
<hcarty>
thelema_: A quick look indicates that is the only way
<adrien>
it's dirty but it works and I'm not sure it's a bad thing even if oasis had been patched last week
sebz has joined #ocaml
<adrien>
and oasis doesn't make it very hard
<hcarty>
oasis doesn't allow ' ' in version strings. That's part of the problem.
<thelema_>
hcarty: ah. well, fwiw, the odb packages file doesn't allow it either, although it doesn't allow ' ' in any key or value
<thelema_>
It is allowed in data from oasis-db, though
<hcarty>
That version string is certainly a little odd
<hcarty>
It doesn't look like there is a way to get a root version (3.12.2 in this case) from ocaml(c)
<hcarty>
If I add ' ' '(' ')' to the list of allowed version characters then type-conv builds
<thelema_>
shell-magic it away?
<hcarty>
tr -d '[() ]' <<< "funky version here"
<hcarty>
That seems to do the trick
<hcarty>
For the 3.12.2 case
<hcarty>
The 3.13 case is more serious since it's a syntax error
<thelema_>
yes, that will have to be fixed in the codegen
fridim_ has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
<hcarty>
It looks like it will take some ugly hacks to make the version/3.12 case work. That's a royal pain.
jamii has quit [Ping timeout: 268 seconds]
Xizor has joined #ocaml
Snark has quit [Quit: Quitte]
<thelema_>
hcarty or an oasis fix. We could fork oasis and put patches in the fork.
<thelema_>
hcarty: github.com/hcarty/oasis?
mnabil has quit [Read error: Connection reset by peer]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
Cyanure has quit [Remote host closed the connection]
<edwin>
the 'el' parameter is supposed to be a list
<edwin>
if I try to coerce el to (el: expression list ExpressionMap.t * ExpressionSet.t * ExpressionSet.t list) then it just tells me that I need a list of list
<edwin>
any hints on how to track down which variable got the wrong type?
pilki has joined #ocaml
<edwin>
(ah and the type error is reported for the 'el' parameter to List.fold_left)
<_habnabit>
ExpressionSet implements Set.S?
<edwin>
ye
<edwin>
hmm I think it is right that el's type is wrong, it should indeed contain a 3-tuple
<edwin>
hmm, ExpressionMap.singleton expr el
<edwin>
here el is a list of elements of the same type as em
<edwin>
so I see why it won't let me do that, the type of the Map's values must be the same
<edwin>
but for me they are not...
<_habnabit>
um, I don't get a compile error
<_habnabit>
but I also don't have your definition of merge_map, so I'm going to guess that's where the problem lies
<_habnabit>
(since I did just `let merge_map _ _ x = x`)
<edwin>
what if you try to call expr_intersect?
<_habnabit>
why would that matter? your error was with mismatched types.
Xizor has quit [Ping timeout: 255 seconds]
<_habnabit>
the inferred signature I get for expr_intersect is: ExpressionMap.key -> ('a ExpressionMap.t * ExpressionSet.t * ExpressionSet.t) list -> ('a ExpressionMap.t * ExpressionSet.t * ExpressionSet.t) list ExpressionMap.t * ExpressionSet.t * ExpressionSet.t
<edwin>
hmm, the caller doesn't expect a map inside the map