<BrokenCog>
(gethash) tells me it isn't a hashtable. (car) tells me it's not a list.
<BrokenCog>
it looks like a list of two hashtables?
<aeth>
it looks like a list of two hash tables
<aeth>
wait
<aeth>
it looks like a list of a vector of two hash tables
<aeth>
(...) list #(...) vector #<HASH-TABLE ...> hash table
<BrokenCog>
how do I get elements from a vector? I thought (car)
<aeth>
ELT or AREF
<aeth>
also e.g. SVREF, but these are useless, because you'd need to know which vector subtype
<aeth>
oh, and you can play with print-object via defmethod so it's possible that what it looks like isn't the case
<aeth>
they're not supposed to do that, of course.
<BrokenCog>
what would have mangled print-object??
<aeth>
anything could have made a class/struct, defined a custom print-object on it, and forgotten to include a name at the start making the object look like a list of a vector of two hash tables without it actually being a list (so CAR wouldn't work on it)
<aeth>
However, that would only be a possibility if CAR wasn't working on the initial value
<aeth>
CAR (or CAAR) wouldn't work on the contents that you obtain via CAR because #(...) is (or at least should be) a literal vector
<BrokenCog>
I can't get anything to work on it.
<aeth>
what is the type-of
<BrokenCog>
(vector-pop *mungeddata*) (car *mungeddata*) both fail.
<BrokenCog>
(pprint *mungeddata*) also.
<BrokenCog>
okay, (elt) works.
<BrokenCog>
I get what happened. I'm using jzon. I passed it a nested json structure. It put the outter into one hash, then the second into another, and put both into a vector.
<BrokenCog>
#<HASH-TABLE :TEST EQUAL :COUNT 2 {1003867C33}>)) is not an array with a fill pointer.
<beach>
There you go.
<BrokenCog>
I guess I need to use loop to iterate over the vector?
<beach>
BrokenCog: First of all, you have a list with a single element in it, and that element is a vector. But the vector has only two elements, so you can access them directly without a loop, unless you expect more elements in the future.
<beach>
BrokenCog: These are very basic questions. Perhaps you would like to join #clschool where people hang out in order to answer basic questions.
<BrokenCog>
okay.
BrokenCog has left #commonlisp [#commonlisp]
shawnw_ has joined #commonlisp
v88m has quit [Remote host closed the connection]
v88m has joined #commonlisp
nkatte has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
shmorg83 has joined #commonlisp
rkazak has joined #commonlisp
nkatte has quit [Quit: nkatte]
rkazak has quit [Ping timeout: 260 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
vardhan has joined #commonlisp
JuanDaugherty has joined #commonlisp
ezakimak has quit [Ping timeout: 265 seconds]
shmorg83 has quit [Ping timeout: 264 seconds]
akoana has quit [Quit: leaving]
gnoo has quit [Ping timeout: 248 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
Inline_ has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
Inline has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
gnoo has joined #commonlisp
decweb has quit [Ping timeout: 276 seconds]
rkazak has quit [Ping timeout: 252 seconds]
v88m has joined #commonlisp
rkazak has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
mishoo has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
Inline_ has quit [Read error: Connection reset by peer]
mgl has joined #commonlisp
amb007 has joined #commonlisp
shka has joined #commonlisp
rkazak has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
wacki has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
runxiyu is now known as am_i_a_tiger
amb007 has quit [Ping timeout: 265 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
rkazak has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Inline has joined #commonlisp
randomstuff has joined #commonlisp
mishoo has quit [Ping timeout: 252 seconds]
ebrasca has joined #commonlisp
rkazak has joined #commonlisp
mishoo has joined #commonlisp
mgl has joined #commonlisp
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
varjag has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 248 seconds]
gnoo has quit [Ping timeout: 272 seconds]
easye has quit [Remote host closed the connection]
v88m has quit [Remote host closed the connection]
v88m has joined #commonlisp
gnoo has joined #commonlisp
JuanDaugherty has joined #commonlisp
dino_tutter has joined #commonlisp
rkazak has joined #commonlisp
igemnace has quit [Quit: ZNC 1.9.0+deb2build3 - https://znc.in]
igemnace has joined #commonlisp
edgar-rft` has joined #commonlisp
v88m has quit [Ping timeout: 276 seconds]
shka has quit [Quit: Konversation terminated!]
edgar-rft_ has quit [Ping timeout: 252 seconds]
v88m has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
v88m has quit [Remote host closed the connection]
v88m has joined #commonlisp
rkazak has joined #commonlisp
pve has joined #commonlisp
v88m has quit [Ping timeout: 244 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 265 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
bitspook has joined #commonlisp
rkazak has joined #commonlisp
v88m has joined #commonlisp
mwnaylor has quit [Ping timeout: 260 seconds]
rkazak has quit [Ping timeout: 265 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
rkazak has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 276 seconds]
random-nick has joined #commonlisp
rainthree has joined #commonlisp
rkazak has joined #commonlisp
brokkoli_origin has joined #commonlisp
brokkoli_origin has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 265 seconds]
yaneko has quit [Quit: parting]
yaneko has joined #commonlisp
brokkoli_origin has joined #commonlisp
decweb has joined #commonlisp
bendersteed has joined #commonlisp
rkazak has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
shmorg83 has joined #commonlisp
v88m has joined #commonlisp
nkatte has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
JuanDaugherty has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
vardhan_ has joined #commonlisp
vardhan has quit [Ping timeout: 245 seconds]
xaltsc has quit [Quit: WeeChat 4.5.0]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
shawnw_ has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
yaneko has quit [Quit: parting]
yaneko has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
randomstuff has quit [Quit: Client closed]
v88m has joined #commonlisp
rkazak has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
<basicnpc>
I have a file in my project that includes side-effects during loading. However, I've noticed that if the file hasn't been modified, SBCL appears to load definitions from cached compiled files (even in a new session), which skips the desired side-effects. How can I ensure that SBCL always loads the file fully and executes its side-effects every time? Should I put EVAL-WHEN (load-time) for each top-level form in that file?
<beach>
Top-level forms are evaluated even when the cached FASL file is loaded.
sadclown has joined #commonlisp
<basicnpc>
That is weird..
<beach>
You can try this out easily by creating a file containing (say) (PRINT "hello"), and then first load it and then compile it and loading the FASL.
<basicnpc>
I'm not using #'load, but #'asdf:load-system. Could that be why?
<beach>
Sure. It will load only modified files and files that depend on those modified files.
sadclown has quit [Client Quit]
<basicnpc>
I see! So it's my misusing asdf.
<beach>
It seems so, yes.
sadclown has joined #commonlisp
<basicnpc>
Thanks! I overcame this by using (asdf:load-system "paren" :force t).
<beach>
Sounds good.
<varjag>
just wrap it in eval-when
<beach>
varjag: What? Wrap what in eval-when?
<basicnpc>
varjag, that didn't work for me as, I believe, asdf just skips the whole file while there's no file change.
<beach>
varjag: We just went through a long conversation that figured out the problem.
chum-cha has joined #commonlisp
sadclown has quit [Client Quit]
<varjag>
but it still loads the fasl, or do i misunderstand something?
<beach>
The latter. ASDF compiles the source and loads the FASL only if the file has been modified, or if the file depends on a file that has been modified.
<beach>
That's what ASDF does; it handles dependencies. Otherwise, you could just always load everything.
<varjag>
oh, so reloading it in the same image
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
<beach>
Yes, but even so, wrapping a top-level form in EVAL-WHEN wouldn't help.
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
<varjag>
i mean :load-toplevel would do just that, even if the file wasn't rebuilt as long as it is loaded
<varjag>
so it's fine e.g. for builds
<varjag>
not so much for interactive case here
amb007 has joined #commonlisp
<beach>
Like I said, top-level forms are evaluated anyway. So EVAL-WHEN won't change anything.
<beach>
I even gave a very simple way of checking that this is the case.
vardhan__ has joined #commonlisp
vardhan_ has quit [Ping timeout: 264 seconds]
<beach>
varjag: Does that make sense?
rkazak has quit [Ping timeout: 260 seconds]
* beach
guesses maybe not.
chum-cha has quit [Read error: Connection reset by peer]
jon_atack has joined #commonlisp
<varjag>
if i hadn't knew better i'd read that as an unnecessary snark
<varjag>
beach: i read the q as them wanting to execute the form at load time specifically (not compile time)
<varjag>
hence eval-when
<varjag>
something that i have in my builds in certain places
jonatack has quit [Ping timeout: 244 seconds]
ezakimak has joined #commonlisp
<varjag>
anyway you are right and i just misread
ezakimak has quit [Client Quit]
ezakimak has joined #commonlisp
basicnpc has left #commonlisp [Using Circe, the loveliest of all IRC clients]
IPmonger has joined #commonlisp
rkazak has joined #commonlisp
<beach>
OK.
<beach>
And yes, the desire was to evaluate the forms at load time, which will happen for all top-level forms without wrapping.
josrr has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
IPmonger is now known as _-_IPmonger_-_
_-_IPmonger_-_ has quit [Quit: _-_IPmonger_-_]
ezakimak has quit []
ezakimak has joined #commonlisp
rkazak has joined #commonlisp
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
molson__ has joined #commonlisp
vardhan__ has quit [Ping timeout: 264 seconds]
mgl has quit [Ping timeout: 265 seconds]
molson_ has quit [Ping timeout: 248 seconds]
pin56 has joined #commonlisp
pin56 has quit [Remote host closed the connection]
dra has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
molson__ has quit [Quit: Leaving]
molson has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
rkazak has joined #commonlisp
rkazak has quit [Max SendQ exceeded]
<beach>
I am almost done with the Futhark library: https://github.com/robert-strandh/Futhark I have two documentation strings left and one compiler macro. Any remarks or questions are welcome.
<ixelp>
GitHub - robert-strandh/Futhark: Implementation of the Common Lisp Strings dictionary
<beach>
And if someone would like to fill in those documentation strings or the compiler macro, feel free. Just try to follow the style in the rest of the code as much as possible.
<beach>
One thing I think I should change is that I should not proclaim the -CORE functions NOTINLINE after definition. Someone who wants the standard function inline would expect the body of it to contain the essential code.
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
rainthree has quit [Ping timeout: 265 seconds]
rainthree has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 272 seconds]
Guest64 has joined #commonlisp
ajf has quit [Remote host closed the connection]
ajf has joined #commonlisp
olivial has quit [Read error: Connection reset by peer]
olivial has joined #commonlisp
basicnpc has joined #commonlisp
<basicnpc>
I get how load-time-value does the trick. But.. I wonder whether GC would clear that value out, as no variable is really pointing to it? https://paste.debian.net/1342981/
<ixelp>
debian Pastezone
rkazak has joined #commonlisp
v88m has joined #commonlisp
shmorg83 has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
<beach>
basicnpc: If the GC is doing its job, it will eventually collect anything that is not referenced.
v88m has joined #commonlisp
<basicnpc>
So, as long as #'test-function is not GC'd, is it the case that that value is referenced by the local variable in the function?
<bike>
the load time value cons is referenced from the function, so it won't be GCed
<basicnpc>
(and therefore not GC'd?)
<beach>
basicnpc: That code means that the form (CONS 0 NIL) is evaluated at load time.
<bike>
the whole point of GC is that it's automatic. if the GC collects something you can access in any way, the GC is buggy (excepting deliberate GC subtleties like weak pointers)
<basicnpc>
Seems that the standard didn't specify anything about GC. Interesting.
wacki has quit [Read error: Connection reset by peer]
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
wacki has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
rainthree has quit [Ping timeout: 276 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
ebrasca has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
Guest64 has quit [Quit: Client closed]
rkazak has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
rkazak has quit [Ping timeout: 264 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Guest3745 has quit [Ping timeout: 252 seconds]
v88m has quit [Remote host closed the connection]
v88m has joined #commonlisp
basicnpc has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
Inline has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
v88m has quit [Read error: Connection reset by peer]
_whitelogger has joined #commonlisp
mgl has joined #commonlisp
Alfr has quit [Ping timeout: 265 seconds]
shawnw_ has joined #commonlisp
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
shawnw has joined #commonlisp
shawnw_ has quit [Ping timeout: 265 seconds]
v88m has joined #commonlisp
attila_lendvai_ has joined #commonlisp
mishoo has quit [Ping timeout: 244 seconds]
v88m has quit [Read error: Connection reset by peer]
varjagg has joined #commonlisp
rkazak has joined #commonlisp
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
varjagg has quit [Client Quit]
varjag has joined #commonlisp
ajf has left #commonlisp [#commonlisp]
kevingal has joined #commonlisp
robin is now known as terpri
terpri is now known as robin
rkazak has quit [Ping timeout: 252 seconds]
ndanilov has quit [Remote host closed the connection]
v88m has joined #commonlisp
gooba has quit [Remote host closed the connection]
v88m has quit [Read error: Connection reset by peer]
gooba` has joined #commonlisp
gooba has joined #commonlisp
gooba` has quit [Remote host closed the connection]
shawnw has quit [Ping timeout: 265 seconds]
Inline_ has joined #commonlisp
Inline has quit [Ping timeout: 252 seconds]
molson has quit [Ping timeout: 260 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
ldb has joined #commonlisp
triffid has quit [Remote host closed the connection]
pranav has quit [Read error: Connection reset by peer]
triffid has joined #commonlisp
rkazak has joined #commonlisp
slyrus_ has joined #commonlisp
basicnpc has joined #commonlisp
basicnpc has quit [Changing host]
basicnpc has joined #commonlisp
basicnpc has left #commonlisp [#commonlisp]
slyrus has quit [Ping timeout: 252 seconds]
<ldb>
beach: which function missed a compiler macro in Futhark?
JuanDaugherty has quit [Quit: JuanDaugherty]
rkazak has quit [Ping timeout: 265 seconds]
ndanilov has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
<ldb>
I guess that would be MAKE-STRING
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
Inline_ has quit [Read error: Connection reset by peer]
pranav has joined #commonlisp
josrr has quit [Remote host closed the connection]
bendersteed has quit [Quit: bendersteed]
<ldb>
beach: So I've opened PR on GitHub, hope that's would you'd expect
Thermoriax has quit [Ping timeout: 264 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
molson has joined #commonlisp
rkazak has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
mgl has joined #commonlisp
kevingal has quit [Ping timeout: 265 seconds]
mwnaylor has joined #commonlisp
Inline has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
mgl has quit [Ping timeout: 248 seconds]
Inline has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 248 seconds]
ldb has quit [Ping timeout: 248 seconds]
Inline has joined #commonlisp
Inline_ has joined #commonlisp
wacki has quit [Quit: Leaving.]
<phoe>
::notify basicnpc in order to make a cl-style condition system in any language, you need dynamic binding (if you have any equivalent of unwind-protect, you can implement them yourself), non-local returns (throwing and exceptions as understood in C++ will do), and lexical closures (mostly for efficiency; you can do without, if you really need to)
<Colleen>
phoe: Got it. I'll let basicnpc know as soon as possible.
Inline has quit [Ping timeout: 265 seconds]
Inline_ has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 272 seconds]
ndanilov_ has joined #commonlisp
ndanilov has quit [Ping timeout: 272 seconds]
rkazak has joined #commonlisp
attila_lendvai_ has quit [Ping timeout: 246 seconds]
ldb has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
dino_tutter has quit [Ping timeout: 265 seconds]
ldb has quit [Ping timeout: 252 seconds]
green_ has quit [Quit: Leaving]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]