Skip to content

Instantly share code, notes, and snippets.

Robey Pointer robey

Block or report user

Report or block robey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
robey /
Created May 17, 2019
install a qemu virtual machine on linux

install qemu on host machine & launch it

sudo apt install qemu-system-x86
sudo apt install libsdl2-dev

qemu-img create -f qcow2 test.qcow2 16G

qemu-system-x86_64 -enable-kvm -m 2048 -boot d
    -nic user,model=virtio

notes on using the linux laptop

  • not since 2000, some dell "latitude"?
  • looked at thinkpad x1
    • terrible reviews
    • ugly eraser is still there
    • for a "linux laptop", didn't seem to care much about linux
    • as a hardware mfctr, you can't ask me to go download an install cd and dig up custom drivers off random websites for you. that's your responsibility.
  • 2 things i wanted PC laptops to have fixed since 2000:
    • sleep works (you can close the lid) without hard-crashing or requiring a power-off
robey / apple1-rom.txt
Last active Jul 18, 2019
apple 1 ROM disassembly
View apple1-rom.txt
; the "monitor ROM" of an apple 1 fit in one page (256 bytes).
; this is my attempt to take the disassembled code, give names to the
; variables and routines, and try to document how it worked.
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a
; peripheral chip that drove the keyboard and video. the video was run by a
; side processor that could treat the display as an append-only terminal that
robey / zbase64.ts
Created Oct 5, 2017
encode an array of ints (that tend to be close to zero) into a packed base64-ish string
View zbase64.ts
* zbase64 converts an array of integers to a string, and back.
* it assumes:
* - no integer will be bigger than about 2**24
* - most will be close to zero, small positive or negative numbers
* - the strings may be copy/pasted, or have poor (or zero) unicode support
* strategy:
* - zig-zag encode to turn small negative numbers into small positive
* numbers

My thoughts after watching the entire 12 minutes of "Child's Play" by Drake.

His (ex) girlfriend looks immaculate. He doesn't deserve her. He comes across as an asshole in his own video -- why did he write this? Does he think we'll think he's cool if he's cheating on his anniversary? He left his phone unlocked on the table while he left? Does that mean he was playing with his phone during their anniversary dinner?

(Rus thinks the fact that she's much too good for him is the point, and that he's bragging about how terrible he is.)

Who the fuck takes their girl to Cheesecake Factory for their anniversary?

Is he making fun of people who are so poor that they go to Cheesecake Factory? Just because he's a millionaire?

robey /
Last active May 27, 2017
snip of how i use webpack


module.exports = {
  entry: [ "./src/jumbotron.ts" ],
  output: {
    path: __dirname + "/site/lib",
    filename: "jumbotron.js",
    library: "jumbotron"
robey / make your own
Last active Apr 16, 2017
make your own twitter
View make your own

If you want to make a federated Twitter-side service, I think you should spend more than a couple of minutes on the design.

I scanned the "Pub Sub Hub Bub" spec, and as far as I can tell, it requires a publisher to store a key for each subscriber. When they post a new tweet, their home server needs to do a separate HTTP POST to each subscriber, HMAC-signed by the subscriber's key. The content (a few sentences at most) needs to be composed into an atom feed -- in XML! -- as if it were a blog post.

Imagine that mastodon grew to over a dozen servers, and BBC News joined, and only a few thousand users subscribed. Every time they post new cricket scores, a few thousand individual HTTP POSTs (signed separately) go out to the same dozen servers.

The HTTP POST has no fallback, so if it fails, I guess you just don't get the tweet?

Here's an alternative design, which I also only spent a couple of minutes on (though I admit I have the advantage of having built one of these before):

View long

i can't get more than halfway through this article. i just... can't.

the author means well, but he gets most of the history jumbled so that it doesn't make any sense. (which is understandable, since he didn't join until 2013, years after all of that history happened)

i think he's trying to tell a story about how a bunch of disorganized engineering could have gone better if it had a team of support engineers, but the real story is hidden in plain sight. he mentions it over and over again. an entire new team is bought but never integrated with the existing team. "directors" make engineering decisions by fiat, and quit (or are resigned)

robey /
Last active Apr 10, 2017
Changing the shape of rust Future & Stream

Changing the shape of rust Future & Stream

On the tokio chat, @carllerche suggested that one way to simplify the "errors on streams" problem ( would be to remove the error alternative from Future & Stream. This idea stuck with me, and I want to sketch out a possible alternative, to see how it would look.


  • Future<Item, Error>: A future resolves to either an item or an error type, exactly like an async version of Result.
    • poll() -> Poll<Item, Error>: not ready, or an item, or an error
  • Stream<Item, Error>: A stream emits elements that are each either an item or error, exactly like an async iterable of Result.
    • poll() -> Poll<Option<Item>, Error>: not ready, or the end of the stream (Ready(None)), or an item, or an error
use futures::{Async, Future, IntoFuture, Poll, Stream};
enum State<St, Fut> {
/// No active future is running. Ready to call the function an process the next future.
/// Currently polling this future.
/// Stream ended!
You can’t perform that action at this time.