Všechno Nové

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

Registrovat

Přihlásit se


Všechno Nové Registrovat Přihlásit se

Všechny gisty

Nedávno Vytvořeno
Nejméně nedávno Vytvořeno
Nedávno Aktualizováno
Nejméně nedávno Aktualizováno
june's Avatar

june / Objects

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1 month ago
An example of objects.
1 ||'@include' (https://gist.casuallyblue.dev/wryl/d3c64c1df98e48cbaff3b3dcdc189e3f/raw/HEAD/map.nv lib/rpn.nv)
2
3 |::(/* */)|
4 |::(/* $x)| :: /*
5 ||::(
6 /* Now we can add comments to what we are doing. */
7 /*
8 .. but maybe not too many?
9 */
10 )
capitalex's Avatar

capitalex / DOESNT Fibonacci

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1 month ago
An implementation of the fibonacci in DOESNT by Floozutter
1 give a < > b
2 unless
3 [ , b , c , < , > , ]
4 , a a !! , a c !! , a < !! , a ] !!
5 , a b b , a b ] ;
6
7 give < c b
8 unless
9 [ , b , c , < , > , ]
10 , a a !! , a b !! , a c !! , a ] !!
capitalex's Avatar

capitalex / coroutines.ml

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1 month ago
1 open Effect
2 open Effect.Deep
3
4 type _ Effect.t += Yield : unit t
5
6 type status =
7 | Complete
8 | Suspended of (unit, status) continuation
9
10 let start (f : unit -> unit) : status =
june's Avatar

june / Tiling WM Draft

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1 month ago
The start of a tiling WM.
1 |:: focus on node $n :focus: $|
2 :: ensure node $n exists
3 :focus: $n
4 |:: focus on node $n|
5 :: ensure node $n exists
6 :focus: $n
7
8 ||:nodes: root horizontal
9 |:: create a node under root :unique ID: $x?|
10 :: go to the next unique ID
mary's Avatar

mary / scheduler.nv

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1 month ago
1 |:#############: Scheduler input and config :#############: |
2
3 || :cycle size: 10
4
5 ||
6 :: Start from 0 and step by 1000 milliseconds
7 :schedule: Task1 for 1
8 :schedule: Task2 for 2
9 :schedule: Task3 for 3
10 :schedule: ThreeSecondTask for 3
capitalex's Avatar

capitalex / update_grid.ml

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1 month ago
1 let update_grid () =
2 let next_grid = empty_grid () in
3 for y = 0 to 9 do
4 for x = 0 to 9 do
5 next_grid.(y).(x) <- next_state x y
6 done
7 done;
8 grid := next_grid ;;
capitalex's Avatar

capitalex / ribbons.ml

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
1 type open_ribbon = [`Open of int]
2 type looped_ribbon = [`Looped]
3 type ribbon =
4 [
5 | `Open of int
6 | `Looped
7 ]
8
9 let tie a b : ribbon =
10 match a, b with
capitalex's Avatar

capitalex / snarl.factor

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
1 ! Copyright (C) 2023 and Null
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 / joyful.ml

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
1 (*
2 1 2 + print-int
3 *)
4
5 let rec skip_whitespace chars =
6 let open Seq in
7 match chars () with
8 | Cons (' ', rest) | Cons ('\t', rest) | Cons ('\n', rest) ->
9 skip_whitespace rest
10 | _ ->
capitalex's Avatar

capitalex / properties.ml

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
1 module Univ = struct
2 type t = ..
3 let id =
4 let id = ref 0 in
5 fun () ->
6 incr id ;
7 !id
8
9 module Embed (M : sig type t end) = struct
10 type t += E of M.t
Novější Starší

Vytvořeno pomocí Opengist ⋅ Load: 195ms⋅

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