Skip to content

Instantly share code, notes, and snippets.

@tacryt-socryp
Last active May 23, 2023 14:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tacryt-socryp/3161eca2819ea9de2895d14204919546 to your computer and use it in GitHub Desktop.
Save tacryt-socryp/3161eca2819ea9de2895d14204919546 to your computer and use it in GitHub Desktop.
!.
=> ~ =>
|%
++ add
|= [a=@ b=@]
^- @
?: =(0 a) b
$(a (dec a), b +(b))
::
++ sub
|= [a=@ b=@]
^- @
?: =(0 b) a
$(a (dec a), b (dec b))
::
++ dec
|= a=@
?< =(0 a)
=+ b=0
|- ^- @
?: =(a +(b)) b
$(b +(b))
::
++ lth
|= [a=@ b=@]
^- ?
?& !=(a b)
|-
?| =(0 a)
?& !=(0 b)
$(a (dec a), b (dec b))
== == ==
--
|= number=@
(add number 48)
/+ birthday
!.
=/ core
!=
=> ~ =>
|%
+$ card (cask)
++ cask |$ [a] (pair mark a)
+$ knot @ta
++ list |$ [item] $@(~ [i=item t=(list item)])
+$ mark @tas
+$ ovum [=wire =card]
++ pair |$ [head tail] [p=head q=tail]
+$ path (list knot)
+$ wire path
--
=>
|%
+$ state
$: birthday=*
age=@
default-state
==
::
+$ default-state
$: lac=? :: verbosity flag
who=@p :: identity
eny=@uvJ :: entropy
==
--
::
=>
|_ state
++ load !!
++ peek _~
++ wish !!
++ poke
|= [now=@da ovo=ovum]
^- [effects=* arvo=*]
|^
?+ p.card.ovo
~> %slog.[0 p.card.ovo]
[~ ..poke]
::
%verb `..poke(lac ?@(q.card.ovo !lac +.q.card.ovo))
%wack `..poke(eny q.card.ovo)
%whom `..poke(who q.card.ovo)
::
%birthday
~> %slog.[0 p.card.ovo]
[~ ..poke(birthday q.card.ovo)]
::
%age
~> %slog.[0 p.card.ovo]
[~ ..poke(age q.card.ovo)]
::
%party
=/ party (slum birthday age)
~> %slog.[0 party]
:- ~
%= ..poke
age .+(age)
==
::
%belt
(poke [*@da / %party ~])
==
::
++ slum
|= [gat=* sam=*]
^- *
.*([gat sam] [%9 2 %10 [6 %0 3] %0 2])
--
--
::
|= [now=@da ovo=ovum]
^- *
.(+> +:(poke now ovo))
::
|%
::
:: aeon: arvo lifecycle loop
++ aeon
^- *
=> :: arvo: bootstrapped kernel
:: epic: remainder of event log
*[arvo=* epic=*]
!=
|- ^- *
?@ epic arvo
%= $
epic +.epic
arvo .*([arvo -.epic] [%9 2 %10 [6 %0 3] %0 2])
==
--
::
:+ %pill
::
:: name of pill
%toddler
:_ [kernel-events=~ userspace-events=~]
::
:: list of boot events
:~ aeon
.*(0 core)
[*@da / %birthday birthday]
[*@da / %age 2]
[*@da / %party ~]
==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment