This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Begin { | |
(STDIO.print_line >[<"1234" ** <"2000001"]) | |
} | |
Where | |
Open Package "z" | |
{ | |
:Infix < |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let format | |
Let parse | |
Define (copy s h i term) If [h = i] term 'copy.{(clip s h i) term} | |
Define (subst c term) 'subst.{c term} | |
Let finish 'finish | |
In | |
Func s | |
Let m (length s) | |
In | |
Unfold {h i} From {0 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Define (convert term) | |
Let gensym | |
Let r (CHUNK.new_rw 1) In | |
Func {} | |
Begin { | |
Let i (CHUNK.fetch_byte r 0) | |
(CHUNK.store_byte r 0 [i + 1]) | |
'gen_var.i | |
} | |
In |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just modify the existing Makefile so the "PROGRAMS = 84" line has "reddit" added to the end as follows: | |
### Configuration variables | |
PROGRAMS = 84 reddit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Unused primitive identifiers | |
; | |
; 00 02 04 07 08 | |
; 12 16 17 | |
; 20 21 23 25 28 29 | |
; 34 36 37 | |
; 44 46 49 | |
; 54 56 57 58 59 | |
; 60 64 65 69 | |
; 70 71 73 76 77 79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Unused primitive identifiers | |
; | |
; 00 02 04 07 08 | |
; 12 16 17 | |
; 20 21 23 25 28 29 | |
; 34 36 37 | |
; 44 46 49 | |
; 54 56 57 58 59 | |
; 60 64 65 69 | |
; 70 71 73 76 77 79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern P | |
global heap_bytes | |
global heap_limit | |
global heap_top | |
global _start | |
global memcpy | |
global memset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern P | |
global _start | |
global memcpy | |
global memset | |
global strlen | |
global syscall0 | |
global syscall1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Begin { | |
When [OS.argc != 2] { | |
(die "usage: binex n") | |
} | |
Begin Match (Z.read (OS.argv 1)) { | |
| 'nothing | |
(die "usage: binex n") | |
| 'just.n | |
[n -> binex1 -> STDIO.print_line] | |
[n -> binex2 -> STDIO.print_line] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Drawing antialiased lines without using floating point numbers | |
// | |
// Compile: | |
// | |
// $ clang -std=c11 -o line line.c | |
// | |
#include <stdio.h> | |
#include <stdlib.h> |
NewerOlder