Skip to content

Instantly share code, notes, and snippets.

// WIDTH: number of bytes to load/store in one instruction for bandwidth tests
// default: 32
// WIDTH∊1 2 4 8: regular integer loads
// x86-64 WIDTH==16 - SSE; WIDTH==32 - AVX2
// aarch64: WIDTH==16 - NEON loads; WIDTH==32 uses an ldp
// CLOCK_RATE: number of clock cycles in a second on the target processor
// TEST_LAT: test latency instead of bandwidth; latency tests aligned 8-byte loads
#ifndef CLOCK_RATE
#define CLOCK_RATE 3.6e9 // 3.6GHz
// ==UserScript==
// @name TIO fancy search & enter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description sort languages fancily
// @author dzaima
// @match https://tio.run/
// @grant none
// ==/UserScript==

If you have questions about the contents of this document, ask them in the forum.

The quick version

Let's try the easy route first:

  • Install Java 8
    • On Windows and Linux, install the latest JRE 8 from Oracle.
    • On macOS, download and install JDK 8.
  • Previous versions of Java are not supported. Later versions of Java (9, 10, whatever) don't work either.
const DEBUG = false;
//raw directions
const UL = 0; const U = 1; const UR = 2;
const L = 3; const C = 4; const R = 5;
const DL = 6; const D = 7; const DR = 8;
//directions from the reference point
const ul = 16; const u = 17; const ur = 18;
const l = 19; const c = 20; const r = 21;
const dl = 22; const d = 23; const dr = 24;
default shift #
alt ctrl #
# #
MAP
## ## ## ## ## ## ## ## ## ## ## ## ## .. .. ..
## ## ## ## ## ## ## ## ## ## ## ## ## .. .. ..
□’ ¹№ ²# ³# ⁴# ⁵# ⁶# ⁷# ⁸∙ ⁹⁽ ⁰⁾ ┌╔ ≠┼ ┘┐ ## .. ## .. .. ÷# ## κ#
## ## ## ## ## ## ## ## ## ## #∆ ## #╗ ╝# ## .. ## .. .. ## ## ##
const STRING = 0,
FUNCTION = 1;
function tokenize (prog) {
var tokens = [];
while (prog != "") {
let token;
prog = prog.replace(/^("(\\.|[^"])*"|[^"][^ ]*)( |$)/, (all, f)=>(token = f,""));
let type = FUNCTION;
if (token[0] == "\"") {
type = STRING;
67 //base recipes
+5*4 //5 recipes (armor+material block) have 5 vers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,1,1,2,1,1,1,1,1,2,1,1,4,1,1,1,1,1,1,1,1,1
@dzaima
dzaima / ascii.txt
Last active July 4, 2017 11:53
SOGL ascii art
ā.∫ā;∫ \*+}↔±╬‛;┼↔±╬‛
---
/\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\
\/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/ //\\//\\ \/\///\\//\\\/\/
/\/\\\//\\///\/\///\\\///\\\/\/\\\//\\///\/\ ///\\\///\\\ /\/\\\//\\///\/\///\\\///\\\/\/\\\//\\///\/\ ///\\\///\\\ /\/\\\//\\///\/\///\\\///\\\/\/\\\//\\///\/\ ///\\\///\\\ /\/\\\//\\///\/\///\\\///\\\/\/\\\//\\///\/\
\/\/ \/\/ \/\/\\\///\\\///\/\/ \/\/ \/\/////\\\\////\\\\\/\/ \/\/ \/\/\\\///\\\///\/\/ \/\/ \/\/ ////\\\\////\\\\ \/\/ \/\/ \/\/\\\///\\\///\/\/ \/\/ \/\/////\\\\////\\\\\/\/ \/\/ \/\/\\\///\\\///\/\/ \/\/ \/\/
/\/\ /\/\ /\/\ \\//\\// /\/\ /\/\ /\/\\\\\////\\\\/////\/\ /\/\ /\/\ \\//
_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
0_ ¹ ² ³ \t ± « »
1_ æ Æ ø § ° ¦ ¡ ¤ ½
2_   ! " # $ % & ' ( ) * + , - . /
3_ 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4_ @ A B C D E F G H I J K L M N O
5_ P Q R S T U V W X Y Z [ \ ] ^ _
6_ ` a b c d e f g h i j k l m n o
7_ p q r s t `