Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

Registrarse

Iniciar sesión


Todos Nuevo Registrarse Iniciar sesión
's Avatar

capitalex

Unido 2 years ago

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado
Todos los gists 126 Bifurcado 1
capitalex's Avatar

capitalex / map.nv

0 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
2 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
3 archivos
Última actividad 10 months 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 gustos
0 bifurcaciones
1 archivos
Última actividad 11 months 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))
capitalex's Avatar

capitalex / novaweb-nova.nv

0 gustos
0 bifurcaciones
2 archivos
Última actividad 11 months ago
1 ^^
2 ~entry point~ "
3 @@@ Import Python core libraries @@@
4 @@@ Set up PyGame @@@
5 @@@ Set up NFC @@@
6 @@@ The implementation of a Nova parser @@@
7 @@@ The implementation of a Nova interpreter @@@
8 @@@ The built-in modules @@@
9 @@@ Let's include a REPL @@@
10 @@@ Finally, the main program @@@
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 325ms⋅

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