<d_bot>
<Ambika E.> start the process that goes endlessly without binding (just usual `let process = ...`), then at the very end of my executable i do `let%lwt process` to bind it so that the application keeps running
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
<greenbagels>
that works? `let%lwt process`?
<d_bot>
<Ambika E.> yeah
<d_bot>
<Ambika E.> it's the same as
<d_bot>
<Ambika E.> `let%lwt process = process`
<greenbagels>
i see
<greenbagels>
is that a property of all let bindings, or just the lwt binding syntax?
<greenbagels>
the lwt binding ppx syntax, i mean
<d_bot>
<Ambika E.> It works for any let binding i think, it's relatively new as a feature though iirc
<d_bot>
<Ambika E.> Ive used it for my own let extensions like let*
azimut has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
jpds has quit [Ping timeout: 240 seconds]
jpds has joined #ocaml
mjs22 has quit [Quit: Leaving...]
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
gravicappa has joined #ocaml
chrisz has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
hyphen has quit [Ping timeout: 244 seconds]
hyphen has joined #ocaml
aspe has joined #ocaml
aspe has quit [Quit: aspe]
aspe has joined #ocaml
Haudegen has joined #ocaml
aspe has quit [Client Quit]
aspe has joined #ocaml
gravicappa has quit [Ping timeout: 246 seconds]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot>
<NULL> It works for all let operators but the usual let
bartholin has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
Serpent7776 has joined #ocaml
kakadu has quit [Remote host closed the connection]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
bartholin has quit [Ping timeout: 246 seconds]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
bartholin has joined #ocaml
mro has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bobo has quit [Ping timeout: 240 seconds]
bobo has joined #ocaml
kakadu has quit [Ping timeout: 240 seconds]
olle has joined #ocaml
tiferrei has quit [Ping timeout: 240 seconds]
tiferrei2000 has joined #ocaml
spip has joined #ocaml
tiferrei2000 has quit [Remote host closed the connection]
bobo has quit [Ping timeout: 272 seconds]
tiferrei has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
mro has quit [Ping timeout: 260 seconds]
Serpent7776 has quit [Read error: Connection reset by peer]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
gravicappa has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
x88x88x has joined #ocaml
<olle>
Does anyone know that the state of ReasonML now when they split into ReScript too?
<olle>
-that
<d_bot>
<orbitz> greenbagels it's called let punning i believe
<d_bot>
<VPhantom> My understanding is that ReasonML is fairly stable and "maintenance-only". The latest release is from this year so it's definitely not dead, but Facebook's done pushing it.
mima has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 246 seconds]
bartholin has joined #ocaml
aspe has quit [Quit: aspe]
aspe has joined #ocaml
waleee has joined #ocaml
rgrinberg has joined #ocaml
<olle>
VPhantom, yeah, that's what they told me on their discord
<olle>
It's following OCaml releases, but nothing else
<olle>
Guess I'll give ReScript a go, and then we'll see :))
mro has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
aspe has quit [Quit: aspe]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
TheLemonMan has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
motherfsck has quit [Ping timeout: 260 seconds]
zebrag has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
waleee has quit [Quit: WeeChat 3.5]
bartholin has quit [Ping timeout: 276 seconds]
tizoc has joined #ocaml
waleee has joined #ocaml
wingsorc has quit [Ping timeout: 272 seconds]
bartholin has joined #ocaml
Everything has joined #ocaml
chrisz has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot>
<Alistair> Anyone got `why3 ide` working with WSL2?
<d_bot>
<NULL> Can you even get UIs working with WSL 2 ?
<d_bot>
<Alistair> According to microsoft, yes
<d_bot>
<NULL> Did you try one that is already installed ? (Is glxgears installed by default ?)
chrisz has joined #ocaml
kakadu has quit [Remote host closed the connection]
tiferrei has quit [Ping timeout: 240 seconds]
tiferrei has joined #ocaml
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
<d_bot>
<VPhantom> olle: ReScript is for a very different purpose though. You can't compile to binary with it (or technically: won't be able to soon) as it solely focuses on JavaScript output. It also doesn't have let bindings and other aspects of OCaml deemed too sophisticated for its purpose (roughly, to do better than TypeScript at being a to-JS alternative for front-end developers).
bartholin has joined #ocaml
hyphen has quit [Ping timeout: 246 seconds]
hyphen has joined #ocaml
pfharlock has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 272 seconds]
pfharlock has joined #ocaml
hyphen has quit [Ping timeout: 276 seconds]
hyphen has joined #ocaml
hyphen has quit [Ping timeout: 244 seconds]
hyphen 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]
TheLemonMan has quit [Quit: Lost terminal]
bartholin has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
hyphen has quit [Ping timeout: 256 seconds]
hyphen has joined #ocaml
hyphen has quit [Ping timeout: 240 seconds]
hyphen has joined #ocaml
<olle>
VPhantom, no let-bindings what?
<olle>
What does that mean?
<olle>
let* and let% ?
<d_bot>
<NULL> Maybe custom let-bindings
<d_bot>
<NULL> So those yes
<olle>
NULL would make more sense :) Since everything is a let-binding ^^'
<olle>
Yeah, not sure you could readably compile let* etc to async/await in JS
<olle>
But you could make promises out of it, maybe
<olle>
Will, if I career-wise wanna switch from backend/php to frontend, I might as well try an ocaml dialect :D
hyphen has quit [Ping timeout: 260 seconds]
mro has joined #ocaml
hyphen has joined #ocaml
<greenbagels>
@orbitz, thanks for the fact
Everything has left #ocaml [#ocaml]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ocaml
gravicappa has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
Sankalp has quit [Ping timeout: 276 seconds]
Sankalp has joined #ocaml
bartholin has quit [Quit: Leaving]
Serpent7776 has quit [Quit: leaving]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bobo has joined #ocaml
spip has quit [Ping timeout: 244 seconds]
<greenbagels>
if i have a record with "stateful" fields (say like input/output channels) and i make a new record and try to copy them to the new object
<greenbagels>
say like `let new_record = {old_record with random_field = 12}`
<greenbagels>
how would these "stateful" fields... behave?
<d_bot>
<leviroth> Just a new reference to the same OCaml value
Tuplanolla has quit [Quit: Leaving.]
<d_bot>
<leviroth> Not much different from when you bind the same (e.g.) out-channel to two variable names, I guess
<greenbagels>
is the lifetime of these values guaranteed as long as there are references to these values?
<d_bot>
<NULL> This is not C, stuff is only deallocated when they become unneeded
<d_bot>
<NULL> ("when", not "as")
<greenbagels>
yeah i think my C-based intuition is making it hard for me to reason about the language, heh
<d_bot>
<NULL> This is GCd language vs not, in this regard C is in the minority
<greenbagels>
ah yeah i forgot OCaml has GC
mro has quit [Quit: Leaving...]
<greenbagels>
so this makes me curious; in C++, std::shared_ptr is a way to share ownership of some heap-allocated object in such a way that when the last shared_ptr linked to the object is destroyed, the allocated memory is freed
<greenbagels>
and it does this by internally keeping reference counts tracked in yet another piece of memory
<d_bot>
<NULL> That's called "reference counting"
<greenbagels>
right, so does ocaml do something similar during garbage collection? mark everything with a zero refcount as "freeable"?
<brettgilio>
I've never used the `dune utop` functionality. When I try to run `dune utop .` it is saying that the utop library is missing, but I definitely have utop installed on this switch and the switch is loaded
<brettgilio>
oh
<brettgilio>
actually I guess it wasnt
<brettgilio>
it works
<brettgilio>
nvm
<d_bot>
<NULL> No, OCaml does something different
<brettgilio>
😊
<d_bot>
<NULL> Its heap is split in two; when it becomes full it copies all known live values to the other half
<d_bot>
<NULL> It does this recursively and this means non-live values stay in the old half
<greenbagels>
ah, ok, looking this up more it seems like there's plenty of documentation that describes this, whoops
<d_bot>
<leviroth> greenbagels: OCaml's GC does not use reference counting
<dh`>
in general, there are a lot of GC schemes to choose from, and none of them are based on reference counting
<greenbagels>
im reading about it and the justifications seem sensible
<d_bot>
<NULL> (Yet Python decided to use this technique in their runtime, following the "be as slow as possible" reasoning /s)
<greenbagels>
lots of memory / computational overhead on every single reference update when you can just do graph searching every time you want to GC?
<qwr>
reference counting is a possible GC implementation, but simple RC is a bad GC, and as said, OCaml GC don't use it (it is based on tracing, like most GC implementations)
<d_bot>
<leviroth> This seems like a verbal disagreement. Sometimes by "garbage collection" people specifically mean tracing collection. Other times they just mean dynamic, automatic memory management in general.
<dh`>
reference counting is presumed to have high overhead (it's not clear to me that this is actually true if you have a modern compiler) and it's also subject to garbage cycles, which is a semantic problem with no good workaround
<Corbin>
NULL: Note that CPython's reference-counting scheme is not mandatory. PyPy has a copying mark-and-sweep GC with a nursery.
<dh`>
things get more interesting if you want your GC to also be concurrent, though
<qwr>
something like nim languages ORC (deferred reference counting + cycle detection) seems to fill all GC criteria, while not using tracing
<dh`>
cycle detection seems like it would be moderately expensive
<qwr>
i don't know what algorithm they exactly used, but afaik it can result in comparable performance to tracing, with a bit different tradeoffs
<greenbagels>
so then is ocaml's GC a version of this "stop-and-copy" GC algorithm in reading about?
<dh`>
when assigning a pointer to Y into a field of X, you'd need to check forward through all Y's transitive links to see if there's a pointer to X in there somewhere, and since that can be both very deep and very broad in real code it seems problematic
<greenbagels>
or "semi-space collector"
<dh`>
you might be able to use some kind of generational magic to help in some cases I guess
spip has joined #ocaml
bobo has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiferrei has quit [Remote host closed the connection]