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/
ns12 has quit [Read error: Connection reset by peer]
ns12 has joined #ocaml
ocabot has quit [Ping timeout: 264 seconds]
ocabot has joined #ocaml
gdr3941 has quit [Ping timeout: 268 seconds]
mima has quit [Ping timeout: 268 seconds]
waleee has quit [Ping timeout: 260 seconds]
szkl has quit [Quit: Connection closed for inactivity]
<discocaml> <struktured> companion_cube: got it working but the only difference between then and now is I didn't use the bistro command and instead invoked each step separately.
<companion_cube> only way I use it
<discocaml> <struktured> good call on that, it's not like it's a big deal to run 4 or 5 commands
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
Square2 has joined #ocaml
Serpent7776 has joined #ocaml
azimut has joined #ocaml
bartholin has joined #ocaml
olle has joined #ocaml
Square2 has quit [Remote host closed the connection]
Square2 has joined #ocaml
mima has joined #ocaml
bartholin has quit [Quit: Leaving]
ohperitel has quit [Quit: ZNC 1.8.2 - https://znc.in]
ohperitel has joined #ocaml
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
bibi_ has joined #ocaml
patrick has quit [Changing host]
patrick__ has joined #ocaml
waleee has joined #ocaml
hannes has quit [Read error: Connection reset by peer]
hannes has joined #ocaml
waleee has quit [Ping timeout: 264 seconds]
olle has quit [Remote host closed the connection]
waleee has joined #ocaml
hannes has quit [Read error: Connection reset by peer]
hannes has joined #ocaml
hannes has quit [Read error: Connection reset by peer]
hannes has joined #ocaml
hannes has quit [Read error: Connection reset by peer]
alexherbo2 has joined #ocaml
bibi_ has quit [Ping timeout: 260 seconds]
hannes has joined #ocaml
hannes has quit [Read error: Connection reset by peer]
hannes has joined #ocaml
darchitect has joined #ocaml
<darchitect> hey guys, I have programmed a tiny bit in OCaml before (mainly doing leetcode problems) and want to learn the language properly, but I saw that OCaml 5 was released recently and was wondering whether anyone here knows some books for a beginner to get started which also cover ocaml 5. I have seen real world ocaml, but I don't know which parts are still relevant ?
<octachron> The "only" difference between OCaml 5 and OCaml 4 are the support for shared memory parallelism and algebraic effects. So only new features, and too recent to have completely displaced any pre-existing libraries yet.
_whitelogger has joined #ocaml
a51 has quit [Quit: WeeChat 4.2.1]
a51 has joined #ocaml
<octachron> In other words, outside of those new features, you can pick any documentation for OCaml 4 and will still apply to OCaml 5.
<discocaml> <lukstafi> https://ocaml.org/docs gives a great overview. Depending on your learning style, the manual https://v2.ocaml.org/releases/5.1/htmlman/index.html might be for you, it combines tutorial parts with dry / formal / completeness parts.
<darchitect> thanks, I guess I will stick with the real world ocaml book
<darchitect> for the time being
<darchitect> there is a chapter on Async, do you think I should skip that and find other sources ?
<octachron> Potentially, but the replacement for Async/lwt is still very much in flux
pi3ce has quit [Quit: No Ping reply in 180 seconds.]
pi3ce has joined #ocaml
mima has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
neiluj has joined #ocaml
Anarchos has joined #ocaml
bibi_ has joined #ocaml
Square2 has quit [Ping timeout: 260 seconds]
mima has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
waleee has quit [Ping timeout: 276 seconds]
omegatron has joined #ocaml
<discocaml> <diligentclerk> Can you denote the Cartesian product of types `'a, 'b` by `('a, 'b)`
<discocaml> <octachron> No, at the type level the product is `'a * 'b`.
<discocaml> <octachron> (In OCaml at least)
<discocaml> <diligentclerk> I am reading someone's module signature and they write
<discocaml> <diligentclerk> ```ocaml
<discocaml> <diligentclerk>
<discocaml> <diligentclerk> (** Entry point: two *)
<discocaml> <diligentclerk> val two: Context.t -> int32 -> int32 -> (int32, int32)
<discocaml> <diligentclerk>
<discocaml> <diligentclerk> ```
<discocaml> <diligentclerk> Is this valid syntax?
<discocaml> <diligentclerk> Or are they mixing it up with another language
<discocaml> <octachron> this is not a valid vanilla syntax
<discocaml> <diligentclerk> My IDE gives me an error when i try to load it and Dune spits out ugly garbage.
<discocaml> <diligentclerk> Ok. This code was generated automatically / procedurally so somebody probably just forgot the syntax for product types when writing the code generator.
<discocaml> <diligentclerk> i'll file a bug report with the code generator.
<discocaml> <Ada> i've been using `Result.bind` a lot for unrecoverable errors where i dont want to mix results and exceptions and i feel like in some places it is making my code very ugly
Exagone313 has joined #ocaml
Exa has quit [Ping timeout: 252 seconds]
Exagone313 is now known as Exa
alexherbo2 has quit [Ping timeout: 250 seconds]
<discocaml> <deepspacejohn> using binding operators (e.g. `let (let*) = Result.bind`) can help it look prettier
darchitect has quit [Quit: WeeChat 3.8]
alexherbo2 has joined #ocaml
neiluj has quit [Quit: neiluj]
<discocaml> <Ada> oh cool, i've used bindings extensively with lwt but didn't put two and two together
Tuplanolla has joined #ocaml
<discocaml> <deepspacejohn> They can be used for any function with a compatible signature
bartholin has joined #ocaml
pi3ce has quit [Ping timeout: 240 seconds]
pi3ce has joined #ocaml
mima has quit [Remote host closed the connection]
neiluj has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
szkl has joined #ocaml
neiluj has quit [Quit: neiluj]
waleee has joined #ocaml
<discocaml> <leostera> hey folks, how do you define a dependency between a dune library and a melange.emit stanza? I'd like to always carry around the generated .js with the library
waleee has quit [Quit: updating stuff]
waleee has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Client Quit]
azimut has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
lobo has quit [Quit: -all]
bartholin has quit [Quit: Leaving]
lobo has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away, and yet it always breaks free.]
<discocaml> <leostera> ended up using a mix of rule+action+ocaml-crunch to pack the js into the executable
<discocaml> <leostera> but thanks @andreypopp this was useful to arrive to something that worked for me! 🙏🏼
<companion_cube> in tiny_httpd I have a little asset packer for these use cases
<companion_cube> and then a rule like this: <https://paste.isomorphis.me/s3Q>
Serpent7776 has quit [Ping timeout: 256 seconds]
<discocaml> <leostera> cool! yes that's more or less what i did
<discocaml> <leostera> just call ocaml-crunch insteaad
<discocaml> <leostera> just call ocaml-crunch instead
<discocaml> <leostera> i'd love to hear from other folks on how thye're packaging their releases when they have several assets and config files (potentially that need to be outisde the app to allow users to configure them)
hannes has quit [Ping timeout: 260 seconds]