adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
orbifx has quit [Ping timeout: 260 seconds]
maattdd has quit [Quit: WeeChat 1.7]
maattdd has joined #ocaml
sh0t has quit [Remote host closed the connection]
silver has quit [Read error: Connection reset by peer]
sepp2k has quit [Quit: Leaving.]
nomicflux has joined #ocaml
Simn has quit [Quit: Leaving]
Algebr has quit [Ping timeout: 240 seconds]
nomicflux has quit [Quit: nomicflux]
sz0 has joined #ocaml
nomicflux has joined #ocaml
snhmib has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
snhmib has joined #ocaml
nomicflux has quit [Quit: nomicflux]
maattdd_ has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
shinnya has joined #ocaml
samg_ has joined #ocaml
<samg_> Why is `let module ... in` not allowed as RHS in a `let rec`? See https://gist.github.com/samwgoldman/b193abd46374193ff6de9dabb53c5484
<samg_> I'm trying to refactor a large slab of recursive functions without functorizing the whole thing. I'm trying to reuse the same module between calls instead of creating a new module each call.
<samg_> 4.03.0, FWIW
mengu has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBird_ has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
DanielRi1hman is now known as DanielRichman
nomicflux has quit [Quit: nomicflux]
malina has quit [Ping timeout: 268 seconds]
noddy has quit [Ping timeout: 260 seconds]
noddy has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
chetshah has joined #ocaml
Algebr has joined #ocaml
FreeBirdLjj has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
justicefries has left #ocaml [#ocaml]
noddy has quit [Ping timeout: 240 seconds]
noddy has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
chetshah has quit [Quit: Page closed]
philtor has quit [Ping timeout: 264 seconds]
ygrek has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
mrnugget has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
mengu has quit [Remote host closed the connection]
mrnugget has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
snhmib has quit [Ping timeout: 240 seconds]
freusque has quit [Ping timeout: 255 seconds]
freusque has joined #ocaml
djellemah_ has joined #ocaml
snhmib has joined #ocaml
FreeBirdLjj has joined #ocaml
djellemah_ has quit [Quit: Leaving]
djellemah_ has joined #ocaml
Simn has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
mengu has joined #ocaml
Algebr has quit [Ping timeout: 260 seconds]
mengu has quit [Ping timeout: 240 seconds]
jnavila_ has joined #ocaml
FreeBirdLjj has joined #ocaml
demonimin_ has quit [Remote host closed the connection]
demonimin has joined #ocaml
larhat has joined #ocaml
cataska has joined #ocaml
djellemah_ has quit [Ping timeout: 260 seconds]
cataska has quit [Quit: Textual IRC Client: www.textualapp.com]
obadz has quit [Quit: WeeChat 1.5]
obadz has joined #ocaml
djellemah_ has joined #ocaml
djellemah_ has quit [Remote host closed the connection]
djellemah_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
infinity0_ has joined #ocaml
<infinity0_> is there any way to "fake" this ?
<infinity0_> other than adding the same argument "twice" to allow ocaml to instantiate the type parameters twice
<zozozo> infinity0_: if you enclose in a record you can have polymorphism
<zozozo> infinity0_: you can see it in this gist : https://gist.github.com/Gbury/e70b1e418af231da8c90b1ef9af73588
<infinity0_> zozozo: ooo very nice :D
jnavila_ has quit [Ping timeout: 240 seconds]
<infinity0_> zozozo: where is that 'a. syntax documented / what is it called?
<zozozo> infinity0_: it is documented here : https://caml.inria.fr/pub/docs/manual-ocaml/types.html
<zozozo> in poly-typexpr
<infinity0_> ah, thanks
<infinity0_> excellent, this actually worked :D
<infinity0_> type ('a, 'b, 's, 't) lens = { lens : 'fb 'ft. (('b -> 't) -> 'fb -> 'ft) -> ('a -> 'fb) -> 's -> 'ft }
<infinity0_> awww yeeeeah
jnavila_ has joined #ocaml
maattdd has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
frefity has quit [Ping timeout: 240 seconds]
maattdd_ has joined #ocaml
maattdd__ has joined #ocaml
maattdd_1 has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
maattdd_ has quit [Ping timeout: 260 seconds]
maattdd_1 has quit [Read error: Connection reset by peer]
maattdd__ has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
frefity has joined #ocaml
FreeBirdLjj has joined #ocaml
maattdd_1 has joined #ocaml
andreas__ has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
maattdd has joined #ocaml
maattdd_1 has quit [Ping timeout: 268 seconds]
larhat has quit [Quit: Leaving.]
maattdd_ has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
frefity has quit [Ping timeout: 260 seconds]
frefity has joined #ocaml
larhat has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
rpg has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
ggherdov__ has quit [Changing host]
ggherdov__ has joined #ocaml
ggherdov__ has joined #ocaml
ggherdov__ is now known as ggherdov
jnavila_ has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
rpg has quit [Ping timeout: 260 seconds]
FreeBird_ has quit [Ping timeout: 268 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 268 seconds]
malc_ has joined #ocaml
tane has joined #ocaml
t4nk818 has joined #ocaml
t4nk818 has quit [Client Quit]
maattdd_ has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
maattdd_ has quit [Read error: Connection reset by peer]
Algebr has joined #ocaml
maattdd_ has joined #ocaml
dx has quit [Remote host closed the connection]
dx has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
sepp2k has joined #ocaml
ollehar has joined #ocaml
sh0t has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
malina has joined #ocaml
mengu has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
Algebr has quit [Ping timeout: 255 seconds]
mfp has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
jnavila_ has joined #ocaml
frefity has quit [Ping timeout: 260 seconds]
chbatey has joined #ocaml
silver_ has joined #ocaml
ryanartecona has joined #ocaml
silver has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
<flux> you could also choose to use names other than 'a, 'b, 's, 't ;-)
frefity has joined #ocaml
silver_ is now known as silver
Simn has quit [Ping timeout: 240 seconds]
<infinity0_> Drup: i'm trying to extend your "typing tricks" post https://drup.github.io/2016/08/02/difflists/ to deal with lists where the element of one type is partially determined by the element of the next type
<infinity0_> haven't yet managed to write a "len" function yet https://is.gd/OJjRuN any idea what's wrong?
MercurialAlchemi has joined #ocaml
<infinity0_> oh, i think i figured it out, my mistake was trying to add extra type params to the ('ty, 'v) part
<Drup> so, basically, you have a list of dominos and the dominos must match with their neighbours ?
<Drup> (type-wise, of course)
<Drup> (those are type dominoes)
<infinity0_> yeah
<infinity0_> | Cons : 'a * 'b * ('b -> 'ty, 'v) t -> ('a -> 'b -> 'ty, 'v) t
<infinity0_> this seems like it might work, gonna keep trying
<Drup> why do you think you need cps for computing the lenght ?
<infinity0_> i don't, i was trying to figure out why the (* llen *) wasn't working, by taking an existing example where you performed a calculation over the entire list and then changing it backwards to be close to my code
<infinity0_> but that was a red herring i realise now
<Drup> yeah, you can just do that: https://bpaste.net/show/66fa8e953295
<infinity0_> i see, thanks
<Drup> the idea to propagate backward is a bit problematic
<Drup> in particular, try your "Cons : 'a * 'b * ('b -> 'ty, 'v) t -> ('a -> 'b -> 'ty, 'v) t" and look at the type of l1
<Drup> it's probably not exactly what you want
<infinity0_> (int -> 'a list -> string -> 'b, string -> 'b) t
<infinity0_> ah yeah that might cause issues later
nomicflux has quit [Quit: nomicflux]
<Drup> you can try to solve that by deciding that nil is (_ -> 'v, 'v) t
<Drup> but, well, you'll need to see if that works in practice, I'm not really sure
<infinity0_> yeah i'll play around with both examples, and try to figure out why your fixed worked too :) thanks!
<Drup> (also, you'll crash hard into the value restriction)
<Drup> (but well, that's expected with this encoding)
vicfred has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
ryanartecona has quit [Quit: ryanartecona]
jnavila_ has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
MercurialAlchemi has joined #ocaml
guid has joined #ocaml
guid has quit [Quit: Leaving]
sepp2k has joined #ocaml
jabroney has joined #ocaml
<flux> /45
Simn has joined #ocaml
maattdd_ has quit [Remote host closed the connection]
jnavila_ has joined #ocaml
pecan has joined #ocaml
ygrek has joined #ocaml
octachron has joined #ocaml
philtor has joined #ocaml
<infinity0_> Drup: it turns out i totally didn't need all of this stuff, for my "overall goal" https://gist.github.com/infinity0/3c8461ed60d806bb4d6616a03939788a#file-lens-ml-L87
<infinity0_> but i did solve both the overall thing and the unnecessary specific thing in the end
<infinity0_> (ty2, ty3, v, b, a, y, x) lenss ->
<infinity0_> (ty1, ty2, v, fb, b, fy, y) fmaps ->
<infinity0_> i thought that was quite neat, even though it turned out to be pointless ¬.¬
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
chbatey has quit [Quit: Connection closed for inactivity]
<Drup> 7 parameters
<Drup> urk
<infinity0_> yeah that part's ugly, but it unifies over ty2 so you can have two separate (but related) lists of things
<infinity0_> perhaps this technique would be useful in the future for something or other... lol
<Drup> 7 is too much for any practical use. When you have 3 parameters to encode some property, people already can't really understand what is happening
<infinity0_> i know, i know :) but if i hadn't done it, i probably wouldn't have realised the much simpler solution exists
<Drup> Oh, it's fine to play with impractical solution !
<Drup> You just have to be aware they are impractical :p
AlexDenisov has joined #ocaml
<octachron> Drup, which is not always exactly easy to do, even more so before being bittten by the impracticalness.
<Drup> yeah
ollehar has quit [Ping timeout: 255 seconds]
TheLemonMan has joined #ocaml
ollehar has joined #ocaml
rgrinberg has joined #ocaml
gasche` has joined #ocaml
<gasche`> are there examples around of using OASIS in a js-of-ocaml project that builds a .js file?
<gasche`> (the only one I found is https://github.com/AngryLawyer/reactjs_of_ocaml/blob/master/_oasis , which only produces javascript in the Test command, and it's sort of a hack)
djellemah_ has quit [Ping timeout: 240 seconds]
djellemah_ has joined #ocaml
djellemah has quit [Ping timeout: 260 seconds]
djellemah has joined #ocaml
Kakadu has joined #ocaml
fraggle_ has quit [Ping timeout: 255 seconds]
nomicflux has joined #ocaml
<Drup> If you really want a (quite old) example: https://github.com/Drup/LILiS.jsoo
fraggle_ has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
<gasche`> Drup: the documentation you mention only explains how to handle the myocamlbuild.ml side
<gasche`> I received the question from someone who does not have a Makefile driver, the Make is oasis-generated
<gasche`> to I'd like a way to tell _oasis: this Executable should in fact produce a .js file
<gasche`> (or something equivalent)
<Drup> the presence of a makefile driver is independent
<gasche`> Drup: the lilis example uses the (Test -> Command) trick I mentioned above, I suppose that's the way to go
<gasche`> well
<Drup> hum, no it doesn't
<gasche`> the question is, how to have (ocaml setup.ml ...) produce the .js file
<gasche`> (or "make ..." with the oasis-generated Makefile)
<gasche`> hm
<Drup> It's a regular Executable section, and the ocamlbuild.ml bits allows to specify "for all those .byte generated by oasis, generates a .js
<gasche`> I had not noticed the ~oasis_executables thing in the myocamlbuild bit
<Drup> it's purely oasis+ocamlbui,d with no hacks
<gasche`> hm
<gasche`> sort of ugly, but ok, it's better than Test
<gasche`> thanks
<Drup> yeah, it's a bit ugly, I agree
<gasche`> (ocamlbuild should be in charge of how to build, and oasis what to build; but that's a good start)
<Drup> I should look into how this, but, heh, time
<Drup> how to do this cleanly*
<gasche`> Drup: I think it would be very nice to have this pattern be one of the oasis-examples/
<gasche`> (first place I looked at to answer this question)
<Drup> huh, propose that to gildor ?
AlexDeni_ has joined #ocaml
<gasche`> well someone should send a PR
<gasche`> I can try
AlexDenisov has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mengu has quit [Ping timeout: 260 seconds]
Ptival has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
<ollehar> someone ever used the rouge syntax highlighter? it removes the "let" keyword on my page.
<ollehar> for "ml" syntax highlight
<infinity0_> what's the difference between doing "val xxx : type s t u." vs "val xxx (type s t u) :" ?
<infinity0_> ocamldoc treats them differently, but it seems ocamlc treats them pretty much the same
<infinity0_> er, let* not val there
<octachron> infinity0_, the first types annotations are explicitely polymorphic, not the second one
<octachron> the differences matters mostly when writing polymorphic recursive functions
gasche` has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
<infinity0_> i see, ok
<infinity0_> i guess i don't actually need it for my case (it's not recursive) but if i leave it out then ocamldoc will put in its own type variables, sigh
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
djellemah_ has quit [Ping timeout: 255 seconds]
<Drup> infinity0_: sounds like an ocamldoc bug
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
<octachron> Drup, quite certainly ( even if the bug is somehow surprising )
<octachron> infinity0_, note that this also one more reason to have mli files, since there are not subject to these issues
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
<infinity0_> true, yeah
Kakadu has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
tane has quit [Quit: Leaving]
jnavila_ has quit [Ping timeout: 255 seconds]
octachron has quit [Quit: Leaving]
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
ollehar has quit [Ping timeout: 255 seconds]
jabroney has quit [Quit: Leaving.]
jabroney has joined #ocaml
rpg_ has joined #ocaml
samg_ has quit [Quit: leaving]