jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
motherhucker has joined #commonlisp
jolby has quit [Quit: Client closed]
causal has joined #commonlisp
causal has quit [Client Quit]
causal has joined #commonlisp
motherhucker has quit [Ping timeout: 264 seconds]
motherhucker has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
causal has quit [Quit: WeeChat 3.6]
causal has joined #commonlisp
motherhucker has quit [Read error: Connection reset by peer]
causal has quit [Read error: Connection reset by peer]
causal has joined #commonlisp
causal has quit [Ping timeout: 250 seconds]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #commonlisp
causal has joined #commonlisp
fitzsim has joined #commonlisp
motherhucker has joined #commonlisp
dre has joined #commonlisp
akoana has quit [Quit: leaving]
waleee has quit [Ping timeout: 260 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
causal has quit [Quit: WeeChat 3.6]
Brucio-61 has quit [Ping timeout: 248 seconds]
scymtym has quit [Ping timeout: 268 seconds]
causal has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
motherhucker has quit [Ping timeout: 250 seconds]
vn36 has joined #commonlisp
vn36 has quit [Ping timeout: 248 seconds]
Posterdati has quit [*.net *.split]
acma has quit [*.net *.split]
nicmollel[m] has quit [*.net *.split]
remexre has quit [*.net *.split]
sveit_ has quit [*.net *.split]
nocko has quit [*.net *.split]
sgithens has quit [*.net *.split]
dbotton has quit [*.net *.split]
pkal has quit [*.net *.split]
boigahs has quit [*.net *.split]
skyl4rk has quit [*.net *.split]
spec has quit [*.net *.split]
iisi has quit [*.net *.split]
griffinmb has quit [*.net *.split]
jmercouris has quit [*.net *.split]
dcx has quit [*.net *.split]
ogamita has quit [*.net *.split]
thonkpod_ has quit [*.net *.split]
pkal_ has joined #commonlisp
sgithens has joined #commonlisp
pkal_ is now known as pkal
dbotton has joined #commonlisp
thonkpod_ has joined #commonlisp
nocko has joined #commonlisp
iisi has joined #commonlisp
jmercouris has joined #commonlisp
griffinmb has joined #commonlisp
thonkpod_ has joined #commonlisp
thonkpod_ has quit [Changing host]
Posterdati has joined #commonlisp
ogamita has joined #commonlisp
Posterdati has quit [Changing host]
Posterdati has joined #commonlisp
remexre has joined #commonlisp
skyl4rk has joined #commonlisp
spec has joined #commonlisp
sveit has joined #commonlisp
dcx has joined #commonlisp
boigahs has joined #commonlisp
nicmollel[m] has joined #commonlisp
acma has joined #commonlisp
ttree has quit [Ping timeout: 248 seconds]
pranavats has joined #commonlisp
<char[m]> I was just looking at spec for the + function, and it mentions that it might signal a arithmetic-error, while incf does not. When would + signal arithmetic-error?
<phoe> clhs floating-point-overflow
<phoe> char[m]: one example
<phoe> (+ most-positive-long-float most-positive-long-float) likely causes one
vn36_ has joined #commonlisp
frgo has quit [Ping timeout: 248 seconds]
<char[m]> Very cool! Interestingly, incf has the same behaviour, though it is absent from the spec. I guess it is just assumed that incf expands to use +.
Brucio-61 has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
gxt has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
gxt has joined #commonlisp
shka has joined #commonlisp
rgherdt has joined #commonlisp
<pillton> char[m]: It seems that the exceptional situation you speak of is not part of the "kinds of information" that may appear in a "Exceptional Situations" section (CLHS 1.4.4.10) since the error you speak of occurs when evaluating the macro expansion rather than during the invocation of the INCF macro function.
<pillton> I may be misinterpreting 1.4.4.10.
igemnace has joined #commonlisp
aartaka has joined #commonlisp
<pillton> It also seems that references in the See Also section are relevant to an operator according to 1.4.4.17.
aartaka has quit [Ping timeout: 250 seconds]
anticomputer has quit [Ping timeout: 258 seconds]
anticomputer has joined #commonlisp
pve has joined #commonlisp
<beach> char[m]: Unfortunately, that are many things left unspecified in the standard. The WSCL project was created in an attempt to fill those gaps, at least when all major Common Lisp implementations agree on what to do.
_cymew_ has joined #commonlisp
<jackdaniel> therefore all implementations agreed to rock, and we strive ever since ;)
vn36_ has quit [Ping timeout: 260 seconds]
scymtym has joined #commonlisp
_cymew_ has quit [Ping timeout: 268 seconds]
epony has quit [Remote host closed the connection]
vn36_ has joined #commonlisp
thuna` has joined #commonlisp
MajorBiscuit has joined #commonlisp
jeosol has quit [Ping timeout: 244 seconds]
silasfox has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
azimut has joined #commonlisp
silasfox has quit [Quit: WeeChat 3.6]
vn36_ has quit [Ping timeout: 250 seconds]
vn36 has joined #commonlisp
_cymew_ has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
_cymew_ has quit [Ping timeout: 260 seconds]
epony has joined #commonlisp
xlarsx has joined #commonlisp
cosimone has joined #commonlisp
xlarsx has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
<judabuda> phoe: Hey, how do i stop hunchentoot?
<phoe> judabuda: do you have a reference to the old acceptor that you have created?
<phoe> if yes, you can call a stop function on it
<phoe> if not, that's a pity - try to remember it somewhere, e.g. via DEFPARAMETER
<phoe> (the next time, after you restart Lisp, that is)
szkl has joined #commonlisp
_cymew_ has joined #commonlisp
_cymew_ has quit [Ping timeout: 252 seconds]
vn36 has quit [Ping timeout: 260 seconds]
vn36_ has joined #commonlisp
pillton has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
dre has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 252 seconds]
frgo has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
xlarsx has joined #commonlisp
vn36_ has quit [Ping timeout: 260 seconds]
xlarsx has quit [Ping timeout: 250 seconds]
vn36_ has joined #commonlisp
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
jmdaemon has quit [Ping timeout: 250 seconds]
tyson2 has joined #commonlisp
<thuna`> Does it make sense to have a src/ test/ directory layout for an asdf project? If yes, what should my defsystem look like?
<_death> sure.. you can look at a project that does that, like https://github.com/lispci/fiveam/blob/master/fiveam.asd
vn36_ has quit [Ping timeout: 264 seconds]
<thuna`> Oh, :pathname is a thing
<phoe> :pathname is one thing, :module is another
<_death> looks like a hexagon tile based board game design?
<phoe> yes
<phoe> an implementation of Neuroshima Hex the board game
chip_x has joined #commonlisp
<phoe> https://imgur.com/a/gqBDu0t all 100% generated in Vecto
chipxxx has quit [Ping timeout: 264 seconds]
Noisytoot has quit [Ping timeout: 248 seconds]
totoro has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
<_death> looks cool
<phoe> not complete yet, I'll make proper announcements once it's somewhat working
<phoe> (at which point I'll move it away from phoe-trash too)
Noisytoot has joined #commonlisp
<phoe> an exercise in functional programming too since I'm trying to keep everything immutable - when implementing a complex set of rules, like of a board game with several add-ons, it's important for me to know that no mutation can occur and each game state should be independently testable
<_death> yeah, that makes sense
aartaka has quit [Ping timeout: 250 seconds]
<pjb> thuna`: you would design a directory hierarchy for your project to help you navigate the sources. But for this, you could also implement navigation tools in emacs (in that case, it wouldn't matter how the sources are stored, your emacs code would manage that for you).
<phoe> which also means that I get to bend CLOS in funny ways to resolve all sorts of circular backreferences that are theoretically illegal in functional programs but handy to have in Lisp
<pjb> thuna`: for example, you could instead have a subdirectory per module, and keep both the sources, the resources and the tests of a module in the same directory.
<pjb> thuna`: that said, I use subdirectories such as specifications analysis design sources tests documentation for my project modules.
<pjb> thuna`: it depends also on the size of your project. If it's a hello world, you can put everything in the same directory, it won't matter.
<thuna`> pjb: I wanted to seperate src and test to have src/packages.lisp and test/packages.lisp
<pjb> thuna`: if it's a world simulator, you may need something more structured.
aartaka has joined #commonlisp
<pjb> thuna`: good point.
<pjb> (that's what I do too).
<pjb> I also have separate asd for the module and for its tests. So we can load a system without loading the test system.
<_death> phoe: I don't think there needs to be any issue with circularity.. while it may require modification of a structure, that structure can be a copy
<_death> phoe: if it's too much to copy, a different data structure may work better
anticomputer has quit [Remote host closed the connection]
<phoe> _death: mostly when I copy the original I also need to copy the children so that they also point at the copy
Noisytoot has quit [Ping timeout: 268 seconds]
anticomputer has joined #commonlisp
<pjb> you don't need to copy the children, if you don't mutate them.
<pjb> you only need to copy the nodes you mutate.
<_death> right, so this suggests an indirection, like separating the references
<phoe> if node A contains a child B that points to its parent A, then after copying A into A' I want its child B' to point back at A', not at A
<pjb> Well, when you work with immutable datastructure, you should avoid back pointers.
<pjb> or circles in general.
<_death> nodes hither, edges thither
<phoe> yes, and here I explicitly use them for programming convenience
<phoe> and I'm kind of curious how far I can go without tripping over my own heels
<phoe> I'll find out in due time, I guess
totoro has joined #commonlisp
<phoe> I have an army object that contains a list of tiles in that army, and then for each tile I also want to know which army it belongs to
<phoe> one option is to make another external mapping between army and some sort of IDs like integers, and have each tile store that ID
<phoe> another option I've found is a backpointer, plus some extra stuff to handle that circularity while copying
<pjb> no, for immutable data structures, better use external mappings.
<pjb> I assume you will be doing backtracking?
<phoe> not really - just a reference from children to parent
rgherdt_ has joined #commonlisp
totoro has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
rgherdt has quit [Ping timeout: 268 seconds]
<_death> so you can keep the directed graph on its own.. it needn't care about node representation.. indeed you can use explicit IDs or interned representations
Noisytoot has joined #commonlisp
<pjb> phoe: I don't mean backlinking. Backtracking, as in, computing a new state, and if no good, backing up to the previous state to compute another new state.
<pjb> When the state is big and new state only differ in a small part, you would use an immutable data structure, where the new state is build by copying and changing only a few nodes.
<_death> pjb: backtracking would be easy to implement if there are no side effects.. but probably inefficient too
<pjb> For this you must avoid backlinking.
tasty has quit [Quit: rebooting for kernel updates]
<pjb> Eg. in a tree, you will in general copy only O(depth(tree)) nodes.
<pjb> ie O(log(number of nodes))
<phoe> pjb: I know what you mean, and I won't be doing backtracking
<pjb> ok
<phoe> but, yes, I won't really be doing any stuff that involves a lot of copying - it's mostly convenience stuff like "if this army has any tiles that are not listing this army as their owner, copy them and assign the owner to be this army" which will happen at most once per game
aartaka has quit [Ping timeout: 268 seconds]
<phoe> and this is possible because a set of tiles can be created elsewhere and only then assigned to an army, which will then need to "fix" the backlinks
<pjb> ok
<phoe> once that's done, there's no more fixups needed
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
aartaka has joined #commonlisp
Noisytoot has quit [Ping timeout: 246 seconds]
waleee has joined #commonlisp
totoro has joined #commonlisp
Noisytoot has joined #commonlisp
drainpipe has joined #commonlisp
causal has quit [Quit: WeeChat 3.6]
drainpipe has quit [Quit: WeeChat 3.6]
rendar has quit [Quit: Leaving]
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
<thuna`> Is it a good idea to have a (defconstant +empty+ (gensym)) to mark "empty" values
<beach> If I understand what you want to do, that's when I often do (LIST NIL) to get a unique CONS cell.
<phoe> thuna`: if you need some sort of internal unbound marker, then yes, you can do it this way
<phoe> although I'd rather (make-symbol (symbol-name '#:empty))
<phoe> because that would be a little bit more meaningful than #:G7263
<phoe> or just, well, (defconstant +empty+ '#:empty)
<thuna`> Would (eq +empty+ '#:empty) be true?
<phoe> except then you also need to guard against redefining it, so (alexandria:define-constant +empty+ '#:empty :test #'string=)
<phoe> thuna`: no
<thuna`> Alright then, that works
<phoe> symbols created via #: are never eq to any other ones
<phoe> and the alexandria version will also not complain upon redefinition like DEFCONSTANT would
luna-is-here has quit [Quit: luna-is-here]
MajorBiscuit has quit [Ping timeout: 252 seconds]
MajorBiscuit has joined #commonlisp
attila_lendvai has joined #commonlisp
random-nick has joined #commonlisp
Catie has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.6]
MajorBiscuit has joined #commonlisp
luna-is-here has joined #commonlisp
chip_x has quit [Ping timeout: 260 seconds]
drainpipe has joined #commonlisp
waleee has quit [Ping timeout: 248 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.6]
MajorBiscuit has joined #commonlisp
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
frgo has quit [Ping timeout: 248 seconds]
_cymew_ has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
scymtym has quit [Remote host closed the connection]
scymtym has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
aartaka has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
_cymew_ has quit [Ping timeout: 252 seconds]
motherhucker has joined #commonlisp
aartaka has joined #commonlisp
orestarod has joined #commonlisp
cosimone has quit [Ping timeout: 260 seconds]
frgo has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.6]
vn36_ has joined #commonlisp
motherhucker has quit [Ping timeout: 268 seconds]
cage has joined #commonlisp
chip_x has joined #commonlisp
alejandrozf has joined #commonlisp
motherhucker has joined #commonlisp
chip_x has quit [Ping timeout: 250 seconds]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
eddof13 has joined #commonlisp
Noisytoot has quit [Ping timeout: 252 seconds]
Noisytoot has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
Noisytoot has quit [Remote host closed the connection]
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest9276
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Noisytoot has joined #commonlisp
ttree has joined #commonlisp
EsoAlgo has joined #commonlisp
eddof13 has joined #commonlisp
xlarsx has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
xlarsx has quit [Remote host closed the connection]
tevo has quit [Ping timeout: 264 seconds]
motherhucker has quit [Ping timeout: 268 seconds]
pdietz has joined #commonlisp
motherhucker has joined #commonlisp
igemnace has quit [Remote host closed the connection]
motherhucker has quit [Quit: leaving]
morganw has joined #commonlisp
vn36_ has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
pdietz has quit [Quit: Client closed]
vn36_ has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
xlarsx has joined #commonlisp
aartaka has joined #commonlisp
xlarsx has quit [Ping timeout: 252 seconds]
tyson2 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
<Josh_2> I love it when emacs just crashes
<Josh_2> Thank you supersave
<Josh_2> For supersaving
_cymew_ has joined #commonlisp
pdietz has joined #commonlisp
<Josh_2> And again...
pranavats has joined #commonlisp
motherhucker has joined #commonlisp
vn36_ has quit [Ping timeout: 250 seconds]
cuz has joined #commonlisp
thuna` has quit [Ping timeout: 252 seconds]
thuna` has joined #commonlisp
<thuna`> Is is possible to shuffle around/modify an array without creating a new one?
<thuna`> array's elements*
<jackdaniel> you may iterate over it and do it manually
<aeth> almost every array/sequence function has a start/end so you don't have to create a subseq or displace
attila_lendvai has quit [Ping timeout: 252 seconds]
<aeth> alternatively, you can create a function that returns VALUEs and a corresponding DEFSETF on VALUEs
<aeth> so you could e.g. (setf (foo a) (foo b))
cuz has quit [Ping timeout: 250 seconds]
rgherdt_ has quit [Read error: Connection reset by peer]
rgherdt has joined #commonlisp
xlarsx has joined #commonlisp
<Josh_2> thuna`: using setf you can modify it
thuna` has quit [Ping timeout: 264 seconds]
<aeth> If the question is literally about shuffling, then ROTATEF
tyson2 has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
_cymew_ has quit [Ping timeout: 250 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<pjb> arrays are mutable.
vn36_ has joined #commonlisp
waleee has joined #commonlisp
<Josh_2> Am I allowed to do something like this (defmethod ... :around (..args..) (if (<some pred> (call-next-method)) (restart-case (error ...) (do-a-thing (c) (<fix things>) (call-next-method))))) ?
<Josh_2> I am doing it in one place and it seems to be working, but I'm trying it somewhere else and I keep getting the condition "invalid number of arguments"
<Bike> i don't think there is any restriction on how many times you call-next-method, though it's not often done
<Josh_2> In both instances the same method is called?
<Josh_2> well the same 'next method' is called?
<Bike> should be
<Josh_2> Alright :thumbsup:
<Josh_2> Guess I gotta try and figure out whats going on. Unfortunately the stack trace is almost completely bare
alejandrozf has left #commonlisp [ERC (IRC client for Emacs 27.1)]
<Josh_2> huh
<Josh_2> I think I figured it out :facepalm:
White_Flame has quit [Remote host closed the connection]
<Josh_2> Yep
Guest9276 has quit [Quit: WeeChat 3.6]
xlarsx has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
xlarsx has joined #commonlisp
xlarsx has quit [Ping timeout: 252 seconds]
tyson2 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
motherhucker has quit [Read error: Connection reset by peer]
pdietz has quit [Ping timeout: 244 seconds]
xlarsx has joined #commonlisp
motherhucker has joined #commonlisp
xlarsx has quit [Ping timeout: 268 seconds]
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
tevo has joined #commonlisp
motherhucker has quit [Read error: Connection reset by peer]
chipxxx has joined #commonlisp
motherhucker has joined #commonlisp
vn36_ has quit [Ping timeout: 260 seconds]
mariari has quit [Ping timeout: 246 seconds]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
motherhucker has quit [Ping timeout: 260 seconds]
shka has quit [Ping timeout: 252 seconds]
mariari has joined #commonlisp
vn36 has joined #commonlisp
xlarsx has joined #commonlisp
pve has quit [Quit: leaving]
xlarsx has quit [Ping timeout: 250 seconds]
rgherdt has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
pillton has joined #commonlisp
drainpipe has quit [Ping timeout: 248 seconds]
xlarsx has joined #commonlisp
xlarsx has quit [Ping timeout: 252 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aartaka has quit [Ping timeout: 252 seconds]
morganw has quit [Remote host closed the connection]
<Josh_2> Odd question but is there a tool that I can use to change the package name in all of my project files?
<Josh_2> I used a sort of placeholder name and now I want to change it, but the project is pretty large and I'd rather not go through and change the (in-packages ..) manually
<Alfr> rename-package?
* Alfr ducks.
zyni-moe has joined #commonlisp
<Josh_2> Thanks :joy:
zyni-moe has quit [Client Quit]
<Bike> i honestly just use sed for that.
<_death> editor macros
<Josh_2> I have no experience with sed
<Josh_2> :(
<Josh_2> But I'm sure I can figure it out
<_death> or occur-edit-mode..
<Bike> `sed -i 's/in-package #:foo/in-package #:bar/' *.lisp` or so
<Josh_2> well
<Josh_2> thats easy enough
<Josh_2> Thanks Bike
<Josh_2> On a different topic I have a reasonable sized project here where I have lots of global variables and I wish I had made them slots in a sort of "config" class :(
<Josh_2> That way I could have multiple "instances" (difference configurations) running at once
<Josh_2> Retroactively going through and changing to this system will be a pita
xlarsx has joined #commonlisp
<Josh_2> Right now I load a config file and set global variables from these options in the file
<Josh_2> with a config class I could have many config files, or I could receive configs from an API and have many instances running :sob:
<pjb> global variables are also dynamic variables.
<Josh_2> Yes I know
<pjb> So you can define a function that binds them, before calling the rest of the program.
<Josh_2> But if I made it a class then I would be able to create subclasses and specialize certain aspects of the program
<pjb> If you fork a thread, be sure to put them in the initial-bindings of the thread.
<pjb> Sure, but this will be a PITA to update the program :-)
<Josh_2> I have like 10k SLOC or something I'd have to go change
<pjb> Refactoring may be laborious but it's always a good thing.
<Josh_2> And well I'm not so great at writing unit tests so who knows what I'll break :joy
<Josh_2> :joy:
xlarsx has quit [Ping timeout: 252 seconds]
eddof13 has joined #commonlisp
drainpipe has joined #commonlisp
vn36 has quit [Ping timeout: 250 seconds]
drainpipe has quit [Ping timeout: 252 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
xlarsx has joined #commonlisp
xlarsx has quit [Ping timeout: 260 seconds]
vn36 has joined #commonlisp
orestarod has quit [Ping timeout: 268 seconds]
<jcowan> What would be some good use cases for macros with keyword arguments?
Volt_ has joined #commonlisp
tyson2 has joined #commonlisp
drainpipe has joined #commonlisp
<_death> the usual use cases for keyword arguments.. there is the gotcha that if you're going to evaluate them you probably want to do so according to the order specified by the user
<aeth> keyword arguments are also the only way to have forwards-and-backwards compatibility if macros' extension of the lambda list also work like functions
<aeth> although you'd be tempted to mess with the syntax more and break compatibility
<aeth> but allow-other-keys is powerful
<aeth> as long as you don't rename variables or change the syntax (where the keyword lambda list goes) you get full compatibility
drainpipe has quit [Ping timeout: 248 seconds]
<aeth> jcowan: also consider e.g. implementing something like CL:LOOP with keywords instead of with syntax
<aeth> clauses like (for x :from 0 :below 32) or (:for x :from 0 :below 32)
<aeth> it's extensible because it takes arbitrary clauses and it's extensible because you can just add new keywords (e.g. maybe you only had :to initially but now you also support :below)
<jcowan> _death: Sounds like you'd have to process the keywords yourself (using &rest rather than &key) in order to get the order.
<_death> you can have both &rest and &key
<pjb> aeth: you can rename variables, but you need to specify the keywords.
<aeth> pjb: right, sorry. disadvantage: you can't rename the variables once you want it to be stable (unless you want to create two that do the same thing); advantage: you can add new options without needing to order them or to come up with some kind of LOOP-like language
<pjb> (defmacro foo (&key ((:key var) 33 varp)) `(list ,var ,varp)) (foo :key 42) #| --> (42 t) |#
<pjb> (defmacro foo (&key ((:key bar) 33 barp)) `(list ,bar ,barp)) (foo :key 42) #| --> (42 t) |#
<pjb> You can rename the variable!
<jcowan> I don't understand the logic of keywords simplifying the :to/:below case
<_death> jcowan: the rest list includes the keywords and arguments.. so you can use it for ordering and get keyword argument processing as usual