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

All gists

Recently created
Least recently created
Recently updated
Least recently updated
june's Avatar

june / A formatting print rule-set.

0 likes
0 forks
1 files
Last active 3 months ago
Supports custom formatting by adding additional rules. (Runs in Serpens.)
1 |:: print? :string: '%d'| :: print a number
2 |:: print? :string: '%b'| :: print a number :base: 2
3 |:: print? :string: '%x'| :: print a number :base: 16
4 |:: print? :string: '%s'| :: print a string
5 |:: print? :string: '{}'| :: print an argument
6 |:: print? :string: '\n'| :string: 10
7 |:: print? :string: '\t'| :string: 9
8 |:: print? :string: '\r'| :string: 13
9 |:: print? :string: '\0'| :string: 0
10 |:: print? :string: $ | :@stdio: write $
june's Avatar

june / A simple search algorithm.

0 likes
0 forks
1 files
Last active 3 months ago
It eats whatever you pass into it.
1 |:search for: $something :collection: $something|
2 :found: $something
3 |:search for: $something :collection: $something-else|
4 :search for: $something
5 |:search for: $something|
6 :not found: $something
7
8 ||:search for: red
9 :collection: (green blue white orange red violet)
capitalex's Avatar

capitalex / main.processor.wul

0 likes
0 forks
4 files
Last active 3 months ago
1 {
2 @ make player at 100 100
3 , move player by 20 50
4 , @lamb pprint
5 }
6
7 @processor @ ;
8 @ move player by $x $y {
9 @processor @ ; @process switch to @ewe ;
10 @ewe ( #player @ewe.peek move by $x $y 4 @lamb.invoke @ewe.done ) ;
capitalex's Avatar

capitalex / main.wul

0 likes
0 forks
3 files
Last active 3 months ago
1 {
2 @ make player at 100 100
3 , move player by 20 50
4 , @lamb pprint
5 }
6
7 @ move player by $x $y {
8 @ewe ( #player @ewe.peek move by $x $y 4 @lamb.invoke ) ;
9 }
capitalex's Avatar

capitalex / crummy.cr

0 likes
0 forks
1 files
Last active 3 months ago
1 require "./event"
2
3 module Crummy
4 # Enum holding various ASCII control codes. Not all code are present in this
5 # enum.
6 enum ControlChar
7 Null
8 StartHeading
9 StartText
10 EndText
capitalex's Avatar

capitalex / ewe.wul

0 likes
0 forks
1 files
Last active 3 months ago
1 @ewe @ewe.dup ; @ewe.stack $ {
2 @ewe.stack ( $ $ )
3 }
4
5 @ewe @ewe.swap ; @ewe.stack ( $x $y ) {
6 @ewe.stack ( $y $x )
7 }
8
9 @ewe @ewe.drop ; @ewe.stack ( $x ) { }
capitalex's Avatar

capitalex / tak.wul

0 likes
0 forks
1 files
Last active 3 months ago
1
2 { @ewe ( 8 4 7 tak @ewe.call ) }
3
4 @ewe def tak ; @ewe.stack ~( $x $y $z ) {
5 @ewe (
6 $x $y $z
7 $y $x @ewe.lt @ewe.not tak.true tak.false @ewe.if
8 )
9 }
capitalex's Avatar

capitalex / final-digits.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 __| 1 2 3 4 5 6 7 8 9
2 1 | 1 2 3 4 5 6 7 8 9
3 2 | 2 4 6 8 0 2 4 6 8
4 3 | 3 6 9 2 5 8 1 4 7
5 4 | 4 8 2 6 0 4 8 2 6
6 5 | 5 0 5 0 5 0 5 0 5
7 6 | 6 2 8 4 0 6 2 8 4
8 7 | 7 4 1 8 5 2 9 6 3
9 8 | 8 6 4 2 0 8 6 4 2
10 9 | 9 8 7 6 5 4 3 2 1
capitalex's Avatar

capitalex / objects.lua

0 likes
0 forks
1 files
Last active 3 months ago
1 local player = Thing()
2 :has { t = 0, x = 0, y = 0, w = 32, h = 32 }
3 :is { "player", "solid" }
4 :when "dead"
5 :on_start(function(self)
6 self:broadcast "player died"
7 end)
8 :mimic "alive" "draw"
9 :when "alive"
10 :does "update" (function(self, dt)
june's Avatar

june / Propagators (Draft)

0 likes
0 forks
1 files
Last active 3 months ago
A quick demonstration of building propagators from scratch.
1 ||:@include: lib/rpn.nv
2
3 ||:: a = b + c
4 ||:: d = a + # 1
5 ||:: b = 1
6 ||:: c = 2
7
8 |:: $x = $y $op $z|
9 :: create some cells :names: ($x $y $z)
10 :: create an operator
Newer Older

Powered by Opengist ⋅ Load: 173ms⋅

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