IRC channel logs

2022-04-28.log

back to list of logs

<mwette>apteryx: your use of unquote seems unusual. Do you really mean "(python2-variant unquote" and not (python2-variant (unquote" ?
<apteryx>I guess I meant (unquote yes
<apteryx>I'll re-extract the data from the package
<apteryx>so the source code for the properties field reads as: (properties `((python2-variant . ,(delay python2-pytest-warnings)) (superseded . ,python-pytest)))
<apteryx>which after extracted from the package source 'read' into a sexp gives: ((quasiquote ((python2-variant unquote (delay python2-pytest-warnings)) (superseded unquote python-pytest))))
<apteryx>I'd like to have the python2-variant property removed
<apteryx>there could be properties before or after (as is the case here) the python2-variant property
<daviid>apteryx: here is a solution, based on the specific structure of your packae properties, not a generic tree-filter 'à la racket' :), does this work for you? - https://paste.centos.org/view/f303a391
<apteryx>daviid: hello! thank you, I'll experiment with your solution
<apteryx>it works with the provided sexp; but I've refined the sexp here to '(quasiquote ((python2-variant unquote (delay python2-pytest-warnings)) (superseded unquote python-pytest))) where it fails to match a form
<daviid>apteryx: it is because youaremissing the parens in front of the unquotes
<daviid>'(quasiquote ((python2-variant (unquote (delay python2-pytest-warnings))) (superseded (unquote python-pytest))))
<daviid>should work with the (unchaged) code pasted above,
<apteryx>it works, but the unquote really does appear this way following reading the package sexp with 'read' :-(
<apteryx>the package's record propertise field in the source reads as: (properties `((python2-variant . ,(delay python2-pytest-warnings)) (superseded . ,python-pytest)))
<apteryx>actually the expression is initially read form the source file as string, and I can already see in this string that it reads as "[...] (properties (quasiquote ((python2-variant unquote (delay python2-pytest-warnings)) (superseded unquote python-pytest))))))"
<apteryx>which is odd
<daviid>(with-input-from-string "(properties `((python2-variant . ,(delay python2-pytest-warnings)) (superseded . ,python-pytest)))" read)
<daviid>$6 = (properties (quasiquote ((python2-variant unquote (delay #)) (# # #))))
<apteryx>yeah with-input-from-string + read is also how I pass it into sexp form
<daviid>i wonder what2.2.7 returns
<apteryx>I can try it
<apteryx>guix shell --pure guile@2.2.7 to the rescue
<daviid>returns the same
<apteryx>indeed
<apteryx>so is unquote == (unquote ...) ?
<daviid>unquote as well
<daviid>his doesn' make sense, then the code couldn' e ealued anymoe
<apteryx>a bug in the reader?
<daviid>we should ask a maintainer, i am not an expert in this domain
<apteryx>OK, thanks for your input so far! I'll ask the question about it again when this place is a busier.
<daviid>apteryx: ok - you see, mwette also mentioned this as a 'bug', he knows a lot more then myself in this area ... i think it is a bug, but ... we'll see
<daviid>we could ask in #scheme
<daviid>apteryx: do you have another scheme maybe?
<daviid>i don't
<daviid>apteryx: according to 6.16.1.1 Expression Syntax, it should return (unquoe ...
<apteryx>I have these: 3.0.8 3.0.7 2.2.7 2.2.4 2.0.14 1.8.8
<daviid>ah, i meant another scheme, mitscheme, ...
<daviid>but you could try 1.8.8
<apteryx>does racket count?
<daviid>not sure
<apteryx>OK, I have mit-scheme
<daviid>maybe you hae chezscheme, if you hae acke ... bu mit-scheme will do
<daviid>as a test
<apteryx>it also gives (properties (quasiquote ((python2-variant unquote (delay python2-pytest-warnings)) (superseded unquote python-pytest))))
<apteryx>(mit-scheme 11.2)
<daviid>chez returns this
<daviid>hez Scheme Version 9.5.4
<daviid>Copyright 1984-2020 Cisco Systems, Inc.
<daviid>
<daviid>> (with-input-from-string "(properties `((python2-variant . ,(delay python2-pytest-warnings)) (superseded . ,python-pytest)))" read)
<daviid>(properties
<daviid> `((python2-variant . ,(delay python2-pytest-warnings))
<daviid> (superseded . ,python-pytest)))
<daviid>
<apteryx>that looks better to me
<apteryx>the source is preserved as-is
<daviid>apteryx: to me, this is a guile and mit-scheme reader bug, but ...
<apteryx>daviid: RhodiumToad had responded like this to avp in the past (2021-07-30): "(a unquote b) is a valid representation of (a . ,b) too"
<daviid>ah ok then
<apteryx>(searched in my logs)
<apteryx>didn't know that :-)
<apteryx>it's unideal for my use case, where I read source code, modify it, then save it back (there'll be discrepancies)
<apteryx>not ideal*
<daviid>apteryx: indeed
<apteryx>ironically it is starting to look like the sed hammer would be a better tool for it
<apteryx>I guess I need sleep :-) thanks again
<daviid>apteryx: ok, i'll fix the solution and paste later
<daviid>good night then
<daviid>apteryx: here is an updated version - https://paste.centos.org/view/a1098e3a - 3 tests at the end of the paste ...
<mwette>apteryx: I was working solution along the same line daviid did. match is very handy for general sexps
<chrislck>sneek: botsnack
<sneek>:)
<apteryx>daviid: thanks, this works well!
<apteryx>i'm curious; at the debugger, I can see local variables via ,locals, but I'm surprised that I can't simply type 'variable-name' at the REPL to inspect its value
<apteryx>I've also discovered the undocumented ,list to show a listing of the corresponding source
<apteryx>perhaps the debugger is ripe to plug with realgud to have an Emacs-integrated experience
<stis>Greetings guilers!
<stis>I'm now a happy dog owner.
<sneek>dsmith-work: Greetings!
<dsmith-work>Hey Hi Howdy, Guilers
<stis>o/
<dsmith-work>stis: You know what they say:
<dsmith-work>Outside of a dog, a book is mans best friend.
<dsmith-work>Inside of one, it's too dark to read....
<stis>:-) didn't know about this one.
<stis> https://quoteinvestigator.com/2010/09/08/dog/
<stis>Anyhow my son really loves animals and it is a kind of crime not getting a dog or cat.
<stis>It's realy a nice company when one work from home.
<stis>covid had resulted in a dog craze here fyi.
<dsmith-work>With a dog, coming home from being a way is a happy time. It's like the house greets you.
<dsmith-work>"Yey! The people are back!"
<stis>yeeep!
<stis>The breed is a Swedish Lapphund (used by the indigeous people in sweden to herd rain deers).
<stis>I'm quite fasinated by her firm. She loves to be outside for hours in all weathers. And she feels confy although it's 0 degrees and raining nails.
<stis>well see how the summer goes ...
<lampilelo>in the summer you can sheer her hair and make a rug
<stis>yeeep, but they loose hair naturally if I understand it correctly during a short period.
<daviid>stis: twice a year, but it depends on the race of the dog, most races do, some very 'humanly made' artificial races :), do not ...
<stis>daviid: this breed is quite old so that means twise a year