Skip to content

Instantly share code, notes, and snippets.

View apg's full-sized avatar
🐢
Turtle

Andrew Gwozdziewycz apg

🐢
Turtle
View GitHub Profile
@apg
apg / DCPU-16Spec.txt
Created September 1, 2022 17:49 — forked from metaphox/DCPU-16Spec.txt
DCPU-16 Specification
DCPU-16 Specification
Copyright 1985 Mojang
Version 1.7
=== SUMMARY ====================================================================
* 16 bit words
* 0x10000 words of ram
@apg
apg / gist:2216159
Created March 27, 2012 14:04
God Wrote in Lisp
I was taught assembler in my second year of school.
It's kinda like construction work — with a toothpick for a tool.
So when I made my senior year, I threw my code away,
And learned the way to program that I still prefer today.
Now, some folks on the Internet put their faith in C++.
They swear that it's so powerful, it's what God used for us.
And maybe it lets mortals dredge their objects from the C.
But I think that explains why only God can make a tree.
### ====================================================================
### @Awk-file{
### author = "Nelson H. F. Beebe",
### version = "1.06",
### date = "24 October 1997",
### time = "21:34:34 MDT",
### filename = "man2html.awk",
### address = "Center for Scientific Computing
### University of Utah
### Department of Mathematics, 105 JWB
@apg
apg / gist:bc072b9fa00b362c52bbf6e2b69ad502
Created January 2, 2021 00:05
Vegan and Gluten Free Pierogis.
The dough was inspired by a random selection of searching for vegan and gluten free pierogis and getting a feel for what people do, and taking a risk. It largely worked out. They are edible, but I am not much of a cook, so have no idea how to iterate. The dough did not seem like it was going to work, but ended up OK. Boiled for about 3 minutes. Then pan fried with caramelized onions.
Dough:
3 cups Bob’s Red Mill All Purpose, 1:1, Gluten Free Flour
1 teaspoon salt
3/4 cup unsweetened soy milk, couple tablespoons for dough, maybe
1 tablespoon olive oil
1/4 cup water as needed for the dough
@apg
apg / 00 - email.md
Last active December 3, 2020 21:35
to: info@keyboards.pizza subject: Question about the Pizza65

Hi,

I recently came across the Pizza65 and it looks like a great keyboard! I am hopeful that it will solve my problem but, it's unclear from the specifications and need your help.

I eat a lot of pizza at my desk, and am looking for a keyboard that will also serve as a pizza cutter for when the slices are just too big. Can the Pizza65 also be used as a pizza cutter? If not, can I suggest that your next model include pizza cutting functionality?

Thanks,

Andrew

@apg
apg / map.scm
Created October 25, 2019 19:23
;; map, the naive way
(define (naive-map f xs)
(cond
((null? xs) '())
(else (cons (f (car xs)) (map f (cdr xs))))))
(define (tr-map f xs)
(define (recurse f xs accum)
(cond
((null? xs) (reverse accum))
(defface haiku-success-face
'((t :inherit success))
:group 'haiku-mode)
(defface haiku-error-face
'((t :inherit warning))
:group 'haiku-mode)
(defvar haiku-highlight-keywords
@apg
apg / Methods.md
Created December 26, 2017 21:54
Nick P’s post on methods

Techniques for Ensuring Software Correctness: What Worked in Past and Present (Quick revision of 2016 comment on Lobste.rs)

I find it helps to look to prior successes and tradeoffs to try to understand how to best do engineering. People and teams I've identified as independent inventors of software engineering were Bob Barton of Burroughs B5000, Dijkstra w/ THE OS, and Margaret Hamilton in Apollo & 001 Tool Suite. Each had pieces of the problem with some culminating with later work into the TCSEC and Orange Book’s B3/A1 classes of high-assurance security. At IBM, Fagan invented formal, software inspections for lower defects. Harlan Mills invented a method, Cleanroom Software Engineering, that consistently resulted in low defects even on first use. Became my baseline.

In parallel, the safety-critical embedded community continued using all kinds of their own methods or variations on common ones. They often published "lessons learned" reports with useful information. CompSci researchers continued working on

@apg
apg / wc.d
Created June 1, 2018 23:57
Simple wc(1) in D
// $ dmd wc.d
// $ cat /usr/share/dict/words | ./wc
// 235886 235886 2493109
import std.stdio;
void main()
{
int lines = 0;
int words = 0;
@apg
apg / productivity.md
Created April 18, 2018 19:01
Elon Productivity tips

Source of quoted email.

Btw, here are a few productivity recommendations:

  • Excessive meetings are the blight of big companies and almost always get worse over time. Please get of all large meetings, unless you’re certain they are providing value to the whole audience, in which case keep them very short.

  • Also get rid of frequent meetings, unless you are dealing with an extremely urgent matter. Meeting frequency should drop rapidly once the urgent matter is resolved.

  • Walk out of a meeting or drop off a call as soon as it is obvious you aren’t adding value. It is not rude to leave, it is rude to make someone stay and waste their time.