Peter Hellberg's Avatar

Peter Hellberg

@c7.se

Go and Zig developer, Valheim player, Bread baker. https://c7.se

76
Followers
62
Following
30
Posts
18.10.2023
Joined
Posts Following

Latest posts by Peter Hellberg @c7.se

Preview
Zig Day Stockholm #0 Zig Days are single-day collaborative programming events

On November 29, I’ll be at Zig Day Stockholm. I look forward to meeting other Zig enthusiasts there.

zig.day/europe/stock...

20.11.2025 07:05 πŸ‘ 8 πŸ” 3 πŸ’¬ 0 πŸ“Œ 0
Back of a Dell OptiPlex NX1 300+ β€œNet PC” under my desk.

Back of a Dell OptiPlex NX1 300+ β€œNet PC” under my desk.

I just published c7.se/reviving-a-q... where I document the experience of getting my old web server up and running again.

10.09.2025 09:56 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Cool, I've opened a PR now where I add myself and the fp8x8 app.

Sidenote; It sure is a small world when I'm acquainted with both @deadprogram.com and Olle W.

17.03.2025 10:29 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

(Jag testade att ladda ner de 49 bΓΆcker jag kΓΆpt frΓ₯n Amazon, och det funkade iaf. YMMV)

19.02.2025 15:32 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
kindle-dl.js GitHub Gist: instantly share code, notes, and snippets.

Jag brΓ₯kade ihop ett litet proof of concept hΓ€r: gist.github.com/peterhellber...

Vilket Γ€r en funktion man kan kΓΆra i sin Web Developer console pΓ₯ sidan www.amazon.com/hz/mycd/digi... fΓΆr att ladda ner fΓΆrsta boken i listan.

19.02.2025 15:00 πŸ‘ 0 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

Naturligtvis Γ€r varken "More actions" eller "Download & transfer via USB" faktiskt lΓ€nkar i HTML:en.. nΓ€stan som om de inte vill att man ska automatisera :)

19.02.2025 13:56 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Jag antar att @bildarkivet.org syftar pΓ₯ "Starting February 26, 2025, the β€œDownload & Transfer via USB” option will no longer be available. You can still send Kindle books to your Wi-Fi enabled devices by selecting the β€œDeliver or Remove from Device” option."

19.02.2025 13:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

Note that in the screenshot, orange is used for the "me" color, black for the "peer" and yellow for "combined".

19.02.2025 13:45 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Two instances of firefly-emulator running my peter.input-test rom, in sync.

Two instances of firefly-emulator running my peter.input-test rom, in sync.

It is a bit fiddly, but it is possible to run two instances of the @fireflyzero.bsky.social emulator, and have their respective inputs synced.

19.02.2025 13:40 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Det ska vi nog kunna ordna ska du se.

19.02.2025 11:08 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

It seems like the current @fireflyzero.bsky.social emulator is consuming >100% CPU doing nothing really, which is a bit unfortunate.

Let's hope it can be tweaked somewhat to work better on low end hardware.

(like my P1000 GPU)

18.02.2025 11:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
ff.Arc showing eight 45 degree slices colored from the default Sweetie 16 palette.

ff.Arc showing eight 45 degree slices colored from the default Sweetie 16 palette.

ff.Arc showing eight 45 degree slices colored from the default Sweetie 16 palette.

ff.Arc showing eight 45 degree slices colored from the default Sweetie 16 palette.

I've pushed fixes to the `ff.Angle` type, wrote some test cases for it, and also a small example where I'm using `ff.drawArc` to draw some rotating colors.

Source code available from play.c7.se/ff/rot/

17.02.2025 23:29 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Really nice how convenient @github.com makes it to have static content published on Pages (`.github/workflows/static.yml` was generated for me).

I am now publishing generated @ziglang.bsky.social documentation for `ff` on peterhellberg.github.io/ff/ when I push changes to the module. ⚑

17.02.2025 16:57 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Random circles using the https://lospec.com/palette-list/lost-century palette

Random circles using the https://lospec.com/palette-list/lost-century palette

Random circles using the https://lospec.com/palette-list/lost-century palette

Random circles using the https://lospec.com/palette-list/lost-century palette

Random circles using the https://lospec.com/palette-list/lost-century palette

Random circles using the https://lospec.com/palette-list/lost-century palette

Fixed the getRandom() issue in `ff`, and naturally had to test it out by writing something using that function.

Source code available from play.c7.se/ff/rng/

17.02.2025 12:14 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Other

Other

Other

Other

Symbols

Symbols

Nature

Nature

Ported another WASM-4 thing to @fireflyzero.bsky.social

For this one I got to do silly things like;

if (self.color == .white) {
for (&bytes) |*byte| {
byte.* = ~byte.*;
}
}

img[0x6..0xE].* = bytes;

Source code available from play.c7.se/ff/fp8x8/

16.02.2025 21:57 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Source code available from play.c7.se/ff/fire/

16.02.2025 17:33 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Just ported a small WASM-4 demo I made a while back to
@fireflyzero.bsky.social using @ziglang.bsky.social, fun stuff πŸ”₯

Updated my `ff` module with conveniences such as:

const pal: ff.Palette = .{
.black = 0x000000,
.gray = 0x292929,
.white = 0xffffff,
.orange = 0xf7a41d,
};

16.02.2025 17:28 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
GitHub - peterhellberg/ff-init: Initialize a Zig ⚑ Firefly Zero app project Initialize a Zig ⚑ Firefly Zero app project. Contribute to peterhellberg/ff-init development by creating an account on GitHub.

I have now published github.com/peterhellber... (and github.com/peterhellber...) which makes it trivial for me to get started working on @fireflyzero.bsky.social apps, maybe someone else finds a use for it as well ✨

15.02.2025 01:31 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Firefly Zero App displaying the Zig logo

Firefly Zero App displaying the Zig logo

Today v0.5.1 of the @fireflyzero.bsky.social emulator was released, which means I could finally use it :) (due to me being on Pop!_OS 22.04)

What better then to start working on some @ziglang.bsky.social code to make it convenient for me to start hacking on some apps.

15.02.2025 00:04 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Got the @fireflyzero.bsky.social Input test ROM to work (pad input via WASD and buttons HJKL + Enter)

06.02.2025 09:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Started working on a rudimentary @fireflyzero.bsky.social emulator in Go using Wazero, Ebiten and my Gfx-library.

- wazero.io
- ebitengine.org
- github.com/peterhellber...

05.02.2025 20:15 πŸ‘ 6 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0

Haha, yeah I realized after publishing the Gist.. which I've updated now to not mislead others :)

05.02.2025 14:57 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I should likely have used `zstd.ZipDecompressor` instead :)

05.02.2025 14:47 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
A quick and dirty decompressor for Firefly Zero carts (Which are Zip files compressed using ZSTD) A quick and dirty decompressor for Firefly Zero carts (Which are Zip files compressed using ZSTD) - unzipzstd.go

The @fireflyzero.bsky.social ROM file format is a Zip archive compressed with Zstandard.

For fun I wrote a small CLI in Go to extract these using the lovely compress module by @klauspost.bsky.social

(Note that you could just as well use `firefly_cli import <file>`)

gist.github.com/peterhellber...

05.02.2025 14:44 πŸ‘ 3 πŸ” 1 πŸ’¬ 3 πŸ“Œ 0

This week I've looked at a few vector databases, and found Qdrant to be quite pleasant to get started with.

(Qdrant in combination with Ollama and the LangChainGo library for some small experiments)

- qdrant.tech/documentatio...
- ollama.com
- github.com/tmc/langchai...

#golang

24.01.2025 12:36 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Wrote some code to generate a list of the 24 most downloaded 4 color palettes on Lospec.

Then started hacking on a little #wasm4 cart in #Zig

You can follow along over at:

play.c7.se/w4-advent/

(Change day with ↕️)

04.12.2024 21:01 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - peterhellberg/typ: A small Zig ⚑ module, as a convenience for me when writing WebAssembly plugins for Typst A small Zig ⚑ module, as a convenience for me when writing WebAssembly plugins for Typst - peterhellberg/typ

A neat thing with Typst is that its compiler has a WebAssembly host (in which you can load plugins for use in your .typ files)

I wrote a library to make building such plugins in Zig ⚑️pretty convenient:

github.com/peterhellber...

18.11.2024 15:08 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Vad fasiken!?

18.10.2023 18:35 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Hey! Now with a valid handle, hopefully.

18.10.2023 14:46 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

@brtkdotse.bsky.social Testar om jag kan posta trots att bsky tycker att mitt handle Γ€r invalid.

18.10.2023 13:19 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0