Skip to content

Instantly share code, notes, and snippets.

View lynn's full-sized avatar
🐞

Lynn lynn

🐞
View GitHub Profile
@lynn
lynn / freqlist-2019-02.txt
Last active February 21, 2024 11:47
frequency list for Toaq, with translations
da illocution: assertive illocution
ji predicate: ‘me’; ___ is me / the speaker.
bu predicate: ‘not’; ___ is not the case / is false; ___ does not satisfy property ___.
mi predicatizer: ‘those.named’; turns following phrase X into predicate: ___ is/are the one(s) called X.
moq illocution: ‘?’; interrogative illocution
ka illocution: ‘hereby’; performative illocution
bi particle: ‘:’; terminates prenex
rai predicate: ‘something’; ___ is something.
suq predicate: ___ is you / the listener.
sa quantifier: ‘some’; existential quantifier
@lynn
lynn / na mojgau fo do
Last active December 30, 2018 03:26
“Don't Miss You At All” (in lojban)
Don't Miss You At All la'au «na mojgau fo do» li'u
(words by Norah Jones.) (xe fanva fi lo lojbo fu la lalxu)
As I sit and watch the snow .i lo vi'u snime noi
falling down farlu vau
I don't miss you at all mi na mojgau fo do
(The snow in space that)
(falls)
import sys
sys.setrecursionlimit(20000)
stack = [[[]]]
for c in input().strip('^$'):
if c == '(': stack.append([[]]) # new fork
elif c == '|': stack[-1].append([]) # new tine
elif c == ')': fork = stack.pop(); stack[-1][-1].append(fork)
else: stack[-1][-1].append(c)
[[maze]] = stack
@lynn
lynn / aoc-20.py
Created December 20, 2018 21:39
Why doesn't this work ;-;
import sys
sys.setrecursionlimit(20000)
def parse(regex):
stack = [[[]]]
for c in regex.strip('^$'):
if c == '(': stack.append([[]]) # new fork
elif c == '|': stack[-1].append([]) # new tine
elif c == ')': fork = stack.pop(); stack[-1][-1].append(fork)
else: stack[-1][-1].append(c)
@lynn
lynn / hmmm.py
Created December 20, 2018 21:23
import sys
sys.setrecursionlimit(20000)
stack = [[[]]]
for c in input().strip('^$'):
if c == '(': stack.append([[]]) # new fork
elif c == '|': stack[-1].append([]) # new tine
elif c == ')': fork = stack.pop(); stack[-1][-1].append(fork)
else: stack[-1][-1].append(c)
[[maze]] = stack
@lynn
lynn / glicau.md
Last active December 8, 2018 02:42
jbovlaste words defined in Lojban but not English
  • adji = $x_2$ tcini gi'e vanbi lo nu x1 noi ke'a xamgu cu cumki
  • a'inmo = x1 .a'i zei cinmo $x_2$ .i x1 cinmo lo ka ce'u troci ja gunka ja se nandu kei x2
  • ainmo = x1 .ai zei cinmo $x_2$ .i x1 cinmo lo ka ce'u .aidji kei x2
  • akna = x1 fau lo nu x1 se sance lo porpi sance cu porpi gi'a co'a se fenra
  • aknagau = x1 gasnu lo nu x2 .akna
  • akra = x1 purci je cabjbirai se cusku sumti gi'e ckaji x2
  • alva = ge va'o lo nu x1 fasnu gi va'o lo nu na ku x1 fasnu kei x2 fasnu
  • amkau = su'oi da poi .olkai x1 zo'u lo du'u da ckaji x1 cu ckaji x2
  • a'onmo = x1 .a'o zei cinmo $x_2$ .i x1 cinmo lo ka ce'u pacna kei x2
  • asta = nu x1 poi tamxri x2 cu se sanso x3 kei je tcaci fa x4
@lynn
lynn / aoc-2018.css
Last active November 28, 2020 12:13
My user stylesheet for Advent of Code
/* Sans-serif for most content. */
body { font-family: "Ubuntu", "Segoe UI", sans-serif; line-height: 1.3em; }
input~span:before, .leaderboard-entry, .privboard-row { font-family: "Source Code Pro", monospace; letter-spacing: -1px; }
/* Emphasis = bold, instead of glowy. */
body * { text-shadow: none !important; }
article em { font-weight: bold; }
/* Center content. */
main>article, main>p, pre.calendar, form, .leaderboard-entry { width: 40em !important; margin: auto; }
@lynn
lynn / deltarune-code.csx
Last active April 1, 2022 11:28
Deltarune code extraction script for UndertaleModTool
// Maybe you need to tweak this DLL path for your .NET framework version.
#r "C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Text.RegularExpressions.dll"
using System.Text.RegularExpressions;
EnsureDataLoaded();
static var Lang = new Dictionary<string, string>();
public static class Operands {
public static IEnumerable<string> Or(Match m) {
yield return m.Groups[1].Value;
@lynn
lynn / tio-syntax-highlighting.user.js
Last active April 10, 2019 10:49
Tampermonkey Syntax Highlighting for tio.run
// ==UserScript==
// @name TIO Syntax Highlighting
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Syntax highlighting for https://tio.run/
// @author Lynn
// @match https://tio.run/*
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/codemirror.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/mode/haskell/haskell.min.js
@lynn
lynn / tio-syntax-highlighting.user.js
Created October 22, 2018 13:07
TamperMonkey syntax highlighting for tryitonline.net
// ==UserScript==
// @name TIO Syntax Highlighting
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Syntax highlighting for https://tio.run/
// @author Lynn
// @match https://tio.run/
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/codemirror.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/mode/haskell/haskell.min.js