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/>
seletz has quit [Ping timeout: 260 seconds]
gxt has quit [Remote host closed the connection]
shka has quit [Ping timeout: 268 seconds]
gxt has joined #commonlisp
dipper has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #commonlisp
bilegeek_ has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7.1]
perrierjouet has joined #commonlisp
bilegeek has quit [Ping timeout: 255 seconds]
anticomputer has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 256 seconds]
anticomputer has joined #commonlisp
waleee has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
dipper has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 255 seconds]
larix has joined #commonlisp
epony has joined #commonlisp
NotThatRPG has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Ping timeout: 256 seconds]
NotThatRPG has joined #commonlisp
makomo has quit [Ping timeout: 256 seconds]
attila_lendvai has joined #commonlisp
ym has quit [Ping timeout: 268 seconds]
<gendl> Hi, cl-who question - does anyone know how to generate a tag with attributes and a body, where the tag is known at compile time, the body is normal LHTML forms, but attribute list is known only at runtime?
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gendl> something like `(cl-who:with-html-output-to-string () (:body <my-tag-list) (:p (str (compute-my-paragraph-string))))`
<gendl> I asked chatGPT and it's giving nonsense answers, talking about functions `with` and `html` which cl-who does not contain.
<gendl> The only way I've made it work so far is with a wrapper macro which uses `eval` which I'm pretty sure it not right:
<gendl> (sorry, `with-lhtml-string` is my own wrapper around `cl-who:with-output-to-html-string`
<gendl> )
<jmercouris> drmeister: I saw your presentation from 2018, very wonderful
<drmeister> jmercouris: Thank you.
Guest14 has joined #commonlisp
<drmeister> I've been busy the last three years making it happen.
<jmercouris> Oh yes, I can only imagine the magnitude of this task
brettgilio has quit [Quit: The Lounge - https://thelounge.chat]
brettgilio has joined #commonlisp
<gendl> well i think the silence to my question might be because what i'm trying to do fundamentally goes against cl-who's philosophy of compiling everything into efficient format statements. Best just to put in all the attributes which might be needed with an expression to compute each one (which itself could well be a plist lookup), and just let them have `nil` values at runtime if they aren't to be included. If another attribute ends
<gendl> up being needed just accept that a code change is needed to add it.
<Bike> i haven't used cl-who but my general impression from when people ask these questions is that it's basically static, yeah.
<jmercouris> gendl: have you tried spinneret?
<drmeister> Bike: Can you keep a list of things to fix for when you get here?
<drmeister> Here's another thing - the distorted bond angles in the 6-member rings.
<jmercouris> gendl: see the section "Dynamic Output"
<jmercouris> "For flexibility, even at the cost of efficiency, the pseudo-attribute :ATTRS introduces a form to evaluate at run time for a plist of extra attributes and values."
<drmeister> It's a non-linear optimization that is generating those - so it's going to take a bit of work to track down why it's happenings.
<drmeister> happening.
<Bike> drmeister: sure, i can make a list. do you want to talk about this in the clasp channel?
<drmeister> Wha? Damnit - sorry.
<drmeister> Yes.
<gendl> jmercouris: yep i just read that sentence! Looks promising, thanks for the pointer!
<jmercouris> gendl: no problem! I just thought of it because i had a similar issue
NotThatRPG has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
tyson2 has quit [Remote host closed the connection]
waleee has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
jmdaemon has joined #commonlisp
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
Catie has quit []
Guest14 has quit [Ping timeout: 260 seconds]
akoana has joined #commonlisp
ttree has quit [Ping timeout: 264 seconds]
occ has quit [Read error: Connection reset by peer]
<phantomics> Hi, I was looking for the fastest way to do this: (lambda (x y z) (mod (+ x y) z)) given a guarantee that x and y will always be unsigned ints less than z
<phantomics> I arrived at this method: (lambda (x y z) (let ((out (+ x y))) (if (> z out) out (- out z))))
<phantomics> But is this the fastest? Note that in the production code there are type declarations for all these vars
nij- has joined #commonlisp
Lycurgus has joined #commonlisp
<hayley> Has anyone implemented auto-reconnect using cl-irc before?
trocado has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
<jcowan> No language has a *proper* integer type, if by that you mean a type that can represent any integer.
igemnace has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
<jcowan> s/you mean/one means
<beach> jcowan: What integer can not be represented in Common Lisp?
<jcowan> To clarify, the CL *language* allows arbitrarily large integers, but no CL *implementation* does. For example, 2^2^64 is not representable.
<beach> That's what I thought.
<jcowan> However, bignums are available in all modern languages, though not necessarily integrated into the numeric tower.
<jcowan> By the same token, the C language allows arbitrarily large integers.
<jcowan> (in the sense that the C standard does not set a limit on the size of integers)
<hayley> Due to INT_MAX I believe the implementation must provide some limit on the integer size.
aartaka has joined #commonlisp
<edgar-rft> what means that integer limits in C are undefined behaviour :-)
nij- has quit [Ping timeout: 260 seconds]
epony has quit [Read error: Connection reset by peer]
epony has joined #commonlisp
varjag has joined #commonlisp
minion has quit [Remote host closed the connection]
specbot has quit [Read error: Connection reset by peer]
rgherdt has joined #commonlisp
minion has joined #commonlisp
specbot has joined #commonlisp
lapiss has joined #commonlisp
Cymew has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 265 seconds]
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
_cymew_ has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
ec has joined #commonlisp
bilegeek_ has quit [Quit: Leaving]
ec has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
<lapiss> Hello! I'm a beginner lisper reading ANSI Common Lisp by Paul Graham. I would appreciate if someone could give me resources for understanding the string substitution example in chapter 7; what is the name of this algorithm? and what are the /used/ and /new/ indices used for? I tried to play with Graham's ring buffer implementation in a repl, but it didn't help. Thanks!
lisp123 has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 260 seconds]
<Shinmera> hayley: maiden's irc module has autoreconnect
<hayley> Shinmera: Thanks. Have you seen cl-irc spin and eat CPU time after a QUIT before? It seems to be plaguing my bot.
<Shinmera> I've never used cl-irc :/
<hayley> Oh, I see Maiden uses its own IRC client stuff. Fair enough.
<Shinmera> All I know is that networking and threading stuff is extremely fickle
<Shinmera> I've had so many bizarro hangups and ways for the bot to get stuck
gxt has quit [Remote host closed the connection]
<hayley> Indeed. Fun to have bugs that only appear after you don't touch the bot for a month.
<Shinmera> Right.
<Shinmera> It's one of the reasons why I'm not sure I'd write my next multi-network-protocol-bot in Lisp. Might instead go for Elixir.
<hayley> Had to fix websocket-driver entering an infinite loop too due to checking for "I/O timeout", and threads racing to call CLOSE-CONNECTION and then causing C free() to abort.
<hayley> Well, it's CL+SSL that doesn't like having threads concurrently close SSL streams, but I added a lock to websocket-driver as the latter also has its own state to manage.
gxt has joined #commonlisp
<hayley> After that it was smooth sailing, though. I don't think it's a language thing, honestly. In the case of Elixir/OTP, of course, you could argue that the processes/actors are less likely to go FUBAR that way.
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
<edgar-rft> lapiss: I don't have the book at hand yet, but there's a #cl-school channel for people learning Common Lisp where you probably get faster answers than here :-)
<edgar-rft> oh sorry - the correct channel name is #clschool
enzuru has joined #commonlisp
Brucio-61 has joined #commonlisp
<lapiss> edgar-rft: thanks!
scymtym has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
seletz has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
lisp123 has quit [Read error: Connection reset by peer]
lapiss has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
lapiss has joined #commonlisp
mingus has joined #commonlisp
msk_ has quit [Ping timeout: 268 seconds]
lisp123 has joined #commonlisp
shka has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
MajorBiscuit has joined #commonlisp
aartaka has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
makomo has joined #commonlisp
lisp123 has quit [Quit: Leaving]
ec has joined #commonlisp
<scymtym> hayley: i have implemented auto-reconnect on top of cl-irc rather than using cl-irc. is there anything in particular you would like to talk about?
<hayley> I tried to implement it, by adding a hook on irc:irc-quit-message but this seems to cause a thread leak. The threads I make to handle IRC messages spin in SBCL code.
<hayley> Not sure why that happens at all. I can only guess that somehow the polling code doesn't detect that the socket is closed?
<scymtym> i don't think i have seen that. while in USOCKET:WAIT-FOR-INPUT?
<hayley> Would have to test again, but I think it involved IRC::READ-IRC-MESSAGE, refilling a buffer and SB-SYS:WAIT-UNTIL-FD-USABLE.
mjoerg has joined #commonlisp
Inline has joined #commonlisp
<scymtym> i see. i patched a timeout into that function. but generally, i found that unstable and changing network access requires active probing using the respective mechanism of the protocol, such as ping/pong messages in case of IRC. idle TCP connection can remain seemingly fine for many minutes until an actual data transfer is attempted, for example
kstuart has joined #commonlisp
kstuart has quit [Remote host closed the connection]
<hayley> I'll consider getting a quit message good enough, as something generates those on timeout. But somehow SBCL code spins after quitting.
shka has quit [Quit: Konversation terminated!]
<hayley> Just had to reboot the router; I wonder if my bot still survived.
shka has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
mingus has quit [Quit: mingus]
perrierjouet has quit [Quit: WeeChat 3.7.1]
perrierjouet has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
gxt has quit [Remote host closed the connection]
mjoerg has quit [Ping timeout: 265 seconds]
gxt has joined #commonlisp
nij- has joined #commonlisp
<utis> isn't load-foreign-library supposed to look in /etc/ld.so.conf for paths?
lapiss has left #commonlisp [ERC 5.4 (IRC client for GNU Emacs 28.1)]
son0p has quit [Ping timeout: 252 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
Guest2532 has joined #commonlisp
Guest2532 has quit [Client Quit]
kstuart has joined #commonlisp
<Shinmera> It doesn't on its own. It tries calling dlopen with all the configured matching name combinations.
<Shinmera> It's then up to the OS what it does with that.
epony has quit [Ping timeout: 268 seconds]
<utis> well, i have /etc/ld.so.conf, so i suppose my os /should/ look there
<Shinmera> afaiu it looks in a cache, instead
<utis> so what do i do?
<Shinmera> googling about it would be what I'd do
<utis> i saw some references to ldconfig, but that doesn't seem to do anything
* utis is trying that
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
ym has joined #commonlisp
seletz has quit [Ping timeout: 268 seconds]
<Shinmera> you could also try strace-ing the process to see what paths it's probing
<utis> i suspect the problem was simply that i didn't know that library files must be called lib*
epony has joined #commonlisp
nij- has quit [Ping timeout: 255 seconds]
<utis> yes, that was it
morganw has joined #commonlisp
jmdaemon has quit [Ping timeout: 264 seconds]
pillton has quit [Remote host closed the connection]
acma has joined #commonlisp
kstuart has quit [Ping timeout: 256 seconds]
seletz has joined #commonlisp
pve has joined #commonlisp
son0p has joined #commonlisp
larix has quit [Ping timeout: 268 seconds]
ec has quit [Ping timeout: 255 seconds]
ec has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
jeffrey has joined #commonlisp
jeffrey has quit [Client Quit]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
Lycurgus has joined #commonlisp
msk has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Ping timeout: 255 seconds]
attila_lendvai has joined #commonlisp
<Josh_2> Good mornin :sunglasses:
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
nij- has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
seletz has quit [Ping timeout: 260 seconds]
rpx has quit [Ping timeout: 246 seconds]
rpx has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
gxt has quit [Remote host closed the connection]
nij- has quit [Ping timeout: 260 seconds]
gxt has joined #commonlisp
ec has joined #commonlisp
random-nick has joined #commonlisp
ym has quit [Ping timeout: 260 seconds]
msk has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
mingus has joined #commonlisp
azimut has joined #commonlisp
ec has quit [Remote host closed the connection]
waleee has joined #commonlisp
ec has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
nij- has joined #commonlisp
shka has joined #commonlisp
waleee has quit [Quit: WeeChat 3.7.1]
attila_lendvai has joined #commonlisp
attila_lendvai_ has joined #commonlisp
cage has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
Cymew has quit [Ping timeout: 252 seconds]
attila_lendvai_ has quit [Ping timeout: 256 seconds]
_cymew_ has quit [Ping timeout: 260 seconds]
notzmv has quit [Read error: Connection reset by peer]
rpx has left #commonlisp [Leaving]
ttree has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
<Josh_2> What is ~I supposed to do in a format string?
<beach> clhs ~i
<Josh_2> I read the clhs and I have tried it but I dont see a change to any of my format output
<Bike> what's your format string look like? keep in mind that it doesn't do anything outside of a pprint logical block (i think)
<Josh_2> Also just found out you can use ~^ if you might not always want to use all of your arguments
<Bike> yeah pprint-indent is a nop outside of pprint-logical-block
<Josh_2> I tried a few strings to see
<Josh_2> Do you have an example of a string where I could see its effect?
aartaka has joined #commonlisp
<Bike> (format nil "~<M~3:i~:@_M~:>" '(m m))
<Bike> it won't do anything outside of a pprint context, i.e. the ~< ~:>
<Josh_2> That also has a conditional newline right
<Josh_2> I was just looking at that as well
<Josh_2> Well I do not understand ~< .. ~>
ec_ has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
seletz has joined #commonlisp
ym has joined #commonlisp
<yitzi> ~< ... ~:> is pprint-logical-block
<Josh_2> I guess I do not understand the printer
<yitzi> Try reading clhs 22.2
seletz has quit [Ping timeout: 255 seconds]
MajorBiscuit has quit [Ping timeout: 264 seconds]
<Josh_2> I have just started 22
rgherdt_ has quit [Ping timeout: 252 seconds]
<Josh_2> How idk secure is the (make-random-state)?
<yitzi> Josh_2: try Bike's example with print-pretty set to NIL and then with it set to T
<Josh_2> The prng is implementation dependent
<yitzi> Some implementation's start with it defaulted to NIL, others with T
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<Josh_2> I was not aware of *random-state* make-random-state. They can't be that random if (random ..) repeats constantly :thinking:
<Josh_2> yitzi: ok
<Josh_2> Bike's example is confusing because he passes the list of '(3 3) but it works just the same with an empty list
<Josh_2> But I see the difference with *print-pretty* as t/nil
causal has quit [Quit: WeeChat 3.7.1]
<yitzi> pprint-logical-block wont use the list unless pprint-pop is called, which in this context is ~a, etc.
<Josh_2> hnng
<yitzi> For example, `(format nil "~<~a~:@_~a~:>" '(a b))`
<Josh_2> Yes
<Josh_2> The conditional newline is also confusing :facepalm:
<Josh_2> Bare with me
<Inline> may the bear with you
<Inline> lol
<Josh_2> bear with me :P
seletz has joined #commonlisp
seletz has quit [Ping timeout: 268 seconds]
<Josh_2> Now I have used much larger input I can see :_ working
rgherdt has joined #commonlisp
<Josh_2> ~_ sorry
<Josh_2> ~@:_ forces the insertion of a newline :thinking:
Oddity has quit [Ping timeout: 265 seconds]
<Josh_2> Okay say I a string that contains multiple newlines, say for example "{abc:def\nfoo:bar\n}" Is it possible to have the entire string (when printed properly) tabbed properly for each \n?
<Josh_2> Not sure if I make sense :joy:
<pjb> Josh_2: ys, it's possible, using your own reader macro.
<Josh_2> (format t "TEST: ~%~A" (shasht:write-json '(:abc a :def d) nil)) like this where everything in ~A is moved say 2 characters to the right
<Josh_2> or prefixed with 2 spaces
<phoe> this sounds like a pretty printing kind of problem
<Josh_2> Thanks pjb :joy:
<Josh_2> Ofcourse I could split the shasht output by #\Newline and insert them using the pretty printer, I'm just wondering if its possible without performing the split
<pjb> Oh, if you mean adding space for indentation, you will have to implement it yourself too, perhaps with a ~/ formatter function?
<pjb> here's an example of a formatter function: https://termbin.com/mss39
<dbotton> is there any reason why anyone outside an implementor should care if a list begins with a special form?
<dbotton> I can write functions or macros that do not per evaluate their arguments, etc. so what makes them "special"?
<jackdaniel> it would be hard to write block/return-from without special forms
<pjb> dbotton: what is an implementor? This is a meta-programming language. When I write cl-stepper, am I an implementor?
<Bike> dbotton: it matters for anyone doing analysis of lisp code. they need to handle the special operators specially, and everything else is just a macro or function form.
<Bike> in theory, anyway.
<jackdaniel> did you almost mention the secret special special forms? /me gasps
seok has quit [Read error: Connection reset by peer]
thuna` has joined #commonlisp
<jackdaniel> https://imgur.com/jgKICZH.png for those who are interested in the secret special special form definition
<phoe> dbotton: special forms are built-in macros that do not have expansions readable by the programmer
<phoe> just like macros are user-written special operators that are implemented in Common Lisp
<White_Flame> dbotton: you can't do #'foo if foo is a special form
<White_Flame> nor (apply 'foo ...)
<White_Flame> also, you can't write a function that doesn't evaluate its arguments
<White_Flame> because that happens before/outside the function call itself
<White_Flame> but yeah, if you're just passing around an sexpr without breaking it apart, you don't care what form of sexpr it is
<dbotton> so sounds like the only practical issue for a developer is can't quote it as a function
<dbotton> unless I am of course do code analysis or writing a compiler (implementor)
aartaka has quit [Ping timeout: 268 seconds]
<White_Flame> still want to know what you meant by "I can write functions ... that do not per evaluate their arguments"
<phoe> macros and special operators cannot be #'ed, that's the main thing
<Bike> dbotton: i mean, if you're just writing code it doesn't matter whether an operator is a macro or a special operator as long as you understand the evaluation rules and don't try to grab a macro-function, no.
<Bike> jackdaniel: lol "secret agreement"
aartaka has joined #commonlisp
<dbotton> white_flame I vaguely recall there is a way to change evaluation order and was think also evaluation, perhaps I am forgetting something, fell on bike fairly hard :)[
<Bike> wlecome, petitioner, to the knights of the lambda calculus
<dbotton> actual bicycle not that I fell on bike
NotThatRPG has joined #commonlisp
<Bike> that's good. i mean, it's bad, hope you feel better soon
<Bike> function calls always have all their arguments evaluated, though. you can do whatever you like with macros
<dbotton> bump and scrapes but all good, wife is the one I have to worry about - she took a stick to me for not having a helmet
<dbotton> I think I need the helmet more for her figuratively and literally
<jackdaniel> Bike: it gets better, but I don't want to spam with autogenerated jibberish
<jackdaniel> I've got it list various secret special operators including secret-dimension-shift
<jackdaniel> (and provide the definition ^_^)
<jackdaniel> what a time to be alive -you may waste time on fictional common lisp operators
<Bike> damn, we should have called s-expressionists the knights of the lambda calculus
<Josh_2> Yes
<Bike> good, good. all according to play
<Bike> plan
<dbotton> fuzzy - is there a way to change evaluation order of functions or methods?
<jackdaniel> This will be the last one, sorry for anyone bored! https://imgur.com/cJy0gMI.png :)
<Bike> dbotton: No
<jackdaniel> dbotton: no, but you may change the precedence order of arguments in a generic function specialization
Catie has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
<dbotton> jackdaniel that is probably what I was thinking of (hope)
waleee has joined #commonlisp
sloanr has joined #commonlisp
nij- has joined #commonlisp
Lycurgus has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<char[m]> Is it possible to inline a function at a specific call site?
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<Catie> char[m]: If you make the function inlinable, but not necessarily always inline, you can locally declare it inline in the specific places you want it to be inlined
<Catie> char[m]: http://ix.io/4hPI
zyni-moe has joined #commonlisp
<char[m]> Super cool. Is that example meant for me?
<Catie> It is!
zyni-moe has quit [Quit: died]
<char[m]> Thanks! I would not have guessed that, but it makes sense. Also strangely, the content of that link changed at some point; it was some shell stuff before.
<Catie> Right, it does feel a little odd at first. And that's a bit of an issue, I'll have to remove that pastebin provider from my list
<dbotton> why is a lambda-expression not a form, doesn't it evaluate to a function? that I can store in a variable etc
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
<jackdaniel> what do you mean by that it is not a form?
igemnace has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<dbotton> according to cltl2e it is not a form.
<dbotton> the exact quote "A lambda-expression is not a form; it cannot be meaningfully evaluated"
<char[m]> Lambda is a macro or symbol. When it is a symbol, the work is done by the function form.
<jackdaniel> I think that quoting cltl2 instead of ansi spec is meaningless - what we understand by common lisp today is not cltl2
<dbotton> thanks
<dbotton> How do you call a function that uses a non keyword symbol as a keyword parameter? e.g. (defun my-test (&key ('super "duper")) (print super))
<dbotton> (my-test 'super "test") gives an error
<dbotton> (not sure why anyone would do this anyways but is legal)
<jackdaniel> isn't that (defun my-test (&key ((key-name var-name) "duper")) super)
<jackdaniel> of course you want to put var-name in body
nij- has joined #commonlisp
<dbotton> hmm, supposed to be able to use non-keyword package symbols for keywords
<dbotton> maybe my defun is wrong to start
aartaka has quit [Ping timeout: 265 seconds]
_cymew_ has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
<phoe> dbotton: are you sure you are using the right symbol?
<phoe> if you are in package FOO, then the symbol is going to be FOO::BAR
<Bike> dbotton: you can use non-keyword package symbols, but they're not evaluated. jackdaniel gave you the correct syntax. so (defun my-test (&key ((super super) "duper")) (print super)) then (my-test 'super "test")
<dbotton> ok this worked - (defun my-test (&key ((super strange) "duper")) (print strange))
<dbotton> (my-test 'super "test")
<phoe> if you want external users to be able to use this keyword then remember to export SUPER from your package too
<dbotton> thanks got it
<dbotton> anyone know what the rationale was to add that?
<Bike> rationale to have non-keyword symbols?
<dbotton> yes
<phoe> e.g. methods with &allow-other-keys
<dbotton> that apparently was added later 1988
<Bike> generality, i guess? no reason not to. i've done it a few times for the sake of instance initargs
<phoe> keywords are a global resource and users may want to be able to pass custom keys without the risk of clashing with other methods
<dbotton> phoe for &key
<phoe> dbotton: &allow-other-keys implies &key
<dbotton> ok
<dbotton> that make sense
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 260 seconds]
_cymew_ has quit [Ping timeout: 248 seconds]
tyson2 has joined #commonlisp
anddam has left #commonlisp [WeeChat 3.6]
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
dudek has joined #commonlisp
dra has joined #commonlisp
chrcav has quit [Ping timeout: 256 seconds]
chrcav has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
haku has joined #commonlisp
anddam has joined #commonlisp
nij- has quit [Ping timeout: 248 seconds]
anddam has quit [Client Quit]
anddam has joined #commonlisp
Lycurgus has joined #commonlisp
seletz has joined #commonlisp
jmdaemon has joined #commonlisp
seletz has quit [Ping timeout: 268 seconds]
dudek has quit [Quit: Leaving]
rgherdt has quit [Remote host closed the connection]
sloanr has quit [Remote host closed the connection]
notzmv has joined #commonlisp
dra has quit [Quit: Leaving]
Devon has joined #commonlisp
shka has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 256 seconds]
morganw has quit [Remote host closed the connection]
thuna` has quit [Remote host closed the connection]
Lycurgus has quit [Ping timeout: 256 seconds]
larix has joined #commonlisp