Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.1.1 released: https://ocaml.org/releases/5.1.1 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
jabuxas has joined #ocaml
tri has joined #ocaml
waleee has quit [Ping timeout: 245 seconds]
tri has quit [Ping timeout: 260 seconds]
jabuxas has quit [Ping timeout: 268 seconds]
pi3ce has joined #ocaml
torretto has quit [Ping timeout: 260 seconds]
tri has joined #ocaml
pi3ce has quit [Ping timeout: 245 seconds]
pi3ce has joined #ocaml
tri has quit [Remote host closed the connection]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
torretto has joined #ocaml
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
dh` has quit [Read error: Connection reset by peer]
dh` has joined #ocaml
Serpent7776 has joined #ocaml
tri has joined #ocaml
tri has quit [Ping timeout: 245 seconds]
mima has joined #ocaml
dnh has joined #ocaml
olle has joined #ocaml
bartholin has joined #ocaml
theblatte has quit [Ping timeout: 268 seconds]
theblatte has joined #ocaml
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
theblatte has quit [Ping timeout: 245 seconds]
olle has quit [Read error: Connection reset by peer]
mbuf has joined #ocaml
<discocaml> <myrlhex> Is there a way to refer to the parent with `(include_subdirs qualified)`
<discocaml> <myrlhex> I'm making a compiler, and I wanted to put all the passes in one directory.
<discocaml> <myrlhex> Oh wait, it works now
<discocaml> <myrlhex> You can just use the full module name (the `X__Y` variant)
theblatte has joined #ocaml
tri has joined #ocaml
tri has quit [Ping timeout: 255 seconds]
theblatte has quit [Ping timeout: 260 seconds]
theblatte has joined #ocaml
boozec has joined #ocaml
boozec has quit [Quit: boozec]
santo has joined #ocaml
jabuxas has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
chiselfuse has quit [Ping timeout: 260 seconds]
chiselfuse has joined #ocaml
<discocaml> <fleabagwithouthumor> I'm new to OCaml and I find the suffix notation for constructors interesting, is there a reason behind this choice ? (e.g. `'a option` compared to `Maybe a` in Haskell)
<discocaml> <lukstafi> `'a option` is French for `Maybe a`
<discocaml> <fleabagwithouthumor> Is the reason behind it only because it's inria and they're French ?
<discocaml> <fleabagwithouthumor> I mean it's possible
<discocaml> <lukstafi> C also uses the backward syntax, e.g. `int *`.
jabuxas has quit [Ping timeout: 268 seconds]
<discocaml> <lukstafi> https://en.wikipedia.org/wiki/ML_(programming_language)#List_reverse shows the same syntax as OCaml
<discocaml> <lukstafi> So that falsifies my hypothesis...
<discocaml> <hockletock> I believe ML also uses places type variables in front
<discocaml> <lukstafi> I think the motivation comes from analogy with the function type.
chiselfuse has quit [Ping timeout: 260 seconds]
chiselfuse has joined #ocaml
<discocaml> <fleabagwithouthumor> as in `'a option` is `'a -> option` ?
<discocaml> <fleabagwithouthumor> I think that's actually a good way to read it, thanks
<discocaml> <limp.biskit> maybe also to differentiate between variants?
<discocaml> <fleabagwithouthumor> I have no idea how variants are defined, I think I've come far enough with what I know about haskell, time to RTFM !
<discocaml> <fleabagwithouthumor> I have no idea how variants are written, I think I've come far enough with what I know about haskell, time to RTFM !
tri has joined #ocaml
<discocaml> <deepspacejohn> I think it's also supposed to be similar to in English you would say "int list" to mean a list of ints
<Armael> yea, in fact in French "list int" is more natural than "int list"
<Armael> so I'd blame the ML tradition here
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
<discocaml> <limp.biskit> variants are written like `Some_variant <val>`, so i imagine if you could also have `some_type <typ>` it may be a bit less clear than it is now?
<discocaml> <limp.biskit> just a guess
<discocaml> <smondet> yes the ML tradition comes from english "conteinee container"
<discocaml> <smondet> 'int list' 'cigar box' 'shit hole'
<discocaml> <smondet> it's actually later, that haskell turned (some) containers into adverbs: Maybe, Either, ...
jabuxas has joined #ocaml
Tuplanolla has joined #ocaml
tri has quit [Remote host closed the connection]
<dh`> ocaml has four different argument syntaxes and there's no need for any of that, it's just far too late to change
<discocaml> <deepspacejohn> I vaguely remember seeing someone say that they teach students to just always use the GADT syntax for regular ADTs because apparently `:` is easier for them to remember than `of`? or something like that.
waleee has joined #ocaml
jabuxas has quit [Ping timeout: 255 seconds]
<discocaml> <contextfreebeer> is there a way to pass data to the top level parsing function in Menhir? I know you can functorize the grammar but I'm not sure if you can pass first class modules to a functor, and that sounds pretty hacky anyway as I only want to pass a record with some options from the command line
<discocaml> <contextfreebeer> if not it can be worked around in any case
<discocaml> <deepspacejohn> Not that I'm aware of. It may make sense to do another pass to apply options after parsing.
<discocaml> <contextfreebeer> yeah, that is what I'm going to do, I think that's a better approach anyway
<discocaml> <deepspacejohn> yeah, I think that's probably the better practice.
<dh`> you can make the start token return a function
<dh`> but that's probably gross
xd1le has joined #ocaml
mbuf has quit [Quit: Leaving]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
<discocaml> <stephanosf.> Has anyone tried running ocaml on virtualbox ? Had some issues with ocaml on windows (dont know how to get latest version after default DkML installation) and was thinking on switching to either dualboot or a virtual machine
<discocaml> <leviroth> I use ocaml on windows via WSL2, which I think is a fairly popular approach.
<discocaml> <27theo> why not WSL (window subsystem for linux)?
<discocaml> <stephanosf.> I also read through wsl2 but i was still confused on if you are able to use versions after 4.14.0 , i am trying to utilize the shared memory capabilities of the 5.0.0 release
<discocaml> <leviroth> Where does that table come from?
<discocaml> <stephanosf.> does wsl2 support later versions after 4.14.0 for you @therewolf ?
<discocaml> <leviroth> Yes
<discocaml> <leviroth> Tbh I don't understand what the stuff about tiers is
<discocaml> <stephanosf.> damn cause ive been using dkml and i couldnt get to versions after 4.14.0 , do you use vscode to right ocaml code though? ( i reade somewhere that its not yet compataible with the latest ocaml versions)
<discocaml> <stephanosf.> write*
rgrinberg has joined #ocaml
<discocaml> <regularspatula> the vscode works with latest ocaml versions
<discocaml> <stephanosf.> Alright ill give it a try , thanks guys
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
micro has quit [Ping timeout: 256 seconds]
micro has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
santo has quit [Quit: santo]
ocra8 has quit [Quit: WeeChat 4.2.2]
tri has joined #ocaml
tri has quit [Remote host closed the connection]
ocra8 has joined #ocaml
mima has quit [Ping timeout: 240 seconds]
zanetti has joined #ocaml
tri has joined #ocaml
tri has quit [Ping timeout: 260 seconds]
zanetti has quit [Quit: zanetti]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has quit [Quit: Leaving]
<discocaml> <limp.biskit> using 5.1 on wsl2 fine
<discocaml> <limp.biskit> wsl2 is just a linux vm, it supports any version you can run on linux
Serpent7776 has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml> <stephanosf.> Alright ill give it a try thank you @limp.biskit
<discocaml> <limp.biskit> will have to compile it with opam though, don’t know of any distros shipping ocaml 5 binaries
dnh has joined #ocaml
rgrinberg has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sroso has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tuplanolla has quit [Quit: Leaving.]
rgrinberg has joined #ocaml