companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
mclovin has quit [Ping timeout: 260 seconds]
OCamlPro[m] has quit [Ping timeout: 252 seconds]
h11 has quit [Ping timeout: 256 seconds]
CodeBitCookie[m] has quit [Ping timeout: 248 seconds]
neitsch[m] has quit [Ping timeout: 260 seconds]
saltrocklamp[m] has quit [Ping timeout: 260 seconds]
xgqt has quit [Ping timeout: 246 seconds]
xgqt has joined #ocaml
sagax has quit [Remote host closed the connection]
vicfred has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dextaa49 has quit [Remote host closed the connection]
mclovin has joined #ocaml
OCamlPro[m] has joined #ocaml
sagax has joined #ocaml
CodeBitCookie[m] has joined #ocaml
h11 has joined #ocaml
OCamlPro[m] has quit [Ping timeout: 240 seconds]
mclovin has quit [Ping timeout: 250 seconds]
neitsch[m] has joined #ocaml
saltrocklamp[m] has joined #ocaml
OCamlPro[m] has joined #ocaml
mclovin has joined #ocaml
chrisz has quit [Ping timeout: 260 seconds]
chrisz has joined #ocaml
spip has quit [Ping timeout: 240 seconds]
bobo has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
waleee has quit [Ping timeout: 248 seconds]
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
<d_bot> <Asimov-IV> I resolved the issue with Kate not working with ocamllsp when opened via start menu.
<d_bot> <Asimov-IV> - I created a file named `path.sh` in the folder `~/.config/plasma-workspace/env`
<d_bot> <Asimov-IV> - add the path to ocamllsp to the file `path.sh`. E.g. `export PATH=$HOME/.opam/default/bin:$PATH`
<d_bot> <Asimov-IV> - add the line `source $HOME/.config/plasma-workspace/env/path.sh` to the bottom of my `.zshrc` file
<d_bot> <Asimov-IV> - save the files and restart
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
kotrcka has joined #ocaml
kotrcka has quit [Remote host closed the connection]
kaph has quit [Ping timeout: 240 seconds]
birdgoose has quit [Quit: Leaving]
Haudegen has joined #ocaml
jpds has quit [Remote host closed the connection]
jpds has joined #ocaml
gravicappa has joined #ocaml
adanwan_ has joined #ocaml
adanwan has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ocaml
andreypopp has quit [Ping timeout: 256 seconds]
andreypopp has joined #ocaml
dextaa490 has joined #ocaml
gravicappa has quit [Ping timeout: 256 seconds]
gravicappa has joined #ocaml
dextaa490 has quit [Remote host closed the connection]
aspe has joined #ocaml
<hyphen> @NULL: I actually gave this feature we discussed a try this morning, with a bunch of languages that offer pattern-matching and exhaustivity checks besides OCaml: Rust, Scala, SML#, F#, Haskell, Idris, and Coq. Of which only Haskell realized the impossibility of the previously matched case to appear in the rest of the branches' bodies. Interestingly I couldn't find talk about this feature anywhere, neither
<hyphen> its name nor a reference for how it works.
<hyphen> for reference, the code I tried was: `let extract x = match x with None -> 0 | _ -> match x with Some y -> y`
<hyphen> or whatever the equivalent is in the respective language
olle has joined #ocaml
azimut_ has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
<hyphen> tried once with removing the top none case, with haskell, to double-check that the language actually reports exhaustiveness errors xD
<hyphen> but yes I had -Wall -Wextra on, it does
<hyphen> Tried these languages with a friend after mentioning the hypothetical feature. They were the one who discovered Haskell could do it
<octachron> Are you sure that you are not seeing a cache issue? `ghc -Wall` warn about non-exhaustiveness for me on your example.
<octachron> (on GHC 8.8.4)
<hyphen> oh we tried on (godbolt's) 9.2
dhil has joined #ocaml
<hyphen> i guess it may have been a recent development then?
<hyphen> I'll look further, maybe compiler release notes will reveal bg info on the feature
<octachron> It looks like the extension described in the lower your guard paper has been implemented. It is not clear to me if it covers more than toplevel functions.
<hyphen> bingo, Lower Your Guards
<hyphen> > It is not clear to me if it covers more than toplevel functions.
<hyphen> that is an interesting question
<octachron> Beware that the LYG published paper still has erroneous OCaml examples.
<hyphen> I havent read it still, trying stuff with the compiler
bartholin has joined #ocaml
<hyphen> So far I managed to make it break down with lambdas
<hyphen> but case-expressions inside function bodies are fair game
<hyphen> they too get the lyg treatment
<hyphen> so it's not just toplevel functions
<hyphen> case-exprs and functions introduced by let/where bindings
amk has quit [Ping timeout: 256 seconds]
amk has joined #ocaml
<hyphen> octachron: i guess you're talking about section 4.07 in the paper. it sucks that they used an older compiler and abstract (instead of empty) types.
<hyphen> s/section 4.07/section 7.4/
<hyphen> haha
<hyphen> `type void;;` isn't void, and `void option` can have `Some x` values. it's correct to warn
<hyphen> it's especially lame considering that same compiler version is the one introducing empty variants
<hyphen> and that by the time of the paper it was 3 years old
<hyphen> and that there were ways to construct empty types before that.. ok that was really sloppy mistake of them
azimut has quit [Ping timeout: 240 seconds]
aspe has quit [Quit: aspe]
kaph has joined #ocaml
olle has quit [Quit: Lost terminal]
olle has joined #ocaml
mro has joined #ocaml
<gopiandcode> that example in section 2.1
<gopiandcode> ugh, haskell syntax sucks - patterns and guards occur in interchangable places
<olle> :d
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
Haudegen has quit [Quit: Bin weg.]
kaph has quit [Read error: Connection reset by peer]
kaph_ has joined #ocaml
<octachron> Section 7.5 : `type t = MkT of t` is inhabited by `let rec x = MkT x` in OCaml.
szkl has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<hyphen> yea same goes for idris and haskell, idk what point they were trying to make there
<hyphen> i guess that checking for inhabitants in presence of cyclic types is hard(?)
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
Haudegen has joined #ocaml
<d_bot> <joris> I am still totally confused on how we are supposed to document a unwrapped lib. Like where to put general description comment ?
<companion_cube> foo_lib.mld maybe? idk
<d_bot> <joris> Yeah but .mld is annoying because then you cannot generate module listings you need to provide link manually
<companion_cube> yep
<companion_cube> 🤷 it's not great
<companion_cube> I guess few people still use unwrapped libraries
<d_bot> <joris> sorry, i mean, wrapped actually typo.
<d_bot> <joris> same issue actually
spip has joined #ocaml
bobo has quit [Ping timeout: 246 seconds]
vicfred has quit [Quit: Leaving]
mro has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
Tuplanolla has joined #ocaml
mro has joined #ocaml
dextaa490 has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Guest40 has joined #ocaml
Guest40 has quit [Client Quit]
Guest40 has joined #ocaml
<Guest40> hello
Everything has joined #ocaml
<Guest40> i assume this is the right place for ocaml-related discussion? sorry i am new to IRC
<mclovin> it is !
<Guest40> great, good to know i haven't gotten lost
<Guest40> is this also the place for opam?
<mclovin> yep
<Guest40> perfect, this technology works wonders, thanks for the pointers so far. will cut right to the chase here: currently i have been using ocaml/opam with cygwin on windows. the opam website mentions full windows support for opam 2.2 and to reach out if one would like to help. not sure if this is the right place to reach out, but native windows opam
<Guest40> would be very amazing and i'd love to help out in any way i could (and, in general, just get further involved with ocaml community). where do i begin?
mro has quit [Remote host closed the connection]
vicfred has joined #ocaml
troydm1 has joined #ocaml
troydm has quit [Ping timeout: 276 seconds]
troydm1 has quit [Ping timeout: 256 seconds]
waleee has joined #ocaml
<zozozo> Guest40: you can probably take a look at the opam GitHub repository and look at the issues related to windows ?
xgqt has quit [Ping timeout: 240 seconds]
xgqt has joined #ocaml
Haudegen has joined #ocaml
Everything has left #ocaml [#ocaml]
olle has quit [Ping timeout: 240 seconds]
mbuf has quit [Quit: Leaving]
hyphen has quit [Ping timeout: 248 seconds]
hyphen has joined #ocaml
mro has joined #ocaml
<Guest40> zozozo: thank you for the tip! I'll check out what's there.
mro has quit [Remote host closed the connection]
hyphen has quit [Ping timeout: 260 seconds]
hyphen has joined #ocaml
Guest40 has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
dextaa490 has quit [Quit: The Lounge - https://thelounge.chat]
Guest40 has joined #ocaml
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
olle has joined #ocaml
mro has quit [Remote host closed the connection]
Guest40 has quit [Quit: Client closed]
troydm has joined #ocaml
Guest40 has joined #ocaml
mro has joined #ocaml
azimut has joined #ocaml
Guest40 has quit [Quit: Ping timeout (120 seconds)]
hyphen has quit [Ping timeout: 240 seconds]
hyphen has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
hyphen has quit [Ping timeout: 252 seconds]
hyphen has joined #ocaml
mro has quit [Ping timeout: 246 seconds]
<d_bot> <Et7f3 (@me on reply)> Welcome. We have also discord server with more room/subjects.
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
<d_bot> <rgrinberg> why do you need .mld files to document libraries? you should write the docs in your .mli files.
<d_bot> <rgrinberg> .mld is mostly for adding package/executable level docs
<companion_cube> my guess is that, you don't have to write a eponymous module for a wrapped library with many modules
<companion_cube> UNLESS you want to document the darn thing
<companion_cube> it'd be nice to have a .mld with the ability to list all modules instead of listing modules in a .ml by hand just so you can document the library AND list the modules
gravicappa has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest40 has joined #ocaml
rgrinberg has joined #ocaml
spip has quit [Ping timeout: 260 seconds]
<d_bot> <joris> @rgrinberg i do need mld technically but where do you write the lib overview in mli? If your lib has 10 modules a user will land on the module list and will be totally lost some of the module are super advanced
<d_bot> <joris> And you cannot write an overview unless you use a ml file with the lib name with manual module alias or what am missing?
<d_bot> <joris> Basically what @companion_cube said.
<d_bot> <joris> dune/odoc will generate a module listing for a lib, with nothing else. You can document a package, but it is higher level
<d_bot> <joris> to give an example, i have a package to interact with a db. It contains several libs, one for DDL, a ppx to write queries, some tooling to send queries, a cli exe, a batch job library. I can document the package to point to evrything, which makes sense to do manually
<d_bot> <joris> but then the core lib has some tooling to send query, some tooling to describe query, some tooling to handle write, etc
<d_bot> <joris> if you go to odoc page you get basically a module list which is very terse
<d_bot> <joris> but what i want is to dump a big doc to say "hey this lib is about interacting with db, if you want to write, you can use this, if you want to contact the db, go to this module, setup the client like this, if you want to describe data, check this". Basically a guide
<d_bot> <joris> i don't know how to do that
Guest40 has quit [Ping timeout: 252 seconds]
tiferrei has quit [Ping timeout: 240 seconds]
tiferrei has joined #ocaml
zebrag has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aspe has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
Serpent7776 has quit [Quit: leaving]
spip has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
aspe has quit [Quit: aspe]