<alvaro121_>
Hi, what's the difference between #:symbol and :symbol? I have been seeing them used in DEFPACKAGEs.
<hayley>
:symbol denotes the symbol named SYMBOL in the KEYWORD package (i.e. a keyword), whereas #:symbol denotes the symbol named SYMBOL in no package.
<alvaro121_>
Why is each one used in DEFPACKAGEs? I have seem both of them being used in the same places.
mrcom_ has quit [Quit: Leaving]
mrcom has joined #commonlisp
<Catie>
alvaro121_: Personal preference
<alvaro121_>
So it doesn't matter?
<Catie>
Not from a practical perspective. Using interned keyword symbols can cause duplicate symbols to exist in the Lisp image, but that doesn't really cause any problems in most cases
<alvaro121_>
Alright, it seems that #: is used more, I will use that too.
Oladon has joined #commonlisp
tyson2 has joined #commonlisp
<jcowan>
Using symbols interned in any random package will still work (although it's misleading to do so), as will strings.
Bike has quit [Quit: Lost terminal]
hefner has joined #commonlisp
s-liao has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Devon has quit [Ping timeout: 256 seconds]
waleee has quit [Quit: WeeChat 3.3]
Inline has quit [Ping timeout: 264 seconds]
<beach>
Good morning everyone!
Catie has quit [Quit: good]
igemnace has quit [Remote host closed the connection]
<phantomics>
Morning beach
ym has joined #commonlisp
akoana has joined #commonlisp
mzan has quit [Ping timeout: 260 seconds]
Guest74 has quit [Ping timeout: 264 seconds]
ori has joined #commonlisp
mzan has joined #commonlisp
ym has quit [Ping timeout: 268 seconds]
<hefner>
moin moin
<beach>
Hello hefner.
<beach>
Long time no see. If it's the same hefner I know, of course.
<hefner>
it is.
<beach>
Welcome back!!!
<hefner>
it's been a long time todo item to get back on IRC and it's good to see the old guard keeping the torch lit.
<beach>
Some of us, anyway. :)
<beach>
There is now a #clim IRC channel, and maintenance is regular and good.
<beach>
... maintenance of McCLIM I mean.
<hefner>
Neat. I have a lot to catch up on.
<beach>
Indeed.
<hefner>
it's a lovely thing that there's a new wave of people still working on McCLIM.
<hefner>
I follow the progress loosely via twitter.
<beach>
Yes, and there are some great new applications. scymtym rewrote Clouseau and it's much better now.
<beach>
Ah, OK.
<beach>
Progress on Second Climacs is very slow, though, because I am busy with other projects.
<hefner>
what is the distinguishing characteristic of Second Climacs? Original Climacs had some fascinating technology, like ESA and the incremental parser, but I was always afraid that the tight integration into mcclim would stall progress.
<beach>
The main thing is that Eclector (another scymtym project, a Common Lisp READer) is used to parse the contents of a Common Lisp code buffer. Then the plan is to use even more analysis phases to give the programmer better feedback.
<beach>
It can be argued that READ is the only valid way to parse Common Lisp code.
<beach>
(First) Climacs used a technique similar to LALR parsing, but that's not good enough, even though it is better than regular expressions, of course.
<beach>
The main thing that is preventing progress on Second Climacs is that I don't know how to handle indentation. I mean, I know the basic idea of course, but there are difficulties with the exact data structures to use.
lisp123 has quit [Ping timeout: 260 seconds]
<hefner>
my take on parsing code in an editor is very naive and basic, but particularly interesting the mid-edit cases where the block structure (or matching of parens..) is in flux and temporarily would send the parse of the whole rest of the buffer off into oblivion, where I can imagine some simple pushdown automaton style parsers where the PDA stack is the entire state and you can differentiate it concisely
<hefner>
and reconstitute it for each character in the buffer such that you can scan forward from the current point to where the parse diverges from the last valid parse of the buffer
<hefner>
etc. etc., blah blah blah
<hefner>
pretty sure everything having to do with parsing code in editors/IDEs is a solved problem
<hefner>
(of which I am ignorant of the solutions)
<hefner>
I'm curious what you mean about indentation, though.
<hefner>
(I did say at least one thing back there that makes no sense)
<beach>
Heh.
<beach>
We keep a cache of mappings from buffer positions to return value of READ. It is entirely possible to keep things around so that when the closing parenthesis or double quote is supplied, the cached values could be reused.
<beach>
For a particular expression, we need to compute what the indentation ought to be and indicate that it is wrong, and also provide commands to fix it.
<beach>
But we need to take into account comments that are associated with code, and incorrect syntax.
<hefner>
I think that's what I'm getting at, lazily reparse, but have a principled way of knowing you can reuse a previous parse.
<hefner>
I always hated parsing, it's probably what drew me to Lisp in the first place.
<hefner>
talk about complex solutions to invented problems.
<beach>
Sure.
<beach>
The technique we use is that we have a pair of buffer positions that indicate that if a call to READ were to start at the first position, it would end at the second position, and it would contain the return value of the call.
<beach>
Then if no changes have been made to that interval, the cached value is still valid.
<beach>
And we use Eclector, so we generalize stuff that can be read to comments and other skipped material.
<hefner>
makes sense.
<beach>
And our cache is particularly efficient when editing is localized, in that it keeps the prefix and the suffix intact when the result of the parse does not change.
<beach>
That doesn't help when the user types a double quote or an opening parenthesis of course.
<beach>
Though it is probably more frequent to edit the end of a buffer than any other place, so then the entire prefix is typically intact.
<hefner>
this is tracked in terms of recursive calls to READ or just top-level forms?
<beach>
All calls.
kuao has quit [Quit: Connection closed for inactivity]
<beach>
It has benchmarks for inserting left parentheses and double quotes too.
<hefner>
good, something to read.
<beach>
So did you quit writing Common Lisp code for a while? And if so, are you planning to start again? Any projects?
<candlejack>
hefner: re twitter - I've removed my account so there is no stream there anymore
<candlejack>
I've realized that I'm starting to refresh the same page mindlessy - so something is not right with their ux cognizance wise
candlejack is now known as jackdaniel
<hefner>
I can't stand the place, I read it seldomly now. It used to burn an hour every time I opened it on my phone, and frequently made me angry.
<jackdaniel>
we haven't talked but I've worked with your code a lot - great work :)
<hefner>
Now I keep it logged in on one computer and only browse it once every few weeks.
<beach>
jackdaniel: You may have the opportunity to talk at ELS'22.
<hefner>
my primary contribution to mcclim was fixing legions of bugs, and there's some things I did that are really WTF moments in hindsight (particularly the gadget theme lookup logic)
<hefner>
keep the dream alive, though.
<jackdaniel>
hefner: there is also ttf renderer (which I have extensively modified to incorporate kerning without losing too much performance)
<jackdaniel>
either way #clim is low-volume irc channel where most talks take place, so I hope to see you there
<jackdaniel>
I need to go now (the parent duty calls! :) it was nice to see you!
<hefner>
was mcclim-truetype me? anyway xach and whoever (sorry!) wrote the underlying rasterization library deserves 99% of that credit.
<hefner>
good night.
<beach>
Good night hefner. See you around.
pve has joined #commonlisp
Lycurgus has joined #commonlisp
Colt has quit [Quit: Leaving]
gaqwas has joined #commonlisp
taiju has joined #commonlisp
Colt has joined #commonlisp
Inline has joined #commonlisp
shka has joined #commonlisp
VincentVega has joined #commonlisp
akoana has quit [Quit: leaving]
frgo has quit [Ping timeout: 260 seconds]
zxcvz has joined #commonlisp
Jach has quit [Quit: Leaving.]
aartaka has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
Cymew has joined #commonlisp
Cymew has quit [Ping timeout: 240 seconds]
cage has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
karlosz has quit [Quit: karlosz]
Devon has joined #commonlisp
s-liao has joined #commonlisp
random-nick has joined #commonlisp
VincentVega has quit [Read error: Connection reset by peer]
perrierjouet has quit [Quit: WeeChat 3.3]
Oladon has quit [Quit: Leaving.]
cosimone has joined #commonlisp
perrierjouet has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
<Xach>
frederic jolliton!
notzmv has quit [Ping timeout: 265 seconds]
<beach>
Xach: ?
<Xach>
beach: he wrote cl-vectors, upon which some useful rasterization things have been made
<Xach>
that is the name which escaped hefner earlier
<beach>
Ah, OK.
<Xach>
More properly Frédéric Jolliton
<Xach>
sometimes the dust is blown from letters on the long trip across the atlantic
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
tyson2 has joined #commonlisp
Everything has joined #commonlisp
amk has quit [Remote host closed the connection]
amk has joined #commonlisp
frgo has joined #commonlisp
Devon has quit [Ping timeout: 264 seconds]
ebrasca has joined #commonlisp
<contrapunctus>
When I define a new system or rename an existing system, how do I get ASDF to see it without restarting the Lisp implementation?
<beach>
If you are using Quicklisp and you put a link in ~/quicklisp/local_projects, then you can do (ql:register-local-projects)
<contrapunctus>
beach: thanks, I hadn't made a link there...and looks like `asdf:initialize-source-registry` (possibly after `asdf:clear-source-registry`) might be what I was looking for 🤔️
<scymtym>
contrapunctus: when you evaluate (asdf:load-system "NAME-OF-NEW-SYSTEM"), an error should be signaled. a restart CLEAR-CONFIGURATION-AND-RETRY should be established in the context of the error. when you invoke that restart, ASDF re-scan the filesystem and should discover the new or renamed system. alternatively, you can open the system definition file and load it using C-c C-k (or evaluate (asdf:load-asd
<scymtym>
"FILENAME-OF-SYSTEM-DEFINITION-FILE"))
<scymtym>
or ASDF:INITIALIZE-SOURCE-REGISTRY, yes
<contrapunctus>
Oh, never thought of doing that. Thanks 😅️
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
peterhil has quit [Remote host closed the connection]
<beach>
Guest74: All values are returned only from the last form.
<Guest74>
that seems expected to me.
<beach>
Great!
<yitzi>
And probably a lot easier to implement then returning the values from the first form that has a non-nil primary value.
<beach>
Definitely.
paule32 has joined #commonlisp
<_death>
*efficiently
<_death>
it's also a popular use case to use a second value to indicate existence (e.g., GETHASH).. so in that case OR wouldn't be the right operator anyway
<Guest74>
do implementations keep the calculated hash around when supplying a default value? it seems like they calc the hash twice. or maybe I wrote something wrong.
<Guest74>
nevermind, i guess it would be the compiler seeing a setf after a gethash
Devon has joined #commonlisp
puke has joined #commonlisp
vats has quit [Remote host closed the connection]
<_death>
guess one could have (define-alt-tester gethash (nth 1)) (alt (foo x) (gethash x z) (bar y)) or (alt (foo x) (alt-nth-value 1 (gethash x z)) (bar y)) but inefficient
vats has joined #commonlisp
<mfiano>
In trying to decide what compression scheme to use internal to my filesystem (ZFS), I did a bit of benchmarking today. Someone should really implement a pure CL ZSTD implementation. Line 99 looks amazing! And the nice thing about ZSTD is decompression rate remains near constant regardless of compression level: https://gist.github.com/mfiano/db0bf3048c466911773692c7684cda24
<mfiano>
I will probably have a try at it soon in CL :)
<mfiano>
(input was my 13GB home directory of varying files, because that's where the filesystem will be created)
<mfiano>
piped from TAR
<Guest74>
decompress time longer than lz4?
VincentVega has quit [Remote host closed the connection]
<mfiano>
Negligible, and a bit more space for LZ4. The thing about filesystem compression is, if you can find a good compression speed as to not affect writes too much, reads will equate to more than your device is capable of since there's less data.
<Guest74>
ah, for some reason i read line 91 and wondered why you weren't talking about the one after. my eyes are crap today.
<mfiano>
Nono, XZ was just because I had it laying around. I knew it was both slow and memory hungry.
McParen has joined #commonlisp
<mfiano>
It ate about 40GB of RAM compressing :)
<Guest74>
how do I copy a struct from slimes inspector to the repl?
<mfiano>
M-RET
<Guest74>
thanks
<varjag>
Guest74: problem is when you habitually use OR as impromptu IF, as i sometimes do
<Guest74>
mfiano: what do you think is a good amount of cells to propagate to after collapsing a cell? doing it until there are no changes wants to set my laptop on fire.
X-Scale has quit [Ping timeout: 268 seconds]
X-Scale` is now known as X-Scale
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
<mfiano>
If you are asking that, then you don't understand the algorithm.
LordRishav has left #commonlisp [Ight Imma Head out]
<Guest74>
great help there, thanks!
Guest74 has quit [Quit: Connection closed]
<Josh_2>
:joy:
amb007 has quit [Ping timeout: 240 seconds]
<Josh_2>
If I'm using #+ to define a different method depending on a feature does the defmethod form have to be on the same line as the #+ .. form?
<Josh_2>
Or can it be one below?
<Josh_2>
Okay I think it can go below
<yitzi>
Josh_2: common lisp doesn't care about newlines. They are treated the same as whitespace. Which why you can have a newline in a string literal.
<Josh_2>
I ask because I tried in the repl and obviously that didn't work
<yitzi>
You can do conditional compilation anywhere. Not just on top level forms if that is more convenient. For instance, you can add the conditional compilation inside the defmethods also.
<Josh_2>
But what about with the defstruct? Can I do it in that?
<contrapunctus>
Josh_2: cool, congratulations. Mind, I'm just getting started with web dev, so I don't know much about what most of these web frameworks do 😅️
<yitzi>
Josh_2: Yes, you can do inside the defstruct.
<Josh_2>
It closes the form for me?
<yitzi>
No, it just makes the next form conditional.
<Alfr>
Josh_2, as long as it's processed by READ, the conditional is evaluated when reading and depending on the result the following form is either inserted or replaced by whitespace.
<yitzi>
Correct. You can put the conditionals in front of the keywords, but some might find that ugly. No idea what the preference of the maintainers over there is.
<Josh_2>
So basically in this case I have to drop a paren onto a newline?
<Josh_2>
the synchronized key exists on distributions that aren't sbcl?
<yitzi>
No. You have put the conditional in front of the key and in front of the value.
<Josh_2>
Yes I see sorry
<Josh_2>
also how does that form get closed then? You have a defmethod but it does not have all of its closing parents on sbcl
<Josh_2>
parens*
<yitzi>
Unless you do some funniness with a dotted list, I suppose.
<yitzi>
No worries.
<yitzi>
The closing paren is not part of the conditional form.
<Josh_2>
I see
<Josh_2>
so in the #-sbcl only the form immediately following the #-sbcl ie contained with the (lock ..) is conditional, meaning the paren after is added
<yitzi>
That is why #+(or) is better then comments for removing code temporarily.
<yitzi>
Correct
<Josh_2>
Okay I have to say the inline #+/- is horrific so I wont do that, but thanks for showing it to me :)
<Alfr>
Josh_2, maybe this is a bit more enlightening: (read-from-string "(cons #+abcl 'a #+ccl 'c #+sbcl 's #-(or abcl ccl sbcl) 'other 'whatever)")
<Josh_2>
Alfr: thanks. I understand now I was just getting caught up on the trailing parens
<yitzi>
Josh_2: you are getting it!
<Alfr>
Josh_2, you may want to consolidate multiple consecutive #+X Y into #+X (progn Y1 Y2 ..) to make it easier to comprehend, as interspersed #+/- requires readers to mentally check the conditional.
<Alfr>
Josh_2, hey, I'm in no way a style guide, only told you what I thought when I saw the code above. But yes, somehow I like the last one better. ;)
tyson2 has quit [Remote host closed the connection]
<Josh_2>
Well I was just trying to make sure that the structure is correct
<Josh_2>
personally I prefer the former
<Alfr>
Josh_2, it's your code, don't mind me. Assuming the indentation isn't messed up, I'd say the same as yitzi: "you are getting it!"
ebrasca has quit [Remote host closed the connection]
ebrasca has joined #commonlisp
defb has quit [Read error: Connection reset by peer]
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
karlosz has joined #commonlisp
<Josh_2>
Xach: have you thought about refusing to add libraries to quicklisp that have no documentation?
gaqwas has quit [Remote host closed the connection]
abrantesasf has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
gaqwas has joined #commonlisp
phossil has quit [Quit: Leaving]
tophullyte has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
amb007 has joined #commonlisp
varjag has quit [Ping timeout: 268 seconds]
Guest74 has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
<Xach>
Josh_2: no
aartaka has joined #commonlisp
<Xach>
no license is a problem
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Josh_2>
Enforcing a minimum standard of documentation would aid in upping the quality of the ecosystem as a whole
<Guest74>
there's still a work on more than one implementation requirement as well right?
Inline has quit [Quit: Leaving]
<Guest74>
Josh_2: you fine with documentation in any language. I think a better thing would be to organize and effort to document good libraries. writing libraries and documenting libraries are two different skills.
<Josh_2>
Organize an effort? After you.
<Josh_2>
Also Guest74 did you write that library for the SANE network protocol?
<Guest74>
I did. It's probably not well documented though :) I think I'm also going to change it as pjb: suggested and have it work on streams.
<Josh_2>
Isn't it better to have less well documented libraries than many poorly documented ones?
<Josh_2>
Guest74: Why do you use the nick Guest74 rather than JMC-Design (or something similar)?
<Guest74>
I'll get around to it eventually once I have a dedicated irc client.
<Josh_2>
I see, you are not an Emacs user?
<Guest74>
not really. I've been trying to use everything i need in common lisp.
<Josh_2>
Wait what?
<Josh_2>
You are using something like climacs?
<Guest74>
no, sorry, I do use emacs, but only for writing CL.
<Josh_2>
Oh I see
<Guest74>
the goal is to have every tool written in cl and usable from the repl.
<Josh_2>
Emacs has ERC, thats what I use for IRC.
<Guest74>
yeah, trying not to get too comfortable in emacs as I think, perhaps erroneously that it will lead to less CL development.
rogersm has quit [Quit: Leaving...]
<Guest74>
I'm not crazy though, I'm ok with using cl to wrap cli stuff. Like I got a one function library that shells out to tesseract so I can ocr the stuff I scan with nsane.
<Josh_2>
I never used a lispmachine so I suppose when it comes to emacs + cl I dont know what I'm missing.
tophullyte has quit [Remote host closed the connection]
<Josh_2>
Anyway gonna dash
Josh_2 has quit [Quit: ERC (IRC client for Emacs 27.1)]
tophullyte has joined #commonlisp
tyson2 has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 268 seconds]
X-Scale` is now known as X-Scale
tyson2 has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
VincentVega has joined #commonlisp
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
varjag has joined #commonlisp
peterhil has quit [Max SendQ exceeded]
waleee has joined #commonlisp
peterhil has joined #commonlisp
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
VincentVega has quit [Remote host closed the connection]
peterhil has quit [Remote host closed the connection]
notzmv has joined #commonlisp
tophullyte has quit [Quit: Leaving]
peterhil has joined #commonlisp
tyson2 has quit [Remote host closed the connection]