szkl has quit [Quit: Connection closed for inactivity]
<pve>
Hi, is it allowed to do (with-accessors ((name symbol-name)) 'foo (print name))? Of course doing that is silly, but it's not clear to me if it's forbidden, by reading the hyperspec page.
<White_Flame>
what specifically do you think is questionable about it?
<White_Flame>
I don't see anything wrong at first glance
<pve>
the page talks about slots, accessors and instances, but does any of that apply to a symbol?
euandreh has quit [Ping timeout: 260 seconds]
<White_Flame>
a symbol is an object with slots and accessors
<White_Flame>
and is an instance of class symbol
<pve>
hmm, ok I guess I assumed with-accessors was meant for standard-objects
<pve>
and symbol-name doesn't explicitly state that it's an accessor for symbol
<beach>
That's because "accessor" usually means that you can use it with SETF too.
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 256 seconds]
mingus has quit [Quit: mingus]
irc_user has joined #commonlisp
<beach>
Although the "Notes" section is not normative, you can see in the WITH-ACCESSORS dictionary entry that it expands to a SYMBOL-MACROLET, so there is no reason why it wouldn't work for SYMBOL-NAME.
<pve>
ok great, thanks
<beach>
You can even do things like (with-accessors ((more 1+ )) most-positive-fixnum more)
<pve>
heh, can't wait to do that
seletz has joined #commonlisp
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
tibfulv has quit [Ping timeout: 252 seconds]
<mfiano>
"accessor" as far as the standard is concerned, has nothing to do with SETF
<mfiano>
It is just anything that accesses, which is also defined to attempting to read or write a place
<mfiano>
defined as*
<aeth>
yes, an ior not xor (i.e. "and/or")
<aeth>
getter and/or setter... or in CL-specific terms, reader and/or writer. It's just that the latter is almost always via SETF.
<aeth>
Where WITH-ACCESSORS won't work is when you need more than one argument, e.g. an AREF, which is definitely an accessor. (* technically, you could use it on an AREF of 0D arrays because those have no index)
<mfiano>
It's interesting to think about how you can have a SETF-named function or method specialized to a class, that is not considered an accessor (by just returning something irrelevant and not reading from or writing to a place), or to have a class with a slot having only a :reader for its slot specifier, having a true accessor defined with it.
ec_ has quit [Ping timeout: 255 seconds]
ec_ has joined #commonlisp
ym has joined #commonlisp
_cymew_ has joined #commonlisp
ec_ has quit [Ping timeout: 255 seconds]
ec_ has joined #commonlisp
anticomputer has quit [Ping timeout: 255 seconds]
ym has quit [Ping timeout: 255 seconds]
morganw has joined #commonlisp
<jcowan>
fwiw, I do not believe in "the essence of X" arguments where X is a (programmable) programming language. They are like discussions of the essence of humanity: nobody agrees, nor should they.
anticomputer has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
son0p has quit [Ping timeout: 260 seconds]
<_death>
pve: your assumption was correct, as far as I can tell.. it was meant for standard-objects.. it was invented as part of CLOS (I believe to address some silly criticism).. the replies you got seem to ignore that context though
<_death>
(in fact symbol-macrolet also came from the CLOS group, but proposed independently of CLOS.. the two CLOS macros with-slots and with-accessors make use of it.. the former macro makes sense to me, but I think the latter one should not have been introduced)
rangahy has quit [Quit: Lost terminal]
sedzcat has joined #commonlisp
irc_user has quit [Quit: Connection closed for inactivity]
<_death>
correction: apparently it was not proposed independently, but taken in as part of CLOS
seok has quit [Read error: Connection reset by peer]
<pve>
_death: that's very interesting, thanks
<_death>
symbol-macrolet started out as a macro with code walking support in PCL and later changed into a special operator
<_death>
interestingly it was controversial.. one suggested to remove it and make with-slots/with-accessors special operators instead (ouch).. Steele mocked it with a number-macrolet.. lucky for us sanity prevailed
euandreh has joined #commonlisp
dre has quit [Quit: Leaving]
anticomputer has quit [Ping timeout: 255 seconds]
ym has joined #commonlisp
anticomputer has joined #commonlisp
random-nick has joined #commonlisp
Josh_2 has quit [Ping timeout: 252 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
son0p has joined #commonlisp
tyson2 has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
jmdaemon has quit [Ping timeout: 255 seconds]
ec_ has quit [Read error: Connection reset by peer]
ec_ has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pdietz has joined #commonlisp
dipper has quit [Remote host closed the connection]
jeffrey has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
sedzcat has quit [Quit: sedzcat]
ym has quit [Ping timeout: 256 seconds]
jeosol has joined #commonlisp
<Shinmera>
Wrote some beautiful format soup today "~d ~:*~[~;Aeone~:;Aeonen~] ~d ~:*~[~;Jahr~:;Jahre~] ~d ~:*~[~;Monat~:;Monate~] ~d ~:*~[~;Tag~:;Tage~] ~d:~2,'0d:~2,'0d"
<jackdaniel>
the funny thing is that I don't understand even parts that are meant to be words
<jackdaniel>
I gather that Jahr is a year
sedzcat has joined #commonlisp
<jackdaniel>
and Tag is, uh, tag
<Shinmera>
Yea it's the german translation of: "~d aeon~:p ~d year~:p ~d month~:p ~d day~:p ~d:~2,'0d:~2,'0d"
<Shinmera>
Since ~:p only works for English I have to conditonalise the plurals explicitly
<jackdaniel>
we need to update the standard launching in... 3... 2... 1...; but I'm scared to thing how the extension interface to format would look like
<jackdaniel>
surely not sane
<jackdaniel>
think*
<Shinmera>
Unfortunately in German things don't pluralise as nicely as they do in English :(
<Shinmera>
So format would have to do semantic analysis to do it :v
pranavats has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
ym has joined #commonlisp
thuna` has joined #commonlisp
anticomputer has joined #commonlisp
jeosol has quit [Quit: Client closed]
jeosol has joined #commonlisp
dtman34 has quit [Ping timeout: 268 seconds]
rgherdt has quit [Ping timeout: 256 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
pdietz has quit [Quit: Client closed]
scymtym has quit [Ping timeout: 256 seconds]
cage has joined #commonlisp
dtman34 has joined #commonlisp
Alfr has quit [Ping timeout: 252 seconds]
sedzcat has quit [Ping timeout: 256 seconds]
jeosol has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
Cymew has quit [Ping timeout: 256 seconds]
<jdz>
German is definitely not the only language with such complications.
azimut has joined #commonlisp
rgherdt has joined #commonlisp
Demosthenex has quit [Ping timeout: 246 seconds]
Demosthenex has joined #commonlisp
ebrasca has joined #commonlisp
karlosz has joined #commonlisp
_cymew_ has quit [Ping timeout: 252 seconds]
karlosz has quit [Remote host closed the connection]
dtman34 has quit [Ping timeout: 265 seconds]
_cymew_ has joined #commonlisp
dtman34 has joined #commonlisp
_cymew_ has quit [Ping timeout: 256 seconds]
sedzcat has joined #commonlisp
euandreh has quit [Ping timeout: 256 seconds]
sedzcat has quit [Ping timeout: 246 seconds]
sedzcat has joined #commonlisp
occ has quit [Ping timeout: 268 seconds]
occ has joined #commonlisp
<aeth>
That would actually be a selling point: if Common Lisp's FORMAT2 *requires* machine learning to function properly. It can be the first programming language with such a feature set.
Alfr has joined #commonlisp
<jackdaniel>
it would be the first programming language that charges you for tokens printed
tibfulv has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
random-nick has joined #commonlisp
azimut has joined #commonlisp
ns12 has quit [Quit: bye]
ns12 has joined #commonlisp
<Shinmera>
jackdaniel: isn't that ethereum
Josh_2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
causal has quit [Quit: WeeChat 3.7.1]
epony has quit [Quit: QUIT]
<NotThatRPG>
Shinmera: Even English has "formula" and "formulae," "goose" and "geese," etc. English spelling, it transpires, was originally more influenced by history than by pronunciation, and that lingers.
sedzcat has quit [Ping timeout: 256 seconds]
<jackdaniel>
(rename-symbol 'if "PERCHANCE")
euandreh has joined #commonlisp
Madsy_ has joined #commonlisp
Madsy_ has quit [Remote host closed the connection]
jolby has joined #commonlisp
varjag has joined #commonlisp
igemnace has quit [Remote host closed the connection]
<varjag>
some of you real old timers on here might remember Fufie from OPN/Freenode #lisp
<varjag>
he passed away this Tuesday
vn36 has joined #commonlisp
jmdaemon has joined #commonlisp
super_toner has joined #commonlisp
nij- has joined #commonlisp
<nij->
Has anyone been forced to switch to a lower-level language because runtime performance is critical? Not that I'm facing this issue; I'm just curious to know what are some options in those scenarios.
<varjag>
i find that if the code makes no use of simd intrinsics or gpu there's hardly ever a need these days
<varjag>
whatever still left to run on the classic cpu runs plenty fast in cl anyway
<nij->
My friends working for banks use python usually. But when performance is important, they have no choice but to use C++.
<nij->
I wonder if such things would happen to CL too, say.
<pjb>
nij-: that has been the case with python. Also for bad support of threads. If I had used CL instead, I wouldn
<pjb>
't have had to switch to C.
<pjb>
nij-: they wouldn't happen as often. Quite heavy duty systems are written in Common Lisp.
<varjag>
i do casual signal processing on low end hardware for what it worth
<varjag>
audio frequencies
<varjag>
hadn't been a problem
<varjag>
low end today is top shelf stuff from two decades ago
<nij->
Oh nice to know! I'm still open to hear and learn from edge cases if there are any.
<Bike>
python performance is kind of crap. other dynamic languages can be a lot faster than python. not just lisp.
<yitzi>
I'd remove the "kind of" part of that sentence.
<nij->
Why is python performance crappy?
<varjag>
because noone bothered to fix it i guess
<varjag>
the official line is that it's an Incredibly Tough Problem which is laughable
<varjag>
harder things were done with less
<Bike>
cpython baked in some stuff they shouldn't have, and then they got used to just calling out to C to do anything important
<morganw>
The latest version is allegedly 10% to 60% faster than previous versions.
attila_lendvai has joined #commonlisp
<Bike>
pypi and stuff is faster too.
<gilberth>
Are there any language features of Python that make compiling it particularly difficult?
rogersm has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
<Bike>
i don't think so, because non-cpython python can apparently be a lot faster
<pjb>
gilberth: I don't know it enough, but I guess it's OO system is 100% run-time; but in CLOS too, you can change the classes and methods at run-time, so it wouldn't be harder than in lisp, other than in python the OO system is everything.
nij- has quit [Ping timeout: 260 seconds]
<gilberth>
pjb: Ok. Then perhaps they are lazy. I was just curious because I heard that argument that it would be hard not for the first time. And I know next to no Python and thus asked.
<Bike>
as for the actual question, i genuinely don't think there's much reason to drop into C or whatever for speed, but then i don't do AV processing. memory usage i'd be more worried about. i wouldn't try to run CL on a microprocessor
<Bike>
i would however try writing a code generator for a DSL in lisp to use
<gilberth>
Hmm, but with AV processing the parts of the application that burn 99% of your cycles are very limited. And even C can be too slow when you have a cheap and unsuited MCU and try to do what it barely can in terms of DSP.
<varjag>
fortunately running common lisp on a low end mcu is not an issue
<varjag>
there are no implementations suitable
<gilberth>
Otherwise, I am very tired of this kind of "language X faster than language Y" discussions. It rarely comes up that you only need to be fast enough.
<Bike>
It certainly gets repetitive, especially when we're talking about it divorced from any real use case
<gilberth>
varjag: 256KB SRAM is common with small MCUs these days. I wait for 1MB or 2MB to be common and then you can deploy CL on an MCU.
<varjag>
i'm not sure stil what are you going to run on it
<gilberth>
Whatever you run on an MCU.
<varjag>
which cl implementation i mean
<varjag>
unless you write your own
<varjag>
a minimal lispworks tree-shaken binary delivery on arm32 is 5-7mb
ec_ is now known as ec
<gilberth>
I once was in the embedded industry. Some time ago. At which you could expect like 16KB SRAM. No way you could run any reasonable application written in Lisp on it. Would I still be in that industry, I'd try to get a reasonable Lisp onto the MCU. 256KB suffices for that, especially when you put your "static space" into flash, which is plenty.
<varjag>
no, 256kb isn't much room for a usable common lisp implementation
<varjag>
maybe it's possible in demoscene challenge sense
<gilberth>
varjag: CLISP for instance was initially written for the Atari ST. It was happy with 1MB. It still is with around 2MB, if you really wish and you put some code aside at the flash. If not for the license, I'd start there.
<gilberth>
varjag: I didn't say Common Lisp. 256KB is plenty for some reasonable Lisp though.
<varjag>
the channel is #commonlisp specifically
anticomputer has quit [Remote host closed the connection]
<gilberth>
Also: CLtL1 is a bit smaller than ANSI-CL. I could live without CLOS.
<gilberth>
Python is no Common Lisp either.
anticomputer has joined #commonlisp
<varjag>
python is no lisp at all so there hardly can be confusion
* varjag
waits for the cmucl joke to drop
<gilberth>
What I wanted to say, you could -- and this had been done -- Common Lisp into 1 or 2 MB.
<gilberth>
* put
<varjag>
so that falls under write your own i guess
nij- has joined #commonlisp
<gilberth>
Or borrow from the past.
<varjag>
well yes if you going to run it on a 68k
<gilberth>
What's the difference? The class of MCUs we are talking about are 32-bit as well.
<varjag>
gilberth: the OG clisp was written in 68k assembly
<nij->
Oh I see..
<varjag>
not that i have anything against writing another lisp compiler mind you
<varjag>
(not that clisp is a compiler really either)
<gilberth>
varjag: Doesn't change that CLISP still can do with 400KB .mem file, if you wish. On a 32-bit system. And the size of your text segment is not much of a concern as this could be put to flash, which usually is plenty.
<varjag>
can't comment on this, been a while since i last built/ran clisp
<varjag>
possibly you're right
<varjag>
wouldn't want to do signal processing in clisp on an mcu at any stretch tho
<gilberth>
I don't advocate CLISP here, I just wanted to point out that you could make CL fit in 2MB easily, and in 1MB, if you must. I believe 1MB is the reasonable lower limit.
<_death>
both clisp and ecl can generate bytecode, I'm guessing one could write a tiny interpreter and runtime for a subset of it.. also, the L paper mentions running on a device with 1M RAM and a specially written operating system (in C) that occupied 16K
<gilberth>
varjag: My other point was that DSP is not 100% of your application. At that time I would have loved to have the higher application logic in Lisp and also with being able to use the interactive development style. But those 16KB I had was just too little, so I was stuck with C.
<varjag>
pfft c was a luxury!
<varjag>
that's a high level language
<varjag>
i dunno even if c ever got really usable on 8051 at any point
<varjag>
square peg round hole
<gilberth>
The 8051 is horrible to work with. We never touched it. In 8-bit times we used an 8085 instead.
<_death>
(well, <32K)
tyson2 has joined #commonlisp
epony has joined #commonlisp
<Josh_2>
I used a lisp called Picolisp when I was working with microcontrollers in school
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
<jackdaniel>
ulisp is cool from tiny lisps
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<varjag>
i had my own one on z80
nij- has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
sedzcat has joined #commonlisp
waleee has joined #commonlisp
sedzcat has quit [Quit: sedzcat]
cosimone has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
ym has quit [Ping timeout: 260 seconds]
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Alfr has quit [Quit: Leaving]
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
rogersm has quit [Quit: Leaving...]
morganw has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
nij- has joined #commonlisp
ym has joined #commonlisp
super_toner has quit [Quit: Leaving]
seletz has joined #commonlisp
dre has joined #commonlisp
seletz has quit [Ping timeout: 260 seconds]
nexalam has joined #commonlisp
nexalam has quit [Remote host closed the connection]