Skip to content

Instantly share code, notes, and snippets.

=< ~/(%en-json |=(a=json `cord`(rap 3 (flop (onto a ~)))))
~% %json ..part ~ !.
|%
++ onto
~/ %onto
|= [val=json out=(list @t)]
^+ out
?~ val ['null' out]
?- -.val
%a
@joemfb
joemfb / bad-text.log
Created March 16, 2018 00:03
%bad-text in :talk
[ %bad-text
\/"[32 32 99 97 110 32 115 117 98 115 99 114 105 98 101 32 116 111 32 114 101 115 117 108 116 115 32 111 102 32 97 32 98 117 105 108 100 46 32 70 111 114 100 32 116 114 97 99 10\/
7 115 32 116 104 101 32 114 101 115 117 108 116 32 111 102 32 97 32 226 128 156 108 105 118 101 226 128 157 32 98 117 105 108 100 32 99 111 110 115 105 115 116 105 110 103 32
111 102 32 97 32 115 116 97 116 105 99 32 115 99 104 101 109 97 116 105 99 32 97 110 100 32 116 104 101 32 101 118 101 114 45 99 104 97 110 103 105 110 103 32 99 117 114 114 1
01 110 116 32 100 97 116 101 46 32 87 104 101 110 101 118 101 114 32 116 104 105 115 32 108 105 118 101 32 98 117 105 108 100 226 0]"
\/ \/
]
[ ! /~master-morzod/home/0/app/hood:<[116 3].[117 21]>
! /~master-morzod/home/0/app/hood:<[117 3].[117 21]>
! /~master-morzod/home/0/app/hood:<[
@joemfb
joemfb / urbit_asan.txt
Created January 8, 2018 22:38
asan errors in jets.c
$ bin/urbit -FI ~zod rnewzod
~
urbit 0.5.1
urbit: home is rnewzod
core limit: Invalid argument
loom: mapped 2048MB
protected loom
live: loaded: MB/93.077.504
=================================================================
==67559==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000109c8a7b8 at pc 0x000109a58630 bp 0x7fff561d8430 sp 0x7fff561d8428
@joemfb
joemfb / dip.hoon
Created July 20, 2017 05:23
testing ;~ expansions
!: :- %say |= * :- %noun
=/ one
|*({a/gate b/gate} [;~(a b) b])
=/ two
|* {a/gate b/gate c/gate}
:- ;~(a b c)
|* arg/*
(a (b arg) c(,.+6 arg))
@joemfb
joemfb / natural-runes.md
Last active July 19, 2017 03:41
Hoon natural runes
  • =* / :aka
  • .+ / :bump
  • ^~ / :burn
  • != / :code
  • |% / :core
  • .? / :deep
  • !! / :fail
  • ?= / :fits
  • $hand (internal)
  • ~&gt; / :hint
::
:: super simple console app
::
/? 314
/+ sole
[. sole]
!:
|_ {bow/bowl $~}
::
++ poke
@joemfb
joemfb / string-srch.hoon
Last active June 28, 2016 00:23
brute force and KMP string search
:: brute force and KMP string search
:: arms accessible in dojo after /+ string-srch
:: try test:string-srch
::
:::: /hoon/string-srch/lib
::
/? 314
!:
:::: ~novlen-hanweb
::
{
"intros": [
"Just write some Hoon that",
"Just compose Nock formulas that",
"Just use Arvo to"
],
"ships": [
"~zod",
"~fyr",
"~ped",
:- %say
|= {{@da eny/@uvI beak} $~ $~}
:- %tang =< (to-tang (easy))
|%
++ to-tang
|= l/(list tape)
^- tang
%- flop %+ turn l
|=(t/tape ^-(tank [%leaf t]))
++ dlists $:
~novlen-hanweb@ grants that it's a little heavy-handed
--------------| for '=' /urbit-meta
--------------| --met ~tanpem-rolnul-danneb-hoslyt--socnyl-figteg-fotlev-datben
--------------| for '=' /urbit-meta
--------------| --met ~bolryl-niddem-poctyv-sapwep--fogsur-tornux-fotlev-datben
-------[12.955]
~lavbyr_datben* now anyone can be a _dotben!
~haclud_malfep= looks pretty good to me
~lavbyr_datben deploys an audience fix
~haptem-fopnys= why are people's audiences messed up