companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
waleee[m] has left #ocaml [#ocaml]
<d_bot> <mbacarella> is anyone aware of a PR in a project where ppx_tools_versioned was ported to use ppxlib? would help me out a lot as a teaching resource
lisq has quit [Quit: lisq]
<d_bot> <Anurag> This is a very small pull request so not sure if it’ll be helpful, but I moved a small library to ppxlib last year <https://github.com/hcarty/ppx_defer/pull/7/files>
rgrinberg has quit [Ping timeout: 250 seconds]
<d_bot> <ansiwen> Ok, the server side is closing the connection after the error `[transport] transport: http2Server.HandleStreams failed to read frame: http2: frame too large`
lis has joined #ocaml
lis is now known as lisq
rgrinberg has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
bobo has joined #ocaml
spip has quit [Ping timeout: 276 seconds]
waleee has quit [Ping timeout: 260 seconds]
kaph_ has quit [Read error: Connection reset by peer]
<d_bot> <cod1r> hi
spip has joined #ocaml
bobo has quit [Ping timeout: 272 seconds]
oisota has quit [Quit: The Lounge - https://thelounge.chat]
oisota has joined #ocaml
bobo has joined #ocaml
spip has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mbuf has joined #ocaml
spip has joined #ocaml
bobo has quit [Ping timeout: 272 seconds]
<d_bot> <mbacarella> nice. one question: did ppxlib require changing to use objects, or did you add that for funsies?
Haudegen has joined #ocaml
ralu1 has quit [Ping timeout: 256 seconds]
gentauro has quit [Ping timeout: 246 seconds]
<d_bot> <sim642> Here's another example on a very small project: https://github.com/vogler/ppx_distr_guards/pull/1.
gentauro has joined #ocaml
<d_bot> <sim642> I'm not too familiar with pre-ppxlib ways of doing these things, but looks like the old way to have an AST mapper was a record of functions which are called with the mapper record itself as argument, which is kind of a roundabout way to achieve open recursion. Ppxlib mappers are objects instead, where open recursion is directly a feature.
<d_bot> <sim642> Although I guess nobody's forcing those mappers to be used if you want to just perform direct recursion on the AST yourself.
ralu1 has joined #ocaml
Serpent7776 has joined #ocaml
Anarchos has joined #ocaml
<d_bot> <Bluddy> Using objects makes a lot of sense for something like ppxlib. We want to have open recursion, and we don't mind being slightly slower since it's not even part of the application.
gravicappa has joined #ocaml
mro has joined #ocaml
<d_bot> <sim642> I wonder how these two approaches to open recursion compare performance wise. Has anyone benchmarked?
<d_bot> <sim642> I might soon have to do some refactoring to use open recursion in possibly performance-critical code, so it'd be interesting to know whether the extra boilerplate of the record-based approach would be worth it to gain a speedup over using objects directly.
<d_bot> <Bluddy> I started a discuss topic on this recently which didn't go that well https://discuss.ocaml.org/t/actual-performance-costs-of-oop-objects/9400
<d_bot> <Bluddy> my impression is that you take a serious performance hit, but so long as it's not in your critical path, it's probably ok
<d_bot> <Bluddy> records are much faster, but not every feature of objects can be emulated cleanly, and at a certain point you might as well just switch to objects
<d_bot> <Bluddy> also first-class modules are an option
mjacob has quit [Read error: Connection reset by peer]
mjacob has joined #ocaml
olle has joined #ocaml
xenu has quit [Read error: Connection reset by peer]
dextaa4 has joined #ocaml
xenu has joined #ocaml
cedric has joined #ocaml
mro has quit [Remote host closed the connection]
dextaa4 has quit [Remote host closed the connection]
mro has joined #ocaml
dextaa4 has joined #ocaml
mro has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
mro has joined #ocaml
wingsorc has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Anarchos has joined #ocaml
mro has quit [Quit: Leaving...]
dhil has joined #ocaml
gopiandcode has joined #ocaml
<gopiandcode> heyo everyone!
<gopiandcode> Hacking on using the OCaml compiler as a library for my current project
<gopiandcode> Managed to get native compilation and execution of code working based of opttoploop
<gopiandcode> but only for a single module
<gopiandcode> when I have modules that depend on previously defined (and evaluated) modules, things crash
<gopiandcode> hmmmm....
<gopiandcode> anyone have any ideas what could be going wrong?
<gopiandcode> if it helps, the issue doesn't seem to be at runtime, but actually during compilation
<gopiandcode> when calling `Asmgen.compile_implementation`
<gopiandcode> the expception complains about unbound_var
gopiandcode has quit [Quit: WeeChat 3.0]
gopiandcode has joined #ocaml
<gopiandcode> This is where the error is thrown from
<gopiandcode> Okay, looking into it, it seems like the env contains the binding for the module under it's actual name "Common", but for whatever reason, in the typed ast the module is represented as a variable "Common_178", causing the failure
<gopiandcode> maybe this is something to do with the coercions datatype returned by Includemod?
<gopiandcode> (`Includemod.signatures`)?
bobo has joined #ocaml
spip has quit [Ping timeout: 276 seconds]
<gopiandcode> hmmm, looking more closely, it seems to be a discrepancy between the env returned by Typemod.type_structure and the typed structure
<gopiandcode> in the env, the module name is represented as Common
<gopiandcode> but in the typed structure item returned by Typemod.type_structure the module name is Common/178
<gopiandcode> this then gets compiled to a lamba expression of (let (Common/78 ...) ..),
<gopiandcode> when referring to common from another module, the lambda correctly refers to Common/78, but when passing it to Asmgen.compile_implementation, it tries to lookup Common_78 in env, and then crashes because it can't find it?
Anarchos has quit [Quit: Vision[]: i've been blurred!]
kakadu has quit [Ping timeout: 246 seconds]
mro has joined #ocaml
kakadu has joined #ocaml
<olle> Damn, they used js_of_ocaml to compile the ReScript compiler to JS :)
<olle> Which means I can run ReScript + React in the browser, more or less
<olle> Have to try that later
adanwan_ has quit [Remote host closed the connection]
chiastre has quit [Quit: chiastre]
chiastre has joined #ocaml
zebrag has joined #ocaml
adanwan has joined #ocaml
gwizon has joined #ocaml
spip has joined #ocaml
bobo has quit [Ping timeout: 256 seconds]
bartholin has quit [Ping timeout: 276 seconds]
gwizon has quit [Quit: leaving]
Haudegen has joined #ocaml
spip has quit [Ping timeout: 246 seconds]
spip has joined #ocaml
bartholin has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 276 seconds]
genpaku has joined #ocaml
bartholin has quit [Ping timeout: 276 seconds]
bartholin has joined #ocaml
rgrinberg has joined #ocaml
vicfred has quit [Quit: Leaving]
Anarchos has joined #ocaml
mro has joined #ocaml
bartholin has quit [Ping timeout: 276 seconds]
bartholin has joined #ocaml
mro has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dextaa4 has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Sankalp- has joined #ocaml
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp- is now known as Sankalp
vicfred has joined #ocaml
mro has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has quit [Read error: Connection reset by peer]
mro_ has joined #ocaml
mro_ has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 246 seconds]
kaph has joined #ocaml
Haudegen has joined #ocaml
Sankalp has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mbuf has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
waleee has joined #ocaml
andreypopp_ has quit [Ping timeout: 256 seconds]
andreypopp has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Guest9034 has joined #ocaml
Guest9034 has quit [Client Quit]
qwr has quit [Ping timeout: 252 seconds]
Serpent7776 has quit [Quit: leaving]
qwr has joined #ocaml
wingsorc has joined #ocaml
gravicappa has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpds has quit [Ping timeout: 240 seconds]
olle has quit [Ping timeout: 272 seconds]
jpds has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
spip has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 246 seconds]
spip has joined #ocaml
noddy has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
<drakonis> how's the outlook on adding macros to ocaml?
<d_bot> <RegularSpatula> olle: why wouldn’t you just use ReScript-react if you want react with ReScript in the browser? (https://rescript-lang.org/docs/react/latest/introduction)
kotrcka has joined #ocaml