TUNIX

You need an actual VIC.

Moderator: Moderators

User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Changes:

* A bunch of essential fixes not to mention in detail.
* Debugger is disabled. Will just exit the Lisp program with an error message instead of going vodka.
* Fixed calling the ONERROR handler.
* ONERROR is disabled for the C16.
* Knocked down the size of the GC'ed stack by a page. Most of that stack is used by the MAKE-COUNT recursion test.

Heap sizes now:

C128: 9691
C16: 2664
C64: 19097
Plus/4: 25300
VIC: 5609

EDIT: I think I deserve an ice cream for this right away.
Attachments
tunix.cbm.2024-07-24.zip
(91.54 KiB) Downloaded 140 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Glowing hot, straight out of the oven:

* MACROEXPANDs in the REPL (regular, debugger, LOADer) as soon as MACROEXPAND is defined. You may redefine it.
* heap relocation table won't overflow; GC is restarted instead
* debugger can step into functions 's', or step over them 'n', print expressions 'p<expression>' (not macro-expanded), and resume execution 'c' or it will evaluate whatever you input like a regular expression, e.g.:
* '(stack)' will dump the object stack
* Exit the debugger/program with '(exit)'.
* '(debugger)' will invoke the debugger as long as it is in your code. Try something like '(progn (debugger)(= x (+ x 42)))' or insert it somewhere into a lisp file.
* The tests aren't loaded in the (pre)release versions any more. If you want, you can run them with '(load smoke-test.lisp)' or '(load test.lisp)' or (load test-onerror.lisp).
* Manual included in Markdown and PDF format.

But you cannot fix a faulty expression yet, so printing, trying out something else and and '(exit)' is the only thing left on errors.
Other thing is that LOAD won't complain if there was a file error (needs to read and parse the drive's response and I was lazy).
Run from a real 1541 only with a broom in place. ;)

Have fun!
Attachments
tunix.cbm.2024-07-26.zip
(546.11 KiB) Downloaded 150 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Da revolution is near! ;)

Nah, just fixed some bugs that made me very unhappy about the diagnostics I wrote. Shouldn't have passed. :( The manual describes the REPL now. Feeling ready for a 9-to-5 job again.

EDIT: Oh, and I hope you like the code style of https://github.com/SvenMichaelKlose/tun ... c/lib/lisp.
EDIT: '(ignore)' will leave the debugger and make the REPL continue with the next top-level expresseion.
Attachments
tunix.cbm.2024-07-27.zip
(506.55 KiB) Downloaded 139 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Let there be Sunday! Away from keyboards. But before: a little stress-tested update.
Attachments
tunix.cbm.2024-07-28.zip
(506.54 KiB) Downloaded 143 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

New version, adapted for KERNAL screen editing. That's why the typical Lisp prompt, the asterisk '*', is gone, and new user-defined function SOURCE has been added.

SOURCE returns a defining expression for any symbol, e.g. "(source 'message)". But it will be macro-expanded – the limit of 80 chars seems to be pretty useless for writing apps. :(

The highlighting of expressions in the debugger has been improved greatly but there are still surprises to have had.

The manual has been updated, too.

The garbage collector is kicking in rather often. Guess it's time to get busy with banking/Ultimem again.

Have fun any way!
Attachments
tunix.cbm.2024-07-28.zip
(506.54 KiB) Downloaded 165 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

As usual on VIC-20 Denial exclusively. :p After all those nightly releases a pre-breakfast one:
Screenshot from 2024-08-02 10-47-37.png
* Loads only functions necessary for macro expansion plus macros LET, WITH and DO. (Only up to MACROEXPAND on the C16.)
* More functions can be loaded file by file. A list is printed after boot. Prerequisites of a function should load automatically.
* All files can be loaded with "(load all.lisp)". C16s will definitely not load them all. Takes ~6.6K of heap. If it doesn't read "Testing X..." X is not tested.
* "(debugger)" activates the debugger for the next user input too, so you can step through it right away without need for a BLOCK, or having to create and edit a file.
* Fixed expression highlighting in the debugger.
* The interpreter is a bit smaller.

Other notes:
* GC may take a couple of seconds, especially on the Plus/4 after it read in all of the environment. I figured that special effects are not necessary.
* Still, cc65 is doing the job with no trickery.
* UNDEF is a bitch. Don't use it. Spoils space travel.
Attachments
tunix.cbm.2024-08-02.zip
(515.38 KiB) Downloaded 138 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Took care of the environment and added tests and fixes and tests and fixes and left in some hardcore bugs for those who can fix them before the crack pipe hit fades. I'll go for a Cohiba cigar instead if this thing works. The GC needs to get stressed out even more.

Usually I'd be dreaming up apps to write with this which could amaze somebody but aside from the compiler an editor would be nice – but would it even be fast enough for that?
Attachments
tunix.cbm.2024-08-02.zip
(519.91 KiB) Downloaded 143 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

GC bug fix affecting function returns in the debugger.

EDIT: Plus some environment fixes.
Attachments
tunix.cbm.2024-08-03.zip
(518.05 KiB) Downloaded 142 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Oh dude...

* Fixed argument evaluation bug that made one developer look like a complete idiot.
* VIC-20 version with all cc65 optimizations on.
* Debugger prints result of last evaluation.
* Debugger short command 'n' working as expected.
* PET version included – perhaps somebody has an idea why it doesn't start.
* More tests.
* Stricter heap tests to heat up server racks down at Github.com.
* Crashing bugs flattened.

EDIT:
* UNDEF works!
* C16 loads all of base environment.
* REVERSE added.
* Reversed colours to highlight expressions in the debugger.

I was actually able to debug environment code with the debugger. :)
Something harmless to try out:

