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"
)
@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')
= rbot =
VM goes down on Feb 7. Before that, everything should be moved to github.
== ToDo ==
* [x] organization is created on github (done: ruby-rbot)
* [ ] apoc's fork becomes the mainline
* [ ] a repo under 'ruby-rbot' is created from apoc's fork
* [ ] the old mainline becomes a branch in new repo

Keybase proof

I hereby claim:

  • I am jsn on github.
  • I am jsn (https://keybase.io/jsn) on keybase.
  • I have a public key whose fingerprint is 084C 180A B1BD 9CF1 8259 A9C7 CE99 A44D D4D6 9326

To claim this, I am signing this object: