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
{$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; |
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
;;; 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. |
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
;;; 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 |
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
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 |
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
# 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 |
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 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) |
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<stdio.h> | |
int main() { | |
unsigned long sum = 0; | |
for (unsigned long i=0; i<=4294967295; i++) sum++; | |
printf("%lu\n", sum); | |
} |
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
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. |
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
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: |
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
# a tiny assembler | |
module 'asm' | |
imports [ 'vm', 'mr' ], -> | |
# instruction formats: | |
fm0 = 0 | |
fm1 = 1 << 30 | |
fm2 = 2 << 30 | |
fm3 = 3 << 30 |