saura has quit [Remote host closed the connection]
saura has joined #commonlisp
yottabyte has quit [Quit: Connection closed for inactivity]
atgreen has quit [Ping timeout: 256 seconds]
pseigo has quit [Ping timeout: 272 seconds]
saura has quit [Ping timeout: 256 seconds]
atgreen has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
bilegeek has joined #commonlisp
atgreen has quit [Remote host closed the connection]
atgreen has joined #commonlisp
pseigo has joined #commonlisp
<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)
<rdrg109_>
I asked this question in #emacs, but I thought that maybe more people in #commonlisp are familiar with this topic.
<beach>
You can't get the value of a lexical variable from its name.
<beach>
That's by design. If you could, the compiler couldn't do much to optimize the code that refers to such variables.
<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.
<beach>
And since you can't get the value of a lexical variable using ordinary forms, you can't do it with backquote.
yauhsien has joined #commonlisp
Bike has quit [Quit: Connection closed]
yauhsien has quit [Ping timeout: 255 seconds]
<beach>
rdrg109_: Did you see my answer?
hineios7 has joined #commonlisp
hineios has quit [Ping timeout: 255 seconds]
hineios7 is now known as hineios
atgreen has quit [Ping timeout: 268 seconds]
<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?
<beach>
Not built in. SBCL has an extension for it.
<beach>
(loop for element being each element of ... ) as I recall.
<contrapunctus>
phantomics: IIRC the `iterate` and `for` systems have generic iteration clauses
* beach
thinks perhaps his utterances don't get through to the channel, because it feels like speaking to a black hole.
<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.
<phantomics>
Ok makes sense
<kakuhen>
beach: the extension is "being the elements of"
<phantomics>
Wouldn't use it if it's not supported across CLs, I'll write the loop another way
<beach>
kakuhen: Usually, LOOP allows both "the ...s of" and "each ... of".
<beach>
... and I prefer the singular form since the loop variable can hold only one value at a time.
<kakuhen>
Never mind, your example is correct as well.
<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
<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.
pranavats has joined #commonlisp
<beach>
rdrg109_: I would really appreciate if you would acknowledge that you saw my answer.
<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
<Nilby>
david moon apparently still belives infix is better, and wrote a rational for it in his PLOT language
<Nilby>
using dylan and CL for a long time, i still think prefix is better. the dylan macro system feels like a mess
<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
<phantomics>
I understand iterate's format is more normative for Lisp, will be worth checking out at some point
<kakuhen>
the clause you'll be interested in is "for var in-sequence sequence"
ttree has quit [Read error: Connection reset by peer]
<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
<kakuhen>
for a dumb example: (iterate (for x in-sequence #(1 2 3)) (collect x)) ;=> (1 2 3)
<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.
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
aartaka has quit [Ping timeout: 246 seconds]
azimut has joined #commonlisp
yauhsien has joined #commonlisp
aartaka has joined #commonlisp
<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.
<phantomics>
pillton: Would an object system like CLOS make sense for this?
<Nilby>
hayley: while i despise C++ iterators, i still think baker is wrong on that. for performance reasons, but also stateless control is clumsy for certain things, e.g. iterating over lists in parallel, with variable stepping. it seems unlikely to totally dissuade programmers from using iterators, even if they're just integers. anyway, the iteration protocol should be mostly for implementaion of iteration, and it's usually better to use a
<Nilby>
functional interface
<hayley>
A functional "iterator" (as in, we have an object the caller steps) still allows for parallel iteration. And stepping with different strides isn't much of an issue.
pranavats has left #commonlisp [Error from remote client]
<Nilby>
i'm not sure i get the difference between an object the called steps and an iterator
<jackdaniel>
beach: dylan was initially created by apple, so (unlike i.e clojure) it was probably designed by a group of professionals, similar to common lisp
<jackdaniel>
(unlike clojure in a sense, that clojure was designed by one person to scratch an itch if I understand correctly)
<hayley>
That is my definition of an "iterator". The difference is that calling (say) the NEXT function on the iterator means the previous iterator cannot be re-used, with the Dylan iterator protocol. I assume this restriction is due to allowing "non-functional" iterators where the iterator object is modified in-place.
<jackdaniel>
n.b, and there we are, with clojure being magnitude more popular than both dylan and common lisp together ,)
<jackdaniel>
s/there/here/
<jackdaniel>
s/magnitude/order of magnitude/
parjanya has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
livoreno has quit [Ping timeout: 244 seconds]
livoreno has joined #commonlisp
yauhsien has joined #commonlisp
bilegeek has quit [Quit: Leaving]
yauhsien has quit [Ping timeout: 255 seconds]
pve has joined #commonlisp
Algernon69 has joined #commonlisp
Algernon91 has joined #commonlisp
yauhsien has joined #commonlisp
Th30n has joined #commonlisp
Algernon91 has quit [Client Quit]
Algernon69 has quit [Ping timeout: 272 seconds]
pranavats has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
random-nick has joined #commonlisp
ttree has quit [Ping timeout: 268 seconds]
<scymtym>
Nilby: in SBCL, the LOOP clause for sequence iteration actually uses the iteration protocol for non-list non-vector sequence. and likewise for sequence functions
yauhsien has quit [Ping timeout: 246 seconds]
<Nilby>
scymtym: thanks. now that i look at it, it seems very close to dylan's
<Nilby>
i've avoided it because it's non-standard, but maybe i should give it a spin
<scymtym>
Nilby: i'm pretty sure SBCL's protocol was inspired by Dynlan's but i can find the citation right now
<Nilby>
scymtym: very likely as cmu was making their own dylan too
<contrapunctus>
Damn, this is amazing. I was thinking about something like this very recently - describing each argument and return value in a structured way.
cosimone has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
<Shinmera>
Pretty sure documentation-utils does something different from the other ones you listed.
<Shinmera>
The documentation aggregator I wrote is called Staple.
<contrapunctus>
Shinmera: yeah, it does
yauhsien has joined #commonlisp
atgreen has joined #commonlisp
yauhsien has quit [Ping timeout: 248 seconds]
rodicm has joined #commonlisp
Glaucon has quit [Ping timeout: 246 seconds]
pranavats has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
frgo has quit [Remote host closed the connection]
<Nilby>
Krystof: Thanks for reminding me. It turns out that I had read your excellent paper and looked at the implementation, probably close to the 15 years ago now that it was published, and appreciated you taking inspiration from Dylan, and of course forgot the specifics.
Bike has joined #commonlisp
bitmapper has joined #commonlisp
rodicm has quit [Ping timeout: 256 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
ec has quit [Remote host closed the connection]
Oddity has quit [Ping timeout: 256 seconds]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 255 seconds]
X-Scale` is now known as X-Scale
mon_aaraj has quit [Ping timeout: 240 seconds]
szkl has joined #commonlisp
mon_aaraj has joined #commonlisp
azimut has quit [Ping timeout: 268 seconds]
azimut has joined #commonlisp
yauhsien has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
yauhsien has quit [Ping timeout: 268 seconds]
scymtym has quit [Remote host closed the connection]
Brucio-61 has quit [Quit: Application exit]
contrapunctus has left #commonlisp [#commonlisp]
scymtym has joined #commonlisp
contrapunctus has joined #commonlisp
Brucio-61 has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
kpoeck has joined #commonlisp
cosimone has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 255 seconds]
lisp123 has quit [Ping timeout: 246 seconds]
ec has joined #commonlisp
Th30n has quit [Quit: WeeChat 3.5]
mon_aaraj has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
frgo has joined #commonlisp
shka has joined #commonlisp
mon_aaraj has quit [Ping timeout: 246 seconds]
frgo has quit [Remote host closed the connection]
defaultxr has joined #commonlisp
frgo has joined #commonlisp
mon_aaraj has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
irc_user has joined #commonlisp
mon_aaraj has joined #commonlisp
tyson2 has quit [Ping timeout: 248 seconds]
rotateq has joined #commonlisp
seok has quit [Ping timeout: 240 seconds]
rogersm has quit [Quit: Leaving...]
mon_aaraj has quit [Ping timeout: 268 seconds]
causal has quit [Quit: WeeChat 3.5]
<dbotton>
Is there a format directive like ~A that if nil it is formatted as a blank string?
shka has quit [Quit: Konversation terminated!]
<Bike>
~@[~a~]
cage has joined #commonlisp
<Bike>
well, that's empty string. if you mean a space, you'd use ~:[
<dbotton>
thanks!
shka has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
prokhor__ has quit [Remote host closed the connection]
shka has quit [Quit: Konversation terminated!]
kpoeck has quit [Quit: Client closed]
<White_Flame>
Does d-wave still use common lisp? They came up in conversations and I checked their listings and they only mention python
<jackdaniel>
they hire for python, but then they secretly develop in hy (/me laughs in "hy hy hy")
shka has joined #commonlisp
citizenandrew has joined #commonlisp
<citizenandrew>
White_Flame: yes, D-Wave does use Common Lisp for some of their software
<White_Flame>
interesting join then response ;)
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
<Josh_2>
Just spent a bit of time playing with defining method combinations. I had previously tried it but I dont think I "got it"
<Josh_2>
Very COOOO
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
citizenandrew has left #commonlisp [#commonlisp]
shka has quit [Client Quit]
orestarod has joined #commonlisp
Cymew has quit [Ping timeout: 272 seconds]
shka has joined #commonlisp
tyson2 has joined #commonlisp
leeb has quit [Ping timeout: 255 seconds]
pranavats has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
ec has quit [Quit: ec]
ttree has joined #commonlisp
notzmv has quit [Ping timeout: 272 seconds]
livoreno has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
attila_lendvai has joined #commonlisp
livoreno has quit [Ping timeout: 268 seconds]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
Dynom has joined #commonlisp
kpoeck has joined #commonlisp
treflip has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tedwing has joined #commonlisp
kpoeck has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 240 seconds]
treflip has quit [Quit: good night]
MajorBiscuit has quit [Ping timeout: 272 seconds]
pseigo has joined #commonlisp
waleee has joined #commonlisp
kpoeck has joined #commonlisp
Oddity has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
gxt has quit [Ping timeout: 268 seconds]
gxt has joined #commonlisp
notzmv has joined #commonlisp
yauhsien has joined #commonlisp
pseigo has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
pseigo has joined #commonlisp
pseigo has quit [Client Quit]
pseigo has joined #commonlisp
yauhsien has quit [Ping timeout: 256 seconds]
random-nick has joined #commonlisp
morganw has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
pseigo has quit [Quit: left]
pseigo_ has joined #commonlisp
kpoeck has quit [Quit: Client closed]
kpoeck has joined #commonlisp
irc_user has quit [Quit: Connection closed for inactivity]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
n1to has joined #commonlisp
akoana has joined #commonlisp
pseigo_ has quit [Ping timeout: 244 seconds]
tedwing has quit [Ping timeout: 246 seconds]
pseigo_ has joined #commonlisp
pok has joined #commonlisp
pok has quit [Changing host]
pok has joined #commonlisp
shka has quit [Ping timeout: 256 seconds]
pseigo_ has quit [Client Quit]
pseigo_ has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.5]
attila_lendvai has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
kpoeck has quit [Quit: Client closed]
saura has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
saura has quit [Ping timeout: 248 seconds]
theBlackDragon has quit [Ping timeout: 264 seconds]