All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login
's Avatar

capitalex

Joined 2 years ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 140 Forked 1
capitalex's Avatar

capitalex / Calculator

0 likes
0 forks
1 files
Last active 1 month ago
Calculator implementing Bogue
1 open Bogue
2
3 module W = Widget
4 module L = Layout
5
6
7 let calculator () =
8 let stack = Stack.create () in
9 Stack.push "0" stack ;
capitalex's Avatar

capitalex / gol.ocaml

0 likes
0 forks
1 files
Last active 1 month ago
1 Random.self_init ()
2
3 type cell = Dead | Alive
4 let cell_to_string = function
5 | Alive -> "#"
6 | Dead -> "_"
7
8 let cell_to_int = function
9 | Alive -> 1
10 | Dead -> 0
capitalex's Avatar

capitalex / scheming.squirm

0 likes
0 forks
1 files
Last active 1 month ago
1 <quick ~color ~animalA jumps over the lazy ~animalB> {
2 How rude says !animalB to the quick !color !animalA
3 }
4
5 ~animalB {
6 lazy ~ {
7 $stash the ~ {
8 $stash over ~ {
9 $stash jump ~ {
10 $stash ~animalA {
capitalex's Avatar

capitalex / snarl.factor

0 likes
0 forks
1 files
Last active 1 month ago
1 ! Copyright (C) 2026 CapitalEx
2 ! This mine and only mine all rights reserved >:3c
3 USING: accessors assocs assocs.extras combinators
4 combinators.short-circuit command-line continuations debugger
5 html.elements io io.directories io.encodings.utf8 io.files
6 io.files.info io.pathnames io.streams.string kernel literals
7 namespaces sbufs sequences sequences.deep sets sorting splitting
8 strings unicode xml xml.data xml.state xml.traversal xml.writer
9 ;
10 FROM: namespaces => set ;
capitalex's Avatar

capitalex / progress.gd

0 likes
0 forks
2 files
Last active 2 months ago
1 extends RefCounted
2
3 var state = { "foo": ["foo", "bar", "baz", "quux"], "bar": ["quux", "baz", "bar", "foo"] }
4
5 func push(stack_symbol, symbol) -> void:
6 state[stack_symbol].push_back(symbol)
7
8 func peek(stack_symbol, depth : int, symbol) -> bool:
9 var stack = state[stack_symbol]
10 if not stack: return false
capitalex's Avatar

capitalex / Typing Game?

0 likes
0 forks
1 files
Last active 2 months ago
Some kind of typing game in LÖVE
game love2d
1 score = 0
2 timer = 30
3 letter = string.char(math.random(97, 122))
4 font = love.graphics.newFont(48)
5 gameover = false
6 love.graphics.setFont(font)
7
8 function love.update(dt)
9 timer = timer - dt
10 if timer <= 0 then
capitalex's Avatar

capitalex / Lights Out

0 likes
0 forks
1 files
Last active 2 months ago
A small lights out game written for LOVE. It doesn't check win states tho.
game love2d
1 local size = 100
2 local offsetH, offsetW = love.graphics.getHeight() / 2 - 250, love.graphics.getWidth() / 2 - 250
3
4 local grid = {
5 {false, false, false, false, false},
6 {false, false, false, false, false},
7 {false, false, false, false, false},
8 {false, false, false, false, false},
9 {false, false, false, false, false},
10 }
capitalex's Avatar

capitalex / prefix-stack.lua

0 likes
0 forks
2 files
Last active 2 months ago
1 local Object = require "object"
2
3
4 --[[
5 Prefix Tree Stack preserves the insertion order
6 of the items being added. This can create duplicate
7 branches when a normal prefix tree wouldn't have it
8
9 Insertion Operations:
10 insert apple
capitalex's Avatar

capitalex / stackthingl.txt

0 likes
0 forks
1 files
Last active 4 months ago
1 $ x 0
2 $ y 1
3
4 : magnitude
5 @x @x * @y @y * + sqrt ;
6
7 3 >x 4 >y
capitalex's Avatar

capitalex / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 [ -- if 1
2 [] -- pop next bit
3 0101 -- duplicate encoded 1
4 0 -- cancel next block
5 0 -- cancel this block
6 ]
7 [ -- if 1
8 1010 -- duplicate encoded 0
9 0 -- cancel this loop
10 ]
Newer Older

Powered by Opengist ⋅ Load: 429ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文