Skip to content

Instantly share code, notes, and snippets.

#include <inttypes.h>
#include <stdio.h>
#include <assert.h>
int main() {
uint8_t F[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
for (uint8_t i = 0; i < 0xFF; ++i) {
for (uint8_t q = 0; q < 8; ++q) {
if ((i & F[q]) > 1) {
int plus1(int x) {
return x+1;
}
int main() {
return plus1(1);
}
00000000004004b6 <plus1>:
4004b6: 55 push %rbp
@b4284
b4284 / test.c
Created October 17, 2015 15:28
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string.h>
/* 00000000004004b6 <pass1>: */
/* 4004b6: 55 push %rbp */
/* 4004b7: 48 89 e5 mov %rsp,%rbp */
@b4284
b4284 / k.c
Created November 11, 2015 12:48
#include <stdio.h>
int compress2 (dest)
int *dest;
{
return 0;
}
int main() {
int k;
@b4284
b4284 / main.c
Created November 16, 2015 12:21
#include <stdio.h>
#include <stdlib.h>
static inline int calc(int q, int f) {
return (q * 244 + 1) / f;
}
int main(int c, char *v[]) {
int q = 0;
int f = atoi(v[1]);
;; guile -e adele-cd adele.scm <NUM>
(define (q4 n d)
(if (zero? d)
'(())
(let A ((res '()) (i d))
(if (zero? i)
res
(A (append res
(map (lambda (x) (cons i x))
#include <stdio.h>
#include <stdlib.h>
// tos_curr is piled with shit
// tos_other is always empty (what a waste)
int *tos_curr, n_curr, *tos_other, n_other;
void stack_push(int **tos, int *n, int k) {
**tos = k;
*tos += 1;
(use-modules (ice-9 match))
(define f
(let A ((stack '()))
(lambda (. y)
(match y
(('put i)
(A (cons i stack)))
(('get)
(let ((s2 (if (> (length stack) 0)
(use-modules (ice-9 match))
(define f
(let A ((stack '()))
(lambda (. y)
(match y
(('put i)
(A (cons i stack)))
(('get)
(let ((s2 (if (> (length stack) 0)
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
Cave Johnson其實並不是患上精神病,而是吸入了月球粉塵
也就是所有傳送門開在的材質上(包括那個白色的水)
所以也就是為甚麼二代可以將傳送門射在月球上
據說Johnson晚期在做研究的時候吸入越來越多粉塵導致他的病情急遽惡化
而轉由Caroline,也就是Chell(與Johnson的私生女)的母親繼續支撐公司
Chell是Johnson 跟 Caroline(GLaDos)