Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔

Marcin Gasperowicz nooga

🤔
View GitHub Profile
View blah.iv
def count a = a.length
def not = RT.not;
def Success v s = {value: v, rest: s}
def Fail e s = {error: e, rest: s}
def Fail? e = e.error != ()
def Success? = not @ Fail?
def empty? s = s == () || s == ""
View parsec.js
/*
* Parser combinator lib
*/
function is_error(x) {
return typeof x === 'string';
}
function parser(f) {
f.then = function(n, fc) {
View gist:4eb65589c3dae08333b98f21f74a1e2b
➜ Build git:(master) cmake ..
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- The ASM compiler identification is Clang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
View funtest.js
(function () {
var x = (function () {
return f();
})();
function f() {
return 1;
}
return x;
}.call(this));
View sort_obj.js
> Array.prototype.sort.call(x, (a,b) => { console.log(x); return a - b; })
{ '0': 2, '1': 1, '2': 0, '3': -1, '7': -2, '8': -3, length: 9 }
{ '0': 2, '1': 1, '2': 0, '3': -1, '7': -2, '8': -3, length: 9 }
{ '0': 2, '1': 1, '2': 0, '3': -1, '7': -2, '8': -3, length: 9 }
{ '0': 2, '1': 1, '2': 0, '3': -1, '7': -2, '8': -3, length: 9 }
{ '0': 2, '1': 1, '2': 0, '3': -1, '7': -2, '8': -3, length: 9 }
{ '0': -3, '1': -2, '2': -1, '3': 0, '4': 1, '5': 2, length: 9 }
> x = [2,1,0,-1,,,-2,-3]
[ 2, 1, 0, -1, <2 empty items>, -2, -3 ]
View keybase.md

Keybase proof

I hereby claim:

  • I am nooga on github.
  • I am xnooga (https://keybase.io/xnooga) on keybase.
  • I have a public key ASCPjSXVwNWTM9qPSD9hPNy6wPkqJyeO71dZvXrZgQYvpAo

To claim this, I am signing this object:

View gist:681965dc59f1a4f6207803a8908a4c31
"/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/bin/java" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=54882:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/charsets.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/localedata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunec.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Applicat
View gist:813d9aea6cd7246d3bb7d0ef661276ba
"/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/bin/java" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=51814:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/charsets.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/localedata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunec.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Applicat
View gist:8794d6de4a5ec0537b8e22bf0e4cc8eb
serial0: serial@90000000 {
compatible = "opencores,uart16550-rtlsvn105", "ns16550a";
reg = <0x90000000 0x100>;
interrupts = <2>;
clock-frequency = <20000000>;
};
View gist:b96b9cb9574ee46ab377bd0d41947075
"/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/bin/java" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=58039:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/charsets.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/localedata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunec.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Applicat