- simple integer arithmetic (add/sub/shift)
- complex integer arithmetic (mul/div/mod)
- float arithmetic (add/mul/div)
- file open/write/close
- memory location visited (contiguous, pointer chasing)
- pixels drawn
One is young or old depending on how one confronts change.
The old feels frustration. The young accepts change and takes profit of it.
Young is one who find home in the foreign. Those who grasp their old sweet routine for comfort, those who can’t accept disorientation are from another era.
Elements Of Programming (A.Stepanov, P.McJones) implemented in Rust | |
Generic programming Rust using traits and generic functions |
H:\temp>python | |
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> a = 'hello' | |
>>> print a | |
hello | |
>>> words = [a for a in ['one', 'two', 'three']] | |
>>> print words | |
['one', 'two', 'three'] | |
>>> print a |
From 2c2a5e747a601ec655e5a94d935cca09599580d1 Mon Sep 17 00:00:00 2001 | |
From: nil <[email protected]> | |
Date: Mon, 9 May 2016 12:51:23 +0200 | |
Subject: [PATCH 01/19] Import fastbuild generator | |
--- | |
pylib/gyp/generator/fastbuild.py | 1095 ++++++++++++++++++++++++++++++++++++++ | |
1 file changed, 1095 insertions(+) | |
create mode 100644 pylib/gyp/generator/fastbuild.py |
Interfaces naturally emerge as software gets broken down into parts communicating with one another. The larger and more deliberate structures emerge from a deliberate attempt to organize the development process itself. [fn:Liskov2008] Structure often emerge directly from division of labor: as teams take on independent tasks, interfaces are established betweeen domains they become responsible for. (Conway’s Law)
Software developers are responsible for systems built out of very small atoms while ultimately performing tasks for their users of a much greater magnitude. Dijkstra showed this by computing the ratio between grains of time at the lowest and largest atoms of the system (from say, CPU instructions to a human interaction with the system) The span was already quite large by Dijkstra’s time, of about 10^9. Today this ratio would be at least above 10^12 (see grain ratios)
This large span has to be manage
#define BUILD(__os,...) | |
#define DOC(...) | |
#define TAG(...) | |
BUILD(osx,"clang++ -std=c++11 cocoa.mm -o cocoa -framework AppKit") | |
#import "AppKit/AppKit.h" | |
int main(int argc, char **argv) | |
{ | |
[NSApplication sharedApplication]; | |
[NSApp setActivationPolicy: NSApplicationActivationPolicyRegular]; | |
auto const app_name = [[NSProcessInfo processInfo] processName]; |
/* | |
OSX: "clang++ -DOS_OSX -g -std=c++11 -nostdinc++ -nostdlib -framework System | |
-Wall -Wextra skeleton.cpp -o skeleton" | |
*/ | |
// Meta | |
#define DOC(...) // to document a symbol | |
#define URL(...) // reference to a resource | |
// Compiler | |
#define CLANG_ATTRIBUTE(x) __attribute__((x)) | |
#define debugger_break() DOC("invoke debugger") asm("int3") |
https://youtu.be/mfjjSj9coA0?t=2582 43:00
So I write the first draft long hand, The second draft I rewrite long-hand on a clipboard, then I type it once, then I retype it then it sits for at least a week or two and I redo it, I type it again. And not “computer” re-typing, but starting all the way at the beginning as a hard copy. Why you ask? Good question.