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
kakadu_ has quit [Remote host closed the connection]
nomicflux has joined #ocaml
snhmib has quit [Ping timeout: 255 seconds]
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
enterprisey has joined #ocaml
pmetzger has quit []
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
Aesh has quit [Ping timeout: 260 seconds]
malina has joined #ocaml
<Drup> octachron: ppxs do not handle hygienes by themselves, on the contrary
silver has quit [Quit: rakede]
spew has joined #ocaml
cobreadmonster has joined #ocaml
malina has quit [Remote host closed the connection]
malina has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
fredcy has quit [Quit: ZNC - http://znc.in]
fredcy has joined #ocaml
zipm has quit [Quit: zipm]
cbot has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
spew has quit [Ping timeout: 240 seconds]
kerrhau has left #ocaml ["WeeChat 1.9.1"]
sh0t has quit [Remote host closed the connection]
kerrhau has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
kerrhau has quit [Ping timeout: 248 seconds]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
nomicflux has quit [Quit: nomicflux]
somlor has joined #ocaml
malina has joined #ocaml
kerrhau has quit [Ping timeout: 240 seconds]
hooman has joined #ocaml
somlor is now known as seanomlor
seanomlor has quit [Ping timeout: 248 seconds]
spew has joined #ocaml
<hooman> opam is not letting me update 4.05 -> 4.06 ?
zmt00 has quit [Quit: Leaving]
jbrown has quit [Ping timeout: 248 seconds]
infinity0 has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
seanomlor has joined #ocaml
mbuf has joined #ocaml
snhmib has joined #ocaml
spew has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
govg has joined #ocaml
<octachron> Drup, you are right of course; atrocious wording on my part, I meant syntactic macro system
<octachron> hooman, did you update recently (e.g. "opam update")?
zaquest_ has joined #ocaml
andreas__ has joined #ocaml
cbot has quit [Quit: Leaving]
zaquest has quit [Ping timeout: 248 seconds]
malina has quit [Quit: Throwing apples of Montserrat]
seanomlor has quit [Ping timeout: 240 seconds]
dakk has joined #ocaml
TheLemonMan has joined #ocaml
sapristi has joined #ocaml
enterprisey has quit [Ping timeout: 248 seconds]
TarVanimelde has joined #ocaml
enterprisey has joined #ocaml
sz0 has joined #ocaml
AltGr has joined #ocaml
MercurialAlchemi has quit [Quit: Reconnecting]
MercurialAlchemi has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
argent_smith has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
<Leonidas> hmm, the js_of_ocaml docs were not regenerated for 3.0 nor 3.0.1
<Leonidas> I was very confused why things just didn't exist anymore
rtb has joined #ocaml
rtb has quit [Read error: Connection reset by peer]
TarVanimelde has quit [Quit: TarVanimelde]
sapristi_ has joined #ocaml
sapristi has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
ygrek has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
enterprisey has joined #ocaml
enterprisey has quit [Remote host closed the connection]
mbuf has quit [Read error: Connection reset by peer]
mbuf has joined #ocaml
demonimin has joined #ocaml
malina has joined #ocaml
malina has quit [Remote host closed the connection]
malina has joined #ocaml
silver has joined #ocaml
ziyourenxiang has joined #ocaml
zolk3ri has joined #ocaml
thegameg has joined #ocaml
shinnya has joined #ocaml
malina has quit [Ping timeout: 240 seconds]
dlf42 has joined #ocaml
kakadu has joined #ocaml
<orbifx[m]> Is there an immutable array?
<orbifx[m]> OK, Containers have one. Any other implementations?
malina has joined #ocaml
<companion_cube> it's just a thin layer above array
nomicflux has joined #ocaml
danieli has quit [Ping timeout: 240 seconds]
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
Jesin has quit [Quit: Leaving]
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
dlf42 has quit [Remote host closed the connection]
jbrown has joined #ocaml
sz0 has joined #ocaml
spew has joined #ocaml
dakk has quit [Read error: Connection reset by peer]
pathfinder has joined #ocaml
pathfinder has left #ocaml [#ocaml]
shinnya has quit [Ping timeout: 248 seconds]
<orbifx[m]> companion_cube: is there a way to get sub-arrays without copies?
<zozozo> orbifx[m]: CCArray_slice ?
<companion_cube> it's not really a sub-array
<companion_cube> orbifx[m]: are you doing numerical computation
<orbifx[m]> Yeah
<companion_cube> then you should probably use bigarray
<companion_cube> it's more efficient, designed for cheap sub-slices, compatible with lapack bindings, etc.
<orbifx[m]> They are not bigarrays. The are small
<Leonidas> once js_of_ocaml works it is pretty magical :)
<companion_cube> "big" doesn't actually impact size
<orbifx[m]> ok
<companion_cube> it's just that they are close to C/fortran
<companion_cube> and they are limited to a handful of primitive types (including floats)
<orbifx[m]> But (1) are they purely OCaml or do they have C bindings? (2) Are the immutable?
* orbifx[m] is checking them out now
<companion_cube> they are not immutable
<companion_cube> and they use C primitives
<companion_cube> but… numerical computations with immutable data, who does that?
mbuf has quit [Quit: Leaving]
MercurialAlchemi has quit [Quit: Lost terminal]
<orbifx[m]> :D
<orbifx[m]> Am I the first one? :P
<orbifx[m]> Safety is important in this case.
<companion_cube> well I think it's one of these domains where imperative is several order of magnitudes faster
danieli has joined #ocaml
danieli has joined #ocaml
argent_smith has quit [Quit: Leaving.]
<orbifx[m]> So I preferring: immutability > pure ocaml > performance
<thizanne> then use lists
<companion_cube> you might want to try maps, then, I guess‽
<companion_cube> or lists indeed
<orbifx[m]> because we are talking about arrays of 10-20 elements
<companion_cube> ah
<companion_cube> then immutable arrays and Array.sub probably won't be slower
danieli has quit [Read error: Connection reset by peer]
danieli has joined #ocaml
danieli has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
<orbifx[m]> You mean use Array.sub and then return CCImmutArray.of_array_unsafe?
sh0t has joined #ocaml
<companion_cube> yeah
<companion_cube> ah I should add a `sub` function tho at some point
Jesin has joined #ocaml
<Leonidas> I am obviously very confused, but I have a Js.js_string Js.t Js.opt Js.prop = < get : Js.js_string Js.t Js.opt; set : Js.js_string Js.t Js.opt -> unit > Js.gen_prop
<Leonidas> but whenever I try to call #set I get that the value has no method set?
Pedro2018 has joined #ocaml
argent_smith has joined #ocaml
<Pedro2018> Hi guys! I have a type related question : I'd like to transform an element of some inductive type (say int list) into a polymorphic recursor of the form "fold : 'acc . ('acc -> int -> 'acc) -> 'acc -> 'acc". So it would have to be a function of type transform : int list -> ('acc . ('acc -> int -> 'acc) -> 'acc -> 'acc).
<companion_cube> you need to wrap the recursor into a record
<Pedro2018> In OCaml, universal type quantification is only allowed in prenex form, which prevents the above type
<Pedro2018> I see, so it would be int list -> { fold = ... }
<companion_cube> type int_recursor = {iter: 'a. ('a -> int -> 'a) -> 'a -> 'a}
<octachron> Leonidas, "obj##.prop := value" for Js.prop
<companion_cube> something like that
<companion_cube> you can have a 'b recursor, too
<companion_cube> but yeah, quantfication needs to be wrapped in record (or object) fields
<companion_cube> also, not sure, but I think you can [@@unboxed] the record
<Pedro2018> I'm not familiar with these new funky annotations, I'll have a look too
<companion_cube> it's just for optimizing tho
<octachron> companion_cube, yep this kind of record is a prime candidate for unboxing
<Pedro2018> do you know where I could find examples of such uses of polymorphic records ? it must be a standard exercise I guess
<Pedro2018> unrelated: does this kind of unboxing rely on using the flambda branch ?
<octachron> Pedro2018, the examples are a bit limited but there is also http://caml.inria.fr/pub/docs/manual-ocaml/polymorphism.html#sec60 now
<octachron> Pedro2018, no [@@unboxed] is independent from flambda; it merely unbox the content of trivial record or sum type.
<Pedro2018> companion_cube, octachron, thank you very much!
<Pedro2018> I see, that's pretty cool
<octachron> Here, it is also useful to emphasize the fact that the record is only here for the universal quantification
<Pedro2018> right!
<Leonidas> octachron: what is ##?
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<octachron> Leonidas, you are not using js_of_ocaml ppx extension?
sepp2k has joined #ocaml
<oh_lawd> is there something like python's argparse for ocaml, that would also support positional arguments
<Drup> oh_lawd: use cmdliner
<companion_cube> or Arg, for starters
<octachron> Leonidas, in this case, it is jbuilder that does not work. Do you have any outstanding reason to use jbuilder here? Jbuilder purposely breaks a lot of ppx's.
<oh_lawd> using Arg now, but I'd like to repeat the functionality of my command line client I always write with a new language
<companion_cube> what kind of functionality are you talking about, in this case?
<oh_lawd> so here I can use positional arguments, such as `client GET /path/to/resource`
<oh_lawd> I'll do it a bit differently first, but definitely having a look to the cmdliner
<Drup> octachron, Leonidas: jsoo's ppx should work though, but I can't help more than that, jbuilder's conf for ppx is ... weird
<Leonidas> octachron: all the rest of the code uses jbuilder and I don't really feel like switching to the 3rd build system in 4 weeks, we just got rid of omake :-/
<Leonidas> Drup: yep, I also saw that it uses omp so in theory it should be fine
argent_smith has quit [Quit: Leaving.]
<Drup> I guess your best bet is to manage to catch rgrinberg's attention
argent_smith has joined #ocaml
<Leonidas> yep, that's why I posted to the discuss with a git repo to reproduce.
Jesin has quit [Quit: Leaving]
sz0 has quit [Quit: Connection closed for inactivity]
Jesin has joined #ocaml
Onemorenickname has joined #ocaml
<Onemorenickname> What does "type new_type = .." mean ?
<Onemorenickname> (I don't know how to make Google searches with symbols)
<Onemorenickname> thanks :)
Pedro2018 has quit [Quit: Page closed]
<orbifx[m]> Is there anything wrong with implementing with CCArray_slice.make?
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<companion_cube> well it would return a slice, not an immutable array
jbrown has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<hooman> octachron, yes, just before seeing i am 4.05 -- what ended up happening, is i rm -rf ~/.opam , then install 4.06 from scratch
seanomlor has joined #ocaml
ziyourenxiang has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jbrown has joined #ocaml
govg has quit [Ping timeout: 248 seconds]
zmt00 has joined #ocaml
<orbifx[m]> companion_cube: it would be nice if the two are more composable.
<companion_cube> I know
<companion_cube> but it seems hard to do given the basic types
<hooman> "[WARNING] Errors in...." wow, opam, really =)
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
slash^ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Anarchos has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
AltGr has left #ocaml [#ocaml]
jao has joined #ocaml
Anarchos has quit [Remote host closed the connection]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<rgrinberg> Leonidas: ping me tomorrow. I'll give it a try.
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<Leonidas> rgrinberg: I got it to work on my example project, I'll see if the same fix solves it for my main project as well.
<rgrinberg> I see. so what was the problem?
yomimono has joined #ocaml
ShalokShalom has joined #ocaml
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
jao has quit [Remote host closed the connection]
<Leonidas> rgrinberg: -no-check prevented it from compiling but it did work.
<Leonidas> it just didn't mark the extension points as visited/processed.
pmetzger has joined #ocaml
jao has joined #ocaml
kakadu_ has joined #ocaml
jnavila has joined #ocaml
somlor has joined #ocaml
seanomlor has quit [Ping timeout: 248 seconds]
mk9 has joined #ocaml
pmetzger has quit []
seangrove has joined #ocaml
somlor has quit [Ping timeout: 248 seconds]
somlor_ has joined #ocaml
<seangrove> Drup: Just wanted to say congratulations on https://discuss.ocaml.org/t/tierless-web-programming-in-ml/1125 - it's very cool to see someone exploring this model
<Drup> thanks :)
andreas__ has quit [Quit: Connection closed for inactivity]
somlor_ has quit [Quit: WeeChat 1.9.1]
zolk3ri has quit [Quit: leaving]
zolk3ri has joined #ocaml
mk9 has quit [Quit: mk9]
sapristi_ has quit [Ping timeout: 240 seconds]
slash^ has quit [Read error: Connection reset by peer]
tg has quit [Ping timeout: 260 seconds]
Artymort has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Artymort has joined #ocaml
argent_smith has quit [Quit: Leaving.]
tg has joined #ocaml
Artymort has quit [Ping timeout: 264 seconds]
ShalokShalom has quit [Remote host closed the connection]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
jnavila has quit [Remote host closed the connection]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
pierpa has joined #ocaml
yomimono_ has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
yomimono has quit [Ping timeout: 248 seconds]
kerrhau has joined #ocaml
mk9 has joined #ocaml
zolk3ri has quit [Quit: leaving]
Onemorenickname has quit [Read error: Connection reset by peer]
ziyourenxiang has quit [Ping timeout: 240 seconds]
mk9 has quit [Quit: mk9]
Jesin has quit [Quit: Leaving]
p1n34ppl3 has joined #ocaml
sepp2k has quit [Quit: Leaving.]
sh0t has quit [Remote host closed the connection]
spew has quit [Ping timeout: 255 seconds]