IRC channel logs

2021-06-18.log

back to list of logs

<leoprikler>does anyone else get configure errors when trying to set up Gettext with a pure Guile program?
<leoprikler>(might be a pretty Guix-specific problem, as gcc might not be visible in dev environments)
***terpri is now known as robin
<manumanumanu>So: I have a piece of code that is slow due to call/cc. I want it to be portable, which is why I am not using prompts, but I also want it to not be slow as hell. I translates pretty well to continuation-passing-style, but I could also dump performance problems on other schemes and write it using coroutine generators, of which I have a fast guile implementation and a call/cc portable implementation.
<manumanumanu>I am leaning towards CPS, but I am not really sure how well that performms. Lots of procedure calls, etc. Does anybody have any experience or any intuition about it?
<manumanumanu>Right now call/cc is by a pretty fair margin the largest cost for me.
<leoprikler>manumanumanu: Note, that performance isn't the only thing to consider here. Consider the API changes that would happen if you rewrite all things in CPS (assuming you already have an API).
<manumanumanu>There will be no API changes since this in well hidden from users.
<lampilelo>hi
<leoprikler>I don't think procedure calls are that much of a problem when writing CPS, since the continuations will be in tail position. Also, this is just my ignorance, but how would coroutine generators result in less procedure calls? Do you need to thread your continuations through many procedures?
<manumanumanu>Well, the cost of prompts would be that of restoring some half-large continuations done in a way guile does pretty well. What I believe I am asking is whether the overhead of the "manual" CPS will be larger.
<manumanumanu>I am just curious if anybody has any insight.
<manumanumanu>I could spend the roughly two hours converting my code just to test of course...
<leoprikler>There is certainly an overhead in the manual method w.r.t. code maintainability.
<leoprikler>As far as performance is concerned, I don't know, but I do know that Guile transforms your code to CPS under the hood, so it's certainly something to consider.
<leoprikler>I wonder if there's coroutine benchmarks, that one could implement in Guile prompts/manual CPS. Then you'd have a metric to go by.
*leoprikler → afk
<manumanumanu>meh... I go down the simple path: The coroutine version preforms admirable. The other schemes get call/cc-coroutines.
<emestee>i just want it known that trackballs are AWESOME
<mwette>howdy
<mwette>manumanumanu: Is there a way you can add a macro front end that uses call/cc or prompts?
<manumanumanu>mwette: that's what I went with.
<manumanumanu>But I remember porting (srfi 146 hash) to guile, and it didn't work due to them relying on full continuations. For me it will be fine, but I don't like the idea of incompatibilities
***KindOne_ is now known as KindOne
<manumanumanu>So, guile does copy-on-write for strings, at least when there are shared substrings. But does it hold on to huge strings if I have 50-char substring?
<leoprikler>probably maybe
<leoprikler>I don't think it does if you're explicitly copying them though