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
#!/usr/bin/env stack runhaskell --package array --package bytestring --package containers --package time | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE PartialTypeSignatures #-} | |
import Control.Monad | |
import Data.Array.IArray | |
import Data.Array (Array) | |
import Data.Array.Unboxed (UArray) |
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
from bs4 import BeautifulSoup | |
from requests import Session | |
import sys | |
import zipfile | |
if len(sys.argv) >= 2: | |
code = open(sys.argv[1]).read() | |
else: | |
code = sys.stdin.read() |
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
package org.bennydict.brainmethodfuckhandles; | |
import java.io.*; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodType; | |
import java.util.HashMap; | |
import java.util.Scanner; | |
public class BrainFuckMethodHandleCompiler { |
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
RULES := $(file < input) | |
RULES := $(subst Step,,$(RULES)) | |
RULES := $(subst must be finished before step,,$(RULES)) | |
RULES := $(subst can begin.,,$(RULES)) | |
RULES := $(strip $(RULES)) | |
TARGETS := $(sort $(RULES)) | |
set_get = $(strip $(__set_$(1))) |
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
#include <err.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> | |
#include <sys/un.h> | |
#include <unistd.h> |
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
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/sendfile.h> | |
#include <vector> | |
#include <set> | |
#include <limits.h> | |
using namespace std; |
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
#include <unistd.h> | |
#define BUF_MAX (4 * 1024) | |
int read_char(void) { | |
static char buf[BUF_MAX]; | |
static unsigned int size = 0; | |
static unsigned int ptr = 0; | |
if (ptr == size) { | |
size = read(0, buf, BUF_MAX); | |
ptr = 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
#include <cerrno> | |
#include <cstring> // for strerror | |
#include <cctype> // for tolower | |
#include <fstream> | |
#include <iostream> | |
#include <map> | |
#include <queue> | |
#include <set> | |
#include <string> | |
#include <sstream> |
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
#include <arpa/inet.h> | |
#include <sys/ioctl.h> | |
#include <errno.h> | |
#include <netdb.h> | |
#include <poll.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> |
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
This is a Brainfuck interpreter written in vim macros | |
To use it, copy the fourth line to `a' register (4G"ayy), | |
and run the macro (@a). | |
{macro} | |
/^{letterh} | |
$h"cyl/^{program} | |
j0"cx/^{code:c} | |
j"myy@m | |
Your program here: |
NewerOlder