companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
dreadedfrog has joined #ocaml
italicss is now known as iitalics
dreadedfrog has quit [Ping timeout: 260 seconds]
sam_ has joined #ocaml
iitalics has quit [Read error: Connection reset by peer]
iitalics has joined #ocaml
dmruiz has quit [Ping timeout: 258 seconds]
iitalics has quit [Ping timeout: 240 seconds]
dreadedfrog has joined #ocaml
sam_ has quit [Ping timeout: 260 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
dreadedfrog has quit [Ping timeout: 260 seconds]
raphaelss has joined #ocaml
pierpa has quit [Quit: Page closed]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
mfp__ has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
ristos has quit [Quit: Connection closed for inactivity]
http_GK1wmSU has joined #ocaml
http_GK1wmSU has left #ocaml [#ocaml]
ygrek has quit [Ping timeout: 255 seconds]
copy_ has quit [Quit: Connection closed for inactivity]
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 260 seconds]
mbuf has joined #ocaml
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 240 seconds]
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
cuvius has quit [Quit: Connection closed for inactivity]
andreas_ has quit [Quit: Connection closed for inactivity]
TarVanimelde has joined #ocaml
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
dreadedfrog has joined #ocaml
govg has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
<rgrinberg> is there a way to unread a character in ocamllex?
<rgrinberg> in an action that is
malina has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
raphaelss has quit [Quit: Lost terminal]
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 258 seconds]
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
peterpp has joined #ocaml
Simn has joined #ocaml
TarVanimelde has joined #ocaml
peterpp has quit [Ping timeout: 260 seconds]
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
<def`> rgrinberg: wait a minute...
<def`> I wrote that recently, I just need to find it :)
<rgrinberg> :P yay
al-damiri has quit [Quit: Connection closed for inactivity]
<rgrinberg> should be exactly what I need. thanks.
dreadedfrog has joined #ocaml
cuvius has joined #ocaml
freusque has quit [Read error: Connection reset by peer]
cuvius has left #ocaml [#ocaml]
andreas_ has joined #ocaml
http_GK1wmSU has joined #ocaml
sam_ has joined #ocaml
http_GK1wmSU has left #ocaml [#ocaml]
sam_ has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
<rgrinberg> def`: wait, i'm not sure how to use this.
<rgrinberg> to unread 1 char, do i just call set_lexeme_length lexbuf 1?
<companion_cube> o/
mal``` has quit [Quit: Leaving]
mal`` has joined #ocaml
<def`> rgrinberg: the opposite :)
<def`> to unread 1 char, set_lexeme_length lexbuf (String.length (Lexing.lexeme lexbuf) -1 )
<def`> lexeme is the chunk that was consumed by the lexer
<rgrinberg> Thanks :)
<def`> set_lexeme_length allows to change its length (it must be a valid length of course :P)
<rgrinberg> This is quite a useful function. Maybe upstream it?
<def`> set_lexeme_length lexbuf n => String.length (Lexing.lexeme lexbuf) == n
<rgrinberg> It should definitely be in dorm stack overflow answer somewhere at least :D
<rgrinberg> And yeah, that worked for me btw
<def`> cool
<def`> String.length (Lexing.lexeme ...) is a bit inefficient (it copies the lexeme), maybe I should add a function to get that too
ia0 has quit [Quit: reboot]
ia0 has joined #ocaml
<Leonidas> oh great, topkg fails with local switches
<Leonidas> because it looks into _opam and complains about hygiene
<def`> it must be ocamlbuild, no?
<def`> you have to add -X _opam to ocamlbuild I think
<Leonidas> def`: yes. You mean to the invocation? Or can I somehow add it to _tags?
<hannes> Leonidas: put "<_opam>: -traverse" into _tags should do the trick
<def`> ^ that
<Leonidas> hannes: excellent, works :)
mfp__ has joined #ocaml
ziyourenxiang has joined #ocaml
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 246 seconds]
al-damiri has joined #ocaml
copy_ has joined #ocaml
silver has joined #ocaml
kakadu has joined #ocaml
Trou has joined #ocaml
<Trou> hello, I have an "advanced" question related to ppx. I'd like to have a "syntax helper" that I could use to transform a string to actual ocaml statements
<Trou> for example (simplified of course) [%helper "aaa:0"] transformed to let aaa = 0 in
<Trou> for example (simplified of course) [%helper "aaa:0"] transformed to "let aaa = 0 in"
<Trou> I'm trying to use Ast_mapper, but I'm having a hard time finding which extension point to use
<Trou> anyone which ppx knowledge could help ? :)
<Trou> *with
<Drup> What is your problem exactly ?
<Trou> let me write a pastebin, it'll be easier
<Drup> You don't know which node to search for in the AST ?
kakadu has quit [Quit: Konversation terminated!]
kakadu has joined #ocaml
<Trou> the problem is that in my ast_mapper I don't get the "body" of add_sub_imm to use in the "let_in" transform
<Trou> that's my current mapper
<Trou> I'm probably not understanding something fundamental here :)
<Drup> Well, the top example is not syntactically valid.
<Trou> ah yeah
<Trou> but that's kind of part of the point, I don't know where to put my extension to have access to the necessary info
<Trou> anyway the 1st pastebin shows what I'm trying to accomplish in practice, maybe I'm trying to do it in a completely wrong way
<Drup> How does the "decode" now it should look for an "insn" identifier ? Do you want to hardcode it ?
<Drup> know*
<Trou> I can, if that's easier
<Drup> (btw, why is this a ppx and not a simple function ?
<Trou> because all the strings are static and will never change
<mbuf> is OCaml is a suitable language to write web applications?
<companion_cube> sure, why not?
<Drup> Trou: unless it's really perf-sensitive, that's not really a good enough argument. ;)
<Trou> Drup: it's a bit perf sensitive
<Drup> Anyway, I would do things like that: make a node [%decode x "...."] that decodes x
<Trou> but could I get the variable names (sf, op) from a function ?
<Drup> and it would return the decoded value
<Trou> the pb is that I need to extract the values to the variables sf op imm12 etc
<Trou> that I'm using after in the body
<Drup> and your example would then look like that: "let insn' = [%decoded insn "..."] in ...
<Drup> ah, you extract multiple values ?
<Trou> yes
<Drup> Return a record then
<Drup> (or a tuple)
<Drup> the optimize is good enough to avoid allocations there, and it makes the semantics of your extension vaguely reasonable
<Drup> optimizer*
<Trou> hmmm
<Trou> every string can have arbitrary variables names
<Drup> Ah, obviously
<Drup> :D
<Trou> can I dynamically generate a new record ? :)
<Drup> That's not a great idea
<Trou> I could use a hashtbl and a function but I thought a ppx would be more elegant :)
<Trou> (and an good reason to learn about them)
<Drup> Well, either arbitrary tuples, but it starts becoming annoying
<Drup> Or you chance a bit the syntax to "let%decode insn' = "..." in ..."
<Drup> this way, you have access to the rest
<Trou> I've tried doing this, but I could not find a way to pass the string to the decode
<Drup> Just look inside the body of the let
<Drup> it's part of your syntax, you can do whatever you want :)
<Trou> ahh
<Trou> so I'd do sth like let%decode add_sub_imm s insn sf = "31:31:sf..." in let s_b = get_s_bool insn in...
<Trou> (from my 2nd pastebin)
<Trou> and transform the specification string in a series of let in let in
<Trou> that'd work ?
<Drup> I would rather do https://pastebin.com/02UpPaCh
<Drup> but that's up to you
<Trou> yeah that's cleaner
<Trou> I'll try this
<Trou> thanks !
<Drup> (alternatively, `let my_decode_fun = [%decodefun "..."]`, and you only generate the function)
<Drup> (which also has a rather clear semantics that doesn't leak too much)
<Drup> But yeah, the solution above is okay, given the constraints
bobry has joined #ocaml
http_GK1wmSU has joined #ocaml
http_GK1wmSU has left #ocaml [#ocaml]
sam_ has joined #ocaml
<kakadu> Folks, it seems that jbuilder isnot freindly wit 4.05. https://paste.in.ua/2846/ Am I missing something or it is a huuuuuuge bugreport?
sam_ has quit [Ping timeout: 260 seconds]
CcxWrk has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
mbuf has quit [Quit: Leaving]
sam_ has joined #ocaml
<rgrinberg> Hmm I use jbuilder and 4.05 daily
<kakadu> rgrinberg: Do you see any sane error reason expept exit 127?
<kakadu> except*
<Trou> Drup: looks like it works, thanks a lot !
CcxWrk has joined #ocaml
sepp2k has joined #ocaml
<rgrinberg> kakadu: seems like jbuilder just invokes the compiler...
<rgrinberg> can you give it a try without flambda?
sam_ has quit [Ping timeout: 240 seconds]
sam_ has joined #ocaml
<kakadu> rgrinberg: It seems the same
<kakadu> I'm currently use an opam switch called `4.05.0+trunk+fp+flambda` but I don't think that the word `trunk` should be there. rgrinberg, can you check which switch do you use?
<theblatte> I'm trying to load modules built with jbuilder into utop, namely one big .cmo containing all my modules. Loading goes fine with `#load_rec "AllMyModules.cmo;; open AllMyModules;;`, but when I try and use a module `M` I get Error: Reference to undefined global `AllMyModules__M`
<theblatte> I noticed that jbuilder plays tricks with modules by prepending AllMyModules__ to them when building AllMyModules, I wonder if there's something I can do to teach utop about this convention?
<theblatte> dunno if it's a jbuilder thing or if ocamlc et al. know about this convention too
<octachron> jbuilder uses standard module aliases, however I would not be surprised if "#load_rec" does not handle well modules aliases
<octachron> after verification, "#load_rec" indeed cannot handle module aliases
<theblatte> :'(
<theblatte> what's a module alias? I thought it was just "let M = ModuleName"
<octachron> Module aliases (e.g. "module X = A" ) are a form of symbolic link at the module level
<theblatte> sorry, s/let/module/ yes
zaquest has quit [Quit: Leaving]
<mrvn> theblatte: they are like ""let M = ModuleName" except the syntax is a bit different so ocaml knows it's a module.
<theblatte> does jbuilder inject code to alias M to LibName__M under the hood then?
<mrvn> theblatte: more likey Lib does
<theblatte> right :)
<mrvn> theblatte: module aliases ss often used in libs that have multiple modules that make up the lib as a whole.
<theblatte> so no toplevel for me if I use jbuilder? jbuilder kind of forces me to define intermediate libraries but then I can't load them in utop...
<mrvn> why do you need load_rec?
* mrvn only ever used #require from findlib
<theblatte> not sure if I need it, that's how I used to load my modules into utop
<theblatte> just noobing it, really :)
sam_ has quit [Ping timeout: 255 seconds]
<rgrinberg> theblatte: stay tuned for the next release of jbuilder. It makes loading top levels in dev quite easy
<theblatte> what does #require want? only #load/#load_rec are documented :/
<rgrinberg> One command in fact.
<rgrinberg> If you can't wait the pin jbuilder in dev
<theblatte> rgrinberg: is there a workaround in the meantime?
<theblatte> good news that it's coming though :)
<rgrinberg> I don't know of one. Sorry
<mrvn> theblatte: I think a META file.
<mrvn> does #load work if you specify the modules in the right order?
<theblatte> rgrinberg: too bad
<theblatte> mrvn: I haven't succeeded in making even this work, it eventually fails with Lib__Foo.cmo and Lib__Foo.cmi make inconsistent assumptions
<theblatte> rgrinberg: sorry to ask but do you know what sort of timeframe there is for the next release?
<rgrinberg> don't know, sorry. diml said that 1.0 is looming but it has been for a few weeks already
sam_ has joined #ocaml
<rks`> I don't think there'll be a 1.0 before the caml workshop.
<theblatte> ok, thanks
<rgrinberg> theblatte: just pin it? works well for me
<theblatte> but will it work well for everyone? :)
<theblatte> I can try the pin, yes
silver_ has joined #ocaml
silver has quit [Ping timeout: 276 seconds]
<theblatte> since I only want the repl for debugging, I don't need the pin to work for everyone, in fact \o/
al-damiri has quit [Quit: Connection closed for inactivity]
<theblatte> just need to write so configure.ac code to enable it if jbuilder supports it
<theblatte> s/so/some/
<theblatte> thanks rgrinberg
<rgrinberg> Why do you need configure code?
<theblatte> so that `make test` works for people who cannot build the repl
<theblatte> because their jbuilder is too old
<rgrinberg> Oh, so you launch the repl as part of the tests?
<theblatte> yes, to make sure we don't break it ;)
<theblatte> (we had some pretty horrible Makefile stuff to mlpack the modules etc. before and it would break sometimes)
<rgrinberg> Break what? The top level?
<companion_cube> oasis does packing quite well
<theblatte> break the loading of the modules inside the toplevel
<companion_cube> (just sayin')
<theblatte> companion_cube: heh :)
<rgrinberg> Packing is undesirable it doesn't matter how well oasis does it :D
<companion_cube> well it was the only solution for a long time
<theblatte> yup
<companion_cube> jbuilder uses `-open` to simulate it, right?
<theblatte> and toplevel with packing >> no toplevel, just saying :p
<rgrinberg> You should just create a toplevel target manually then
<rgrinberg> If you're using it as part of the tests
<rgrinberg> Yes open and module aliases is how jbuilder does it
<companion_cube> I think -open appeared in 4.02?
<companion_cube> (or 4.03?)
<rgrinberg> Open is quite old I think . It's the aliases that are 4.02.3 only
<theblatte> not sure I understand your comment, but probably that's because I haven't tried jbuilder's toplevel stuff yet
<companion_cube> 4.02 it seems
<companion_cube> look for "-open"
<companion_cube> so not that old
<theblatte> I see it's utop-only, my test uses ocaml instead :x
<rgrinberg> Yes, the utop command was designed for interactive development
<theblatte> it was nice to be able to be non-interactive for the test, but the new way of building the toplevel is unlikely to break so the test can die
<theblatte> $ jbuilder utop _build/dbg -> Error: Context "default" not found!
<theblatte> I guess I'll define a default context
<Drup> theblatte: wait, is it only for testing with a toplevel ?
<Drup> not for interactive local tinkering ?
MercurialAlchemi has quit [Ping timeout: 255 seconds]
<theblatte> no it's for the second one
<theblatte> the testing part was to make sure the tinkering part works
<Drup> Oh, then why utop isn't right ?
ristos has joined #ocaml
<Drup> oh, ok
<Drup> Fine then, carry on :p
<theblatte> :p
<theblatte> otherwise the day you want to tinker you find out the repl has stopped working
<Drup> (for toplevel-based testing, you can simply build a custom toplevel with the libraries linked in, it's explainde in the manual)
<theblatte> (yes but that's a massive pain)
<Drup> jbuilder has a thingy for that
<Drup> it's not so bad
<theblatte> good :)
<theblatte> Error: Unbound module Clflags
<theblatte> File ".utop/utop.ml", line 1, characters 0-20:
<rks`> haha
<Drup> theblatte: You could actually use that
<rgrinberg> jbuilder utop accepts a directory in your source and not _build
malina has joined #ocaml
<theblatte> rgrinberg: ah, so that probably doesn't help me because my sources are split in several directories that I (copy# ...) at build time
<rgrinberg> haha
<theblatte> "haha", yes :p
<rgrinberg> I guess you can make a ticket if you make a small reproducible example
<theblatte> about what?
<Drup> "jbuilder is mean and I can't do my entierely reasonable thingy with it"
<theblatte> Drup: there's already #34 and #114 for that :p
<Drup> Doh!
<Drup> theblatte: it seems to me that building a custom repl isn't completely unreasonable for you, given repl tinkering seems quite important
<theblatte> Drup: yep, looking into that now, thanks
<theblatte> it's not even that important, but it's a feature we had and introducing regressions to move to jbuilder is sad :/
<rgrinberg> thing is, wasn't the old test about just making sure the old rules generated a working top level?
<theblatte> gah, I gave up on having a test, I just want a toplevel now :)
<rgrinberg> here you're just testing jbuilder's toplevel generating abilities
<rgrinberg> theblatte: is this codebase open source btw?
<theblatte> rgrinberg: yes: https://github.com/facebook/infer
<rgrinberg> is there a jbuilder branch?
<theblatte> rgrinberg: I wasn't trying to write a test, just trying to run `jbuilder utop ...`
<rgrinberg> yeah, i get it. I wanna see how it fails myself
<theblatte> ah cool
<theblatte> I can push a branch somewhere
<rgrinberg> yes, please. you might be the first user of this feature
<rgrinberg> and it's already broken :P
<theblatte> V5
<theblatte> :)*
<theblatte> hmm, it won't work for you right now, I need to implement a way to disable the clang stuff otherwise you'll have to first compile clang and that is not pleasant
<theblatte> I'll ping in a few minutes
sz0 has joined #ocaml
<rgrinberg> alright cool
Simn has quit [Quit: Leaving]
<rgrinberg> theblatte: getting there?
<theblatte> rgrinberg: yep, had to fix the opensource build too, incoming :)
<theblatte> you can do my code review as well then ;p
freusque has quit [Quit: WeeChat 1.9]
<theblatte> rgrinberg: to build: clone, then ./build-infer.sh java, then there should be a jbuild inside infer/ (yes, there's an infer/ directory in the infer repo...)
<theblatte> it will build in a new switch, so you'll need to opam pin jbuilder again. that or build in your current switch and let it set the dependencies to the versions it wants
govg has quit [Ping timeout: 246 seconds]
<theblatte> to build in your own switch: ./build-infer.sh --opam-switch <switch> java
<rgrinberg> theblatte: you should delete the .merlin files now btw :)
<theblatte> rgrinberg: yes, not there yet :) and I'm not sure it works with my multi-directories setup
<rgrinberg> ugh... javalib requires camlp4
<rgrinberg> smh
<companion_cube> :D
<theblatte> it hasn't kept up with the times :/
<theblatte> someone should clean it up
<theblatte> /o\
<rgrinberg> theblatte: ya'll should just vendor it
<theblatte> it's inria :)
<rgrinberg> now i have to reinstall the universe b/c lwt has a depopt on camlp4
<rgrinberg> what a nightmare
<rgrinberg> oh well, soon it will end
<companion_cube> do they use camlp4 to, like, *parse* java?
MercurialAlchemi has joined #ocaml
<rgrinberg> i barely recall that writing parsers was popular with camlp4 back in the day
<companion_cube> well if the grammar is ugly…
<rgrinberg> companion_cube: how does camlp4 help?
<companion_cube> well it's a tool for writing extensible recursive descent parsers
<companion_cube> so it can be useful to write parsers :-)
<rgrinberg> theblatte: nvm i t's just a warning
<rgrinberg> theblatte: what's the jbuilder target i need?
<theblatte> rgrinberg: jbuilder infer.bc for instance
<theblatte> +build
<rgrinberg> "Don't know how to build infer.bc"
<rgrinberg> i need autogen and configure right?
dakk has joined #ocaml
<theblatte> rgrinberg: ./build-infer.sh? otherwise ./autogen.sh && ./configure --disable-c-analyzers
<theblatte> and then `make byte` for instance, which will write jbuild
<theblatte> (they should probably be generated by ./configure, this branch is very rough atm)
<rgrinberg> hmm, i have these jbuild.in files that didn't seem to get preprocessed
<rgrinberg> why do they have this .in suffix anyway?
<rgrinberg> if they're using the ocaml syntax they should just be jbuild
<rgrinberg> or is there some other preprocessing going on
<theblatte> there's some more preprocessing done by make
<theblatte> have you tried the commands I pasted?
<rgrinberg> ./build-infer.sh tries to mess with my opam switch for some reason
<rgrinberg> so i don't want to run it
<theblatte> > otherwise ./autogen.sh && ./configure --disable-c-analyzers && make byte
<rgrinberg> ok make byte is good
<rgrinberg> that worked but $ jbuilder build infer.bc doesn't
<rgrinberg> jbuilder build infer/infer.bc does tho
<theblatte> yes you need to cd infer/
<rgrinberg> why didn't $ make byte build it?
<theblatte> didn't it?
<theblatte> it should have
<rgrinberg> it didn't, b/c that manual jbuild command built everything from scratch
<theblatte> mf, maybe a different mode
<rgrinberg> theblatte: i'm getting a completely different error when building the toplevel btw
<theblatte> _build/dbg/infer.bc by default
<theblatte> rgrinberg: what command do you use?
<rgrinberg> $ jbuilder utop infer
<rgrinberg> this might be some expunge related bullshit
<theblatte> ok, I get the "Unbound module Clflags" error with that
<theblatte> ah, 4.05 :)
<rgrinberg> should i try 4.04?
<theblatte> only tested on 4.04.2
<rgrinberg> The unbound module Clflags really makes little sense to me. That Clflags when you build the toplevel against utop
<rgrinberg> which always happens
<rgrinberg> you've pinned jbuilder#master right?
<theblatte> yes
<theblatte> well, to https://github.com/janestreet/jbuilder.git, let me try again with #master
<rgrinberg> those are the same :/
<theblatte> indeed
<theblatte> just making sure
<rgrinberg> just do $ opam show jbuilder and paste the hash
<theblatte> 06b47a73
<rgrinberg> ok, that is good. and you have utop installed in that switch right?
igitoor has quit [Ping timeout: 255 seconds]
<rgrinberg> also your workspace file looks weird
<rgrinberg> you have 3 switches but they're all the same
<theblatte> [NOTE] Package utop is already installed (current version is 1.19.3).
<rgrinberg> doubt that matters though, since i'm not getting any error
<theblatte> rgrinberg: right, I didn't quite get what these were for :p I need to pass different configurations to "jbuild" contexts seemed the way to do it
<theblatte> and* contexts
<rgrinberg> you're not really passing different configurations though, aren't you
<rgrinberg> you can use the same ocaml versions but you should at least name the switches differnetly
<rgrinberg> when you have more than 1, you need to add the --context param to $ jbuilder utop to select which one you want
<rgrinberg> can't really do that with the same name
<theblatte> rgrinberg: the name of the context is used by jbuild to emit different things
<theblatte> eg, more fatal warnings
<rgrinberg> oh, that's right yeah it's different
igitoor has joined #ocaml
<rgrinberg> can i see the full log for when you run $ jbuilder utop infer
<rgrinberg> not just the erro
<theblatte> sure
<theblatte> clean build?
<rgrinberg> rnah
<rgrinberg> nah
igitoor has quit [Changing host]
igitoor has joined #ocaml
jimmyrcom has joined #ocaml
sam_ has quit [Ping timeout: 268 seconds]
<rgrinberg> ok definitely looks strange
<rgrinberg> the build command for me looks different than yours
<rgrinberg> try a clean build
<rgrinberg> oh and upgrade your utop :P
<rgrinberg> you need 2.0.1 (the jbuilder'd utop)
<theblatte> rgrinberg: that was a clean build
<theblatte> rgrinberg: ok, new utop gives me the same errors as you
<theblatte> some warnings 31 that are fatal
<theblatte> because extlib :/
<rgrinberg> try disabling those warnings and seeing if that gives you a working utop
<rgrinberg> yeah...
<rgrinberg> or better yet, drop extlib :)
<theblatte> tell that to javalib :)
<theblatte> -w -31 is not enough to drop these, is it?
<theblatte> hold on, I messed it up
<rgrinberg> shouldn't you just remove them from the jbuild file?
<theblatte> rgrinberg: it looks like the flags are ignored by the final ocamlc.opt -linkall command
<theblatte> so I get the default of +31 :|
<rgrinberg> ah, that's a bummer
<rgrinberg> i know exactly why that is
<rgrinberg> you should make a ticket in the jbuilder bug tracker
<theblatte> alright!
<rgrinberg> saying that you can't control the warnings for the toplevel
<theblatte> will do, thanks
asmanur_ has quit [Read error: Connection reset by peer]
copy_ has quit [Quit: Connection closed for inactivity]
al-damiri has joined #ocaml
<theblatte> rgrinberg: I think the current solution we have with the mlpack is to avoid such w31 conflicts, is it normal that they show up here? infer itself doesn't directly depend on camomille
<rgrinberg> yup, but utop does :)
<rgrinberg> I suppose if there was a mode to create a normal toplevel
<rgrinberg> this wouldn't be an issue
<theblatte> except for being stuck with ocamltop :p
<rgrinberg> Warning 31: files /home/rgrinberg/.opam/4.05.0/lib/zip/zip.cma(Zlib) and /home/rgrinberg/.opam/4.05.0/lib/camlzip/../zip/zip.cma(Zlib) both define a module named Zlib
<rgrinberg> this bit is really mysterious
<theblatte> currently we're fine with utop though
<rgrinberg> wtf, lib/zip and lib/camlzip are both instaled by camlzip
<theblatte> rgrinberg: yes, I think zip is from camlzip
<theblatte> right
<rgrinberg> why does camlzip install itself in 2 different places?
<theblatte> probably for compatibility reasons
<rgrinberg> but it uses findlib...
<Drup> (I feel like I'm seeing rgrinberg discover the real world, live :D)
<theblatte> (haha :D)
<rgrinberg> haha, i turn a blind eye to all this cruft usually
<rgrinberg> i know it's not really fixable
<rgrinberg> seriously though, either camlzip or zip should just be a requires alias in the META
<rgrinberg> rather than installing the same thing twice
<rgrinberg> Drup: quick question, what does this line do? https://github.com/xavierleroy/camlzip/blob/master/META-camlzip#L6
<rgrinberg> theblatte: there's a long term project to chuck out camomille from utop
<Drup> woa, that's digusting
FreeBirdLjj has joined #ocaml
<Drup> it tells ocamlfind that the actual objects should be found in the other directory.
<rgrinberg> haha, so this is a bit of "emulation" that jbuilder hasn't implemented yet
<Drup> directory usually has two purposes: allowing subdirectories for bigish libraries, and installing the META file and the lib at different places
<theblatte> oh, yes, the path in the w31 error mentions 4.05.0/lib/camlzip/../zip/ vs 4.05.0/lib/zip/
<theblatte> yuck
<rgrinberg> Drup: can we just replace it with requires = "zip" in this case?
<Drup> Not sure if there will not be subtle differences
<Drup> I'm not an ocamlfind expert
<rgrinberg> Drup: how amendable is xavier to a jbuilder port of camlzip do you think? :P
<Drup> no idea
<Drup> but that doesn't change the META thingy, which is clearly done for backward compatibility purposes
<Drup> (and given that camlzip is a raw makefile with 3 source files, I would advice to leave it rest)
<rgrinberg> that .depend file is 16 years old :O
<rgrinberg> anyway, the real option is to change the META file or make jbuilder understand directory
<Drup> directory is actually fairly useful
<rgrinberg> what kind of other uses does it have?
<Drup> well, for eliom we use it to make sure that client and server libraries are in different directories, to avoid module collisions
<rgrinberg> actually, i'm pretty sure jbuilder supports it
<rgrinberg> it seems to be way too common of an option
<Drup> Yeah, it's used by most of the ocp- thingies too
<Drup> (and compiler libs, iirc)
<rgrinberg> Drup: actually, isn't this still an issue with camlzip though?
<rgrinberg> why is it installing the artifacts in 2 dirs
<rgrinberg> if it's saying that the location is in directory = "zip"
fre has joined #ocaml
<Drup> I have no idea
<theblatte> I'm following https://github.com/diml/utop#creating-a-custom-utop-enabled-toplevel, but get "Error: Unbound module UTop_main". I have "(libraries (utop InferModules))"
<rgrinberg> theblatte: note that this won't fix your issue
<theblatte> oh
<rgrinberg> actually nvm it will
kakadu has quit [Quit: Konversation terminated!]
<rgrinberg> since you'll be able to drop the warnings
<theblatte> yes I have access to linkflags this time: (link_flags (-linkall -w -31))
<theblatte> jbuilder doesn't seem to be passing any -I $HOME/lib/utop even though I have utop in my libraries
<rgrinberg> show the jbuild file
<theblatte> rgrinberg: added
<rgrinberg> hmm, this is is with the up to date utop right?
average has quit [Ping timeout: 258 seconds]
<theblatte> rgrinberg: yes, 2.0.1
<rgrinberg> no idea why, sorry.
<theblatte> ok, thanks for looking
<rgrinberg> clean build?
<theblatte> what's fishy is that it tries to build InferModules__Infertop, but I didn't say anywhere that infertop should be part of InferModules
<theblatte> right, trying that
<theblatte> ah, yes, that's the issue! it's trying to compile it as part of another library, I need to exclude it from there
<rgrinberg> you should really modularize infer :P
<rgrinberg> though i realize it might take a lot more time than just porting to a shiny new build system
<theblatte> yes
Trou has left #ocaml [#ocaml]
<theblatte> it builds \o/ but it doesn't seem to include any of my modules /o\
<rks`> :)
<rgrinberg> theblatte: did you set include flags properly?
<theblatte> I just have InferModules in my (libraries ...)
<rgrinberg> you can see the correct include flags by running $ jbuilder utop infer and viewing utop.ml somewhere in _build
<theblatte> ah, great
<rgrinberg> by include flags i mean the Clflags.include_dirs variable
<rgrinberg> in fact, just copy paste that file wholesale :P
<theblatte> nice :p
<theblatte> everything worketh \ô/
<theblatte> thanks rgrinberg :) pub time is not ruined
<rgrinberg> ^_^
morfeen has joined #ocaml
fre has quit [Read error: No route to host]
jnavila has joined #ocaml
malina has quit [Ping timeout: 246 seconds]
lopex has quit [Quit: Connection closed for inactivity]
ziyourenxiang has quit [Ping timeout: 255 seconds]
hcarty has joined #ocaml
kakadu has joined #ocaml
<hcarty> This code raises an assertion with Faraday 0.3.0 (from opam) - any thoughts on what I'm doing incorrectly here? http://vpaste.net/RhXNs
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 268 seconds]
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 255 seconds]
morfeen has quit [Remote host closed the connection]
copy_ has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
morfeen has joined #ocaml
peterpp has joined #ocaml
Anarchos has joined #ocaml
jnavila has joined #ocaml
hcarty has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
malina has joined #ocaml
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
dejanr has quit []
two_wheels has joined #ocaml
two_wheels has quit [Client Quit]
tokomak has joined #ocaml
Ragora has quit [Ping timeout: 260 seconds]
morfeen has quit [Remote host closed the connection]
morfeen has joined #ocaml
morfeen has quit [Remote host closed the connection]
morfeen has joined #ocaml
morfeen has quit [Ping timeout: 240 seconds]
<peterpp> are there naming conventions with regard to modules? I see both Foo_bar and FooBar
<companion_cube> tl;dr it's a mess
<hannes> peterpp: there has been a recent thread on discuss -- snake casing seems to be more common (and is more in line with https://ocaml.org/learn/tutorials/guidelines.html)
<peterpp> hannes, ah thanks
<hannes> peterpp: read https://discuss.ocaml.org/t/capitalized-underscore-vs-camelcase/502 in case you want to hear the full story [tm] ;)
sepp2k has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
Ragora has joined #ocaml
Ragora has quit [Ping timeout: 246 seconds]
tom69 has joined #ocaml
tom69 has left #ocaml [#ocaml]
pierpa has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
infinity0 is now known as Guest55785
Guest55785 has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
theindigamer has joined #ocaml
mengu has joined #ocaml
sam_ has joined #ocaml
<theindigamer> So I was using ppx_deriving and I ran into this issue: https://github.com/whitequark/ppx_deriving/issues/144
<theindigamer> Can anyone suggest work-arounds/solutions?
sam_ has quit [Ping timeout: 268 seconds]
<copy_> theindigamer: `opam pin add ppx_deriving --dev-repo` should work
FreeBirdLjj has quit [Remote host closed the connection]
<theindigamer> Thanks, that works :)
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
Michael__ has joined #ocaml
<Michael__> If I define a module Make inside a module file F, and inside a module I have a let binding let t = some funtion (), then, what happens when I say module X = F.Make?
<Michael__> I would like to know if some_funtion () will be executed, and t becomes the result in X
<octachron> Michael__, in general compilation units' definitions or toplevel expression are executed as soon as the corresponding cm(x)o file is linked
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<octachron> and functors are executed when they are applied (same as functions)
<Michael__> I would like to understand that, I mean, when is it just a let (name) binding, and when it will be an actual variable assignment
SomeDamnBody has joined #ocaml
<SomeDamnBody> Does anybody know if the ocaml compiler can produce dSYM files?
<octachron> Michael__, I am not sure what do you mean by "actual variable assignment"?
kakadu_ has quit [Remote host closed the connection]
discreteunit has joined #ocaml
Michael__ has quit [Ping timeout: 260 seconds]
KeyJoo has joined #ocaml
discreteunit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dakk has quit [Remote host closed the connection]
morfeen has joined #ocaml
discreteunit has joined #ocaml
morfeen has quit [Remote host closed the connection]
TarVanim_ has joined #ocaml
KeyJoo has quit [Ping timeout: 260 seconds]
dreadedfrog has quit [Ping timeout: 248 seconds]
discreteunit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
peterpp has quit [Ping timeout: 260 seconds]
Ragora has joined #ocaml
sh0t has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Remote host closed the connection]
TarVanim_ has quit [Quit: TarVanim_]
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 268 seconds]
mengu has joined #ocaml