<gilberth>
re "just let scope and gc do the work." Yes, at times I wish that there would be weak packages that would reclaim symbols that are not otherwise used and carry no definition or value. But the latter is hard to tell as there is no namespace protocol in CL.
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #commonlisp
|3b| has joined #commonlisp
|3b| has quit [Changing host]
|3b| has joined #commonlisp
<gilberth>
I mean, some library can define a namespace of foos keeping the fooness of a symbol in a hash table *fooness* keyed on symbols. The Lisp can't know that.
<gilberth>
If it would have been custom to use symbol properties for that or if there would be means to announce that you define a new namespace, I could look at that.
<craigbro>
gilberth: why don't you like the streaming output implementation? I am not familiar with cl-who enough to understand.
<craigbro>
you want a data structure -> HTML conversion, as opposed to a macro that it emitting strings to a stream as it's eval'ed?
|3b| has quit [Remote host closed the connection]
<gilberth>
Just because it comes with side-effect. I can't say e.g. (let ((toc (document-toc-html *document*))) (html (head (title ...)) (body (div ...) (div toc))))))
<craigbro>
yah, it's not data really, it's a program ... I prefer data too in most cases
<gilberth>
This toc HTML fragment would be written before <HTML>. So with an output-as-we-go API I need to be concerned about that. With an API like I use which conses the whole document and only then writes it out, you don't. Apart from that I cache fragments, I can filter them, sort them, whatever before outputting.
|3b| has joined #commonlisp
|3b| has joined #commonlisp
|3b| has quit [Changing host]
<craigbro>
yah, transform them, aggregate them, as data, and not as code fragments where I need to understand their execution context, and re-execute for each location etc..
<gilberth>
Yes, that was what I meant by "too much side-effect".
<craigbro>
I'll drink to that
<gilberth>
Cheers!
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
amb007 has joined #commonlisp
ethanxxxl has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 264 seconds]
psilord has joined #commonlisp
rogersm has joined #commonlisp
akoana has quit [Quit: leaving]
rogersm has quit [Ping timeout: 264 seconds]
jamesmartinez has joined #commonlisp
rtypo has quit [Ping timeout: 268 seconds]
hcarvalhoalves has quit [Remote host closed the connection]
son0p has quit [Ping timeout: 268 seconds]
Inline has quit [Ping timeout: 256 seconds]
random-nick has quit [Ping timeout: 268 seconds]
molson has joined #commonlisp
dlowe has quit [Ping timeout: 268 seconds]
X-Scale has joined #commonlisp
ronald has quit [Ping timeout: 255 seconds]
josrr has quit [Remote host closed the connection]
amb007 has joined #commonlisp
ronald has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 264 seconds]
kiyafirs has joined #commonlisp
istewart has joined #commonlisp
Demosthenex has quit [Ping timeout: 272 seconds]
Demosthenex has joined #commonlisp
green_ has joined #commonlisp
decweb has quit [Ping timeout: 240 seconds]
psilord has quit [Ping timeout: 268 seconds]
alcor has joined #commonlisp
earl-ducaine has joined #commonlisp
X-Scale has quit [Ping timeout: 250 seconds]
istewart has quit [Quit: Konversation terminated!]
Pixel_Outlaw has joined #commonlisp
Josh_2 has joined #commonlisp
X-Scale has joined #commonlisp
subhuman has joined #commonlisp
subhuman has quit [Remote host closed the connection]
v88m has joined #commonlisp
subhuman has joined #commonlisp
Oladon has quit [Read error: Connection reset by peer]
awlygj has joined #commonlisp
wacki has joined #commonlisp
shka has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 264 seconds]
King_julian has joined #commonlisp
psilord has joined #commonlisp
chomwitt has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
King_julian has quit [Ping timeout: 268 seconds]
subhuman has quit [Remote host closed the connection]
jamesmartinez has quit [Ping timeout: 260 seconds]
_whitelogger has quit [Ping timeout: 260 seconds]
GreaseMonkey has quit [Remote host closed the connection]
_whitelogger has joined #commonlisp
greaser|q has joined #commonlisp
alcor has quit [Ping timeout: 260 seconds]
zetef has joined #commonlisp
skeemer has quit [Ping timeout: 240 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
chomwitt has quit [Ping timeout: 268 seconds]
subhuman has joined #commonlisp
subhuman has quit [Remote host closed the connection]
amb007 has joined #commonlisp
subhuman has joined #commonlisp
rgherdt has joined #commonlisp
awlygj has quit [Remote host closed the connection]
v88m has quit [Read error: Connection reset by peer]
King_julian has joined #commonlisp
v88m has joined #commonlisp
kiyafirs has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
kiyafirs has joined #commonlisp
kiyafirs has quit [Client Quit]
v88m has quit [Read error: Connection reset by peer]
tok has joined #commonlisp
mgl has joined #commonlisp
mgl has quit [Remote host closed the connection]
mgl has joined #commonlisp
v88m has joined #commonlisp
King_julian has quit [Ping timeout: 255 seconds]
rogersm has joined #commonlisp
chomwitt has joined #commonlisp
rogersm has quit [Remote host closed the connection]
v88m has quit [Read error: Connection reset by peer]
JelbyFunes has joined #commonlisp
v88m has joined #commonlisp
JelbyFunes has quit [Ping timeout: 250 seconds]
zetef has quit [Ping timeout: 264 seconds]
danse-nr3 has joined #commonlisp
mgl_ has joined #commonlisp
mgl has quit [Ping timeout: 268 seconds]
zetef has joined #commonlisp
_cymew_ has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
chomwitt has quit [Ping timeout: 260 seconds]
King_julian has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
nybble has quit [Quit: WeeChat 4.2.2]
dino_tutter has joined #commonlisp
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
<shka>
hi all
<jamesmartinez>
hi
<beach>
Hello jamesmartinez.
Inline has joined #commonlisp
<shka>
i am trying to use agnostic-lizard and i am a bit confused by how it handles special forms
<shka>
the following example will NOT print Q even once
<shka>
even though i would expect it to get printed twice
<shka>
what gives?
Fade has quit [Ping timeout: 264 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
<beach>
Unfortunately, I don't think MichaelRaskin comes here anymore. I haven't seen him here for more than a year.
<beach>
[the author of agnostic-lizard]
Mezzie has joined #commonlisp
<bike>
maybe the problem is that in that form, Q never appears as a form to be evaluated
<shka>
how would i grab all newly established lexical variables though?
Mezzie has quit [Remote host closed the connection]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #commonlisp
<bike>
glancing at the code, i think you could process let and let* forms yourself with on-special-form?
<bike>
the docstring says that on-every-atom is "called after processing a form expanded to an atom", which explains why it's not printing q
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #commonlisp
chiselfuse has quit [Remote host closed the connection]
<shka>
bike: hmmmmm, your solution would surely work and that's what i am gonna to do, but i don't follow you on that docstring. Isn't a special form also a form? If so, agnostic-lizard would walk into it as well
<shka>
and eventually, q would expand into q
chiselfuse has joined #commonlisp
<shka>
(cond ((eql (first form) 'cl:setq) ...)) somehow *feels* like shouldn't be required
mal1 is now known as lieven
v88m has joined #commonlisp
pyooque has joined #commonlisp
puke is now known as Guest7578
pyooque is now known as puke
<bike>
shka: in your form, Q never appears as a subform to be evaluated. it's just a variable name. if you had (print q), Q would be a subform, but you don't
<bike>
shka: agnostic lizard does walk into the let, it just doesn't process Q as a subform (because it's not one)
Guest7578 has quit [Ping timeout: 268 seconds]
subhuman has quit [Ping timeout: 260 seconds]
v88m has quit [Read error: Connection reset by peer]
yitzi has joined #commonlisp
<shka>
bike: ok, so you are saying that variable name is not a form, correct?
<bike>
not in the contexts you have it in
<bike>
a form is something that's evaluated. in (let ((q 8)) 9), Q is not evaluated.
<shka>
bike: good explanation, thanks!
<bike>
you are welcome
Inline has quit [Ping timeout: 260 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
rtypo has joined #commonlisp
King_julian has quit [Ping timeout: 272 seconds]
metsomedog has joined #commonlisp
random-nick has joined #commonlisp
Inline has joined #commonlisp
anticomputer has quit [Quit: quit]
anticomputer has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
danse-nr3 has quit [Ping timeout: 268 seconds]
amb007 has quit [Read error: Connection reset by peer]
King_julian has joined #commonlisp
robin has quit [Remote host closed the connection]
amb007 has joined #commonlisp
robin has joined #commonlisp
X-Scale has quit [Ping timeout: 250 seconds]
Josh_2 has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
zupss is now known as zups
donleo has joined #commonlisp
edgar-rft_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
pve has joined #commonlisp
X-Scale has joined #commonlisp
subhuman has joined #commonlisp
subhuman has quit [Remote host closed the connection]
zetef has quit [Remote host closed the connection]
lucasta has joined #commonlisp
chomwitt has joined #commonlisp
varjag has joined #commonlisp
waleee has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
subhuman has joined #commonlisp
dlowe has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
kevingal has joined #commonlisp
cage has joined #commonlisp
decweb has joined #commonlisp
contrapunctus has joined #commonlisp
danse-nr3 has joined #commonlisp
King_julian has quit [Ping timeout: 268 seconds]
pfdietz has joined #commonlisp
King_julian has joined #commonlisp
josrr has joined #commonlisp
Alfr has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
<subhuman>
Where can I put init code when I do (ql:quickload :my-package)?
<subhuman>
I'm a ASDF noob but I need to do some CFFI foreign library stuff so my dependencies work properly
<beach>
Top level forms in any file being loaded are executed at load time.
<subhuman>
I put it in my package.asd
<subhuman>
Before the defsystem
<beach>
That might be tricky because your package definitions typically don't exist yet at that point.
<subhuman>
I only did that cause websocket-driver is complaining about missing dlls
<beach>
I'll let someone else answer that, because I know nothing about FFI.
<subhuman>
I don't think it has to do with FFI that much
<subhuman>
tbh i don't care about build systems i just want to write code
<subhuman>
Not saying it doesn't work it just might not be best practice
<yitzi>
It will fail in some cases.
<yitzi>
Especially if some other system comes along and touches *foreign-library-directories*
<subhuman>
It should push a new list, not override the variable entirely, no?
mgl_ has quit [Ping timeout: 256 seconds]
<yitzi>
This seems like a user specific config. There is probably a better way to do this, but as a hack maybe it should just go into .sbclrc or equivalent.
<subhuman>
Yeah it's user specific, I don't plan on publishing this or anything
<yitzi>
And yes, as a pushnew with :test #'equalp
<subhuman>
But even if it wasn't user-specific, couldn't I just use pushnew?
<yitzi>
But not in the ASD
<yitzi>
The ASD isn't executed when you do QL:QUICKLOAD
<subhuman>
yitzi: Well apparently it does seem like it's being executed, atleast in the REPL
<subhuman>
When I do ql:quickload *foreign-library-directories* gets set and all my dependencies get loaded
<yitzi>
It may be done before that when the system is defined via ASDF:FIND-SYSTEM....so you shouldn't be fiddling with the user's environment because maybe they don't intend to do ASDF:LOAD-SYSTEM
<yitzi>
Initialization stuff like that should probably go in packages.lisp. If that doesn't work then there may be a module or something that needs to be required. In this case, I really think you need to put this in the .sbclrc file for now.
<subhuman>
Sly backtraces are scary
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
subhuman has quit [Remote host closed the connection]
danse-nr3 has quit [Ping timeout: 264 seconds]
danse-nr3 has joined #commonlisp
prokhor_ has quit [Remote host closed the connection]
edgar-rft_ is now known as edgar-rft
reb has quit [Remote host closed the connection]
lucasta has quit [Quit: Leaving]
subhuman has joined #commonlisp
subhuman has quit [Remote host closed the connection]
subhuman has joined #commonlisp
josrr has quit [Remote host closed the connection]
<subhuman>
Maybe I'm jumping in to this too early but how do I generate an executable given my current ASDF system?
<subhuman>
I tried the save-lisp-and-die method but I get multiple threads running error
Fade has joined #commonlisp
Fade has quit [Changing host]
Fade has joined #commonlisp
Fade is now known as Fade
josrr has joined #commonlisp
<beach>
You need to do that from the command line without SLIME or SLY so that there are not multiple threads.
<subhuman>
beach: I did that yet still got an error
<subhuman>
The same error mind you
<subhuman>
I'll look into it later
<beach>
But you may have had SLIME or SLY running?
<subhuman>
No, it was just a raw terminal
<beach>
Hmm.
<subhuman>
pgrep'd and no other SBCL or SLY processes
<beach>
Then your application must have created additional threads.
<subhuman>
I don't see how
<subhuman>
As of right now my program is just a bunch of function definitions without any function calls
<dlowe>
something in .sbclrc?
<subhuman>
dlowe: Just the default code added by ql:add-to-init-file when you first install quicklisp
<subhuman>
I'll look into the whole thing later I can't be bothered with it right now
<subhuman>
I'll probably have to introspect some variable that's meant to store a bunch of threads
<subhuman>
Thanks though
<Alfr>
subhuman, you might like: sb-thread:list-all-threads
<subhuman>
Alfr: Nice. Thank you
waleee has quit [Ping timeout: 264 seconds]
k_hachig has joined #commonlisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
<yottabyte>
if I'm iterating the keys of a hash table, and one of values for a key (gethash key ...) is another hash table, like a nested one, how can I keep going down the chain? in other languages, I can determine the type. is typep the way to go?
<beach>
Yes, TYPEP will tell you whether the value is a hash table.
<beach>
You can also use a generic function, and have a method specialized to HASH-TABLE.
<beach>
yottabyte: Does that make sense?
yitzi has quit [Ping timeout: 240 seconds]
yitzi has joined #commonlisp
<yitzi>
yottabyte: also HASH-TABLE-P which is mostly likely syntatic sugar for `(typep val 'hash-table)`
attila_lendvai has joined #commonlisp
<beach>
I guess we'll never know.
<yottabyte>
yup, makes sense
<yottabyte>
sorry for the late response!
<beach>
Great!
<yitzi>
If you've got multiple types you want to respond to and you don't want to use a generic function there is always TYPECASE
shoggouth has joined #commonlisp
<yottabyte>
is there a way to dynamically get the type at runtime?
<yitzi>
TYPE-OF
<beach>
yottabyte: That's the only way.
<yottabyte>
wonderful. that's exactly what I was looking for
<beach>
Also CLASS-OF.
<beach>
TYPE-OF can be tricky for things like numbers.
<ixelp>
4.4 Types and Classes Dictionary | Common Lisp Nova Spec
josrr has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<yottabyte>
nice
<yottabyte>
and what is the point of alists and plists? I guess at least syntactically, it's nice to use a plist instead of a hash-table, but since it doesn't scale as well, I often use hash tables
<yottabyte>
or maybe ergonomically is a better word to use than syntactically
<beach>
The standard hash tables can't handle any old equality predicate.
<beach>
Also, association lists are probably faster for a small number of entries.
<yottabyte>
yup, right, the same applies for many languages
<beach>
Property lists are useful because they can be used as arguments to functions that take keyword arguments.
brokkoli_origin has quit [Remote host closed the connection]
<yottabyte>
oooo, so they're a fundamental part of the language
brokkoli_origin has joined #commonlisp
josrr has joined #commonlisp
mgl_ has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
danse-nr3 has quit [Ping timeout: 252 seconds]
danse-nr3 has joined #commonlisp
nybble has joined #commonlisp
prokhor_ has joined #commonlisp
k_hachig has quit [Ping timeout: 268 seconds]
k_hachig has joined #commonlisp
<pfdietz>
TYPE-OF on an integer i could return the type `(integer ,i ,i). Which may not be useful.
<pfdietz>
(type-of (1+ most-positive-fixnum)) ==> (integer 4611686018427387904) in SBCL (x86-64).
wacki has quit [Read error: Connection reset by peer]
wacki has joined #commonlisp
Fade has quit [Quit: leaving]
prokhor_ has quit [Remote host closed the connection]
Fade has joined #commonlisp
Fade has quit [Changing host]
Fade has joined #commonlisp
k_hachig has quit [Ping timeout: 252 seconds]
reb has joined #commonlisp
boogsbunny has joined #commonlisp
King_julian has quit [Ping timeout: 268 seconds]
<boogsbunny>
Has anyone seen Vinland, the new web framework yet?
k_hachig has joined #commonlisp
alcor has joined #commonlisp
anticomputer has quit [Ping timeout: 260 seconds]
anticomputer has joined #commonlisp
rgherdt has joined #commonlisp
Fade has quit [Quit: leaving]
<yottabyte>
what do you recommend for executing a shell command from cl? I want to get the response and parse it