Skip to content

Instantly share code, notes, and snippets.

View rcrdlbl's full-sized avatar
🙃
"computer"

rcrdlbl

🙃
"computer"
View GitHub Profile
@rcrdlbl
rcrdlbl / random-cards.hoon
Created August 30, 2019 15:32
Hoon Club Week 6
:: Both of these are pretty bad; the second one seems nicer in theory but gives a nest-fail
::
:: number 1
::
!:
:- %say
|= [[* eny=@uvJ *] [x=@ud y=@ud ~] ~]
:- %noun
=< =~ make-decks
(make-set [eny=eny x=x y=y])
@rcrdlbl
rcrdlbl / random-cards.hoon
Last active August 19, 2019 23:58
Random Cards Broken Code
!:
:- %say
|= [[* eny=@uvJ *] [x=@ud y=@ud ~] ~]
:- %noun
=< =~ make-decks
(make-set [eny=eny x=x y=y])
==
|%
++ make-decks
|_ result=@ud
@rcrdlbl
rcrdlbl / goldbach-conjecture.hoon
Created August 12, 2019 21:52
Hoon School Week 5
:: Creates a gate that takes any atom, called n
::
|= n=@
:: Runs the goldbach arm with n as the subject
::
=< (goldbach n)
:: Declares a new core,
::
|%
:: with an arm called prime.
@rcrdlbl
rcrdlbl / fizzbuzz.hoon
Created August 5, 2019 15:17
Function submitted as part of hoon school week four
:: Run this with 1.000 as a sample in your dojo, of course
::
|= s=@ud
=/ n=@ (dec s)
=/ c=@ 0
|-
?: =(n 1) c
?: ?| =(0 (mod n 3))
=(0 (mod n 5))
==
@rcrdlbl
rcrdlbl / week-three.hoon
Created July 29, 2019 06:43
Hoon 101 Week 3 Submission
:: Part One
::
:: A gate that takes n, an unsigned decimal
::
|= n=@ud
:: Declares T, an unsigned decimal and combines it with 1 (this essentially sets t to 1 on the first run)
::
=/ t=@ud 1
:: |- changes the recursion point of $ from the start of the gate to the line |- is on
::
@rcrdlbl
rcrdlbl / cell-or-atom.hoon
Created July 19, 2019 02:08
Week 2 assignment for Hoon 101
|= a=*
?@ a
?: =(0 (mod a 2))
"Even"
"Odd"
"Cell"
@rcrdlbl
rcrdlbl / switch-aura.hoon
Created July 11, 2019 21:05
Changes any atom into a pronounceable string
|= a=@
`@p`a
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
### Keybase proof
I hereby claim:
* I am rcrdlbl on github.
* I am moldbug (https://keybase.io/moldbug) on keybase.
* I have a public key ASA5hzjmHn5YAPrdctqBgQbqgtWTwHmkRFKR74g-enWFFwo
To claim this, I am signing this object: