Skip to content

Instantly share code, notes, and snippets.

View ae5259's full-sized avatar
🦀

ь ae5259

🦀
View GitHub Profile
#Written Sept 30 2009
#This program fscked the mind of Adam Domurad; It is not completely efficient for sure but I was more concerned with making a working interpreter
#You can use as many as 256 nested loops on a 8 bit cell interpreter
#NOTE code will be parsed a lot faster without comment characters
#[first place 0 at start and place code input, working out if its a comment and correcting [ -> 1, ] -> 2, + -> 3, - -> 4, > -> 5, < -> 6, . -> 7, , -> 8]
#[Ascii: + is 43, , is 44, - is 45, . is 46, < is 60, > is 62, [ is 91, ] is 93]
#[Data used is 8 + Data used by subprogram * 2 + non-comment instructions in subprogram.]
#[It is possible but a good deal more complex to not use double the data the subprogram uses, the data pointer would have to be stored]
#[numerically and then shifted through the data area, and then restored.]
->->>>-
@wojpawlik
wojpawlik / api.ts
Last active January 11, 2025 17:28
import type { Client, Opts, Ret } from "./deps.ts";
export type Api = {
[M in keyof Opts]: (
payload: Opts[M],
signal?: AbortSignal,
) => Promise<Ret[M]>;
};
export const createApi = (client: Client) =>
@tcoppex
tcoppex / c_nostd.txt
Last active July 26, 2025 17:10
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.
@nolim1t
nolim1t / socket.c
Created June 10, 2009 03:14
HTTP Request in C using low level write to socket functionality
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>