flashforth has quit [Quit: Connection closed]
dave0 has quit [Quit: dave's not here]
travisb_ is now known as tabemann
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
zolk3ri has quit [Remote host closed the connection]
gravicappa has joined #forth
sts-q has quit [Ping timeout: 240 seconds]
flashforth has joined #forth
sts-q has joined #forth
dave0 has joined #forth
jedb has quit [Remote host closed the connection]
jedb has joined #forth
sts-q has quit [Quit: ]
sts-q has joined #forth
flashforth has quit [Quit: Connection closed]
hosewiejacke has joined #forth
Vedran has quit [Ping timeout: 272 seconds]
Vedran has joined #forth
jedb_ has joined #forth
jedb has quit [Ping timeout: 272 seconds]
xek has joined #forth
f-a has joined #forth
jedb__ has joined #forth
iyzsong has quit [Ping timeout: 256 seconds]
iyzsong- has joined #forth
iyzsong- is now known as iyzsong
jedb_ has quit [Ping timeout: 260 seconds]
inode has joined #forth
f-a has quit [Quit: leaving]
jedb_ has joined #forth
jedb__ has quit [Ping timeout: 240 seconds]
dave0 has quit [Quit: dave's not here]
<nihilazo> what is the relationship between forth inc and the forth language?
<nihilazo> do forth inc "own" forth the language or are they just a company that maintains a forth system?
<hosewiejacke> latest (from my POV)
<patrickg> they don't control any of the standards (and there are more than enough people who reject any standardization of Forth), so the latter: they're one of several Forth vendors
<nihilazo> ok
<nihilazo> I find it interesting that people reject a standard, maybe I'm just not tuned into the way forth works yet as a total newbit
<nihilazo> s/newbit/newbie/
<nihilazo> (clearly I am not, I have still not got my head around stack manipulations. I might make myself a little game to try and teach myself how to do them)
<veltas> nihilazo: They've had a certain amount of influence over Forth and standardisation attempts. They are part of Forth's history, and one of the handful of serious commercial vendors.
<nihilazo> k
<veltas> I don't think anyone should claim the Forth standard is the one true forth, given the very nature of forth. It's the only serious attempt at a standard, and like all standards it has rough edges. It's been adopted by some of the commercial vendors and gforth, so that's about as successful as you can get
<veltas> Learning standard Forth and being somewhat aware of which words are conventional and which are the standard attempting to 'unify' things is not a bad starting place, it's what I did
<nihilazo> alright
<veltas> You end up looking at other forths, and older forths, and older standards, and learning a bit more about the rough edges. I fully appreciate why people don't like the standard with that context, but I don't think it hurts to start there
<nihilazo> I'm not sure when I'll be using forth, honestly. depends if I end up liking it I guess
<nihilazo> I know there's modern forths for platforms like the c64 which are really interesting to me
<veltas> Yeah I'm writing a less modern forth for the zx spectrum
<nihilazo> nice
<nihilazo> spectrum is cool
<nihilazo> I'm actually using pforth on plan9 to learn with, just because :D
<nihilazo> working well on unusual platforms seems to be a strong point of forth
<nihilazo> (unusual/old/small/etc)
<siraben> I am once again plugging my Forth for the Z80 (specifically the TI-84+ calculator) https://github.com/siraben/ti84-forth
<veltas> Go for it, I need to read your code and steal your ideas :P
<veltas> nihilazo: Nothing wrong with that!
<nihilazo> I feel like I might end up liking forth a lot but also might end up disliking forth a lot, don't know enough about it to say yet
<veltas> Prediction: you hate it and then you keep coming back to it
<veltas> I'm at the "rationalising use of dead technology" stage
hosewiejacke has quit [Ping timeout: 272 seconds]
<nihilazo> well, I want to get into developing for the c64 and it's either forth or 6502 asm
<nihilazo> (6502 isn't that bad actually, tbh)
<veltas> 6502 asm warrants using bytecode pretty quickly because of how verbose it is
<veltas> Sweet-16, something similar, or forth
<veltas> Really all 8-bit codes are like this, but 6502 is especially bad
<nihilazo> I think durexforth for the c64 (as well as having a funny name) is meant to be pretty good?
<nihilazo> it's also developed by the developer of lsdj, so that's cool
<veltas> I like 6502 too, writing it is very mechanical, and you can see where RISC came from
<veltas> I have no idea if it's good, but if it's forth it probably is good
<veltas> It has a vim-style editor supposedly so it must be good, I want something like that too eventually
<veltas> Great minds think alike, I heard about what they did and it's basically what I was doing but for the C64
<nihilazo> I'm not such a fan of vim-style editing, but it's better than the alternative keyboard-only editing styles to me
<nihilazo> so nice to have on a c64
<nihilazo> certainly better than the BASIC line editor lol
<veltas> My only issue with BASIC on speccy is lack of move/copy for multiple lines at a time
<veltas> And the token-based input is horrid
<nihilazo> I want to get a real c64 at some point
<veltas> It's actually quite good otherwise
<nihilazo> but I'd need to set up a display and stuff as well, and ehh
<veltas> No time like the present, they only get more expensive
<nihilazo> they also sell for stupid prices on ebay already
<nihilazo> I just like exploring computers where I can poke at memory, can't do that on a modern machine
<nihilazo> (not easily, anyway. Because the OS gets in the way and everything)
<veltas> I bought like 5 spectrums until I got one that worked years ago, price has gone up so much now I need to fix the others
<nihilazo> wonder what the cheapest way to get a 64 is
<nihilazo> ebay prices are dumb
<veltas> They're not dumb it's just supply/demand, loads of people want them
<nihilazo> yeah true
<nihilazo> also the SID chip
<nihilazo> people sell C64's without the SID chip and then sell the SID seperately for like £30
<nihilazo> I had a dragon 32, that's a weird machine. 6809, almost compatible with a tandy color computer but not exactly
<nihilazo> didn't do much with it
<veltas> Anyway in my opinion Forth is the right language for 8-bit development, when you don't want to use pure assembly.
<veltas> Or at least the right model, you might not want a full interpreter but just the threading is a good way to write larger assembly projects, especially for 6502
<veltas> (You can write a forth to basically let you slice off the interpreter part when you have stable code you want to release)
hosewiejacke has joined #forth
<nihilazo> yeah, it seems very flexible
<nihilazo> I know there's a forth for the gameboy too, and many other platforms
<nihilazo> generally people seem to think that forths work better than C on 8-bit machines, although that may be because mostly the C compilers suck. I have no clue tbh
<nihilazo> and forth is a more interesting language to learn than C
<X-Scale> have you checked Scheme too ?
<nihilazo> yeah, scheme is cool, not sure about on 8-bit platforms
Zarutian_HTC has quit [Remote host closed the connection]
<siraben> Scheme + Forth + Z80 = https://github.com/siraben/zkeme80 :D
<siraben> Scheme is a great language to write an assembler in, and so I was able to extend it enough to make it easy to define Forth words https://github.com/siraben/zkeme80/blob/master/src/forth.scm
dysprosaic has joined #forth
dysprosaic has quit [Quit: Quit]
f-a has joined #forth
jedb_ is now known as jedb
Guest5275 is now known as KipIngram
<joe9> nihilazo you know of 9front? it is more actively developed than plan9 these days.
proteus-guy has quit [Ping timeout: 264 seconds]
elioat has joined #forth
<nihilazo> joe9: yes, I am running 9front
<nihilazo> I just said plan9 because I've noticed a lot of 9front folks also just say plan9 when they mean 9front
<MrMobius> nihilazo, interesting that forth works better than C on 8-bit machines. which ones do you think that's true for? I made a game in asm, C, and Forth for 6502 to compare and the Forth version was 3-10x slower than C
<MrMobius> unless you mean compiling the forth on the machine itself instead of cross compiling :) forth is definitely better for that
<nihilazo> huh, idk. I've just heard people say so
<nihilazo> I don't actually know lol
<nihilazo> although this is like, on the gameboy, the C compiler is complete garbage so it makes sense that a forth that isn't garbage would be better
<MrMobius> haha ya lots of misinformation floating around. ive even heard people say forth is only about 25% slower than asm on 6502. thats absurd
<veltas> MrMobius: I think it really depends on what you're doing, depending on critical words that might be entirely written in asm anyway especially
hosewiejacke has quit [Ping timeout: 240 seconds]
<f-a> mhhh
<f-a> I have a file some words
<f-a> is there a way for me to «export» only some of them
<f-a> I am using gforth, but any pointer would do
<MrMobius> veltas, sure, just make your critical word thousands of lines of assembly then you only need to use it once :)
proteus-guy has joined #forth
elioat has quit [Quit: elioat]
<patrickg> It might not be that C is entirely unsuitable but given modern CPUs and C's machine models compilers tend to be written with an assumption that an ~infinitely large stack is available and that collides somewhat with 6502's stack featuring an impressive 256 bytes
elioat has joined #forth
iyzsong has quit [Quit: ZNC 1.7.5 - https://znc.in]
iyzsong has joined #forth
f-a has quit [Quit: leaving]
f-a has joined #forth
<f-a> that testing words someone linked here yesterday are really cleverly written
<f-a> yes
<veltas> I don't know the history, it seems like the standards people liked the tests so much they added it into their standards document, and onto the website
<veltas> I definitely agree the tests are good
clog has quit [Ping timeout: 240 seconds]
<siraben> yeah the tests are good
<siraben> and quite portable too, I was able to copy/paste the test implementation code and have it work under my TI-84+ Forth
<f-a> I am worried of writing too many words…
<f-a> that project is lovely siraben
<siraben> f-a: thanks!
hosewiejacke has joined #forth
<nihilazo> is forth case-insensitive?
<nihilazo> I see things written in all uppercase and also all lowercase
<nihilazo> does forth not care or are both just defined in modern forths
<f-a> I suspect 99% of implementations are case-insensitive
<hosewiejacke> gforth isn't case sensitive
<nihilazo> ok
<f-a> 123 cells allot ← is there a way to fill them cells with a specific value?
<inode> FILL
<f-a> danke
<inode> or ERASE if you want to fill with zeros
<f-a> > Store c in u chars starting at c-addr.
<f-a> how is that different from cells- I mean should I be mindful of anything
<inode> CELLS the word? it multiples the number on the top of the stack by the size of a stack cell (usually machine word size, afaik)
<hosewiejacke> E.g., on a 16-bit Forth system "10 CELLS" will give you 20, whereas on 32-bit it will 40.
<hosewiejacke> Thus you can make you code portable.
elioat has quit [Quit: elioat]
<f-a> ok I will try to get more precise in my question
<f-a> say in the create part of my word I have
<f-a> create ( nw nh -- )
<f-a> dup , , \ stack: nw nh
<f-a> * cells allot \ stack: -
elioat has joined #forth
<f-a> the alloted cells, what value do they have?
<inode> probably whatever was in memory in that range before you called ALLOT
f-a has quit [Read error: Connection reset by peer]
f-a_ has joined #forth
<f-a_> meh I d/c'd
<f-a_> let me repaste
<f-a_> f-a ok I will try to get more precise in my question
<f-a_> f-a say in the create part of my word I have
<f-a_> f-a create ( nw nh -- )
<f-a_> f-a dup , , \ stack: nw nh
<f-a_> f-a * cells allot \ stack: -
<f-a_> > elioat [~elioat@98.2.227.87] has joined #forth
<f-a_> f-a the alloted cells, what value do they have?
<f-a_> f-a and is there an allot that autofills them with one value?
<f-a_> f-a what I do not understand is that if I should *first* allot and then modify the values
<f-a_> f-a or just go on with `fill` without allot
<inode> ALLOT first then FILL
<inode> i didn't find an ALLOT with initialisation, so i define ALLOT/ERASE instead
<f-a_> excellent word
<inode> : ALLOT/ERASE HERE SWAP DUP ALLOT ERASE ;
<f-a_> so when I did allot, I can call he- ok, super
f-a_ has quit [Quit: leaving]
f-a has joined #forth
<f-a> oh
<f-a> I finally get that AUs cells chars are
<f-a> (I think)
<f-a> basically using AUs *directly* is almost always a mistake, correct?
hosewiejacke has quit [Ping timeout: 240 seconds]
gravicappa has quit [Ping timeout: 260 seconds]
gravicappa has joined #forth
<f-a> well this might be inane, but how do I check which size my Address Unit are?
<f-a> (most likely 32bit?)
<inode> address unit size as in smallest number of addressable bits, like 8 bits on most popular archs? or machine word size as in the optimial number of bits your processor will process at once?
<f-a> inode: thanks, I thought there was a way to check inside gforth what that number is
<f-a> well
<f-a> if would be of no use in any case
<inode> i guess if you assume address unit size of 8, then CELL 8 * will leave you with the machine word size in bits
Zarutian_HTC has joined #forth
hosewiejacke has joined #forth
hosewiejacke has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 260 seconds]
X-Scale` has joined #forth
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` is now known as X-Scale
elioat has quit [Quit: elioat]
xek has quit [Remote host closed the connection]
xek has joined #forth
xek has quit [Remote host closed the connection]
xek has joined #forth
xek has quit [Remote host closed the connection]
xek has joined #forth
elioat has joined #forth
xek has quit [Remote host closed the connection]
f-a has quit [Ping timeout: 246 seconds]
f-a has joined #forth
<veltas> "address units" AKA bytes
elioat has quit [Quit: elioat]
<veltas> f-a: Although it's deprecated, if your forth supports environmental query strings there is ADDRESS-UNIT-BITS
<veltas> But I think every platform gforth supports is 8-bit address units AKA 8-bit bytes.
<f-a> I do not have that word, but yeah 1byte seems most sensible
<veltas> : ADDRESS-UNIT-BITS S" ADDRESS-UNIT-BITS" ENVIRONMENT? 0= IF ABORT THEN ;
<veltas> ADDRESS-UNIT-BITS . \ 8
<veltas> I can't rightly explain why environmental query strings are a thing, but they work like that
<veltas> Does anyone know rationale for environmental query strings?
<veltas> f-a: 'byte' is the term for the smallest addressible unit on a system, it doesn't have to be 8-bits, it's generally used to store individual characters.
<veltas> Calling it an 'addressible unit' rather than a 'byte' is some kind of pedantry
<veltas> Not accusing you of being pedantic, just accusing the standard of being pedantic
<f-a> oh, I did not know that
<f-a> I always thought byte = 8 bit
<f-a> AU is nice because
<f-a> could be addressable(sp) unit
<f-a> or Astronomic Unit
<f-a> in case God is using our universe as a handy Forth machine
<lispmacs[work]> the moment of truth:
<veltas> I have to step back a moment just to appreciate how bad Forth's standard is in this regard
* lispmacs[work] checks to see if anything in his new circuit is catching on fire
* inode disconnects the printer
<veltas> In C it's just CHAR_BIT
* lispmacs[work] discovers what happens when you put ground on the wrong pin
<inode> veltas: ever seen CHAR_BIT defined as anything other than 8?
<veltas> Oh dear
<veltas> inode: 18-bit computers were common around time C was first invented, usually with 6-bit bytes
<veltas> But ANSI C requires char to be at least 8 bits.
<scoofy> PDP-7 (which the original Unix was written on) was 18-bit. it was first written in asm though
<scoofy> PDP-11 is 16-bits with 8-bit bytes
<veltas> From a scan of K&R 1st edition, the Honeywell 6000 mentioned there has 9-bit characters
<veltas> nihilazo, f-a: Regarding case sensitivity, I think it's now an environmental restriction in the standard if a forth is case-sensitive
<MrMobius> also 7 bit bytes in some mainframes
<veltas> ASCII is a 7-bit character standard
<veltas> 65535 in base-12 is 31B13
f-a has quit [Quit: leaving]