<aeth>
quick someone prove P = NP while it's unlogged
rkazak has joined #commonlisp
<stylewarning>
P = NP // P/P = NP/P (P/=0) // 1 = N QED
stylewarning has quit []
stylewarning has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Remote host closed the connection]
jack_rabbit has joined #commonlisp
Devon has joined #commonlisp
olnw has joined #commonlisp
Devon has quit [Ping timeout: 260 seconds]
clothespin has left #commonlisp [#commonlisp]
decweb has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
cmack has quit [Remote host closed the connection]
cmack has joined #commonlisp
surabax has quit [Quit: Leaving]
rkazak has quit [Ping timeout: 245 seconds]
szkl has quit [Quit: Connection closed for inactivity]
rkazak has joined #commonlisp
djent has quit [Read error: Connection reset by peer]
djent has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
kevingal has joined #commonlisp
bpanthi977 has quit [Quit: bpanthi977]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 245 seconds]
Pixel_Outlaw has joined #commonlisp
<beach>
Shinmera: Yes, I see.
<stylewarning>
beach: will you be further pursuing any of your music notation projects
<beach>
stylewarning: Clovetree is a long-term project, because I am so busy with SICL, but I haven't abandoned it.
<beach>
Clovetree = Gsharp v2.
<stylewarning>
:)
<stylewarning>
beach: do you play any musical instruments
rkazak has joined #commonlisp
<beach>
I used to. Not so much anymore. I have a keyboard hooked up to my computer.
<beach>
A MIDI keyboard I mean.
<stylewarning>
(:
<beach>
Playing an instrument somewhat well requires hours of practice, perhaps not every day, but at least every week, just to maintain the level. I can't handle that.
<stylewarning>
beach: will you be attending ELS?
<beach>
That's the plan, yes. You?
<beach>
I'll bring the translator of Lisp in Small Pieces. If you bring your copy, she will sign it for you. :)
<stylewarning>
beach: tentative yes — and i'm scared i don't know the location of my LiSP book :(
<stylewarning>
it's buried in 1 of some 50 boxes
<beach>
Ouch! You moved?
<stylewarning>
yes
<stylewarning>
maybe she can sign my arm in permanent marker
<beach>
Heh!
<beach>
So where do you live these days?
<stylewarning>
beach: between Los Angeles and Boston
<beach>
I see. :)
rkazak has quit [Ping timeout: 265 seconds]
Devon has joined #commonlisp
pabs3 has joined #commonlisp
Devon has quit [Ping timeout: 252 seconds]
pabs3 has quit [Remote host closed the connection]
rkazak has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 264 seconds]
pabs3 has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
rkazak has joined #commonlisp
pve has joined #commonlisp
mishoo has joined #commonlisp
mgl has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
kevingal has quit [Ping timeout: 248 seconds]
shka has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
rkazak has joined #commonlisp
Devon has joined #commonlisp
<younder>
Beach: I am starting a sub-project of instruction fusion for SSE and AVX integration into that SICL compiler.
<younder>
I mean 6000 instructions can't be ignored :)
<younder>
Finding that elusive good pattern for OP generation might take some time, but I think it is worth it.
<younder>
I mean most compilers for Lisp started in the 1980's or earlier and don't at a structural level take modern processor architecture into account.
<younder>
So I have chosen to focus on Vector instructions and cache alignment. Secondary NUMA
<younder>
I will keep you posted.
rkazak has quit [Ping timeout: 264 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
younder has quit [Remote host closed the connection]
younder has joined #commonlisp
rkazak has joined #commonlisp
<beach>
I see. I'll read up later. I am very busy today; my favorite coauthor is coming over for lunch.
<beach>
younder: CPS is not a replacement for SSA.
<beach>
Shinmera: Is it just me getting a "Bad gateway" error, when I try to access the IRC logs on tymoon.eu?
<beach>
younder: I much prefer the register-allocation algorithm that hayley implemented for the x86 backend. I thought I invented it, but apparently it has been published somewhere. I don't know the name of it, but it is based on the OPT algorithm for page replacement in operating systems.
<younder>
beach: seems a extension of Cliff Click's approach to hotjava
<beach>
That would make sense.
<beach>
Then, a backend library for Common Lisp compilers should probably ultimately contain several algorithms for register allocation.
<beach>
Anyway, I must go do some incremental cooking.
rkazak has quit [Ping timeout: 264 seconds]
<younder>
I consider the register allocation algorithm a -done deal- we have already settled on it.
<younder>
We are pretty much sacrificing size, and going for registry optimization to achieve java like speeds.
<younder>
By massive inlining
<younder>
Whether it works will depend on the cache alignment. Memory reads are slow compared to computation. I will give it some thought.
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 245 seconds]
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
euandreh1 has joined #commonlisp
scymtym has quit [Ping timeout: 244 seconds]
euandreh1 has quit [Client Quit]
scymtym has joined #commonlisp
euandreh has quit [Ping timeout: 260 seconds]
euandreh has joined #commonlisp
McParen has joined #commonlisp
rkazak has joined #commonlisp
yaneko has quit [Quit: parting]
Devon has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
alternateved has joined #commonlisp
euandreh has quit [Ping timeout: 276 seconds]
euandreh has joined #commonlisp
euandreh has quit [Client Quit]
<Shinmera>
beach: my server ran outta disk space and that killed the db
vardhan has joined #commonlisp
<Shinmera>
was trapped in the cold at a motorcycle course until now so I couldn't fix it earlier
<younder>
-trapped in the cold at a motorcycle course- that's a new one
<younder>
Canadian women these days..
yaneko has joined #commonlisp
<McParen>
hey all
<McParen>
is there a mechanism to provide a type conversion function, so that when a function (like for example concatenate) expects a char, but gets an integer, that it can automatically convert the integer to a char?
<McParen>
for example: (concatenate 'string (list #\a #\b) (vector 66))
<beach>
Shinmera: Oh, I see.
<McParen>
so that it automatically calls code-char to make #\B out of 66?
<younder>
The spec specifies the result not how it is achieved, but yes that sound about right.
amb007 has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
<beach>
McParen: There is no such thing that could be specified by the user, but some functions take a "designator", and then the object is converted to the object it designates. No such thing for CONCATENATE, though.
Equill has quit [Ping timeout: 246 seconds]
<beach>
... and an integer is not a "character designator".
jrx has joined #commonlisp
amb007 has joined #commonlisp
<younder>
,(concatenate 'string (list #\a #\b)
<younder>
,(concatenate 'string (list #\a #\b))
<ixelp>
=> "ab"
<younder>
so #\a is what 97, but its to type character not of type integer
<younder>
,(char-code #\a)
<ixelp>
(char-code #\a) => 97
<beach>
That's not specified by the standard, though.
djent has quit [Read error: Connection reset by peer]
<younder>
,(type-of (code-char #\a))
<ixelp>
ERROR: The value #\a is not of the expected type (MOD 1114112).
<younder>
,(type-of (char-code #\a))
<ixelp>
=> (INTEGER 0 536870911)
rkazak has quit [Ping timeout: 248 seconds]
<younder>
I stand corrected
djent has joined #commonlisp
<beach>
What type-of returns is also largely implementation specific.
<younder>
In Unicode the first 128 characters as ASCII
Thermoriax_1 has joined #commonlisp
<beach>
Why are you telling us that?
<younder>
Cudos for being able to read the spec Beach. I mostly learn by '-fighting- the compiler. Before LispWorks now SBCL.
<McParen>
so you basically have to manually check (and convert) the elements before passing them to map, concatenate, etc.
<beach>
McParen: Yes.
Thermoriax has quit [Ping timeout: 245 seconds]
<younder>
Beach I was saying I know what the number is, just not how it is interpreted by the compiler type wise.
<McParen>
it would be nice to be able to specify "if you expect X but get Y, use Y-to-X".
yaneko has quit [Quit: parting]
<beach>
McParen: Yes, this is a major oversight by the people who wrote the standard.
yaneko has joined #commonlisp
rkazak has joined #commonlisp
<younder>
The behavior of 'coerce' is confusing to me
<younder>
,(coerce #\a 'integer)
<ixelp>
ERROR: #\a can't be coerced to type INTEGER.
<younder>
In light of (type-of (code-char #\a)) above.
msv has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 276 seconds]
<younder>
So I concur the spec could be better.
yazz has quit [Ping timeout: 260 seconds]
<beach>
My remark was sarcastic.
amb007 has joined #commonlisp
yazz has joined #commonlisp
<younder>
Well mine wasn't. You really need to know the type that is returned.
rkazak has quit [Ping timeout: 248 seconds]
dtman34 has quit [Ping timeout: 260 seconds]
<jackdaniel>
clim has presentation translators for that
<jackdaniel>
there may be many applicable, so there are priorities
rkazak has joined #commonlisp
luis0 has joined #commonlisp
<phoe>
younder: COERCE is not user-programmable (sadly)
random-nick has joined #commonlisp
dtman34 has joined #commonlisp
rkazak has quit [Ping timeout: 245 seconds]
rkazak has joined #commonlisp
mgl has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 252 seconds]
<jackdaniel>
just define a generic function convert
<jackdaniel>
convert, equals, sxhashs
vardhan has quit [Ping timeout: 252 seconds]
<jackdaniel>
and more;p
<jackdaniel>
with default methods calling coerce, equal(p?) and sxhash
vardhan has joined #commonlisp
jack_rabbit has quit [Ping timeout: 260 seconds]
decweb has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
jonatack has joined #commonlisp
yaneko has quit [Quit: parting]
rkazak has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
josrr has joined #commonlisp
jonatack has joined #commonlisp
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
wacki has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
rkazak has joined #commonlisp
m5zs7k has quit [Ping timeout: 252 seconds]
<Bubblegumdrop>
(defun do-what-i-want () ) ; left as an exercise for the AI
<Bubblegumdrop>
emacs kinda already has this with gpt-dwim
<Bubblegumdrop>
since lisp is very prose-y it works pretty well too
rkazak has quit [Ping timeout: 264 seconds]
<younder>
Call me old fashioned, but I prefer to write my code unsassisted. Slow and stumbeling though I might be at times..
m5zs7k has joined #commonlisp
<younder>
I have noted that CHAT GPT 4 is quite good at elisp code but I have never seen it used for Common Lisp.
<younder>
Anyone here have any experience with that?
<Bubblegumdrop>
yeah I use it
<Bubblegumdrop>
it's pretty good but if you know better it's terrible
msv has joined #commonlisp
<Bubblegumdrop>
I use it a lot for "generate these generic methods: generic-method-a generic-method-b ..."
<Bubblegumdrop>
I usually only ask for the outline
<Bubblegumdrop>
then I'll copy the defgenerics and ask "implement these methods given this class"
<Bubblegumdrop>
It's pretty cool, it works naturally like a repl
<Bubblegumdrop>
I think they call this "CHOP" chat oriented programming
<Bubblegumdrop>
It works very well with gpt.el in emacs
<Bubblegumdrop>
You can even send the entire contents of multiple buffers, so write your prompt in *scratch* like "Take all these files and integrate them into a single module"
<Bubblegumdrop>
very powerful.
<Bubblegumdrop>
gpt struggles with more advanced code. if you've read PAIP implementing a prolog interpreter/compiler with CPS is what I'm talking about. gpt struggles with that kind of "conceptual" stuff.
<Bubblegumdrop>
but since lisp is extremely prose-y it's really good for modeling real world data like "generate the SQL query for this structure" "generate the defclass that matches this SQL query" and so on
<Bubblegumdrop>
good data in => good data out
<Bubblegumdrop>
I do have the prooblem you describe though
<Bubblegumdrop>
If you rely heavily on GPT you can feel your skills atrophying
<Bubblegumdrop>
so I only use it when I'm stumped now or if it's really boiler plate
<jackdaniel>
that's how our small internet civilization falls into slop :)
<Bubblegumdrop>
it's really good for writing tests too
rkazak has joined #commonlisp
<Bubblegumdrop>
my blog was slop before AI lol
<younder>
nice to know
<Bubblegumdrop>
iirc you can use gpt.el offline with ollama too
<Bubblegumdrop>
I haven't really worked with that too much but need to focus more on offline llms
yaneko has quit [Quit: parting]
jack_rabbit has joined #commonlisp
yaneko has joined #commonlisp
yaneko has quit [Client Quit]
yaneko has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rkazak has quit [Ping timeout: 246 seconds]
surabax has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
vardhan has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rkazak has joined #commonlisp
Equill has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
elnegro has joined #commonlisp
luna-is-here has quit []
amb007 has joined #commonlisp
luna-is-here has joined #commonlisp
elnegro has quit []
apac has joined #commonlisp
<McParen>
does anyone know whether methods can be specialized on structs? In SBCL this seems to work, but it this a standard behavior?
<McParen>
I thought methods only can be specialized on classes, neither types nor structs.
<boigahs>
The type dispatch works on any type
<|3b|>
defstruct makes a class if you don't specify :type
<boigahs>
Well, any class, but classes are more than just CLOS
<|3b|>
it is just a STRUCTURE-CLASS rather than STANDARD-CLASS
<|3b|>
methods can only specialize on classes (and EQL), but structs and some other types are also classes
<McParen>
so in general, methods can specialize on structs.
<McParen>
does this go further, can classes be inherit from structs?
<McParen>
ok, seems not to work, defclass doesnt accept structure-class.
<|3b|>
structure-classes defined with defstruct sort of can :)
rkazak has joined #commonlisp
<|3b|>
don't think defclass can though
<McParen>
common lisp is so weird and inconsistent (still great though).
<|3b|>
with MOP and custom metaclasses it gets a bit more ambiguous, you could probably make something that looked like it did, but then you would start arguing definitions and probably better to just treat it as something else
<boigahs>
It's consistent, it's just the definitions are a bit different from other languages
<boigahs>
At least it's consistent *here*
<McParen>
how is it consistent to have standard-class and stucture-class which are incompatible to each other?
<|3b|>
you can't inherit from INTEGER or LIST classes with DEFCLASS either
<|3b|>
or any number of other classes
<|3b|>
it consistently defines a class hierarchy, and assigns properties to some branches of that tree
bpanthi977 has joined #commonlisp
Inline has quit [Ping timeout: 244 seconds]
<phoe>
McParen: what do you mean by "consistent"?
<phoe>
not everything can inherit from one another, if that's what you mean
<|3b|>
for performance reasons (and history, compatibility, etc) it split user-defined composite data structures into STANDARD-CLASS and STRUCTURE-CLASS, which behave differently
<|3b|>
if they were interchangeable, you wouldn't need both
<|3b|>
if it were made 20 years later, it might not have made that decision, but it is probably reasonable for the time, and people do still use both options
<McParen>
phoe: i was just answering boigahs comment that it is consistent. defclass being unable to inherit from structs but methods being able to specialize on structs is inconsistent.
<|3b|>
you are assuming methods are subsidiary to defclass, which is wrong in CL
<|3b|>
methods consistently work on all classes, even those outside the DEFCLASS subtree
<McParen>
yes, i am actually positively surprised that specializing on structs works, i assumed that it did not.
<|3b|>
though i guess you could argue "integers are full classes you can subclass" would be more consistent, it tends to not work well in practice
<|3b|>
and then you end up with some integers you can subclass and some you can't, which is even more confusing
<|3b|>
because doing full class dispatch on every iteration to increment your loop counter is not fun
<|3b|>
"oops, the loop bound was a lunar-int, which always compares false on days with a full moon, maybe the loop will terminate tomorrow" :p
<aeth>
Bubblegumdrop: boilerplate shouldn't really exist in Lisp and the APIs are too obscure (or you may be writing them!) to be in the training data (although it may hallucinate a good API to implement)
<aeth>
Bubblegumdrop: tests? now that's a use that might make sense
<aeth>
|3b|: This is one sense where an older language is better than a newer language... In an older language like CL, it had to run on the machines of the time, which are slower than today's smart toasters. In a newer language, they would have gone with consistency over performance and might have gone too far, especially in the mid '90s through the '00s when it looked like Moore's law would solve all software
<aeth>
inefficiencies.
<Bubblegumdrop>
aeth you can even ask it to come up with weird fringe cases which I find it's very goood at
<aeth>
|3b|: So CL has a lot of "free" performance at the expense of some inconsistency.
<aeth>
Although in theory, a JIT could do similar, just at the expense of making only roughly two independent implementations viable due to all of the extra effort.
rkazak has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
apac has quit [Ping timeout: 245 seconds]
rkazak has quit [Ping timeout: 265 seconds]
wacki has quit [Quit: Leaving.]
wacki has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
bicalot has quit [Remote host closed the connection]
rkazak has joined #commonlisp
akoana has joined #commonlisp
zwr has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
amb007 has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
pve has quit [Quit: leaving]
molson has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
molson_ has quit [Ping timeout: 260 seconds]
mgl has joined #commonlisp
amb007 has joined #commonlisp
Everything has joined #commonlisp
rkazak has joined #commonlisp
Thermoriax has quit [Ping timeout: 248 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
varjag has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
jon_atack has joined #commonlisp
rkazak has quit [Ping timeout: 244 seconds]
jonatack has quit [Ping timeout: 248 seconds]
rogersm has joined #commonlisp
rogersm has quit [Client Quit]
varjagg has joined #commonlisp
varjag has quit [Ping timeout: 276 seconds]
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
mishoo has quit [Ping timeout: 276 seconds]
rkazak has quit [Ping timeout: 246 seconds]
jon_atack has quit [Ping timeout: 252 seconds]
alendvai__ has joined #commonlisp
jonatack has joined #commonlisp
Thermoriax has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
spdegabrielle has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
varjagg has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
Everything has quit [Quit: leaving]
triffid has quit [Read error: Connection reset by peer]
triffid has joined #commonlisp
alternateved has quit [Remote host closed the connection]
craigbro has joined #commonlisp
rkazak has quit [Ping timeout: 246 seconds]
wacki has quit [Quit: Leaving.]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
mgl has quit [Ping timeout: 265 seconds]
Inline has quit [Quit: Leaving]
alendvai__ has quit [Ping timeout: 252 seconds]
alendvai__ has joined #commonlisp
sailorCat has quit [Remote host closed the connection]