adrien 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.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<seangrove> orbifx: It's a pretty important infrastructure piece, requires a ton of auditing/eyes, but was still sufficiently important for the mirage community to want to replace it
tristero has quit [Quit: tristero]
<orbifx> they may have had the resources. It's a fine line between bold and foolish :P
<orbifx> I sure hope it's the former.
pgiarrusso has joined #ocaml
<orbifx> if you believe in a language as being superior, I guess you'd eventual want to migrate everything there.
pgiarrusso has quit [Ping timeout: 244 seconds]
<seangrove> orbifx: Certainly filed under "ambitious" in either case :)
silver has quit [Read error: Connection reset by peer]
dksong has joined #ocaml
dksong has quit [Client Quit]
Kakadu has quit [Remote host closed the connection]
tristero has joined #ocaml
<fds> Being superior to (in the context of `more secure than') C isn't a terribly high standard. :-P
pgiarrusso has joined #ocaml
djellemah has quit [Ping timeout: 248 seconds]
djellemah has joined #ocaml
_berke_ has joined #ocaml
<_berke_> I have code that depends on a number of opam packages. I'm including a file "deps" in the git repo which is the output of an "opam switch export" and asking the users to run "opam switch import foo" to make sure they have the required packages before executing the whole oasis setup etc. process. is this a valid way of doing things? (I've heard some non-specific complaints.)
pgiarrusso has quit [Ping timeout: 250 seconds]
<orbifx> _berke_: sounds like a job for a package manager
<orbifx> if they are developers they can manage their own opam installations, but if they are end-users with no appetite for this kind of thing, you need something easier.
<_berke_> well a coworker is actually trying to package the code as an RPM
<_berke_> he's trying to get opam to play ball with the RPM package building stuff
<_berke_> apparently you can't invoke opam switch import twice
<orbifx> I dare speculate that this can be worked out with scripting, but take it from start. Can you create a single executable which is distributed with your rpm or is it too big?
<_berke_> size is not an issue, there are multiple executables though.
<orbifx> package them all in your rp,
<orbifx> rpm
<orbifx> or make multiple rpms if you want to brake it up
<orbifx> is that viable?
<_berke_> yes having a single rpm is fine
<_berke_> I think the main problem is having all the opam dependencies built before the oasis setup/configure is invoked
<_berke_> so he's looking for a command.. or set of commands.. that will make sure a list of opam packages are installed.
<_berke_> if opam switch import doesn't work then I guess then something like opam install `cat my.deps` might do the trick
<orbifx> I'm not familiar with rpms; are you looking to make some kind of source package?
<orbifx> Because otherwise, the packages shold be compiled on the developer's machine, who will be responsible to set up the environment.
<_berke_> not sure myself. there is a spec file in the repo for the ocaml code that is used by rpmbuild.
<_berke_> well that may be the problem, the other thing is that he wants this to be done on the autobuilder.
<orbifx> The user should just install the package, which copies binaries and other objects in the right place to execute.
<_berke_> the end-user, yes. they won't be compiling anything. they don't need opam/ocaml.
<orbifx> I wouldn't be expecting my package manager to interact with opam. That said it should be technically possible.
<orbifx> One is for setting a dev environment (opam), the other is for distributing complete packages (rpm, et al)
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antkong_ has quit [Quit: antkong_]
<orbifx> Another idea _berke_ is to export the switch and save it somewhere with the package.
<orbifx> So setting up a dev environment becomes easy, as you just import the switch
antkong_ has joined #ocaml
foolishmonkey has quit [Quit: Leaving]
<_berke_> that's exactly what I did
<_berke_> but the packaging guy says that opam switch import doesn't work when you call it twice (i.e. if the packages are already there)
<_berke_> I'm trying to writing some little awk script that will issue individual opam install commands
<_berke_> s/writing/write
<orbifx> even so, the dev will get the error and act accordingly
<orbifx> notice I didn't say this should be part of the package installation procedure
<orbifx> only that you drop in /usr/share/<pkg>/switches/ (whatever is suitable for Fedora) a switch export.
<orbifx> I suspect you are using Fedora, or maybe CentOS?
<_berke_> I'm a debian guy, but apparently we're now using centos at the shop
<_berke_> :(
<orbifx> feces happens :P
<orbifx> could be worse, could be winblows
<orbifx> anything I gotta go: but my suggestion is to not try to automatically link the package processes with OPAM. Devs are grown-ups they can manage their environment and switches.
<_berke_> well I'm mostly the dev, but then there is this autobuilder which is not a human
<_berke_> thanks for your tips
<orbifx> Trying to pair opam with rpm, is asking for trouble. Something will break in the end.
<orbifx> s/anything/anyway >> running out of steam.
<orbifx> Good luck
<orbifx> cya
<_berke_> thx bye
JacobEdelman_ has quit [Quit: Connection closed for inactivity]
ousado has joined #ocaml
Janni has quit [Remote host closed the connection]
antkong_ has quit [Quit: antkong_]
antkong has joined #ocaml
FreeBirdLjj has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
orbifx has quit [Quit: WeeChat 1.3]
martintrojer has quit [Ping timeout: 255 seconds]
pgiarrusso has joined #ocaml
aantron has joined #ocaml
pgiarrusso has quit [Ping timeout: 265 seconds]
exm has joined #ocaml
seangrove has quit [Ping timeout: 265 seconds]
Algebr` has joined #ocaml
seangrove has joined #ocaml
seliopou has quit [Quit: whaaaat]
seliopou_ has joined #ocaml
jeffmo has quit [Quit: jeffmo]
struktured has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
antkong__ has joined #ocaml
antkong has quit [Ping timeout: 255 seconds]
antkong__ is now known as antkong
idegen has quit [Quit: Leaving.]
antkong has quit [Quit: antkong]
yunxing has joined #ocaml
yunxing_ has joined #ocaml
yunxing has quit [Ping timeout: 240 seconds]
antkong has joined #ocaml
struktured has quit [Ping timeout: 255 seconds]
kushal has joined #ocaml
<yunxing_> Noob question: Is there a way to find out all the exposed apis of a compiled library?
<aantron> yunxing_: typically such a library would be installed somewhere with .mli files, and you can look at those. what are the specifics?
<yunxing_> aantron: Thanks. I'm trying to find the available apis for myocamlbuild.ml and I noticed that it is linked with something in "/Users/yunxing/.opam/4.02.1/lib/ocaml/ocamlbuild/"
<aantron> for myocamlbuild, you may want to look at https://nicolaspouillard.fr/ocamlbuild/html/Signatures.PLUGIN.html
<yunxing_> aantron: Thanks. Are these the only available apis? I noticed that ocamlbuild_pack is also available for me: https://github.com/ocaml/ocamlbuild/blob/26760d6125648cf7246bac2ffc2628e790bada3a/bootstrap/ocamlbuild.mltop
cyraxjoe has joined #ocaml
<yunxing_> aantron: hmm I guess I can just look at the source code of ocamlbuild_pack to figure out what are its apis
<aantron> no, i think this page is out of date (not fully certain). to get more accurate info, try this: https://github.com/ocaml/ocaml/tree/4.02/ocamlbuild (if you are using 4.02)
<aantron> exactly
<aantron> you will want to start in ocamlbuild_plugin.mli but you will have to read source and jump between files
cschneid_ has quit [Ping timeout: 240 seconds]
<yunxing_> aantron: Cool, thank you!
_habnabit has quit [Ping timeout: 268 seconds]
jyc has quit [Ping timeout: 268 seconds]
cschneid has joined #ocaml
_habnabit has joined #ocaml
darkf has quit [Ping timeout: 250 seconds]
darkf has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
darkf_ is now known as darkf
MercurialAlchemi has joined #ocaml
alpen has quit [Quit: ZNC - http://znc.in]
aantron has quit [Quit: Leaving...]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
Mercuria1Alchemi has joined #ocaml
jyc has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
cyraxjoe has quit [Quit: Farewell my friend... farewell]
yunxing_ has quit [Remote host closed the connection]
yunxing has joined #ocaml
antkong has quit [Quit: antkong]
ygrek has joined #ocaml
cyraxjoe has joined #ocaml
seangrove has quit [Ping timeout: 255 seconds]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
pierpa has quit [Ping timeout: 265 seconds]
martintrojer has joined #ocaml
SHODAN has quit [Ping timeout: 248 seconds]
foolishmonkey has joined #ocaml
SHODAN has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
SHODAN has quit [Ping timeout: 244 seconds]
mehdi_ has quit [Ping timeout: 250 seconds]
seangrove has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
SHODAN has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
mehdi_ has joined #ocaml
Simn has joined #ocaml
seangrove has quit [Ping timeout: 250 seconds]
silver has joined #ocaml
keep_learning has joined #ocaml
<keep_learning> Hello everyone
<keep_learning> I am trying to run code http://lpaste.net/152729
<keep_learning> but getting ocamlfind: Package `Cohttp_lwt_unix' not found
<keep_learning> Could some one please tell me how to resolve this error.
ousado has quit [Ping timeout: 240 seconds]
ousado has joined #ocaml
<edwin> keep_learning: you need to use the ocamlfind package names from ocamlfind list, not the module names
<edwin> so -package lwt,cohttp,cohttp.lwt
larhat has joined #ocaml
<edwin> (in fact cohttp.lwt already depends on cohttp,lwt so you can shorten that to -package cohttp.lwt)
<keep_learning> edwin, Thank you
mehdi_ has quit [Ping timeout: 250 seconds]
mehdi_ has joined #ocaml
lordf has joined #ocaml
AlexRussia has quit [Ping timeout: 250 seconds]
larhat has quit [Quit: Leaving.]
malc_ has joined #ocaml
cyraxjoe_ has joined #ocaml
cyraxjoe_ has quit [Remote host closed the connection]
cyraxjoe_ has joined #ocaml
warp has joined #ocaml
cyraxjoe has quit [Quit: Farewell my friend... farewell]
cyraxjoe_ is now known as cyraxjoe
lordf has quit [Ping timeout: 240 seconds]
Algebr` has quit [Ping timeout: 240 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
pgiarrusso has joined #ocaml
dksong has joined #ocaml
jwatzman|work has joined #ocaml
larhat has joined #ocaml
butts_butts has joined #ocaml
Janni has joined #ocaml
larhat has quit [Quit: Leaving.]
<Janni> Hi. I have a question: consider four classes with a diamond inheritance structure. a > b; a > c; b > d; b > d with > denoting the superclass relation. I was surprised to see that in "d" the values of "a" were overwritten upon declaring "inherits c". It seems to render such diamond-shaped inheritance useless...
kansi has joined #ocaml
malc_ has quit [Quit: leaving]
<Janni> Sorry, one "b > d" should be a "c > d".
<kansi> hi, I am trying to send stream response in cohttp ... can someone point me to an example ?
insane_person has joined #ocaml
_andre has joined #ocaml
orbifx has joined #ocaml
<orbifx> hello
lordf has joined #ocaml
dksong has quit [Quit: Leaving.]
larhat has joined #ocaml
kushal has joined #ocaml
Kakadu has joined #ocaml
larhat has quit [Quit: Leaving.]
alpen has joined #ocaml
<insane_person> hello orbifx :D
antkong_ has joined #ocaml
<companion_cube> o/
<insane_person> \o/
<insane_person> anyone using qt with ocaml?
<mrvn> starting to
<insane_person> painful?
<mrvn> writing my own bindings for QT5, so yes.
<flux> mrvn, you're trying an approach different from kakadu's then?
<mrvn> I'm binding the widgets, no MOC.
kushal has quit [Quit: Leaving]
Ravana has quit [Quit: Goodbye for now!]
<flux> are you interested in the QtQuick side?
<flux> ..personally I consider that to be the whole point of Qt5.. :)
<flux> it would be super to use js_of_ocaml for that part.
<mrvn> I don't eant o have to write my GUI in 4 languages.
<mrvn> s/eant o/want to/
<flux> (but probably too much effort for the benefits)
<flux> well, are your Qt bindings reactive? didn't think so ;)
Ravana has joined #ocaml
<mrvn> what do you mean by reactive?
<flux> width = parent.width / 2 /* width updates automatically when parent is resized */
<mrvn> no
<flux> as that's really the most powerful aspect of qt5, IMHO.
<mrvn> With widgets you set a weight on each and QT resizes accordingly.
<flux> well, it covers content as well
<mrvn> lets hope that reactive thing works better than sizes in widgets.
<flux> the greatest lack (IMO) in Qt's reactive system is that you cannot anchor to sister nodes
kushal has joined #ocaml
<flux> those need to be hacked in
<flux> but other than that, it's super :)
<insane_person> btw, why not gtk? :D
<flux> gtk is the practical solution to writing GUIs in OCaml at the moment
<mrvn> flux: I would overload the resizeEvent and react from that
<flux> mrvn, well, sure, it can be done
<flux> but what can beat the expressiveness of this? angle: (clock.hours * 30) + (clock.minutes * 0.5)
<mrvn> insane_person: I tried it a few years back and it (gtk) was horribly undocumented and things like lists or tables would always flicker on change.
slicefd has joined #ocaml
<flux> and simple things: visible: mode == "Blah"
<orbifx> Kakadu: when are you having the propertiesmap merged into the main code?
<mrvn> flux: sure. But then why do you use ocaml if you want reactive programming?
<orbifx> mrvn: have you seen lablqt?
<flux> mrvn, maybe I want to write the actual meat of the project in ocaml :)
<flux> besides, ocaml has reactive libraries
<orbifx> what's the issue with OCaml's reactiveness?
<mrvn> orbifx: that's QtQuick and qml. not widgets.
<orbifx> ow yeah
<flux> well, both are certainly nice to have if you develope a Qt app
<mrvn> totaly.
<flux> so in that sense it might even make sense to combine those efforts?-o
<insane_person> can't ocaml be reactive? it's a perfect candidate imo
<companion_cube> isn't there a binding to wxWindows or something like this?
<mrvn> Ideal would be a fusion of all so you can pick and choose whatever works best at the moment.
<mrvn> insane_person: 11:40 < flux> besides, ocaml has reactive libraries
dksong has joined #ocaml
dksong has quit [Client Quit]
<insane_person> mrvn: yeah, but you sounded like it wasn't a good thing to do in that language
darkf has quit [Quit: Leaving]
<mrvn> insane_person: can't say, never tried
<insane_person> mrvn: I was kind of doing reactive stuff with cljs, it sucked
<insane_person> but was pretty :D
larhat has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sorella has joined #ocaml
djellemah_ has joined #ocaml
<orbifx> Can a mutable value of an object be directly set outside the object in OCaml?
<foolishmonkey> if it's public yes
zozozo has quit [Quit: WeeChat 1.3]
<orbifx> thanks
larhat has quit [Quit: Leaving.]
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
zozozo has joined #ocaml
<orbifx> can't find how a value is declared as public
octachron has joined #ocaml
<Drup> _berke_: this switch import solution is quite akward .. why didn't you just put an "opam" file ?
<orbifx> foolishmonkey: any hints?
<orbifx> according to a table wikipedia a field can't be public
<foolishmonkey> public means declared in the type signature of the class
<orbifx> table on wikipedi^
<Kakadu> orbifx: AFAIR values can't be 'public'
<Kakadu> So I would write getter and setter
djellemah_ has quit [Ping timeout: 276 seconds]
<orbifx> Kakadu: would you be up for merging the property map today? Cause it's a bit tedious to write all these getters and setters :P
djellemah_ has joined #ocaml
larhat has joined #ocaml
<Kakadu> I think it is possible, yes
<orbifx> I was going make a patch, but since you have written it, it's probably faster for you to move the module etc..
djellemah_ has quit [Client Quit]
djellemah_ has joined #ocaml
JacobEdelman_ has joined #ocaml
MercurialAlchemi has joined #ocaml
insane_person has left #ocaml ["Leaving"]
AlexRussia has joined #ocaml
antkong_ has quit [Quit: antkong_]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
jwatzman|work has quit [Read error: Connection reset by peer]
jwatzman|work has joined #ocaml
FreeBird_ has joined #ocaml
yunxing has quit [Read error: Connection reset by peer]
yunxing has joined #ocaml
<orbifx> Kakadu: does the generator automatically make the get methods?
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<Kakadu> no
<Kakadu> Not the ones you are talking about
dksong has joined #ocaml
dksong has quit [Client Quit]
dksong has joined #ocaml
<orbifx> if i declare in the class the get function, it complains about bein previously declared etc.
<Kakadu> because there is one
<Kakadu> which is called from C++
<Kakadu> virtual one
averell has joined #ocaml
dksong has quit [Ping timeout: 276 seconds]
Haudegen has quit [Ping timeout: 248 seconds]
badon has quit [Ping timeout: 276 seconds]
badon has joined #ocaml
lmaury has joined #ocaml
Haudegen has joined #ocaml
BitPuffin has joined #ocaml
djellemah_ has quit [Ping timeout: 276 seconds]
sgnb has joined #ocaml
larhat has quit [Quit: Leaving.]
ggole has joined #ocaml
FreeBird_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
lokien_ has joined #ocaml
dksong has joined #ocaml
Janni has quit [Read error: Connection reset by peer]
dksong has quit [Ping timeout: 276 seconds]
idegen has joined #ocaml
<Kakadu> orbifx: I put that to the library. You can test
<orbifx> Thanks Kakadu
<orbifx> will download in a little bit.
dksong has joined #ocaml
dksong has quit [Client Quit]
<infinity0> does anyone know what happened to ocamleditor
<infinity0> it hasn't been updated in quite a while
butts_butts_ has joined #ocaml
butts_butts has quit [Ping timeout: 240 seconds]
dksong has joined #ocaml
dksong has quit [Client Quit]
<orbifx> infinity0: dunno. It hasn't been updated for a while? :P
<orbifx> Has the developer got a blog?
elfring has joined #ocaml
<infinity0> oh looks like he moved it to github and did a new release a month ago https://github.com/ftovagliari/ocamleditor
<infinity0> but the README still says "Ocaml-4.01.0" lemme see if this works with 4.02.3..
<companion_cube> this gives me the urge to update the readme into some markup format
exm has left #ocaml [#ocaml]
struktured has joined #ocaml
<edwin> is 4.01.0 the minimum or an exact requirement? cause in the source code it would appear to be a minimum: https://github.com/ftovagliari/ocamleditor/blob/358707440cab793176112aca9710a533f9c72ac5/tools/prepare_build.ml#L39
<edwin> but in opam it has an exact version constraint
struktured has quit [Ping timeout: 255 seconds]
<infinity0> i'm getting build failures with 4.02.3, even though the latest opam version (1.13.4) has no maximum ocaml version constraint
dksong has joined #ocaml
<infinity0> oh looks like there is an exact constraint in the opam file as you say https://github.com/ocaml/opam-repository/blob/master/packages/ocamleditor/ocamleditor.1.13.4/opam
th5 has joined #ocaml
dksong has quit [Ping timeout: 255 seconds]
jeffmo has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
copy` has joined #ocaml
slicefd has quit [Quit: WeeChat 1.4]
aantron has joined #ocaml
<orbifx> Kakadu: is the updated version available on opam?
<Kakadu> orbifx: you can try this repo: http://kakadu.github.io/lablqt/opam-dev
<Kakadu> I didn't tested that today, though
JacobEdelman_ has quit [Ping timeout: 250 seconds]
<orbifx> Kakadu: says not found
<Kakadu> who says?
<Kakadu> http://kakadu.github.io/lablqt/ bottom of the page
j_king has joined #ocaml
Anarchos has joined #ocaml
<orbifx> the opam-dev link goes to a 404 page.
<orbifx> maybe it works on a different port/protocol
<orbifx> adding to opam
SimonJF has joined #ocaml
<Kakadu> I think it works
kushal has quit [Quit: maxamillion]
kushal has joined #ocaml
mstevens has joined #ocaml
<mstevens> hello camels
<companion_cube> hi mstevens
<companion_cube> how's the reading going?
<mstevens> companion_cube: progress is ongoing
<companion_cube> I demand a progress bar then
<mstevens> companion_cube: one bit that excited me but may seem dull is being baffled by |> , then reading a bit more and going "suddenly I see this is amazingly useful"
<companion_cube> heh!
<mstevens> companion_cube: I spent some time last night following the RWO install instructions to get my laptop setup to follow along
<companion_cube> ah yeah, you need to install core and all the stuff
<mstevens> companion_cube: that actually totally baffled me at first
<mstevens> I think I had to ask in here
<companion_cube> you don't need to use Core afterwards, though :p
<mstevens> So I have something called merlin installed, which I'm apparently going to like ahtough I don't know what it does yet
<mstevens> companion_cube: once I get far enough I have a vague idea for a project
Anarchos has quit [Quit: Page closed]
<mstevens> something in the rss reader / ifttt area
<companion_cube> nice
<companion_cube> (yes, you will like merlin)
<companion_cube> (it brought OCaml from having 5% of an IDE to 90%)
<mstevens> I like an IDE but they're not essential
johnf has joined #ocaml
<mstevens> I liked options
<mstevens> I approve of options
<orbifx> Kakadu: # E: Cannot find findlib package sexplib.syntax
<orbifx> installing latest lablqt fails with that
<companion_cube> not essential, but so damn useful
<orbifx> also anyone know where the prefix "labl" comes from for lablqtk, labltk et al?
<SimonJF> hi everyone, sorry to bother -- i'm having a bit of an issue with ppx_deriving. after installing, following the documentation and importing ppx_deriving.std seems to give me a "Package `ppx_deriving.std' not found
<aantron> SimonJF: can you find ppx_deriving.std in the output of "ocamlfind list"?
<Kakadu> orbifx: I installs for me without error
<orbifx> I have sexplib installed. Does it provide sexplib.syntax?
<SimonJF> aantron: nope, unfortunately not -- i get ppx_deriving, and ppx_deriving.{api .. show}
<SimonJF> i only really want show anyway, and importing ppx_deriving.show goes through but doesn't seem to actually do anything (ie, doesn't seem to generate any of the functions according to -dsource)
<orbifx> Kakadu: could it be that you have installed already what it takes?
<Kakadu> maybe...
<Kakadu> I just don't remember why it needs sexplib.syntax
<Kakadu> my log btw, https://paste.in.ua/1371/
Algebr` has joined #ocaml
<aantron> hmmm, what attribute are you adding to use ppx_deriving.show?
<aantron> not sure why the std subpackage is missing. i have it and also there doesnt seem to be any recent change regarding it in the ppx_deriving repo..
<infinity0> bah yes ocamleditor is very tied to 4.01, it uses compiler-libs and the API has changed completely, just spent an hour trying to fix all the differences and still i have no idea how much there is left to fix, giving up
<SimonJF> by attribute, are you meaning entry to the _tags file? (sorry, i'm rather new)
<aantron> perhaps you dont have all the other subpackages installed?
Guest38 has joined #ocaml
<orbifx> Kakadu: what sexplib packages have you got installed?
<aantron> no, i mean in your ocaml source you have to add something like [@@ ...] to use ppx_deriving on a type
<SimonJF> oh, i see
<Kakadu> 113.00.00
pierpa has joined #ocaml
<SimonJF> type message = ... [@@deriving show]
lordf has quit [Ping timeout: 240 seconds]
<aantron> when you use -dsource, does it 1) remove [@@deriving show] 2) but not add the printing functions?
<octachron> orbifx, AFAIK, the names lbl.. comes from the historical fork O'labl of ocaml which introduced labels before being merged in OCaml 3.00
<aantron> (with package ppx_deriving.show)
<companion_cube> infinity0: :/
<companion_cube> what does it use compiler-libs for?
<SimonJF> it keeps the [@@deriving show], essentially doing nothing else
<companion_cube> (it probably should use merlin ^^)
<aantron> that means the ppx isn't running on that syntax tree
<aantron> i guess it wouldnt remove it either way
<orbifx> octachron: wow, now there is a relic :P
<aantron> how are you compiling?
<SimonJF> i'm using ocamlbuild; i have package(ppx_deriving.show) in the _tags file.
<SimonJF> (thanks so much for helping, by the way)
<SimonJF> i'm on 4.02.3
<aantron> applied to which files? what is the whole tag line, and where is your offending source file located relative to _tags?
<infinity0> companion_cube: i guess for everything... sucks that they change the API so significantly, some of it is arbitrary renaming of record/constructor names
<aantron> or rather, relative to your project root
<aantron> or wherever you start ocamlbuild in
<SimonJF> righto so i have project root (with _tags) and a src directory
<SimonJF> the _tags line is <src/*>: package(ppx_deriving.show)
<SimonJF> but the same seems to happen if i just set that to true in any case
<aantron> okay
<aantron> can you apply a bogus package tag like <src/yourfile.ml>: package(fake) to just your file?
<aantron> when ocamlbuild fails, it should print the command that failed
<SimonJF> sure
<aantron> actually, how did you pass -dsource before? im guessing you were compiling that file individually?
<SimonJF> + ocamlfind ocamldep -package core -package fake -package ppx_deriving.show -modules src/scribbleAST.ml > src/scribbleAST.ml.depends
<aantron> but anyway
<aantron> we just want the command, but if you have another command that isnt working as expected, we can just proceed with that
<SimonJF> yeah, i found it using some google-fu -- one sec, lemme try and find it again
<aantron> okay i guess thats failing too early.. never mind. you may want to use ocamlbuild's verbose flag instead
<aantron> (like whatever you used with -dsource)
<companion_cube> please use a build system :D
<aantron> companion_cube: SimonJF is using ocamlbuild, we are just debugging
<companion_cube> -use-ocamlfind -package ppx_deriving.std doesn't work? :(
<SimonJF> sorry, just gotta reconstruct this
<SimonJF> alas no, ppx_deriving.std doesn't seem to be found, and ppx_deriving.show seems to be a no-op
octachron has quit [Quit: Leaving]
<companion_cube> that is very strange, if you have 4.02.3 + an up to date opam
<SimonJF> ah, there we go, this was the one i used: ocamlfind ocamlc -c -g -bin-annot -thread -package core -package ppx_deriving.show -I src -I lib -o scribbleAST.cmo -dsource scribbleAST.ml
<SimonJF> opam remove ppx_deriving
malc_ has joined #ocaml
<SimonJF> whoops, thought this was a terminal for a second, sorry
<aantron> :)
<aantron> if reinstalling doesnt fix it, can you show your type, including the attribute, and the output of -dsource, including the type and the line that follows it?
<orbifx> can I modify an opam package before installing it?
<aantron> orbifx: you can pin it, modify it, then install the pinned version
<SimonJF> sure, this is the output of -dsource: http://pastebin.com/BwEsM2G5
<orbifx> aantron: any links on this?
<orbifx> opam pin add xyz?
<aantron> orbifx: try "opam pin --help" to get started
<orbifx> thanks
<orbifx> simple :P
<aantron> SimonJS: what if you add the attribute to types name and payload_ty?
<aantron> i am not sure if that is necessary, been a while since i used deriving
<SimonJF> just noticed that :) but unfortunately it's the same; nothing seems to happen
<aantron> so it doesnt even work for "type name = string [@@deriving show]" ?
<SimonJF> it doesn't seem to, unfortunately -- it seems like this is more an issue of my setup than anything else by the sounds of it
<aantron> if no, can you create a file outside your project called, say, blah.ml, with contents: type message = string [@@deriving show]
yunxing has quit [Ping timeout: 240 seconds]
<SimonJF> sure, will do
<aantron> compile with: ocamlfind c -package ppx_deriving.show -dsource -c blah.ml
<aantron> if this also doesnt work, then it seems very much like something is wrong with the ppx_deriving installation..
<nullcatxxx_> anyone knows how to disable camlp4 preprocessing when building a library using oasis
<SimonJF> aantron: seems like the same thing's happening
<nullcatxxx_> i need to camlp4 to preprocess other files, but not for a specific library
<orbifx> gotta go
<SimonJF> yes, i think something must be up with the installation, especially given i can't get .std working either
<orbifx> more tomorrow
orbifx has quit [Quit: WeeChat 1.4]
<aantron> can you do opam list and tell us which version of ppx_deriving is installed?
<SimonJF> sure -- it's 0.3
<aantron> 0.3 or 3.0?
<SimonJF> 0.3, apparently
<aantron> ok that would explain it
<aantron> judging by the release date and when .std was added to the META file (apparently, only 80% verified :) )
<aantron> can you do opam remove ppx_deriving && opam install ppx_deriving.3.0?
<Drup> 0.3 is a very old version
<Drup> (you don't need the remove part)
<aantron> ^
<SimonJF> hm, odd -- it says that it's not available for the compiler or my OS (but i'm on 4.02.3)
<SimonJF> and up-to-date arch linux
<aantron> ocaml -version?
slash^ has joined #ocaml
<SimonJF> yup, "The OCaml toplevel, version 4.02.3"
<aantron> also opam switch, what is your current switch, and have you done eval `opam config env` since the last time you switched or since you installed opam?
<aantron> and opam --version
lokien_ has quit [Quit: Connection closed for inactivity]
Algebr` has quit [Ping timeout: 250 seconds]
<SimonJF> opam version 1.1.1; and switch is 4.02.3 with config env done already, yes
<aantron> you need opam at least 1.2
<aantron> this is in the opam file of ppx_deriving: available: [ ocaml-version >= "4.02.1" & opam-version >= "1.2" ]
<Drup> opam 1.1 is also quite old now :D
<aantron> im going to have to defer to someone familiar with arch linux if you have difficulty getting opam 1.2 installed on it, though
BitPuffin has quit [Read error: Connection reset by peer]
<Drup> You shouldn't, 1.2.1 is in AUR
<SimonJF> gotcha, thanks!
BitPuffin has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<reynir> SimonJF: o/
<SimonJF> reynir: hi! :)
<SimonJF> just doing a full reinstall of ocaml. think this will probably have got to the bottom of the issue -- thanks so much for your time on this
<SimonJF> i'm really appreciative
<Drup> you don't have to reinstall ocaml
<Drup> just upgrade opam
regnat_ has joined #ocaml
regnat_ has quit [Client Quit]
regnat_ has joined #ocaml
foolishmonkey has quit [Remote host closed the connection]
regnat_ has quit [Client Quit]
regnat_ has joined #ocaml
regnat_ has quit [Client Quit]
<SimonJF> works! thanks *so* much!
<aantron> enjoy!
<SimonJF> i'd been stuck on that all day! i can't thank you enough
tane has joined #ocaml
butts_butts_ has quit [Ping timeout: 244 seconds]
igoroliveira has joined #ocaml
jozefg has joined #ocaml
foolishmonkey has joined #ocaml
warp has quit [Ping timeout: 250 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
ollehar has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
malc_ has quit [Quit: leaving]
struk|desk has joined #ocaml
ygrek has joined #ocaml
jozefg has quit [Ping timeout: 250 seconds]
kushal has quit [Read error: Connection reset by peer]
yunxing has joined #ocaml
butts_butts has joined #ocaml
lmaury has quit [Quit: Leaving]
megaTherion has joined #ocaml
Kakadu has quit [Quit: Page closed]
_berke_` has joined #ocaml
kushal has joined #ocaml
_berke_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
_berke_` has left #ocaml [#ocaml]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<infinity0> anyone know what Pre_sexp.Of_sexp_error(_, _) is supposed to mean
<infinity0> it's triggering on my innocent looking code `string_of_sexp (sexp_of_t val)`
srcerer has joined #ocaml
<edwin> you probably call the wrong conversion function
<edwin> I think there are two of them in different modules, and only one supposed to be called
<infinity0> ah ok i'll try to find that thanks
<edwin> Sexplib.Sexp.to_string (Sexplib.Sexp.of_string "(a)")
<edwin> vs
<edwin> Sexplib.Std.string_of_sexp (Sexplib.Sexp.of_string "(a)");;
jozefg has joined #ocaml
<edwin> I haven't tried to track down what the error means though
mstevens has quit [Quit: leaving]
<edwin> here it is, string_of_sexp can only convert atoms, not lists:
<edwin> let string_of_sexp sexp = match sexp with
<edwin> | Atom str -> str
<edwin> | List _ -> of_sexp_error "string_of_sexp: atom needed" sexp
<infinity0> edwin: cool that worked, thanks!
lordf has joined #ocaml
megaTherion has left #ocaml ["Leaving"]
kansi has quit [Ping timeout: 255 seconds]
vishesh has quit [Quit: WeeChat 1.3]
vishesh has joined #ocaml
vishesh has quit [Client Quit]
<aantron> Drup, tyxml has no tests, or they are in some other repo perhaps?
<Drup> ahah :sob:
<Drup> I should really write them
Kakadu has joined #ocaml
_andre has quit [Quit: leaving]
Haudegen has quit [Ping timeout: 276 seconds]
ggole has quit []
jozefg has quit [Ping timeout: 240 seconds]
cat5e has quit [Ping timeout: 244 seconds]
lokien_ has joined #ocaml
<icicled> Is there a recommended way to pass "-tag thread" via oasis to ocamlbuild?
antkong has joined #ocaml
<icicled> I don't see it mentioned in the doc very clearly (there is a reference to an alpha feature in the doc which might allow me to do this - would this be it?)
<Drup> Add "threads" in the dependency array
<icicled> that was easy =\
Haudegen has joined #ocaml
<icicled> thanks Drupp
<Drup> :D
al-maisan has quit [Quit: See you later..]
alexst has joined #ocaml
<aantron> Drup, i am thinking to support antiquotations like this: [%tyxml "<body class='" (s class_) "'><p>" (n node) "</body>"] i.e. the payload of %tyxml would be a type-incorrect application expression involving strings, (s e) where e : string, and (n e) where e : ...elt
antkong has quit [Ping timeout: 276 seconds]
<aantron> any comments, objections?
<Drup> I don't disagree, but (s e) and (n e) is rather bad
johnf_ has joined #ocaml
<Drup> We can probably do better than that
<aantron> give me your ideas, my other option was something like [%s ...] like in ppx_metaquote
<aantron> we can choose pretty much anything as long as it makes sense
<Drup> Can't we just say it's always an expression ?
<aantron> what is always an expression?
<Drup> Actually, why do we care about the type ?
<Drup> It should be infered
struk|desk2 has joined #ocaml
mrvn_ has joined #ocaml
bacam_ has joined #ocaml
alexst_ has joined #ocaml
<aantron> from what? i have to step out for about an hour
<Drup> In your example, it's non ambiguous
<Drup> the first hole couldn't be an elt, the second hole couldn't be a string
<Drup> If people want pcdata, they can use that explicitely,
<aantron> i know that its not ambiguous, but markup.ml currently wont pause in the middle of an attribute for you to easily know that thats where you are
cojy has quit [Ping timeout: 255 seconds]
bacam has quit [Ping timeout: 255 seconds]
mrvn has quit [Ping timeout: 255 seconds]
struk|desk has quit [Ping timeout: 255 seconds]
johnf has quit [Ping timeout: 255 seconds]
alexst has quit [Ping timeout: 255 seconds]
Algebr` has joined #ocaml
<Drup> You are translating to ocaml expression, aren't you ?
<aantron> in addition strings could be used for things other than pcdata, like inserting bytes into the input stream
julienXX has quit [Ping timeout: 255 seconds]
cojy_ has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
<Drup> Just put the ocaml expression at the place it's supposed to be
<Drup> The typechecker will do its work
julienXX has joined #ocaml
<aantron> that works for the "(n" construct, not for strings inserted into the input stream
<icicled> If I'm using alcotest, in my _oasis file shoudl I be creating a "Test", "Executable", or both (like in the "with-test" example shipped with oasis)?
<aantron> anyway bbl
<Drup> input stream ?
<Drup> icicled: both
<Drup> Test is a command to run
<icicled> I see
<icicled> the Type field under test in the example is set to Custom - what else could it be?
Soni has joined #ocaml
Soni is now known as cat5e
<aantron> actually i think part of what i am saying cant work anyway. will comment when back
<Drup> Huum, I don't remember
mankyKitty has quit [Ping timeout: 265 seconds]
<Drup> icicled: the documentation being remarkably unhelpful, just leave it be
<Drup> It's not a mandatory attribute
<icicled> =\ I don' feel great copying/pasting and not knowing why
mankyKitty has joined #ocaml
<Drup> I think it can be "None" too
<icicled> Thanks Drup, I'll play around with it some
<Drup> It can be one of the plugins
<Drup> but only "None" and "Custom" are available for tests
<Drup> I think it means "just use this custom shell script"
<Drup> which is usually what you want for tests
<icicled> maybe it allows running the cmd specified in XCustomClean
<icicled> and XCustomDistClean
<Drup> It seems like it
alexst_ has quit [Ping timeout: 240 seconds]
Simn has quit [Quit: Leaving]
slash^ has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
kushal has quit [Ping timeout: 248 seconds]
idegen has left #ocaml [#ocaml]
ril has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
BitPuffin has quit [Ping timeout: 248 seconds]
<infinity0> is it possible to declare a record type that extends a previous one?
<Drup> No
<Drup> You can do it with module or objects, though
johnf_ has quit [Read error: Connection reset by peer]
<infinity0> aw ok
<Drup> well, not really objects, just classes ...
johnf has joined #ocaml
julien_t has joined #ocaml
cojy_ is now known as cojy
MercurialAlchemi has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yunxing has quit [Remote host closed the connection]
Guest38 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
Guest38 has quit [Client Quit]
yunxing has joined #ocaml
<aantron> Drup: re anitquotations, they can be done as you suggest, but markup.ml has to be modified slightly to expose some state, so i will do that
Algebr` is now known as Algebr2
<Drup> right
<Anarchos> who does know a good tutorial on merlin with vim ?
<Drup> I didn't really consider what is possible with markup.ml :)
yunxing has quit [Remote host closed the connection]
vishesh has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
butts_butts has quit [Ping timeout: 240 seconds]
Nairwolf has joined #ocaml
th5 has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
julien_t has quit [Ping timeout: 248 seconds]
darkf has joined #ocaml
Denommus has joined #ocaml
antkong has joined #ocaml
antkong has quit [Client Quit]
yunxing has joined #ocaml
antkong_ has joined #ocaml
nicooo is now known as nicoo
ollehar has quit [Quit: ollehar]
<aantron> Drup, do you prefer the ppx to recover from errors silently, or fail on ill-formed markup?
<Drup> It should be an option, certainly
<Drup> I'm not sure about the default, though
<aantron> it seems to me that failing is better. it will be on string constants that the programmer can fix
<Drup> True, but it would be nice to be able to copy paste pieces of html from internet examples
<Drup> and have it "just work"
<Drup> (in the limit of the capability of sloppy html, of course)
<aantron> right
struk|desk2 is now known as struk|desk|away
lokien_ has quit [Quit: Connection closed for inactivity]
Algebr2` has joined #ocaml
<aantron> Drup, its worth noting, however, that bad html could get through markup.ml, only to then cause a type error on tyxml. its not immediately clear that its common for bad html to get through markup.ml and then typecheck fine
<Drup> hum, indeed
ril has joined #ocaml
Algebr2 has quit [Ping timeout: 255 seconds]
<infinity0> in Printf.fprintf it says I can use %! to flush the channel, does that happen automatically on newline as well?
<flux> infinity0, no
<flux> and it would certainly be inconvenient if that happened, when you wouldn't like to get a newline :)
<Drup> However, in format "@." does flush
<infinity0> oh well i thought e.g most other languages do it
<flux> I think in them it happens in the reverse direction: the side effect of newline is a flush
<flux> not vice versa :)
<infinity0> oh that's what i meant
<infinity0> "does [flush] happen automatically [when you explicitly print a] newline" i guess i should have said
<infinity0> anyway, thanks
<flux> actually you wrote correctly
<flux> I misread :)
<Drup> hum, I'm not sure about that
<Drup> it's not specified in the documentation, afaics
orbifx has joined #ocaml
<flux> in any case \n doesn't flush.. you can easily find that in topleve, with printf and Unix.sleep.
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<flux> if you mean it could be changed, then perhaps yes, but some feature to disable that would be nice then as well
ril is now known as ril[away]
<infinity0> hm, it's ok for me to just add %! in a bunch of places for now i guess
<flux> you could write your own printf with ksprintf that does flushing when it finds newline from the input :)
<Drup> no need to do that
<Drup> just change the formating functions using Format.(pp_)set_formatter_out_functions
<orbifx> what is the convention of backticking some types? E.g. Cmdliner has `Help, or `S and `P
<aantron> orbifx: those are polymorphic variant values
ril[away] is now known as ril
<orbifx> thanks aantron
caml_hump has joined #ocaml
lordf has quit [Ping timeout: 240 seconds]
alexst has joined #ocaml
caml_hump has quit [Quit: Page closed]
alexst has quit [Ping timeout: 276 seconds]
lokien_ has joined #ocaml
struk|desk|away is now known as struk|desk2
silver has quit [Quit: rakede]
git-commit has quit [Remote host closed the connection]
struktured has joined #ocaml
orbifx has quit [Quit: WeeChat 1.3]
bobthenameless has quit [Ping timeout: 268 seconds]
tane has quit [Quit: Verlassend]
struktured has quit [Ping timeout: 255 seconds]