Skip to content

Instantly share code, notes, and snippets.

View mgttt's full-sized avatar
deadbeef

datakk mgttt

deadbeef
View GitHub Profile
@NateScarlet
NateScarlet / termux-install-jupyterlab.sh
Created April 10, 2019 13:29
termux-install-jupyterlab
#!/bin/sh
pkg install clang python-dev libzmq libzmq-dev
pip install jupyterlab
tested with even IE6
```javascript
var o2s=
function(o){
if(null==o)return "null";
f=arguments.callee;
t=typeof o;
if('object'==t){if(Array==o.constructor)t='array';else if(RegExp==o.constructor)t='regexp';}
switch(t){
@benwaffle
benwaffle / JS.java
Created November 26, 2014 05:35
tiny nashorn (javascript) interpreter
import java.util.NoSuchElementException;
import java.util.Scanner;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class JS {
public static void main(String[] args) {
ScriptEngine se = new ScriptEngineManager().getEngineByName("nashorn");
@jlongster
jlongster / gist:1840230
Created February 16, 2012 00:03
tracing Outlet code
(trace-source (let ((i (+ 4 5)))
(+ i (* 2 (/ 3 4)))))
;; Output
(let ((i (+ 4 5)))
(+ i (* 2 (/ 3 4))))
-- (+ 4 5)
>> RESULT: 9
@jlongster
jlongster / gist:1712455
Created January 31, 2012 19:37
traditional lisp macros
;; outlet code for implementing traditional macro expansion
;; macros
(define (expand form)
(cond
((variable? form) form)
((literal? form) form)
((macro? (car form))
(expand ((macro-function (car form)) form)))
@dekosuke
dekosuke / gist:1002198
Created June 1, 2011 12:25
JavaからJavaScript(Rhino)呼び出し
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class ScriptingForJavaScript {
public static void main(String[] args) throws Exception {
ScriptEngineManager factory = new ScriptEngineManager();
ScriptEngine engine = factory.getEngineByName("js");
try {