Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#ifndef NBITS
#define NBITS 42
#endif
static unsigned long long states[NBITS + 1][7][2 * NBITS] ;
/* step s r */
static inline int next_s(int s, int b) {
@jsn
jsn / ashton.c
Created February 25, 2017 15:13
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#define MAX_STRING 100001
static char s[MAX_STRING] ;
static unsigned sl ;
/* # to compile:
* $ gcc -march=native -O3 -Wall -o normalize normalize.c
* # to run tests and benchmark:
* $ time ./normalize chunky # tests/benchmarks chunky implementation
* $ time ./normalize naive # tests/benchmarks naive implementation
* $ time ./normalize strdup # benchmarks strdup for comparison
*/
#include <stdio.h>
#include <string.h>
(function () {
var mobileElem = document.getElementById('mobile-link'),
mobileUrl;
if (mobileElem !== undefined && mobileElem !== null) {
mobileUrl = mobileElem.getAttribute('href');
}
if (getCookie('noRedirect') !== 'enabled' && mobileUrl !== undefined) {
def make_ws url, method
ws = WebSocket::Client::Simple.connect url
u1 = "ws(#{url.split(WS_BASE).last})"
now = 0
prg = 0
sf = self
ws.on :open do
sf.debug "*** #{u1} connected"
now = 0
package main
import (
"fmt"
"os"
"flag"
"log"
"bufio"
)
package main
import (
"fmt"
"flag"
"log"
"os"
"encoding/binary"
"bufio"
)
*.o
main
tags
@jsn
jsn / PKGBUILD
Created January 26, 2015 16:32
tekui-1.11-1
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
# Maintainer: perlawk
pkgname=tekui
pkgver=1.11
pkgrel=1
pkgdesc="A small, freestanding and portable GUI toolkit written in Lua and C."
arch=('i686' 'x86_64')
url="http://tekui.teklib.org"
license=('GPL')