companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
<discocaml> <darrenldl> neiluj: defining the corresponding let operators make error handling through result relatively painless, so i use it pervasively
Tuplanolla has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 276 seconds]
spip has quit [Quit: Konversation terminated!]
rf has quit [Quit: Leaving]
chrisz has quit [Ping timeout: 255 seconds]
chrisz has joined #ocaml
mbuf has joined #ocaml
waleee has quit [Ping timeout: 255 seconds]
azimut has quit [Ping timeout: 255 seconds]
trev has joined #ocaml
bgs has joined #ocaml
nlocalhost has joined #ocaml
Haudegen has joined #ocaml
bartholin has joined #ocaml
azimut has joined #ocaml
bartholin has quit [Quit: Leaving]
John_Ivan_ has joined #ocaml
John_Ivan has quit [Ping timeout: 276 seconds]
kakadu has joined #ocaml
olle has joined #ocaml
spip has joined #ocaml
<discocaml> <darrenldl> i got my mind blown learning about visitor pattern in oop
<discocaml> <psychokitty> "all this for structural recursion"
<discocaml> <darrenldl> precisely my thought
<discocaml> <darrenldl> i tried very hard to understand their perspective from a language with no ADT
<discocaml> <darrenldl>
<discocaml> <darrenldl> at the end it felt like a proof exercise about the "equivalence in expressiveness" more than anything else
<discocaml> <psychokitty> there's some cuteness to the visitor pattern, like you can strategize out various traversal methods, have a default visitor (permitting you to only overload parts you care about traversing), but, all in all, a coping strategy for languages without a true match construct
John_Ivan__ has joined #ocaml
John_Ivan_ has quit [Read error: Connection reset by peer]
<discocaml> <darrenldl> right now i'm entertaining the idea of a static go analyser capable of doing exhaustive "pattern matching" check, at least for a subset of go (plus some annotations maybe)
<discocaml> <darrenldl> if i have to use go in my career, i want to at least make it less painful
<discocaml> <psychokitty> my hope is to further avoid using languages I don't like in my career.. have had various success so far
<discocaml> <darrenldl> depends on where one resides i suppose. FP is definitely not a common theme in australian companies
<discocaml> <darrenldl> (well rust is sometimes around, in terms of langs having ADT, but rare cases)
<discocaml> <psychokitty> there's always remote work - I say this, yet, as it stands I've been too anxious to apply to remote work that uses OCaml
<discocaml> <darrenldl> i made one attempt at such application : v
Serpent7776 has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Serpent7776 has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
olle has quit [Ping timeout: 248 seconds]
olle has joined #ocaml
keyboard has joined #ocaml
rf has joined #ocaml
kakadu has quit [Read error: Connection reset by peer]
kakadu has joined #ocaml
Tuplanolla has joined #ocaml
<discocaml> <L1st.fold_left> Hey there, I was wondering if there was a way to declare a type with an infix constructor.
<discocaml> <L1st.fold_left> I know it is possible to do so with operators, and in the List module, 'a list is declared as ` [] | (::) of 'a * 'a list`
<discocaml> <L1st.fold_left> However, when I try to define a new type, Ocaml denies every infix constructor except (::), which means I would have no choice but to overwrite (::) (Which seems like an awful idea, let's not do that)
<discocaml> <Kali> (::) is the only one
<discocaml> <octachron> `(::)` is the only infix constructor.
<discocaml> <Kali> you could put it into its own module, so that it doesn't override the default
<discocaml> <L1st.fold_left> Okay :/
<discocaml> <L1st.fold_left> Oh nice
<discocaml> <Kali> you could put it into its own module, so that it doesn't override the default (except where you want it to)
keyboard has quit [Ping timeout: 276 seconds]
<discocaml> <deepspacejohn> Yes, there's nothing wrong with overriding `::` with your own definition. This is pretty useful to define custom list types (i.e. heterogeneous lists, non-empty lists, etc.)
<discocaml> <deepspacejohn> Of course, namespacing your definition in its own module is a good idea. But it's generally a good idea to separate types into modules anyway (especially if they would shadow existing constructors)
random-jellyfish has joined #ocaml
mbuf has quit [Quit: Leaving]
kakadu has quit [Remote host closed the connection]
Haudegen has quit [Quit: Bin weg.]
azimut has quit [Ping timeout: 255 seconds]
Serpent7776 has joined #ocaml
random-jellyfish has quit [Quit: Client closed]
keyboard has joined #ocaml
Serpent7776 has quit [Ping timeout: 248 seconds]
Haudegen has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
chrisz has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
rwmjones is now known as rwmjones|HOL
chrisz has joined #ocaml
alexherbo2 has joined #ocaml
olle has quit [Ping timeout: 276 seconds]
alexherbo2 has quit [Remote host closed the connection]
bartholin has joined #ocaml
Stumpfenstiel has joined #ocaml
azimut has joined #ocaml
keyboard has quit [Ping timeout: 268 seconds]
olle has joined #ocaml
trev has quit [Remote host closed the connection]
keyboard has joined #ocaml
Serpent7776 has joined #ocaml
olle has quit [Ping timeout: 255 seconds]
Serpent7776 has quit [Ping timeout: 276 seconds]
bartholin has quit [Quit: Leaving]
keyboard has quit [Ping timeout: 255 seconds]
bgs has quit [Remote host closed the connection]
Tuplanolla has quit [Quit: Leaving.]