Skip to content

Instantly share code, notes, and snippets.

@vv198x
vv198x / main.go
Last active March 13, 2023 14:02
Brainfuck interpreter
/* Brainfuck is an esoteric programming language created in 1993 by Urban Müller.
Except for its two I/O commands, Brainfuck is a minor variation of the formal programming language P′′
created by Corrado Böhm in 1964, which in turn is explicitly based on the Turing machine.
In fact, using six symbols equivalent to the respective Brainfuck commands +, -, <, >, [, ],
Böhm provided an explicit program for each of the basic functions that together serve to compute any computable function.
*/
package main
import ("fmt", "io/ioutil")
func main() {
@vv198x
vv198x / UNIX.c
Created March 13, 2023 13:26
Here is the famous line 2238
2230 /*
2231 * If the new process paused because it was
2232 * swapped out, set the stack level to the last call 3333 * to savu(u_ssav). This means that the return
2235 * actually returns from the last routine which did
2236 * the savu.
2237 *
2238 * You are not expected to understand this.
2239 */
2240 if(rp->p_flag&SSWAP) {
2241 rp->p_flag =& ~SSWAP;