Skip to content

Instantly share code, notes, and snippets.

@l4ssc
l4ssc / ijox.md
Last active August 22, 2022 22:03
X = ijo X?, how to (not) create cosmic horrors in toki pona

X = ijo X?

This essay on toki pona's semantics is the result of a conversation at #sona-musi in ma pona pi toki pona. If you'd like to see that conversation and the progressive realization of the sheer absurdity of it, you may find that here. Otherwise, enjoy the show! :)


A discord screenshot of kili saying "new nasin: each word summons a different incomprehensible-to-puny-mortals cosmic horror that will feast on our reality" with 4 relieved reactions and 2 star reactions (click the image to use our (very real, mani-back guaranteed) highly-advanced technology to teleport to the post!)


@omentic
omentic / suggestions.md
Last active December 10, 2023 22:26
Compilation of suggestions from the Nim v2 thread

Suggestions for Nim v2

Note: this document is a collection of all proposals from the Nim v2 ideas thread. As such, it is/was not by any means reflective of intentions for 2.0: though I've updated this with accepted and implemented proposals.

Breaking changes

Features

  • kobi, exelotl, didlybom, solomonthewise, pdkoekfr, snej, apropos: Adopt Options module and make types not nil by default (discussion)
  • Zoom, apropos: Overhaul stdlib to work with view types and/or options/results for error handling
@tjjfvi
tjjfvi / ts-utils.md
Last active May 1, 2022 15:26
A collection of utilities for programming in TypeScript's Type System

This is a collection of utilities for programming in TypeScript's Type System.

Each codeblock represents one utility type, but there are often multiple implementations. Each implementation has equivalent semantics, but differ in dependency count and length.

Most of the time, the implementation you pick should not really matter.

However, if you are code-golfing, alternate versions may be better or worse depending on what other utility types you need. Also, some implementations may benefit from inlining.

This is an analysis of https://codegolf.stackexchange.com/a/203685/78112
like in https://gist.github.com/kmill/266ef6bb5690f9c26110673dcc59f710
Input: n A
1. M1 + A -> M2 + 10 B
2 M1 -> M2 + A
3. M2 + A + Div -> M1 + B
4. M2 + 4 B + Div -> M1 + A
5. M2 -> Count
@umnikos
umnikos / quiner interpreter.py
Last active January 13, 2022 12:35
An interpreter for the Quiner esolang (more info on https://esolangs.org/wiki/Quiner)
code = input("enter quiner code: ")
data = ""
code_ip = 0
data_ip = 0
debug = False
a = 1
a_len = 0
inputs = ""

How to use GingerBot

TNB Conlang (katlani)

To queue a word to be added to the word list, send a message formatted like __WR: word (p):__ Definition where word is the Katlani word, p is the part of speech, and definition is the definition. Example: __WR: caminar (v):__ Walk

Part of speech Abbreviations
Prefixes and Suffixes pre, suf

Vector extensions for tiny RISC machines

This is an idea for adding vector processing support to tiny RISC style microcontroller CPU:s (e.g. similar to FEMTORV32).

It could be especially beneficial for CPU:s without a pipeline, where each instruction normally takes 2+ clock cycles to complete.

The purpose of vector processing is to reduce the number of clock cycles required for each operation:

  1. Loop logic overhead is reduced (increment, compare, branch) as several data elements are processed in each loop iteration.
aahed
aalii
aapas
aargh
aarti
abaca
abaci
aback
abacs
abaft
@mgritter
mgritter / Factorial.fst
Last active November 10, 2021 18:01
An F* program for computing factorial sums
module Factorial
open FStar.Mul // Give us * for multiplication instead of pairs
open FStar.IO
open FStar.Printf
let rec factorial (n:nat) : nat =
if n = 0 then 1
else n * factorial (n-1)
@p4bl0-
p4bl0- / 00_readme.md
Last active October 12, 2023 09:09
A complete compiler for a simple language (in less than 150 LoC)

This project is a tiny compiler for a very simple language consisting of boolean expression.

The language has two constants: 1 for true and 0 for false, and 4 logic gates: ! (not), & (and), | (or), and ^ (xor).

It can also use parentheses to manage priorities.

Here is its grammar in BNF format:

expr ::= "0" | "1"