mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.9K
active users

#zig

18 posts14 participants6 posts today

#StreamReport

Last night on stream, we hit four major milestones in my my 6502 #emulator:

1. We got the clock code working, so instructions actuary get executed

2. We got our first instruction actually executed. ldx!

3. We.... Ran our first program! A simple thing with a very limited number of instructions, but it was a program and it executed to completion!

4. Implemented all of the remaining instructions!

That's a lot of stuff done on one stream, eh?

Thursday we'll see about wiring things up to a gui; the little TUI I have is great, but it'd be nice to be able to interact with the emulator more, push and poke, things like that, and I think the best way to accomplish that is going to be an immediate mode gui. Probably imgui for now, with the understanding that we'll need something else when we start implementing actual graphics hardware for the emulator.

#zig remains the greatest language of all time. Zero barriers between me and getting things done.

Here's a link to the main commit from last night: codeberg.org/b4ux1t3/zigsty-fi

Summary card of repository b4ux1t3/zigsty-five-oh-two
Codeberg.orgGot all of the instructions in and we'ev finished making the runner program. · bcb265de6azigsty-five-oh-two - A 6502 Emulator written in Zig.

WOO!!!! First instruction executed, and then just a few short minutes later (okay, it was an hour), we got our first program executed!

Gaze in awe.

This is the program:

``` 6502 assembly
ldx #$0a
stx $0000
ldx #$03
stx $0001
ldy #$00
lda #$00
clc
adc $0001
dey
bne #$fa ; -5
sta $0002
nop
nop
nop
```

Ten points to the first person who tells me what it does.

Going from #zig to #scheme via the C ABI feels kinda dirty at times:

For every feature Iwant to expose from Zig to Scheme, I need a function in Zig which pretends to be C while wrapping an idiomatic Zig function. Then I tell Scheme about that function, so it can magically make that Zig function pretending to be a C function pretend to be a Scheme function.

Both Zig and Scheme support a function optionally returning an error rather than a value. C does not. So you have to take a pointer detour.

Edit2: it looks like we're going to have to call tonight off. We'll get back to the emulator on Tuesday! Have a good weekend!

Tonight, at roughly 8:30 PM Eastern, I'll be going live to continue working on my 6502 #emulator in #Zig!

We're pretty close to actually executing some assembly!

twitch.tv/b4ux1t3

#LiveCoding #Programming #IndieDev #OpenSource #DevelopInTheOpen

Edit: pushing things out to 9, see you all then.

Twitchb4ux1t3 - TwitchA software developer and gamer of pretty freaking average proportions!

hesitating between writing the klutshnik.info server in c or in #zig. i'd prefer zig as it seems to shut up people about memory safety, but then the core would still be liboprf which is written in c already. and it would make deployment more difficult, since #zig is not packaged in debian and other major distros. so i guess using zig would only be 4 cosmetic/populist reasons, and at the same time it would limit deployment. what should i do (no rust/go are not options)

klutshnik.infoProject Klutshnikctrlc.hu

Hey I'm still looking for work.
I've applied to a lot of places in my area and I'm getting nothing.

I'm a programmer at heart, but I've also been looking for regular entry-level jobs because there haven't been any coding positions open at my level as far as I could tell.

If you can offer me a job, it might save my butt. And if you can't offer me a job, could you at least share this post?

I live 30 minutes away from Bellevue if that helps.