<thelema>
adrien: or just put your common definitions in common.mli and `open Common`
<bnwr>
thelema: I generally don't like that
<bnwr>
it uses open (which I prefer to avoid)
<adrien>
thought you couldn't do that either actually
<thelema>
bnwr: ok, `module C = Common`
<thelema>
adrien: ? why not?
<bnwr>
and Common is not very useful as a name
<thelema>
bnwr: granted.
<bnwr>
i.e. Protocol.Message.Reply "blah" is more informative than Common.Reply "foo"
<adrien>
thelema: there's a number of construct that work in .ml and not in .mli files; and I thought I had tried "open" in the past
<thelema>
adrien: you can use open in .mli
<adrien>
I'm using packs and a very lasagne structure; I can use pretty much any name ;-)
<flux>
also you can 'include'
<adrien>
I'm under the impression my line-count is going to drop soon :-)
<bnwr>
adrien: there is the solution of using a preprocessor (with cpp copying definitions around before compilation)
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<bnwr>
although I don't like that more that I like a Common module
<adrien>
preprocessors slow down the compilation :P
<flux>
Common-module is nice for a project
<flux>
you can stick in all module C = CalendarLib.Calendar thingies there, and the same aliases are used for all other modules
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
<adrien>
I had: page.ml, page.mli, BrowserModel.mli (for the pack)
<adrien>
I've created pageTypes.mli; that works almost fine but it doesn't play well with the packing (I guess that ocamlbuild tries to pull the non-packed version automatically)
<adrien>
so I had to add PageTypes as a module for the pack and I had to ln -s pageTypes.mli pageTypes.ml
<adrien>
(otherwise it failed at linking)
<adrien>
for the pack stuff, I don't know yet
<adrien>
(I mean: I haven't managed to find how I could make it shorter)
jamii has joined #ocaml
<adrien>
and in .mli files, "module Z = Zipper" doesn't work ='(
Kakadu has joined #ocaml
g0dmoney- has joined #ocaml
<thelema>
adrien: correct, mli files can't do that. They just reflect what's in the .ml file
<thelema>
adrien: so "module Z = Zipper" isn't vaild because you can only declare that you have a module Z of a particular type
<adrien>
it would be nice to have the same syntax available however
<thelema>
adrien: but you can't define new things in the .mli file; you have to just inform the rest of the world what's available in the .ml file
* rwmjones
wonders if I should use ocamlnet rpc for my IPC
<thelema>
Maybe some new syntax to indicate that Z isn't really provided by the module, and that this is just a shortcut.
<thelema>
rwmjones: never tried.
<flux>
well, you can still open a module that has that Z = Zipper in it?
<thelema>
flux: yes.
<adrien>
thelema: yes, that's what I'd like: only have it as a shortcut
<thelema>
adrien: why not just open zipper?
<adrien>
because of the usual issues with open ;-)
robthebob has quit [Quit: Leaving]
Drup has joined #ocaml
silver has quit [Quit: I put on my robe and wizard hat]
MaskRay has quit [Quit: leaving]
<adrien>
rwmjones: what would be your alternatives to ocamlnet's RPC for your IPC?
<rwmjones>
adrien: I was using a horrible homebrew IPC
antegallya has quit [Ping timeout: 260 seconds]
<thelema>
rwmjones: there's a bunch of other ocaml IPCs, have you looked at any of them?
<adrien>
I'm tempted to add "cat $foo1.mli $foo2.mli ... > BrowserModel.mli" in my Makefile to fill in the .mli file for my pack
<rwmjones>
what are my choices? I'm half way through using ocamlrpcgen now, working out ok
<rwmjones>
if it doesn't just make the server and client for me (which rpcgen does) then it's probably not a good alternative
<thelema>
dbus, hydro,
<thelema>
google protocol buffers
<thelema>
I dunno about making the client and server - maybe hydro
<adrien>
I've quite liked ocamlnet's rpc; I've hated dbus (I still haven't understood the general API); I don't know the others
<adrien>
and I wonder what their performance is
<rwmjones>
dbus sucks ... I once had the misfortune of studying it's C code
<thelema>
fair enough - it was just the first thing that came to mind
<rwmjones>
what is hydro? no hits on google that I can see
<rwmjones>
it doesn't need to interoperate with anything except itself
<adrien>
good to see that my memory isn't completely dead :-)
EmmanuelOga has joined #ocaml
asdfhjkl has quit [Quit: Leaving]
<edwin>
there's also piqi, but I never used it
<edwin>
not really rpc
<edwin>
just helping you with the proto
cago has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: Leaving]
ikaros has quit [Quit: Ex-Chat]
<oriba>
what kind of IPC is looked for?
<rwmjones>
just simple RPC over a unix domain socket, between a command line tool and a daemon
<oriba>
so if you(?) already decided to use Unix-domain sockets, anything is fine?
<rwmjones>
I need(ed) an RPC to run over the sockets; now using ocamlnet rpc anyway
<oriba>
aha
probst has quit [Quit: probst]
thomasga has quit [Quit: Leaving.]
iago has joined #ocaml
oriba has quit [Quit: oriba]
ftrvxmtrx has joined #ocaml
jamii has quit [Ping timeout: 240 seconds]
jamii has joined #ocaml
Drup has quit [Quit: Leaving.]
zorun has joined #ocaml
pangoafk is now known as pango
letrec_ has quit [Ping timeout: 248 seconds]
<rwmjones>
rpc .. works!
jamii has quit [Ping timeout: 240 seconds]
<thelema>
rwmjones: yay. Gerd is a pretty smart cookie
<rwmjones>
yeah, weird and smart, it's a dangerous combination :-)
<thelema>
:)
djcoin has quit [Quit: WeeChat 0.3.2]
tlockney_ is now known as tlockney
NihilistDandy has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
NihilistDandy has quit []
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
<malouin>
Is there a reason ocamlbuild seems to treat -I subdirectory and -I /not/a/subdirectory differently?
<malouin>
I feel like I am not understanding what is going on here.
_andre has quit [Quit: Lost terminal]
<_habnabit>
you mean a relative vs. absolute path?
<thelema>
malouin: I recommend using _tags file and put "<dirname>:include" for each subdir you want to include
<thelema>
malouin: you can't properly include dirs outside your project with ocamlbuild
<thelema>
(this way)
<malouin>
is there another way?
<adrien>
malouin: ocamlbuild copies files under _build and uses relative paths from there
<malouin>
aaaaah
<adrien>
malouin: why do you want to include a directory that is outside the project?
<malouin>
so the argument to -I must be relative *and* a subdirectory.
<adrien>
yes
<adrien>
where you trying to add -I /foo/bar because you wanted to use a library?
<malouin>
adrien: basically because I have a directory that has some code that I wrote that is shared between projects.
<malouin>
but I have not put in the effort yet to package it properly.
<adrien>
make a library from it and install it system-wide?
<adrien>
:-)
<malouin>
right
<malouin>
ok.
<adrien>
I can't remember if symbolic links work
<malouin>
it does actually
<adrien>
I'm under the impression they don't but I can't remember why
<malouin>
but it is kinda ugly.
<adrien>
agreed
<adrien>
but that could be good until you do a package
<malouin>
yeah, not having a proper package is kinda ugly ;)
<malouin>
great, seems good; thanks!
<adrien>
:-)
<adrien>
and using ocamlfind to install is pretty easy
ontologiae has joined #ocaml
olauzon has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
Tobu has joined #ocaml
ontologiae has joined #ocaml
Qrntz is now known as Qrntzyx
ontologiae has quit [Ping timeout: 240 seconds]
Qrntzyx is now known as Qrntz
olauzon has quit [Remote host closed the connection]
matthewt has joined #ocaml
<matthewt>
bonjour
<adrien>
MATIN
<adrien>
oh, I'm not usually using caps on this channel; sorry :P
<matthewt>
are you mad
<adrien>
hungry mostly
<adrien>
with all these line removals in my code today (because of the .mli stuff), ohloh has lowered its cost estimate by something between 2000 and 2500 USD ='(
<adrien>
thanks :P
<thelema>
adrien: heh. Measuring project completion by lines of code is like measuring aircraft construction by weight
<thelema>
(butchered quote from Bill G.)
<adrien>
it's good for the ego and motivation ;-)
<adrien>
plus, ohloh's estimated cost page says: "Young projects with little activity are typically overvalued."
smondet has joined #ocaml
vram0_ has quit [Remote host closed the connection]
<rwmjones>
pffft ... libguestfs is just shy of USD 1 million