<companion_cube>
you can keep some parts of the stdlib, too
<companion_cube>
I suggest Str, Digest, Bufferβ¦
YuGiOhJCJ has joined #ocaml
hsw has joined #ocaml
neuroevolutus has joined #ocaml
toastal has joined #ocaml
neuroevolutus has quit [Ping timeout: 256 seconds]
raskol has quit [Ping timeout: 276 seconds]
gdiazlo has quit [Ping timeout: 272 seconds]
neuroevolutus has joined #ocaml
neuroevolutus has quit [Client Quit]
gdiazlo has joined #ocaml
gdiazlo has quit [Ping timeout: 244 seconds]
gdiazlo has joined #ocaml
<discocaml>
<lukstafi> Ctypes is very actively developed, as the author maintainer points out it had a release 3 weeks ago.
tomku has quit [Remote host closed the connection]
tomku has joined #ocaml
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml>
<emiletrotignon> You have the same thing with `true` and `false` which I think they could have went with `False` and `True` to fit with the rest of the syntax. You can actually do
<discocaml>
<emiletrotignon> ```ocaml
<discocaml>
<emiletrotignon> type 'a list = true of 'a * 'a list | false
<discocaml>
<emiletrotignon> ```
<discocaml>
<emiletrotignon> You have the same thing with `true` and `false` which I think is weirder, they could have went with `False` and `True` to fit with the rest of the syntax. You can actually do
<discocaml>
<emiletrotignon> ```ocaml
<discocaml>
<emiletrotignon> type 'a list = true of 'a * 'a list | false
<discocaml>
<emiletrotignon> ```
bartholin has quit [Quit: Leaving]
keyboard has quit [Quit: keyboard]
keyboard has joined #ocaml
<reynir>
If I have a type supported_hashes = [ `MD5 | `SHA512 ] how can I assert that supported_hashes is included in Digestif.hash' ? If I write type supported_hashes = [< Digestif.hash' > `MD5 `SHA512 ] I get complaints about the 'a type variable
toastal has quit [Ping timeout: 252 seconds]
<octachron>
You can have the assertion as a function `let f (x:supported_hashes) = (x:>Digestif.hash')`
<octachron>
you could write your initial example as `type supported_hashes = private [< Digestif.hash' > `MD5 `SHA512]` but this means that supported hashes is some unknown set of variant between Digestif.hases and [`MD5|`SHA512]
emp has quit [Ping timeout: 264 seconds]
emp has joined #ocaml
YuGiOhJCJ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #ocaml
<reynir>
interesting
<reynir>
let _ (x : supported_hashes) = (x:>Digestif.hash') is a syntax error >:(
gdiazlo has quit [Ping timeout: 272 seconds]
pi3ce_ has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
raskol has joined #ocaml
gdiazlo has joined #ocaml
gdiazlo has quit [Ping timeout: 252 seconds]
gdiazlo has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Quit: WeeChat 4.1.1]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Inline has joined #ocaml
Inline has quit [Quit: Leaving]
Inline has joined #ocaml
bibi_ has quit [Remote host closed the connection]
bibi_ has joined #ocaml
<discocaml>
<luck33> What is the process for finding "standard" packages for X? Coming from Rust, there's definitely a lot of "best in class" libraries. The Rust cookbook has strong recommendations.
<discocaml>
<luck33> Who could've foreseen the analogue to "<language> cookbook" for OCaml would also be "OCaml cookbook"?
<discocaml>
<luck33> @yawaramin : thank you π
euphores has joined #ocaml
<discocaml>
<luck33> Okay, I won't lie the cookbook in its current state is ***extremely*** bare.
<discocaml>
<contificate> be the change you want to see π
raskol has quit [Quit: Lost terminal]
Inline has quit [Quit: Leaving]
<discocaml>
<luck33> this would be a textbook case of the blind leading the blind π
<discocaml>
<luck33> i think in a month i'll feel more confident to try my hand π
<discocaml>
<luck33> I think in a month I'll feel more confident to try my hand π
gdiazlo has quit [Ping timeout: 252 seconds]
gdiazlo has joined #ocaml
neuroevolutus has joined #ocaml
gdiazlo has quit [Ping timeout: 265 seconds]
gdiazlo has joined #ocaml
<discocaml>
<yawaramin> there's also awesome-ocaml and the Ocamlverse wiki
pi3ce has quit [Ping timeout: 246 seconds]
<discocaml>
<nsmmrs> You will probably have decent luck if you take examples from a published cookbook for a different language, and ask an LLM to translate the example to OCaml.
<discocaml>
<nsmmrs>
<discocaml>
<nsmmrs> Alternatively, there is Rosetta Code, where you can compare lots of examples of "language you know" with OCaml.
<discocaml>
<nsmmrs> The LLM strategy will probably work best if your input code is also a statically typed language (doesn't necessarily have to be one you know).
alexherbo2 has joined #ocaml
bartholin has quit [Quit: Leaving]
gdiazlo has quit [Ping timeout: 255 seconds]
neuroevolutus has quit [Quit: Client closed]
neuroevolutus has joined #ocaml
Exa has quit [Ping timeout: 252 seconds]
Exa has joined #ocaml
neuroevolutus has quit [Ping timeout: 256 seconds]