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
fluter has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
fluter has quit [Ping timeout: 258 seconds]
fluter has joined #ocaml
Simn has quit [Quit: Leaving]
Algebr` has joined #ocaml
hay207_ has quit [Quit: Konversation terminated!]
Algebr` has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
hay207 has joined #ocaml
hay207_ has joined #ocaml
hay207 has quit [Ping timeout: 276 seconds]
Algebr` has joined #ocaml
darkf has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
rgrinberg has joined #ocaml
Frank is now known as Oxford
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
<rgrinberg> gasche: do you know OTOH what's the difference between --depend and --raw-depend in menhir and why ocamlbuild uses the latter?
<gasche> do I know On The Other Hand?
<rgrinberg> Oh I thought it was "of the top of your head"
<gasche> ah
<gasche> I guess both
<gasche> but "no"
<gasche> but François Pottier compulsively documents stuff, so I'm sure you can find out what --depend does
<gasche> --raw-depend just returns the output of running ocamldep on the stuff menhir builds to compute dependencies
<gasche> in a pipeline that already deals with ocamldep output, such as a build system, it makes sense to use it
<rgrinberg> gasche: correct, this is his comment - https://gist.github.com/rgrinberg/f0555f6d1f59a410916335c7e5c4a707
<rgrinberg> but i don't quite understand why that preprocessing isn't useful for ocamlbuild
<rgrinberg> oh, perhaps b/c ocamlbuild always uses -modules?
FreeBirdLjj has quit [Remote host closed the connection]
<gasche> this is all very far from the top of my head :p
<gasche> (but OTOH definitely means "On the other hand")
FreeBirdLjj has joined #ocaml
<gasche> "succesfully formatted 16 pages" is not good
<gasche> (when 12 is the limit)
<rgrinberg> Yeah, that was a blooper... btw, where's the code in ocamlbuild that reads these .depends files anyways
<rgrinberg> maybe I'll find an answer there
<gasche> I guess read_path_dependencies in ocaml_utils
<gasche> it seems to be ignoring all extensions and just computing module->module dependencies
<rgrinberg> Yup, this is what -modules does.
<gasche> are you recoding a build system? ^^
<gasche> (I wonder why one would look in those dark corners)
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
<rgrinberg> I'm trying to understand a few things. How the reason build system works, namely things like this - https://github.com/facebook/reason/issues/595#issue-161010281 . Also, I'd like to get an idea of it would take to integrate module aliases to any build system but comments like this scare me - https://github.com/aantron/namespaces/issues/7#issuecomment-226962550
<rgrinberg> OT: I must say I'm not totally sure how a "map" file that is provided to ocamldep -map is supposed to look like. At least it's not clear to me from the docs.
<gasche> rgrinberg: I would go look at the PR discussions with Jacques
<gasche> if you are interested in helping improve the support for module aliases, motivated help is warmly welcome
<gasche> it should be possible (that's what -map was designed for)
tinamanea has joined #ocaml
<rgrinberg> for ocamlbuild, i really like aantron's namespaces and think that this is the way to go for most projects but it would be nice if ocamlbuild itself would have some rudimentary support for it. What do you think of having something like an .mlpack target that uses aliases instead of packs?
<gasche> sure, I think that would be a good idea
<gasche> to be honest
<gasche> since aantron's namespace plugin got out, I had the time to look deeply at what it does and how it does it
<gasche> I'm already rather time-constrained to fix the ocamlbuild bugs (I'd like it to work on Windows for example)
<gasche> I'm all for integrating good stuff in ocamlbuild as long as (1) it preserves the design consistency and (2) people don't expect me to do the work
<rgrinberg> i wasn't expecting you to do it :P but I think that this might be a tough one to crack
<rgrinberg> windows support will hopefully solve itself as MS introduces more linux compat.
kushal has joined #ocaml
<tinamanea> in camlp4, when extending a grammer with rules, is there any way to tell which rule is trying to be executed? I can only put prints in the action part of the rule, and that is useless when the rule fails to match
<tinamanea> can't find any debugging means for this
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
johnelse has quit [Ping timeout: 244 seconds]
<gasche> tinamanea: you can have silent symbols that do not consume the input but print stuff
<gasche> (a common trick when you need more than LL(1) is to have a silent symbol that peeks more symbol ahead and aborts the parse in some cases; they are often called guard_...)
FreeBirdLjj has quit [Remote host closed the connection]
<gasche> but it may be the case that those silent symbols interact with rule factorization, I don't know
FreeBirdLjj has joined #ocaml
<gasche> I would still try that for debugging
<tinamanea> that;s my issue, it interacts with the factorization and it messes up :(
johnelse has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
unbalancedparen has joined #ocaml
AlexDenisov has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
jonasen has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
sfri has quit [Remote host closed the connection]
tinamanea has left #ocaml [#ocaml]
fluter has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
sfri has joined #ocaml
tnguyen has joined #ocaml
tnguyen is now known as nalgenus
nalgenus is now known as nalgeneus
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
MercurialAlchemi has joined #ocaml
ygrek has joined #ocaml
jonasen has joined #ocaml
A1977494 has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
sfri has quit [Remote host closed the connection]
kushal has quit [Quit: Leaving]
sfri has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has joined #ocaml
demonimin has quit [Ping timeout: 240 seconds]
sfri has quit [Remote host closed the connection]
fluter has joined #ocaml
rlr has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
dhil has joined #ocaml
sfri has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kdas__ 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]
nicholasf has joined #ocaml
FreeBirdLjj has joined #ocaml
sfri has quit [Remote host closed the connection]
nojb_ has joined #ocaml
orbifx-m has joined #ocaml
dexterph has joined #ocaml
sfri has joined #ocaml
nicholasf has quit [Read error: Connection reset by peer]
toolslive has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
copy` has quit [Quit: Connection closed for inactivity]
manizzle has joined #ocaml
pyon is now known as de-pyon-dency
AltGr has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dexterph` has joined #ocaml
dexterph has quit [Ping timeout: 250 seconds]
darkf_ has joined #ocaml
sfri has quit [Remote host closed the connection]
darkf has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
tennix has joined #ocaml
AlexDenisov has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
sfri has joined #ocaml
darkf_ is now known as darkf
Simn has joined #ocaml
vishesh has joined #ocaml
sz0 has joined #ocaml
cthuluh has quit [Ping timeout: 260 seconds]
jonasen has quit [Ping timeout: 244 seconds]
cthuluh has joined #ocaml
kushal has joined #ocaml
shinnya has joined #ocaml
A1977494 has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 264 seconds]
jwatzman|work has joined #ocaml
dave24 has joined #ocaml
jonasen has joined #ocaml
Kakadu has joined #ocaml
kushal has quit [Ping timeout: 272 seconds]
rand__ has joined #ocaml
sfri has quit [Remote host closed the connection]
kushal has joined #ocaml
freusque has joined #ocaml
A1977494 has joined #ocaml
sfri has joined #ocaml
A1977494 has quit [Client Quit]
tane has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sfri has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
fluter has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
sfri has joined #ocaml
thizanne has joined #ocaml
sfri has quit [Remote host closed the connection]
kushal has quit [Ping timeout: 276 seconds]
kushal has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
yomimono has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sfri has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
silver has joined #ocaml
tane has quit [Ping timeout: 244 seconds]
fluter has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tane has joined #ocaml
nicholasf has joined #ocaml
sfri has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sfri has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sfri has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
pseudonymous has joined #ocaml
<pseudonymous> An admittedly noobish question. - 'Int.of_string "3"' complains that module Int is unbound. I compile with "corebuild" (hence should be using the 'Core' library) and "open Core;;" is the first line of the file. Strangely, 'utop' (configured as instructed from realworldocaml.org) actually works
<pseudonymous> (Should add that other 'Core' functions work just fine. Such as Int64.of_string - curiously the 'Int' module alone seems unbound)
sfri has joined #ocaml
jwatzman|work has joined #ocaml
<def`> pseudonymous: open Core.Std;;
beginner has joined #ocaml
<pseudonymous> def`: Oh - then things like List.iter2 begins complaining. But it certainly changed things, will play around. Thanks!
<pseudonymous> nvm - already see why.
tennix has quit [Ping timeout: 240 seconds]
<beginner> i am trying to build ocamlbuild from source on windows, but get unbound module Pervasives. Although my Makefile.config points to the correct prefix, bindir and libdir
<beginner> the paths in ocamlbuild_config are correct as well
octachron has joined #ocaml
<octachron> beginner, do you only have this problem when building ocamlbuild? i.e does the ocaml interpreter works fine?
sfri has quit [Remote host closed the connection]
sdothum has joined #ocaml
<beginner> just tried calling my ocaml.exe and i get the same problem
<beginner> octachron: is the path to the lib folder hardcoded into the binary?
<pseudonymous> beginner: I think Windows has a PATH variable, too, see : https://java.com/en/download/help/path.xml
<pseudonymous> (Or maybe I'm just leading you astray, but I seem to remember running into this once a few years back - not with ocaml, mind you)
A1977494 has joined #ocaml
<octachron> beginner, I think in some form yes, since the compiler/interpreter needs to be able to find the cmi files of the standard library
<beginner> ocatchron: i called configure with the custom prefix, bindir, libdir, ocaml_bindir, ocaml_libdir
<beginner> ocatchron: i will try printing all strings from this binary, maybe i ll find the wrong path there
freusque has quit [Ping timeout: 264 seconds]
sfri has joined #ocaml
hay207_ has quit [Quit: Konversation terminated!]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
A1977494 has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<octachron> beginner, have you checked that your custom libdir contains the ocaml standard library?
nicholasf has quit [Remote host closed the connection]
<beginner> ocatchron: i am rebuilding my ocaml artifact right now. OCaml links everything statically, doesnt it? So why can i get unbound module Pervasives when calling ocaml?
<beginner> on linux i have none of these problems
<octachron> the pervasives module is implicitely opened at the start of every ocaml compilation unit/toplevel session
<octachron> i.e., there is an implicit "open Pervasives" at the begining of every compilation unit
nicholasf has joined #ocaml
<octachron> so the compiler/interpreter needs to be able to read the interface of the Pervasives module, using the corresponding cmi file
<beginner> octachron: does that mean i can move the ocaml binary, but not the lib folder containing the pervasivses.cmi file?
<mrvn> yes
<beginner> are there paper about the core architecture of ocaml?
<beginner> mrvn: So the path to lib folder is hardcoded as absolute path into the binary?
<mrvn> at least as default
<octachron> beginner, yes the path to the standard library is defined at config time
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<beginner> can i simply override that in all binarys to make it look for the libs relative to the position of the binary?
<mrvn> beginner: not simply
<beginner> mrvn: sed?
<mrvn> definetly not
Denommus has joined #ocaml
<mrvn> beginner: did you run "make install" and it installed where you want it?
<beginner> yes, the problem is i want to zip it, so i can deploy that to different machines
<mrvn> beginner: DESTDIR=/tmp/ocaml-zip-dir/ make install?
<mrvn> or much much better: apt-get install debian
<beginner> windows support is obligatory...
<mrvn> .oO(There was an apt-get for windows)
<mrvn> beginner: ever used opam?
<beginner> mrvn: on linux only
<beginner> mrvn: does it support windows now_
<beginner> ?
AlexDenisov has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
<beginner> mrvn: i have tried that one, but i only supports ocaml 4.02.3 not the new one with flambda
<mrvn> beginner: it has opam so you should be able to upgrade
<mrvn> but, well, windows, maeh.
sfri has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<octachron> beginner, http://gallium.inria.fr/~scherer/gagallium/the-ocaml-installer-for-windows/ suggests to use the OCAMLLIB environment variable
sfri has joined #ocaml
A1977494 has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
Denommus has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
freehck has joined #ocaml
agarwal1975 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
kushal has quit [Quit: Leaving]
AlexDenisov has quit [Read error: Connection reset by peer]
AlexDeni_ has joined #ocaml
nicholasf has quit [Remote host closed the connection]
tennix has joined #ocaml
<beginner> octachron: OCAMLLIB seems promising, thanks a lot
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kdas__ has joined #ocaml
jeffmo has joined #ocaml
sgnb has joined #ocaml
Sorella has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
jonasen has joined #ocaml
kdas__ has quit [Quit: Leaving]
sdothum has quit [Read error: Connection reset by peer]
sdothum has joined #ocaml
AlexDeni_ has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
hcarty has joined #ocaml
kushal has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
Kakadu has quit [Quit: Konversation terminated!]
tormen has joined #ocaml
<tormen> Hi. What is the best way to traverse a list of tuples and create two new lists ? a List.fold with ~accum:([],[]) ? or a List.map to create a list of pairs which one could then pass to List.split ... ?
<tormen> (two new lists each containing different parts of the tuple ... so I have a list of (a,b,c,d) and want list_1 to contain (a) and list_2 to contain (a,c) for instance)
<mrvn> huh? List.split is what you asked for
<tormen> (so the input list and the 2 output lists all have the same length)
<mrvn> ahh, then map + split, or map + split + rev
<mrvn> rev_map + split + rev
kushal has quit [Quit: Leaving]
<mrvn> or a recursive function
<tormen> mrvn: and a List.fold constructing the two lists ?
<tormen> the fold seems the quickest, because 1 traversal (where with map + split it's 2 traversals)
<tormen> mrvn: but okey you also came up first with my first idea (map + split)... ;)
Kakadu has joined #ocaml
<tormen> So which one is nicer / faster / better:
<tormen> List.fold (fun (x,y) (_,tp,_,id) -> (id::x,(id,tp)::y)) ([],[]) rows
<tormen> List.split (List.map (fun (_,tp,_,id) -> (id,(id,tp)) rows))
<zozozo> with the fold, you avoid allocating an intermediate list
<tormen> yes true as well
<tormen> zozozo: thanks :)
<mrvn> you mean List.fold_left
<mrvn> Is map/split tail recursive?
MercurialAlchemi has joined #ocaml
<mrvn> tormen: your fold lacks a List.rev, you are reversing the lists
<tormen> mrvn: yes ... and yes :)
BitPuffin has joined #ocaml
<tormen> mrvn: for split the inria docs say "Not tail-recursive."
<octachron> mrvn, neither map nor split are tail-recursive in the standard library
<mrvn> tormen: best to avoid those for future proof applications
<tormen> ... if I would need the rev then ... map + split would be better again ?
<mrvn> basical if you don't knwo the size of the list only use tail recursive functions
<tormen> mrvn: ah got it !
<mrvn> tormen: fold + rev is better
<mrvn> as in works with any size list
<tormen> mrvn: really ? hmm. okey :)
<tormen> mrvn: thanks!
kushal has joined #ocaml
<tormen> ... one more : I have 4 arrays all from different "sources" but all of the same length (they are my "columns") now I want to traverse the ROWS of them (so first element of all arrays, then 2nd elements of all arrays, ...) how do I best do that ?
MercurialAlchemi has quit [Ping timeout: 250 seconds]
<tormen> (my straight forward idea was: for loop and access nth of each list)
<tormen> ... would this be faster / better using arrays ? because I can choose that.
dexterph` has quit [Ping timeout: 264 seconds]
<tormen> is List.nth O(1) or O(n) ?
<tormen> is Array.get O(1) or O(n) ?
<octachron> mrvn, avoiding List.map due to potential stack overflows is probably a premature optimisation in many case
<chelfi> tormen: I'd expect List.nth to be O(n) and Array.get O(1)
<octachron> ^ exactly
<tormen> chelfi: ok ... its what I was also starting to think while writing my question down ;)
<tormen> octachron: chelfi: thanks ! :))
<octachron> tormen, list is nothing more than "type 'a list = [] | (::) of 'a * 'a list"
<tormen> octachron: hmm interesting. goes straight into /learn/it/ocaml/lists :)
rgrinberg has joined #ocaml
dhil_ has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
tane has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 240 seconds]
<tormen> I would like to do a List.map on a list and store the results in an Array. ideally I would like to use the result of my map and pass it to Array.init ... or is a List.map followed by an Array.form_list the best way ?
<tormen> s/form_list/from_list/
<tormen> ... hmmm basically: Array.from_list (List.map f l) vs let a = Array.make (List.length l) in List.mapi (fun i x -> a.(i) <- f x) l
kushal has quit [Ping timeout: 240 seconds]
<tormen> basically it boils down to: is Array.make or Array.create more expensive ?
<octachron> tormen, why not Array.(map f (from_list l)) ?
<octachron> moreover in your second case, you need to give an initial value to your array elements
<tormen> octachron: yes I know ... and between your Array.(map f (from_list l)) and Array.from_list (List.map f l) ?
<octachron> more importantly, does the performance difference matter in your use case? For instance, are you trying to optimise a hot loop in a performance-critical application?
<tormen> octachron: I think arrays are (a bit) faster than lists, right ? so your suggestion should be better in that sense ?
<tormen> octachron: ;) I know. The performance does not matter though. I am merely trying to unstand better to when to use lists and when to use arrays :)
<tormen> octachron: okey moving on with your suggestion, thanks !
<octachron> tormen: I would not know like this which one has the best performance, at least not without benchmarking
<tormen> rwo states: (a) Arrays are more compact in terms of memory utiliztion than most other data structures in OCaml, including lists (b) proably the simplest mutable data structure in OCaml ... but that does not hint on a speed comparison with lists
<tormen> ( (b) also relates to Arrays )
Simn has quit [Quit: Leaving]
<tormen> octachron: fair enough, thanks again !! :)
unbalancedparen has joined #ocaml
* tormen wishes for an automatic differnce hightlight in the output of ocamlbuild complaining about Values do not match: is not included in ... if the function signatures get larger it's like playing: find the difference in the two pictures ... ;)
<companion_cube> ^
* tormen will use vimdiff now, because he just don't sees any difference ;)
unbalancedparen has quit [Client Quit]
<gasche> you probably mean the compiler output
<gasche> (it's not ocamlbuild specific)
<tormen> gasche: yes sorry, you are right! ... ahhh so nice with just one word highlighted :)))
<gasche> it would be nice to implement this directly in the compiler
slash^ has joined #ocaml
<tormen> gasche: +1 :))
<gasche> I wonder how much overlap there would be with Arthur's work on error messages
<tormen> ... and really useful for the guys developing eliom ^^
<tormen> (these signatures tend to be rather big)
tennix has quit [Ping timeout: 264 seconds]
<tormen> gasche: one thing to improve the ocamlc error messages would be about ":" and "=" usage in value signatures (defining a function) and value evaluation (calling a function)... everyone new to ocaml will confuse them (":" and "=") and if you do the error messages are really confusing (not clear)...
<tormen> so let f ?(x:0) y = vs f ?(x=0) y = and (f ~x=0 y) vs. (f ~x:0 y)
<tormen> gasche: should I post a feature request for the --color option for ocamlc and/or the error-msg improvement about ":"/"=" mixup ?
<gasche> if you can send me self-contained examples of code with an error message that is confusing, that would be very helpful to me
<gasche> just an email at gabriel.scherer@gmail.com would be enough
<gasche> I collect them and we will use them when working on error messages
<gasche> I'm not sure what change you have in mind for --color
<gasche> feel free to open a feature request for the diff thing, but I suspect it's something that will move once someone sends a pull request (a patch)
AlexRussia has joined #ocaml
dwillems has joined #ocaml
MercurialAlchemi has joined #ocaml
al-damiri has joined #ocaml
<tormen> gasche: the above colored difference hightlight between non matching values (I attach a screenshot :))
<tormen> gasche: will do about the email. Easy because I documented stuff in /learn/it/ocaml yesterday ;)
<tormen> gasche: email will have subject "#ocaml" ;)
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
micinski has joined #ocaml
micinski has quit [Client Quit]
A1977494 has quit [Quit: Leaving.]
Algebr` has joined #ocaml
thizanne has quit [Ping timeout: 240 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
pierpa has joined #ocaml
AltGr has left #ocaml [#ocaml]
<tormen> gasche: mail sent. I had a problem with gmail maybe you'll receive it twice.
profan has quit [Ping timeout: 276 seconds]
<tormen> hmm. when I call ocamlbuild with -cflags -safe-string and target .native it works, but -cflags -safe-string on target .inferred.mli seems to ignore the -safe-string, because it always uses "bytes" everywhere... is that a bug or a feature ?
orbifx-m2 has joined #ocaml
<tormen> (a bit annoying because I use the output of .inferred.mli to bootstrap / adapt my existing .mli via vimdiff)
orbifx-m has quit [Read error: Connection reset by peer]
<tormen> (I am actually SURE that it does not work with the -safe-string for .inferred.mli, because if take this as .mli then ocamlc (when calling ocamlbuild with .native) complains about all the bytes ;))...
<tormen> ocamlc v4.02.3
octachron has quit [Quit: Page closed]
ygrek has joined #ocaml
shinnya has joined #ocaml
dwillems has quit [Ping timeout: 252 seconds]
dhil_ has quit [Remote host closed the connection]
nojb_ has quit [Ping timeout: 276 seconds]
A1977494 has joined #ocaml
<gasche> tormen: I cannot reproduce your safe-string issue
<gasche> hm
<gasche> actually I can
<gasche> if I use
<gasche> ocamlbuild -tag short_paths -cflag -safe-string
<gasche> (thanks for your email)
<gasche> you should try using ocamlubild -tags short_paths,safe_string foo.inferred.mli
thizanne has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
dave24 has quit [Quit: leaving]
rgrinberg has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
malc_ has joined #ocaml
lostman has joined #ocaml
<lostman> has anybody tried https://github.com/janestreet/virtual_dom? there are two examples included but they do something strange: they both do "open Js_of_ocaml". I only managed to make them compile by removing that line. Any ideas what's going on?
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* mrvn guesses they compile to javascript
malc_ has quit [Remote host closed the connection]
<lostman> mrvn: well yes, but I have no clue where Js_of_ocaml module would come from. Not from js_of_ocaml. And the code only compiles (all the way to JS) when the module open is removed...
<lostman> So I'm a bit confused
<mrvn> sorry, no idea then. would have though js_of_ocaml would provide that.
<gasche> lostman: send an email to ask about it?
<gasche> (to whoever commited in this repo last)
jonasen has joined #ocaml
<lostman> will do. trying to figure things out at the moment. also seeing "open! Core_kernel.Std". is "open!" some ppx extension? haven't seen that before
AlexDenisov has joined #ocaml
seangrove has joined #ocaml
<Algebr`> open! is regular OCaml
<Algebr`> like method!
<mrvn> what does that do?
<hcarty> open but silence warnings about shadowing
<lostman> TIL. thanks
<Algebr`> js_of_ocaml isn't a module from jsoo, afaik
<Algebr`> so its probably their own wrapper on top of jsoo
rgrinberg has joined #ocaml
<tormen> gasche: yes !!! Very nice ! I was indeed using -tag short_paths and using -tags short_paths,safe_string did the trick :) thaaaanks a lot. That is REALLY nicer like this :)))
<lostman> I am guessing here but I think it might be just used in conjunction with some plugin to track package dependencies. I saw this "Js_of_ocaml.Js.Unsafe.js_expr" in one of the packages and "Js.Unsafe.js_expr" is standard jsoo
<Algebr`> ah, so they probably just wrapped up all the jsoo modules as one top level module
<Algebr`> Also wish that Lwt didn't do Lwt_foo and just did one Lwt top level module
<Algebr`> and that jsoo didn't litter top level with names that have nothing to do with another.
<mrvn> Algebr`: beter to have Lwt_foo and then alias them together
darkf has quit [Quit: Leaving]
breitenj has quit [Ping timeout: 264 seconds]
Kakadu has quit [Quit: Page closed]
AlexRussia has quit [Ping timeout: 264 seconds]
hcarty1 has joined #ocaml
octachron has joined #ocaml
hcarty has quit [Ping timeout: 260 seconds]
trevorriles has quit []
dwillems has joined #ocaml
sh0t has quit [Remote host closed the connection]
trevorriles has joined #ocaml
nicholasf has joined #ocaml
<hongbo> I wish we can have a virtual dom library written in ocaml
<Algebr`> hongbo: heard your talk was great!
<Algebr`> meaning to watch it later.
<hongbo> cool, we are going to prepare a beta release next week, a stable syntax for FFI : )
profan has joined #ocaml
<smondet> hongbo: this is very fresh: https://github.com/janestreet/virtual_dom
<smondet> Then Tyxml is far supperior (?)
<smondet> oh wait JaneSt's uses also Tyxml
<Algebr`> they are using jsoo so tyxml comes along
<smondet> but their `Node` module in the examples is the untyped one
Denommus has joined #ocaml
<Algebr`> these are bindings
infinity0 has quit [Ping timeout: 246 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
Denommus has quit [Quit: rebooting]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
yomimono has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hongbo> yes, bindings to a js lib `virtual-dom`
<hongbo> for bucklescript FFI, even for bindings, you don't need write lots of `unsafe` code : )
nicholasf has quit [Remote host closed the connection]
<Algebr`> yes, I am very interested about seeing it mature, the ffi
<Algebr`> hongbo: you also ripped out the ppx right
<Algebr`> I kind of also want to reuse jsoo's ppx extension, just in a different way
<hongbo> we have a minmal ppx to support two calling conventions: curried and uncrried so you can model javascript FFI faithfully
rgrinberg has quit [Ping timeout: 240 seconds]
<hongbo> for example: `let f : int -> int -> int [@bs] = fun [bs] x y -> x + y` here type system will guarantee that f is always applied with two arguments
<hongbo> f 1 2 [@bs]
<hongbo> the nice thing is that will work with bytecode/native code backend too without ppx
<hongbo> having native support for uncurried calling convention is essential for modelling javascript functions FFI
<Algebr`> fantastic
<Drup> Algebr`: Tyxml doesn't "come along" with js_of_ocaml
<Algebr`> oh sorry, I guess its an optional depext
seangrove has quit [Ping timeout: 240 seconds]
nicholasf has joined #ocaml
<Drup> Algebr`: yes, and it doesn't have special support, it's built as a library just by using Js, Dom and Dom_html modules
orbifx-m2 has joined #ocaml
copy` has joined #ocaml
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
orbifx-m has quit [Ping timeout: 250 seconds]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
AlexDenisov has joined #ocaml
seangrove has joined #ocaml
nalgeneus has quit [Quit: nalgeneus]
octachron has quit [Quit: Leaving]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seangrove has quit [Ping timeout: 272 seconds]
rgrinberg has joined #ocaml
Kakadu has joined #ocaml
tane has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
seangrove has joined #ocaml
orbifx-m2 has joined #ocaml
malc_ has joined #ocaml
orbifx-m has quit [Ping timeout: 246 seconds]
Denommus has joined #ocaml
tane has quit [Quit: Verlassend]
orbifx-m2 has quit [Ping timeout: 260 seconds]
srcerer has joined #ocaml
<seangrove> Algebr`: I can confirm that hongbo's talk was quite nice - though the audio died out at a really interesting point :/
AlexRussia has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
<Algebr`> audio is always a problem with ocaml related videos
<copy`> I remember reading about a way to insert ;; at the end automatically in utop, but I can't seem to find it. Does anybody know how it was done?
Denommus has quit [Quit: going home]
<hcarty1> copy`: http://vpaste.net/5WBJJ -- I have this in my .ocamlinit
hcarty1 is now known as hcarty
<copy`> That does the job, cheers
_habnabit has quit [Quit: ZNC - http://znc.sourceforge.net]
_habnabit has joined #ocaml
A1977494 has quit [Quit: Leaving.]
octachron has joined #ocaml
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
jeffmo has quit [Quit: jeffmo]
octachron has quit [Quit: Leaving]
dwillems has quit [Ping timeout: 264 seconds]
rand__ has quit [Quit: leaving]
dwillems has joined #ocaml
sh0t has quit [Ping timeout: 258 seconds]
sz0 has joined #ocaml
sh0t has joined #ocaml
thizanne has quit [Ping timeout: 244 seconds]
nicholasf has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 240 seconds]
dwillems has quit [Ping timeout: 264 seconds]
hcarty has quit [Ping timeout: 244 seconds]
Kakadu has quit [Remote host closed the connection]
john51 has quit [Read error: Connection reset by peer]
john51 has joined #ocaml
trevorriles_ has joined #ocaml
trevorriles has quit [Ping timeout: 258 seconds]
john51_ has joined #ocaml
john51 has quit [Ping timeout: 260 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
benwbooth has quit [Read error: Connection reset by peer]
al-damiri has quit [Quit: Connection closed for inactivity]
benwbooth has joined #ocaml
sh0t has quit [Remote host closed the connection]