←back to thread

221 points benbridle | 2 comments | | HN request time: 0.584s | source

Hey everyone, this is my latest project.

Bedrock is a lightweight program runtime: programs assemble down to a few kilobytes of bytecode that can run on any computer, console, or handheld. The runtime is tiny, it can be implemented from scratch in a few hours, and the I/O devices for accessing the keyboard, screen, networking, etc. can be added on as needed.

I designed Bedrock to make it easier to maintain programs as a solo developer. It's deeply inspired by Uxn and PICO-8, but it makes significant departures from Uxn to provide more capabilities to programs and to be easier to implement.

Let me know if you try it out or have any questions.

Show context
treetalker ◴[] No.44565729[source]
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?

replies(5): >>44566757 #>>44567597 #>>44569044 #>>44569078 #>>44576647 #
1. Walf ◴[] No.44567597[source]
Not quite. Programs normally need to be compiled per system type, and sometimes per system, due to differences in the OSes' versions, APIs and hardware. The idea behind this type of emulator is that you need compile it only once, and the emulator takes care of those differences for you. The Bedrock program would always ‘see’ the same OS and hardware.
replies(1): >>44576684 #
2. benbridle ◴[] No.44576684[source]
You've got it, yeah. It makes writing programs across different systems so much nicer, because you can just write your programs against a single tidy 'bedrock' abstraction of the file system, screen, networking, etc.