This file contains hidden or 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
let a = 3n; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Vendor Convert</title> | |
<meta charset=utf-8> | |
<style> | |
body { | |
font-size: 200%; | |
font-family: sans-serif; | |
color: firebrick; |
This file contains hidden or 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
<Query Kind="Program"> | |
<Namespace>static System.Math</Namespace> | |
</Query> | |
struct Point3 { | |
public int X; | |
public int Y; | |
public int Z; | |
public Point3(int x, int y, int z) => (X, Y, Z) = (x, y, z); | |
public int ManhattanDist(Point3 other) => Abs(X - other.X) + Abs(Y - other.Y) + Abs(Z - other.Z); |
This file contains hidden or 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
#ip 1 | |
ip0 jmp ip17 // addi 1 16 1 | |
ip1 r[5] = 1 // seti 1 1 5 | |
ip2 r[2] = 1 // seti 1 4 2 | |
ip3 r[3] = r[5] * r[2] // mulr 5 2 3 | |
ip4 r[3] = r[3] == r[4] // eqrr 3 4 3 | |
ip5 r[1] += r[3] // addr 3 1 1 | |
ip6 jmp ip8 // addi 1 1 1 | |
ip7 r[0] += r[5] // addr 5 0 0 | |
ip8 r[2] += 1 // addi 2 1 2 |
This file contains hidden or 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
const bool ShowSteps = false; | |
static readonly string[] Input = @" | |
################################ | |
#########...#################### | |
#########...###########.######## | |
#########G..##########....###### | |
##########..###########...###### | |
#########G...##########...###### | |
#########..G.###########..###### | |
########...#.##########..####### |
This file contains hidden or 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
List<List<string>> ReadCsv(string fileName) { | |
using var reader = new StreamReader(File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)); | |
return ReadCsv(reader); | |
} | |
List<List<string>> ReadCsv(TextReader reader) { | |
var result = new List<List<string>>(); | |
var currentRow = new List<string>(); | |
var currentCell = new StringBuilder(); | |
int c; |
This file contains hidden or 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
convert packed stax program to ascii | |
build stax encoding table | |
248 9786 9787 9829 9830 9827 9824 8226 9688 9675 9689 9794 9792 9834 9835 9788 9658 9668 8597 8252 182 167 9644 8616 8593 8595 8594 8592 8735 8596 9650 9660 | |
32l {i\m | |
8962 199 252 233 226 228 224 229 231 234 235 232 239 238 236 196 197 201 230 198 244 246 242 251 249 255 214 220 162 163 165 8359 402 225 237 243 250 241 209 170 186 191 8976 172 189 188 161 171 187 9617 9618 9619 9474 9508 9569 9570 9558 9557 9571 9553 9559 9565 9564 9563 9488 9492 9524 9516 9500 9472 9532 9566 9567 9562 9556 9577 9574 9568 9552 9580 9575 9576 9572 9573 9561 9560 9554 9555 9579 9578 9496 9484 9608 9604 9612 9616 9600 945 223 915 960 931 963 181 964 934 920 937 948 8734 966 949 8745 8801 177 8805 8804 8992 8993 247 8776 176 8729 183 8730 8319 178 9632 916 | |
129l {i127+\m | |
+:f|t use tables to stax-encode character codepoints | |
If you already have stax-encoded bytes, start here. |
This file contains hidden or 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
lines | |
#["This is some very long text.","25"] | |
extract-array | |
#"This is some very long text." | |
#"25" | |
read-num | |
#"This is some very long text." | |
#25 |
This file contains hidden or 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
print("hello world") |
This file contains hidden or 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
void Main() { | |
EnsureFailure( | |
"", | |
"#", | |
"1 + 2 +", | |
"+", | |
"(+)1", | |
"()", | |
"1 ()", | |
"1 2" |