jimipj has quit [Remote host closed the connection]
jimipj has joined #commonlisp
pranav has joined #commonlisp
jack_rabbit has quit [Ping timeout: 276 seconds]
rkazak has joined #commonlisp
jimipj has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 252 seconds]
jimipj has joined #commonlisp
domovod has quit [Quit: WeeChat 4.5.1]
Inline has quit [Ping timeout: 272 seconds]
jack_rabbit has joined #commonlisp
ldb has joined #commonlisp
knusbaum has joined #commonlisp
<ldb>
does ASDF support using custom function like file checksum instead of timestamp for certain objects?
jack_rabbit has quit [Ping timeout: 245 seconds]
<ldb>
the documentation probably says :around-compile can be used for this but no actual examples been provided
kjn__ has joined #commonlisp
rkazak has joined #commonlisp
knusbaum has quit [Ping timeout: 245 seconds]
<phoe>
ldb: operation-done-p maybe?
knusbaum has joined #commonlisp
kjn__ has quit [Ping timeout: 252 seconds]
kjn__ has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
knusbaum has quit [Read error: Connection reset by peer]
pve has quit [Quit: leaving]
<ldb>
phoe: looks like the intended use of that is for detect failed compliation
jonatack has joined #commonlisp
knusbaum has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
random-nick is now known as sandom-nick
kjn__ has quit [Ping timeout: 265 seconds]
kjn__ has joined #commonlisp
orenty7 has quit [Quit: Konversation terminated!]
Inline has joined #commonlisp
knusbaum has quit [Read error: Connection reset by peer]
kjn__ has quit [Ping timeout: 252 seconds]
zxcvz has joined #commonlisp
kjn__ has joined #commonlisp
rkazak has joined #commonlisp
zxcvz has quit [Client Quit]
knusbaum has joined #commonlisp
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
kjn__ has quit [Ping timeout: 252 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
kevingal has quit [Ping timeout: 246 seconds]
knusbaum has quit [Ping timeout: 252 seconds]
mishoo has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 276 seconds]
corvo_ry has joined #commonlisp
dtman34 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
dtman34 has joined #commonlisp
rkazak has joined #commonlisp
tane has quit [Quit: Leaving]
brokkoli_origin has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
brokkoli_origin has joined #commonlisp
Everything has joined #commonlisp
brokkoli_origin has quit [Remote host closed the connection]
knusbaum has quit [Ping timeout: 276 seconds]
jonatack has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 246 seconds]
Thermoriax has quit [Ping timeout: 276 seconds]
jonatack has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
shka has quit [Quit: Konversation terminated!]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
<thuna`>
I have a custom mapping from NAMEs to SYMBOLs with the interface (MY-INTERN NAME) -> SYMBOL, (MY-SYMBOL-NAME SYMBOL) -> NAME. There is a default mapping, but I also need to be able to override it, while maintaining a one-to-one relationship. Right now I have it so (SETF (MY-SYMBOL-NAME SYMBOL) NAME) does this, but SETF (effectively) modifying the behavior of NAME just _stinks_ of bad design.
<thuna`>
Does anyone know of a better way to go about this?
rkazak has joined #commonlisp
<bike>
í think you've presented this too abstractly. in what ways do you need to override this mapping?
<bike>
like what's a use case?
<thuna`>
I am writing a DSL for a scripting language, but the limitation of identifiers in that other language means that not every symbol is a valid identifier. I could just restrict what symbols can be used within the DSL, but I want to make it so that you can instead determine what name is used for what symbol, both while reading and while printing the DSL you've written as code written in the scripting language
<thuna`>
For example "$lt(...)" would be read as (< ...), which would then be printed back as "$lt(...)"
<phoe>
sounds like an alist, or some other bidirectional mapping would do the trick
<thuna`>
Right, and what would the interface look like? I am not satisfied with (SETF MY-SYMBOL-NAME), but I can't think of any alternatives
<thuna`>
If you do (SETF (MY-SYMBOL-NAME 'LT) "lt"), (SETF (MY-SYMBOL-NAME '<) "lt"), and (SETF (MY-SYMBOL-NAME '<) NIL), you end up resetting the symbol name of both LT and <, even though it's not obvious or intuitive
rkazak has quit [Ping timeout: 248 seconds]
corvo_ry has quit [Remote host closed the connection]
mange has joined #commonlisp
<bike>
i would think you do it the other way
<bike>
like instead of setfing the symbol name, you set what symbol a given name points to
<bike>
(setf (my-symbol "lt") 'lt)
<bike>
or, well. maybe i'm still not understanding in your example how is LT affected?
ftzm has quit [Ping timeout: 252 seconds]
alternateved has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<thuna`>
In this case it's just the difference between whether "$lt(...)" maps to (lt ...), (:lt ...), or (< ...) and back. (Now, in this specific case, entirely by luck (lt ...) and (:lt ...) would still print correctly, but it wouldn't evaluate correctly and this doesn't generalize.) But maybe you're asking something else?
<thuna`>
(SETF MY-SYMBOL) is interesting
ftzm has joined #commonlisp
<thuna`>
It still isn't quite obvious (at least to me) that after (SETF (MY-SYMBOL "lt") 'LT) and (SETF (MY-SYMBOL "lt") '<), (MY-SYMBOL-NAME 'LT) should behave differently than before, but it's a much more manageable dissonance.
<thuna`>
I was mostly off-put by my MY-SYMBOL being named MY-INTERN (hence the setter being (SETF (MY-INTERN ...) ...)), but I can just change the name, so that's fine
Everything has quit [Quit: Lost terminal]
<phoe>
I was thinking of (SETF (SYMBOL-DSL '<) "lt") that would be equivalent to (SETF (DSL-SYMBOL "lt") '<)
<phoe>
if you have a bijective mapping then just make that evident in your code
rkazak has joined #commonlisp
<phoe>
a call like (SYMBOL-DSL '<) reads clean enough to me, you have a symbol named < and you want to get its dsl mapping
<phoe>
can maybe return a secondary value of T/NIL to check if it has a mapping, if NIL is something you use
pillton has joined #commonlisp
<thuna`>
If you saw setters in both directions, wouldn't you think that they would only set their direction of the mapping?
<thuna`>
I was even thinking that maybe I would forgo (SETF {DSL-SYMBOL|SYMBOL-DSL}) entirely and call it DEFINE-SYMBOL or something of the sort
dra has quit [Remote host closed the connection]
<phoe>
sure, it kind of sounds like a lisp-namespace kind of deal by now
<mange>
I wouldn't use setf for this. I think something like (define-dsl-mapping '< "lt") would make the most sense to me.
<phoe>
fair, I'm convinced
<thuna`>
I guess I'll go with that. I can tack on OLD-DSL-SYMBOL and OLD-SYMBOL-DSL as extra values as well, if anyone is concerned with changing the behavior of (un)related(ish) objects
jon_atack has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
wheeler has quit [Quit: cheerio]
wheeler has joined #commonlisp
triffid has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 244 seconds]
rkazak has quit [Ping timeout: 265 seconds]
triffid has joined #commonlisp
triffid has quit [Client Quit]
triffid has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]