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
function HomeBind(offset) | |
let cursor=getpos('.') | |
let s0=getline(line('.')) | |
let s1=substitute(s0, "^\\s\\+", "", "") | |
let x=len(s0)-len(s1)+1 | |
if col('.') == x-a:offset | |
let x=1 | |
endif | |
call setpos('.', [cursor[0], cursor[1], x, cursor[3]]) | |
endfunction |
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
#define digit(p) ('0' <= *(p) && *(p) <= '9') | |
char* a[1000]; | |
int n = 0; | |
void fetch(char* p){ | |
while(*p && !digit(p)) p++; | |
if(*p){ | |
char* start = p; | |
while(*p && digit(p)) p++; | |
a[n] = start; n++; | |
if(*p) *p = 0, fetch(++p); |
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
var MakeTest(a0, d): | |
var j = 0; | |
return (x) => | |
def r = a0 + d * j; | |
j += 1; | |
return x === r | |
def guess(test): | |
var counter = 0 | |
for var segment in 1..infinity: |
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
-- Enumerator comprehension monad | |
var ecSchemata = [yield: fYield, return: fReturn, bind: fBind] | |
where | |
fReturn = Enumerable function(x): | |
if(x != undefined) | |
enumeration.yield! x | |
fYield(x) = x | |
fBind = Enumerable function(list, callback): | |
for(var x in list) | |
for(var y in callback x) |
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
def rest(s) = s.slice 1 | |
def mergeSpaces(s) = phase_normal s | |
where phase_normal(s) = piecewise | |
when(not s) s | |
when(s[0] == ' ') s[0] + phase_space rest s | |
otherwise s[0] + phase_normal rest s | |
phase_space(s) = piecewise | |
when(not s) s | |
when(s[0] == ' ') phase_space rest s |
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
function F1$_(){ | |
var Tp$_, Tq$_, T11$_, T12$_; | |
var ecSchemata$, item$, mktable$, t$; | |
//MoeMap// var ecSchemata = [yield: fYield, return: fReturn, bind: fBind] | |
//MoeMap// where | |
ecSchemata$ = (function F2$_(){ | |
var fBind$, fReturn$, fYield$; | |
//MoeMap// fReturn = Enumerable function(x): | |
fReturn$ = Enumerable$({build:function(SCHEMATA$_){return function(x$){ | |
var T4$_, T5$_, T6$_, T7$_; |
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
<dict> | |
<key>match</key> | |
<string>[$*,£¥·‘“〈《「『【〔〖〝﹗﹙﹛$(.[{£¥]*[ -鿿][!%),.:;>?¢¨°·ˇˉ―‖’”„‟†‡›℃∶、。〃〆〈《「『〕〗〞︵︹︽︿﹃﹘﹚﹜!"%'),.:;?]`|}~ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻]*</string> | |
<key>name</key> | |
<string>meta.cjkword</string> | |
</dict> |
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
function bench1(n){ | |
for(var i = 0; i < n; i++) ; | |
} | |
function bench2(n){ | |
for(var i = 0.5; i < n; i++) ; | |
} | |
function bench3(n){ | |
for(var i = Math.random(); i < n; i++) ; | |
} | |
function bench4(n){ |
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
; Modified by Belleve Invis | |
; In order to support High DPI environment | |
; FocuslessScroll by Scoox | |
; Source: http://www.autohotkey.com/board/topic/6292-send-mouse-scrolls-to-window-under-mouse/?p=398492 | |
; Modifications by Geoff Stokes | |
;Directives | |
#NoEnv | |
#SingleInstance Force |
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
// data types | |
type[T] Point { | |
data x : T | |
data y : T | |
} | |
type IntPoint = Point[Integer] | |
// complex concepts | |
type[T <= Differable] DifferenceOf { |
OlderNewer