Skip to content

Instantly share code, notes, and snippets.

View jnorthrup's full-sized avatar

Jim Northrup jnorthrup

View GitHub Profile
@jnorthrup
jnorthrup / shell res
Created April 20, 2020 16:48
kotlinc vs python3
jim@OJFQCCK22EVHS7YKLYN6LXTEZ2JR4HAZ:~/work/columnar/superannuate$ export JAVA_HOME=/opt/jdk-15/ JAVA_OPTS=-Xmx512m ;export PATH=/opt/jdk-15//bin/:$PATH;time kotlinc-jvm -jvm-target 13 -Xnew-inference -cp $(find ../cursor/target/ -name '*jar'|xargs -n999 echo|tr ' ' :) -script histogram.kts
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
1
emulating
import pandas as pd;
/*
* StringParser.java
*
* Copyright (C) 2008 Pei Wang
*
* This file is part of Open-NARS.
*
* Open-NARS is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
@jnorthrup
jnorthrup / pom.xml
Last active November 2, 2019 13:44
simplest possible grammar
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fnreport</groupId>
<artifactId>lownal</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
java.lang.IllegalArgumentException: The tokens list should not be empty
at com.github.h0tk3y.betterParse.lexer.DefaultTokenizer.<init>(DefaultTokenizer.kt:9)
at com.github.h0tk3y.betterParse.grammar.Grammar$tokenizer$2.invoke(Grammar.kt:31)
at com.github.h0tk3y.betterParse.grammar.Grammar$tokenizer$2.invoke(Grammar.kt:17)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.github.h0tk3y.betterParse.grammar.Grammar.getTokenizer(Grammar.kt)
at com.github.h0tk3y.betterParse.grammar.GrammarKt.tryParseToEnd(Grammar.kt:63)
at com.fnreport.sentenceTest$1.invoke(sentenceTest.kt:28)
@jnorthrup
jnorthrup / gdns
Last active September 25, 2019 05:43
Indonesian reddit DNS script
#use google dns webservice
#as root
for i in $@
do
eval echo $(
curl -s 'https://dns.google.com/resolve?name='${i[@]}'&type=A'|
jq -S '.Answer[-1].data'
) $i |
/usr/lib/jvm/java-12-openjdk-amd64/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-JDK11/ch-0/191.7479.19/lib/idea_rt.jar=35803:/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-JDK11/ch-0/191.7479.19/bin -Dfile.encoding=UTF-8 -classpath /home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-JDK11/ch-0/191.7479.19/lib/idea_rt.jar:/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-JDK11/ch-0/191.7479.19/plugins/junit/lib/junit-rt.jar:/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-JDK11/ch-0/191.7479.19/plugins/junit/lib/junit5-rt.jar:/home/jim/work/json-lazy-autobean/target/test-classes:/home/jim/work/json-lazy-autobean/target/classes:/home/jim/.m2/repository/com/google/gwt/gwt-dev/2.6.0/gwt-dev-2.6.0.jar:/home/jim/.m2/repository/org/json/json/20090211/json-20090211.jar:/home/jim/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar:/home/jim/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/home/jim
plugins {
id 'kotlin-multiplatform' version '1.3.31'
}
repositories {
jcenter()
mavenCentral()
}
group 'com.example'
version '0.0.1'
plugins {
id 'kotlin-multiplatform' version '1.3.31'
}
repositories { maven {
url "https://kotlin.bintray.com/kotlinx"
}
jcenter()
mavenCentral()
}
/usr/lib/jvm/java-1.12.0-openjdk-amd64/bin/java -Dmaven.multiModuleProjectDirectory=/home/jim/work/jsuffixarrays -Dmaven.home=/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6707.61/plugins/maven/lib/maven3 -Dclassworlds.conf=/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6707.61/plugins/maven/lib/maven3/bin/m2.conf -javaagent:/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6707.61/lib/idea_rt.jar=38871:/home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6707.61/bin -Dfile.encoding=UTF-8 -classpath /home/jim/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6707.61/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version2019.1.1 install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotsearch:jsuffixarrays:jar:0.2.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.jetbrai
@jnorthrup
jnorthrup / git_create_orphan.sh
Created May 1, 2019 09:45 — forked from seanbuscay/git_create_orphan.sh
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name