Skip to content

Instantly share code, notes, and snippets.

View Bvngee's full-sized avatar

Jack Nystrom Bvngee

View GitHub Profile
@SpaceWalkerRS
SpaceWalkerRS / 24w33a-redstone-experiments.md
Last active September 4, 2024 17:56
A look into the experimental redstone changes in 24w33a.

24w33a Redstone Experiments

24w33a introduces new experimental changes to redstone dust, aiming to fix some of the long standing issues with it, like the lag it causes and the unintuitive and unreliable way in which it updates.

The problems with redstone dust

The problems with redstone dust stem from its naive implementation. When a wire is updated, it checks what signal it receives from surrounding blocks. If that is different from its current signal strength, it updates it and then notifies neighboring blocks. This implementation is fine for individual wires, but when multiple wires are connected, its flaws become apparent: the wires power each other, but the signal degrades over distance. Thus when you remove the power source from a line of wires, the signal will die out completely. However, any individual wire does not have this context. It will only decrease its signal strength to match what it receives from neighboring wires, and that will repeat until all wires have depowered completely. This r

@mlugg
mlugg / incremental.md
Last active March 23, 2025 01:19
Incremental compilation overview

Zig Compiler: Incremental Compilation

A few ground rules:

  • Values in the InternPool are immutable. The meaning of a given Index never changes.
  • The only kind of "exception" to this is that the namespace of types may change. The namespace index is constant, but the contents of that namespace can change while the type lives at the same Index.
  • Incremental compilation works at the level of single units of semantic analysis (AnalUnit). During semantic analysis, every AnalUnit registers "dependencies" on various things ("dependees"). On each incremental update, these dependencies are used to figure out what to re-analyze.
  • An incremental update may analyze more AnalUnits than are necessary, but it will never analyze the
@Bvngee
Bvngee / Sway_wlroots_nixos_process.md
Last active April 4, 2024 18:44
How to compile Sway and wlroots together from source (on NixOS)

How to compile Sway and wlroots together from source (on NixOS)

I came up with this process when I needed to compile the latest commit of Sway to test a new feature, and my distro (NixOS) didn't have the required wlroots version packaged so I needed to compile that too. Here are the commands I ran for each repo:

1) wlroots

git clone https://gitlab.freedesktop.org/wlroots/wlroots
@edwardhotchkiss
edwardhotchkiss / Makefile
Created March 5, 2014 23:30
ATtiny85 avr-gcc / avrdude Makefile
DEVICE = attiny85
CLOCK = 8000000
PROGRAMMER = stk500v1
PORT = /dev/tty.usbmodem1421
BAUD = 19200
FILENAME = main
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE)
all: usb clean build upload