<neuro_sys>
(Excuse my dumb questions, it'll take me a while to remember even the most basic things since I only seem to start playing around with it after midnight for some reason)
Zarutian_HTC has quit [Remote host closed the connection]
tabemann has quit [Ping timeout: 240 seconds]
tabemann has joined #forth
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
ornxka has quit [Quit: No Ping reply in 180 seconds.]
ornxka has joined #forth
<MrMobius>
veltas, neat! I like 8 bit stuff myself but mostly 6502 not Z80 :P
<MrMobius>
the C output for the 6502 is not optimized that well but still 5x faster than the fastest STC forth for 6502
<MrMobius>
it would be cool to see how things compare on the Z80. is sdcc the C compiler most people use?
dave0 has quit [Read error: Connection reset by peer]
dave0 has joined #forth
gravicappa has joined #forth
<siraben>
MrMobius: I tried out sdcc but the generated code wasn't as efficient as I liked
<siraben>
Z80 is quite register constrained
<siraben>
I usually write primitives in Forth then rewrite in asm if I need more performance
<MrMobius>
siraben, makes sense
<MrMobius>
I was just curious about the performance of sdcc vs Z80 forths
<siraben>
MrMobius: ah I don't have any benchmarks so take my anecdote with a kilo of salt
sts-q has quit [Ping timeout: 240 seconds]
Gromboli has quit [Read error: Connection reset by peer]
sts-q has joined #forth
hosewiejacke has joined #forth
gravicappa has quit [Ping timeout: 240 seconds]
<veltas>
neuro_sys: Nothing wrong with dumb questions, we all start somewhere
<veltas>
Well there is something wrong if they never stop :P
<veltas>
MrMobius: SDCC yes. Don't know what it's like these days, when I last used it it was rubbish and buggy (still helpful though, somehow!)
Zarutian_HTC has quit [Read error: Connection reset by peer]
Zarutian_HTC has joined #forth
<crc>
S" may or my not be usable at the interpreter (ANS CORE does not require it to work there, though ANS FILE does extend it to allow for at least one string in interpretation of at least 80 characters)
Zarutian_HTC1 has joined #forth
Zarutian_HTC has quit [Ping timeout: 260 seconds]
<neuro_sys>
crc: What word is there to use for a string in text file other than S"? Can I directly load it into Dictionary?
<neuro_sys>
Other than writing it one byte at a time, that is, like CREATE MY-STR 2 , CHAR H C, CHAR i C,
<neuro_sys>
Ah sorry, I misread what you said.
<neuro_sys>
S" is not guaranteed to work at the interpreter, not the other way around.
* crc
was never happy with strings in Forth
actuallybatman has joined #forth
<veltas>
neuro_sys: standard forth tries to avoid state-aware words because there are some nasty caveats, but not having S" on interpreter ... I guess it would make loading files with spaces in their names really nasty or something?
<veltas>
I don't know the rationale 100%, but that's why S" supports being interpreted in the file word set
<neuro_sys>
Now I'm looking at SLITERAL if it's somehow related.
<crc>
17.6.1.2212 SLITERAL copies a string to the memory
<crc>
'The current functionality of 6.1.2165 S" may be provided by the following definition:
<crc>
: S" ( "ccc<quote>" -- )
<crc>
[CHAR] " PARSE POSTPONE SLITERAL
<crc>
; IMMEDIATE'
<veltas>
neuro_sys: "It is intended that no standard words other than S" should in themselves cause the interpreted string to be overwritten."
<veltas>
So I guess it's not in PAD then, some buffer somewhere
Zarutian_HTC1 is now known as Zarutian_HTC
<Zarutian_HTC>
I thought the word " in was meant to be used in in interpret mode
<veltas>
Which Forth is that from?
<Zarutian_HTC>
a variant of eForth iirc
<Zarutian_HTC>
might have been t" where t stood for temporary
<veltas>
I think prefer it having a different name
X-Scale` has joined #forth
<Zarutian_HTC>
basically it executed immediately and gave you addr length of the string inside the terminal input buffer (tib for short)
catern has quit [Ping timeout: 256 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
<Zarutian_HTC>
not used much other than for demostration iirc
X-Scale` is now known as X-Scale
<neuro_sys>
Now I'm curious in what different ways forth programs are loaded.
rprimus has quit [Ping timeout: 256 seconds]
<neuro_sys>
I see that they are stored as text files, but when loaded, is it not the text interpreter doing the job?
rprimus has joined #forth
<veltas>
Zarutian_HTC: It's useful with stuff like INCLUDE &c.
<veltas>
I mean INCLUDED
<Zarutian_HTC>
in that varian of eForth you basically changed an system/user variable to any xt that mimiced the input fetch words
<Zarutian_HTC>
note this varian of eForth did not presume disk or floppy drive or filesystem
xek_ has joined #forth
<veltas>
neuro_sys: As far as I know the Forth standard manages to avoid defining a single word for general 'interpreting', and I think forths probably drive the different types of interpreting separately
catern has joined #forth
<veltas>
You have an "input source", an input buffer, >IN, and REFILL
xek__ has quit [Ping timeout: 256 seconds]
<veltas>
The interactive interpreter in standard forth is called QUIT (because it's what you get when you execute QUIT, think about it)
<veltas>
The file interpreter is INCLUDE-FILE etc
<veltas>
The block interpreter is LOAD
<neuro_sys>
Thanks that clarifies some things.
<veltas>
The string interpreter is EVALUATE
<veltas>
If you look at all those definitions in the standard they refer to things like >IN, input source, input buffer, etc
<veltas>
I can't imagine being able to write a very idiomatic forth word to do generic interpretation that could be used as the core of all these words
dddddd has quit [Ping timeout: 256 seconds]
<veltas>
Look at the definition of REFILL, it helps explain the concept of the interpreter quite well actually
dddddd has joined #forth
<veltas>
Section 3.4 has the whole picture
actuallybatman has quit [Ping timeout: 264 seconds]
actuallybatman has joined #forth
jedb has quit [Remote host closed the connection]
jedb has joined #forth
kori has joined #forth
kori has quit [Changing host]
kori has joined #forth
WickedShell has quit [Remote host closed the connection]
xek_ has quit [Ping timeout: 260 seconds]
<veltas>
How are you meant to add a wordlist to the start of the search order in standard forth?
<veltas>
I'm at: also get-order my-wordlist swap 1+ set-order