Code: Select all

(load "subseq.lisp")
(debugger)
(subseq '(l i s p) 0 2)
Screenshot from 2024-08-04 03-27-26.png
(VIC-20)
Screenshot from 2024-08-04 04-19-20.png
(Plus/4)

Have fun!
Attachments
tunix.cbm.2024-08-04.zip
(540.16 KiB) Downloaded 140 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Keeps displaying top-level function when stepping into an anonymous one. But more impact come with functions UNDEF and UNIVERSE having been removed. There's now variable *universe* that can be dealt with using standard functions.

If you did a '(load "all.lisp")' you can get rid of the functions like this:

Code: Select all

(= *universe* (member 'x *universe*))
The macros are still there, because they are in list *macros*. Also remove them like so:

Code: Select all

(= *macros* (member 'do *macros*))
A little more convenient for overlaying an app in parts:

Code: Select all

(fn reset ()
  (= *universe* (member 'appstart *universe*))
  (= *macros* (member 'appstart *macros*)))
(macro appstart nil)

(load "app-part1.lisp")
(reset)
(load "app-part2.lisp")
BEWARE: The KERNAL's line buffer is too limited to enter the RESET function in the terminal. Do the file thing. The VICE emulator is your friend with this any way (warp mode).

Have fun!
Attachments
tunix.cbm.2024-08-04.zip
(538.64 KiB) Downloaded 138 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Screenshot from 2024-08-05 16-21-26.png
Closing in on v0.0.1 this one brings:

* (time): Bekloppie count since whenever counting started (on system start in case of CBMs).
* +bps+: Number of bekloppies per second. (50, please contribute. :p )
* +target+: One of c128, c16, c64, pet, plus4, unix, and vic20.

And OPEN changed a lot:

* Allocates and returns the channel number (aka LFN). You cannot pass it as the first argument any more.
* Write mode (symbol "w").

It's device #8 only at the moment and prepending "@:" to filenames when writing. File "test-file.lisp" has some char-wise file I/O to watch. It's slow but I'm happy to announce that it's still doing more lines per minute than my neighbours.

Have fun!
Attachments
tunix.cbm.2024-08-05.zip
(496.87 KiB) Downloaded 137 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Compressed lists are on. And they aren't even experimental as this version has been debugged, tested and cleaned up mercilessly.

This is what compressed conses are about: Storing the CDR of a cons can be spared if that is following immediately on the heap. Since that makes compressed conses immutable (you cannot use SETCDR on them), compression is performed if the garbage collector was called by the program and not the allocator. The GC is also called to compress conses if the available heap left is less than 2K after LOADing a file.

If you want to make sure that all conses that can be are compressed you have to call the garbage collector twice because they have to butt up first.

Have fun!
Attachments
tunix.cbm.2024-08-08.zip
(501.92 KiB) Downloaded 127 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Breakpoints it is! I'll be on a bit of a vacation over the weekend and give the debugger some extra love to make it production-ready. Please check the manual for details. Heap compression might be taken to its limits too.

Have fun!
Screenshot from 2024-08-08 22-29-02.png
Attachments
tunix.cbm.2024-08-08.zip
(509.41 KiB) Downloaded 152 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

Parts of the zero page weren't cleared on start-up. One doesn't have that issue with non-6502 compilers. Better use this one now.

Have a fun Sunday!
Attachments
tunix.cbm.2024-08-10.zip
(509.41 KiB) Downloaded 143 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Guru
Posts: 1548
Joined: Fri Feb 28, 2014 3:56 am
Location: Bielefeld, Germany

Re: TUNIX

Post by pixel »

It's been an awesome weekend but there wasn't more than that zeropage thing to think about computer-wise.

Is somebody even playing with this thing? Not as if I would care... :p
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
Post Reply