IRC channel logs

2021-11-17.log

back to list of logs

<RhodiumToad>syntax-error is for use with syntax-rules, not syntax-case
<lispmacs[work]>what is the easiest way to do a fixed-length shift-register object in Guile? I wanted to be able to push a value in the front of the array/list/whatever and have the back item disappear
<lispmacs[work]>while still having access to all the objects in-between
<RhodiumToad>queue implemented as vector with front/back indexes?
<RhodiumToad>or just a front index if you don't need to consider the case when it's not full
<lispmacs[work]>RhodiumToad: implemented by me, you mean...? Is there anything already available? I didn't want to have to write code to copy around the values, etc. if I could get away with it
<lispmacs[work]>I see there are Queues in guile manual, but those are lists
<lispmacs[work]>I suppose indexing a list is not to difficult, thinking about it
<lispmacs[work]>wait a second, queues are FIFO
<RhodiumToad>use a vector not a list, or you could use a circular list
<lispmacs[work]>Guile Queues doesn't give the option to change implementation ...?
<lispmacs[work]>I don't need a large queue - I think Guile Queues should work.
<daviid>lispmacs[work]: i would ask in #scheme, and see if something exists that would either be portable or easy to port - maybe one of the pfds in scheme would fir, not sure, deque maybe (never used it)
<daviid>The Deque data structure supports clockwise and anticlockwise rotations in O (1) time ...
<daviid>lispmacs[work]: https://github.com/ijp/pfds - but i think rlb has a port that works withguile 3.0, not sure either
<rlb>Hmm, I did have to fix a few bugs but I switched lokke to wingo's fash some while back. If it's useful, I can dig up the last version lokke was using. Also had to fix some bugs in fash, and added fash-update, so see lokke for that too if you need it.
<daviid>rlb: ah, so you don't have a fork and updated work of ijp's pfds implementation then, my mistake - one of us should do that, this is a very good and valuable work ... not to be lost if possible ...
<rlb>daviid: this is the version lokke was using before I switched it -- looks like there were 5 additional commits: https://github.com/rlbdv/pfds/commits/tmp/exp
<rlb>This is what it's using now: https://git.sr.ht/~rlb/lokke/tree/main/item/mod/lokke/fash.scm (see "git log -p mod/lokke/fash.scm" for the changes.
<rlb>(and I still need a real "dissoc", i.e. fash-delete)
<lilyp>dsmith-work: that looks like macroexpand with extra steps :P
<jpoiret>RhodiumToad: syntax-error is a special form in syntax-rules, but there is also a syntax-error macro defined in psyntax.scm
<jpoiret>by the way, I see that great care has been made to be able to pass docstrings to (define-syntax symbol (lambda (x) docstring body...)), however, is there any way to view this docstring programatically?
<jpoiret>like, is there any way to get the associated scheme value of a syntax?
<jpoiret>to answer my own question, just above, see https://www.gnu.org/software/guile/manual/html_node/Internal-Macros.html
<dsmith-work>{appropriate time} Greetings, Guilers
<dsmith-work>lilyp: Yeah, but macroexpand returns tree-il.
<dsmith-work>Would be nice if Guile had a macroexpand-1
<lilyp>there is tree-il->scheme
<lilyp>which will give you an equally wrong result when used with syntax-case :)
<dsmith-work>On this page: https://www.gnu.org/software/guile/manual/html_node/Identifier-Macros.html
<dsmith-work>There is:
<dsmith-work>"syntax-rules provides some syntax to effect this transformation more easily."
<dsmith-work>What is that refereeing to?
<dsmith-work>Maybe "identifier-syntax" ?
***janneke_ is now known as janneke