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 / gist:21596a68a7654ad39e0e289b0541639c

0 likes
0 forks
1 files
Last active 2 years ago
1 |------------------------------------------------------|
2 |#| constant, @resolution-x, 400
3 |#| constant, @resolution-y, 400
4 ||window, @resolution-x:400, @resolution-y:400, display
5 |window| @set-resolution
6
7 |#| constant, Loop x, 400
8 |#| constant, Loop y, 400
9 |#| constant, x->p, 400
10 |#| constant, y->p, 400
sierra's Avatar

sierra / resize.nv

0 likes
0 forks
1 files
Last active 2 years ago
1 ||start, @resolution-x:17,@resolution-y:17,@set-resolution
2 |clear__width, width| clear__width:4294967295
3 |clear__width|
4 |set_const__width__15| width:15
5 |clear__height, height| clear__height:4294967295
6 |clear__height|
7 |set_const__height__15| height:15
8 |clear__y, y| clear__y:4294967295
9 |clear__y|
10 |set_const__y__1| y:1
capitalex's Avatar

capitalex / group-etch-a-sketch.nv

0 likes
0 forks
1 files
Last active 2 years ago
1 |#| new buttons row
2 |#| button, ⇐, left
3 |#| button, ⇑, up
4 |#| button, ⇓, down
5 |#| button, ⇒, right
6 |#| new buttons row
7 |#| button, Pen Down, pen down
8 |#| button, Pen Up, pen up
9 |#| new buttons row
10 |#| button, <h2 style="color:red">██</h2>, set red
june's Avatar

june / Patching A Compiled Program

0 likes
0 forks
1 files
Last active 2 years ago
Adding features to a program compiled from another language.
1 |----------------------------------------|
2
3 The section between these
4 two lines is a patch to
5 the original program.
6
7 It's intended that, as a
8 program is used, it can be
9 changed and patched as the
10 user desires.
capitalex's Avatar

capitalex / bouncing_ball.nv

0 likes
0 forks
2 files
Last active 2 years ago • Forked from yumaikas/bouncing_ball.nv
1 ||start
2 |clear__canvas_width, canvas_width| clear__canvas_width:4294967295
3 |clear__canvas_width|
4 |set_const__canvas_width__400| canvas_width:400
5 |clear__canvas_height, canvas_height| clear__canvas_height:4294967295
6 |clear__canvas_height|
7 |set_const__canvas_height__400| canvas_height:400
8 |clear__ball_radius, ball_radius| clear__ball_radius:4294967295
9 |clear__ball_radius|
10 |set_const__ball_radius__6| ball_radius:6
capitalex's Avatar

capitalex / main.lua

0 likes
0 forks
3 files
Last active 2 years ago
1 local min, max, huge = math.min, math.max, math.huge
2 local machine = {}
3
4 machine.counters = {
5 ["x:3"] = 0,
6 ["x:27"] = 1,
7 ["1"] = 0,
8 ["2"] = 0,
9 ["copy x to @number"] = 0,
10 ["print number"] = 0,
capitalex's Avatar

capitalex / zz.generated.lua

0 likes
0 forks
2 files
Last active 2 years ago
1 local min, max, huge = math.min, math.max, math.huge
2 machine.counters = {
3 ["hailstone"] = 1,
4 ["x:27"] = 1,
5 }
6 function match(counters)
7 if counters["x:6"] > 0 then
8 acc = counters["x:6"]
9 counters["x:6"] = max(counters["x:6"] - acc, 0)
10 counters["x"] = counters["x"] + acc * 6
capitalex's Avatar

capitalex / cups-bytecode-interpreter.nv

0 likes
0 forks
1 files
Last active 2 years ago
1 |move instruction pointer|
2 @instruction pointer
3
4 |fetch next instruction|
5 @decode instruction
6
7 |@current instruction is halt|
8
9 |@current instruction is inc|
10 , @increment source register
june's Avatar

june / Output.

0 likes
0 forks
2 files
Last active 2 years ago
An example of writing values out.
1 |#| constant, @io-write-out, 33
2 |#| constant, @io-write-out, 10
3
4 |!| @io-write-out:33
5 |newline| @io-write-out:10
6 |write| @io-write
7
8 ||start
9 |start|
10 write, !,
yumaikas's Avatar

yumaikas / bouncing_ball.nv

0 likes
1 forks
1 files
Last active 2 years ago
1 ||start
2 |clear__canvas_width, canvas_width| clear__canvas_width:4294967295
3 |clear__canvas_width|
4 |set_const__canvas_width__400| canvas_width:400
5 |clear__canvas_height, canvas_height| clear__canvas_height:4294967295
6 |clear__canvas_height|
7 |set_const__canvas_height__400| canvas_height:400
8 |clear__ball_radius, ball_radius| clear__ball_radius:4294967295
9 |clear__ball_radius|
10 |set_const__ball_radius__6| ball_radius:6
Newer Older

Powered by Opengist ⋅ Load: 281ms⋅

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