libera/#commonlisp - IRC Chatlog
Search
18:13:52
jeosol
Shinmera: Looking at your notify repo, I realized one of the commit message 2 years ago was the F word and you. Having a bad day that day.
18:35:30
contrapunctus
I too was noticing the "Start working on this I guess.", "Fuck you.", and "Sigh" commit messages. ^^
4:12:29
rdrg109_
[Q] How to correctly use backtick to get the value of the value of a variable? Here's a minimal example: (let* ((a 100) (i 'a)) <<do something with i to get 100>>). I've tried the following, but I can't get 100 (i.e. the value of a)
4:12:50
rdrg109_
I asked this question in #emacs, but I thought that maybe more people in #commonlisp are familiar with this topic.
4:13:55
beach
That's by design. If you could, the compiler couldn't do much to optimize the code that refers to such variables.
4:15:26
beach
There is nothing magic about backquote. It is just a reader macro that expands to a form containing macro and/or function calls. So if you can do something with backquote, you can do it with ordinary forms.
4:16:07
beach
And since you can't get the value of a lexical variable using ordinary forms, you can't do it with backquote.
4:47:27
phantomics
Is there an expedient way to write a (loop) form that will iterate over either a list or vector? Like (loop for i A B) where A is across if B is a vector or in if B is a list?
4:52:35
contrapunctus
phantomics: IIRC the `iterate` and `for` systems have generic iteration clauses
4:52:42
beach
ACTION thinks perhaps his utterances don't get through to the channel, because it feels like speaking to a black hole.
4:52:51
Nilby
phantomics: It's possible to write such a loop macro, but back in the olden days, the idea that you would implictly double the size of your code and add type testing to a very common usage probably seemed like a bigger deal that it would be now. That ‘elt’ has very different different performance can even still be trouble.
4:54:23
phantomics
Wouldn't use it if it's not supported across CLs, I'll write the loop another way
4:55:03
beach
... and I prefer the singular form since the loop variable can hold only one value at a time.
4:56:22
Nilby
in Dylan, which in some ways is a succesor to CL, they made a complicated iteration protocol with which you could make such a loop work out better
4:58:28
beach
Maybe Dylan was the result of yet another person being absolutely sure of the reason why Common Lisp is not more popular, and thus designing a language without that particular flaw, so absolutely certain of that language taking over the world.
5:00:17
kakuhen
phantomics: note that the ITERATE library is reasonably portable, and you can also extend it; I have successfully used it on SBCL, CCL, ECL, and ABCL
5:00:18
Nilby
david moon apparently still belives infix is better, and wrote a rational for it in his PLOT language
5:01:12
Nilby
using dylan and CL for a long time, i still think prefix is better. the dylan macro system feels like a mess
5:01:18
kakuhen
there's also some goodies that you just can't get with LOOP (or, I'm not clever enough to figure out how), such as NEXT-ITERATION
5:01:42
phantomics
I understand iterate's format is more normative for Lisp, will be worth checking out at some point
5:04:05
edgar-rft
beach: after your answer to rdrg109 followed a discussion on #emacs where it turned out that rdrg109's idea was rather quirky, he's probably overthinking his idea right now
5:17:06
beach
edgar-rft: Thanks! I still find it extremely impolite to 1. Ask a question. 2. Get an answer, and then 3. Not acknowledge that an answer was given. But then I was once told to basically "go away, because that's IRC for you dude" or something to that effect.
5:34:46
pillton
Does anyone have reading material that covers creating abstractions for sets of things? e.g. a set of images or a set of image sets. The set itself will have properties and each item in the set will have properties. I am finding it tedious to implement wrappers around existing data structures and I am looking for better ways.
5:44:19
hayley
Nilby: The specification of forward-iteration-protocol wouldn't pass the critique in <https://plover.com/~mjd/misc/hbaker-archive/Iterator.html> as the iteration "state" object can be modified by iterating.