This file contains hidden or 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
""" | |
scheme_list.py -- by andydude | |
This is an implementation of (scheme list) == (srfi 1) in Python. | |
""" | |
import itertools | |
from typing import Callable | |
from scheme_base import ( | |
car, |
This file contains hidden or 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
""" | |
scheme_base.py -- by andydude | |
This is an implementation of (scheme base) in Python. | |
""" | |
class char_t(str): | |
def __init__(self, o): | |
if isinstance(o, int): | |
self.__init__(chr(o)) |
This file contains hidden or 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
# -*- mode: python; -*- | |
from dataclasses import dataclass | |
from enum import IntEnum | |
from functools import reduce | |
class Var(IntEnum): | |
SOF = -2 | |
EOF = -1 | |
WS = 0 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import hy | |
import io | |
TAB = " " | |
class Writer: | |
indent: int = -1 | |
def __init__(self): |
This file contains hidden or 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
(import (scheme base) | |
(scheme char) | |
(scheme file) | |
(scheme read) | |
(scheme write)) | |
(define hold | |
(make-parameter 0)) | |
(define toggle |
This file contains hidden or 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
from dataclasses import dataclass | |
from typing import List, Tuple | |
from enum import IntEnum | |
@dataclass | |
class ScannerDFA: | |
class Variable(IntEnum): | |
EOF = -1 |
This file contains hidden or 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
[bits 16] | |
[org 0x7C00] | |
start: | |
cli | |
xor si,si | |
mov ss,si | |
mov sp,0x7DBE | |
popa | |
mov es,si |
This file contains hidden or 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
bool btr(int *a, int b) { | |
int c = (*a >> b) & 1; | |
*a &= ~(1 << b); | |
return c; | |
} |
This file contains hidden or 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
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
void | |
strvec_slurp (char **envstrvec, size_t size, size_t nitems, | |
const char *filename) | |
{ | |
FILE *fp = fopen (filename, "r"); |
This file contains hidden or 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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<unistd.h> | |
typedef unsigned char*_; | |
_ s,i,z,e,O,F= | |
#include W | |
"; ; } { { { { { } { { } ; } { ; ; { } ; { { } ; } ; { { { { } { { } \ | |
; } { { { { { } { ; } { } { { } { { } { { { ; ; { { } { { } { ; } { \ | |
} { { { { { } ; } { } { { } { { { \ |
NewerOlder