←back to thread

221 points benbridle | 1 comments | | HN request time: 0.413s | 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
anta40 ◴[] No.44569178[source]
There are few examples here: https://benbridle.com/projects/bedrock.html

But where are the source codes?

replies(2): >>44569196 #>>44576983 #
1. benbridle ◴[] No.44576983[source]
The source code for the microwave clock program is available on the 'Example: Microwave clock' subpage [0]. I hadn't put up code for any of the other programs yet, just because they currently use a lot of library code and idioms that I thought could be confusing to people. I'm intending to make them tidier and release them as proper examplars with commentary sometime. I'll also package up and release my library code at some point, it'd be helpful for people to be able to grab and use all kinds of pre-made functions, and there's a whole user interface framework in there too.

For the meantime though, I uploaded the source code for each of the snake [1], keyboard [2], and system information [3] programs for you or anyone else here to have a look at. Each one is a single source code file with library macros and functions baked in, so you can run `br asm snake-full.brc | br -z` to assemble and run them.

[0] https://benbridle.com/projects/bedrock/example-microwave-clo...

[1] https://benbridle.com/share/snake-full.brc

[2] https://benbridle.com/share/keyboard-full.brc

[3] https://benbridle.com/share/sysinfo-full.brc