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
#include "polygon.h" | |
class Point { | |
public: | |
double x; | |
double y; | |
Point(void) : x(0.0), y(0.0) {} | |
Point(double x, double y) : x(x), y(y) {} | |
}; |
import sys | |
class ProgressBar: | |
def __init__(self, title: str, width: int): | |
self.title = title | |
self.width = width | |
self.amount = 0 | |
self.update(0) | |
def update(self, amount: int) -> None: |
#!/usr/bin/env python3 | |
import argparse | |
import array | |
import itertools | |
import struct | |
import sys | |
from typing import Iterator, List | |
__title__ = "kindasnappy" |
- 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
; | |
; 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 |
/* | |
* 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?
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):