Live data from Hacker News

Show HN: Bedrock – An 8-bit computing system for running programs anywhere

benbridle.com

21–30 of 69 posts

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#21

This is the latest in a very honourable tradition. My first encounter with it was with Martin Richards's BCPL system in 1972. The compiler generated a hypothetical ISA called OCODE, from which backends generated pretty good native code for Titan-2 and System/360, among others. One of those backends generated INTCODE, which was an extremely reduced ISA, for which an interpreter could be easily written (I wrote one in…

Wirth did it before BCPL in EULER, but virtual machines of various kinds predate EULER; Schorre's META-II output a textual assembly language for a fictitious processor, and Short Code predated that, but was intended to be written by hand. Simulators for one real computer on another were already commonplace by the 01960s, so that you could keep running your programs for an obsolete machine, and I don't remember anyone specifically saying so, but I would assume that designers of planned computers were writing such simulators for their designs by the end of the 01950s.

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#22
I like things like this.

One of the big differences from Uxn is the introduction of undefined behavior; by design, you can break it, unlike Stanislav's legos. So presumably Bedrock programs, like C programs, will do different things on different implementations of the system. That's not fatal to portability, obviously, just extra write-once-debug-everywhere work.

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#23

This is the latest in a very honourable tradition. My first encounter with it was with Martin Richards's BCPL system in 1972. The compiler generated a hypothetical ISA called OCODE, from which backends generated pretty good native code for Titan-2 and System/360, among others. One of those backends generated INTCODE, which was an extremely reduced ISA, for which an interpreter could be easily written (I wrote one in…

Wouldn't the 32-bit variant just be WebAssembly?

No, the WebAssembly spec is over 200 pages.

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#26
post #23

Earlier quoted context omitted.

Wouldn't the 32-bit variant just be WebAssembly?

No, the WebAssembly spec is over 200 pages.

Not to disagree, but WebAssembly intentionally does contain two equivalent descriptions (prose vs. mathematical) and two different formats (binary vs. text), plus a completely independent redefinition of IEEE 754 (!). The true size would be more like around 100 pages, where the instruction definitions would take about a half of them if my prediction from the table of contents is close enough. Maybe highly desugarable "WebAssembly Zero" might be defined and would be a good fit once SpecTec can produce a working modular interpreter.

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#27

For people curious about the differences between this and Uxn (as I was): https://benbridle.com/articles/bedrock-differences-from-uxn....

> each pixel having both a foreground and a background colour

how does that work?

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#28

I'm not steeped in computer science, so please pardon me if the following are dumb questions. > Programs written for Bedrock can run on any computer system, so long as a Bedrock emulator has been implemented for that system. Isn't that true of any program? As long as the language that the program is written in is implemented on the system, any (valid?) program in that language will run on that system?

moreover, once "it can run anywhere" is defined, you can't run it anywhere

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#29
post #27

For people curious about the differences between this and Uxn (as I was): https://benbridle.com/articles/bedrock-differences-from-uxn....

> each pixel having both a foreground and a background colour how does that work?

I thought this might be like the ZX spectrum, but that covers each 8x8 block with a foreground and background colour; "sprites" are then bitmaps over that. This does say two colours per pixel, which is confusing.

Re: Show HN: Bedrock – An 8-bit computing system for running programs anywhere

#30

I'm not steeped in computer science, so please pardon me if the following are dumb questions. > Programs written for Bedrock can run on any computer system, so long as a Bedrock emulator has been implemented for that system. Isn't that true of any program? As long as the language that the program is written in is implemented on the system, any (valid?) program in that language will run on that system?

In theory, if a program is written in a high-level language and you have a correct implementation (interpreter, compiler, runtime) of that language on a new system, then the program should be able to run there.

In practice, this is not always so straightforward, especially as you move closer to machine-level details or consider compiled binaries.

Many compiled programs are built for a specific architecture (x86, ARM, etc.). They won’t run on a different architecture unless you provide either: A cross-compiler (to generate new native code for that architecture), or an emulator (which mimics the old architecture on the new one)

Post reply on HN