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 joined #ocaml
dnh has quit [Read error: Connection reset by peer]
dnh_ has quit [Ping timeout: 264 seconds]
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
dnh has quit [Ping timeout: 268 seconds]
jmcantrell has quit [Quit: WeeChat 4.2.1]
jmcantrell has joined #ocaml
justache has quit [Ping timeout: 255 seconds]
justache has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
justache has quit [Ping timeout: 255 seconds]
justache has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
rgrinberg has joined #ocaml
jabuxas has quit [Ping timeout: 260 seconds]
justache has quit [Ping timeout: 264 seconds]
justache has joined #ocaml
dnh has joined #ocaml
dnh has quit [Ping timeout: 264 seconds]
dnh has joined #ocaml
dnh has quit [Ping timeout: 246 seconds]
justache has quit [Ping timeout: 264 seconds]
justache has joined #ocaml
dnh has joined #ocaml
mbuf has joined #ocaml
dnh has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pi3ce has quit [Ping timeout: 260 seconds]
pi3ce has joined #ocaml
dnh has joined #ocaml
dnh has quit [Ping timeout: 272 seconds]
dnh has joined #ocaml
jmcantrell has quit [Quit: WeeChat 4.2.1]
dnh has quit [Ping timeout: 240 seconds]
azimut has quit [Ping timeout: 260 seconds]
justache has quit [Ping timeout: 264 seconds]
justache has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 246 seconds]
dnh has joined #ocaml
dnh has quit [Ping timeout: 256 seconds]
pi3ce has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
pi3ce has joined #ocaml
rgrinberg has joined #ocaml
dnh has joined #ocaml
bartholin has joined #ocaml
dnh has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: Textual IRC Client: www.textualapp.com]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 255 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 255 seconds]
myrkraverk__ has joined #ocaml
myrkraverk__ has quit [Read error: Connection reset by peer]
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
<discocaml> <lukstafi> The #beginners discussion of REPL reminded me to ask, is there a Proof General style REPL for OCaml? One that maintains a "line number" state at which the REPL is with regard to a source file (with a different background color for "past" and "future" code), complete with having the local binding environment available within the REPL, where some bindings are values and some are variables (abstract).
myrkraverk has joined #ocaml
dnh has joined #ocaml
myrkraverk__ has quit [Ping timeout: 272 seconds]
<discocaml> <lukstafi> Maybe this would involve too much abstract interpretation / partial evaluation trickery to be practical.
myrkraverk_ has joined #ocaml
myrkraverk__ has joined #ocaml
dnh has quit [Ping timeout: 255 seconds]
myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk has quit [Ping timeout: 268 seconds]
myrkraverk_ has joined #ocaml
myrkraverk__ has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
bibi_ has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bartholin has quit [Quit: Leaving]
darchitect has joined #ocaml
dnh has joined #ocaml
<discocaml> <dariusf> there's https://discuss.ocaml.org/t/checkpointing-in-ocaml-repl/11121/9, for complete toplevel phrases. to have locals (e.g. in a function) available, there's a PoC here inspired by some code in utop https://github.com/dariusf/ppx_interact, but this requires compiling the whole program in bytecode mode
neiluj has joined #ocaml
dnh has quit [Ping timeout: 256 seconds]
<discocaml> <lukstafi> I've forgotten, thanks! `[%interact]` REPL is entered at the call site, so it's not Proof General style...
<discocaml> <lukstafi> I'm thinking of a (let's say bytecode) situation where you can advance Proof General's position to inside a function, and when dropping into REPL it would ask for `assume` values of variables (parameters) -- simulating a call.
neiluj has quit [Quit: Konversation terminated!]
dnh has joined #ocaml
infinity0 has joined #ocaml
neiluj has joined #ocaml
infinity0 has quit [Ping timeout: 264 seconds]
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
neiluj has quit [Quit: Konversation terminated!]
jabuxas has joined #ocaml
masterbuilder_ has joined #ocaml
masterbuilder has quit [Ping timeout: 268 seconds]
neiluj has joined #ocaml
Serpent7776 has quit [Ping timeout: 268 seconds]
jabuxas has quit [Ping timeout: 268 seconds]
masterbuilder_ is now known as masterbuilder
masterbuilder has quit [Changing host]
masterbuilder has joined #ocaml
darchitect has quit [Ping timeout: 272 seconds]
darchitect has joined #ocaml
a51 has joined #ocaml
justache has quit [Ping timeout: 264 seconds]
justache has joined #ocaml
justache has quit [Ping timeout: 264 seconds]
justache has joined #ocaml
azimut has joined #ocaml
Ekho has quit [Ping timeout: 256 seconds]
Ekho has joined #ocaml
Square2 has joined #ocaml
neiluj has quit [Quit: Konversation terminated!]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
a51 has quit [Quit: WeeChat 4.2.1]
neiluj has joined #ocaml
marc_ has joined #ocaml
Tuplanolla has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml> <mbacarella> is there a pattern yet in dune where you conditionally compile foo.multicore.ml as foo.ml if you're on ocaml 5.0, and use foo.single.ml as foo.ml if you're on <5.0?
<discocaml> <mbacarella> that part is kind of easy, but conditionally added domainslib as a library dependency is what i don't know about
<discocaml> <mbacarella> that part is kind of easy, but conditionally adding domainslib as a library dependency is what i don't know about
<discocaml> <mbacarella> conditionally adding domainslib though
pi3ce has quit [Quit: No Ping reply in 180 seconds.]
pi3ce has joined #ocaml
<discocaml> <mbacarella> i guess i need to say that in the opam config
<discocaml> <mbacarella> eurgh. i think i need to separate this out into a package.
<companion_cube> ah, in the opam config, I'd put domainslib as a depopt… but yeah then it's annoying too
<companion_cube> I forget if there's a way to ask for a dep only if Oaml >= 5
<companion_cube> OCaml*
<discocaml> <mbacarella> maybe i can suggest the package maintainer create a new major version that depends on ocaml >= 5.0 since it's the future
<discocaml> <idontwantausernamefeckoff> how relevant is multicore?
<discocaml> <idontwantausernamefeckoff> a lot of people still use 4.14
<discocaml> <mbacarella> i think it's quite relevant if you have cpu bound pure-ocaml tasks
Anarchos has joined #ocaml
pi3ce has quit [Ping timeout: 264 seconds]
<discocaml> <idontwantausernamefeckoff> i mean to the project in particular
<discocaml> <mbacarella> oh not at all
<discocaml> <idontwantausernamefeckoff> tbf though i think 5's got more adoption now. i think even windows has it
<Anarchos> whar are 5's ?
pi3ce has joined #ocaml
bartholin has joined #ocaml
marc_ has quit [Ping timeout: 268 seconds]
neiluj has quit [Quit: Konversation terminated!]
marc_ has joined #ocaml
mbuf has quit [Quit: Leaving]
Serpent7776 has quit [Ping timeout: 264 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
darchitect has quit [Quit: WeeChat 3.8]
jabuxas has joined #ocaml
dnh has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jabuxas has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
<discocaml> <hockletock> I think they mean "ocaml 5 has got"
rgrinberg has joined #ocaml
<discocaml> <anmonteiro> @pilothole you can do something like this https://github.com/melange-re/melange/blob/main/jscomp/common/dune#L7
<discocaml> <anmonteiro> And hook on the OCaml major version variable that dune exposes
<discocaml> <anmonteiro> Instead of the profile variable like I’m using
<discocaml> <anmonteiro> Oh but you need to conditionally add domains lib hmm. You could use `select` for that
jabuxas has joined #ocaml
marc_ is now known as mccd
azimut has quit [Ping timeout: 260 seconds]
azimut has joined #ocaml
jabuxas has quit [Ping timeout: 240 seconds]
Square2 has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
dnh has joined #ocaml
mccd has quit [Ping timeout: 272 seconds]
motherfsck has quit [Quit: quit]
mccd has joined #ocaml
mccd has quit [Ping timeout: 252 seconds]
waleee has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
a51 has joined #ocaml
<discocaml> <idontwantausernamefeckoff> feel like i learn so so much writing anything in this lang
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<discocaml> <idontwantausernamefeckoff> i think something i’m only just getting a grasp on after writing stuff for a bit is when to mix in imperative code
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
pie_ has quit []
pie_ has joined #ocaml
pie_ has quit [Client Quit]
pie_ has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
dnh has joined #ocaml
<discocaml> <mbacarella> ostensibly yes you can and should do everything in FP paradigm but really we hack stuff together with imperative code all the time
bartholin has quit [Quit: Leaving]
mccd has joined #ocaml
<discocaml> <idontwantausernamefeckoff> haha
<discocaml> <idontwantausernamefeckoff> functional is nice until i use a recursive function for a tight loop running in c code and cause a super confusing segfault
dnh has quit [Remote host closed the connection]
<discocaml> <functionalprogramming> as a result of blowing up the stack?
<discocaml> <functionalprogramming> are you writing functional code *in* C?
dnh has joined #ocaml
<discocaml> <idontwantausernamefeckoff> no
rgrinberg has joined #ocaml
<discocaml> <idontwantausernamefeckoff> but under load it would throw expired closure errors, which would then for some reason segfault if you tried to print the backtrace
<discocaml> <functionalprogramming> oh god
<discocaml> <idontwantausernamefeckoff> probably from some non tail recursive bit blowing everything up
<discocaml> <functionalprogramming> so you're calling out to C code via an FFI?
<discocaml> <idontwantausernamefeckoff> yeah
<discocaml> <idontwantausernamefeckoff> funny thing
<discocaml> <functionalprogramming> can you reproduce it
<discocaml> <functionalprogramming> seems like a bug
<discocaml> <idontwantausernamefeckoff> well
<discocaml> <idontwantausernamefeckoff> using very tight recursive functions in c ffi code seems like obviously a bad idea anyway
<discocaml> <functionalprogramming> ur calling ocaml from C?
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml> <idontwantausernamefeckoff> no, this is just using ctypes and ctypes.foreign
<discocaml> <idontwantausernamefeckoff> i couldn’t get anything to reproduce entirely reliably, so i think it’s more my bug than anything in ctypes or ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pi3ce has quit [Quit: No Ping reply in 180 seconds.]
Tuplanolla has quit [Quit: Leaving.]
pi3ce has joined #ocaml
<discocaml> <functionalprogramming> maybe it was adding gc roots, potentially? i got no clue
Square2 has joined #ocaml
mccd has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml