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/
Tuplanolla has quit [Ping timeout: 260 seconds]
edr has quit [Quit: Leaving]
trev has joined #ocaml
meritamen has joined #ocaml
meritamen has quit [Remote host closed the connection]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
zozozo has quit [Ping timeout: 255 seconds]
azimut has quit [Ping timeout: 240 seconds]
waleee has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
jlrnick has joined #ocaml
azimut has joined #ocaml
meritamen has joined #ocaml
bartholin has joined #ocaml
noddy has quit [Remote host closed the connection]
noddy has joined #ocaml
Leonidas has quit [Ping timeout: 240 seconds]
Leonidas has joined #ocaml
szkl has joined #ocaml
steenuil has quit [Ping timeout: 256 seconds]
steenuil has joined #ocaml
jlrnick has quit [Remote host closed the connection]
jlrnick has joined #ocaml
jlrnick has quit [Ping timeout: 268 seconds]
Serpent7776 has joined #ocaml
<discocaml> <lukstafi> @druimalban do you have FreeBSD? Would you mind checking if https://github.com/lukstafi/ocaml-gccjit `opam install . --deps-only --with-test; dune test` works for you? It works on my FreeBSD 14 but fails in opam-CI (FreeBSD 13.2).
szkl has quit [Quit: Connection closed for inactivity]
szkl has joined #ocaml
yewscion_ has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
yewscion_ is now known as yewscion
neiluj has joined #ocaml
azimut has joined #ocaml
meritamen has quit [Remote host closed the connection]
szkl has quit [Quit: Connection closed for inactivity]
<discocaml> <darrenldl> oh boy using `Unix.create_process` felt terrible
<discocaml> <druimalban> I have a FreeBSD workstation at a family member's. I can give it a shot in a week or two.
<companion_cube> @darrenldl and it's the _nice_ API
<companion_cube> the one that doesn't rely on implicit global state
<discocaml> <darrenldl> *shudders at memories of global state api*
<discocaml> <darrenldl> tho ig i only really had experience with 2: Str and api that relied on time zone variable
<companion_cube> :s :s
<companion_cube> Str really is bad
yewscion has quit [Remote host closed the connection]
yewscion has joined #ocaml
<discocaml> <xavierm02_> Hi. What's the easiest way to ensure that the type of constants and functions can be recovered from the bytecode? I could add superfluous operations whose name contains the name of the type at the typed ast stage, but I'd hope for something less ugly, and I'm not sure what to add to make the generated bytecode as easy as possible to detect (maybe external function calls?).
yewscion has quit [Remote host closed the connection]
yewscion has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
yewscion has quit [Remote host closed the connection]
yewscion has joined #ocaml
<Armael> hannes: what's the url of robur's git forge? I just tried to find the location of the sources for the caldav server by going to robur.coop, and I just.. couldn't- find it
<Armael> ah, git.robur.coop ; maybe worth linking in the footer of robur.coop
<hannes> Armael: you found it :) indeed, that website needs a refresh and some hyperlinks (to git.robur.coop and blog.robur.coop)
<Armael> ah nvm it's on github https://github.com/robur-coop/caldav
<Armael> ye the website links to https://builds.robur.coop/job/caldav for the caldav project, but on that webpage it's not obvious where the sources of the unikernel are
<Armael> (I remember wondering the same for other unikernels in builds.robur.coop )
<discocaml> <Alistair> I'm not too sure you could even encode that in the bytecode since labels are `int`s and `structured_constant`s don't keep the type name/constructor names around
<discocaml> <Alistair> I would imagine you could maybe encode it using `Lambda` before bytecomp, but I would imagine using the cmt file is the best way to recover the types for top-level functions / constants.
<discocaml> <Alistair> I'm not too sure you could even encode that in the bytecode since labels are `int`s and `structured_constant`s don't keep the type name/constructor names around (perhaps using the symtable?)
<discocaml> <xavierm02_> Using `external myfun : int -> int = "myfun"`, i get `ccall myfun` in the bytecode, so that would be detectable. It's just very annoying to add such functions everywhere they are needed, and the compiler not knowing what these functions do might disable some optimizations I would want
<discocaml> <xavierm02_> Using `external myfun : int -> int = "myfun"`, i get `ccall myfun` in the bytecode, so that would be detectable, and easily removable. It's just very annoying to add such functions everywhere they are needed, and the compiler not knowing what these functions do might disable some optimizations I would want
<discocaml> <Alistair> Oh yeah, forgot about externals. One way could be to use debug events
<discocaml> <Alistair> this contain an event module name + location
<discocaml> <Alistair> this contain an event module name + scoped location
yewscion has quit [Ping timeout: 260 seconds]
<discocaml> <xavierm02_> Do you mean addign `-g` when compiling to get lines like `event "test.ml" 377-391`? Or is there some way to add something to the OCaml code to have messages I control?
<discocaml> <xavierm02_> Do you mean adding `-g` when compiling to get lines like `event "test.ml" 377-391`? Or is there some way to add something to the OCaml code to have messages I control?
<discocaml> <Alistair> Yeah, `-g` should give you pseudo events for each function definition
neiluj has quit [Quit: neiluj]
<discocaml> <xavierm02_> Ok this might work somewhat decently: to keep the type of `t`, replace it by `let fake_fun x = let _y = "mytype" in x in t`. Then locate the label that has the string, and where a closure is built from that string. Completely removing the pushed closure might be non-trivial, but I can push some chosen constant instead to allow removing the superfluous code.
<discocaml> <xavierm02_> I'd still prefer something simpler if someone has an idea 😄
<discocaml> <xavierm02_> Ok this might work somewhat decently: to keep the type of `t`, replace it by `let fake_fun x = let _y = "mytype" in x in t`. Then locate the label that has the string, and where a closure is built from that label. Completely removing the pushed closure might be non-trivial, but I can push some chosen constant instead to allow removing the superfluous code.
waleee has joined #ocaml
yewscion has joined #ocaml
yewscion has quit [Remote host closed the connection]
yewscion has joined #ocaml
oriba has joined #ocaml
trev has quit [Quit: trev]
zanettoso has joined #ocaml
zanettoso has quit [Remote host closed the connection]
yewscion has quit [Remote host closed the connection]
yewscion has joined #ocaml
Serpent7776 has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
xgqt has quit [Quit: WeeChat 3.7.1]
yewscion has quit [Ping timeout: 260 seconds]
xgqt has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
bartholin has quit [Quit: Leaving]
pie__ has quit []
pie_ has joined #ocaml
Tuplanolla has joined #ocaml
azimut has joined #ocaml