IRC channel logs

2024-09-06.log

back to list of logs

<duncanm>I came across this note: https://dthompson.us/posts/issues-with-object-oriented-programming-in-guile.html
<duncanm>Does anybody know if it's still the case that methods in GOOPS cannot use keywords?
<daviid>duncanm: yes, still the case, but if you are interested ... https://git.savannah.gnu.org/cgit/grip.git/tree/grip/goops.scm?h=devel#n24 and lines 62-72 for the code
<ArneBab>daviid: is there a reason why this isn’t merged into the default GOOPS?
<ArneBab>(do you need review for a patch?)
<duncanm>daviid: what is grip?
<mwette>duncan: https://savannah.nongnu.org/projects/grip
<daviid>duncanm: as mwette pointed out - https://www.nongnu.org/grip/ - a private toolbox, that i'd need to clean and parcially re-write before to claim it'd be usable by others ... though you can snarf the define-method* code, it is an excellent ''goops 'add-on', written by a former gule maintainer ...
<daviid>ArneBab: nobody ever proposed to include it in guile core, not even Mark, probably because it is not part of the clos/mop protocol ...
<dthompson>hoot 0.5.0 has been released! https://spritely.institute/news/guile-hoot-v050-released.html
<mwette>congrat's spritely!
<mwette>btw, this fails: (define (+6 x) (+ 6 x)) (+6 30)
<mwette>^ in the browser repl
<freakingpenguin>dthompson: Congrats on the release! Adding a REPL right in the blog post was a good choice.
<dthompson>thanks!
<dthompson>mwette: yeah there are bugs. we are not using a "real" syntax expander, among other things. consider it a preview.
<dthompson>maybe this is actually a reader bug...
<mwette>super cool nonetheless
<dthompson>thanks :)
<dthompson>and double thanks for the bug report
<dthompson>you have indeed found a reader bug!
<dthompson>(call-with-input-string "(+6 30)" read) ;; => (6 30)
<dthompson>sigh...
<dthompson>wait hold on
<dthompson>+6 is an integer, not a symbol
<dthompson>so that define should have thrown an error. there's still a reader bug, though, because 6+ *should* be a valid symbol, but read parses it as a number. 🙃
<freakingpenguin>Question on guile-syntax-highlight dthompson. It looks to me like a lexer can't "look back" at previously parsed text. Is that accurate?
<freakingpenguin>Trying to figure out a bug in the C highlighter that seems to be from how preprocessor includes are handled.
<mwette>Oh right, I mean to use 6+. Oops! Sorry about that.
<mwette>getting dyslexic in my old age :)
<dthompson>mwette: you still managed to expose a bug ;)
<dthompson>freakingpenguin: been awhile since I looked at the code but that might be right, yeah
<dthompson>(that code could use a rewrite. I know more now than I did then.)
<dthompson>well, maybe it's just been a long day for me and I was still mixing things up. (define (6+ x) (+ x 6)) (6+ 42) is working