flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
mcc has quit [Quit: Connection closed for inactivity]
inf-groupoid is now known as pyon
ygrek has joined #ocaml
StrykerKKD has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 244 seconds]
shinnya has quit [Ping timeout: 260 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
SomeDamnBody has joined #ocaml
sdothum has joined #ocaml
<SomeDamnBody> I'm getting this error: http://pastebin.com/TxXFMen4
hx0 has joined #ocaml
Kakadu has quit [Remote host closed the connection]
<SomeDamnBody> module type Provider = sig
<SomeDamnBody> val options : 'a t
<SomeDamnBody> end
<SomeDamnBody> I have this ^
silver has quit [Quit: rakede]
yunxing_ has joined #ocaml
pyon has quit [Remote host closed the connection]
pyon has joined #ocaml
hx0 has quit [Ping timeout: 250 seconds]
HZ_ has joined #ocaml
<mrvn> and what is your question?
Maxdamantus has quit [Ping timeout: 272 seconds]
HZ_ has quit [Quit: Page closed]
kushal has quit [Quit: Leaving]
walter|r has joined #ocaml
<SomeDamnBody> mrvn: how do I declare a functor module type?
<SomeDamnBody> I keep getting syntax errors
<SomeDamnBody> I apparently need to expose that mytype is = to another type that is a parameter to the module signature
<apache2> module type Myfunctor = functor (ABCNAME : XYZModuleType) -> sig end
<mrvn> module MAKE : functor (P : Provider) -> sig end
<mrvn> module type Provider = sig type 'a t val options : 'a t end;;
<apache2> module MAKE : Myfunctor = functor (P : Provider) -> struct end
<apache2> er, go with mrvn's example
<SomeDamnBody> oh thanks
<SomeDamnBody> I got it
<SomeDamnBody> that helped a lot
fluter has quit [Ping timeout: 264 seconds]
<apache2> you can also `include module type of Myfunctor` in a module signature
<apache2> when Myfunctor is a functor/module, if you need to create a module type for some reason
kushal has joined #ocaml
<apache2> (I've found that useful when doing recursive functor definitions)
<mrvn> apache2: ever write a functor factory?
<apache2> no! :)
<apache2> I'm still intimidated by the module syntax
<SomeDamnBody> Well, now I have another problem
<apache2> today I was a bit surprised to learn that I can't match on integer ranges in match ... with
<SomeDamnBody> The original reason why I rewrote Program to be a functor was so that I could express by the consumer that a value that has type 'a t has a particular instance of 'a
<mrvn> match x with y when (y >= 10) and (y <= 20) ->
<SomeDamnBody> So, basically, I originaly had module type Program = sig val opts : 'a t end
<apache2> mrvn: yes, but not with 0 .. 9 -> x | 10 .. 19 -> y
<mrvn> SomeDamnBody: module type Provider = sig type opt type 'a t val options : opt t end
<SomeDamnBody> but then I couldn't pass an instance of struct that had that module type because, as I reported earlier, the consumer couldn't see the types...
<SomeDamnBody> ok mrvn let me try that
<mrvn> SomeDamnBody: when you instanciate the functor you have to expose the type to the outside world if that is what you want: with type opt = int
<SomeDamnBody> mrvn: well, earlier it wasn't a functor
<SomeDamnBody> I made it a functor on purpose so that I could do exactly that, with the with syntax
<SomeDamnBody> to expose the type. Because I had originally declared type opt = 'a t within the module signature. So then when I tried to pass in a struct with type opt = mykind t, it couldn't allow mykind = 'a
<SomeDamnBody> But right now I'm going to try it with an additional type in the module signature
<SomeDamnBody> K I got it to work with that additional field
<SomeDamnBody> :)
<SomeDamnBody> Thanks so much you guys
FreeBirdLjj has joined #ocaml
copy` has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
nivek has quit [Read error: Connection reset by peer]
johnelse has quit [Ping timeout: 276 seconds]
jonasen has joined #ocaml
johnelse has joined #ocaml
adf has joined #ocaml
walter|r has quit [Remote host closed the connection]
<adf> where is the documentation for String.split ?
<flux> adf, it depends on where your String.split comes from :). the ocaml standard library doesn't have such a function.
Algebr``` has joined #ocaml
fluter has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
dwwoelfel has quit [Ping timeout: 252 seconds]
pierpa has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<flux> companion_cube, hmm, so it seems you removed ability to retrieve object size from PrintBox?
<flux> meh, I'll just use the older PrintBox from _misc.. :)
yunxing_ has quit [Quit: Leaving...]
rgrinberg has quit [Ping timeout: 264 seconds]
atbagautdinov has joined #ocaml
atbagautdinov has left #ocaml [#ocaml]
jonasen has quit [Remote host closed the connection]
adf has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
adf has joined #ocaml
d0nn1e has quit [Ping timeout: 276 seconds]
d0nn1e has joined #ocaml
jonasen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
yunxing_ has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 244 seconds]
Algebr``` has quit [Remote host closed the connection]
Algebr``` has joined #ocaml
cthuluh has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
cthuluh has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
yunxing__ has joined #ocaml
yunxing_ has quit [Ping timeout: 276 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
adf has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
uriznik has joined #ocaml
yunxing_ has joined #ocaml
yunxing__ has quit [Read error: Connection reset by peer]
atbagautdinov has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
tmtwd has joined #ocaml
Simn has joined #ocaml
AltGr has joined #ocaml
dexterph has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
tmtwd has joined #ocaml
Algebr``` has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
yunxing_ has joined #ocaml
yunxing_ has quit [Ping timeout: 258 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
jonasen_ has joined #ocaml
troydm has quit [Ping timeout: 244 seconds]
jonasen has quit [Ping timeout: 260 seconds]
<companion_cube> flux: oh, yeah, the size kind of depends on which backend you use
<companion_cube> flux: I can add the size function back to Printbox_text if you need it
<flux> well, I don't use a lot from PrintBox to begin with (I have my own layout function), so no need. thanks for offer though :)
<flux> though maybe I'll reconsider using it again given it has this HTML layout :)
dave24 has joined #ocaml
<companion_cube> oh, what's your layout function?
troydm has joined #ocaml
troydm has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
<flux> it does a grid with boxes inside so that there are edge lines between boxes
<companion_cube> you mean, like a graph?
<companion_cube> (can I have a screenshot? ^^)
<companion_cube> looks neat
<companion_cube> I'm totally open to additional backends in printbox, btw
<companion_cube> although this looks like it could be done with my text output.. ? the `bars` parameter to `grid`
troydm has joined #ocaml
<flux> maybe I missed it.. :) but I want to extend that to cover combined cells
Orion3k has quit [Ping timeout: 258 seconds]
ygrek has quit [Ping timeout: 260 seconds]
<flux> though it's not actually very suitable for that, because it's actually a list of horizontally-bar-aligned cell rows
<johnelse> aantron: just saw your message - thanks, will try that
<companion_cube> ah, yeah, it doesn't combine
<companion_cube> anyway, if you feel like sharing it... ;)
<flux> aww, shrug, I am in violation of your license ;-)
<flux> well I suppose not yet because I haven't distributed binaries
<companion_cube> hu? in violation of BSD license? how is that possible ? :D
<flux> "Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
<flux> so my binary doesn't reproduce any copyright information, should it be (re)distributed
<companion_cube> ah, right
Orion3k has joined #ocaml
<flux> I used an abnormally high number of comments but I'm not sure if they help.. :)
Orion3k has quit [Quit: Leaving]
octachron has joined #ocaml
<companion_cube> I suppose this uses the printbox in containers_misc
troydm has quit [Ping timeout: 244 seconds]
troydm has joined #ocaml
<flux> yep, but it's now embedded because the Box.size went away
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<companion_cube> yeah, I understand
<companion_cube> as I said, the reason is that the size depends on the backend; PrintBox_text now has its own representation of boxes with a size inside)
<companion_cube> -)
larhat has joined #ocaml
kdas__ has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
mettekou has joined #ocaml
larhat has joined #ocaml
larhat has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
kdas__ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
larhat has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
mfp has joined #ocaml
cat5e has quit [Ping timeout: 244 seconds]
silver has joined #ocaml
hx0 has joined #ocaml
nicholasf has joined #ocaml
A1977494 has joined #ocaml
hx1 has joined #ocaml
hx0 has quit [Ping timeout: 244 seconds]
hx1 has quit [Ping timeout: 246 seconds]
dhil has joined #ocaml
Soni has joined #ocaml
<dave24> 5
<mrvn> 4
ygrek has joined #ocaml
nicholasf has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
A1977494 has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 264 seconds]
sdothum has joined #ocaml
sepp2k has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
uriznik has quit [Quit: Leaving.]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
nicholasf has joined #ocaml
Kakadu has joined #ocaml
nicholasf has quit [Ping timeout: 258 seconds]
nicholasf has joined #ocaml
hx1 has joined #ocaml
dave24 has quit [Ping timeout: 244 seconds]
kdas__ has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
nicholas_ has joined #ocaml
nicholas_ has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 250 seconds]
nicholasf has quit [Ping timeout: 240 seconds]
nicholasf has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
dhil has joined #ocaml
kdas__ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
tennix has joined #ocaml
FreeBirdLjj has joined #ocaml
nicholas_ has joined #ocaml
nicholasf has quit [Ping timeout: 258 seconds]
darkf has quit [Quit: Leaving]
jwatzman2 has joined #ocaml
jwatzman|work has quit [Ping timeout: 252 seconds]
low-profile has quit [Ping timeout: 260 seconds]
gustav___ has quit [Remote host closed the connection]
gustav___ has joined #ocaml
alpen has quit [Ping timeout: 272 seconds]
low-profile has joined #ocaml
dmiller has quit [Ping timeout: 264 seconds]
cow-orke1 is now known as cow-orker
alpen has joined #ocaml
asmanur_ has quit [Ping timeout: 252 seconds]
asmanur has joined #ocaml
jwatzman2 is now known as jwatzman|work
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
mpenet has joined #ocaml
tennix has quit [Quit: WeeChat 1.5]
copy` has joined #ocaml
hx1 has quit [Ping timeout: 276 seconds]
agarwal1975 has quit [Quit: agarwal1975]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
shinnya has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
FreeBird_ has quit [Ping timeout: 244 seconds]
M-jimt has quit [Remote host closed the connection]
M-martinklepsch has quit [Remote host closed the connection]
regnat[m] has quit [Write error: Connection reset by peer]
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
nicholasf has joined #ocaml
FreeBirdLjj has joined #ocaml
mbrock has joined #ocaml
nicholas_ has quit [Ping timeout: 264 seconds]
malc_ has joined #ocaml
al-damiri has joined #ocaml
hx1 has joined #ocaml
mehdib_ is now known as mehdib
regnat[m] has joined #ocaml
mpenet has quit [Remote host closed the connection]
nicholasf has quit [Remote host closed the connection]
hx1 has quit [Ping timeout: 276 seconds]
kolko has joined #ocaml
M-martinklepsch has joined #ocaml
M-jimt has joined #ocaml
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
agarwal1975 has joined #ocaml
nicholasf has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
hx1 has joined #ocaml
AlexRussia has joined #ocaml
<tobast> Hi
<tobast> it looks like http://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html#VALexists lacks a version annotation
<tobast> it was only introduced in 4.03.0, yet does not state it.
<zozozo> tobast: you can make a github PR if you have time
Soni is now known as cat5e
<tobast> zozozo: yep, I'll do that.
hx1 has quit [Ping timeout: 244 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
eagleflo_ has quit [Quit: leaving]
eagleflo has joined #ocaml
dmiller has joined #ocaml
walter|r has joined #ocaml
yunxing_ has joined #ocaml
ygrek has joined #ocaml
yunxing_ has quit [Ping timeout: 250 seconds]
kushal has quit [Read error: Connection reset by peer]
kolko has quit [Ping timeout: 260 seconds]
kolko has joined #ocaml
nicholasf has quit [Remote host closed the connection]
kolko has quit [Ping timeout: 252 seconds]
ygrek has quit [Ping timeout: 252 seconds]
m1dnight_ has joined #ocaml
saruta has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
beginner has quit [Quit: Leaving]
two_wheels has joined #ocaml
hcarty has joined #ocaml
dexterph has quit [Ping timeout: 260 seconds]
saruta has joined #ocaml
kolko has joined #ocaml
slash^ has joined #ocaml
kolko_ has joined #ocaml
kolko has quit [Ping timeout: 260 seconds]
hx1 has joined #ocaml
mettekou has quit [Read error: Connection reset by peer]
A1977494 has joined #ocaml
ygrek has joined #ocaml
hx1 has quit [Ping timeout: 240 seconds]
saruta has quit [Ping timeout: 276 seconds]
saruta has joined #ocaml
profan_ is now known as profan
struk|desk has quit [Read error: Connection reset by peer]
kolko_ has quit [Ping timeout: 258 seconds]
kolko has joined #ocaml
struk|desk has joined #ocaml
cnu- has quit [Quit: Quit.]
mbrock has quit [Quit: Connection closed for inactivity]
hx1 has joined #ocaml
A1977494 has quit [Remote host closed the connection]
hx1 has quit [Ping timeout: 276 seconds]
Algebr``` has joined #ocaml
pierpa has joined #ocaml
seangrove has joined #ocaml
kolko has quit [Ping timeout: 240 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
kolko has joined #ocaml
tane has joined #ocaml
larhat has quit [Quit: Leaving.]
FreeBirdLjj has quit [Remote host closed the connection]
cnu- has joined #ocaml
cnu- has quit [Excess Flood]
cnu- has joined #ocaml
cnu- has quit [Excess Flood]
walter|r has quit [Remote host closed the connection]
cnu- has joined #ocaml
jeffmo has joined #ocaml
Anarchos has joined #ocaml
supermaciz has joined #ocaml
walter|r has joined #ocaml
pmahoney has joined #ocaml
<pmahoney> trying to use nixpkgs on OSX to run ocaml + utop + async but i'm getting 'Error: Reference to undefined global `Camlp4' https://gist.github.com/pmahoney/11fa855a425462d820fd1754164450b9
<octachron> pmahoney, naive question: is camlp4 installed?
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
<pmahoney> octachron: unfortunately i'm a complete newb... i was under the impression it's included with ocaml
<octachron> not anymore since OCaml 4.02
kolko has quit [Ping timeout: 240 seconds]
<pmahoney> ah. well, for what it's worth:
<pmahoney> echo $OCAMLPATH | tr : "\n" | grep p4
shinnya has joined #ocaml
<pmahoney> /nix/store/5lw6mbizd731a008zg3by4q61zz86ddq-camlp4-4.02+6/lib/ocaml/4.02.3/site-lib/
<pmahoney> but maybe there's something i need to do in utop to load it?
walter|r has quit [Ping timeout: 250 seconds]
<pmahoney> both #require "calmp4";; and #camlp4o;; in utop give the same 'Error: Reference to undefined global `Camlp4'
<octachron> what is your version of ocaml?
<pmahoney> 4.02.3
<pmahoney> could always be a problem with nix packaging, but with my lack of experience, i'm not sure how to determine that
connorjacobsen has joined #ocaml
jnavila_ has joined #ocaml
connorjacobsen has quit [Client Quit]
<pmahoney> so the question is: assuming all the above are installed correctly, what should i type into utop to get async properly loaded? if i'm typing the correct things, then it's likely a problem with nix packaging and/or some OSX pecularity
<octachron> pmahoney, #require "async" should be fine, and as far as I know #require "camlp4" should work if camlp4 is correctly installed
<pmahoney> ok, thanks
Kakadu has quit [Ping timeout: 250 seconds]
srcerer has joined #ocaml
srcerer has quit [Client Quit]
octachron has quit [Quit: Page closed]
kolko has joined #ocaml
srcerer has joined #ocaml
rgrinberg has joined #ocaml
jnavila_ has quit [Ping timeout: 260 seconds]
yunxing_ has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
Algebr``` has quit [Ping timeout: 250 seconds]
dhil has quit [Ping timeout: 260 seconds]
jnavila_ has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
<regnat[m]> pmapmahoney (IRC) I already had some problems with nix & camlp4. It looks like most tools hardcode the fact that it is installed on the same place as caml
kolko has joined #ocaml
k1000 has quit [Ping timeout: 260 seconds]
yunxing_ has quit [Remote host closed the connection]
k1000 has joined #ocaml
Ankhers has quit [Ping timeout: 260 seconds]
Ankhers has joined #ocaml
jnavila_ has quit [Ping timeout: 276 seconds]
yunxing_ has joined #ocaml
seangrove has joined #ocaml
StrykerKKD has joined #ocaml
jeffmo has quit [Quit: jeffmo]
BitPuffin has joined #ocaml
pmahoney has quit [Ping timeout: 276 seconds]
yunxing_ has quit [Remote host closed the connection]
Anarchos has quit [Ping timeout: 240 seconds]
wolfcore has quit [Ping timeout: 260 seconds]
Simn has quit [Read error: Connection reset by peer]
wolfcore has joined #ocaml
hcarty has quit [Quit: WeeChat 1.5]
<seangrove> Hey all, I'm looking for a way to restart my ocaml app X from within OCaml. X has a bunch of child processes that need to die when it dies though. What's the usual way of doing this?
jeffmo has joined #ocaml
<seangrove> X also binds to port 4000, so it needs to shutdown before launching a new instance
yunxing_ has joined #ocaml
<mrvn> seangrove: restart xorg
<mrvn> or whatever your X service is called
<seangrove> mrvn: From the outside, rather than having the app restart itself?
<mrvn> the app can call
hcarty has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
jnavila_ has joined #ocaml
Algebr``` has joined #ocaml
dhil has joined #ocaml
slash_ has joined #ocaml
slash^ has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 276 seconds]
octachron has joined #ocaml
Algebr``` has quit [Ping timeout: 250 seconds]
yunxing_ has quit [Remote host closed the connection]
Algebr``` has joined #ocaml
StrykerKKD has quit [Quit: Leaving]
wolfcore has quit [Ping timeout: 276 seconds]
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
wolfcore has joined #ocaml
slash_ has quit [Read error: Connection reset by peer]
jonasen_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhil has quit [Ping timeout: 244 seconds]
t4nk238 has joined #ocaml
fds_ is now known as fds
<hcarty> Is there a straightforward way to use module aliases with oasis?
<aantron> hcarty: what do you mean by straightforward?
<mrvn> just use them
fds has quit [Changing host]
fds has joined #ocaml
<hcarty> aantron: Adding "true: no_alias_deps" and appropriate open(Parentlib) entries to _tags fails with circular build errors
<hcarty> Aaaaah, I see... I haven't split all the code I need into indenpendent modules
<hcarty> parentlib.ml has actual code used by parentlib_a.ml as opposed to just module aliases
<mrvn> can't have c<cles
<mrvn> cycles
<aantron> sounds like the problem :
<aantron> :) *
Kakadu has joined #ocaml
<hcarty> Gah... same issue even on a simple project
<aantron> hcarty: want me to take a look? maybe make a gist?
seangrove has quit [Ping timeout: 260 seconds]
<hcarty> aantron: Thanks
<hcarty> I'm sure I'm missing something simple
<hcarty> s/sure/hope/ perhaps...
<aantron> can you also pass -verbose 1 to ocamlbuild (iirc) - not sure how to do it with oasis. otherwise iirc _build/_log should work
<hcarty> AAAAA
<hcarty> aantron: Thanks ... I'm making lots of foolish typos along the way
<aantron> :)
<companion_cube> o/ aantron and hcarty
<hcarty> companion_cube: \o
<aantron> o/ companion_cube
<aantron> \o * i mean :p
<companion_cube> the PR on note to contributors has been merged
<companion_cube> stdlib will progress!
yunxing_ has joined #ocaml
<aantron> companion_cube: what is happening? link? :)
<aantron> hcarty: what are you working on? every time someone mentions aliases i feel a fire lit under me to work on namespaces again :p
<octachron> is the ocamlbuild tag open(A) transmitted to ocamldep?
<hcarty> octachron: It looks like it is - trying to track that down now. I'm not sure how to tell oasis to show ocamlbuild's verbose/class output
<aantron> hcarty: do you have the _build/_log?
<aantron> it should show the ocamldep invocations
<aantron> and yes, open should be transmitted, iirc
<aantron> but the log should answer that
<hcarty> aantron: This is an internal mini-stdlib at the moment. But I'd like to use module aliases more intelligently in general. Improvements to Namespaces would be wonderful to see :-)
<companion_cube> ah, a mini-stdlib
<companion_cube> :D
<aantron> companion_cube: link looks great :)
<hcarty> http://vpaste.net/kWVDm -- _build/_log output
<hcarty> companion_cube: Yep! :-)
<companion_cube> what's it for?
<aantron> hcarty: im torn in namespaces between writing a whole-project ocamldep, which is the right way to solve this, and adding some hacks to be able to use 4.03 ocamldep, which i can do probably in a few days, but it won't be very flexible. i guess i should go with the latter and do the former later..
<hcarty> companion_cube: Internal work projects
seangrove has joined #ocaml
<aantron> hcarty: whats the build error?
<aantron> and can you show those dep files that got output?
<companion_cube> hcarty: I mean what specific do you add to your mini stdlib?
<aantron> hcarty: is the switch 4.03, or 4.02?
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hcarty> aantron: 4.02.3
<aantron> im guessing the dep file for A includes the alias target, yes?
<hcarty> aantron: for a.ml: src/a.ml: A__b A__c; for a__b.ml: src/a__b.ml: A
<hcarty> aantron: Yes
<aantron> yeah
<hcarty> companion_cube: Astring, Rresult, Fmt, Yojson, ppx_deriving.std, ppx_deriving_yojson and the In_channel and Out_channel modules from Core
<companion_cube> oh, ok, it's a bundle
<aantron> im trying to remember what the solution was. its hard to remember because of the hacks surrounding it to get it working with ocamlbuild
<aantron> (one reason to start over with namespaces)
jeffmo has quit [Quit: jeffmo]
seangrove has quit [Remote host closed the connection]
<aantron> you want A__c to depend on A, not the other way around, is that right?
seangrove has joined #ocaml
<aantron> if its okay to require 4.03.0, there is a way to solve it (so far to the ocamldep level, looking at ocamlbuild side of things)
<hcarty> aantron: I think that's correct, based on how the manual describes it
<hcarty> aantron: I'd love to move to 4.03.0 but cohttp didn't build on there last time I tried
<hcarty> I suspect that's a fixable problem but I haven't had time to spend on it yet
<companion_cube> I have no idea, what's in In_channel and Out_channel, roughly?
<aantron> i think in namespaces i basically handled dependencies manually for parts of this. but in 4.03.0, you can pass -as-map to ocamldep
<aantron> -as-map is basically equivalent to -no-alias-deps
AltGr has left #ocaml [#ocaml]
<aantron> maybe you can try it in 4.03 in the toy project and see if ocamlbuild knows about -as-map
<octachron> aantron, don't you also need "ocamldep -map" with the submodules?
<hcarty> I think I'm going to give up on this for now, unfortunately. I can use the raw module names for now inside of the library (A__b rather than B).
<aantron> octachron: depends on how you want to make this work, but probably
<aantron> in any case i think the -as-map/-map options dont really solve the problem of module aliases well, though its a good attempt
<aantron> hence why im worried about writing a dependency analyzer
<aantron> (probably mostly based on existing ocamldep though)
<aantron> hcarty: you might also be able to use namespaces (though use the master version)
<hcarty> companion_cube: The In_channel and Out_channel code are mainly for with_file-like functions and similar convenience functions
<companion_cube> oh I see.
<hcarty> companion_cube: Gen is in the bundle too :-)
<companion_cube> :D
<companion_cube> (have you looked at CCIO?)
jeffmo has joined #ocaml
<aantron> namespaces allows you to include code in A, and make B and C its children, and it will break the dependency cycle. however, it will build B and C when you build A (just not package them together). this is a flaw that requires improvements to ocamldep to really fix
<aantron> (because its not acceptable for the case where B depends on some external library that is absent)
<hcarty> companion_cube: CC* are on the list to consider. The main (and honestly weak) reason for not using CC* already is naming consistency with an existing codebase. print vs pp and a few similar names.
<aantron> sorry, by "package" i meant, even though A doesnt really depend on B and C, it will overestimate and build them
<octachron> aantron, at least "-as-map/-map/-no-alias-dep" are enough for a basic library global module structure with a custom myocamlbuild.ml
<companion_cube> awww
<hcarty> companion_cube: The whole thing was put together quickly for the benefit of a few folks new to OCaml and is still a major WIP
<companion_cube> I'm annoyed by print vs pp, but can't really break now :?
<octachron> (at least if don't need documentation)
<companion_cube> :/
<companion_cube> hcarty: wouldn't it be almost like an overlay?
<companion_cube> a meta-package?
<hcarty> companion_cube: Yeah, backwards compatibility is a harsh burden!
<zozozo> personally I use print for Format functions and pp for Buffer functions
<aantron> octachron: yeah, it works for that. the problem with it though is that it introduces a build dependency to every file on that global index module
<companion_cube> zozozo: \o/
<companion_cube> but nowadays I wonder if buffer functions make any sense
<hcarty> companion_cube: It's mostly an overlay. There are a few custom pieces of code, but the whole thing is ~100 lines of code
<companion_cube> I see
<zozozo> companion_cube: well sometimes when logging, it's on a buffer rather than a formatter
<companion_cube> I'd say that since Bünzli libs tend to become the de factor standard, logs has a decent chance to become the logging lib, and it uses Format
<zozozo> :o
<hcarty> I've been feeling the call of Logs recently, in part because of the dbuenzli effect
jnavila_ has quit [Quit: Konversation terminated!]
<hcarty> aantron: Installed a 4.03.0 switch with oasis, same error sadly
<aantron> hcarty: let me grep through ocamlbuild source
<octachron> aantron, "-as-map" and "-map" are not defined in ocaml_specific.ml and "-no-alias-deps" is not transmitted to ocamldep
<aantron> octachron: hcarty: yep. and no mention of -as-map anywhere
<aantron> so you will have to use myocamlbuild.ml
darkf has joined #ocaml
<octachron> I have an unnecessary complicated example of myocamlbuild.ml for doing something similar if needed
<aantron> :p
<aantron> well for this exact purpose i think you just need a 1-liner
<aantron> except for all the dispatch boilerplate of course
A1977494 has joined #ocaml
chris2 has quit [Read error: No route to host]
<Algebr```> anything special about modules at the runtime level?
<aantron> what would be special? they are essentially records
<aantron> i mean
<aantron> what would qualify as special :)
<Algebr```> just anything to note
<aantron> iirc they get erased to records
Algebr``` has quit [Read error: Connection reset by peer]
Algebr``` has joined #ocaml
manud has joined #ocaml
Anarchos has joined #ocaml
chris2 has joined #ocaml
<rgrinberg> aantron: i remember reading on gh that the whole new ocamldep debacle on 4.03 was not a success
<aantron> rgrinberg: interesting, can you recall any details?
<rgrinberg> aantron: i'm actually referring to your comment ^_^
<aantron> oh, like my attempt to use it was not a success? :p
<rgrinberg> yeah
<rgrinberg> that you need to either hack or even not use ocamldep at all
<aantron> well, i guess its not a success yet.. have to finish up converting to it. its just more of a pain that it ought to be, if you want to preserve separate compilation
<aantron> so i got kind of discouraged and focused on other projects for a while
mjal has joined #ocaml
<aantron> im thinking maybe to just use a global map, release that, and see if its actually a problem in practice. but the thing is, with a global map, if you add a module anywhere, you have to recompile the whole project
<aantron> i can maybe rewrite the dependencies to remove the global map as a build dependency but keep it as a scan dependency
silver has quit [Quit: rakede]
<aantron> but this becomes more and more hacky the more you try to make it do the right thing
aantron has left #ocaml ["Leaving..."]
aantron has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
AlexRussia has quit [Ping timeout: 276 seconds]
AllanDaemon has joined #ocaml
sh0t has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
<aantron> i designed some kind of whole-project scan on paper, that is able to resolve module aliases recursively and automatically, finding and scanning on its own which files it needs to open as with "-map" in 4.03.
<AllanDaemon> I need to use `ocamlbuild -use-ocamlfind -use-menhir -menhir "menhir --table" -package menhirLib loader.byte` I fifure out the _tags file for everything except passing the "--table" option to menhir. How do I pass it using _tags file?
<aantron> and distinguish between dependencies that are needed for rescanning, and for building
<aantron> but obviously implementing this will take a while, and has a higher chance of failure due to time constraints, etc.
walter|r has joined #ocaml
<rgrinberg> aantron: yeah it's a shame to have all this complexity left to build system implementors
<rgrinberg> I can't imagine how you would properly use this in Make for example
<aantron> you mean the recursive scan? or ocamldep 4.03?
<aantron> for the recursive scan, at least, it should be able to spit out regular make rules. the invocation should be simple, just invoke on a file with some trivial option like -spit-out-make-rules :p
<rgrinberg> the whole project scanner you meant
<aantron> it will just produce rules for more than one file, and multiple calls to the scanner might produce rules youve already seen before
<aantron> or actually it can produce rules for only one file, but cache the recursive scans it did
<aantron> this simple interface is a big part of the reason i wanted to do it as well, since the -map, -as-map, etc. options get complicated if you have multiple modules with aliases
tane has quit [Quit: Verlassend]
<aantron> it would be a more precise scan than 4.03 ocamldep, automatically, but with the interface of the 4.02 ocamldep, or some workalike
<aantron> it might need -I options or other complications though, to find files
mjal has quit [Quit: Saliendo]
d0nn1e has quit [Ping timeout: 276 seconds]
d0nn1e has joined #ocaml
supermaciz has quit [Quit: WeeChat 1.5]
ygrek_ has quit [Ping timeout: 246 seconds]
<Algebr```> in ppx you know the type of everything right
<aantron> nope
<aantron> in fact you don't, and i think can't know the types of many things
<Algebr```> oh, you only have the ast
<Algebr```> why can't ppx be done after types are know
<Algebr```> known
<aantron> perhaps the compiler wouldnt know how to types would be involved with constructs to be preprocessed away.. maybe there is a way, but it seems like a much more complicated problem than transforming untyped asts
<aantron> how the* types
manud has quit [Read error: Connection reset by peer]
agarwal1975 has quit [Quit: agarwal1975]
manud has joined #ocaml
bensu_ has joined #ocaml
atbagautdinov has quit [Ping timeout: 258 seconds]
octachron has quit [Read error: Connection reset by peer]
octachron has joined #ocaml
engil1 is now known as engil
TheVoid has quit [Ping timeout: 252 seconds]
psnively has joined #ocaml
TheVoid has joined #ocaml
psnively has quit [Client Quit]
yunxing_ has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]
yunxing_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
yunxing_ has quit [Ping timeout: 250 seconds]
hcarty has quit [Ping timeout: 246 seconds]
yunxing_ has joined #ocaml
yunxing__ has joined #ocaml
yunxing_ has quit [Ping timeout: 246 seconds]
Kakadu has quit [Remote host closed the connection]
nicholasf has joined #ocaml
bensu_ has quit [Remote host closed the connection]
bensu_ has joined #ocaml
bensu_ has quit [Remote host closed the connection]
bensu has joined #ocaml
nicholasf has quit [Ping timeout: 258 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
bensu has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
A1977494 has quit [Remote host closed the connection]
nicholasf has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
agarwal1975 has joined #ocaml
nicholasf has quit [Ping timeout: 260 seconds]
bensu has joined #ocaml
bensu has quit [Remote host closed the connection]
bensu_ has joined #ocaml