2 hours ago, mobluse said:
It's a limitation since you need to insert line-breaks. The source you paste from doesn't always have line-breaks (CR).
A related topic: In GForth they type "compiled" when they reach new-line (CR), e.g.
The "compiled" is useful feedback.
CR is how the CX16 line input mode works. If you are copying and pasting on a 32bit or 64bit system into an emulator of an 8bit system, I guess you are just going to have to get the 32bit or 64bit system to be a bit smarter about how it does things. Might need to copy it into the system text editor, save it in a text format with CR, and INCLUDE it from there.
Mind, xForth is still alpha, including that there is no INCLUDE yet, but that is deferred pending emulator development. Since it is mostly necessary to open the file and made it the default input until EOF, and then make the console the default input again, most of the tools to do it will already be available from the first prototype BLOCK system.
I could also note that copy and pasting from an online source directly into xForth might be putting more faith in an alpha build than is warranted. Copy and pasting line by line and looking for smoke as you do might be a better protocol anyway.
Gforth is a much bigger Forth than xForth, which saves an ongoing log of every line entered if you run it correctly, so it would never have need to edit the text on the screen and run it again. Plus going back, editing it on the screen and hitting return doesn't work on any system that gforth runs on. I've already got OK as a NOP, but I am not going to make a word as potentially useful as "COMPILED" into a NOP too.
xForth is a port of eForth, which is generally used today on smaller microcontrollers, like AVR8's. It IS a lot more space conscious than gforth is. Indeed, 10K is far too big for the final release build of xForth ... once INCLUDE and SAVE4TH are working, some of what is now included in the base image are going to get sent off to a CORE.FS include script to make a less overweight base image size. 7K would be a lot more respectable for an eForth descended Forth.