Skip to content

Instantly share code, notes, and snippets.

View IFcoltransG's full-sized avatar
📎

IFcoltransG IFcoltransG

📎
View GitHub Profile
@IFcoltransG
IFcoltransG / parse_expression.ink
Last active September 9, 2025 22:32
A parser for very simple maths expressions in Ink
// Ink expression parsing code created by IFcoltransG
// Released into public domain
// May be used under the MIT No Attribution License
CONST string_to_parse = "5 * 10"
Parsing "{string_to_parse}"
~ temp c = "" // initial cursor
~ temp result = parse_expression(string_to_parse, c)
@IFcoltransG
IFcoltransG / strings.ink
Last active September 9, 2025 11:04
String manipulation utilities in Ink, based on my "capitalise" code
// Ink string util code created by IFcoltransG
// Released into public domain
// May be used under the MIT No Attribution License
// All functions only work on supported symbols that have been added
// to the `letters` variable below.
/*
This is a sentinel token. It should be set to something that won't appear in any words.
@IFcoltransG
IFcoltransG / capitalise2.ink
Created January 4, 2024 02:12
Word capitalisation in Inkle's Ink language (v2)
// Ink capitalisation code (v2) created by IFcoltransG
// Released into public domain
// May be used under the MIT No Attribution License
/*
This is a sentinel token. It should be set to something that won't appear in any words.
*/
CONST START = "^^"
/*
@IFcoltransG
IFcoltransG / clicker.ink
Last active January 4, 2024 01:31
Inline "clickers" in Inkle's Ink, for choices that toggle a variable
// Ink clicker code created by IFcoltransG
// Released into public domain
// May be used under the MIT No Attribution License
LIST journey_soundtrack_songs = Nascence, Apotheosis, Reclamation
VAR a = Nascence
VAR b = Apotheosis
-> go
== go
@IFcoltransG
IFcoltransG / capitalise.ink
Created August 19, 2023 11:25
Word capitalisation in Inkle's Ink language
// Ink capitalisation code created by IFcoltransG
// Released into public domain
// May be used under the MIT No Attribution License
CONST START = "^^"
LIST letters = (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l), (m), (n), (o), (p), (q), (r), (s), (t), (u), (v), (w), (x), (y), (z), /*
*/ A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
Here is an example of the word "hello" capitalised: {capitalise_start("hello")}