<flip214>
bike: I've got a large vector, and try to present a slice via a macro similar to WITH-SLOTS. But that needs to expand to a SUBSEQ for (SETF foo #(1 2 3)), or to an displaced array for (SETF (AREF foo 2) 5) -- or at least I haven't found another solution yet. I'd like to avoid needing a codewalker...
nil78 has quit [Read error: Connection reset by peer]
reb` has quit [Ping timeout: 252 seconds]
reb` has joined #commonlisp
nil78 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 248 seconds]
igemnace has quit [Quit: ZNC 1.9.0+deb2build3 - https://znc.in]
<|3b|>
probably expanding into s a flet that returns the displaced array works? setf of that does the subseq (or replace or whatever), and anything else just uses the displaced array
igemnace has joined #commonlisp
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
markb1 has quit [Ping timeout: 252 seconds]
mgl has joined #commonlisp
<flip214>
|3b|: the problem is, the symbol-macro or function used for SETF needs to find out whether there's an AREF around it.
<flip214>
Or am I misunderstanding what you tell me?
markb1 has joined #commonlisp
<|3b|>
it does not, if the expansion returns a displaced array
* |3b|
could be misunderstanding something though
mishoo has joined #commonlisp
pabs3 has quit [Remote host closed the connection]
<|3b|>
or if displaced arrays are ok, just bind a displaced array to start with and tell people to REPLACE into it rather than using SETF on it :)
<flip214>
ack, thanks ... will investigate. Seems that's a combination that hasn't occurred to me yet.
<|3b|>
if displaced arrays aren't OK, then you have problems
<|3b|>
could copy into/out of a temp array or something in that case, for something general
<|3b|>
or just make your own API for accessing slices
* |3b|
isn't sure i'd bother trying to make it look like AREF if things like MAP, REPLACE, or arbitrary user functions wouldn't work on it, though depends on how specialized it is
pillton has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
markb1 has quit [Ping timeout: 246 seconds]
alfiee has joined #commonlisp
<flip214>
ah, got it again what bothered me. having the getter return a displaced array means leaking some internal details; and ADJUST-ARRAY on that behaves differently than on a new copy via SUBSEQ.
<flip214>
but I guess that's something I have to live with, resp. warn about in the README.
bendersteed has joined #commonlisp
alfiee has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 244 seconds]
Equill has joined #commonlisp
pabs3 has quit [Remote host closed the connection]
ym has quit [Ping timeout: 244 seconds]
pabs3 has joined #commonlisp
markb1 has joined #commonlisp
<aeth>
what I personally do for something similar is I work with 2-4 values (1 is just AREF) where the reader/getter returns 2-4 values (possibly with offset) and the setf variation sets 2-4 values (I think each amount of values needs its own form because of setf)
alfiee has joined #commonlisp
<aeth>
these compose (the name is kind of off, but I named it before I added offsets) so e.g. (setf (array-of-3 a 42) (array-of-3 #(1 2 3)))
<aeth>
and then this underlying pattern can be somewhat hidden with symbol-macrolet
<aeth>
(trivial examples, of course, don't need to exist because alternative ways exist, but composing these is very useful)
alfiee has quit [Ping timeout: 252 seconds]
elderK has joined #commonlisp
madnificent has joined #commonlisp
markb1 has quit [Ping timeout: 268 seconds]
reb`` has joined #commonlisp
reb` has quit [Read error: Connection reset by peer]
markb1 has joined #commonlisp
<madnificent>
we're running into heap space issues in SBCL. there's a GC run but it can't free up enough memory. can i catch these errors, print a stack trace at that time or something like that?
chomwitt has joined #commonlisp
<madnificent>
there's a single special variable which could provide us with some insights, printing that on stdout would be of great help
<madnificent>
it also seems sbcl doesn't fully crash in that case but rather kills the thread which is impressive if correct. would it be possible to monitor the thread and execute some code when it died? such a thing could also allow us to implement a mechanism to detect and inform about failures
clothespin has quit [Ping timeout: 245 seconds]
varjag has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
tjbw has joined #commonlisp
alfiee has joined #commonlisp
elderK has quit [Quit: WeeChat 4.5.1]
alfiee has quit [Ping timeout: 260 seconds]
random-jellyfish has joined #commonlisp
markb1 has joined #commonlisp
Guest47_ has joined #commonlisp
attila_lendvai_ has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
Equill has quit [Ping timeout: 252 seconds]
mishoo has quit [Ping timeout: 252 seconds]
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 272 seconds]
markb1 has quit [Ping timeout: 260 seconds]
Equill has joined #commonlisp
pve has joined #commonlisp
markb1 has joined #commonlisp
euandreh has quit [Read error: Connection reset by peer]
euandreh has joined #commonlisp
euandreh has quit [Client Quit]
markb1 has quit [Ping timeout: 260 seconds]
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 252 seconds]
Equill has quit [Ping timeout: 265 seconds]
nil78 has quit [Read error: Connection reset by peer]
markb1 has joined #commonlisp
yottabyte has quit [Quit: Connection closed for inactivity]
nil78 has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
scymtym has quit [Ping timeout: 248 seconds]
random-nick has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
alfiee has joined #commonlisp
alfiee has quit [Ping timeout: 245 seconds]
jonatack has joined #commonlisp
Guest47_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<madnificent>
sellax: i don't know of an openapi library. i never had much luck with automatic implementations based on openapi in other languages. always required me to understand the api and functionality which took way longer than making the call.
<madnificent>
sellax: unless you're talking about something that emits the openapi documentation. in which case i believe i just emitted a basic swagger json.
MyNetAz has quit [Remote host closed the connection]
<madnificent>
decweb: thanks! i'll look for documentation on that. the hook may be executed in any thread so the special variable will most likely not be available. though with some luck i could check the exited threads and use that.