— Clone repository with submodules automatically:
git clone --recursive [email protected]:name/repo.git
— Initialize submodules after regular cloning:
#include <variant> | |
#include <string> | |
#include <iostream> | |
#include <array> | |
struct A { | |
int a = 5; | |
char b[100]; | |
}; |
MEMPTR, esoteric register of the ZiLOG Z80 CPU. | |
by Boo-boo (first and draft English translation by Vladimir Kladov) | |
As it is known, after the instruction BIT n,(HL) execution, bits 3 and 5 of the flag register become containing values that is not documented in the official documentation at all. Actually these bits are copied from the bits 11 and 13 of the internal register pair of Z80 CPU, which is used for 16-bit operations, and in most cases to handle addresses. This is usual practice for processors having 8-bits data bus working with 16-bits data. | |
It is not known why and how these bits of the internal buffer register are copied to the flags register though. At least Sean Young in the "Undocumented Z80 Documented" refers to that phenomenon (http://www.myquest.nl/z80undocumented/) and a bit more info can be found in the Z80 description of another "nocash" project (http://www.work.de/nocash/zxdocs.htm) where such register pair is called as MEMPTR. Unfortunately until now attemts to crack the algorithm se |
Dust. Facing Worlds. E2M1. Blood Gulch. You know these places |
— Clone repository with submodules automatically:
git clone --recursive [email protected]:name/repo.git
— Initialize submodules after regular cloning:
Some possible implementations of the Bresenham Algorithms in C. | |
The Bresenham line algorithm is an algorithm which determines which points in an | |
n-dimensional raster should be plotted in order to form a close approximation | |
to a straight line between two given points. | |
It is commonly used to draw lines on a computer screen, as it uses only integer | |
addition, subtraction and bit shifting, all of which are very cheap operations | |
in standard computer architectures. | |
It is one of the earliest algorithms developed in the field of computer graphics. | |
A minor extension to the original algorithm also deals with drawing circles. |
; =========================================================== | |
; An Assembly Listing of the Operating System of the ZX81 ROM | |
; =========================================================== | |
; ------------------------- | |
; Last updated: 13-DEC-2004 | |
; ------------------------- | |
; | |
; Work in progress. | |
; This file will cross-assemble an original version of the "Improved" | |
; ZX81 ROM. The file can be modified to change the behaviour of the ROM |
KERNEL="ttyUSB[0-9]*", TAG+="udev-acl", TAG+="uaccess", OWNER="lmw" | |
KERNEL="ttyACM[0-9]*", TAG+="udev-acl", TAG+="uaccess", OWNER="lmw" |
/ startBrowser tries to open the URL in a browser | |
// and reports whether it succeeds. | |
func startBrowser(url string) bool { | |
// try to start the browser | |
var args []string | |
switch runtime.GOOS { | |
case "darwin": | |
args = []string{"open"} | |
case "windows": | |
args = []string{"cmd", "/c", "start"} |
#Rob Pike's 5 Rules of Programming
##Rule 1. You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is.
##Rule 2. Measure. Don't tune for speed until you've measured, and even then don't unless one part of the code overwhelms the rest.
##Rule 3. Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy. (Even if n does get big, use Rule 2 first.)