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 147 Forked 1
capitalex's Avatar

capitalex / zombies.mira

0 likes
0 forks
2 files
Last active 1 year ago
1 player $player,
2 $player at x #400 and y #300,
3 can update for $player.
4
5 update $id, player $id?:
6 , compute player $id velocity x
7 , @is-down key a, @is-down key d
8 , compute player $id velocity y
9 , @is-down key w, @is-down key s
10 .
capitalex's Avatar

capitalex / map.nv

0 likes
0 forks
1 files
Last active 1 year ago
1 ||
2 :: map :list: (1 2 3 4 5 6 7) :into: x
3 :with: x = x + 1
4 :with: x = x ^ 2
5 :with: x = x * 3
6
7 |:: map? :list: $x :into: $var?|
8 :@variables: set $var $x :@variables:
9 :: wait for @variables
10 :: apply operations
capitalex's Avatar

capitalex / fizzbuzz.nv

0 likes
0 forks
2 files
Last active 1 year ago
1 || :: fizzbuzz :n: 1 :max: 100
2
3 |:: fizzbuzz :n: $n? :max: $m?|
4 :: as long as $n is not greater than $m :: then
5 :: $n is a multiple of 3 :: then
6 :: it's a fizz number
7 :: $n is a multiple of 5 :: then
8 :: it's a buzz number
9 :: end
10 :: else :: $n is a multiple of 5 :: then
capitalex's Avatar

capitalex / BaseLoader.gd

0 likes
0 forks
1 files
Last active 1 year ago
1 extends Node
2 class_name BaseLoader
3
4 var items = {}
5
6 var TYPES := []
7 var RESOURCE_DIR := ""
8 var RECURSIVE := true
9 var _resources_to_load := []
capitalex's Avatar

capitalex / hello-world.inlang.nils.nv

0 likes
0 forks
1 files
Last active 1 year ago
1 |:: documentation for NILS Form|
2 :@doc string:
3 "Nova In-Language Static Form is a possible structure for lowering
4 Nova code into a bytecode language describable in Nova. This is not
5 intended to be written by hand."
6
7 |:@data stack: reset? :@data seen: $stack $value|
8 :@data: $stack $value
9 |:@data stack: reset|
capitalex's Avatar

capitalex / hello-world.nils.jets.nv

0 likes
0 forks
1 files
Last active 1 year ago
1 |:: documentation for NILS Form|
2 :@doc string:
3 "Nova In-Language Static Form is a possible structure for lowering
4 Nova code into a bytecode language describable in Nova. This is not
5 intended to be written by hand."
6
7 |:: match $stack $arity :failed:?|
8 |:: match $stack $symbol|
9 :@jet:
10 "
capitalex's Avatar

capitalex / hello-world.nils.nv

0 likes
0 forks
1 files
Last active 1 year ago
1 |:: documentation for NILS Form|
2 :@doc string:
3 "Nova In-Language Static Form is a possible structure for lowering
4 Nova code into a bytecode language describable in Nova. This is not
5 intended to be written by hand."
6
7 |:: match $stack $arity :failed:?|
8 |:: match @stdio.arity $arity :@stdio.arity: $arity| :@stdio.arity (r): $arity
9 |:: match @stdio.1 $1 :@stdio.1: $1| :@stdio.1 (r): $1
10 |:: match @stdio.2 $2 :@stdio.2: $2| :@stdio.2 (r): $2
capitalex's Avatar

capitalex / nova-parser.nv

0 likes
0 forks
1 files
Last active 1 year ago
1 |:: parse nova|
2 :: normalize whitespace
3 :: parse the container format
4 :: parse the label format
5 :: parse patterns
6
7 |:: normalize whitespace? :src: 9| :processed: 32
8 |:: normalize whitespace? :src: 10| :processed: 32
9 |:: normalize whitespace? :src: 13| :processed: 32
10 |:: normalize whitespace? :src: 32| :processed: 32
capitalex's Avatar

capitalex / bottles-of-beer.nv

0 likes
0 forks
3 files
Last active 1 year ago
1 || :keyword for 'if': say
2 :keyword for 'else': otherwise-say
3
4 || :: 99 bottles of beer
5
6 |:: $n bottles of beer|
7 :: $n bottles of beer on the wall!
8 :: $n bottles of beer!
9 :: You take one down, pass it around!
10 :: when $n is 1 :: say
capitalex's Avatar

capitalex / multiset-fib.modal

0 likes
0 forks
1 files
Last active 1 year ago
1 <> (tally ?v (Bag ?l)) ((Bag tallying| tallying> ?v ?l))
2
3 <> (tallying> ?v ())
4 (<tallying ((Entry ?v 1) ()))
5
6 <> (tallying> ?v ((Entry ?v ?c) ?r))
7 (<tallying ((Entry ?v ?((?: ?0 ?1) ?:) + ?c 1) ?r))
8
9 <> (tallying> ?v (?e ?r))
10 ((?e tallying> ?v ?r))
Newer Older

Powered by Opengist ⋅ Load: 250ms⋅

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