Skip to content

Instantly share code, notes, and snippets.

View idrislog.txt
Resolving dependencies...
[1 of 1] Compiling Main ( /tmp/haskeline-0.7.1.3-55923/haskeline-0.7.1.3/dist/setup/setup.hs, /tmp/haskeline-0.7.1.3-55923/haskeline-0.7.1.3/dist/setup/Main.o )
Linking /tmp/haskeline-0.7.1.3-55923/haskeline-0.7.1.3/dist/setup/setup ...
Configuring haskeline-0.7.1.3...
Building haskeline-0.7.1.3...
Preprocessing library haskeline-0.7.1.3...
[ 1 of 27] Compiling System.Console.Haskeline.Recover ( System/Console/Haskeline/Recover.hs, dist/build/System/Console/Haskeline/Recover.o )
[ 2 of 27] Compiling System.Console.Haskeline.Directory ( dist/build/System/Console/Haskeline/Directory.hs, dist/build/System/Console/Haskeline/Directory.o )
[ 3 of 27] Compiling System.Console.Haskeline.Key ( System/Console/Haskeline/Key.hs, dist/build/System/Console/Haskeline/Key.o )
[ 4 of 27] Compiling System.Console.Haskeline.History ( System/Console/Haskeline/History.hs, dist/build/System/Console/Haskeline/History.o )
View uast.pas
{$mode delphi}
unit uAST; // abstract syntax tree for simple interpreter
interface uses classes, sysutils, variants;
type
TSyntax = variant;
TExpr = variant;
TBoolExpr = variant;
TStmt = variant;
TIfStmt = variant;
View oberon-isotton.el
;;; oberon.el --- major mode for editing oberon source in Emacs
;; Copyright (C) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc.
;; Copyright (C) 2003 Aaron Isotton. Based on Espen Skoglund's pascal-mode.
;; I wrote this not because I think that Oberon is a good (or even
;; usable) language, but because at ETHZ we're forced to use it. So
;; at least I can use emacs to edit the sources. Oberon is evil and
;; sucks.
View oberon-landstrom.el
;;; oberon.el --- Major mode for editing Oberon/Oberon-2 program texts
;; Copyright (C) 2006 Karl Landström
;; Author: Karl Landström <karl@karllandstrom.se>
;; Maintainer: Karl Landström <karl@karllandstrom.se>
;; Version: 2.0 Beta 1
;; Keywords: oberon oberon-2 languages oop
;; This file is free software; you can redistribute it and/or modify
View output.txt
M j/parity.ijs
M j/thing.ijs
M lua/makenodes.lua
M nial/nialogic.ndf
M pascal/callj.ijs
M pascal/hipy.sh
?? haskell/darkf-wordwrap-a.hs
?? haskell/darkf-wordwrap-b.hs
?? haskell/lampibound.hs.org
?? j/ackgolf.ijs.org
View tmux-1.8-on-CentOS-6.x.txt
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
View blocktemplate.py
#!/usr/bin/env python2.7
import pprint as pp
import pyjsonrpc as pj # pip-2.7 install python-jsonrpc
h=pj.HttpClient(url="http://gbt.mining.eligius.st:9337/",username="x",password="x")
d=h.call("getblocktemplate",id=0)
pp.pprint(d)
@tangentstorm
tangentstorm / loop-a.c
Last active Aug 29, 2015
which of these two programs would you expect to run faster... and why?
View loop-a.c
#include<stdio.h>
int main() {
unsigned long sum = 0;
for (unsigned long i=0; i<=4294967295; i++) sum++;
printf("%lu\n", sum);
}
@tangentstorm
tangentstorm / patmatch.ijs
Created Apr 15, 2015
pattern matching code in j!
View patmatch.ijs
NB. since the 'case' clauses are evaluated dynamically,
NB. you can use them to create something similar to pattern
NB. matching in erlang/prolog/haskell:
ite =: verb define
select. 'f g h' =. y
case. 1,g,h do. g
case. 0,g,h do. h
case. f,1,0 do. f
case. do.
@tangentstorm
tangentstorm / Flicker.cs
Created Jul 13, 2015
A flickering light behavior for unity.
View Flicker.cs
using UnityEngine;
using System.Collections;
public class FlickerBehavior : MonoBehaviour {
// the (comparatively) steady light phase
public float minLightMs = 500;
public float maxLightMs = 5000;
// dark part of the flicker phase: