chkhd has quit [Remote host closed the connection]
chkhd has joined #commonlisp
eddof13 has joined #commonlisp
X-Scale has joined #commonlisp
eddof13 has quit [Quit: eddof13]
amb007 has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
amb007 has quit [Ping timeout: 258 seconds]
akoana has joined #commonlisp
istewart has joined #commonlisp
akoana has quit [Quit: leaving]
randm has quit [Remote host closed the connection]
randm has joined #commonlisp
markb1 has joined #commonlisp
thuna` has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
markb1 has quit [Quit: Leaving]
X-Scale has quit [Quit: Client closed]
char has quit [Remote host closed the connection]
lucasta has quit [Quit: Leaving]
contrapunctus has joined #commonlisp
bilegeek_ has quit [Quit: Leaving]
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life has joined #commonlisp
chkhd has quit [Ping timeout: 252 seconds]
<beach>
gilberth: I see.
decweb has quit [Ping timeout: 245 seconds]
johnjaye has quit [Ping timeout: 272 seconds]
johnjaye has joined #commonlisp
<gilberth>
beach: Good. I feared I were speaking Chinese^WGreek again. ;)
<beach>
Well, my immediate interpretation would be consistent with SBCL since I would assume that the variables in the declarations are the ones in scope, but I can see how you would have a different interpretation.
<gilberth>
beach: You say that in (LET* (X X) (DECLARE (SPECIAL X)) ...) only the second X should be special and ,(let* ((x 42) (x (symbol-value 'x))) (declare (special x)) x) should signal error saying that X is unbound from evaluating (symbol-value 'x)?
<gilberth>
And why would that (SPECIAL X) apply to the second only? Why the second?
<beach>
Because that's the only one in scope there.
<beach>
If the declaration were a reference to the value of X, it would refer to the second X.
<gilberth>
When viewed from the perspective of the declaration?
<beach>
Yes, at the position of the declaration, only the second X is in scope.
<beach>
For exa
<beach>
oops
<gilberth>
I see your argument.
<beach>
For example, in (LET* ((X 10) (X (1+ X))) X) the last X is the second in the bindings.
<mrcom>
,(let* ((x 42) (x 43)) x)
<ixelp>
;Compiler warnings : ↩ ; In an anonymous lambda form: Unused lexical variable X ↩ => 43
thuna`` has joined #commonlisp
<gilberth>
Hmm. I'm reading 3.3.4 again and I still don't see where it is said that a declaration applies to the variable in scope of the variable. It talks about the scope of a declaration rather.
<gilberth>
Neither do the dictionary entries for DECLARE or TYPE.
<gilberth>
Very well. I would argue that the other interpretation still is not entirely unreasonable.
<beach>
I agree.
<gilberth>
Good. What now? Roll dice?
triffid has quit [Remote host closed the connection]
<beach>
Well, I am implementing Common Lisp, and I still plan to use my interpretation.
triffid has joined #commonlisp
<gilberth>
Ok. I would lean towards the other interpretation. We can then agree that we disagree.
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 272 seconds]
<aeth>
if only it was well-specified
<edgar-rft>
right, the world needs well-specified disagreements
* beach
observes that the subjunctive form is out of fashion.
<gilberth>
There is WSCL. And there is my Novaspec. Annotation support and means to point to WSCL issues would be a start. Not everything must be well-specified. It would be nice when one could drop notes into the spec saying "Watch out! This is not entirely clear and implementations in fact differ here." Even as a practical advice. I'm not a language lawyer and would leave that to others. Sigh.
<beach>
Yes, a WSCL issue would be a good start.
<beach>
And yes, some form of Novaspec annotations would be good.
bjorkintosh has quit [Read error: Connection reset by peer]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
JuanDaugherty has joined #commonlisp
shawnw has joined #commonlisp
easye has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
mgl has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
<smlckz>
beach: what kind of implementation is that?
amb007 has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
vats has joined #commonlisp
mgl has quit [Ping timeout: 264 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<beach>
smlckz: We are several people who work on the SICL project. Its main purpose is to create independent modules that implement some aspect of the standard. And ultimately, we would like to create a SICL Common Lisp implementation out of those modules.
<beach>
smlckz: The main novelty is that those modules are created using the full Common Lisp language, so my own main task is to create the bootstrapping procedure that makes that possible.
<beach>
For starters, your indentation is wrong. What editor have you been using? It needs to have a way of indenting Lisp code correctly.
<zoravur>
vim
<beach>
I am pretty sure vim has a Lisp mode, no?
<zoravur>
ah i just didn't know the formatting command, but the changes seem pretty minor even after I formatted (using =)
<zoravur>
=
<beach>
And the convention of ending predicates with "?" is from Scheme. In Common Lisp it is to end it with "p" or "-p".
<zoravur>
got it
<beach>
zoravur: They are not minor. If the are off by only one character, then the person reading your code can't trust the indentation, so then that person must count parentheses to understand the code, and that's not polite.
zxcvz has quit [Quit: zxcvz]
<beach>
You should not have commented-out code in code you submit. And top-level comments have three semicolons.
JuanDaugherty has joined #commonlisp
<zoravur>
right, thanks
<beach>
ERROR already takes a format control and arguments. No need to run it through FORMAT explicitly.
<zoravur>
got it
<beach>
You can do the (MAPCAR #'CODE-CHAR ...) at read time because it never changes.
<zoravur>
how would I do it at read time
<zoravur>
macros?
<beach>
LOOP WHILE (NOT ..) can be better expressed as (LOOP UNITIL ...
<beach>
#. is the reader macro for readtime evaluation.
<beach>
There is usually no reason to have a newline after the LOOP macro name, unless you are really concerned about horizontal space, but you don't seem to be because you have very long lines elsewhere.
<zoravur>
it's just inconsistent style, I actually was concerned with the horizontal space but again I forgot to fix the formatting
<beach>
COND clauses have an implicit PROGN, so you don't need an explicit one. And for matching a sequence of letters, you can use CASE which expresses it better. And you don't typically use EQUAL to compare characters anyway.
<beach>
Three is no need to have two blank lines between two top-level forms.
<beach>
You should create abstractions around your scanner structure and not propagate the representation all over as you now do.
<beach>
Like (defun scanner-cursor (scanner) (getf scanner :cursor)). But I don't see why you are not using just a list of two elements, or a struct, or a standard class.
<beach>
Like (defun make-scanner (s) (list s 0)). Oh, and S is not a great variable name.
<zoravur>
got it, the progn was from chatgpt (sorry). I will check out `case` and i assume it's `char=` for the character comparison?
<zoravur>
Yeah, I guess I got a little lazy with implementing the scanner abstraction properly. Also I guess I wanted to use a plist cause I saw it in the book I was reading. But you're right, just a simple list could also work with car and cdar
<beach>
FIRST and SECOND are better for a list.
<zoravur>
I see
<beach>
There is no reason to have lexical variable names like CHR. You can use CHARACTER.
donleo has joined #commonlisp
<beach>
... again unless you are again in desperate need for horizontal space.
<pranav>
SECOND would be equivalent to CADR though, not CDAR.
<beach>
Right, CADR.
<zoravur>
sorry forgot it's rtl
<beach>
And I would put the full word in skip-... rather than skip-ws which I don't know what it means.
<beach>
OK, that should keep you busy for a while. Then you can resubmit.
<zoravur>
yeah, definitely will. Thanks for all the advice
<beach>
Shinmera: I am not sure what I am looking at.
<Shinmera>
output of SBCL trying to run on the Nintendo Switch
<Shinmera>
and more specifically my game engine
<beach>
Oh, I see.
<cage>
nice!
<Shinmera>
still fighting issues, but we're tantalisingly close to having a triangle
<cage>
it is difficult to me event to imagine the amount of efforts needed to work on this thing
<Shinmera>
let's say a lot more time and money than I should spend on it
<cage>
i see ;-)
<Shinmera>
Apparently I spent about $17k of actual money on this, plus Idk how many of my own work hours
<beach>
Wow,.
<Shinmera>
If you 🫵 feel bad about me spending that much money on things, my Patreon is open. https://patreon.com/shinmera
<ixelp>
Yukari Hafner | Creating Open Source Software, Art and Games | Patreon
<cage>
:D :D
<cage>
that's fair
JuanDaugherty has quit [Quit: JuanDaugherty]
waleee has quit [Ping timeout: 248 seconds]
waleee has joined #commonlisp
<alcor>
Very cool, Shinmera!
rtypo has joined #commonlisp
<alcor>
This would be the first CL to be ported to the Switch, right? (Not sure if ECL was ever boostrapped there).
Algernon69 has joined #commonlisp
Algernon69 has quit [Client Quit]
<Shinmera>
the first lisp at all
<Shinmera>
not a lot of dynamic languages were ported to the switch due to its hostility for the usual optimisations that are used to make them fast
<Shinmera>
I don't think Java ever was
<pranav>
Shinmera: Interesting. Which optimizations exactly?
<Shinmera>
JIT, page protection for GC
<Shinmera>
other things
<pranav>
Does TCO work as expected?
<Shinmera>
I guess?
<pranav>
Cool
<Shinmera>
that's a compiler thing not anything else
jon_atack has quit [Quit: WeeChat 4.3.5]
jonatack has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
jonatack has joined #commonlisp
mgl has joined #commonlisp
<bike>
you can pretty much do TCO as long as you have jump instructions, which pretty much any architecture does
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
random-nick has quit [Ping timeout: 255 seconds]
robin has quit [Quit: Leaving]
NotThatRPG has joined #commonlisp
jonatack has quit [Ping timeout: 258 seconds]
jonatack has joined #commonlisp
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #commonlisp
random-nick has joined #commonlisp
triffid has quit [Remote host closed the connection]
awlygj has quit [Quit: leaving]
triffid has joined #commonlisp
thuna`` has quit [Ping timeout: 252 seconds]
thuna`` has joined #commonlisp
wacki has joined #commonlisp
<Shinmera>
Yeah. JIT and GC on the other hand require some amount of OS support, which is where the problems lie.
<pranav>
I see. I see.
istewart has joined #commonlisp
remexre has quit [Ping timeout: 246 seconds]
remexre has joined #commonlisp
Mandus has quit [Quit: WeeChat 4.1.1]
Mandus has joined #commonlisp
hexa6 has quit [Ping timeout: 244 seconds]
JuanDaugherty has joined #commonlisp
remexre has quit [Ping timeout: 248 seconds]
remexre has joined #commonlisp
alcor has quit [Remote host closed the connection]
alcor has joined #commonlisp
remexre has quit [Ping timeout: 248 seconds]
xlymian` has quit [Ping timeout: 276 seconds]
JuanDaugherty has quit [Ping timeout: 244 seconds]
JuanDaugherty has joined #commonlisp
char has joined #commonlisp
random-nick has quit [Ping timeout: 258 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
attila_lendvai has joined #commonlisp
random-nick has joined #commonlisp
<aeth>
bike: and if it doesn't because it's a more limited high-level instruction set, you can probably still get good-enough TCO with enough inlining (though A tail calls B tail calls C tail calls A might be harder?)
<aeth>
e.g. if you only had something like CL:TAGBODY, well, then put all of that in one TAGBODY
<aeth>
(but it's probably not that simple)
eddof13 has joined #commonlisp
thuna` has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
thuna`` has quit [Ping timeout: 260 seconds]
kenran has joined #commonlisp
Mandus has quit [Quit: WeeChat 4.3.1]
yitzi has quit [Ping timeout: 260 seconds]
yitzi has joined #commonlisp
skeemer has joined #commonlisp
chkhd has joined #commonlisp
akoana has joined #commonlisp
skeemer has quit [Quit: WeeChat 4.3.5]
Mandus has joined #commonlisp
spdegabrielle has joined #commonlisp
eddof13 has quit [Quit: eddof13]
yitzi has quit [Remote host closed the connection]
kenran has quit [Remote host closed the connection]
benjaminl has quit [Ping timeout: 248 seconds]
edgar-rft_ is now known as edgar-rft
Mandus has quit [Quit: WeeChat 4.3.1]
Mandus has joined #commonlisp
xlymian` has joined #commonlisp
xlymian` has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
uhuh has joined #commonlisp
JuanDaugherty has joined #commonlisp
pve has quit [Quit: leaving]
mala has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
mala has quit [Client Quit]
markb1 has joined #commonlisp
overclucker has quit [Read error: Connection reset by peer]
overclucker has joined #commonlisp
mala has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
mgl has quit [Ping timeout: 264 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spdegabrielle has quit [Quit: Connection closed for inactivity]
euandreh has joined #commonlisp
<kingcons>
I'm wondering if there is a sane way to get the system-relative-pathname of a file ...... during macroexpansion? This is a ludicrous idea I realize but uh ... aside from just checking (or *load-pathname* *compile-file-pathname*) is there a way to do this?
JuanDaugherty has joined #commonlisp
uhuh has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
lucasta has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
eddof13 has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
<bike>
kingcons: does system-relative-pathname not work at compile time? asdf presumably knows where the system is if it's compiling it
shka has quit [Ping timeout: 264 seconds]
<kingcons>
bike: that is definitely true but i am hoping to determine the pathname on user-supplied code
<kingcons>
i didn't explain the problem well but i think i found a solution.