IRC channel logs
2025-01-08.log
back to list of logs
<dodoyada>is it possible(practical) to get C sources for guile xref in emacs? <ieure>Really struggling with Scheme's lack of nil punning. In CL or elisp, I can do (cdr (assoc 'key '((different-key "foo" "bar") (another-key "baz")))) and get a nil. In Guile, the assoc returns #f, and I can't do something like (or (assoc ...) '()) because cdr errors on empty lists. <ieure>Guile also doesn't seem to have if-let, so I can't do (if-let ((x (assoc ...)))) either. <lilyp>ieure: maybe you want srfi-2's and-let? <lilyp>you can also roll your own cdr-safe, which is what you need to use in elisp anyway <ieure>lilyp, Thanks for the pointers, much appreciated. <ieure>I think I found that I need way more code than I thought and so this stuff is more trivial than expected. <ieure>What I'm trying to do is have some system-specific Guix Home config files, so I can configure my work machine's .gitconfig with my work email and GPG ID. <ieure>And I thought merge would let me take an alist of global files and an alist of system-specific ones and have the latter replace keys in the former, but it doesn't work that way. <ieure>Ended up writing half a merge-sort. <ieure>Maybe a template library would make this easier. <ArneBab>sneek: later tell k4r4d3y: I expect that wingo never bumped into that, because it’s only relevant if you don’t have a local git setup. But most people have git configured in config files. <shawnw>It's easy to whip up a macro for if-let. I have one for Racket that should be easy to port over. <k4r4b3y>any chance elpa-geiser gets a maintainer and stops being an orphaned package for the next debian 13 release? <k4r4b3y>currently, the package is outdated, and geiser-guile.el it provides is also outdated <k4r4b3y>causing a bad developer experience for the dev that wants to use debian package repos for guile development using emacs <ttz>Is there a way to do procedure specialization at run-time? For example, I couldn't figure out a way to evaluate the first Fibonacci call upon providing n1: (λ (n1) (λ(n2) (+ (fib n1) (fib n2)))). <ttz>I would like it to behave as (λ (n1) (let ((f1 (fib n1))) (λ (n2) (+ f1 (fib n2))))) <morenonatural>ttz, is `define' not enough? you can do (define ...) within a scope; no need for it to be top-level <ttz>what do you mean? If (define f (λ (n1) (λ (n2) ...))) then somewhere (let ((g (f 40))) (+ (g 1) (g 2))) won't I compute (fib 40) twice? <ttz>some benches I ran seem to indicate that I do <lilyp>(lambda (n1) (define f1 (fib n1)) (lambda (n2) (+ f1 (fib n2)))) <lilyp>though that is of course the same as your let (actually letrec, but the same here) <k4r4b3y>I write a simple post. I can see the post in the localhost:8080 <k4r4b3y>to that same post, I also write a simple comment. And I hit submit (or post). But the tekuti doesn't update the blog page for incorporating that comment. <k4r4b3y>Do I (as the admin of the blog) have to do something to "merge" the user's comment with the blog post? <k4r4b3y>The admin UI doesn't provide me with such a button. So, am I to do this using the terminal git interface? <k4r4b3y>in the terminal git, inside the bare repo, I can see the associated commits for the comments and new blog post. But they aren't visible on the localhost:8080 rendering of the blog website.