jeosol has quit [Remote host closed the connection]
Skyfire has quit [Quit: WeeChat 3.3]
molson has quit [Ping timeout: 268 seconds]
Bike has joined #commonlisp
rogersm has joined #commonlisp
Guest-liao has quit [Ping timeout: 256 seconds]
rogersm has quit [Ping timeout: 264 seconds]
frgo has joined #commonlisp
Guest-liao has joined #commonlisp
mrcom has joined #commonlisp
mrcom_ has joined #commonlisp
frgo has quit [Ping timeout: 252 seconds]
<jcowan>
Symbols aren't traditionately GCed, though there is no reason why they should not be if they don't have a value, a function, or a non-nil plist.
<hayley>
Symbols are kept live from the package, I guess.
Skyfire has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 268 seconds]
igemnace has joined #commonlisp
pjb has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Ping timeout: 252 seconds]
frgo has joined #commonlisp
MetaYan has quit [Ping timeout: 265 seconds]
frgo has quit [Ping timeout: 265 seconds]
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
zacque has joined #commonlisp
MetaYan has joined #commonlisp
attila_lendvai has joined #commonlisp
frgo has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
nature has quit [Ping timeout: 246 seconds]
rogersm has joined #commonlisp
frgo has quit [Ping timeout: 252 seconds]
rogersm has quit [Ping timeout: 252 seconds]
nature has joined #commonlisp
nature has quit [Ping timeout: 252 seconds]
<beach>
Good morning everyone!
aartaka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
peterhil has quit [Ping timeout: 252 seconds]
jeosol has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
frgo has joined #commonlisp
<semz>
Is there a local counterpart to deftype?
frgo has quit [Ping timeout: 268 seconds]
<Bike>
Nope
<aeth>
I think you can use symbol-macrolet
<aeth>
maybe it won't quite function the same way on edge cases
<semz>
Doesn't seem to work with declarations, unfortunately.
<aeth>
and there's an edge case
<semz>
heh
<beach>
semz: What do you need a type declaration for?
<semz>
Readability, mostly. It's (integer 0 foo), where foo is some (manually) computed constant I'd like to be able to change quickly.
<beach>
Put it in a comment then.
<semz>
Oh no, that's not what I meant. The type itself is used for optimization in various declarations, but I'd like to give it a name so that it can be easily changed, rather than writing (integer 0 18743218) everywhere.
<beach>
So it's to improve performance?
akoana has left #commonlisp [#commonlisp]
<semz>
I think there's some ambiguity about "type" vs "type specifier" here
<aeth>
why not use a DEFTYPE?
<beach>
Why declare the type at all?
<semz>
that's probably what I'll end up going with
mrcom has quit [Quit: This computer has gone to sleep]
mrcom_ has quit [Quit: This computer has gone to sleep]
<semz>
beach: It's number crunching, so there's a pretty big performance difference (~3x) when I can get away with fixnums
<beach>
So why not use FIXNUM?
<semz>
Because it's not necessarily a fixnum!
<aeth>
Personally, I like picking the smallest subset of fixnum and making it a type for numerical code.
<beach>
Then I would just let the implementation figure it out.
<aeth>
The compiler can help check some additional assumptions... and some optimizations would only apply if it can stay a fixnum, which very small integers can more easily do
<aeth>
s/the smallest subset of fixnum/the smallest subset of fixnum that the code can get away with using, usually rounded up to a power of two,/
<beach>
semz: You can use a trick we have used many times for other reasons. You duplicate the code (in a macro obviously), so that the expansion is `(if (typep x 'fixnum) (progn ,@body) (progn ,@body))
<aeth>
For numerical code, anyway. Mostly they're floats, though
<semz>
beach: Oh hm, that's an idea too.
<aeth>
beach: I do that a lot, but usually with TYPECASE
<beach>
Sure, that works too.
<aeth>
even if there are only two branches, it just makes it clearer
<beach>
Sure. In a macro, perhaps not quite as important.
frgo has joined #commonlisp
frgo has quit [Ping timeout: 252 seconds]
JeromeLon has quit [Ping timeout: 265 seconds]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
JeromeLon has joined #commonlisp
semz has quit [Ping timeout: 252 seconds]
MichaelRaskin has quit [Quit: MichaelRaskin]
aartaka has quit [Ping timeout: 265 seconds]
semz has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 268 seconds]
lieven has quit [*.net *.split]
leo_song has quit [*.net *.split]
Shinmera has quit [*.net *.split]
etiago has quit [*.net *.split]
xantoz has quit [*.net *.split]
sukaeto has quit [*.net *.split]
leo_song has joined #commonlisp
sukaeto has joined #commonlisp
lieven has joined #commonlisp
xantoz has joined #commonlisp
Shinmera has joined #commonlisp
Shinmera has quit [Signing in (Shinmera)]
Shinmera has joined #commonlisp
etiago has joined #commonlisp
Bike has quit [Quit: sleep]
cjb has quit []
frgo has joined #commonlisp
frgo has quit [Ping timeout: 258 seconds]
peterhil has joined #commonlisp
notzmv has quit [Remote host closed the connection]
notzmv has joined #commonlisp
notzmv has quit [Read error: Connection reset by peer]
notzmv has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
Qwnavery has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 264 seconds]
<opcode>
what's considered idiomatic for mapcar'ing a function that takes an argument? I.e. if I have a gargantuan list of strings and I want to apply (uiop:split-string) to them, what's the, um, "lispiest way" of doing that? I guess I could just use (loop)?
<opcode>
mapcar seems so much cleaner though
<opcode>
I guess I could shove a lambda in there
<beach>
That, but LOOP is fine too.
<beach>
MAPCAR is fine if you already have the function defined, but becomes less convenient when you have to create an anonymous function.
<opcode>
i have this friend who thinks people who use LOOP are heathens but I rather like it lol
<beach>
Don't listen to everything people say.
<beach>
LOOP is part of the language. So there is nothing "un-lispy" about it.
<opcode>
no of course not, i'm just interested in what's considered "idiomatic"
<opcode>
thanks.
<beach>
I don't know that one is more idiomatic than the other.
<beach>
What is said is just what I personally do.
Cymew has joined #commonlisp
<opcode>
yeah, I guess I was just wondering if there was a cleaner approach I hadn't considered. I'm coming from C# and friends so I'm used to writing for/while loops like they're going out of style
<opcode>
anyways time to figure out why sly keeps crashing emacs
<beach>
Good luck.
<White_Flame>
opcode: where is your parameter coming from, and does it change per iteration step?
<opcode>
White_Flame: i'm splitting a series of strings from a CSV file, so it's always ","
<opcode>
as for where it's coming from, I'm just giving it a literal
<White_Flame>
ok, so (mapcar (lambda (str) (string-split ...)) big-list-o-strings)
<opcode>
yep that's about it
<White_Flame>
for this, I created do-mapcar, which combines the syntax of dolist with mapcar
<opcode>
oh, neat, I'll check that out
<White_Flame>
it's not posted anywhere, let me bring it up
<opcode>
may I suggest adding it to the lisp cookbook, which for someone like me is a great resource
Nilby has joined #commonlisp
<White_Flame>
hmm, that might be reasonable. This is 15 lines with a few features
<White_Flame>
I also made do-hash, do-alist, do-plist to have inline bodies as well, syntactically avoiding the lambda form, but those don't collect results
spiaggia has joined #commonlisp
<White_Flame>
my do-mapcar also supports skipping items, as well as creating multiple output list items for a sinlge input item, though without those it'd be tiny
<White_Flame>
(probably should be item-var instead of key-var, but whatever)
paule32 has joined #commonlisp
<opcode>
it sounds pretty awesome, you should definitely submit a PR to the lisp cookbook folks. As for me I just shoved a lambda in there since my use case is fairly trivial, but I'll keep an eye out for do-mapcar
<opcode>
or rather keep it in mind
<White_Flame>
is the cookbook about creating utility functions or just direct usage patterns?
<spiaggia>
How about Alexandria?
* White_Flame
hasn't really used it
<White_Flame>
I don't think alexandria is about purely syntactic conveniences? it's a deliberately conservative library
<spiaggia>
I take your word for it.
<paule32>
hello
<paule32>
White_Flame: what does this mean? in context - not good?
frgo has joined #commonlisp
<White_Flame>
it's just alexandria's stated scope, as to not be an unbounded kitchen sink library
<paule32>
i hope that lisp is supported in far away future
<paule32>
clisp seems be dead, sbcl ?
<opcode>
White_Flame: the cookbook is basically a repository of "good ways to achieve XYZ" for people like me who aren't familiar with the ecosystem. You come from, say, Go where json parsers and http clients are built into the std library, and you want to know what a reasonably-popular library is without just googling around randomly, then you check the cookbook
<opcode>
I don't get the sense it's meant to be authoritative or definitive
<opcode>
but it beats stackoverflow
* opcode
shrugs
<paule32>
stackoverflow is a recruter more not, they are restriktive
<paule32>
my opinon
<Nilby>
If you find typing lambda's tedious, try my favorite macro: (defmacro _ (&rest exprs) `(lambda (_) (declare (ignorable _)) ,@exprs))
<White_Flame>
implicit params are kinda nasty though
<White_Flame>
(_ (1+ _)) vs (_ (x) (1+ x))
<Nilby>
for multi-arg lambdas one might as well just be clear and use named args
<opcode>
I try to avoid writing macros if at all possible, purely for my own sanity when it comes to the inevitable debugging phase
<White_Flame>
I like the dolist syntax, putting all the header stuff including params, then leaving the rest of the form for the body
<paule32>
i like progn
<Nilby>
I know I'm foolish, but I like implicit pararms. I sometimes wish the whole program was implicit.
amb007 has quit [Ping timeout: 245 seconds]
<paule32>
you mean self contained code ?
<hayley>
7 days before Nilby codes with De Bruijn indices only.
frgo has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<Nilby>
hayley: Yes! I feel like that's how the universe works.
<paule32>
in context of "eval" - the javascript people have supported this as keyword, but nobody of them say that is good practise to use this
<Nilby>
Of course it's very tedious for us mortals
<paule32>
i wonder me, why it give so many ai models, but ai is essential easy, if you step behind the idea
<paule32>
like the universe - the sense of life - the sense is: "make love" - god say it "make love, and grow"
<Nilby>
except in pure lamdbas there are no numbers, so the indices are all lambdas too
<hayley>
No, the numbers are used in place of variable names. e.g. \x.\y.x is ..1
<White_Flame>
stating the essentials is easy, if you're speaking words to a human who already experiences the deep implication of the words. But those statements are not fully self-explanatory and are not codable
<White_Flame>
regardless of language
<hayley>
Er, \.\.1 (assuming you count from 1)
<White_Flame>
and that's why natural language understanding is still not solved
frgo has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 264 seconds]
<Nilby>
I wish people would realize AI is an oxymoron.
<hayley>
It's only artificial intelligence when it doesn't work.
rogersm has joined #commonlisp
frgo has quit [Ping timeout: 258 seconds]
rogersm has quit [Ping timeout: 264 seconds]
rogersm has joined #commonlisp
igemnace has quit [Ping timeout: 268 seconds]
pve has joined #commonlisp
pjb has joined #commonlisp
heisig has joined #commonlisp
peterhil has quit [Ping timeout: 260 seconds]
pjb has quit [Ping timeout: 258 seconds]
igemnace has joined #commonlisp
frgo has joined #commonlisp
rotateq has joined #commonlisp
frgo has quit [Ping timeout: 264 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
frgo has joined #commonlisp
spiaggia has left #commonlisp [ERC Version 5.3 (IRC client for Emacs)]
Guest78 has joined #commonlisp
frgo_ has joined #commonlisp
pjb has joined #commonlisp
frgo has quit [Ping timeout: 245 seconds]
gaqwas has joined #commonlisp
pjb is now known as Guest4556
Guest78 has quit [Quit: Client closed]
pjb has joined #commonlisp
Guest4556 has quit [Ping timeout: 258 seconds]
<Duuqnd>
So, I'm making a command-line program in CL (sinful, I know). Is there a way to replace SBCL's own command-line arguments without changing the C code? I kinda don't want SBCL's usage text to come up when a user wants help about my program.
<hayley>
You could change the toplevel function to your own, and have it detect --help and similar.
<jackdaniel>
Duuqnd: for somewhat systematic approach for building cli tool check out the library net.didierverna.clon
<Duuqnd>
What would I need to do in the toplevel to stop SBCL from using the arguments? Just change the posix-argv variable?
<Duuqnd>
madnificent: --script is nice and all, but I'm hoping to have my program just be an executable and work as is expected.
dre has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 264 seconds]
<madnificent>
certainly possible. i vaguely remember having some scripts running on SBCL or ECL in binary form. i'm fairly sure i didn't distribute them. you could also start with a shebang and move to a binary later when you need it.
<jackdaniel>
madnificent: I've linked a library that automates all that in a systematic fashion, there is no need for a duct taping
<jackdaniel>
s/automates/abstracts away/
<Duuqnd>
I was reading some parts of the Clon source to try to figure it out and I saw a comment that reads (paraphrasing a bit) "When a standalone executable is dumped, [only user-level options being present is] always the case" but that doesn't seem to match what I'm experiencing.
<madnificent>
jackdaniel: yeah, it's mentioned on the cliki page too. it was my impression that it felt too heavy right here.
<pve>
Duuqnd: If you use sb-ext:save-lisp-and-die, then you should provide your own toplevel function, like hayley suggested
<Duuqnd>
I'm doing that, yet when I type "--help" it's SBCL's usage message that shows up instead of mine.
<jackdaniel>
Duuqnd: I think that clon expects you to call a function clon:dump or something like that
<Duuqnd>
Ah, yes, it seems to use :save-runtime-options when calling save-lisp-and-die
<pve>
Duuqnd: ok, then you can also provide :save-runtime-options t
<Duuqnd>
Yeah, that what I'm going to do
<pve>
if you want to handle --help
<pve>
Duuqnd: oh, right, didn't see your message
<Duuqnd>
Well, guess I have what I was looking for. Thanks for the help, everyone.
rotateq has quit [Quit: ERC (IRC client for Emacs 26.3)]
kakuhen has joined #commonlisp
skeemer has quit [Read error: Connection reset by peer]
skeemer__ has joined #commonlisp
Nilby has quit [Ping timeout: 245 seconds]
notzmv has quit [Ping timeout: 245 seconds]
jemoka_ has quit [Ping timeout: 245 seconds]
Krystof has quit [Ping timeout: 245 seconds]
dbotton has quit [Ping timeout: 245 seconds]
jhi has quit [Ping timeout: 245 seconds]
dbotton has joined #commonlisp
jhi has joined #commonlisp
jemoka has joined #commonlisp
markasoftware has quit [Ping timeout: 245 seconds]
markasoftware has joined #commonlisp
hendursa1 has joined #commonlisp
notzmv has joined #commonlisp
pjb has joined #commonlisp
Krystof has joined #commonlisp
gaqwas has quit [Ping timeout: 264 seconds]
hendursaga has quit [Ping timeout: 276 seconds]
Nilby has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
aartaka has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
lukego has joined #commonlisp
winning-luser has quit [Quit: zzz]
tfb has joined #commonlisp
edgar-rft has joined #commonlisp
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
tfb has quit [Quit: died]
lukego has left #commonlisp [#commonlisp]
kakuhen has quit [Quit: Leaving...]
rotateq has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.3]
heisig has quit [Ping timeout: 264 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
frgo_ has quit [Remote host closed the connection]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
Nilby has quit [Ping timeout: 245 seconds]
nckx has quit [Quit: ♪ It's the most wonderful time of the year 🎃]
frgo has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
nckx has joined #commonlisp
domovod has joined #commonlisp
heisig has joined #commonlisp
heisig has quit [Quit: Leaving]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
igemnace has quit [Remote host closed the connection]
hendursa1 has quit [Ping timeout: 276 seconds]
hendursa1 has joined #commonlisp
Bike has joined #commonlisp
random-nick has joined #commonlisp
peterhil has joined #commonlisp
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
random-nick has quit [Read error: Connection reset by peer]
random-nickname has joined #commonlisp
random-nickname has quit [Client Quit]
random-nick has joined #commonlisp
kevingal has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
totoro has joined #commonlisp
mrcom_ has joined #commonlisp
mrcom has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
<JeromeLon>
I want to find, remove, and return the first element of a vector that matches a predicate. DELETE is *so* close, but it doesn't return it. I could FIND and DELETE, but that's duplicating the work. The only solution I found is POSITION, followed by (DELETE-IF (lambda (x) t) seq :start position :end (1+ position)). This last bit gives me nausea. Can anyone suggest something less ugly?
<JeromeLon>
(I do know that delete does not garantee that my original vector contains the result)
<Bike>
i suppose i would do position, then make-sequence/make-array, then replace twice
<Bike>
then put that all in a function so it doesn't look ugly, ofc
<Bike>
should be pretty much the most efficient way to go about it
patrice has joined #commonlisp
<JeromeLon>
Bike: thanks! And thanks for suggesting replace, I'll use it instead of the DELETE, to change the original vector, it brings several improvements
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
jealousmonk has joined #commonlisp
attila_lendvai has joined #commonlisp
tyson2 has joined #commonlisp
shka has joined #commonlisp
Cymew has quit [Ping timeout: 258 seconds]
JeromeLon has joined #commonlisp
<JeromeLon>
Shinmera: Thanks! I feels like a basic need, indeed. I see why you need this lib in several projects
hhdave has joined #commonlisp
<Shinmera>
not covered by the docs, but it also has a * variant that is O(1), but changes order of elements.
JeromeLon has quit [Quit: WeeChat 3.0.1]
Demosthe1ex is now known as Demosthenex
icer has quit [Ping timeout: 264 seconds]
heisig has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
<dieggsy>
A while ago I think someone suggested a way to create a graph of class structure/inheritance - does anyone have any ideas? Allegro's composer has a utility for this, but it seems to crash on Emacs for macos (without X11). We have some custom method that user graphviz, but I'm wondering if there's a more straightforward or portable way
<beach>
dieggsy: The CLIM listener of McCLIM can do that.
<beach>
As I recall, it's a command that starts with comma, like ,show-class-subclasses and ,show-class-superclasses
<beach>
Something like that.
<dieggsy>
Ah, I think that was it. i'll check that out, thanks
<beach>
Sure.
<beach>
The #clim participants might know more.
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
domovod_ has joined #commonlisp
domovod has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
heisig has quit [Ping timeout: 258 seconds]
domovod_ has quit [Quit: WeeChat 3.3]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
cage has joined #commonlisp
tyson2 has joined #commonlisp
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<lucerne>
Can I use CL from other languages, such as Python or Perl?
<lucerne>
(I guess that would be much faster than using some form of IPC, such as ZeroMQ?)
<beach>
That would depend a lot on the implementation of both Common Lisp and that other language.
<lucerne>
beach: Perl and Python both have one canonical implementation AFAI, and I am open to using any (free) CL, though I prefer SBCL.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<mfiano>
A quick search suggests heisig's cl4py is the way
tyson2 has quit [Ping timeout: 264 seconds]
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
tyson2 has joined #commonlisp
<lucerne>
Mfiano: Thanks. Anything for Perl?
<mfiano>
Doubtful for Perl or Raku
<lucerne>
Is ECL usable for this purpose?
<Xach>
lucerne: out of curiosity, what kind of functionality in CL do you want to access?
<Bike>
please post descriptions of links you post if their content is not obvious from the url
<lisp123>
Need Common Lisp to take over Apple Silicon!
<lisp123>
Apple Live Event Sorry
<lucerne>
Xach: I currently just want a language (any language) that I can code once in, and use it anywhere. CL is one of the nicest langs I know, so I wanted this main lang to be CL. I guess I’d go with zig now.
<Bike>
Thanks
<Xach>
lucerne: the easiest way to do that is to become important enough at a company or other organization that you can dictate technical details.
<Xach>
it is harder to make CL interoperate with the technical decisions imposed externally
<lucerne>
I actually want this for my own personal projects.
<Xach>
Oh, then you can simply use CL and be done!
<lucerne>
Perl is nicer for what I have in mind.
<lucerne>
But I do not want to duplicate some basic functionality between CL and Perl and others. I can’t afford that, being just one person 😄
<Xach>
I've been pretty happy simply ditching perl and using CL for everything, but it is a personal choice.
<Xach>
It's hard for me to imagine perl being a good choice for me for anything any more.
<mfiano>
Raku (formerly Perl 6) might be worth looking into, as it has a lot in common with CL, but this is off-topic here.
<copec>
Everyone should just implement their language by embedding it in CL
lottaquestions has joined #commonlisp
lottaquestions_ has joined #commonlisp
<copec>
It feels like there is an exponential explosion of new languages in the last 10 years
<lisp123>
copec: All inferior to Common Lisp ;)
<lucerne>
Mfiano: Raku’s performance is inferior to perl5 though, isn’t it?
attila_lendvai has quit [Ping timeout: 264 seconds]
<mfiano>
This isn't on topic here.
aartaka has quit [Remote host closed the connection]
<edgar-rft>
there's #lispcafe for not-so-on-topic things :-)
<pjb>
lucerne: you can use libecl.so and dynamically link it into any program, to use Common Lisp.
<pjb>
lucerne: but if you're afraid of the work, you can still avoid duplication by having two programs, one in perl and one in common lisp, and communicating thru a pipe or sockets.
<stacksmith>
copec: there is an exponential explosion in everything in the last 10 years...
<stacksmith>
Good morning everyone
<greyrat>
Good morning!
<greyrat>
It's actually night here :))
<jcowan>
on IRC, it's morning when you join / start talking, and night when you leave / stop talking.
<stacksmith>
indeed.
<jcowan>
much more useful than solar or civil time
<pjb>
/clear`
<stacksmith>
only if you don't really care about what time it is...
<stacksmith>
does anybody really care...
aeth has quit [Ping timeout: 252 seconds]
aeth has joined #commonlisp
stacksmith has quit [Quit: WeeChat 2.8]
stack_ has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
<pjb>
lisp123: well, I said that :around et al. are better reserved to client code, but actually this has a problem: if the client code adds a :around method on one of your class, this will also be called for other subclasses of yours, in other client libraries.
<pjb>
lisp123: so even client code may want to refrain adding methods on classes or subclasses that are not its own.
shka has quit [Quit: Konversation terminated!]
<lisp123>
pjb: I see. I earlier thought you had meant to use it to avoid changing any interfaces for the client
<lisp123>
But that's an interesting problem (given inheritance)
<pjb>
What those method do, is to wrap behavior in the right position even for subclasses provided by the client.
<pjb>
lisp123: notice the cm and mc example (m is a "mixin", and depending on the order it's in the superclasses list, the order of the methods called.
gaqwas has joined #commonlisp
xaotuk has joined #commonlisp
<pjb>
lisp123: notice also with the cm example, the importance of (when (next-method-p) (call-next-method)) even in the inner primary method (in the superclass).
<lisp123>
How did you get the formatting like that?
<pjb>
hand indented.
<pjb>
We could have written code for it, but since it's one-shot.
xaotuk has joined #commonlisp
<lisp123>
Ah nice. This will be a very useful reference, thanks for sharing
<lisp123>
(and writing of course)
<pjb>
termbin pastes die after one month, so copy them and save them out.
<lisp123>
Already done :D
Qwnavery has joined #commonlisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
xaotuk has quit [Ping timeout: 260 seconds]
xaotuk has joined #commonlisp
tyson2 has joined #commonlisp
xaotuk has quit [Ping timeout: 258 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
xaotuk has joined #commonlisp
xaotuk has quit [Ping timeout: 264 seconds]
heisig has quit [Ping timeout: 258 seconds]
xaotuk has joined #commonlisp
winning-luser has joined #commonlisp
xaltsc has joined #commonlisp
<xaltsc>
Hey, is there a "Common Lisp for the Schemer" somewhere ? All the guides/tutorials I've found are either too basic or too advanced...
<lisp123>
xaltsc: Which ones have you tried so far?
<lisp123>
I would think Practical Common Lisp would be perfect for a Schemer because they already understand the basics of Lisp, but not sure if you think its too advanced. If so, ANSI Common Lisp, which is a bit easier to read, might be sutiable
<Alfr>
xaltsc, you can't, e.g. tail call optimization isn't mandated and some implementations might exhaust the stack; also no call/cc.
xaotuk has quit [Ping timeout: 258 seconds]
<lisp123>
xaltsc: Unfortunately (I can get your perspective now), I can't think of anything that would be perfect for you. You might need to just bite the bullet and read through PCL
<xaltsc>
Alfr: my entry in the clisp world would only be nyxt configuration right now, so I don't have to worry about this kind of stuff
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
xaotuk has quit [Ping timeout: 260 seconds]
xaotuk has joined #commonlisp
xaotuk has quit [Ping timeout: 264 seconds]
xaotuk has joined #commonlisp
<jcowan>
I found PCL very readable, but I'm an odd case because I wrote CL (in anger) about the same time I learned Scheme (from reading the Rabbit compiler, which is written in Scheme and Maclisp). I never returned to CL after that except to update myself, but got involved in Scheme much more so.
rogersm has quit [Quit: Leaving...]
<jcowan>
beach: Of course you can define away "unlispy CL features" by saying "Everything in CL is lispy". But if you look at how people actually use the term, they seem to focus on `format` as the most unlispy feature, followed by `loop` and CLOS in that order.
<White_Flame>
CLOS is considered unlispy?
<jcowan>
I agree about `format`, think `loop` could have been designed better but the idea was a good one.
azimut has quit [Remote host closed the connection]
heisig has joined #commonlisp
<lisp123>
White_Flame: Seems like there is two eras of Lisp - The ones before format / loop / CLOS and the ones after it
azimut has joined #commonlisp
<White_Flame>
well, the old ones really sucked because they used symbol plists as an application database, and did spaghetti mutation everywhere
<lisp123>
The one before was DIY, you got the primitives, go have fun. The ones after is like, why reinvent the wheel, use these useful tools. That's my two cents
<White_Flame>
I don't know when, say, hashtables came around compared to format/loop
<jcowan>
Format, howevs, comes straight from Fortran, and is a sore thumb even there.
<CodeBitCookie[m]>
White_Flame: I agree with this thought.
<jcowan>
There should be a bottom-up MOP+CLOS book that explains how a CLOS is done, analogous to phoe's condition book.
<Bike>
amop is kind of written like that... though it skips some of the efficiency details and isn't quite in line with the MOP "standard"
heisig has quit [Client Quit]
<lisp123>
Perhaps SICL will be best for that. Otherwise beach should write a book on it :)
* jcowan
confesses to never having read amop except for the publicly available parts.
<Bike>
well, i haven't read the conditions book, so it's fine
<lisp123>
jcowan: You can also check out Sonja Keene's book and then the standards. Then look at Portable Common Loops
<jcowan>
you can of course macrofy this to avoid the progn
<_death>
jcowan: sure.. but that's too much typing while debugging.. and I knew no error would be signaled
<jcowan>
(while-tracing foo (foo ...))
<_death>
instead I kept the flow and just (prog2 (trace foo) <the form> (untrace foo))
<mfiano>
perfect use for prog2, yes
<jcowan>
and put while-tracing in your init file
<_death>
it's not that often that I need it ;)
<_death>
the point was to brag about use of PROG2, not create tools for the future
<jcowan>
fair nuf
<greyrat>
Is Gnu CL basically dead? I think it can do C-ABI shared library exports?
taiju has joined #commonlisp
defaultxr has quit [Ping timeout: 268 seconds]
<jcowan>
What is "dead"? The last release was in 2014, but it is still being maintained. Java weevils will tell you CL is dead, but there are plenty of other weevils who will tell you Java is dead.
lad has joined #commonlisp
<jcowan>
(They are known as the lesser of the two weevils.)
defaultxr has joined #commonlisp
lad has quit [Ping timeout: 260 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
ec has quit [Remote host closed the connection]
srhm has quit [Read error: Connection reset by peer]
<greyrat>
jcowan: Any idea if GCL supports exporting shared libraries (`.so`, `.dylib`)?
k60 has joined #commonlisp
ec has joined #commonlisp
k60 has quit [Quit: k60]
k60 has joined #commonlisp
k60 has quit [Client Quit]
k60 has joined #commonlisp
k60 has quit [Ping timeout: 260 seconds]
wyrd has quit [Ping timeout: 276 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Alfr has quit [Ping timeout: 250 seconds]
kevingal has quit [Remote host closed the connection]
lad has joined #commonlisp
wyrd has joined #commonlisp
<yitzi>
greyrat: Keep in mind that bordeaux-threads does not support GCL and that several platforms that used GCL to support Maxima now use SBCL or something else.
<mfiano>
GCL is not even a CL, yet
<yitzi>
I had heard that the maintainers don't want to be. Is that true?