<mfiano>
Been thinking about how to solve this without duplicated code or any more complicated control flow than there already is. Off to do non computer stuff for a bit in the hopes I'll come back to a surprise or an idea of my own.
<Bike>
So you want the method on IMAGE to do a side effect before the :around method on SYMBOL happens?
<mfiano>
Oh perfect timing.
<Bike>
will that not already be the case? the around method is not applicable to an image
<mfiano>
What I want to happen is to:
<mfiano>
Call this function: (make-sprite-texture context (name source) source) somewhere in an image-specialized method, but after the around method does the error check, and before it dispatches to create an instance.
<Bike>
wait. i don't understand this at all. the call-next-method in the first method will never happen.
<Bike>
or maybe i don't know how if-let works
<mfiano>
if-let will error if the binding is non-nil, and call-next-method otherwise.
<Bike>
yeah i was confusing it with when-let, doy
<mfiano>
Which is actually wrong come to think of it
<Bike>
so the error check can't be done until you have a symbol, right
<mfiano>
a non-nil atlas needs to be passed to the primary method
<mfiano>
Oh dear. I need to rethink this through. This is not what I wanted at all.
<mfiano>
source is effectively a sprite-designator. The base case is a symbol. I don't want it to be allowed to create a sprite if a symbol denoting that sprite already exists.
<mfiano>
But for the image case, I need to create a texture after this check, but before creating the instance.
<mfiano>
But ignore the error in the code that atlas is always going to be passed as nil. I will fix that after I figure this out.
<Bike>
seems like you have to move the check out, then. could have %make-sprite do the check and then call %%make-spritie, or something like that
<mfiano>
Yeah that's what I was anticipating. It's etting a bit messy. Maybe I can clean it up some more to alleviate the pain of soon to be 2 levels of indirection.
<Bike>
no amount of method combination method is going to let you have one method run in the middle of an otherwise unprepared method
<Bike>
combination magic*
alvaro121 has quit [Ping timeout: 248 seconds]
alvaro121 has joined #commonlisp
<mfiano>
I agree, and I wasn't in a good state of mind when I wrote this it seems. No amount of getting an atlas to error and expecting an atlas to continue execution is ever going to work.
<mfiano>
I really have to come back to this later I think.
<mfiano>
I want to prevent sprites from being created that are already referenced by a symbol, but I need an atlas to initialize said sprite, which requires a texture that an image doesn't yet have. It's giving me a headache to think about right now.
<mfiano>
THe around method is there to prevent clobbering existing sprites in a hash table.
<mfiano>
But everything about this code is just wrong. Sigh
<mfiano>
Thinking about it more, the only clobbering that can happen is when I create said texture for the image case. So this shouldn't be an around method on symbol, but on image.
<mfiano>
This is for dynamic runtime creation of sprites. Textures/sprite name symbols in a table already exist for static sprites loaded at start time.
<mfiano>
So the symbol and sprite case will never clobber anything.
<mfiano>
It's the texture creation yet to be added to the image case that mutates the table
<mfiano>
Today I learned yet again, don't program when tired, and problems with STANDARD method combination are usually the result of impossible logic situations due to that fact.
<mfiano>
Thanks for the brain jumpstart
<beach>
Good morning everyone!
dmh has quit [Quit: rip]
igemnace has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
igemnace has joined #commonlisp
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #commonlisp
semz_ has joined #commonlisp
semz has quit [Ping timeout: 248 seconds]
lisp123 has joined #commonlisp
wildlander has quit [Quit: Saliendo]
imjim has joined #commonlisp
vats has quit [Ping timeout: 276 seconds]
slowButPresent has quit [Quit: leaving]
Mandus has quit [Ping timeout: 248 seconds]
Mandus has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Mandus has quit [Ping timeout: 276 seconds]
z4kz has joined #commonlisp
Mandus has joined #commonlisp
Bike has quit [Quit: Connection closed]
z4kz has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
<beach>
flip214: Are you around?
aartaka has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
ski has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
yauhsien has joined #commonlisp
akoana has quit [Quit: leaving]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<lisp123>
is there a way to run arbitrary lisp code in a 'safe' manner (as if it were in a container, but not actually)
<lisp123>
basically the idea I had was to create a webpage where people enter lisp get the results, like a pastebin with evaluation
<beach>
It would be very hard to prevent the system from crashing.
<lisp123>
yes
<lisp123>
I was thinking then on a social contract - "please dont abuse this system"
<beach>
Then just an ordinary system will do.
<lisp123>
it is a good case for first-class global environments!
<lisp123>
i will try and do it soon as part of a broader project
<imjim>
Armed bear Common Lisp running in a java applet?
<imjim>
Is that still a thing?
amk has quit [Ping timeout: 240 seconds]
<lisp123>
According to google: Many modern browsers do not support Java applets. Google Chrome, Apple Safari, and Mozilla Firefox have all dropped support for applets written in the programming language.
amk has joined #commonlisp
<imjim>
Web assembly
<lisp123>
+1 good idea
<imjim>
Might have to write a translator tool to prepare the CLISP source code to be compiled by web assembly
<imjim>
The book "Let Over Lambda" can help you with that.
<lisp123>
I wonder if ECL could be useful here
<imjim>
Yeah maybe
<imjim>
ECL would probably be a better place to start for a web assembly demo
<imjim>
Really it just depends on "how much" you want to offer your clients.
<lisp123>
jackdaniel: whats the size of ECL?
<lisp123>
imjim: giving a full CL implementation sounds pretty enticing now!
<imjim>
Somebody else probably has some sort of javascript based SSH client
<imjim>
So you could just host an SSH server and have it login that way
<lisp123>
That I can do, but benefit of client side is it will reduce server costs dramatically
<imjim>
Look into freebsd jails
<imjim>
Oh absolutely lol
<imjim>
Plus you said you wanted to mitigate server-side risks
<lisp123>
yup
<lisp123>
thanks for the chat, some very useful ideas to ponder over
<imjim>
So if you have the entire implementation running client side that sounds perfect for you
<imjim>
Yup I'll be here
<imjim>
If you want help let me know
<imjim>
I'm kinda bored
<imjim>
I'd be down to prepare ECL for web assembly lol
<lisp123>
Sure. I'm working on the editor part first, might hit you up afterwards
<lisp123>
Or if you want to do it anyway and we can link up later
<imjim>
Yeah I'll keep that in the back of my mind
<imjim>
Preparing ECL for web assembly that is
<imjim>
Maybe full-blown CLISP in the future
<imjim>
For all we know somebody already got ECL running on web assembly lol
<lisp123>
Very good browser editor, and with client size CL and some polish, could become something!
<beach>
imjim: Why CLISP?
<beach>
Oh, maybe you meant Common Lisp? CLISP is an implementation of Common Lisp.
<imjim>
We were talking about specific implementations, yes
<imjim>
I use CLISP a lot still for messing around lol
<imjim>
CLISP is dead right?
vats has joined #commonlisp
<beach>
Not quite.
<imjim>
It's still a valid Debian package
<beach>
But the maintainers work very slowly.
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
<imjim>
Available in netbsd pkgsrc
<jackdaniel>
lisp123: ecl on emscripten is wip, I'm experimenting with some options to minimize its size
<jackdaniel>
currently ecl w/o numerous contribs is less than 1MB (static build)
<jackdaniel>
for js-based implementation check out jscl - albeit incomplete it is very cool tech
<jackdaniel>
s/ it/, it/
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<lisp123>
jackdaniel: thanks
igemnace has quit [Remote host closed the connection]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 248 seconds]
poselyqualityles has quit [Ping timeout: 260 seconds]
lisp123 has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
shka has joined #commonlisp
yauhsien has quit [Read error: Connection reset by peer]
yauhsien has joined #commonlisp
random-jellyfish has joined #commonlisp
kg7ski has quit [Ping timeout: 250 seconds]
kg7ski has joined #commonlisp
Dynom has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
rgherdt has joined #commonlisp
ttree has quit [Ping timeout: 260 seconds]
Andrew has quit [Quit: Leaving]
Andrew has joined #commonlisp
Andrew has quit [Remote host closed the connection]
Andrew has joined #commonlisp
random-nick has joined #commonlisp
random-jellyfish has quit [Quit: Client closed]
random-jellyfish has joined #commonlisp
djuber has quit [Ping timeout: 256 seconds]
xaltsc has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
q3cpma has joined #commonlisp
lisp123 has joined #commonlisp
<q3cpma>
Hello, I want to write a portable with-struct-slots, but I wonder what's the most efficient way of creating the accessor function symbol and calling it; basically, how would I make a slot-value for structs? Do I have to do the whole symbol -> string -> concat -> symbol -> funcall at runtime?
razetime has joined #commonlisp
<lisp123>
why do you want this function
<q3cpma>
For the same reason people use with-slots; to reduce verbosity
<lisp123>
I might be wrong, but many avoid to use with-slots
<jackdaniel>
q3cpma: albeit not portable, with-slots will usually work with structures
<lisp123>
better to access the slots with their accessor functions
<q3cpma>
jackdaniel: that's what I understood, but I'd like a portability report before using it, I guess
<jackdaniel>
lisp123: with-slots et al are useful when you are the implementor (but not when you are the library consumer)
<q3cpma>
lisp123: let's say it's also to have a bit of fun with symbol-macrolet
<beach>
q3cpma: I suggest you write a version of with-accessors instead.
<lisp123>
q3cpma: now, that sounds fun :)
<q3cpma>
beach: not a lot of verbosity improvements over a normal let, though
<q3cpma>
(btw, am I the only one using a let1 macro?)
<beach>
q3cpma: Using it is very similar to using WITH-SLOTS.
<lisp123>
q3cpma: what does that do (let1) (I may have done something similar)
<q3cpma>
beach: yeah, but you have to type struct-name-slot instead of just slot =)
<q3cpma>
flip214: Interesting, didn't know about it
<beach>
flip214: Can you confirm that you are the maintainer of Alexandria?
<beach>
I'll send an email.
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
igemnace has joined #commonlisp
<flip214>
beach: yes, I am (one)
<beach>
OK, I'll send you an email about some issues in the documentation.
igemnace has quit [Remote host closed the connection]
random-nick has quit [*.net *.split]
char[m] has quit [*.net *.split]
dieggsy has quit [*.net *.split]
infra_red[m] has quit [*.net *.split]
_death has quit [*.net *.split]
robin has quit [*.net *.split]
sveit has quit [*.net *.split]
ioa has quit [*.net *.split]
jaimelm has quit [*.net *.split]
jdz has quit [*.net *.split]
mzan has quit [*.net *.split]
ioa has joined #commonlisp
random-nick has joined #commonlisp
robin has joined #commonlisp
jdz has joined #commonlisp
_death has joined #commonlisp
infra_red[m] has joined #commonlisp
dieggsy has joined #commonlisp
jaimelm has joined #commonlisp
sveit has joined #commonlisp
char[m] has joined #commonlisp
mzan has joined #commonlisp
opcode has quit [Ping timeout: 260 seconds]
opcode has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
kpoeck has quit [Ping timeout: 252 seconds]
kpoeck has joined #commonlisp
attila_lendvai has joined #commonlisp
kpoeck has quit [Quit: Client closed]
yauhsien has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
<White_Flame>
q3cpma: interning a symbol is referentially transparent, so I don't consider it very dirty, even if there's a singular allocation somewhere
yauhsien has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
<q3cpma>
White_Flame: Yes, lisp123 reminded me symbols were interned at read-time
<White_Flame>
if you're manually concatenating & interning constructed symbols in macros, then that happens at macroexpand time, not read time
yauhsien has quit [Ping timeout: 260 seconds]
<White_Flame>
but since the read-time interning and the macroexpansion interning will both return the same symbol, it doesn't matter who actually creates it first
<q3cpma>
Yeah, that
thmprover has joined #commonlisp
z4kz has joined #commonlisp
z4kz has quit [Quit: Client closed]
Volt_ has quit [Quit: ]
Bike has quit [Quit: Connection closed]
analogsalad has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 250 seconds]
kpoeck has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
Devon has joined #commonlisp
Devon has quit [Read error: Connection reset by peer]
Bike has joined #commonlisp
<flip214>
beach: ack, thanks!
<flip214>
there's also the issue tracker in gitlab, or just a pull request, etc.
kg7ski has quit [Ping timeout: 256 seconds]
kg7ski has joined #commonlisp
analogsalad has quit [Quit: bye]
lisp123 has joined #commonlisp
Guest44100 has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
Guest44100 has quit [Quit: Client closed]
kpoeck has quit [Quit: Client closed]
treflip has quit [Quit: Quit]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
tyson2 has joined #commonlisp
notzmv has joined #commonlisp
causal has joined #commonlisp
karlosz has joined #commonlisp
Inline has quit [Ping timeout: 246 seconds]
karlosz has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
ttree has joined #commonlisp
jmdaemon has joined #commonlisp
kpoeck has joined #commonlisp
analogsalad has joined #commonlisp
robin has quit [Ping timeout: 248 seconds]
Inline has joined #commonlisp
schjetne has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
tyson2 has quit [Remote host closed the connection]
akoana has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
schjetne has quit [Remote host closed the connection]
schjetne has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
Inline__ has joined #commonlisp
Inline has quit [Ping timeout: 248 seconds]
schjetne has quit [Ping timeout: 246 seconds]
q3cpma has quit [Quit: leaving]
schjetne has joined #commonlisp
schjetne has quit [Ping timeout: 256 seconds]
robin has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.5]
shka has quit [Ping timeout: 246 seconds]
kg7ski has quit [Ping timeout: 246 seconds]
kg7ski has joined #commonlisp
matt` has joined #commonlisp
MajorBiscuit has joined #commonlisp
Alfr has quit [Quit: Leaving]
Inline__ has quit [Quit: Leaving]
matt` has quit [Remote host closed the connection]
MajorBiscuit has quit [Quit: WeeChat 3.4]
tyson2 has joined #commonlisp
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
orestarod has joined #commonlisp
schjetne has joined #commonlisp
schjetne has quit [Ping timeout: 248 seconds]
poselyqualityles has joined #commonlisp
schjetne has joined #commonlisp
kpoeck has quit [Quit: Client closed]
Alfr has joined #commonlisp
poselyqualityles has quit [Quit: Using Circe, the loveliest of all IRC clients]
analogsalad has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 248 seconds]
lisp123 has joined #commonlisp
attila_lendvai has joined #commonlisp
acebulf has joined #commonlisp
acebulf_ has joined #commonlisp
acebulf_ has quit [Client Quit]
thmprover has quit [Quit: For Here, I Hope, Begins Our Lasting Joy]