News for hackers. Stuff that matters.
Re:Fitting a FORTH in 512 bytes by stcredzero on Friday June 11, 2021 @04:37PM (#27478160)
"To compile a kernel, you need a running kernel."

Why? I guess it depends on how you define "kernel." But to be able to do a batch process like compilation, you can get away with a little.

Re:Fitting a FORTH in 512 bytes by spicybright on Friday June 11, 2021 @04:45PM (#27478249)
I'm guessing by kernel he meant any program that can host other programs in some way.

Can you clarify what batch process means in this case?

I /think/ the authors definition of a kernel is a program that can host other programs in some way.

A video game on a boot sector can't do that (even though it likely would have it's own kernel to function), but some kind of input loop to write memory could.

Re:Fitting a FORTH in 512 bytes by stcredzero on Friday June 11, 2021 @06:12PM (#27479125)
The old Apple II+ I had as a kid only did one process at a time. For an OS, it basically had what amounted to a REPL for Microsoft BASIC.

You don't need to host another program to compile something. All you need to do is to read data off disk, then write other data back.

Re:Fitting a FORTH in 512 bytes by Someone on Friday June 11, 2021 @06:23PM (#27479219)
And what would do that “read data off disk, then write other data back”, if not a program? Even if you use a monitor (https://en.wikipedia.org/wiki/Machine_code_monitor) to write a program, that’s still a program.

The only way to avoid that is to hand-punch a tape or something like that (with lots of practice and patience, it may be possible to program a small PROM or write an early floppy by hand)

Re:Fitting a FORTH in 512 bytes by ronsor on Friday June 11, 2021 @07:43PM (#27479871)
I'm reminded of the manually-inputted Microsoft BASIC bootloader for the ALTAIR 8800: https://just8bits.blogspot.com/2017/03/doing-it-in-less-than...
Re:Fitting a FORTH in 512 bytes by SAI_Peregrinus on Friday June 11, 2021 @10:14PM (#27480809)
I've compiled some simple C (microcontroller blinky) by hand. Then assembled and linked the output, and written the machine code into a HEX (Intel format) file. Then tested it on the micro. It's a rather fun exercise (Type 2 fun).
Re:Fitting a FORTH in 512 bytes by Something1234 on Friday June 11, 2021 @11:26PM (#27481236)
What is type 2 fun?
Re:Fitting a FORTH in 512 bytes by kwdc on Saturday June 12, 2021 @12:34AM (#27481561)
Fun with extra twists and turns you weren't expecting. Usually quite an adventure, some unintended learning and growth. Hopefully a story worth telling.

As opposed to the obvious doing an activity for fun.

Re:Fitting a FORTH in 512 bytes by bear8642 on Saturday June 12, 2021 @01:06AM (#27481697)
Fun after the fact.

type 1 is fun at the time

Re:Fitting a FORTH in 512 bytes by kstrauser on Friday June 11, 2021 @06:29PM (#27479280)
On a Commodore 64, the kernal [sic] was similar to the BIOS on a PC, with display and keyboard handlers, IO routines, etc. When you first turned on the machine, something had to say "** COMMODORE 64 BASIC V2 **", and that something was the kernal.
Re:Fitting a FORTH in 512 bytes by edgyquant on Friday June 11, 2021 @07:24PM (#27479729)
I always kind of thought the kernel was, at its core, the thing that handles processes and hardware io. Even if you use one of those tiny micro kernels it has to handle processes and present an api through which to communicate with devices (even if it doesn’t handle the devices itself.) I think it’s true you need a kernel to compile a kernel in this sense.
Re:Fitting a FORTH in 512 bytes by astrobe_ on Saturday June 12, 2021 @04:37AM (#27482794)
That's precisely the joke. "Kernel" here means the minimal feature set that let you compile a kernel. The sentence is tautological, except perhaps for the definition of "minimal", because there are various flavors of "minimal" (e.g. absolute minimum, practical minimum, ergonomic minimum...).
Re:Fitting a FORTH in 512 bytes by musicale on Friday June 11, 2021 @08:41PM (#27480232)
As the article demonstrates, all you really need is a boot loader.

On early machines (large and small) with front panel hardware, you could use switches to manually enter the boot loader into memory and then start it.

Re:Fitting a FORTH in 512 bytes by stan_rogers on Saturday June 12, 2021 @12:56AM (#27481655)
...and the EDSAC crew decided that that sort of thing was a mug's game as far back as 1949, so they added what amounts to a machine to do that for you (the Initial Orders unit). (No, I don't really miss the Altair, no matter how ecstatic I was about it in high school. Toogle-booting is fun maybe twice.)
Re:Fitting a FORTH in 512 bytes by NieDzejkob on Friday June 11, 2021 @06:56PM (#27479513)
Workarounds exist, like for every other example I mentioned. I am mostly referring to the commonly used dependency graph.