companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Haudegen has joined #ocaml
tane has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
Tuplanolla has quit [Quit: Leaving.]
aaaaaa has quit [Ping timeout: 260 seconds]
amiloradovsky has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
aaaaaa has joined #ocaml
vicfred_ has quit [Quit: Leaving]
dhil has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
mfp has quit [Ping timeout: 268 seconds]
robmyers has quit [Ping timeout: 264 seconds]
robmyers has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
empty_cup has joined #ocaml
<empty_cup> At one point I had merlin working in Spacemacs but I rebuilt my environment and it's no longer auto-completing.
<empty_cup> As a noob, the auto-completion makes ocaml possible.
empty_cup has quit [Quit: leaving]
SoF has quit [Quit: Ping timeout (120 seconds)]
SoF has joined #ocaml
ggole has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
berberman has quit [Quit: ZNC 1.7.5 - https://znc.in]
berberman has joined #ocaml
amiloradovsky has joined #ocaml
narimiran has joined #ocaml
_whitelogger has joined #ocaml
<d_bot> <beheddard> https://github.com/ocaml/merlin did you run `opam user-setup install` again?
narimiran has quit [Quit: leaving]
vicfred has joined #ocaml
Armael has quit [Ping timeout: 272 seconds]
Armael has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
tane_ has joined #ocaml
amiloradovsky has joined #ocaml
reynir has quit [Ping timeout: 240 seconds]
reynir has joined #ocaml
_whitelogger has joined #ocaml
mbuf has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
bartholin has quit [Ping timeout: 260 seconds]
amiloradovsky has joined #ocaml
bartholin has joined #ocaml
dhil has joined #ocaml
jnavila has joined #ocaml
pgiarrusso has left #ocaml [#ocaml]
bartholin has quit [Quit: Leaving]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
mfp has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ocaml
mbuf has quit [Quit: Leaving]
tane_ has quit [Quit: Leaving]
Haudegen has joined #ocaml
osa1 has joined #ocaml
aaaaaa has quit [Ping timeout: 264 seconds]
tane has joined #ocaml
jnavila has joined #ocaml
reynir has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
reynir has joined #ocaml
<d_bot> <Ibra.Kane> salut j'ai un soucis avec mon ocaml pour charger le module Graphics
<d_bot> <Ibra.Kane> voici mon error : File "cardioide.ml", line 1:
<d_bot> <Ibra.Kane> Error: Required module `Graphics' is unavailable
<d_bot> <Ibra.Kane> ya -t-il quelqu'un qui pourrait m'aider?
<d_bot> <Ibra.Kane> merci d'avance
<d_bot> <ostera> The graphics module is no longer shipped by default
<d_bot> <ostera> If you’re using opam, you can get it with opam install graphics
kmwyard has joined #ocaml
_whitelogger has joined #ocaml
osa1 has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
waleee-cl has joined #ocaml
drewolson has joined #ocaml
<drewolson> how does one use `let*` for option, as described in this post: https://jobjo.github.io/2019/04/24/ocaml-has-some-new-shiny-syntax.html
<drewolson> i'm new to ocaml, i've tried to `open Option` and `open Option.Syntax`. I've also looked at the PR that added this capability and i don't see any definitions for `let*` or `let+` added for specific types.
<Fardale> I don't see let* in the documentation
<Fardale> If you want to use it you need to define as they did in the article.
wingsorc has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
<drewolson> hm, got it. i’m confused by these release notes https://ocaml.org/releases/4.08.0.html
<drewolson> specifically the first line in “what’s new”
bartholin has joined #ocaml
<Fardale> That means you can define them
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #ocaml
<drewolson> i see. thanks.
Haudegen has joined #ocaml
nullcone has joined #ocaml
<drewolson> Fardale: i got it working, thanks! https://gist.github.com/drewolson/e4cd915b48a652b08f3f2bb8e9ccf702
<drewolson> still a bit strange to me that these aren't predefined in the stdlib for monadic types
<d_bot> <despairblue> Hey, I'm using Base and try to avoid `open Poly`. Now for most data types it's ok to write a `compare` function, I'm just wondering if for variants that's also the case since this get's super tedious. Is this really the best way to do this I wonder:
<d_bot> <despairblue>
<d_bot> <despairblue> ```
<d_bot> <despairblue> open Base
<d_bot> <despairblue>
<d_bot> <despairblue> type status =
<d_bot> <despairblue> | Ready
<d_bot> <despairblue> | Shutting_Down
<d_bot> <despairblue> | Not_Ready
<d_bot> <despairblue>
<d_bot> <despairblue> (* using polymorphic compare *)
<d_bot> <despairblue> let is_ready status = status = Ready
<d_bot> <despairblue>
<d_bot> <despairblue> let equal a b =
<d_bot> <despairblue> match (a, b) with
<d_bot> <despairblue> | (Ready ,Ready ) -> true
<d_bot> <despairblue> | (Shutting_Down ,Shutting_Down ) -> true
<d_bot> <despairblue> | (Not_Ready ,Not_Ready ) -> true
<d_bot> <despairblue> | (Ready ,_) -> false
<d_bot> <despairblue> | (Shutting_Down ,_) -> false
<d_bot> <despairblue> | (Not_Ready ,_) -> false
<d_bot> <despairblue>
<d_bot> <despairblue> (* not using polymorphic compare *)
<d_bot> <despairblue> let is_ready status = equal status Ready
<d_bot> <despairblue> ```
<d_bot> <despairblue> Seems that's exactly what I'm supposed to do, according to this: https://blog.janestreet.com/building-a-better-compare/ 🤔
<d_bot> <rgrinberg> There’s a ppx to automate writing comparisons
<d_bot> <rgrinberg> It’s even more tedious than your snippet suggests. You aren’t taking order into account
<companion_cube> @despairblue: you can shorten the false cases into `(A | B | C), _ -> false`
<d_bot> <despairblue> Yeah, I'm not writing a compare, just the equal. I don't think a compare is sensible for most variants.
<companion_cube> makes for n+1 cases, instead of 2n
<d_bot> <despairblue> @companion_cube nice one, thanks ^^
<d_bot> <despairblue> @rgrinberg Interesting, what's it called? I usually avoid ppx where I can since everytime I use them they end up breaking whenever I upgrade any dependency.
<d_bot> <rgrinberg> > Yeah, I'm not writing a compare, just the equal. I don't think a compare is sensible for most variants.
<d_bot> <rgrinberg> @despairblue it’s very sensible if you want a map or a set
<d_bot> <rgrinberg> > @rgrinberg Interesting, what's it called? I usually avoid ppx where I can since everytime I use them they end up breaking whenever I upgrade any dependency.
<d_bot> <rgrinberg> @despairblue ppx_compare_conv
<d_bot> <despairblue> Which in my case is not "most cases" 😉
<d_bot> <despairblue> @rgrinberg thanks, I may give it a try, but a ppx seems a bit overkill for a list of options for now 🙂
<d_bot> <despairblue> @rgrinberg this is the one you mean, right? https://github.com/janestreet/ppx_compare
<d_bot> <rgrinberg> Yeah, that one
Haudegen has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
<d_bot> <despairblue> > @rgrinberg Interesting, what's it called? I usually avoid ppx where I can since everytime I use them they end up breaking whenever I upgrade any dependency.
<d_bot> <despairblue>
<d_bot> <despairblue> Yep, just tried to install it and it does not compile, usually some ppxlib error 😿
<d_bot> <despairblue>
<d_bot> <despairblue> ```
<d_bot> <despairblue> info building @opam/ppx_compare@opam:v0.12.0@1c0426c7: done
<d_bot> <despairblue> ppx lib/CohttpServer.re.pp.ml (exit 2)
<d_bot> <despairblue> (cd _build/default && .ppx/69b552820ffdc8f844a03ba9e8d90d4b/ppx.exe --cookie 'library-name="lib"' -o lib/CohttpServer.re.pp.ml --impl lib/CohttpServer.re.ml -corrected-suffix .ppx-corrected -diff-cmd - -dump-ast)
<d_bot> <despairblue> Fatal error: exception File "lib/CohttpServer.re", line 78, characters 4-10: let operators are not supported before OCaml 4.08
<d_bot> <despairblue> Raised at file "src/migrate_parsetree_408_407_migrate.ml", line 7, characters 2-49
<d_bot> <despairblue> Called from file "src/migrate_parsetree_408_407_migrate.ml", line 57, characters 8-40
<d_bot> <despairblue> Called from file "src/migrate_parsetree_408_407_migrate.ml", line 84, characters 10-30
<d_bot> <despairblue> ```
<d_bot> <despairblue>
<d_bot> <despairblue> Goes on forever like this. I also don't really understand it since I use OCaml 4.09.1000, which is above 4.08 🤷🏽‍♀️
<d_bot> <rgrinberg> Why are you using such an ancient version of ppx_compare?
<d_bot> <despairblue> Dunno, that's what esy's solver spit out. I'll try installing a newer version but I fear one of my depa fórceps that old version.
<d_bot> <despairblue>
<d_bot> <despairblue> I'll try in an hour :)
bartholin has quit [Ping timeout: 260 seconds]
RalfJ has quit [Remote host closed the connection]
RalfJ has joined #ocaml
TheLemonMan has joined #ocaml
bartholin has joined #ocaml
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 268 seconds]
hnOsmium0001 has joined #ocaml
Haudegen has joined #ocaml
<d_bot> <despairblue> actually I'm using 0.12.0, which is only 2 minor versions behind, why would that be ancient? 😕
<d_bot> <despairblue> Mhh, could it bee that ppx_compare does not specify the version ranges of it's dependencies correctly? That's something that I seem to find a lot in the ocaml ecosystem. There are a lot of packages that claim to be compatible with a version of another package but then you get a compile error. Either the versions are too open or a lot of packages don't take semver that srsly and break on a minor version I feel.
<d_bot> <despairblue>
<d_bot> <despairblue> I'll check if I can install 0.13 at least.
<d_bot> <rgrinberg> > actually I'm using 0.12.0, which is only 2 minor versions behind, why would that be ancient? 😕
<d_bot> <rgrinberg> @despairblue nobody makes sure that old versions stay working with ppx. So in practice, that means only the latest version is usable
<d_bot> <rgrinberg> > Mhh, could it bee that ppx_compare does not specify the version ranges of it's dependencies correctly? That's something that I seem to find a lot in the ocaml ecosystem. There are a lot of packages that claim to be compatible with a version of another package but then you get a compile error. Either the versions are too open or a lot of packages don't take semver that srsly and break on a minor version I feel.
<d_bot> <rgrinberg> >
<d_bot> <rgrinberg> > I'll check if I can install 0.13 at least.
<d_bot> <rgrinberg> @despairblue the absence of a conflict is not evidence for compatibility 🙂
<d_bot> <despairblue> True that, I just wish that every time the observable interface of a package changes in a backwards incompatible way the publisher would be forced to do a major bump. Otherwise the value of versioning is pretty low. People could just have one number that they keep increasing 😄
<d_bot> <despairblue> I now kept going through all dependencies and just kept upgrading. Now everything is latest and works 👍🏽
<d_bot> <despairblue>
<d_bot> <despairblue> Still wondering why it failed even when I forced all jane street package to stay on 0.12 🤷🏽‍♂️
<d_bot> <rgrinberg> Perhaps you need a different version of omp?
<d_bot> <rgrinberg> Btw, how are you using let operators in reason?
<d_bot> <rgrinberg> I thought reason doesn’t have them
<d_bot> <despairblue> Right, I did not check that version, maybe it was not compatible with 0.12 versions.
<d_bot> <despairblue>
<d_bot> <despairblue> Well, I've been trying to upgrade packages for a while now. Now everything's up to date, which is nice. Usually I just go pkg by pkg until I hit a compile error. Seems upgrading everything to latest also works sometimes. In the past I had bad experiences with it ^^
<d_bot> <despairblue> > Btw, how are you using let operators in reason?
<d_bot> <despairblue>
<d_bot> <despairblue>
<d_bot> <despairblue> It's been there for a while, have to find the PR. Let me check.
mmohammadi9812 has quit [Ping timeout: 268 seconds]
<d_bot> <despairblue>
<d_bot> <despairblue> 20th of Feb.
<d_bot> <rgrinberg> I think that’s the issue then. You need a version of ppxlib that uses a newer ast. 0.12 is still using the old ast that doesn’t have let ops
<d_bot> <despairblue> Ah that was the reason for my bad experiences with ppxes then. Now I'm on 0.19, so I can start to use them all over the place :D
<d_bot> <despairblue>
<d_bot> <despairblue> Just kidding, but some of them look really useful. Thanks for the help 🙂
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
ggole has quit [Quit: Leaving]
<companion_cube> Indeed, version constraints are all over the place.
<companion_cube> And ppx based things are especially fragile
mmohammadi9812 has joined #ocaml
bartholin has quit [Ping timeout: 272 seconds]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
bartholin has joined #ocaml
bartholin has quit [Quit: Leaving]
jnavila has quit [Quit: Konversation terminated!]
vicfred_ has joined #ocaml
aaaaaa has joined #ocaml
vicfred has quit [Ping timeout: 246 seconds]
tane has quit [Quit: Leaving]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
vicfred_ has quit [Quit: Leaving]
_whitelogger has joined #ocaml
aaaaaa has quit [Quit: leaving]