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/
dnh has quit [Quit: Textual IRC Client: www.textualapp.com]
n8n has quit [Quit: WeeChat 4.2.2]
n8n has joined #ocaml
oriba has quit [Ping timeout: 256 seconds]
jabuxas has joined #ocaml
waleee has quit [Ping timeout: 256 seconds]
ansiwen has quit [Quit: ZNC 1.7.1 - https://znc.in]
ansiwen has joined #ocaml
jabuxas has quit [Ping timeout: 240 seconds]
tri has joined #ocaml
<discocaml> <mat23.55_33579> hello
mima has joined #ocaml
<discocaml> <tri4004> hi, does Ocaml support monad transformer first class as in Haskell? I know there is the monad library implementing monad transformer, but would people use it regularly, or they would avoid using it until really need it? Like I would imagine people using Haskell live and breathe in monad and monad transformer with do notation everywhere, is Ocaml the same in that aspect? I mean last I check, there is no native equivalent of Haskell do-notation
<discocaml> <tri4004>
<discocaml> <tri4004> The reason I ask is, I come from F#, and F# doesn't natively support monad and monad transformer natively like Haskell. There is computation expression in F#, which is the do-notation version of Haskell, but it's only implemented for the async monad out of the box, implementation for other monads like Option and Result (Maybe and Either equivalent in Haskell) are left to 3rd party libraries. So F# is indirectly saying "it's doable, but we'd di
<discocaml> <tri4004> So, with F# being the implementation of Ocaml on .NET, does Ocaml take the same stance? That is, Ocaml doesn't dive deep into functional concept like Haskell, but these monads are there if people need it, like in F#. Or it's just F# deliberately dumb things down?
<discocaml> <tri4004>
<discocaml> <tri4004> I'm asking because I strive to write F# as Haskell as much as I could, with lots of monad and monad transformer, and try to avoid OOP and mutation as much as possible, but sometimes i think I'm being too idealistic trying to replicate Haskell in F#. And the best way to answer my question is to confirm if Ocaml also shy away from these monad concepts like F# or not, because I consider Ocaml to be a true functional language which F# derives from
<dh`> what is your goal in chasing after monad transformers?
<dh`> do you have a use case, or are you seeking ideological compliance?
tri has quit [Remote host closed the connection]
tri has joined #ocaml
tri has quit [Ping timeout: 256 seconds]
tri has joined #ocaml
tri has quit [Ping timeout: 246 seconds]
mbuf has joined #ocaml
rgrinberg has joined #ocaml
Serpent7776 has joined #ocaml
olle has joined #ocaml
tri has joined #ocaml
tri has quit [Ping timeout: 268 seconds]
Serpent7776 has quit [Quit: leaving]
tri has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tri has quit [Ping timeout: 252 seconds]
tri has joined #ocaml
<discocaml> <limp.biskit> ocaml probably is a “lighter version of FP”. ocaml is multi paradigm and haskell is confusing
<olle> I'm against the notion that only "pure" fp is "true" fp ^^'
<discocaml> <limp.biskit> ocaml has side effects, OOP and enough imperative features that make “purity” not worth worrying about imo as long as you can still write idiomatic functional code
<discocaml> <limp.biskit> there is this though - https://github.com/Denommus/monadic
<discocaml> <limp.biskit> i’ve never used monad transformers so idk how it compares
tri has quit [Ping timeout: 256 seconds]
tri has joined #ocaml
bartholin has joined #ocaml
troydm has joined #ocaml
troydm has quit [Client Quit]
troydm has joined #ocaml
tri has quit [Ping timeout: 268 seconds]
<discocaml> <contextfreebeer> Typed algebraic effects will probably make use of monads to manage effectful computation even less relevant, but I think the main reason OCaml doesn't use monads as heavily as Haskell is probably lack of typeclasses
tri has joined #ocaml
tri has quit [Ping timeout: 252 seconds]
tri has joined #ocaml
tri has quit [Ping timeout: 264 seconds]
dnh has joined #ocaml
gdd has quit [Ping timeout: 252 seconds]
tri has joined #ocaml
tri has quit [Ping timeout: 240 seconds]
tri has joined #ocaml
tri has quit [Remote host closed the connection]
tri has joined #ocaml
jabuxas has joined #ocaml
<discocaml> <limp.biskit> has anybody got an example of real world effects use outside of schedulers
<companion_cube> tbh effects were added to multicore _for_ schedulers…
<discocaml> <limp.biskit> i know lol, just curious
<companion_cube> in theory you can also use them for inversion of control
<companion_cube> write a `iter` function (e.g. on a complex tree type)
<companion_cube> get a sequence/generator out of it
<discocaml> <limp.biskit> i've seen instances in my own code where they may be useful, but only in situations where i have a lot of code all of which can be genericised
waleee has joined #ocaml
<discocaml> <limp.biskit> anybody using ppx_yojson_conv? ppx_deriving_yojson's readme recommends switching, but i can't get on with it
<discocaml> <limp.biskit> is there any real advantage
<discocaml> <deepspacejohn> I've experimented with using effects to manage state. It seemed to work well although I only used it for a small project. it was a lot nicer than passing around a state value in each function, and I didn't need to use any mutation/global state.
olle has quit [Ping timeout: 268 seconds]
<discocaml> <regularspatula> ive used the ppx_yojson_conv...works fine--though i get the impression that you don't need to switch old projects over necessarily
<discocaml> <limp.biskit> yeahh
tri has quit [Remote host closed the connection]
<discocaml> <purefunctor> Fromy my experience (migrating from PureScript), transformers aren't _really_ used in OCaml--there's monadic binding syntax but it's really only used in specific contexts (I've personally used it most w/ `Option`/`Lwt.t`), not as entire abstractions for the application
tri has joined #ocaml
Anarchos has joined #ocaml
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
tri has quit [Remote host closed the connection]
tri has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
rgrinberg has joined #ocaml
jabuxas has quit [Ping timeout: 256 seconds]
tri_ has joined #ocaml
tri has quit [Ping timeout: 264 seconds]
mbuf has quit [Quit: Leaving]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tremon has joined #ocaml
rgrinberg has joined #ocaml
Anarchos has quit [Ping timeout: 252 seconds]
Tuplanolla has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tremon has quit [Quit: getting boxed in]
szkl has joined #ocaml
Fardale has quit [Ping timeout: 260 seconds]
prgbln has quit [Ping timeout: 260 seconds]
prgbln has joined #ocaml
rom1504 has quit [Ping timeout: 256 seconds]
Fardale has joined #ocaml
Johann has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
rom1504 has joined #ocaml
Johann has joined #ocaml
tri_ has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chiselfuse has quit [Read error: Connection reset by peer]
chiselfuse has joined #ocaml
bartholin has quit [Quit: Leaving]
Tuplanolla has quit [Quit: Leaving.]
tri has joined #ocaml
<discocaml> <limp.biskit> are there any database libraries for miou yet?
mima has quit [Ping timeout: 260 seconds]
tri has quit [Remote host closed the connection]