Email or username:

Password:

Forgot your password?
6 posts total
Matt Keeter

wishing a very happy

"is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?"

day to everyone who celebrates

screenshot of Github showing an issue on reactjs/react.dev titled

is it safe to use _ SECRET_INTERNALS_DO_NOT_USE _OR_YOU_WILL_BE_FIRED ?
Show previous comments
DELETED

@mjk
It's CLOSED...
(Did Eliav2, get fired?)

waffles

@mjk ah yes. This code base belongs to my employer and we have a meeting room named the same, and it’s always free because ppl are afraid to book it

xanathar

@mjk Tbh I'm tempted to learn js AND React just to use that property.

Matt Keeter

biblically accurate ethernet packet

Graphviz drawing of an ethernet packet, containing

Ethernet (at the top)
At least two layers of VLANs
Four layers of MPLS
IPv6 and IPv4
Various other things

and finally Ethernet again at the bottom
Show previous comments
embix

@mjk It misses the old gods IPX and SPX.

Fritz Adalis

@mjk @da_667
netsh interface ipv4 set subinterface "Local Area Connection" mtu=3

Stephen Hoffman

@mjk For those unfamiliar, there are myriad networking protocols that operate over Ethernet that are not IP.

That includes DECnet of course, and MOP traffic including periodic MOP SYSIDs, and DEC thoughtfully reserved Ethernet type 0x6006 for their customers, so who knows what that type contains.

Random Ethernet type thought: does VSI or HPE “own” 0x6006 now?

Matt Keeter

Over the past few months, I went down the rabbit hole (hah) of @neauoire 's Uxn + Varvara computer, and have re-emerged with an emulator!

It's especially fast, written in safe Rust, and runs both natively and in the browser:
mattkeeter.com/projects/raven/

Here's the full writeup:
mattkeeter.com/projects/raven

Screenshot of the Potato desktop environment, with a dithered raven wallpaper
Screenshot of a browser window, with hundreds of bouncing pink bunnies
Show previous comments
Bad Diode

@mjk congrats! I enjoyed the writeup, and was already familiar with your blog. In particular I’m looking forward to try the reverse linear register allocator. Thanks for sharing!

⛧ esoterik ⛧

@mjk wow! this is very impressive! ✨✨✨

Devine Lu Linvega

@mjk Wow, that's amazing. I've been away from the internet for a few days, I'm so glad to see this, once I have a bit more bandwidth I'd love to try and build it, I've only tested the js frontend and it runs everything well.

I think the only port missing is the expansion port? Trying to run the most complicated rom(oquonie), I get this:

panicked at raven-uxn/src/lib.rs:495:26:
range end index 458496 out of range for slice of length 65280

Matt Keeter

Y'all want to see a cool shader?

shadertoy.com/view/dls3Wr

This is mashing up two ideas:

- @iquilezles@twitter.com's closed-form "signed distance to a quadratic Bézier curve" solver
- using winding number to determine inside/outside-ness

Putting these two ideas together, we can render a Bézier font from its raw control points, as a single (huge) closed-form math expression!

Signed distance field of the letter S in a serif font, with a red outline showing the original quadratic Bézier control points.
Matt Keeter

@raph successfully nerd-sniped me into writing a translator from Sudoku grids → Z3 programs.

Doing it in Scheme was a fun exercise: quasiquoting makes it easy to generate SMT-LIB syntax inline, and the whole program is only 27 lines!

Here's the code: github.com/mkeeter/sudoku-z3

#scheme

Screenshot of a Scheme program:

(define (run f rows cols) ; Maps a function across two lists
  (let recurse ((rs rows) (cs cols))
    (cond ((null? rs) '())
          ((null? cs) (recurse (cdr rs) cols))
          (else (cons (f (car rs) (car cs)) (recurse rs (cdr cs)))))))

(define (sym row col) (string->symbol (format #f "v~A~A" row col)))
(define (assert-char row col) ; Read the board from stdin and declare consts
  (define i (- (char->integer (read-char)) (char->integer #\0)))
  (define s (sym row col))
  (display `(declare-const ,s Int))
  (display `(assert (and (>= ,s 1) (<= ,s 9))))
  (when (and (>= i 1) (<= i 9)) (display `(assert (= ,s ,i)))))
(run assert-char (iota 9 1) (iota 10 1)) ; (include a '\n' in column count)

(define (assert-block a b) (display `(assert (distinct ,@(run sym a b)))))
(define (assert-row row) (assert-block `(,row) (iota 9 1)))
(define (assert-col col) (assert-block (iota 9 1) `(,col)))
(define (assert-3x3 row col) (assert-block (iota 3 row) (iota 3 col)))
(map (lambda (i) (assert-row i) (assert-col i)) (iota 9 1))
(run assert-3x3 '(1 4 7) '(1 4 7))

(display `(check-sat)) ; Solve, then print the resulting board
(define (digit row col) `(* ,(expt 10 (- 9 col)) ,(sym row col)))
(define (print-row row)
  (display `(eval (+ ,@(map (lambda (col) (digit row col)) (iota 9 1))))))
(map print-row (iota 9 1))
Screenshot of a terminal window, reading

➜  sudoku git:(main) cat example.txt
--3-2-6--
9--3-5--1
--18-64--
--81-29--
7-------8
--67-82--
--26-95--
8--2-3--9
--5-1-3--
➜  sudoku git:(main) guile sudoku.scm < example.txt > out.sat && z3 out.sat
sat
483921657
967345821
251876493
548132976
729564138
136798245
372689514
814253769
695417382
Matt Keeter

#introduction 👋

My name is Matt, and I'm a hardware & software engineer in Cambridge, MA.

I've done everything from PCB design to computer graphics research, and currently work at @oxidecomputer

Niche interests include rendering & meshing implicit surfaces, writing embedded software in Rust, personal-scale manufacturing, weird linear algebra tricks, and more!

Picture of a white PCB with illustrations in black silkscreen and selectively revealed copper.  The PCB includes three moons of varying brightness, a tree with golden leaves, and constellations.
Picture of a circuitboard with an active probe soldered into it.
Picture of an orange box with crude vector graphics projected onto it, showing two spaceships flying around and shooting at each other
Rendering of the Utah Teapot, with RGB values corresponding to normals.
jaxter184

@mjk @oxidecomputer oh! youre the person who made pont! i studied it a bit (and plan to study more later) when i was trying to figure out how to do interactive webdev in rust. thanks so much for making, documenting, and publishing it.

Go Up