Ticket created by ~rickcarlino on ~crc_/retroforth
After running
make
, the following error was observed:cp ../../ngaImage nativeImage ../../bin/retro-extend nativeImage x86/common.retro x86/cmos-rtc.retro x86/serial.retro x86/display.retro x86/ata.retro x86/listener.retro Initial Image Size: 9914 s:index-of ? + 220 tokens from x86/common.retro + 59 tokens from x86/cmos-rtc.retro + 186 tokens from x86/serial.retro 0xB8000 ? + 517 tokens from x86/display.retro + 323 tokens from x86/ata.retro + 252 tokens from x86/listener.retro New Image Size: 10814 MAX SP: 16, RP: 55 Stack not empty! Stack: ../../bin/retro-embedimage nativeImage >image.c cc -fno-pie -Wall -m32 -DTARGET_X86 -c retro.c -o retro_qwerty.o retro.c:7:10: fatal error: sys/limits.h: No such file or directory 7 | #include <sys/limits.h> | ^~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:7: native386] Error 1
Ticket created by ~rickcarlino on ~crc_/retroforth
#Steps to Reproduce
- Run
retro -i -t foo.retro
(assuming this file does not exist)- Observe that
retro
goes into the REPL, but does not crash or emit warnings about the fact that the file is missing.#Expected Behavior
Since most CLI tools will exit with code 1 and emit an error message (or emit a warning if they do not crash on bad input), I found the current behavior surprising.
#Version Info
RETRO 12 (2021.7)
Ticket created by ~rickcarlino on ~crc_/retroforth
EDIT: A previous version of this issue incorrectly stated the problem. The problem does not relate to word not found errors as previously stated.
The current RetroForth REPL behavior differs slightly from what I expected from a traditional Forth.
In REPL mode, a stack underflow error will exit the process:
$ retro RETRO 12 (2021.7) 524288 Max, 15004 Used, 509284 Free s:put ERROR (nga/execute): Stack Limits Exceeded! At 9320, opcode 29. sp = -1 $
This behavior is unlike most desktop Forth systems (GForth, PForth, etc..), which recover from such an error.
Comment by ~rickcarlino on ~crc_/retroforth
As multitasking becomes more integrated, there may be a need for "task local" variables. This is something I've been thinking a lot about lately, especially with regard to how
hook
s would work in a heavily multitasked VM.
Comment by ~rickcarlino on ~crc_/retroforth
I agree that a callback system would be useful, especially for eventually porting the VM to architectures that use interrupts.
Ticket created by ~rickcarlino on ~crc_/retroforth
Ticket created by ~rickcarlino on ~crc_/retroforth
You can run an application in non-test mode via
retro app.retro
. You can also accomplish this viaretro -f app.retro
.It is possible to run tests via
retro -t -f app.retro
. It is not possible to run tests withretro -t app.retro
(notice the missing -f)Current behavior appears to be a noop. This behavior is inconsistent with the non-test equivalent.
Comment by ~rickcarlino on ~crc_/retroforth
Appears to be online again. Closing, thanks!
REPORTED
RESOLVED FIXEDTicket created by ~rickcarlino on ~crc_/retroforth
#Steps to Reproduce
- Visit any glossary page from the examples section
- Observe an error:
ERROR (nga/file_get_size): Invalid file handle
Comment by ~rickcarlino on ~crc_/retroforth
Thanks, Charles!
REPORTED
RESOLVED FIXED