├── .gitattributes ├── .gitignore ├── .travis.yml ├── Makefile ├── README.markdown ├── Spec ├── flw.txt └── nock │ └── 5.txt ├── debian ├── .gitignore ├── changelog ├── compat ├── control ├── copyright ├── docs ├── rules └── source │ └── format ├── extras ├── extras_README ├── hoon-mode.el │ └── hoon-mode.el └── hoon.vim │ ├── ftdetect │ └── hoonfiletype.vim │ ├── ftplugin │ └── hoon.vim │ ├── indent │ └── hoon.vim │ └── syntax │ └── hoon.vim ├── f ├── bail.c ├── benx.c ├── cash.c ├── chad.c ├── coal.c ├── dash.c ├── hevn.c ├── host.c ├── loom.c ├── meme.c ├── nash.c ├── nock.c ├── rail.c ├── shed.c ├── trac.c ├── unix.c └── wire.c ├── gen164 ├── 1 │ ├── add.c │ ├── dec.c │ ├── div.c │ ├── gte.c │ ├── gth.c │ ├── lte.c │ ├── lth.c │ ├── mod.c │ ├── mul.c │ └── sub.c ├── 2 │ ├── bind.c │ ├── clap.c │ ├── drop.c │ ├── flop.c │ ├── lent.c │ ├── levy.c │ ├── lien.c │ ├── need.c │ ├── reel.c │ ├── roll.c │ ├── scag.c │ ├── skim.c │ ├── skip.c │ ├── slag.c │ ├── snag.c │ ├── sort.c │ ├── turn.c │ └── weld.c ├── 3 │ ├── bex.c │ ├── can.c │ ├── cap.c │ ├── cat.c │ ├── con.c │ ├── cut.c │ ├── dis.c │ ├── dor.c │ ├── end.c │ ├── gor.c │ ├── hor.c │ ├── lsh.c │ ├── mas.c │ ├── met.c │ ├── mix.c │ ├── mug.c │ ├── peg.c │ ├── po.c │ ├── rap.c │ ├── rip.c │ ├── rsh.c │ └── vor.c ├── 4 │ ├── by.c │ ├── by_gas.c │ ├── by_get.c │ ├── by_has.c │ ├── by_int.c │ ├── by_put.c │ ├── by_uni.c │ ├── in.c │ ├── in_gas.c │ ├── in_has.c │ ├── in_int.c │ ├── in_mer.c │ ├── in_put.c │ ├── in_tap.c │ └── in_uni.c ├── 5 │ ├── aesc.c │ ├── co.c │ ├── co_emco.c │ ├── co_oxco.c │ ├── co_roco.c │ ├── cue.c │ ├── ed.c │ ├── ed_puck.c │ ├── ed_sign.c │ ├── ed_veri.c │ ├── jam.c │ ├── lore.c │ ├── loss.c │ ├── mat.c │ ├── mink.c │ ├── mule.c │ ├── parse.c │ ├── rd.c │ ├── repg.c │ ├── rexp.c │ ├── rub.c │ ├── shax.c │ ├── tape.c │ └── trip.c ├── 6 │ ├── al.c │ ├── ap.c │ ├── bull.c │ ├── cell.c │ ├── comb.c │ ├── cons.c │ ├── core.c │ ├── cube.c │ ├── face.c │ ├── fine.c │ ├── fitz.c │ ├── flan.c │ ├── flay.c │ ├── flip.c │ ├── flor.c │ ├── fork.c │ ├── hike.c │ ├── look.c │ ├── slot.c │ ├── spec.c │ ├── type.c │ ├── ut.c │ ├── ut_burn.c │ ├── ut_busk.c │ ├── ut_bust.c │ ├── ut_conk.c │ ├── ut_crop.c │ ├── ut_cull.c │ ├── ut_find.c │ ├── ut_fink.c │ ├── ut_fire.c │ ├── ut_firm.c │ ├── ut_fish.c │ ├── ut_fuse.c │ ├── ut_gain.c │ ├── ut_heal.c │ ├── ut_lose.c │ ├── ut_mint.c │ ├── ut_moot.c │ ├── ut_mull.c │ ├── ut_nest.c │ ├── ut_park.c │ ├── ut_peek.c │ ├── ut_play.c │ ├── ut_repo.c │ ├── ut_rest.c │ ├── ut_seek.c │ ├── ut_sift.c │ ├── ut_swab.c │ ├── ut_tack.c │ ├── ut_tock.c │ └── ut_wrap.c ├── pit.h └── watt.c ├── include ├── all.h ├── c │ ├── comd.h │ ├── defs.h │ ├── motes.h │ ├── portable.h │ ├── tune.h │ └── types.h ├── f │ ├── arvo.h │ ├── bail.h │ ├── benx.h │ ├── cash.h │ ├── chad.h │ ├── coal.h │ ├── dash.h │ ├── funj.h │ ├── hevn.h │ ├── host.h │ ├── loom.h │ ├── meme.h │ ├── nash.h │ ├── nock.h │ ├── rail.h │ ├── shed.h │ ├── trac.h │ ├── unix.h │ └── wire.h └── v │ └── vere.h ├── outside ├── anachronism │ ├── .gitignore │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── doc │ │ ├── channels.md │ │ └── parser.png │ ├── include │ │ └── anachronism │ │ │ ├── common.h │ │ │ ├── nvt.h │ │ │ └── parser.h │ └── src │ │ ├── README.md │ │ ├── nvt.c │ │ ├── parser.c │ │ ├── parser.rl │ │ └── parser_common.rl ├── bpt │ ├── bitmapped_patricia_tree.c │ └── bitmapped_patricia_tree.h ├── cre2 │ ├── share │ │ ├── doc │ │ │ └── cre2 │ │ │ │ ├── COPYING │ │ │ │ ├── LICENSE.re2 │ │ │ │ └── README │ │ └── info │ │ │ ├── cre2.info │ │ │ └── dir │ └── src │ │ ├── .gitignore │ │ ├── COPYING │ │ ├── INSTALL │ │ ├── LICENSE.re2 │ │ ├── Makefile.am │ │ ├── README │ │ ├── autogen.sh │ │ ├── build.sh │ │ ├── clean.sh │ │ ├── configure.ac │ │ ├── configure.sh │ │ ├── doc │ │ ├── cre2.texi │ │ └── fdl-1.3.texi │ │ ├── prepare.sh │ │ ├── src │ │ ├── cre2.cpp │ │ └── cre2.h │ │ └── tests │ │ ├── test-consume-match.c │ │ ├── test-easy-matching.c │ │ ├── test-find-and-consume-match.c │ │ ├── test-full-match.c │ │ ├── test-matching.c │ │ ├── test-misc.c │ │ ├── test-options.c │ │ ├── test-partial-match.c │ │ ├── test-replace.c │ │ ├── test-rex-alloc.c │ │ └── test-version.c ├── ed25519 │ ├── .gitignore │ ├── Makefile │ ├── readme.md │ ├── src │ │ ├── add_scalar.c │ │ ├── ed25519.h │ │ ├── fe.c │ │ ├── fe.h │ │ ├── fixedint.h │ │ ├── ge.c │ │ ├── ge.h │ │ ├── key_exchange.c │ │ ├── keypair.c │ │ ├── precomp_data.h │ │ ├── sc.c │ │ ├── sc.h │ │ ├── seed.c │ │ ├── sha512.c │ │ ├── sha512.h │ │ ├── sign.c │ │ └── verify.c │ └── test.c ├── jhttp │ ├── http_parser.c │ └── http_parser.h ├── libuv │ ├── .gitignore │ ├── .mailmap │ ├── AUTHORS │ ├── ChangeLog │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── build.mk │ ├── checksparse.sh │ ├── common.gypi │ ├── config-mingw.mk │ ├── config-unix.mk │ ├── gyp_uv.py │ ├── include │ │ ├── uv-private │ │ │ ├── ngx-queue.h │ │ │ ├── stdint-msvc2008.h │ │ │ ├── tree.h │ │ │ ├── uv-bsd.h │ │ │ ├── uv-darwin.h │ │ │ ├── uv-linux.h │ │ │ ├── uv-sunos.h │ │ │ ├── uv-unix.h │ │ │ └── uv-win.h │ │ └── uv.h │ ├── src │ │ ├── fs-poll.c │ │ ├── inet.c │ │ ├── unix │ │ │ ├── aix.c │ │ │ ├── async.c │ │ │ ├── core.c │ │ │ ├── cygwin.c │ │ │ ├── darwin-proctitle.c │ │ │ ├── darwin.c │ │ │ ├── dl.c │ │ │ ├── error.c │ │ │ ├── freebsd.c │ │ │ ├── fs.c │ │ │ ├── fsevents.c │ │ │ ├── getaddrinfo.c │ │ │ ├── internal.h │ │ │ ├── kqueue.c │ │ │ ├── linux-core.c │ │ │ ├── linux-inotify.c │ │ │ ├── linux-syscalls.c │ │ │ ├── linux-syscalls.h │ │ │ ├── loop-watcher.c │ │ │ ├── loop.c │ │ │ ├── netbsd.c │ │ │ ├── openbsd.c │ │ │ ├── pipe.c │ │ │ ├── poll.c │ │ │ ├── process.c │ │ │ ├── proctitle.c │ │ │ ├── signal.c │ │ │ ├── stream.c │ │ │ ├── sunos.c │ │ │ ├── tcp.c │ │ │ ├── thread.c │ │ │ ├── threadpool.c │ │ │ ├── timer.c │ │ │ ├── tty.c │ │ │ ├── udp.c │ │ │ └── uv-dtrace.d │ │ ├── uv-common.c │ │ ├── uv-common.h │ │ ├── version.c │ │ └── win │ │ │ ├── async.c │ │ │ ├── atomicops-inl.h │ │ │ ├── core.c │ │ │ ├── dl.c │ │ │ ├── error.c │ │ │ ├── fs-event.c │ │ │ ├── fs.c │ │ │ ├── getaddrinfo.c │ │ │ ├── handle-inl.h │ │ │ ├── handle.c │ │ │ ├── internal.h │ │ │ ├── loop-watcher.c │ │ │ ├── pipe.c │ │ │ ├── poll.c │ │ │ ├── process-stdio.c │ │ │ ├── process.c │ │ │ ├── req-inl.h │ │ │ ├── req.c │ │ │ ├── signal.c │ │ │ ├── stream-inl.h │ │ │ ├── stream.c │ │ │ ├── tcp.c │ │ │ ├── thread.c │ │ │ ├── threadpool.c │ │ │ ├── timer.c │ │ │ ├── tty.c │ │ │ ├── udp.c │ │ │ ├── util.c │ │ │ ├── winapi.c │ │ │ ├── winapi.h │ │ │ ├── winsock.c │ │ │ └── winsock.h │ ├── test │ │ ├── benchmark-async-pummel.c │ │ ├── benchmark-async.c │ │ ├── benchmark-fs-stat.c │ │ ├── benchmark-getaddrinfo.c │ │ ├── benchmark-list.h │ │ ├── benchmark-loop-count.c │ │ ├── benchmark-million-async.c │ │ ├── benchmark-million-timers.c │ │ ├── benchmark-multi-accept.c │ │ ├── benchmark-ping-pongs.c │ │ ├── benchmark-pound.c │ │ ├── benchmark-pump.c │ │ ├── benchmark-sizes.c │ │ ├── benchmark-spawn.c │ │ ├── benchmark-tcp-write-batch.c │ │ ├── benchmark-thread.c │ │ ├── benchmark-udp-pummel.c │ │ ├── blackhole-server.c │ │ ├── dns-server.c │ │ ├── echo-server.c │ │ ├── fixtures │ │ │ ├── empty_file │ │ │ └── load_error.node │ │ ├── run-benchmarks.c │ │ ├── run-tests.c │ │ ├── runner-unix.c │ │ ├── runner-unix.h │ │ ├── runner-win.c │ │ ├── runner-win.h │ │ ├── runner.c │ │ ├── runner.h │ │ ├── task.h │ │ ├── test-active.c │ │ ├── test-async.c │ │ ├── test-barrier.c │ │ ├── test-callback-order.c │ │ ├── test-callback-stack.c │ │ ├── test-condvar.c │ │ ├── test-connection-fail.c │ │ ├── test-cwd-and-chdir.c │ │ ├── test-delayed-accept.c │ │ ├── test-dlerror.c │ │ ├── test-embed.c │ │ ├── test-emfile.c │ │ ├── test-error.c │ │ ├── test-fail-always.c │ │ ├── test-fs-event.c │ │ ├── test-fs-poll.c │ │ ├── test-fs.c │ │ ├── test-get-currentexe.c │ │ ├── test-get-loadavg.c │ │ ├── test-get-memory.c │ │ ├── test-getaddrinfo.c │ │ ├── test-getsockname.c │ │ ├── test-hrtime.c │ │ ├── test-idle.c │ │ ├── test-ipc-send-recv.c │ │ ├── test-ipc.c │ │ ├── test-list.h │ │ ├── test-loop-handles.c │ │ ├── test-loop-stop.c │ │ ├── test-multiple-listen.c │ │ ├── test-mutexes.c │ │ ├── test-osx-select.c │ │ ├── test-pass-always.c │ │ ├── test-ping-pong.c │ │ ├── test-pipe-bind-error.c │ │ ├── test-pipe-connect-error.c │ │ ├── test-pipe-server-close.c │ │ ├── test-platform-output.c │ │ ├── test-poll-close.c │ │ ├── test-poll.c │ │ ├── test-process-title.c │ │ ├── test-ref.c │ │ ├── test-run-nowait.c │ │ ├── test-run-once.c │ │ ├── test-semaphore.c │ │ ├── test-shutdown-close.c │ │ ├── test-shutdown-eof.c │ │ ├── test-shutdown-twice.c │ │ ├── test-signal-multiple-loops.c │ │ ├── test-signal.c │ │ ├── test-spawn.c │ │ ├── test-stdio-over-pipes.c │ │ ├── test-tcp-bind-error.c │ │ ├── test-tcp-bind6-error.c │ │ ├── test-tcp-close-accept.c │ │ ├── test-tcp-close-while-connecting.c │ │ ├── test-tcp-close.c │ │ ├── test-tcp-connect-error-after-write.c │ │ ├── test-tcp-connect-error.c │ │ ├── test-tcp-connect-timeout.c │ │ ├── test-tcp-connect6-error.c │ │ ├── test-tcp-flags.c │ │ ├── test-tcp-open.c │ │ ├── test-tcp-read-stop.c │ │ ├── test-tcp-shutdown-after-write.c │ │ ├── test-tcp-unexpected-read.c │ │ ├── test-tcp-write-to-half-open-connection.c │ │ ├── test-tcp-writealot.c │ │ ├── test-thread.c │ │ ├── test-threadpool-cancel.c │ │ ├── test-threadpool.c │ │ ├── test-timer-again.c │ │ ├── test-timer-from-check.c │ │ ├── test-timer.c │ │ ├── test-tty.c │ │ ├── test-udp-dgram-too-big.c │ │ ├── test-udp-ipv6.c │ │ ├── test-udp-multicast-join.c │ │ ├── test-udp-multicast-ttl.c │ │ ├── test-udp-open.c │ │ ├── test-udp-options.c │ │ ├── test-udp-send-and-recv.c │ │ ├── test-util.c │ │ ├── test-walk-handles.c │ │ └── test-watcher-cross-stop.c │ ├── uv.gyp │ └── vcbuild.bat └── re2 │ ├── .hgignore │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── benchlog │ ├── benchlog.c2 │ ├── benchlog.mini │ ├── benchlog.r70 │ ├── benchlog.wreck │ └── mktable │ ├── doc │ ├── README.xkcd │ ├── mksyntaxgo │ ├── mksyntaxhtml │ ├── mksyntaxwiki │ ├── syntax.html │ ├── syntax.txt │ └── xkcd.png │ ├── lib │ └── codereview │ │ ├── codereview.cfg │ │ └── codereview.py │ ├── libre2.symbols │ ├── libre2.symbols.darwin │ ├── re2 │ ├── Makefile │ ├── bitstate.cc │ ├── compile.cc │ ├── dfa.cc │ ├── filtered_re2.cc │ ├── filtered_re2.h │ ├── make_perl_groups.pl │ ├── make_unicode_casefold.py │ ├── make_unicode_groups.py │ ├── mimics_pcre.cc │ ├── nfa.cc │ ├── onepass.cc │ ├── parse.cc │ ├── perl_groups.cc │ ├── prefilter.cc │ ├── prefilter.h │ ├── prefilter_tree.cc │ ├── prefilter_tree.h │ ├── prog.cc │ ├── prog.h │ ├── re2.cc │ ├── re2.h │ ├── regexp.cc │ ├── regexp.h │ ├── set.cc │ ├── set.h │ ├── simplify.cc │ ├── stringpiece.h │ ├── testing │ │ ├── backtrack.cc │ │ ├── charclass_test.cc │ │ ├── compile_test.cc │ │ ├── dfa_test.cc │ │ ├── dump.cc │ │ ├── exhaustive1_test.cc │ │ ├── exhaustive2_test.cc │ │ ├── exhaustive3_test.cc │ │ ├── exhaustive_test.cc │ │ ├── exhaustive_tester.cc │ │ ├── exhaustive_tester.h │ │ ├── filtered_re2_test.cc │ │ ├── mimics_pcre_test.cc │ │ ├── null_walker.cc │ │ ├── parse_test.cc │ │ ├── possible_match_test.cc │ │ ├── random_test.cc │ │ ├── re2_arg_test.cc │ │ ├── re2_test.cc │ │ ├── regexp_benchmark.cc │ │ ├── regexp_generator.cc │ │ ├── regexp_generator.h │ │ ├── regexp_test.cc │ │ ├── required_prefix_test.cc │ │ ├── search_test.cc │ │ ├── set_test.cc │ │ ├── simplify_test.cc │ │ ├── string_generator.cc │ │ ├── string_generator.h │ │ ├── string_generator_test.cc │ │ ├── tester.cc │ │ ├── tester.h │ │ └── unicode_test.py │ ├── tostring.cc │ ├── unicode.py │ ├── unicode_casefold.cc │ ├── unicode_casefold.h │ ├── unicode_groups.cc │ ├── unicode_groups.h │ ├── variadic_function.h │ └── walker-inl.h │ ├── runtests │ ├── testinstall.cc │ ├── ucs2.diff │ └── util │ ├── arena.cc │ ├── arena.h │ ├── atomicops.h │ ├── benchmark.cc │ ├── benchmark.h │ ├── flags.h │ ├── hash.cc │ ├── logging.h │ ├── mutex.h │ ├── pcre.cc │ ├── pcre.h │ ├── random.cc │ ├── random.h │ ├── rune.cc │ ├── sparse_array.h │ ├── sparse_array_test.cc │ ├── sparse_set.h │ ├── stringpiece.cc │ ├── stringprintf.cc │ ├── strutil.cc │ ├── test.cc │ ├── test.h │ ├── thread.cc │ ├── thread.h │ ├── utf.h │ ├── util.h │ ├── valgrind.cc │ └── valgrind.h ├── urb ├── urbit.pill └── zod │ ├── arvo │ ├── ames.hoon │ ├── batz.hoon │ ├── clay.hoon │ ├── dill.hoon │ ├── eyre.hoon │ ├── ford.hoon │ ├── gall.hoon │ ├── hoon.hoon │ ├── test.hoon │ └── zuse.hoon │ ├── main │ ├── app │ │ ├── a-twit │ │ │ ├── core.hook │ │ │ ├── main.css │ │ │ ├── main.js │ │ │ └── twit.json │ │ ├── chat │ │ │ └── core.hook │ │ ├── demo │ │ │ └── core.hook │ │ ├── radio │ │ │ └── core.hook │ │ └── twit │ │ │ ├── app.js │ │ │ ├── core.hook │ │ │ ├── front │ │ │ └── hymn.hook │ │ │ ├── style.css │ │ │ └── twit.json │ ├── bin │ │ ├── autobegin.hoon │ │ ├── bang.hoon │ │ ├── begin.hoon │ │ ├── cat.hoon │ │ ├── cd.hoon │ │ ├── chat.hoon │ │ ├── cp.hoon │ │ ├── diff.hoon │ │ ├── echo.hoon │ │ ├── env.hoon │ │ ├── haus.hoon │ │ ├── hello.hoon │ │ ├── hi.hoon │ │ ├── into.hoon │ │ ├── label.hoon │ │ ├── ls.hoon │ │ ├── mv.hoon │ │ ├── none.hoon │ │ ├── pope.hoon │ │ ├── ram.hoon │ │ ├── rat.hoon │ │ ├── reboot.hoon │ │ ├── reload.hoon │ │ ├── report.hoon │ │ ├── reset.hoon │ │ ├── rm.hoon │ │ ├── secret.hoon │ │ ├── set.hoon │ │ ├── solid.hoon │ │ ├── sys.hoon │ │ ├── thumb.hoon │ │ ├── ticket.hoon │ │ ├── tree.hoon │ │ ├── type.hoon │ │ ├── update.hoon │ │ ├── verb.hoon │ │ ├── wipe.hoon │ │ ├── with.hoon │ │ └── ye.hoon │ ├── lib │ │ ├── chat.hoon │ │ ├── example │ │ │ └── core.hook │ │ ├── hume.hoon │ │ ├── pony.hoon │ │ ├── twitter │ │ │ └── core.hook │ │ └── urb.js │ ├── mar │ │ ├── css │ │ │ └── door.hook │ │ ├── down │ │ │ └── door.hook │ │ ├── hook │ │ │ └── door.hook │ │ ├── html │ │ │ └── door.hook │ │ ├── hymn │ │ │ └── door.hook │ │ ├── js │ │ │ └── door.hook │ │ ├── json │ │ │ └── door.hook │ │ ├── md │ │ │ └── door.hook │ │ ├── mime │ │ │ └── door.hook │ │ ├── psal │ │ │ └── door.hook │ │ ├── user │ │ │ └── door.hook │ │ ├── users │ │ │ └── door.hook │ │ ├── zing │ │ │ └── door.hook │ │ ├── zong │ │ │ └── door.hook │ │ ├── zongs │ │ │ └── door.hook │ │ └── zung │ │ │ └── door.hook │ ├── pub │ │ ├── fab │ │ │ ├── fun │ │ │ │ ├── five │ │ │ │ │ └── hymn.hook │ │ │ │ ├── four │ │ │ │ │ └── hymn.hook │ │ │ │ ├── one.md │ │ │ │ ├── three │ │ │ │ │ └── hymn.hook │ │ │ │ └── two │ │ │ │ │ └── down.hook │ │ │ ├── mad │ │ │ │ ├── five │ │ │ │ │ └── down.hook │ │ │ │ ├── four │ │ │ │ │ └── hymn.hook │ │ │ │ ├── one │ │ │ │ │ └── hymn.hook │ │ │ │ ├── res │ │ │ │ │ ├── bible │ │ │ │ │ │ ├── 1.html │ │ │ │ │ │ ├── 2.html │ │ │ │ │ │ ├── 3.html │ │ │ │ │ │ └── 4.html │ │ │ │ │ └── hello │ │ │ │ │ │ └── hymn.hook │ │ │ │ ├── six │ │ │ │ │ └── hymn.hook │ │ │ │ ├── three │ │ │ │ │ └── hymn.hook │ │ │ │ └── two │ │ │ │ │ └── hymn.hook │ │ │ └── site │ │ │ │ ├── hymn.hook │ │ │ │ ├── ref │ │ │ │ ├── foreword │ │ │ │ │ └── hymn.hook │ │ │ │ ├── vol0 │ │ │ │ │ └── hymn.hook │ │ │ │ ├── vol1 │ │ │ │ │ └── hymn.hook │ │ │ │ ├── vol2 │ │ │ │ │ └── hymn.hook │ │ │ │ ├── vol3 │ │ │ │ │ └── hymn.hook │ │ │ │ └── vol4 │ │ │ │ │ └── hymn.hook │ │ │ │ ├── styles.css │ │ │ │ └── tut │ │ │ │ ├── arvo1 │ │ │ │ └── hymn.hook │ │ │ │ ├── arvo2 │ │ │ │ └── hymn.hook │ │ │ │ ├── arvo3 │ │ │ │ └── hymn.hook │ │ │ │ ├── arvo4 │ │ │ │ └── hymn.hook │ │ │ │ ├── arvo5 │ │ │ │ └── hymn.hook │ │ │ │ ├── demo │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon1 │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon2 │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon3 │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon4 │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon5 │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon6 │ │ │ │ └── hymn.hook │ │ │ │ ├── hoon7 │ │ │ │ └── hymn.hook │ │ │ │ ├── nock1 │ │ │ │ └── hymn.hook │ │ │ │ ├── nock2 │ │ │ │ └── hymn.hook │ │ │ │ ├── nock3 │ │ │ │ └── hymn.hook │ │ │ │ └── setup │ │ │ │ └── hymn.hook │ │ └── src │ │ │ ├── doc │ │ │ ├── begin │ │ │ │ ├── banner.txt │ │ │ │ ├── entropy.txt │ │ │ │ ├── govt.txt │ │ │ │ ├── identity.txt │ │ │ │ ├── language.txt │ │ │ │ ├── location.txt │ │ │ │ ├── name.txt │ │ │ │ ├── person.txt │ │ │ │ ├── ship.txt │ │ │ │ ├── ticket.txt │ │ │ │ └── warning.txt │ │ │ ├── chat │ │ │ │ └── help.txt │ │ │ ├── ref │ │ │ │ └── vol │ │ │ │ │ ├── 2 │ │ │ │ │ ├── a.md │ │ │ │ │ ├── b.md │ │ │ │ │ ├── c.md │ │ │ │ │ ├── d │ │ │ │ │ │ ├── A.md │ │ │ │ │ │ ├── B.md │ │ │ │ │ │ ├── C.md │ │ │ │ │ │ └── D.md │ │ │ │ │ ├── e │ │ │ │ │ │ ├── A.md │ │ │ │ │ │ ├── B.md │ │ │ │ │ │ ├── C.md │ │ │ │ │ │ ├── E.md │ │ │ │ │ │ ├── F.md │ │ │ │ │ │ ├── G.md │ │ │ │ │ │ ├── H.md │ │ │ │ │ │ ├── I.md │ │ │ │ │ │ ├── J.md │ │ │ │ │ │ ├── K.md │ │ │ │ │ │ ├── L.md │ │ │ │ │ │ ├── M.md │ │ │ │ │ │ ├── N.md │ │ │ │ │ │ ├── O.md │ │ │ │ │ │ ├── P.md │ │ │ │ │ │ ├── W.md │ │ │ │ │ │ ├── X.md │ │ │ │ │ │ ├── Y.md │ │ │ │ │ │ └── Z.md │ │ │ │ │ └── f │ │ │ │ │ │ ├── A.md │ │ │ │ │ │ ├── B.md │ │ │ │ │ │ ├── C.md │ │ │ │ │ │ └── D.md │ │ │ │ │ ├── 3 │ │ │ │ │ ├── a.md │ │ │ │ │ └── b.md │ │ │ │ │ ├── 4 │ │ │ │ │ ├── a.md │ │ │ │ │ ├── b.md │ │ │ │ │ ├── c.md │ │ │ │ │ ├── d.md │ │ │ │ │ ├── e.md │ │ │ │ │ ├── f.md │ │ │ │ │ └── g.md │ │ │ │ │ ├── 0.md │ │ │ │ │ ├── 1.md │ │ │ │ │ ├── 4.md │ │ │ │ │ ├── index.md │ │ │ │ │ └── nock.md │ │ │ └── say │ │ │ │ ├── arvo │ │ │ │ ├── 1.md │ │ │ │ ├── 2.md │ │ │ │ ├── app.md │ │ │ │ ├── pub2.md │ │ │ │ └── pub3.md │ │ │ │ ├── hoon │ │ │ │ ├── 1.md │ │ │ │ ├── 2.md │ │ │ │ ├── 3.md │ │ │ │ ├── 4.md │ │ │ │ ├── 5.md │ │ │ │ ├── 6.md │ │ │ │ └── 7.md │ │ │ │ ├── intro.md │ │ │ │ ├── nock │ │ │ │ ├── 1.md │ │ │ │ ├── 2.md │ │ │ │ └── 3.md │ │ │ │ └── setup.md │ │ │ └── mad │ │ │ ├── fib.hoon │ │ │ └── tools │ │ │ └── fib.hoon │ └── sur │ │ ├── down │ │ └── gate.hook │ │ ├── foobar │ │ └── gate.hook │ │ ├── markdown │ │ └── core.hook │ │ ├── mess │ │ └── gate.hook │ │ ├── user │ │ └── gate.hook │ │ ├── users │ │ └── gate.hook │ │ ├── wand │ │ └── gate.hook │ │ ├── zing │ │ └── gate.hook │ │ ├── zong │ │ └── gate.hook │ │ └── zung │ │ └── gate.hook │ ├── spec │ └── nock │ │ └── 5.txt │ └── try │ ├── bin │ ├── aesde.hoon │ ├── aesen.hoon │ ├── aestest.hoon │ ├── app.hoon │ ├── bootque.hoon │ ├── curl.hoon │ ├── curve.hoon │ ├── def.hoon │ ├── edpk.hoon │ ├── edsi.hoon │ ├── edtest.hoon │ ├── edve.hoon │ ├── fib.hoon │ ├── flopp.hoon │ ├── fptest.hoon │ ├── game.hoon │ ├── gen.hoon │ ├── goodbye.hoon │ ├── honk.hoon │ ├── infinite.hoon │ ├── klay.hoon │ ├── markdown.hoon │ ├── memory.hoon │ ├── merge.hoon │ ├── nock.hoon │ ├── nonk.hoon │ ├── overflow.hoon │ ├── pars.hoon │ ├── poxo.hoon │ ├── pque.hoon │ ├── reverse.hoon │ ├── revert.hoon │ ├── show.hoon │ ├── sleep.hoon │ ├── tiff.hoon │ ├── till.hoon │ ├── toy.hoon │ ├── twit.hoon │ ├── write.hoon │ └── zero.hoon │ ├── doc │ ├── ed.test │ └── ireg.md │ ├── lib │ ├── cryo.hoon │ ├── diff.hoon │ └── markdown.hoon │ ├── syn │ ├── fun │ │ └── goodbye │ │ │ └── html.hoon │ └── web │ │ ├── c.md │ │ ├── complete │ │ └── htmn.hoon │ │ ├── dev.md │ │ ├── goodbye │ │ └── html.hoon │ │ ├── hello.html │ │ ├── hello │ │ └── html.hoon │ │ ├── mark.md │ │ ├── screw.html │ │ ├── screw.txt │ │ ├── screw │ │ └── txt.hoon │ │ ├── simple │ │ └── htmn.hoon │ │ └── template │ │ └── htmn.hoon │ ├── sys │ ├── hoon │ │ └── ref │ │ │ └── gate.hoon │ ├── html │ │ ├── ref │ │ │ └── gate.hoon │ │ └── tan │ │ │ └── mime │ │ │ └── gate.hoon │ └── md │ │ ├── ref │ │ └── gate.hoon │ │ └── tan │ │ ├── html │ │ └── gate.hoon │ │ └── mime │ │ └── gate.hoon │ ├── tan │ ├── css │ │ └── mime.hoon │ ├── html │ │ └── mime.hoon │ ├── htmn │ │ └── html.hoon │ ├── md │ │ └── html.hoon │ └── txt │ │ └── html.hoon │ └── web │ ├── game │ └── fun.hoon │ ├── public │ └── css │ │ ├── hyde.css │ │ ├── poole.css │ │ └── syntax.css │ └── test.md ├── urbit.spec └── v ├── ames.c ├── batz.c ├── cttp.c ├── http.c ├── loop.c ├── main.c ├── raft.c ├── reck.c ├── save.c ├── sist.c ├── term.c ├── time.c ├── unix.c └── walk.c /.gitattributes: -------------------------------------------------------------------------------- 1 | /urb/urbit.pill binary 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | .DS_Store 3 | /bin/vere 4 | /urb/*/ 5 | !/urb/zod/ 6 | /outside/re2/obj 7 | /inst 8 | /vere.pkg 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | compiler: 4 | - gcc 5 | - clang 6 | 7 | before_install: 8 | - sudo apt-get update -qq 9 | - sudo apt-get install -qq libgmp3-dev libsigsegv-dev openssl libssl-dev libncurses5-dev git make exuberant-ctags 10 | 11 | before_script: 12 | - echo "export URBIT_HOME=`pwd`/urb" >>~/.bash_profile 13 | - make 14 | 15 | script: "make" 16 | 17 | notifications: 18 | on_success: change 19 | on_failure: always 20 | -------------------------------------------------------------------------------- /Spec/nock/5.txt: -------------------------------------------------------------------------------- 1 | A noun is an atom or a cell. 2 | An atom is a natural number. 3 | A cell is an ordered pair of nouns. 4 | 5 | nock(a) *a 6 | [a b c] [a [b c]] 7 | 8 | ?[a b] 0 9 | ?a 1 10 | +[a b] +[a b] 11 | +a 1 + a 12 | =[a a] 0 13 | =[a b] 1 14 | =a =a 15 | 16 | /[1 a] a 17 | /[2 a b] a 18 | /[3 a b] b 19 | /[(a + a) b] /[2 /[a b]] 20 | /[(a + a + 1) b] /[3 /[a b]] 21 | /a /a 22 | 23 | *[a [b c] d] [*[a b c] *[a d]] 24 | 25 | *[a 0 b] /[b a] 26 | *[a 1 b] b 27 | *[a 2 b c] *[*[a b] *[a c]] 28 | *[a 3 b] ?*[a b] 29 | *[a 4 b] +*[a b] 30 | *[a 5 b] =*[a b] 31 | 32 | *[a 6 b c d] *[a 2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b] 33 | *[a 7 b c] *[a 2 b 1 c] 34 | *[a 8 b c] *[a 7 [[7 [0 1] b] 0 1] c] 35 | *[a 9 b c] *[a 7 c 2 [0 1] 0 b] 36 | *[a 10 [b c] d] *[a 8 c 7 [0 3] d] 37 | *[a 10 b c] *[a c] 38 | 39 | *a *a 40 | -------------------------------------------------------------------------------- /debian/.gitignore: -------------------------------------------------------------------------------- 1 | urbit/ 2 | urbit.debhelper.log 3 | urbit.substvars 4 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | urbit (0.2-1) unstable; urgency=low 2 | 3 | * Initial release 4 | 5 | -- Urbit Wed, 21 May 2014 15:12:49 -0700 6 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: urbit 2 | Section: unknown 3 | Priority: extra 4 | Maintainer: Urbit 5 | Build-Depends: debhelper (>= 8.0.0), libssl-dev, libncurses5-dev, libgmp-dev, libsigsegv-dev, ragel 6 | Standards-Version: 3.9.3 7 | Homepage: http://urbit.org/ 8 | 9 | Package: urbit 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, ${misc:Depends} 12 | Description: Urbit 13 | The Urbit virtual machine and supporting files. 14 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: urbit 3 | Source: 4 | 5 | Files: * 6 | License: Public domain 7 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README.markdown 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | export DH_VERBOSE=1 11 | export DH_OPTIONS=-v 12 | %: 13 | dh $@ 14 | override_dh_auto_build: 15 | dh_auto_build -- debbuild 16 | override_dh_auto_install: 17 | make debinstall DESTDIR=debian/urbit 18 | override_dh_installinfo: 19 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /extras/extras_README: -------------------------------------------------------------------------------- 1 | Extras Readme 2 | 3 | This folder is for all the useful, but not strictly essential, stuff for developers. 4 | -------------------------------------------------------------------------------- /extras/hoon.vim/ftdetect/hoonfiletype.vim: -------------------------------------------------------------------------------- 1 | au BufNewfile,BufEnter *.hoon setf hoon 2 | 3 | -------------------------------------------------------------------------------- /extras/hoon.vim/indent/hoon.vim: -------------------------------------------------------------------------------- 1 | " Public Domain 2 | " Credit Goes to fode 3 | " 4 | " With contributions from Philip C Monk 5 | 6 | if exists("b:did_indent") 7 | finish 8 | endif 9 | 10 | let b:did_indent = 1 11 | 12 | 13 | setlocal indentexpr=HoonIndent(v:lnum) 14 | setlocal nolisp 15 | setlocal autoindent 16 | 17 | if exists("*HoonIndent") 18 | finish 19 | endif 20 | 21 | function! HoonIndent(lnum) 22 | let prevlnum = prevnonblank(a:lnum-1) 23 | if prevlnum == 0 24 | return 0 25 | endif 26 | let prevl = substitute(getline(prevlnum),'::.*$','','') 27 | 28 | let ind = indent(prevlnum) 29 | if prevl =~ '++\s*\w*\s*$' 30 | " luslus operator 31 | let ind += &sw 32 | endif 33 | 34 | return ind 35 | endfunction 36 | 37 | -------------------------------------------------------------------------------- /f/hevn.c: -------------------------------------------------------------------------------- 1 | /* f/hevn.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | 7 | /* u2_hv_init(): initialize state. 8 | */ 9 | u2_ray 10 | u2_hv_init(u2_ray wir_r) 11 | { 12 | u2_ray hev_r = u2_rl_ralloc(wir_r, c3_wiseof(u2_loom_hevn)); 13 | 14 | u2_hevx_be(hev_r, u2_pryr, god) = 0; 15 | u2_hevx_at(hev_r, lad) = 0; 16 | 17 | return hev_r; 18 | } 19 | 20 | /* u2_hv_mark(): mark heaven for gc. 21 | */ 22 | c3_w 23 | u2_hv_mark(void) 24 | { 25 | return u2_rl_gc_mark_noun(u2_Wire, u2_hevn_at(lad)); 26 | } 27 | -------------------------------------------------------------------------------- /gen164/1/add.c: -------------------------------------------------------------------------------- 1 | /* j/1/add.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, add)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | 17 | u2_mp(a_mp, a); 18 | u2_mp(b_mp, b); 19 | 20 | mpz_add(a_mp, a_mp, b_mp); 21 | mpz_clear(b_mp); 22 | 23 | return u2_rl_mp(wir_r, a_mp); 24 | } 25 | u2_weak // transfer 26 | j2_mb(Pt1, add)(u2_wire wir_r, 27 | u2_noun cor) // retain 28 | { 29 | u2_noun a, b; 30 | 31 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 32 | (u2_no == u2_stud(a)) || 33 | (u2_no == u2_stud(b)) ) 34 | { 35 | return u2_bl_bail(wir_r, c3__exit); 36 | } else { 37 | return j2_mbc(Pt1, add)(wir_r, a, b); 38 | } 39 | } 40 | 41 | /* structures 42 | */ 43 | u2_ho_jet 44 | j2_mbj(Pt1, add)[] = { 45 | { ".2", c3__lite, j2_mb(Pt1, add), u2_jet_live, u2_none, u2_none }, 46 | { } 47 | }; 48 | -------------------------------------------------------------------------------- /gen164/1/div.c: -------------------------------------------------------------------------------- 1 | /* j/1/div.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, div)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | if ( _0 == b ) { 16 | return u2_bl_bail(wir_r, c3__exit); 17 | } 18 | else { 19 | mpz_t a_mp, b_mp; 20 | 21 | u2_mp(a_mp, a); 22 | u2_mp(b_mp, b); 23 | 24 | mpz_tdiv_q(a_mp, a_mp, b_mp); 25 | mpz_clear(b_mp); 26 | 27 | return u2_rl_mp(wir_r, a_mp); 28 | } 29 | } 30 | u2_weak // transfer 31 | j2_mb(Pt1, div)(u2_wire wir_r, 32 | u2_noun cor) // retain 33 | { 34 | u2_noun a, b; 35 | 36 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 37 | (u2_no == u2_stud(a)) || 38 | (u2_no == u2_stud(b)) ) 39 | { 40 | return u2_bl_bail(wir_r, c3__exit); 41 | } else { 42 | return j2_mbc(Pt1, div)(wir_r, a, b); 43 | } 44 | } 45 | 46 | /* structures 47 | */ 48 | u2_ho_jet 49 | j2_mbj(Pt1, div)[] = { 50 | { ".2", c3__lite, j2_mb(Pt1, div), u2_jet_live, u2_none, u2_none }, 51 | { } 52 | }; 53 | -------------------------------------------------------------------------------- /gen164/1/gte.c: -------------------------------------------------------------------------------- 1 | /* j/1/gte.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, gte)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | u2_bean cmp; 17 | 18 | u2_mp(a_mp, a); 19 | u2_mp(b_mp, b); 20 | 21 | cmp = (mpz_cmp(a_mp, b_mp) >= 0) ? u2_yes : u2_no; 22 | 23 | mpz_clear(a_mp); 24 | mpz_clear(b_mp); 25 | 26 | return cmp; 27 | } 28 | u2_weak // transfer 29 | j2_mb(Pt1, gte)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 35 | (u2_no == u2_stud(a)) || 36 | (u2_no == u2_stud(b)) ) 37 | { 38 | return u2_bl_bail(wir_r, c3__exit); 39 | } else { 40 | return j2_mbc(Pt1, gte)(wir_r, a, b); 41 | } 42 | } 43 | 44 | /* structures 45 | */ 46 | u2_ho_jet 47 | j2_mbj(Pt1, gte)[] = { 48 | { ".2", c3__lite, j2_mb(Pt1, gte), Tier1, u2_none, u2_none }, 49 | { } 50 | }; 51 | -------------------------------------------------------------------------------- /gen164/1/gth.c: -------------------------------------------------------------------------------- 1 | /* j/1/gth.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, gth)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | u2_bean cmp; 17 | 18 | u2_mp(a_mp, a); 19 | u2_mp(b_mp, b); 20 | 21 | cmp = (mpz_cmp(a_mp, b_mp) > 0) ? u2_yes : u2_no; 22 | 23 | mpz_clear(a_mp); 24 | mpz_clear(b_mp); 25 | 26 | return cmp; 27 | } 28 | u2_weak // transfer 29 | j2_mb(Pt1, gth)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 35 | (u2_no == u2_stud(a)) || 36 | (u2_no == u2_stud(b)) ) 37 | { 38 | return u2_bl_bail(wir_r, c3__exit); 39 | } else { 40 | return j2_mbc(Pt1, gth)(wir_r, a, b); 41 | } 42 | } 43 | 44 | /* structures 45 | */ 46 | u2_ho_jet 47 | j2_mbj(Pt1, gth)[] = { 48 | { ".2", c3__lite, j2_mb(Pt1, gth), Tier1, u2_none, u2_none }, 49 | { } 50 | }; 51 | -------------------------------------------------------------------------------- /gen164/1/lte.c: -------------------------------------------------------------------------------- 1 | /* j/1/lte.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, lte)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | u2_bean cmp; 17 | 18 | u2_mp(a_mp, a); 19 | u2_mp(b_mp, b); 20 | 21 | cmp = (mpz_cmp(a_mp, b_mp) <= 0) ? u2_yes : u2_no; 22 | 23 | mpz_clear(a_mp); 24 | mpz_clear(b_mp); 25 | 26 | return cmp; 27 | } 28 | u2_weak // transfer 29 | j2_mb(Pt1, lte)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 35 | (u2_no == u2_stud(a)) || 36 | (u2_no == u2_stud(b)) ) 37 | { 38 | return u2_bl_bail(wir_r, c3__exit); 39 | } else { 40 | return j2_mbc(Pt1, lte)(wir_r, a, b); 41 | } 42 | } 43 | 44 | /* structures 45 | */ 46 | u2_ho_jet 47 | j2_mbj(Pt1, lte)[] = { 48 | { ".2", c3__lite, j2_mb(Pt1, lte), Tier1, u2_none, u2_none }, 49 | { } 50 | }; 51 | -------------------------------------------------------------------------------- /gen164/1/lth.c: -------------------------------------------------------------------------------- 1 | /* j/1/lth.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, lth)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | u2_bean cmp; 17 | 18 | u2_mp(a_mp, a); 19 | u2_mp(b_mp, b); 20 | 21 | cmp = (mpz_cmp(a_mp, b_mp) < 0) ? u2_yes : u2_no; 22 | 23 | mpz_clear(a_mp); 24 | mpz_clear(b_mp); 25 | 26 | return cmp; 27 | } 28 | u2_weak // transfer 29 | j2_mb(Pt1, lth)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 35 | (u2_no == u2_stud(a)) || 36 | (u2_no == u2_stud(b)) ) 37 | { 38 | return u2_bl_bail(wir_r, c3__exit); 39 | } else { 40 | return j2_mbc(Pt1, lth)(wir_r, a, b); 41 | } 42 | } 43 | 44 | /* structures 45 | */ 46 | u2_ho_jet 47 | j2_mbj(Pt1, lth)[] = { 48 | { ".2", c3__lite, j2_mb(Pt1, lth), Tier1, u2_none, u2_none }, 49 | { } 50 | }; 51 | -------------------------------------------------------------------------------- /gen164/1/mod.c: -------------------------------------------------------------------------------- 1 | /* j/1/mod.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, mod)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | if ( _0 == b ) { 16 | return u2_bl_bail(wir_r, c3__exit); 17 | } else { 18 | mpz_t a_mp, b_mp; 19 | 20 | u2_mp(a_mp, a); 21 | u2_mp(b_mp, b); 22 | 23 | mpz_tdiv_r(a_mp, a_mp, b_mp); 24 | mpz_clear(b_mp); 25 | 26 | return u2_rl_mp(wir_r, a_mp); 27 | } 28 | } 29 | u2_weak // transfer 30 | j2_mb(Pt1, mod)(u2_wire wir_r, 31 | u2_noun cor) // retain 32 | { 33 | u2_noun a, b; 34 | 35 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 36 | (u2_no == u2_stud(a)) || 37 | (u2_no == u2_stud(b)) ) 38 | { 39 | return u2_bl_bail(wir_r, c3__exit); 40 | } else { 41 | return j2_mbc(Pt1, mod)(wir_r, a, b); 42 | } 43 | } 44 | 45 | /* structures 46 | */ 47 | u2_ho_jet 48 | j2_mbj(Pt1, mod)[] = { 49 | { ".2", c3__lite, j2_mb(Pt1, mod), Tier1, u2_none, u2_none }, 50 | { } 51 | }; 52 | -------------------------------------------------------------------------------- /gen164/1/mul.c: -------------------------------------------------------------------------------- 1 | /* j/1/mul.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, mul)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | 17 | u2_mp(a_mp, a); 18 | u2_mp(b_mp, b); 19 | 20 | mpz_mul(a_mp, a_mp, b_mp); 21 | mpz_clear(b_mp); 22 | 23 | return u2_rl_mp(wir_r, a_mp); 24 | } 25 | u2_weak // transfer 26 | j2_mb(Pt1, mul)(u2_wire wir_r, 27 | u2_noun cor) // retain 28 | { 29 | u2_noun a, b; 30 | 31 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 32 | (u2_no == u2_stud(a)) || 33 | (u2_no == u2_stud(b)) ) 34 | { 35 | return u2_bl_bail(wir_r, c3__exit); 36 | } else { 37 | return j2_mbc(Pt1, mul)(wir_r, a, b); 38 | } 39 | } 40 | 41 | /* structures 42 | */ 43 | u2_ho_jet 44 | j2_mbj(Pt1, mul)[] = { 45 | { ".2", c3__lite, j2_mb(Pt1, mul), u2_jet_live, u2_none, u2_none }, 46 | { } 47 | }; 48 | 49 | -------------------------------------------------------------------------------- /gen164/1/sub.c: -------------------------------------------------------------------------------- 1 | /* j/1/sub.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt1, sub)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | mpz_t a_mp, b_mp; 16 | 17 | u2_mp(a_mp, a); 18 | u2_mp(b_mp, b); 19 | 20 | if ( mpz_cmp(a_mp, b_mp) < 0 ) { 21 | mpz_clear(a_mp); 22 | mpz_clear(b_mp); 23 | 24 | return u2_bl_error(wir_r, "subtract-underflow"); 25 | } 26 | mpz_sub(a_mp, a_mp, b_mp); 27 | mpz_clear(b_mp); 28 | 29 | return u2_rl_mp(wir_r, a_mp); 30 | } 31 | u2_weak // transfer 32 | j2_mb(Pt1, sub)(u2_wire wir_r, 33 | u2_noun cor) // retain 34 | { 35 | u2_noun a, b; 36 | 37 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 38 | (u2_no == u2_stud(a)) || 39 | (u2_no == u2_stud(b)) ) 40 | { 41 | return u2_bl_bail(wir_r, c3__exit); 42 | } else { 43 | return j2_mbc(Pt1, sub)(wir_r, a, b); 44 | } 45 | } 46 | 47 | /* structures 48 | */ 49 | u2_ho_jet 50 | j2_mbj(Pt1, sub)[] = { 51 | { ".2", c3__lite, j2_mb(Pt1, sub), u2_jet_live, u2_none, u2_none }, 52 | { } 53 | }; 54 | -------------------------------------------------------------------------------- /gen164/2/bind.c: -------------------------------------------------------------------------------- 1 | /* j/2/bind.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, bind)(u2_wire wir_r, 12 | u2_noun a, // retain 13 | u2_noun b) // retain 14 | { 15 | if ( _0 == a ) { 16 | return _0; 17 | } else { 18 | return u2_ru(wir_r, u2_nk_mong(wir_r, b, u2_rx(wir_r, u2_st(a)))); 19 | } 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt2, bind)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun a, b; 26 | 27 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ) { 28 | return u2_bl_bail(wir_r, c3__exit); 29 | } else { 30 | return j2_mbc(Pt2, bind)(wir_r, a, b); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt2, bind)[] = { 38 | { ".2", c3__lite, j2_mb(Pt2, bind), Tier2, u2_none, u2_none }, 39 | { } 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /gen164/2/drop.c: -------------------------------------------------------------------------------- 1 | /* j/2/drop.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, drop)(u2_wire wir_r, 12 | u2_noun a) // retain 13 | { 14 | if ( _0 == a ) { 15 | return u2_nul; 16 | } 17 | else { 18 | return u2_ro(wir_r, u2_rx(wir_r, u2_st(a))); 19 | } 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt2, drop)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun a; 26 | 27 | if ( u2_none == (a = u2_frag(u2_cv_sam, cor)) ) { 28 | return u2_none; 29 | } else { 30 | return j2_mbc(Pt2, drop)(wir_r, a); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt2, drop)[] = { 38 | { ".2", c3__lite, j2_mb(Pt2, drop), Tier2, u2_none, u2_none }, 39 | { } 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /gen164/2/flop.c: -------------------------------------------------------------------------------- 1 | /* j/2/flop.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, flop)(u2_wire wir_r, 12 | u2_noun a) // retain 13 | { 14 | u2_weak b = _0; 15 | 16 | while ( 1 ) { 17 | if ( u2_nul == a ) { 18 | return b; 19 | } 20 | else if ( u2_no == u2_dust(a) ) { 21 | u2_rl_lose(wir_r, b); 22 | 23 | return u2_bl_bail(wir_r, c3__exit); 24 | } 25 | else { 26 | b = u2_rc(wir_r, u2_rx(wir_r, u2_h(a)), b); 27 | a = u2_t(a); 28 | } 29 | } 30 | } 31 | u2_weak // transfer 32 | j2_mb(Pt2, flop)(u2_wire wir_r, 33 | u2_noun cor) // retain 34 | { 35 | u2_noun a; 36 | 37 | if ( u2_none == (a = u2_frag(u2_cv_sam, cor)) ) { 38 | return u2_bl_bail(wir_r, c3__exit); 39 | } else { 40 | return j2_mbc(Pt2, flop)(wir_r, a); 41 | } 42 | } 43 | 44 | /* structures 45 | */ 46 | u2_ho_jet 47 | j2_mbj(Pt2, flop)[] = { 48 | { ".2", c3__lite, j2_mb(Pt2, flop), Tier2, u2_none, u2_none }, 49 | { } 50 | }; 51 | -------------------------------------------------------------------------------- /gen164/2/lent.c: -------------------------------------------------------------------------------- 1 | /* j/2/lent.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, lent)(u2_wire wir_r, 12 | u2_noun a) // retain 13 | { 14 | u2_weak len = _0; 15 | 16 | while ( 1 ) { 17 | if ( _0 == a ) { 18 | return len; 19 | } 20 | else if ( u2_no == u2_dust(a) ) { 21 | u2_rl_lose(wir_r, len); 22 | return u2_bl_bail(wir_r, c3__exit); 23 | } 24 | else { 25 | len = u2_rl_vint(wir_r, len); 26 | a = u2_t(a); 27 | } 28 | } 29 | } 30 | u2_noun 31 | j2_mb(Pt2, lent)(u2_wire wir_r, 32 | u2_noun cor) // retain 33 | { 34 | u2_noun a; 35 | 36 | if ( u2_none == (a = u2_frag(u2_cv_sam, cor)) ) { 37 | return u2_bl_bail(wir_r, c3__exit); 38 | } else { 39 | return j2_mbc(Pt2, lent)(wir_r, a); 40 | } 41 | } 42 | 43 | /* structures 44 | */ 45 | u2_ho_jet 46 | j2_mbj(Pt2, lent)[] = { 47 | { ".2", c3__lite, j2_mb(Pt2, lent), Tier2, u2_none, u2_none }, 48 | { } 49 | }; 50 | -------------------------------------------------------------------------------- /gen164/2/need.c: -------------------------------------------------------------------------------- 1 | /* j/2/need.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, need)(u2_wire wir_r, 12 | u2_noun a) // retain 13 | { 14 | if ( _0 == a ) { 15 | return u2_bl_bail(wir_r, c3__exit); 16 | } 17 | else { 18 | return u2_rx(wir_r, u2_st(a)); 19 | } 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt2, need)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun a; 26 | 27 | if ( u2_none == (a = u2_frag(u2_cv_sam, cor)) ) { 28 | return u2_bl_bail(wir_r, c3__exit); 29 | } else { 30 | return j2_mbc(Pt2, need)(wir_r, a); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt2, need)[] = { 38 | { ".2", c3__lite, j2_mb(Pt2, need), Tier2, u2_none, u2_none }, 39 | { } 40 | }; 41 | -------------------------------------------------------------------------------- /gen164/2/reel.c: -------------------------------------------------------------------------------- 1 | /* j/2/reel.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, reel)(u2_wire wir_r, 12 | u2_noun a, // retain 13 | u2_noun b) // retain 14 | { 15 | if ( _0 == a ) { 16 | return u2_rx(wir_r, u2_frag(u2_cv_sam_3, b)); 17 | } 18 | else if ( u2_no == u2_dust(a) ) { 19 | return u2_bl_bail(wir_r, c3__exit); 20 | } 21 | else { 22 | u2_weak gim = u2_rx(wir_r, u2_h(a)); 23 | u2_weak hur = j2_mbc(Pt2, reel)(wir_r, u2_t(a), b); 24 | 25 | return u2_nk_mong(wir_r, b, u2_rc(wir_r, gim, hur)); 26 | } 27 | } 28 | u2_noun // transfer 29 | j2_mb(Pt2, reel)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ) { 35 | return u2_bl_bail(wir_r, c3__exit); 36 | } else { 37 | return j2_mbc(Pt2, reel)(wir_r, a, b); 38 | } 39 | } 40 | 41 | /* structures 42 | */ 43 | u2_ho_jet 44 | j2_mbj(Pt2, reel)[] = { 45 | { ".2", c3__lite, j2_mb(Pt2, reel), Tier2, u2_none, u2_none }, 46 | { } 47 | }; 48 | 49 | -------------------------------------------------------------------------------- /gen164/2/slag.c: -------------------------------------------------------------------------------- 1 | /* j/2/slag.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, slag)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_noun b) // retain 14 | { 15 | if ( !u2_fly_is_cat(a) ) { 16 | return u2_bl_bail(wir_r, c3__fail); 17 | } 18 | else { 19 | c3_w len_w = a; 20 | 21 | while ( len_w ) { 22 | if ( u2_no == u2_dust(b) ) { 23 | return u2_nul; 24 | } 25 | b = u2_t(b); 26 | len_w--; 27 | } 28 | return u2_rx(wir_r, b); 29 | } 30 | } 31 | u2_noun // transfer 32 | j2_mb(Pt2, slag)(u2_wire wir_r, 33 | u2_noun cor) // retain 34 | { 35 | u2_noun a, b; 36 | 37 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 38 | (u2_no == u2_stud(a)) ) 39 | { 40 | return u2_bl_bail(wir_r, c3__exit); 41 | } else { 42 | return j2_mbc(Pt2, slag)(wir_r, a, b); 43 | } 44 | } 45 | 46 | /* structures 47 | */ 48 | u2_ho_jet 49 | j2_mbj(Pt2, slag)[] = { 50 | { ".2", c3__lite, j2_mb(Pt2, slag), Tier2, u2_none, u2_none }, 51 | { } 52 | }; 53 | -------------------------------------------------------------------------------- /gen164/2/sort.c: -------------------------------------------------------------------------------- 1 | /* j/2/sort.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, sort)(u2_wire wir_r, 12 | u2_noun a, // retain 13 | u2_noun b) // retain 14 | { 15 | // must think about 16 | // 17 | return u2_bl_bail(wir_r, c3__fail); 18 | } 19 | u2_noun // transfer 20 | j2_mb(Pt2, sort)(u2_wire wir_r, 21 | u2_noun cor) // retain 22 | { 23 | u2_noun a, b; 24 | 25 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ) { 26 | return u2_bl_bail(wir_r, c3__exit); 27 | } else { 28 | return j2_mbc(Pt2, sort)(wir_r, a, b); 29 | } 30 | } 31 | 32 | /* structures 33 | */ 34 | u2_ho_jet 35 | j2_mbj(Pt2, sort)[] = { 36 | { ".2", c3__lite, u2_jet_dead, Tier2, u2_none, u2_none }, 37 | { } 38 | }; 39 | -------------------------------------------------------------------------------- /gen164/2/turn.c: -------------------------------------------------------------------------------- 1 | /* j/2/turn.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, turn)(u2_wire wir_r, 12 | u2_noun a, // retain 13 | u2_noun b) // retain 14 | { 15 | if ( _0 == a ) { 16 | return a; 17 | } 18 | else if ( u2_no == u2_dust(a) ) { 19 | return u2_bl_bail(wir_r, c3__exit); 20 | } 21 | else { 22 | u2_noun one = u2_nk_mong(wir_r, b, u2_rx(wir_r, u2_h(a))); 23 | u2_noun two = j2_mbc(Pt2, turn)(wir_r, u2_t(a), b); 24 | 25 | return u2_rc(wir_r, one, two); 26 | } 27 | } 28 | u2_noun // transfer 29 | j2_mb(Pt2, turn)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ) { 35 | return u2_bl_bail(wir_r, c3__exit); 36 | } else { 37 | return j2_mbc(Pt2, turn)(wir_r, a, b); 38 | } 39 | } 40 | 41 | /* structures 42 | */ 43 | u2_ho_jet 44 | j2_mbj(Pt2, turn)[] = { 45 | { ".2", c3__lite, j2_mb(Pt2, turn), Tier2, u2_none, u2_none }, 46 | { } 47 | }; 48 | -------------------------------------------------------------------------------- /gen164/2/weld.c: -------------------------------------------------------------------------------- 1 | /* j/2/weld.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt2, weld)(u2_wire wir_r, 12 | u2_noun a, // retain 13 | u2_noun b) // retain 14 | { 15 | if ( _0 == a ) { 16 | return u2_rx(wir_r, b); 17 | } 18 | else if ( u2_no == u2_dust(a) ) { 19 | return u2_bl_bail(wir_r, c3__exit); 20 | } 21 | else { 22 | return u2_rc 23 | (wir_r, 24 | u2_rx(wir_r, u2_h(a)), 25 | j2_mbc(Pt2, weld)(wir_r, u2_t(a), b)); 26 | } 27 | } 28 | u2_noun // transfer 29 | j2_mb(Pt2, weld)(u2_wire wir_r, 30 | u2_noun cor) // retain 31 | { 32 | u2_noun a, b; 33 | 34 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ) { 35 | return u2_bl_bail(wir_r, c3__exit); 36 | } else { 37 | return j2_mbc(Pt2, weld)(wir_r, a, b); 38 | } 39 | } 40 | 41 | /* structures 42 | */ 43 | u2_ho_jet 44 | j2_mbj(Pt2, weld)[] = { 45 | { ".2", c3__lite, j2_mb(Pt2, weld), Tier2, u2_none, u2_none }, 46 | { } 47 | }; 48 | -------------------------------------------------------------------------------- /gen164/3/bex.c: -------------------------------------------------------------------------------- 1 | /* j/3/bex.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt3, bex)(u2_wire wir_r, 12 | u2_atom a) // retain 13 | { 14 | mpz_t a_mp; 15 | 16 | if ( !u2_fly_is_cat(a) ) { 17 | return u2_bl_bail(wir_r, c3__fail); 18 | } 19 | else { 20 | mpz_init_set_ui(a_mp, 1); 21 | mpz_mul_2exp(a_mp, a_mp, a); 22 | 23 | return u2_rl_mp(wir_r, a_mp); 24 | } 25 | } 26 | u2_weak // transfer 27 | j2_mb(Pt3, bex)(u2_wire wir_r, 28 | u2_noun cor) // retain 29 | { 30 | u2_noun a; 31 | 32 | if ( (u2_none == (a = u2_frag(u2_cv_sam, cor))) || 33 | (u2_no == u2_stud(a)) ) 34 | { 35 | return u2_bl_bail(wir_r, c3__exit); 36 | } else { 37 | return j2_mbc(Pt3, bex)(wir_r, a); 38 | } 39 | } 40 | 41 | /* structures 42 | */ 43 | u2_ho_jet 44 | j2_mbj(Pt3, bex)[] = { 45 | { ".2", c3__lite, j2_mb(Pt3, bex), Tier3, u2_none, u2_none }, 46 | { } 47 | }; 48 | -------------------------------------------------------------------------------- /gen164/3/cap.c: -------------------------------------------------------------------------------- 1 | /* j/3/cap.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt3, cap)(u2_wire wir_r, 12 | u2_atom a) // retain 13 | { 14 | c3_w met_w = u2_met(0, a); 15 | 16 | if ( met_w < 2 ) { 17 | return u2_bl_bail(wir_r, c3__exit); 18 | } 19 | else if ( (1 == u2_bit((met_w - 2), a)) ) { 20 | return _3; 21 | } else { 22 | return _2; 23 | } 24 | } 25 | u2_weak // transfer 26 | j2_mb(Pt3, cap)(u2_wire wir_r, 27 | u2_noun cor) // retain 28 | { 29 | u2_noun a; 30 | 31 | if ( (u2_none == (a = u2_frag(u2_cv_sam, cor))) || 32 | (u2_no == u2_stud(a)) ) 33 | { 34 | return u2_bl_bail(wir_r, c3__exit); 35 | } else { 36 | return j2_mbc(Pt3, cap)(wir_r, a); 37 | } 38 | } 39 | 40 | /* structures 41 | */ 42 | u2_ho_jet 43 | j2_mbj(Pt3, cap)[] = { 44 | { ".2", c3__lite, j2_mb(Pt3, cap), Tier3, u2_none, u2_none }, 45 | { } 46 | }; 47 | -------------------------------------------------------------------------------- /gen164/3/gor.c: -------------------------------------------------------------------------------- 1 | /* j/3/gor.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt3, gor)(u2_wire wir_r, 12 | u2_noun a, // retain 13 | u2_noun b) // retain 14 | { 15 | c3_w c_w = u2_mug(a); 16 | c3_w d_w = u2_mug(b); 17 | 18 | if ( c_w == d_w ) { 19 | return j2_mbc(Pt3, dor)(wir_r, a, b); 20 | } 21 | else return (c_w < d_w) ? u2_yes : u2_no; 22 | } 23 | u2_weak // transfer 24 | j2_mb(Pt3, gor)(u2_wire wir_r, 25 | u2_noun cor) // retain 26 | { 27 | u2_noun a, b; 28 | 29 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) ) { 30 | return u2_bl_bail(wir_r, c3__exit); 31 | } else { 32 | return j2_mbc(Pt3, gor)(wir_r, a, b); 33 | } 34 | } 35 | 36 | /* structures 37 | */ 38 | u2_ho_jet 39 | j2_mbj(Pt3, gor)[] = { 40 | { ".2", c3__lite, j2_mb(Pt3, gor), Tier3, u2_none, u2_none }, 41 | { } 42 | }; 43 | -------------------------------------------------------------------------------- /gen164/3/mas.c: -------------------------------------------------------------------------------- 1 | /* j/3/mas.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt3, mas)(u2_wire wir_r, 12 | u2_atom a) // retain 13 | { 14 | c3_w b_w; 15 | u2_atom c, d, e, f; 16 | 17 | b_w = u2_met(0, a); 18 | if ( b_w < 2 ) { 19 | return u2_bl_bail(wir_r, c3__exit); 20 | } 21 | else { 22 | c = j2_mbc(Pt3, bex)(wir_r, (b_w - 1)); 23 | d = j2_mbc(Pt3, bex)(wir_r, (b_w - 2)); 24 | e = j2_mbc(Pt1, sub)(wir_r, a, c); 25 | f = j2_mbc(Pt3, con)(wir_r, e, d); 26 | 27 | u2_rl_lose(wir_r, c); 28 | u2_rl_lose(wir_r, d); 29 | u2_rl_lose(wir_r, e); 30 | 31 | return f; 32 | } 33 | } 34 | u2_weak // transfer 35 | j2_mb(Pt3, mas)(u2_wire wir_r, 36 | u2_noun cor) // retain 37 | { 38 | u2_noun a; 39 | 40 | if ( (u2_none == (a = u2_frag(u2_cv_sam, cor))) || 41 | (u2_no == u2_stud(a)) ) 42 | { 43 | return u2_bl_bail(wir_r, c3__exit); 44 | } else { 45 | return j2_mbc(Pt3, mas)(wir_r, a); 46 | } 47 | } 48 | 49 | /* structures 50 | */ 51 | u2_ho_jet 52 | j2_mbj(Pt3, mas)[] = { 53 | { ".2", c3__lite, j2_mb(Pt3, mas), Tier3, u2_none, u2_none }, 54 | { } 55 | }; 56 | -------------------------------------------------------------------------------- /gen164/3/met.c: -------------------------------------------------------------------------------- 1 | /* j/3/met.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt3, met)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | if ( !u2_fly_is_cat(a) || (a >= 32) ) { 16 | if ( _0 == b ) { 17 | return _0; 18 | } else return _1; 19 | } 20 | else { 21 | c3_w met_w = u2_met(a, b); 22 | 23 | if ( !u2_fly_is_cat(met_w) ) { 24 | return u2_rl_words(wir_r, 1, &met_w); 25 | } 26 | else return u2_met(a, b); 27 | } 28 | } 29 | u2_weak // transfer 30 | j2_mb(Pt3, met)(u2_wire wir_r, 31 | u2_noun cor) // retain 32 | { 33 | u2_noun a, b; 34 | 35 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) || 36 | (u2_no == u2_stud(a)) || 37 | (u2_no == u2_stud(b)) ) 38 | { 39 | return u2_bl_bail(wir_r, c3__exit); 40 | } else { 41 | return j2_mbc(Pt3, met)(wir_r, a, b); 42 | } 43 | } 44 | 45 | /* structures 46 | */ 47 | u2_ho_jet 48 | j2_mbj(Pt3, met)[] = { 49 | { ".2", c3__lite, j2_mb(Pt3, met), Tier3, u2_none, u2_none }, 50 | { } 51 | }; 52 | -------------------------------------------------------------------------------- /gen164/3/mug.c: -------------------------------------------------------------------------------- 1 | /* j/3/mug.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mb(Pt3, mug)(u2_wire wir_r, 12 | u2_noun cor) // retain 13 | { 14 | u2_noun sam; 15 | 16 | if ( u2_none == (sam = u2_frag(u2_cv_sam, cor)) ) { 17 | return u2_bl_bail(wir_r, c3__exit); 18 | } else { 19 | return u2_mug(sam); 20 | } 21 | } 22 | 23 | /* structures 24 | */ 25 | u2_ho_jet 26 | j2_mbj(Pt3, mug)[] = { 27 | { ".2", c3__lite, j2_mb(Pt3, mug), Tier3, u2_none, u2_none }, 28 | { } 29 | }; 30 | -------------------------------------------------------------------------------- /gen164/3/vor.c: -------------------------------------------------------------------------------- 1 | /* j/3/vor.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_weak // transfer 11 | j2_mbc(Pt3, vor)(u2_wire wir_r, 12 | u2_atom a, // retain 13 | u2_atom b) // retain 14 | { 15 | c3_w c_w = u2_mug(u2_mug(a)); 16 | c3_w d_w = u2_mug(u2_mug(b)); 17 | 18 | if ( c_w == d_w ) { 19 | return j2_mbc(Pt3, dor)(wir_r, a, b); 20 | } 21 | else return (c_w < d_w) ? u2_yes : u2_no; 22 | } 23 | u2_weak // transfer 24 | j2_mb(Pt3, vor)(u2_wire wir_r, 25 | u2_noun cor) // retain 26 | { 27 | u2_noun a, b; 28 | 29 | if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0)) ) { 30 | return u2_bl_bail(wir_r, c3__exit); 31 | } else { 32 | return j2_mbc(Pt3, vor)(wir_r, a, b); 33 | } 34 | } 35 | 36 | /* structures 37 | */ 38 | u2_ho_jet 39 | j2_mbj(Pt3, vor)[] = { 40 | { ".2", c3__lite, j2_mb(Pt3, vor), Tier3, u2_none, u2_none }, 41 | { } 42 | }; 43 | -------------------------------------------------------------------------------- /gen164/4/by.c: -------------------------------------------------------------------------------- 1 | /* j/4/by.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* declarations 9 | */ 10 | extern u2_ho_jet j2_mcj(Pt4, by, gas)[]; 11 | extern u2_ho_jet j2_mcj(Pt4, by, get)[]; 12 | extern u2_ho_jet j2_mcj(Pt4, by, has)[]; 13 | extern u2_ho_jet j2_mcj(Pt4, by, int)[]; 14 | extern u2_ho_jet j2_mcj(Pt4, by, put)[]; 15 | extern u2_ho_jet j2_mcj(Pt4, by, uni)[]; 16 | 17 | /* structures 18 | */ 19 | u2_ho_driver 20 | j2_mbd(Pt4, by)[] = { 21 | { j2_sc(Pt4, by, gas), j2_mcj(Pt4, by, gas), 0, 0, u2_none }, 22 | { j2_sc(Pt4, by, get), j2_mcj(Pt4, by, get), 0, 0, u2_none }, 23 | { j2_sc(Pt4, by, has), j2_mcj(Pt4, by, has), 0, 0, u2_none }, 24 | { j2_sc(Pt4, by, int), j2_mcj(Pt4, by, int), 0, 0, u2_none }, 25 | { j2_sc(Pt4, by, put), j2_mcj(Pt4, by, put), 0, 0, u2_none }, 26 | { j2_sc(Pt4, by, uni), j2_mcj(Pt4, by, uni), 0, 0, u2_none }, 27 | {} 28 | }; 29 | 30 | u2_ho_driver 31 | j2_db(Pt4, by) = 32 | { j2_sb(Pt4, by), 0, j2_mbd(Pt4, by), 0, u2_none }; 33 | -------------------------------------------------------------------------------- /gen164/4/in.c: -------------------------------------------------------------------------------- 1 | /* j/4/in.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* declarations 9 | */ 10 | extern u2_ho_jet j2_mcj(Pt4, in, gas)[]; 11 | extern u2_ho_jet j2_mcj(Pt4, in, has)[]; 12 | extern u2_ho_jet j2_mcj(Pt4, in, mer)[]; 13 | extern u2_ho_jet j2_mcj(Pt4, in, int)[]; 14 | extern u2_ho_jet j2_mcj(Pt4, in, put)[]; 15 | extern u2_ho_jet j2_mcj(Pt4, in, tap)[]; 16 | extern u2_ho_jet j2_mcj(Pt4, in, uni)[]; 17 | 18 | /* structures 19 | */ 20 | u2_ho_driver 21 | j2_mbd(Pt4, in)[] = { 22 | { j2_sc(Pt4, in, gas), j2_mcj(Pt4, in, gas), 0, 0, u2_none }, 23 | { j2_sc(Pt4, in, has), j2_mcj(Pt4, in, has), 0, 0, u2_none }, 24 | { j2_sc(Pt4, in, mer), j2_mcj(Pt4, in, mer), 0, 0, u2_none }, 25 | { j2_sc(Pt4, in, int), j2_mcj(Pt4, in, int), 0, 0, u2_none }, 26 | { j2_sc(Pt4, in, put), j2_mcj(Pt4, in, put), 0, 0, u2_none }, 27 | { j2_sc(Pt4, in, tap), j2_mcj(Pt4, in, tap), 0, 0, u2_none }, 28 | { j2_sc(Pt4, in, uni), j2_mcj(Pt4, in, uni), 0, 0, u2_none }, 29 | {} 30 | }; 31 | 32 | u2_ho_jet 33 | j2_mbj(Pt4, in)[] = { 34 | { } 35 | }; 36 | 37 | u2_ho_driver 38 | j2_db(Pt4, in) = 39 | { j2_sb(Pt4, in), j2_mbj(Pt4, in), j2_mbd(Pt4, in), 0, u2_none }; 40 | -------------------------------------------------------------------------------- /gen164/5/co.c: -------------------------------------------------------------------------------- 1 | /* gen164/5/co.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* declarations 9 | */ 10 | extern u2_ho_jet j2_mdj(Pt5, coco, co, emco)[]; 11 | extern u2_ho_jet j2_mdj(Pt5, coco, co, oxco)[]; 12 | extern u2_ho_jet j2_mdj(Pt5, coco, co, roco)[]; 13 | 14 | u2_ho_driver 15 | j2_mcd(Pt5, coco, co)[] = { 16 | { j2_sd(Pt5, coco, co, emco), j2_mdj(Pt5, coco, co, emco), 0, 0, u2_none }, 17 | { j2_sd(Pt5, coco, co, oxco), j2_mdj(Pt5, coco, co, oxco), 0, 0, u2_none }, 18 | { j2_sd(Pt5, coco, co, roco), j2_mdj(Pt5, coco, co, roco), 0, 0, u2_none }, 19 | {} 20 | }; 21 | 22 | /* structures 23 | */ 24 | u2_ho_driver 25 | j2_mbd(Pt5, coco)[] = { 26 | { j2_sc(Pt5, coco, co), 0, j2_mcd(Pt5, coco, co), 0, u2_none }, 27 | {} 28 | }; 29 | -------------------------------------------------------------------------------- /gen164/5/co_emco.c: -------------------------------------------------------------------------------- 1 | /* gen164/5/co_emco.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | 9 | /* functions 10 | */ 11 | 12 | /* parameters 13 | [[bas=@ min=@] [par=$+([? @ tape] tape)]] 14 | */ 15 | 16 | u2_weak 17 | j2_md(Pt5, coco, co, emco)(u2_wire wir_r, 18 | u2_noun cor) 19 | { 20 | u2_atom bas, min; 21 | u2_noun rex; 22 | u2_noun par; 23 | u2_atom hol = 0; 24 | mpz_t bas_mp, dar_mp, hol_mp, rad_mp; 25 | 26 | if ( u2_no == u2_mean(cor, u2_cv_sam_4, &bas, 27 | u2_cv_sam_5, &min, 28 | u2_cv_sam_3, &par, 29 | u2_cv_sam_6, &rex, 30 | 0) ) 31 | { 32 | return u2_bl_bail(wir_r, c3__exit); 33 | } 34 | 35 | while ( 1 ) { 36 | if ( !hol && !min ) { 37 | return rex; 38 | } 39 | 40 | u2_mp(bas_mp, bas); 41 | u2_mp(hol_mp, hol); 42 | 43 | mpz_tdiv_q(rad_mp, hol_mp, bas_mp); 44 | mpz_tdiv_r(dar_mp, hol_mp, bas_mp); 45 | 46 | if ( min ) { 47 | min--; 48 | } 49 | 50 | u2_rl_mp(hol, dar_mp); 51 | 52 | // rex (par =(0 dar) rad rex) 53 | } 54 | } 55 | /* structures 56 | */ 57 | u2_ho_jet 58 | j2_mdj(Pt5, coco, co, emco)[] = { 59 | { ".2", c3__lite, j2_md(Pt5, coco, co, emco), u2_jet_dead, u2_none, u2_none }, 60 | { } 61 | }; 62 | -------------------------------------------------------------------------------- /gen164/5/co_oxco.c: -------------------------------------------------------------------------------- 1 | /* gen164/5/co_oxco.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | 9 | /* functions 10 | */ 11 | u2_weak 12 | j2_md(Pt5, coco, co, oxco)(u2_wire wir_r, 13 | u2_noun cor) 14 | { 15 | u2_atom bas, gop; 16 | u2_noun dug; 17 | if ( u2_no == u2_mean(cor, u2_cv_sam_4, &bas, 18 | u2_cv_sam_5, &gop, 19 | u2_cv_sam_3, &dug, 20 | 0) ) 21 | { 22 | return u2_bl_bail(wir_r, c3__exit); 23 | } 24 | 25 | return 0; 26 | } 27 | /* structures 28 | */ 29 | u2_ho_jet 30 | j2_mdj(Pt5, coco, co, oxco)[] = { 31 | { ".2", c3__lite, j2_md(Pt5, coco, co, oxco), u2_jet_dead, u2_none, u2_none }, 32 | { } 33 | }; 34 | -------------------------------------------------------------------------------- /gen164/5/co_roco.c: -------------------------------------------------------------------------------- 1 | /* gen164/5/co_roco.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | 9 | /* functions 10 | */ 11 | u2_weak 12 | j2_md(Pt5, coco, co, roco)(u2_wire wir_r, 13 | u2_noun cor) 14 | { 15 | /* tree axes */ 16 | /* buz => 4 */ 17 | /* bas => 10 */ 18 | /* dop => 11 */ 19 | /* dug => 3 */ 20 | 21 | /* if ( u2_no == u2_mean(cor, u2_cv_sam_4, &bas, */ 22 | /* u2_cv_sam_5, &min, */ 23 | /* u2_cv_sam_3, &par, */ 24 | /* 0) ) */ 25 | /* { */ 26 | /* return u2_bl_bail(wir_r, c3__exit); */ 27 | /* } */ 28 | 29 | return 0; 30 | } 31 | /* structures 32 | */ 33 | u2_ho_jet 34 | j2_mdj(Pt5, coco, co, roco)[] = { 35 | { ".2", c3__lite, j2_md(Pt5, coco, co, roco), u2_jet_dead, u2_none, u2_none }, 36 | { } 37 | }; 38 | -------------------------------------------------------------------------------- /gen164/5/ed.c: -------------------------------------------------------------------------------- 1 | /* gen164/5/ed.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* declarations 9 | */ 10 | extern u2_ho_jet j2_mdj(Pt5, coed, ed, sign)[]; 11 | extern u2_ho_jet j2_mdj(Pt5, coed, ed, puck)[]; 12 | extern u2_ho_jet j2_mdj(Pt5, coed, ed, veri)[]; 13 | 14 | u2_ho_driver 15 | j2_mcd(Pt5, coed, ed)[] = { 16 | { j2_sd(Pt5, coed, ed, sign), j2_mdj(Pt5, coed, ed, sign), 0, 0, u2_none }, 17 | { j2_sd(Pt5, coed, ed, puck), j2_mdj(Pt5, coed, ed, puck), 0, 0, u2_none }, 18 | { j2_sd(Pt5, coed, ed, veri), j2_mdj(Pt5, coed, ed, veri), 0, 0, u2_none }, 19 | {} 20 | }; 21 | 22 | /* structures 23 | */ 24 | u2_ho_driver 25 | j2_mbd(Pt5, coed)[] = { 26 | { j2_sc(Pt5, coed, ed), 0, j2_mcd(Pt5, coed, ed), 0, u2_none }, 27 | {} 28 | }; 29 | -------------------------------------------------------------------------------- /gen164/5/ed_puck.c: -------------------------------------------------------------------------------- 1 | /* gen164/5/ed_puck.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | #include 9 | 10 | /* functions 11 | */ 12 | u2_weak 13 | j2_md(Pt5, coed, ed, puck)(u2_wire wir_r, 14 | u2_noun cor) 15 | { 16 | c3_y pub_y[32]; 17 | c3_y sec_y[64]; 18 | c3_y sed_y[32]; 19 | c3_w met_w; 20 | u2_noun a = u2_frag(u2_cv_sam, cor); 21 | 22 | if ( (u2_none == a) || (u2_no == u2_stud(a)) ) { 23 | return u2_bl_bail(wir_r, c3__exit); 24 | } 25 | 26 | met_w = u2_met(3, a); 27 | if ( met_w > 32 ) { 28 | return u2_bl_bail(wir_r, c3__exit); 29 | } 30 | 31 | memset(sed_y, 0, 32); 32 | u2_cr_bytes(0, met_w, sed_y, a); 33 | ed25519_create_keypair(pub_y, sec_y, sed_y); 34 | return u2_ci_bytes(32, pub_y); 35 | } 36 | /* structures 37 | */ 38 | u2_ho_jet 39 | j2_mdj(Pt5, coed, ed, puck)[] = { 40 | { ".2", c3__lite, j2_md(Pt5, coed, ed, puck), Tier5, u2_none, u2_none }, 41 | { } 42 | }; 43 | -------------------------------------------------------------------------------- /gen164/5/mink.c: -------------------------------------------------------------------------------- 1 | /* j/5/mink.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | u2_weak // produce 9 | j2_mb(Pt5, mink)(u2_wire wir_r, 10 | u2_noun cor) // retain 11 | { 12 | u2_noun bus, fol, fly; 13 | 14 | if ( u2_no == u2_mean(cor, u2_cv_sam_4, &bus, 15 | u2_cv_sam_5, &fol, 16 | u2_cv_sam_3, &fly, 17 | 0) ) 18 | { 19 | return u2_bl_bail(wir_r, c3__exit); 20 | } 21 | else { 22 | return u2_cn_mink(u2k(bus), u2k(fol), u2k(fly)); 23 | } 24 | } 25 | 26 | /* structures 27 | */ 28 | u2_ho_jet 29 | j2_mbj(Pt5, mink)[] = { 30 | { ".2", c3__lite, j2_mb(Pt5, mink), Tier5, u2_none, u2_none }, 31 | { } 32 | }; 33 | -------------------------------------------------------------------------------- /gen164/5/mule.c: -------------------------------------------------------------------------------- 1 | /* j/5/mink.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | u2_weak // produce 9 | j2_mb(Pt5, mule)(u2_wire wir_r, 10 | u2_noun cor) // retain 11 | { 12 | u2_noun tap; 13 | 14 | if ( u2_no == u2_mean(cor, u2_cv_sam, &tap, 0) ) { 15 | return u2_bl_bail(wir_r, c3__exit); 16 | } 17 | else { 18 | u2_noun hok = u2_bn_hook(wir_r, cor, "mute"); 19 | /* this takes advantage of the fact that mute's result, at the typeless 20 | * C/Nock level, is identical to what a typed mule would produce, 21 | * without running the formula twice. 22 | */ 23 | return u2_bn_mong(wir_r, hok, u2k(tap));; 24 | } 25 | } 26 | 27 | /* structures 28 | */ 29 | u2_ho_jet 30 | j2_mbj(Pt5, mule)[] = { 31 | { ".2", c3__lite, j2_mb(Pt5, mule), Tier5, u2_none, u2_none }, 32 | { } 33 | }; 34 | -------------------------------------------------------------------------------- /gen164/5/trip.c: -------------------------------------------------------------------------------- 1 | /* j/3/trip.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt5, trip)(u2_wire wir_r, 12 | u2_atom a) // retain 13 | { 14 | if ( u2_no == u2_stud(a) ) { 15 | return u2_bl_bail(wir_r, c3__exit); 16 | } 17 | return j2_mbc(Pt3, rip)(wir_r, _3, a); 18 | } 19 | u2_noun // transfer 20 | j2_mb(Pt5, trip)(u2_wire wir_r, 21 | u2_noun cor) // retain 22 | { 23 | u2_noun a; 24 | 25 | if ( (u2_none == (a = u2_frag(u2_cv_sam, cor))) ) { 26 | return u2_bl_bail(wir_r, c3__fail); 27 | } else { 28 | return j2_mby(Pt5, trip)(wir_r, a); 29 | } 30 | } 31 | 32 | /* structures 33 | */ 34 | u2_ho_jet 35 | j2_mbj(Pt5, trip)[] = { 36 | { ".2", c3__hevy, j2_mb(Pt5, trip), Tier3, u2_none, u2_none }, 37 | { } 38 | }; 39 | -------------------------------------------------------------------------------- /gen164/6/bull.c: -------------------------------------------------------------------------------- 1 | /* j/6/bull.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, bull)(u2_wire wir_r, 12 | u2_noun bid, // retain 13 | u2_noun der) // retain 14 | { 15 | if ( (c3__void == der) || 16 | (c3__void == u2t(u2t(u2t(bid)))) ) 17 | { 18 | return c3__void; 19 | } 20 | else return u2_bt 21 | (wir_r, c3__bull, u2_rx(wir_r, bid), u2_rx(wir_r, der)); 22 | } 23 | u2_noun // transfer 24 | j2_mb(Pt6, bull)(u2_wire wir_r, 25 | u2_noun cor) // retain 26 | { 27 | u2_noun bid, der; 28 | 29 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &bid, u2_cv_sam_3, &der, 0) ) { 30 | return u2_bl_bail(wir_r, c3__fail); 31 | } else { 32 | return j2_mby(Pt6, bull)(wir_r, bid, der); 33 | } 34 | } 35 | 36 | /* structures 37 | */ 38 | u2_ho_jet 39 | j2_mbj(Pt6, bull)[] = { 40 | { ".2", c3__hevy, j2_mb(Pt6, bull), Tier6_a, u2_none, u2_none }, 41 | { } 42 | }; 43 | -------------------------------------------------------------------------------- /gen164/6/cell.c: -------------------------------------------------------------------------------- 1 | /* j/6/cell.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, cell)(u2_wire wir_r, 12 | u2_noun hed, // retain 13 | u2_noun tal) // retain 14 | { 15 | if ( (c3__void == hed) || (c3__void == tal) ) { 16 | return c3__void; 17 | } else { 18 | return u2_bt(wir_r, c3__cell, u2_rx(wir_r, hed), u2_rx(wir_r, tal)); 19 | } 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt6, cell)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun hed, tal; 26 | 27 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &hed, u2_cv_sam_3, &tal, 0) ) { 28 | return u2_bl_bail(wir_r, c3__fail); 29 | } else { 30 | return j2_mby(Pt6, cell)(wir_r, hed, tal); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt6, cell)[] = { 38 | { ".2", c3__hevy, j2_mb(Pt6, cell), Tier6_a, u2_none, u2_none }, 39 | { } 40 | }; 41 | -------------------------------------------------------------------------------- /gen164/6/core.c: -------------------------------------------------------------------------------- 1 | /* j/6/core.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, core)(u2_wire wir_r, 12 | u2_noun pac, // retain 13 | u2_noun con) // retain 14 | { 15 | if ( (c3__void == pac) ) { 16 | return c3__void; 17 | } else { 18 | return u2_bt(wir_r, c3__core, u2_rx(wir_r, pac), u2_rx(wir_r, con)); 19 | } 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt6, core)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun pac, con; 26 | 27 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &pac, u2_cv_sam_3, &con, 0) ) { 28 | return u2_bl_bail(wir_r, c3__fail); 29 | } else { 30 | return j2_mby(Pt6, core)(wir_r, pac, con); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt6, core)[] = { 38 | { ".2", c3__hevy, j2_mb(Pt6, core), Tier6_a, u2_none, u2_none }, 39 | { } 40 | }; 41 | -------------------------------------------------------------------------------- /gen164/6/cube.c: -------------------------------------------------------------------------------- 1 | /* j/6/cube.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, cube)(u2_wire wir_r, 12 | u2_noun dil, // retain 13 | u2_noun goq) // retain 14 | { 15 | if ( c3__void == goq ) { 16 | return c3__void; 17 | } 18 | else return u2_bt 19 | (wir_r, c3__cube, u2_rx(wir_r, dil), u2_rx(wir_r, goq)); 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt6, cube)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun dil, goq; 26 | 27 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &dil, u2_cv_sam_3, &goq, 0) ) { 28 | return u2_bl_bail(wir_r, c3__fail); 29 | } else { 30 | return j2_mby(Pt6, cube)(wir_r, dil, goq); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt6, cube)[] = { 38 | { ".2", c3__hevy, j2_mb(Pt6, cube), Tier6_a, u2_none, u2_none }, 39 | { } 40 | }; 41 | -------------------------------------------------------------------------------- /gen164/6/face.c: -------------------------------------------------------------------------------- 1 | /* j/6/face.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, face)(u2_wire wir_r, 12 | u2_noun cog, // retain 13 | u2_noun tip) // retain 14 | { 15 | if ( c3__void == tip ) { 16 | return c3__void; 17 | } 18 | else return u2_bt 19 | (wir_r, c3__face, u2_rx(wir_r, cog), u2_rx(wir_r, tip)); 20 | } 21 | u2_noun // transfer 22 | j2_mb(Pt6, face)(u2_wire wir_r, 23 | u2_noun cor) // retain 24 | { 25 | u2_noun cog, tip; 26 | 27 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &cog, u2_cv_sam_3, &tip, 0) ) { 28 | return u2_bl_bail(wir_r, c3__fail); 29 | } else { 30 | return j2_mby(Pt6, face)(wir_r, cog, tip); 31 | } 32 | } 33 | 34 | /* structures 35 | */ 36 | u2_ho_jet 37 | j2_mbj(Pt6, face)[] = { 38 | { ".2", c3__hevy, j2_mb(Pt6, face), Tier6_a, u2_none, u2_none }, 39 | { } 40 | }; 41 | -------------------------------------------------------------------------------- /gen164/6/fine.c: -------------------------------------------------------------------------------- 1 | /* j/6/fine.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, fine)(u2_wire wir_r, 12 | u2_noun fuv, 13 | u2_noun lup, // retain 14 | u2_noun mar) // retain 15 | { 16 | if ( (c3__void == lup) || (c3__void == mar) ) { 17 | return c3__void; 18 | } else { 19 | return u2_bq(wir_r, c3__fine, u2_rx(wir_r, fuv), 20 | u2_rx(wir_r, lup), 21 | u2_rx(wir_r, mar)); 22 | } 23 | } 24 | u2_noun // transfer 25 | j2_mb(Pt6, fine)(u2_wire wir_r, 26 | u2_noun cor) // retain 27 | { 28 | u2_noun fuv, lup, mar; 29 | 30 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &fuv, 31 | u2_cv_sam_6, &lup, 32 | u2_cv_sam_7, &mar, 0) ) { 33 | return u2_bl_bail(wir_r, c3__fail); 34 | } else { 35 | return j2_mby(Pt6, fine)(wir_r, fuv, lup, mar); 36 | } 37 | } 38 | 39 | /* structures 40 | */ 41 | u2_ho_jet 42 | j2_mbj(Pt6, fine)[] = { 43 | { ".2", c3__hevy, j2_mb(Pt6, fine), Tier6_a, u2_none, u2_none }, 44 | { } 45 | }; 46 | -------------------------------------------------------------------------------- /gen164/6/flip.c: -------------------------------------------------------------------------------- 1 | /* j/6/flip.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, flip)(u2_wire wir_r, 12 | u2_noun hel) // retain 13 | { 14 | if ( u2_yes == u2_sing(u2_nock_1, u2_h(hel)) ) { 15 | if ( (u2_yes == u2_t(hel)) ) { 16 | return u2_bc(wir_r, u2_nock_1, u2_no); 17 | } 18 | else { 19 | c3_assert((u2_no == u2_t(hel))); 20 | 21 | return u2_bc(wir_r, u2_nock_1, u2_yes); 22 | } 23 | } 24 | else { 25 | return u2_bq 26 | (wir_r, u2_nock_6, 27 | u2_rx(wir_r, hel), 28 | u2_bc(wir_r, u2_nock_1, u2_no), 29 | u2_bc(wir_r, u2_nock_1, u2_yes)); 30 | } 31 | } 32 | u2_noun // transfer 33 | j2_mb(Pt6, flip)(u2_wire wir_r, 34 | u2_noun cor) // retain 35 | { 36 | u2_noun hel; 37 | 38 | if ( u2_none == (hel = u2_frag(u2_cv_sam, cor)) ) { 39 | return u2_bl_bail(wir_r, c3__fail); 40 | } else { 41 | return j2_mby(Pt6, flip)(wir_r, hel); 42 | } 43 | } 44 | 45 | /* structures 46 | */ 47 | u2_ho_jet 48 | j2_mbj(Pt6, flip)[] = { 49 | { ".2", c3__hevy, j2_mb(Pt6, flip), Tier6_a, u2_none, u2_none }, 50 | { } 51 | }; 52 | -------------------------------------------------------------------------------- /gen164/6/fork.c: -------------------------------------------------------------------------------- 1 | /* j/6/fork.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | #include "all.h" 6 | #include "../pit.h" 7 | 8 | /* functions 9 | */ 10 | u2_noun // transfer 11 | j2_mby(Pt6, fork)(u2_wire wir_r, 12 | u2_noun hoz, // retain 13 | u2_noun bur) // retain 14 | { 15 | if ( u2_yes == u2_sing(hoz, bur) ) { 16 | return u2_rx(wir_r, hoz); 17 | } 18 | else if ( c3__void == bur ) { 19 | return u2_rx(wir_r, hoz); 20 | } 21 | else if ( c3__void == hoz ) { 22 | return u2_rx(wir_r, bur); 23 | } 24 | else return u2_bt 25 | (wir_r, c3__fork, u2_rx(wir_r, hoz), u2_rx(wir_r, bur)); 26 | } 27 | u2_noun // transfer 28 | j2_mb(Pt6, fork)(u2_wire wir_r, 29 | u2_noun cor) // retain 30 | { 31 | u2_noun hoz, bur; 32 | 33 | if ( u2_no == u2_mean(cor, u2_cv_sam_2, &hoz, u2_cv_sam_3, &bur, 0) ) { 34 | return u2_bl_bail(wir_r, c3__fail); 35 | } else { 36 | return j2_mby(Pt6, fork)(wir_r, hoz, bur); 37 | } 38 | } 39 | 40 | /* structures 41 | */ 42 | u2_ho_jet 43 | j2_mbj(Pt6, fork)[] = { 44 | { ".2", c3__hevy, j2_mb(Pt6, fork), Tier6_a, u2_none, u2_none }, 45 | { } 46 | }; 47 | -------------------------------------------------------------------------------- /gen164/6/type.c: -------------------------------------------------------------------------------- 1 | /* j/6/type.c 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | 6 | /* new template for type switching 7 | */ 8 | { 9 | u2_noun p_sut, q_sut, r_sut; 10 | 11 | if ( u2_no == u2_dust(sut) ) switch ( sut ) { 12 | default: return u2_bl_bail(wir_r, c3__fail); 13 | 14 | case c3__noun: 15 | { 16 | } 17 | case c3__void: 18 | { 19 | } 20 | } 21 | else switch ( u2_h(sut) ) { 22 | default: return u2_bl_bail(wir_r, c3__fail); 23 | 24 | case c3__atom: p_sut = u2_t(sut); 25 | { 26 | } 27 | case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut); 28 | { 29 | } 30 | case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut); 31 | { 32 | } 33 | case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut); 34 | { 35 | } 36 | case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut); 37 | { 38 | } 39 | case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut); 40 | { 41 | } 42 | case c3__hold: p_sut = u2_t(sut); 43 | { 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /include/all.h: -------------------------------------------------------------------------------- 1 | /* include/all.h 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | 6 | /** Internal includes. 7 | **/ 8 | /** c3: the C layer. 9 | **/ 10 | # include "c/portable.h" 11 | # include "c/tune.h" 12 | # include "c/types.h" 13 | # include "c/defs.h" 14 | # include "c/motes.h" 15 | # include "c/comd.h" 16 | 17 | #if 0 18 | #define NOCK6 19 | #undef NOCK5 20 | #else 21 | #undef NOCK6 22 | #define NOCK5 23 | #endif 24 | 25 | /** u2: the new interpreter. 26 | **/ 27 | # include "f/loom.h" 28 | # include "f/chad.h" 29 | # include "f/cash.h" 30 | # include "f/rail.h" 31 | # include "f/dash.h" 32 | # include "f/host.h" 33 | # include "f/bail.h" 34 | # include "f/benx.h" 35 | # include "f/trac.h" 36 | # include "f/wire.h" 37 | # include "f/nock.h" 38 | # include "f/funj.h" 39 | # include "f/unix.h" 40 | # include "f/hevn.h" 41 | # include "f/arvo.h" 42 | 43 | /** coal: common methods for dealing with nouns. 44 | **/ 45 | # include "f/coal.h" 46 | -------------------------------------------------------------------------------- /include/c/comd.h: -------------------------------------------------------------------------------- 1 | /* include/comd.h 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | /** Functions. 6 | **/ 7 | /* c3_comd_init(): 8 | ** 9 | ** Initialize the readline console. Return the history filename. 10 | */ 11 | c3_c* // produce 12 | c3_comd_init(void); 13 | 14 | /* c3_comd_line(): 15 | ** 16 | ** Read a line from the console, saving to history file `fel`. 17 | ** 18 | ** Returns 0 iff the console has exited. 19 | */ 20 | c3_c* // produce 21 | c3_comd_line(const c3_c *fel_c, 22 | const c3_c *prm_c); // retain 23 | -------------------------------------------------------------------------------- /include/c/tune.h: -------------------------------------------------------------------------------- 1 | /* include/c/tune.h 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | /** Tuning ifdefs. Comment out to disable. 6 | **/ 7 | /** Profiling. 8 | **/ 9 | /* Profile at all. 10 | */ 11 | # define U2_PROFILE 12 | 13 | /* Measure memory usage. 14 | */ 15 | # define U2_PROFILE_MEMORY 16 | 17 | /* Measure execution time. 18 | */ 19 | # define U2_PROFILE_SPEED 20 | 21 | /* Describe execution patterns. 22 | */ 23 | # define U2_PROFILE_SHAPE 24 | 25 | -------------------------------------------------------------------------------- /include/c/types.h: -------------------------------------------------------------------------------- 1 | /* include/c/types.h 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | /** Integer typedefs. 6 | **/ 7 | /* Canonical integers. 8 | */ 9 | typedef uint64_t c3_d; 10 | typedef int64_t c3_ds; 11 | typedef uint32_t c3_w; 12 | typedef int32_t c3_ws; 13 | typedef uint16_t c3_s; 14 | typedef int16_t c3_ss; 15 | typedef uint8_t c3_y; // byte 16 | typedef int8_t c3_ys; // signed byte 17 | typedef uint8_t c3_b; // bit 18 | 19 | typedef uint8_t c3_t; // boolean 20 | typedef uint8_t c3_g; // 32-bit log - 0-31 bits 21 | typedef uint32_t c3_l; // little; 31-bit unsigned integer 22 | typedef uint32_t c3_m; // mote; also c3_l; LSB first a-z 4-char string. 23 | 24 | /* C true and false; boolean logic 25 | */ 26 | # define c3_true 1 27 | # define c3_false 0 28 | # define c3_and(x, y) ((x) && (y)) 29 | # define c3_or(x, y) ((x) || (y)) 30 | 31 | /* Deprecated integers. 32 | */ 33 | typedef char c3_c; // does not match int8_t or uint8_t 34 | typedef int c3_i; // int - really bad 35 | typedef uintptr_t c3_p; // pointer-length uint - really really bad 36 | typedef intptr_t c3_ps; // pointer-length int - really really bad 37 | -------------------------------------------------------------------------------- /include/f/hevn.h: -------------------------------------------------------------------------------- 1 | /* include/hevn.h 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | /** Data structures. 6 | **/ 7 | /* u2_pryr: takes a path and produces a unit. 8 | */ 9 | typedef u2_noun (*u2_pryr)(u2_noun); 10 | 11 | /* u2_loom_hevn: global namespace control structure. 12 | */ 13 | typedef struct _u2_loom_hevn { 14 | /* Don't set this unless you know what you're doing. 15 | */ 16 | u2_pryr god; 17 | 18 | /* Mock gate stack. Pop the stack when executing. 19 | ** 20 | ** Each entry in this list is a crash-only gate. If the 21 | ** list is empty, we are in kernel mode & god is active. 22 | */ 23 | u2_noun lad; 24 | } u2_loom_hevn; 25 | 26 | #define u2_hevx_at(hev_r, wof) (*u2_at(hev_r, u2_loom_hevn, wof)) 27 | #define u2_hevx_be(hev_r, ite, wof) (*u2_be(hev_r, u2_loom_hevn, ite, wof)) 28 | 29 | #define u2_hevn_at(wof) u2_hevx_at(u2_wire_hev_r(u2_Wire), wof) 30 | #define u2_hevn_be(ite, wof) u2_hevx_be(u2_wire_hev_r(u2_Wire), ite, wof) 31 | 32 | /** Functions. 33 | **/ 34 | /** Lifecycle. 35 | **/ 36 | /* u2_hv_init(): initialize state. 37 | */ 38 | u2_ray 39 | u2_hv_init(u2_ray wir_r); 40 | 41 | /* u2_hv_mark(): mark heaven. 42 | */ 43 | c3_w 44 | u2_hv_mark(); 45 | -------------------------------------------------------------------------------- /include/f/nash.h: -------------------------------------------------------------------------------- 1 | /* include/f/nash.h 2 | ** 3 | ** This file is in the public domain. 4 | */ 5 | 6 | /** Hash-table design: 7 | *** 8 | *** u2_nash is a non-noun hash-table, meant for ephemeral usage such as 9 | *** in jam and cue. 10 | *** 11 | *** It uses a Patricia trie keyed on the mug of the actual key, and then 12 | *** a vector of key-value pairs to resolve collisions. 13 | **/ 14 | 15 | /* Opaque structure holding hash table. 16 | */ 17 | struct u2_nash; 18 | 19 | /* Functions 20 | */ 21 | 22 | /* u2_na_make(): create a new nash. 23 | */ 24 | struct u2_nash* 25 | u2_na_make(); 26 | 27 | /* u2_na_put(): put an entry in the hash table. 28 | */ 29 | void 30 | u2_na_put(struct u2_nash* nash, u2_noun key, void* val); 31 | 32 | /* u2_na_get(): retrieve an entry from the hash table, or u2_none. 33 | */ 34 | u2_weak 35 | u2_na_get(struct u2_nash* nash, u2_noun key); 36 | 37 | /* u2_na_get_ptr(): retrieve a pointer entry from the hash table, or u2_none. 38 | */ 39 | void* 40 | u2_na_get_ptr(struct u2_nash* nash, u2_noun key, c3_b* fon); 41 | 42 | /* u2_na_take(): destroy a nash. 43 | */ 44 | void 45 | u2_na_take(struct u2_nash* nash); 46 | 47 | -------------------------------------------------------------------------------- /outside/anachronism/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /outside/anachronism/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Jonathan Castello 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /outside/anachronism/doc/parser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urbit/archaeology/6b2ce202207b9bb3f4e65fc1ea9a2fb434396dd4/outside/anachronism/doc/parser.png -------------------------------------------------------------------------------- /outside/anachronism/include/anachronism/common.h: -------------------------------------------------------------------------------- 1 | #ifndef ANACHRONISM_COMMON_H 2 | #define ANACHRONISM_COMMON_H 3 | 4 | #include /* for size_t */ 5 | 6 | // Telnet bytes must be unsigned 7 | typedef unsigned char telnet_byte; 8 | 9 | // Error codes returned from API functions 10 | // Positive codes are success/notice codes. 11 | // Nonpositive codes are errors. 12 | // ALLOC is 0 for parity with the NULL result from malloc(). 13 | typedef enum telnet_error 14 | { 15 | TELNET_E_NOT_SUBNEGOTIABLE = -4, // The telopt is not open for subnegotiation. 16 | TELNET_E_BAD_PARSER = -3, // The telnet_parser* passed is NULL 17 | TELNET_E_BAD_NVT = -2, // The telnet_nvt* passed is NULL 18 | TELNET_E_INVALID_COMMAND = -1, // The telnet_byte passed is not an allowed command in this API method 19 | TELNET_E_ALLOC = 0, // Not enough memory to allocate essential library structures 20 | TELNET_E_OK = 1, // Huge Success! 21 | TELNET_E_INTERRUPT = 2, // Parser interrupted by user code. 22 | } telnet_error; 23 | 24 | #endif // ANACHRONISM_COMMON_H 25 | -------------------------------------------------------------------------------- /outside/anachronism/src/README.md: -------------------------------------------------------------------------------- 1 | * parser_common.rl 2 |
The language-agnostic Ragel grammar for the Telnet protocol. 3 | * parser.rl 4 |
The C implementation of the Ragel grammar. Compiled to parser.c by Ragel. 5 | * nvt.c 6 |
The core implementation of Anachronism's NVT and Channel constructs. 7 | -------------------------------------------------------------------------------- /outside/cre2/share/info/dir: -------------------------------------------------------------------------------- 1 | This is the file .../info/dir, which contains the 2 | topmost node of the Info hierarchy, called (dir)Top. 3 | The first time you invoke Info you start off looking at this node. 4 |  5 | File: dir, Node: Top This is the top of the INFO tree 6 | 7 | This (the Directory node) gives a menu of major topics. 8 | Typing "q" exits, "?" lists all Info commands, "d" returns here, 9 | "h" gives a primer for first-timers, 10 | "mEmacs" visits the Emacs manual, etc. 11 | 12 | In Emacs, you can click mouse button 2 on a menu item or cross reference 13 | to select it. 14 | 15 | * Menu: 16 | 17 | Development 18 | * cre2: (cre2). C wrapper for RE2. 19 | -------------------------------------------------------------------------------- /outside/cre2/src/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | =* 3 | ,,* 4 | *.a 5 | *.bz2 6 | *.fasl 7 | *.gz 8 | *.html 9 | *.info 10 | *.o 11 | *.out 12 | *.so 13 | *.so.* 14 | *.tgz 15 | *.tmp 16 | .DS_Store 17 | .arch 18 | .deps/ 19 | .emacs.* 20 | .gdb_history 21 | .vimview 22 | Makefile 23 | Makefile.in 24 | aclocal.m4 25 | ar-lib 26 | autom4te* 27 | compile 28 | config.guess 29 | config.h.in 30 | config.sub 31 | config.cache 32 | configure 33 | depcomp 34 | test-driver 35 | doc/mdate-sh 36 | doc/stamp-vti 37 | doc/texinfo.tex 38 | doc/version.texi 39 | install-sh 40 | missing 41 | mkinstalldirs 42 | ltmain.sh 43 | m4/ 44 | autotools/ 45 | -------------------------------------------------------------------------------- /outside/cre2/src/autogen.sh: -------------------------------------------------------------------------------- 1 | # autogen.sh -- 2 | # 3 | # Run this in the top source directory to rebuild the infrastructure. 4 | 5 | set -xe 6 | test -d autotools || mkdir autotools 7 | test -f autotools/libtool.m4 || libtoolize 8 | autoreconf --warnings=all --install --verbose "$@" 9 | 10 | ### end of file 11 | 12 | -------------------------------------------------------------------------------- /outside/cre2/src/build.sh: -------------------------------------------------------------------------------- 1 | if [ ! -d "=build" ]; then 2 | mkdir "=build" 3 | (libtoolize || glibtoolize) 4 | sh autogen.sh 5 | cd "=build" 6 | ../configure --enable-maintainer-mode LDFLAGS=-pthread 7 | make 8 | cd .. 9 | fi 10 | if [ ! -d "../lib" ]; then 11 | mkdir ../lib 12 | fi 13 | if [ ! -d "../include" ]; then 14 | mkdir ../include 15 | fi 16 | cp \=build/.libs/* ../lib 17 | cp src/cre2.h ../include 18 | -------------------------------------------------------------------------------- /outside/cre2/src/clean.sh: -------------------------------------------------------------------------------- 1 | if [ -d "=build" ]; then 2 | rm -r "=build" 3 | fi 4 | if [ -d "../lib" ]; then 5 | rm -r ../lib 6 | fi 7 | if [ -d "../include" ]; then 8 | rm -r ../include 9 | fi 10 | -------------------------------------------------------------------------------- /outside/cre2/src/configure.sh: -------------------------------------------------------------------------------- 1 | # configure.sh -- 2 | # 3 | # Run this to configure. 4 | 5 | set -xe 6 | 7 | prefix=/usr/local 8 | if test -d /lib64 9 | then libdir=${prefix}/lib64 10 | else libdir=${prefix}/lib 11 | fi 12 | 13 | ../configure \ 14 | --config-cache \ 15 | --cache-file=../config.cache \ 16 | --enable-maintainer-mode \ 17 | --disable-static --enable-shared \ 18 | --prefix="${prefix}" \ 19 | --libdir="${libdir}" \ 20 | CFLAGS='-O3' \ 21 | LDFLAGS="-L${libdir}" \ 22 | "$@" 23 | 24 | ### end of file 25 | -------------------------------------------------------------------------------- /outside/cre2/src/prepare.sh: -------------------------------------------------------------------------------- 1 | # prepare.sh -- 2 | # 3 | # Run this to rebuild the infrastructure and configure. 4 | 5 | set -xe 6 | 7 | (cd .. && sh autogen.sh) 8 | sh ../configure.sh 9 | 10 | ### end of file 11 | -------------------------------------------------------------------------------- /outside/cre2/src/tests/test-options.c: -------------------------------------------------------------------------------- 1 | /* 2 | Part of: CRE2 3 | Contents: test for options 4 | Date: Mon Jan 2, 2012 5 | 6 | Abstract 7 | 8 | Test file for options objects. 9 | 10 | Copyright (C) 2012 Marco Maggi 11 | 12 | See the COPYING file. 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | int 20 | main (int argc, const char *const argv[]) 21 | { 22 | cre2_options_t * opt; 23 | 24 | opt = cre2_opt_new(); 25 | { 26 | cre2_opt_set_posix_syntax(opt, 1); 27 | cre2_opt_set_longest_match(opt, 1); 28 | cre2_opt_set_log_errors(opt, 1); 29 | cre2_opt_set_literal(opt, 1); 30 | cre2_opt_set_never_nl(opt, 1); 31 | cre2_opt_set_case_sensitive(opt, 1); 32 | cre2_opt_set_perl_classes(opt, 1); 33 | cre2_opt_set_word_boundary(opt, 1); 34 | cre2_opt_set_one_line(opt, 1); 35 | cre2_opt_set_encoding(opt, CRE2_UTF8); 36 | cre2_opt_set_encoding(opt, CRE2_Latin1); 37 | cre2_opt_set_max_mem(opt, 4096); 38 | } 39 | cre2_opt_delete(opt); 40 | exit(EXIT_SUCCESS); 41 | } 42 | 43 | /* end of file */ 44 | -------------------------------------------------------------------------------- /outside/cre2/src/tests/test-version.c: -------------------------------------------------------------------------------- 1 | /* 2 | Part of: CRE2 3 | Contents: test for version functions 4 | Date: Mon Jan 2, 2012 5 | 6 | Abstract 7 | 8 | Test file for version functions. 9 | 10 | Copyright (C) 2012 Marco Maggi 11 | 12 | See the COPYING file. 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | int 20 | main (int argc, const char *const argv[]) 21 | { 22 | printf("version number string: %s\n", cre2_version_string()); 23 | printf("libtool version number: %d:%d:%d\n", 24 | cre2_version_interface_current(), 25 | cre2_version_interface_revision(), 26 | cre2_version_interface_age()); 27 | exit(EXIT_SUCCESS); 28 | } 29 | 30 | /* end of file */ 31 | -------------------------------------------------------------------------------- /outside/ed25519/.gitignore: -------------------------------------------------------------------------------- 1 | ed25519.a 2 | -------------------------------------------------------------------------------- /outside/ed25519/Makefile: -------------------------------------------------------------------------------- 1 | # A simple makefile. 2 | # 3 | CFLAGS= -O2 -g -Wall 4 | 5 | .c.o: 6 | $(CC) -c $(CFLAGS) -o $@ $< 7 | 8 | OFILES=\ 9 | src/add_scalar.o \ 10 | src/fe.o \ 11 | src/ge.o \ 12 | src/key_exchange.o \ 13 | src/keypair.o \ 14 | src/sc.o \ 15 | src/seed.o \ 16 | src/sha512.o \ 17 | src/sign.o \ 18 | src/verify.o 19 | 20 | all: ed25519.a($(OFILES)) 21 | 22 | clean: 23 | -rm $(OFILES) ed25519.a 24 | -------------------------------------------------------------------------------- /outside/ed25519/src/ed25519.h: -------------------------------------------------------------------------------- 1 | #ifndef ED25519_H 2 | #define ED25519_H 3 | 4 | #include 5 | 6 | #if defined(_WIN32) 7 | #if defined(ED25519_BUILD_DLL) 8 | #define ED25519_DECLSPEC __declspec(dllexport) 9 | #elif defined(ED25519_DLL) 10 | #define ED25519_DECLSPEC __declspec(dllimport) 11 | #else 12 | #define ED25519_DECLSPEC 13 | #endif 14 | #else 15 | #define ED25519_DECLSPEC 16 | #endif 17 | 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #ifndef ED25519_NO_SEED 24 | int ED25519_DECLSPEC ed25519_create_seed(unsigned char *seed); 25 | #endif 26 | 27 | void ED25519_DECLSPEC ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed); 28 | void ED25519_DECLSPEC ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key); 29 | int ED25519_DECLSPEC ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *private_key); 30 | void ED25519_DECLSPEC ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar); 31 | void ED25519_DECLSPEC ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key); 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /outside/ed25519/src/fe.h: -------------------------------------------------------------------------------- 1 | #ifndef FE_H 2 | #define FE_H 3 | 4 | #include "fixedint.h" 5 | 6 | 7 | /* 8 | fe means field element. 9 | Here the field is \Z/(2^255-19). 10 | An element t, entries t[0]...t[9], represents the integer 11 | t[0]+2^26 t[1]+2^51 t[2]+2^77 t[3]+2^102 t[4]+...+2^230 t[9]. 12 | Bounds on each t[i] vary depending on context. 13 | */ 14 | 15 | 16 | typedef int32_t fe[10]; 17 | 18 | 19 | void fe_0(fe h); 20 | void fe_1(fe h); 21 | 22 | void fe_frombytes(fe h, const unsigned char *s); 23 | void fe_tobytes(unsigned char *s, const fe h); 24 | 25 | void fe_copy(fe h, const fe f); 26 | int fe_isnegative(const fe f); 27 | int fe_isnonzero(const fe f); 28 | void fe_cmov(fe f, const fe g, unsigned int b); 29 | void fe_cswap(fe f, fe g, unsigned int b); 30 | 31 | void fe_neg(fe h, const fe f); 32 | void fe_add(fe h, const fe f, const fe g); 33 | void fe_invert(fe out, const fe z); 34 | void fe_sq(fe h, const fe f); 35 | void fe_sq2(fe h, const fe f); 36 | void fe_mul(fe h, const fe f, const fe g); 37 | void fe_mul121666(fe h, fe f); 38 | void fe_pow22523(fe out, const fe z); 39 | void fe_sub(fe h, const fe f, const fe g); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /outside/ed25519/src/keypair.c: -------------------------------------------------------------------------------- 1 | #include "ed25519.h" 2 | #include "sha512.h" 3 | #include "ge.h" 4 | 5 | 6 | void ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed) { 7 | ge_p3 A; 8 | 9 | sha512(seed, 32, private_key); 10 | private_key[0] &= 248; 11 | private_key[31] &= 63; 12 | private_key[31] |= 64; 13 | 14 | ge_scalarmult_base(&A, private_key); 15 | ge_p3_tobytes(public_key, &A); 16 | } 17 | -------------------------------------------------------------------------------- /outside/ed25519/src/sc.h: -------------------------------------------------------------------------------- 1 | #ifndef SC_H 2 | #define SC_H 3 | 4 | /* 5 | The set of scalars is \Z/l 6 | where l = 2^252 + 27742317777372353535851937790883648493. 7 | */ 8 | 9 | void sc_reduce(unsigned char *s); 10 | void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b, const unsigned char *c); 11 | 12 | #endif -------------------------------------------------------------------------------- /outside/ed25519/src/seed.c: -------------------------------------------------------------------------------- 1 | #include "ed25519.h" 2 | 3 | #ifndef ED25519_NO_SEED 4 | 5 | #ifdef _WIN32 6 | #include 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | int ed25519_create_seed(unsigned char *seed) { 13 | #ifdef _WIN32 14 | HCRYPTPROV prov; 15 | 16 | if (!CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { 17 | return 1; 18 | } 19 | 20 | if (!CryptGenRandom(prov, 32, seed)) { 21 | CryptReleaseContext(prov, 0); 22 | return 1; 23 | } 24 | 25 | CryptReleaseContext(prov, 0); 26 | #else 27 | FILE *f = fopen("/dev/urandom", "rb"); 28 | 29 | if (f == NULL) { 30 | return 1; 31 | } 32 | 33 | fread(seed, 1, 32, f); 34 | fclose(f); 35 | #endif 36 | 37 | return 0; 38 | } 39 | 40 | #endif -------------------------------------------------------------------------------- /outside/ed25519/src/sha512.h: -------------------------------------------------------------------------------- 1 | #ifndef SHA512_H 2 | #define SHA512_H 3 | 4 | #include 5 | 6 | #include "fixedint.h" 7 | 8 | /* state */ 9 | typedef struct sha512_context_ { 10 | uint64_t length, state[8]; 11 | size_t curlen; 12 | unsigned char buf[128]; 13 | } sha512_context; 14 | 15 | 16 | int sha512_init(sha512_context * md); 17 | int sha512_final(sha512_context * md, unsigned char *out); 18 | int sha512_update(sha512_context * md, const unsigned char *in, size_t inlen); 19 | int sha512(const unsigned char *message, size_t message_len, unsigned char *out); 20 | 21 | #endif -------------------------------------------------------------------------------- /outside/ed25519/src/sign.c: -------------------------------------------------------------------------------- 1 | #include "ed25519.h" 2 | #include "sha512.h" 3 | #include "ge.h" 4 | #include "sc.h" 5 | 6 | 7 | void ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key) { 8 | sha512_context hash; 9 | unsigned char hram[64]; 10 | unsigned char r[64]; 11 | ge_p3 R; 12 | 13 | 14 | sha512_init(&hash); 15 | sha512_update(&hash, private_key + 32, 32); 16 | sha512_update(&hash, message, message_len); 17 | sha512_final(&hash, r); 18 | 19 | sc_reduce(r); 20 | ge_scalarmult_base(&R, r); 21 | ge_p3_tobytes(signature, &R); 22 | 23 | sha512_init(&hash); 24 | sha512_update(&hash, signature, 32); 25 | sha512_update(&hash, public_key, 32); 26 | sha512_update(&hash, message, message_len); 27 | sha512_final(&hash, hram); 28 | 29 | sc_reduce(hram); 30 | sc_muladd(signature + 32, hram, private_key, r); 31 | } 32 | -------------------------------------------------------------------------------- /outside/libuv/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.[oa] 3 | *.l[oa] 4 | *.opensdf 5 | *.orig 6 | *.pyc 7 | *.sdf 8 | *.suo 9 | core 10 | vgcore.* 11 | .buildstamp 12 | 13 | /libuv.so 14 | /libuv.dylib 15 | 16 | # Generated by dtrace(1) when doing an in-tree build. 17 | /src/unix/uv-dtrace.h 18 | 19 | /out/ 20 | /build/gyp 21 | 22 | /run-tests 23 | /run-tests.exe 24 | /run-tests.dSYM 25 | /run-benchmarks 26 | /run-benchmarks.exe 27 | /run-benchmarks.dSYM 28 | 29 | *.sln 30 | *.vcproj 31 | *.vcxproj 32 | *.vcxproj.filters 33 | *.vcxproj.user 34 | _UpgradeReport_Files/ 35 | UpgradeLog*.XML 36 | Debug 37 | Release 38 | ipch 39 | -------------------------------------------------------------------------------- /outside/libuv/.mailmap: -------------------------------------------------------------------------------- 1 | Alan Gutierrez 2 | Bert Belder 3 | Bert Belder 4 | Brandon Philips 5 | Brian White 6 | Brian White 7 | Frank Denis 8 | Isaac Z. Schlueter 9 | Marc Schlaich 10 | Robert Mustacchi 11 | Ryan Dahl 12 | Ryan Emery 13 | San-Tai Hsu 14 | Saúl Ibarra Corretgé 15 | Shigeki Ohtsu 16 | Timothy J. Fontaine 17 | Yasuhiro Matsumoto 18 | Yuki Okumura 19 | -------------------------------------------------------------------------------- /outside/libuv/src/unix/uv-dtrace.d: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | provider uv { 23 | probe tick__start(void* loop, int mode); 24 | probe tick__stop(void* loop, int mode); 25 | }; 26 | -------------------------------------------------------------------------------- /outside/libuv/src/win/fs.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urbit/archaeology/6b2ce202207b9bb3f4e65fc1ea9a2fb434396dd4/outside/libuv/src/win/fs.c -------------------------------------------------------------------------------- /outside/libuv/src/win/req.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include 23 | 24 | #include "uv.h" 25 | #include "internal.h" 26 | -------------------------------------------------------------------------------- /outside/libuv/test/fixtures/empty_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urbit/archaeology/6b2ce202207b9bb3f4e65fc1ea9a2fb434396dd4/outside/libuv/test/fixtures/empty_file -------------------------------------------------------------------------------- /outside/libuv/test/fixtures/load_error.node: -------------------------------------------------------------------------------- 1 | foobar 2 | -------------------------------------------------------------------------------- /outside/libuv/test/test-fail-always.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "task.h" 23 | 24 | 25 | TEST_IMPL(fail_always) { 26 | /* This test always fails. It is used to test the test runner. */ 27 | FATAL("Yes, it always fails"); 28 | return 2; 29 | } 30 | -------------------------------------------------------------------------------- /outside/libuv/test/test-pass-always.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "task.h" 23 | 24 | 25 | TEST_IMPL(pass_always) { 26 | /* This test always passes. It is used to test the test runner. */ 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /outside/re2/.hgignore: -------------------------------------------------------------------------------- 1 | syntax:glob 2 | *.pyc 3 | *.orig 4 | core 5 | 6 | syntax:regexp 7 | ^obj/ 8 | -------------------------------------------------------------------------------- /outside/re2/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of RE2 authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Google Inc. 12 | Samsung Electronics 13 | Stefano Rivera 14 | -------------------------------------------------------------------------------- /outside/re2/README: -------------------------------------------------------------------------------- 1 | This is the source code repository for RE2, a regular expression library. 2 | 3 | For documentation about how to install and use RE2, 4 | visit http://code.google.com/p/re2/. 5 | 6 | The short version is: 7 | 8 | make 9 | make test 10 | make install 11 | make testinstall 12 | 13 | Unless otherwise noted, the RE2 source files are distributed 14 | under the BSD-style license found in the LICENSE file. 15 | 16 | RE2's native language is C++. 17 | An Inferno wrapper is at http://code.google.com/p/inferno-re2/. 18 | A Python wrapper is at http://github.com/facebook/pyre2/. 19 | A Ruby wrapper is at http://github.com/axic/rre2/. 20 | -------------------------------------------------------------------------------- /outside/re2/doc/README.xkcd: -------------------------------------------------------------------------------- 1 | xkcd.png is a cropped version of http://xkcd.com/208/ 2 | -------------------------------------------------------------------------------- /outside/re2/doc/mksyntaxgo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | out=$GOROOT/src/pkg/regexp/syntax/doc.go 5 | cp syntax.txt $out 6 | sam -d $out <<'!' 7 | ,x g/NOT SUPPORTED/d 8 | /^Unicode character class/,$d 9 | ,s/[«»]//g 10 | ,x g/^Possessive repetitions:/d 11 | ,x g/\\C/d 12 | ,x g/Flag syntax/d 13 | ,s/.=(true|false)/flag &/g 14 | ,s/^Flags:/ Flag syntax is xyz (set) or -xyz (clear) or xy-z (set xy, clear z). The flags are:\n/ 15 | ,s/\n\n\n+/\n\n/g 16 | ,x/(^.* .*\n)+/ | awk -F' ' '{printf(" %-14s %s\n", $1, $2)}' 17 | 1,2c 18 | // Copyright 2012 The Go Authors. All rights reserved. 19 | // Use of this source code is governed by a BSD-style 20 | // license that can be found in the LICENSE file. 21 | 22 | // DO NOT EDIT. This file is generated by mksyntaxgo from the RE2 distribution. 23 | 24 | /* 25 | Package syntax parses regular expressions into parse trees and compiles 26 | parse trees into programs. Most clients of regular expressions will use the 27 | facilities of package regexp (such as Compile and Match) instead of this package. 28 | 29 | Syntax 30 | 31 | The regular expression syntax understood by this package when parsing with the Perl flag is as follows. 32 | Parts of the syntax can be disabled by passing alternate flags to Parse. 33 | 34 | . 35 | $a 36 | */ 37 | package syntax 38 | . 39 | w 40 | q 41 | ! 42 | -------------------------------------------------------------------------------- /outside/re2/doc/mksyntaxhtml: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp syntax.txt syntax.html 4 | sam -d syntax.html <<'!' 5 | ,s/\&/\&/g 6 | ,s//\>/g 8 | ,s!== (([^()]|\([^()]*\))*)!≡ \1!g 9 | ,s!«!!g 10 | ,s!»!!g 11 | ,s! vim$! VIM!g 12 | ,s! pcre$! PCRE!g 13 | ,s! perl$! PERL!g 14 | ,x g/NOT SUPPORTED/ s!^[^ ]+!&! 15 | ,s!NOT SUPPORTED!!g 16 | ,s!(^[^ ]+) (.*)\n!\1\2\n!g 17 | ,s!.*:$!&!g 18 | ,s!^$!!g 19 | ,x v// s!.*!&! 20 | 1,2c 21 | 22 | 23 | 24 | 25 | RE2 regular expression syntax reference 26 | 27 | 28 |

RE2 regular expression syntax reference

29 | 30 | 31 | 32 | 33 | 34 | . 35 | $a 36 |
This page lists the regular expression syntax accepted by RE2.
It also lists syntax accepted by PCRE, PERL, and VIM.
Grayed out expressions are not supported by RE2.
37 | 38 | 39 | . 40 | w 41 | q 42 | ! 43 | -------------------------------------------------------------------------------- /outside/re2/doc/mksyntaxwiki: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp syntax.txt syntax.wiki 4 | sam -d syntax.wiki <<'!' 5 | ,s!`!`````!g 6 | ,s!== (([^()]|\([^()]*\))*)!≡ `\1`!g 7 | ,s!«!`!g 8 | ,s!»!`!g 9 | ,s! vim$! VIM!g 10 | ,s! pcre$! PCRE!g 11 | ,s! perl$! PERL!g 12 | ,s!(^[^ ]+) (.*)\n!`\1` \2\n!g 13 | ,x g/NOT SUPPORTED/ s!^[^ ]+!&! 14 | ,s!NOT SUPPORTED!(&)!g 15 | ,s!(^[^ ]+) (.*)\n!\1\2\n!g 16 | ,s!.*:$!&!g 17 | ,s!^$!!g 18 | ,x v// s!.*!&! 19 | 1,2c 20 | #summary I define UNIX as “30 definitions of regular expressions living under one roof.” —Don Knuth 21 | 22 | 23 | GENERATED BY mksyntaxwiki. DO NOT EDIT 24 | 25 | 26 | 27 | 28 | 29 | 30 | . 31 | $a 32 |
This page lists the regular expression syntax accepted by RE2.
It also lists syntax accepted by PCRE, PERL, and VIM.
Grayed out expressions are not supported by RE2.
33 | . 34 | w 35 | q 36 | ! 37 | -------------------------------------------------------------------------------- /outside/re2/doc/xkcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urbit/archaeology/6b2ce202207b9bb3f4e65fc1ea9a2fb434396dd4/outside/re2/doc/xkcd.png -------------------------------------------------------------------------------- /outside/re2/lib/codereview/codereview.cfg: -------------------------------------------------------------------------------- 1 | defaultcc: re2-dev@googlegroups.com 2 | -------------------------------------------------------------------------------- /outside/re2/libre2.symbols: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | # re2::RE2* 4 | _ZN3re23RE2*; 5 | _ZNK3re23RE2*; 6 | # re2::StringPiece* 7 | _ZN3re211StringPiece*; 8 | _ZNK3re211StringPiece*; 9 | # operator<<(std::ostream&, re2::StringPiece const&) 10 | _ZlsRSoRKN3re211StringPieceE; 11 | # re2::FilteredRE2* 12 | _ZN3re211FilteredRE2*; 13 | _ZNK3re211FilteredRE210AllMatches*; 14 | local: 15 | *; 16 | }; 17 | -------------------------------------------------------------------------------- /outside/re2/libre2.symbols.darwin: -------------------------------------------------------------------------------- 1 | # Linker doesn't like these unmangled: 2 | # re2::RE2* 3 | __ZN3re23RE2* 4 | __ZNK3re23RE2* 5 | # re2::StringPiece* 6 | __ZN3re211StringPiece* 7 | __ZNK3re211StringPiece* 8 | # operator<<(std::ostream&, re2::StringPiece const&) 9 | __ZlsRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEERKN3re211StringPieceE 10 | # re2::FilteredRE2* 11 | __ZN3re211FilteredRE2* 12 | __ZNK3re211FilteredRE210AllMatches* 13 | 14 | -------------------------------------------------------------------------------- /outside/re2/re2/Makefile: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /outside/re2/re2/testing/exhaustive_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Exhaustive testing of regular expression matching. 6 | 7 | #include "util/test.h" 8 | #include "re2/testing/exhaustive_tester.h" 9 | 10 | namespace re2 { 11 | 12 | DECLARE_string(regexp_engines); 13 | 14 | // Test very simple expressions. 15 | TEST(EgrepLiterals, Lowercase) { 16 | EgrepTest(3, 2, "abc.", 3, "abc", ""); 17 | } 18 | 19 | // Test mixed-case expressions. 20 | TEST(EgrepLiterals, MixedCase) { 21 | EgrepTest(3, 2, "AaBb.", 2, "AaBb", ""); 22 | } 23 | 24 | // Test mixed-case in case-insensitive mode. 25 | TEST(EgrepLiterals, FoldCase) { 26 | // The punctuation characters surround A-Z and a-z 27 | // in the ASCII table. This looks for bugs in the 28 | // bytemap range code in the DFA. 29 | EgrepTest(3, 2, "abAB.", 2, "aBc@_~", "(?i:%s)"); 30 | } 31 | 32 | // Test very simple expressions. 33 | TEST(EgrepLiterals, UTF8) { 34 | EgrepTest(3, 2, "ab.", 4, "a\xE2\x98\xBA", ""); 35 | } 36 | 37 | } // namespace re2 38 | 39 | -------------------------------------------------------------------------------- /outside/re2/re2/testing/null_walker.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "util/test.h" 6 | #include "re2/regexp.h" 7 | #include "re2/walker-inl.h" 8 | 9 | namespace re2 { 10 | 11 | // Null walker. For benchmarking the walker itself. 12 | 13 | class NullWalker : public Regexp::Walker { 14 | public: 15 | NullWalker() { } 16 | bool PostVisit(Regexp* re, bool parent_arg, bool pre_arg, 17 | bool* child_args, int nchild_args); 18 | 19 | bool ShortVisit(Regexp* re, bool a) { 20 | // Should never be called: we use Walk not WalkExponential. 21 | LOG(DFATAL) << "NullWalker::ShortVisit called"; 22 | return a; 23 | } 24 | 25 | private: 26 | DISALLOW_EVIL_CONSTRUCTORS(NullWalker); 27 | }; 28 | 29 | // Called after visiting re's children. child_args contains the return 30 | // value from each of the children's PostVisits (i.e., whether each child 31 | // can match an empty string). Returns whether this clause can match an 32 | // empty string. 33 | bool NullWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg, 34 | bool* child_args, int nchild_args) { 35 | return false; 36 | } 37 | 38 | // Returns whether re can match an empty string. 39 | void Regexp::NullWalk() { 40 | NullWalker w; 41 | w.Walk(this, false); 42 | } 43 | 44 | } // namespace re2 45 | -------------------------------------------------------------------------------- /outside/re2/runtests: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | success=true 4 | for i 5 | do 6 | printf "%-40s" $i 7 | if sh -c "$i >$i.log 2>&1" 2>/dev/null 8 | then 9 | echo PASS 10 | else 11 | echo FAIL';' output in $i.log 12 | success=false 13 | fi 14 | done 15 | 16 | if $success; then 17 | echo 'ALL TESTS PASSED.' 18 | exit 0 19 | fi 20 | echo 'TESTS FAILED.' 21 | exit 1 22 | -------------------------------------------------------------------------------- /outside/re2/testinstall.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace re2; 10 | 11 | int main(void) { 12 | FilteredRE2 f; 13 | int id; 14 | f.Add("a.*b.*c", RE2::DefaultOptions, &id); 15 | vector v; 16 | f.Compile(&v); 17 | vector ids; 18 | f.FirstMatch("abbccc", ids); 19 | 20 | if(RE2::FullMatch("axbyc", "a.*b.*c")) { 21 | printf("PASS\n"); 22 | return 0; 23 | } 24 | printf("FAIL\n"); 25 | return 2; 26 | } 27 | -------------------------------------------------------------------------------- /outside/re2/util/benchmark.h: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #ifndef RE2_UTIL_BENCHMARK_H__ 6 | #define RE2_UTIL_BENCHMARK_H__ 7 | 8 | namespace testing { 9 | struct Benchmark { 10 | const char* name; 11 | void (*fn)(int); 12 | void (*fnr)(int, int); 13 | int lo; 14 | int hi; 15 | int threadlo; 16 | int threadhi; 17 | 18 | void Register(); 19 | Benchmark(const char* name, void (*f)(int)) { Clear(name); fn = f; Register(); } 20 | Benchmark(const char* name, void (*f)(int, int), int l, int h) { Clear(name); fnr = f; lo = l; hi = h; Register(); } 21 | void Clear(const char* n) { name = n; fn = 0; fnr = 0; lo = 0; hi = 0; threadlo = 0; threadhi = 0; } 22 | Benchmark* ThreadRange(int lo, int hi) { threadlo = lo; threadhi = hi; return this; } 23 | }; 24 | } // namespace testing 25 | 26 | void SetBenchmarkBytesProcessed(long long); 27 | void StopBenchmarkTiming(); 28 | void StartBenchmarkTiming(); 29 | void BenchmarkMemoryUsage(); 30 | void SetBenchmarkItemsProcessed(int); 31 | 32 | int NumCPUs(); 33 | 34 | #define BENCHMARK(f) \ 35 | ::testing::Benchmark* _benchmark_##f = (new ::testing::Benchmark(#f, f)) 36 | 37 | #define BENCHMARK_RANGE(f, lo, hi) \ 38 | ::testing::Benchmark* _benchmark_##f = \ 39 | (new ::testing::Benchmark(#f, f, lo, hi)) 40 | 41 | #endif // RE2_UTIL_BENCHMARK_H__ 42 | -------------------------------------------------------------------------------- /outside/re2/util/flags.h: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Simplified version of Google's command line flags. 6 | // Does not support parsing the command line. 7 | // If you want to do that, see 8 | // http://code.google.com/p/google-gflags 9 | 10 | #ifndef RE2_UTIL_FLAGS_H__ 11 | #define RE2_UTIL_FLAGS_H__ 12 | 13 | #define DEFINE_flag(type, name, deflt, desc) \ 14 | namespace re2 { type FLAGS_##name = deflt; } 15 | 16 | #define DECLARE_flag(type, name) \ 17 | namespace re2 { extern type FLAGS_##name; } 18 | 19 | #define DEFINE_bool(name, deflt, desc) DEFINE_flag(bool, name, deflt, desc) 20 | #define DEFINE_int32(name, deflt, desc) DEFINE_flag(int32, name, deflt, desc) 21 | #define DEFINE_string(name, deflt, desc) DEFINE_flag(string, name, deflt, desc) 22 | 23 | #define DECLARE_bool(name) DECLARE_flag(bool, name) 24 | #define DECLARE_int32(name) DECLARE_flag(int32, name) 25 | #define DECLARE_string(name) DECLARE_flag(string, name) 26 | 27 | #endif // RE2_UTIL_FLAGS_H__ 28 | -------------------------------------------------------------------------------- /outside/re2/util/random.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005-2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Modified from Google perftools's tcmalloc_unittest.cc. 6 | 7 | #include "util/random.h" 8 | 9 | namespace re2 { 10 | 11 | int32 ACMRandom::Next() { 12 | const int32 M = 2147483647L; // 2^31-1 13 | const int32 A = 16807; 14 | // In effect, we are computing seed_ = (seed_ * A) % M, where M = 2^31-1 15 | uint32 lo = A * (int32)(seed_ & 0xFFFF); 16 | uint32 hi = A * (int32)((uint32)seed_ >> 16); 17 | lo += (hi & 0x7FFF) << 16; 18 | if (lo > M) { 19 | lo &= M; 20 | ++lo; 21 | } 22 | lo += hi >> 15; 23 | if (lo > M) { 24 | lo &= M; 25 | ++lo; 26 | } 27 | return (seed_ = (int32) lo); 28 | } 29 | 30 | int32 ACMRandom::Uniform(int32 n) { 31 | return Next() % n; 32 | } 33 | 34 | } // namespace re2 35 | -------------------------------------------------------------------------------- /outside/re2/util/random.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005-2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Modified from Google perftools's tcmalloc_unittest.cc. 6 | 7 | #ifndef RE2_UTIL_RANDOM_H__ 8 | #define RE2_UTIL_RANDOM_H__ 9 | 10 | #include "util/util.h" 11 | 12 | namespace re2 { 13 | 14 | // ACM minimal standard random number generator. (re-entrant.) 15 | class ACMRandom { 16 | public: 17 | ACMRandom(int32 seed) : seed_(seed) {} 18 | int32 Next(); 19 | int32 Uniform(int32); 20 | 21 | void Reset(int32 seed) { seed_ = seed; } 22 | 23 | private: 24 | int32 seed_; 25 | }; 26 | 27 | } // namespace re2 28 | 29 | #endif // RE2_UTIL_RANDOM_H__ 30 | -------------------------------------------------------------------------------- /outside/re2/util/test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include 6 | #include 7 | #include "util/test.h" 8 | 9 | DEFINE_string(test_tmpdir, "/var/tmp", "temp directory"); 10 | 11 | struct Test { 12 | void (*fn)(void); 13 | const char *name; 14 | }; 15 | 16 | static Test tests[10000]; 17 | static int ntests; 18 | 19 | void RegisterTest(void (*fn)(void), const char *name) { 20 | tests[ntests].fn = fn; 21 | tests[ntests++].name = name; 22 | } 23 | 24 | namespace re2 { 25 | int64 VirtualProcessSize() { 26 | struct rusage ru; 27 | getrusage(RUSAGE_SELF, &ru); 28 | return (int64)ru.ru_maxrss*1024; 29 | } 30 | } // namespace re2 31 | 32 | int main(int argc, char **argv) { 33 | for (int i = 0; i < ntests; i++) { 34 | printf("%s\n", tests[i].name); 35 | tests[i].fn(); 36 | } 37 | printf("PASS\n"); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /outside/re2/util/thread.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include 6 | 7 | #include "util/util.h" 8 | #include "util/thread.h" 9 | 10 | Thread::Thread() { 11 | pid_ = 0; 12 | running_ = 0; 13 | joinable_ = 0; 14 | } 15 | 16 | Thread::~Thread() { 17 | } 18 | 19 | void *startThread(void *v) { 20 | Thread* t = (Thread*)v; 21 | t->Run(); 22 | return 0; 23 | } 24 | 25 | void Thread::Start() { 26 | CHECK(!running_); 27 | pthread_create(&pid_, 0, startThread, this); 28 | running_ = true; 29 | if (!joinable_) 30 | pthread_detach(pid_); 31 | } 32 | 33 | void Thread::Join() { 34 | CHECK(running_); 35 | CHECK(joinable_); 36 | void *val; 37 | pthread_join(pid_, &val); 38 | running_ = 0; 39 | } 40 | 41 | void Thread::SetJoinable(bool j) { 42 | CHECK(!running_); 43 | joinable_ = j; 44 | } 45 | -------------------------------------------------------------------------------- /outside/re2/util/thread.h: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #ifndef RE2_UTIL_THREAD_H__ 6 | #define RE2_UTIL_THREAD_H__ 7 | 8 | #include 9 | 10 | class Thread { 11 | public: 12 | Thread(); 13 | virtual ~Thread(); 14 | void Start(); 15 | void Join(); 16 | void SetJoinable(bool); 17 | virtual void Run() = 0; 18 | 19 | private: 20 | pthread_t pid_; 21 | bool running_; 22 | bool joinable_; 23 | }; 24 | 25 | #endif // RE2_UTIL_THREAD_H__ 26 | 27 | -------------------------------------------------------------------------------- /outside/re2/util/valgrind.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "util/util.h" 6 | #include "util/valgrind.h" 7 | 8 | namespace re2 { 9 | 10 | #ifndef __has_feature 11 | #define __has_feature(x) 0 12 | #endif 13 | 14 | int RunningOnValgrind() { 15 | #if __has_feature(memory_sanitizer) 16 | return true; 17 | #elif defined(RUNNING_ON_VALGRIND) 18 | return RUNNING_ON_VALGRIND; 19 | #else 20 | return 0; 21 | #endif 22 | } 23 | 24 | } // namespace re2 25 | -------------------------------------------------------------------------------- /urb/urbit.pill: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urbit/archaeology/6b2ce202207b9bb3f4e65fc1ea9a2fb434396dd4/urb/urbit.pill -------------------------------------------------------------------------------- /urb/zod/main/app/demo/core.hook: -------------------------------------------------------------------------------- 1 | !: 2 | ::::::::: Appbug: a simple application. 3 | :: 4 | |_ [hid=hide vat=[%0 p=@ud]] 5 | ++ poke 6 | |= [ost=bone *] 7 | :_ +>(p.vat +(p.vat)) 8 | :~ [ost %give %nice ~] 9 | == 10 | :: 11 | ++ peek 12 | |= [you=ship pax=path] 13 | :- %hymn 14 | ^- manx 15 | ;html 16 | ;head 17 | ;title: Demo! 18 | ;script: urb.appl = '{(trip app.hid)}' 19 | == 20 | ;body 21 | ;p: State is {}. 22 | ;button(onclick "bump()"): (Bump.) 23 | ;script 24 | ; var mess = 0 25 | ; 26 | ; function bump() { 27 | ; xhr = new XMLHttpRequest() 28 | ; xhr.onload = function() { mess++} 29 | ; xhr.open("PUT", "/tim/" + [urb.user, urb.port, mess].join("/")) 30 | ; xhr.setRequestHeader("content-type", "text/json") 31 | ; xyro = {ship: urb.ship, appl: urb.appl, data: {}} 32 | ; xhr.send(JSON.stringify({oryx: urb.oryx, xyro: xyro})) 33 | ; } 34 | == 35 | == 36 | == 37 | -- 38 | 39 | 40 | -------------------------------------------------------------------------------- /urb/zod/main/app/twit/front/hymn.hook: -------------------------------------------------------------------------------- 1 | :: Front page of the twitter app. 2 | :: 3 | :::: /hook/hymn/front/twit/app 4 | :: 5 | /? 314 :: need urbit 314 6 | /= urbit /:/===/lib/urb:/hymn/ :: urbit library (js) 7 | /= style /:/%%%/style:/hymn/ :: stylesheet (css) 8 | /= application /:/%%%/app:/hymn/ :: application (js) 9 | !: 10 | :::: content 11 | :: 12 | ^- manx 13 | ;html 14 | ;head 15 | ;title: Urbit - Twitter Test 16 | ;+ style 17 | ;script 18 | =type "text/javascript" 19 | =src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js" 20 | ; 21 | == 22 | == 23 | ;body 24 | ;div#c 25 | ;div#d 26 | ;div#twet 27 | ;div.author: @urbit_test 28 | ;div.date; 29 | ;textarea#tweetr(placeholder "What would you like to tweet?"); 30 | ;input#submit(type "button", value "Send"); 31 | ;input#length(type "button", value "0/140"); 32 | == 33 | ;div#time: Fetching... 34 | == 35 | == 36 | ;+ urbit 37 | ;+ application 38 | == 39 | == 40 | -------------------------------------------------------------------------------- /urb/zod/main/bin/bang.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bang/hoon 3 | :: produce a bowl with the gift passed in as argument 4 | :: this may blow up urbit, hence "bang" 5 | |= * 6 | |= [giv=gift ~] 7 | ^- bowl 8 | ~[~[giv]] 9 | -------------------------------------------------------------------------------- /urb/zod/main/bin/cat.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/cat/hoon 3 | :: 4 | |= * 5 | |= ape=(list path) 6 | =- ~[-]~ 7 | ^- gift :- %te 8 | %- zing 9 | %+ turn ape |= pax=path 10 | ^- wain 11 | =+ ark=;;(arch .^(%cy pax)) 12 | ?~ q.ark 13 | ?- r.ark 14 | ~ 15 | ~[(crip "No file {(spud pax)}")] 16 | [[@t ~] ~ ~] 17 | $(pax (welp pax /[p.n.r.ark])) 18 | * 19 | ~[(crip "Multiple in {(spud pax)}")] 20 | == 21 | :- (crip (spud pax)) 22 | (lore ;;(,@t .^(%cx pax))) 23 | -------------------------------------------------------------------------------- /urb/zod/main/bin/cd.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/cd/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= [est=time *] 6 | |= arg=$|(~ [p=path ~]) 7 | :_ ~ 8 | ^- (list gift) 9 | ?~ arg 10 | :~ [%cc ~] 11 | [%cs ~] 12 | == 13 | ?. ?=(^ p.arg) ~ 14 | ?. =(i.p.arg (scot %p who)) ~|(%bad-ship !!) 15 | ?. ?=(^ t.p.arg) ~ 16 | =+ gav=(slay i.t.p.arg) 17 | ?. ?=([~ %$ %tas *] gav) ~|(%bad-desk !!) 18 | :- [%ck q.p.u.gav] 19 | ?. ?=(^ t.t.p.arg) ~ 20 | =+ gov=(slay i.t.t.p.arg) 21 | :- :- %cc 22 | ?+ gov ~|(%bad-case !!) 23 | [~ %$ %da *] ?:(=(est q.p.u.gov) ~ [~ %da q.p.u.gov]) 24 | [~ %$ %ud *] [~ %ud q.p.u.gov] 25 | [~ %$ %tas *] [~ %tas q.p.u.gov] 26 | == 27 | [[%cs t.t.t.p.arg] ~] 28 | -------------------------------------------------------------------------------- /urb/zod/main/bin/cp.hoon: -------------------------------------------------------------------------------- 1 | !: :: /=main=/bin/cp/hoon 2 | !? 164 3 | :::: 4 | |= * 5 | |= [input=path output=path ~] 6 | ^- bowl 7 | :::: 8 | :_ ~ :_ ~ 9 | ^- gift 10 | [%ok (foal output .^(%cx input))] 11 | -------------------------------------------------------------------------------- /urb/zod/main/bin/diff.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/toy/cat/hoon 3 | :: 4 | |= * 5 | |= [del=path dev=path ~] 6 | :_ ~ 7 | :_ ~ 8 | ^- gift 9 | =+ [hel=(lore ((hard ,@) .^(%cx del))) hev=(lore ((hard ,@) .^(%cx dev)))] 10 | =+ dis=(loss hel hev) 11 | =+ puc=(lusk hel hev dis) 12 | =+ rev=(lurk hel puc) 13 | =+ ver=(lurk hev (berk puc)) 14 | ?> &(=(rev hev) =(ver hel)) 15 | [%la >puc<] 16 | -------------------------------------------------------------------------------- /urb/zod/main/bin/echo.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/toy/echo/hoon 3 | :: 4 | |= * 5 | |= tan=(list tank) 6 | [(turn tan |=(a=tank [%la a])) ~] 7 | -------------------------------------------------------------------------------- /urb/zod/main/bin/env.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/env/hoon 3 | :: 4 | => .(- [who=`@p`-< how=`path`->]) 5 | |= [est=time eny=@uw] 6 | |= arg=(list) 7 | ^- bowl 8 | :_ ~ 9 | =+ ^= voy ^- (list tape) 10 | :~ "who: {}" 11 | "how: {}" 12 | "est: {}" 13 | "eny: {}" 14 | == 15 | :: 16 | =+ ^= gar 17 | =+ nix=1 18 | |- ^- (list tape) 19 | ?~ arg ~ 20 | :_ $(arg t.arg, nix +(nix)) 21 | "arg: {(pave !>(nix))}: {(pave !>(i.arg))}" 22 | :: 23 | (turn (weld voy gar) |=(a=tape [%la %leaf a])) 24 | -------------------------------------------------------------------------------- /urb/zod/main/bin/hello.hoon: -------------------------------------------------------------------------------- 1 | :: 2 | :: /=main=/bin/hello/hoon 3 | :: 4 | |= * 5 | |= [planet=@ta ~] 6 | ^- bowl 7 | :_ ~ :_ ~ 8 | :- %$ 9 | !>("hello, {(trip planet)}.") 10 | -------------------------------------------------------------------------------- /urb/zod/main/bin/hi.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/toy/hi/hoon 3 | :: 4 | |= * 5 | |= [bud=@p ebb=$|(~ [tex=tape ~])] 6 | ^- bowl 7 | :- :~ [%sq bud %hi /request ?~(ebb '' (rap 3 tex.ebb))] 8 | == 9 | :- ~ 10 | :- ^- (list slip) 11 | :~ [/request [%ow ~]] 12 | [/prompt [%up %none "waiting for {(scow %p bud)}" ~]] 13 | == 14 | |= [now=@da pax=path nut=note] 15 | ?> =(/request pax) 16 | ?> ?=(%ow -.nut) 17 | :- ?: =(%good p.nut) 18 | ~ 19 | :_ ~ 20 | :- %ha 21 | :- %leaf 22 | "hi: {(scow %p bud)} rejected a message" 23 | ~ 24 | -------------------------------------------------------------------------------- /urb/zod/main/bin/into.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | |= [a=path b=* ~] 3 | ~[ok/(foal a b)]~ 4 | -------------------------------------------------------------------------------- /urb/zod/main/bin/label.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/label/hoon 3 | :: 4 | |= * 5 | |= [syd=@tas lab=@tas ~] 6 | ^- bowl 7 | :_ ~ 8 | :~ [%ok syd %| lab] 9 | == 10 | -------------------------------------------------------------------------------- /urb/zod/main/bin/ls.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/ls/hoon 3 | :: 4 | |= * 5 | |= [pax=path ~] 6 | :_ ~ 7 | ^- (list gift) 8 | =+ lon=((hard arch) .^(%cy pax)) 9 | ?: =(~ r.lon) ~ 10 | :_ ~ 11 | :- %la 12 | :+ %rose [" " "" ""] 13 | (turn (~(tap by r.lon) ~) |=([a=@ta b=*] [%leaf (trip a)])) 14 | -------------------------------------------------------------------------------- /urb/zod/main/bin/mv.hoon: -------------------------------------------------------------------------------- 1 | !: :: /=main=/bin/mv/hoon 2 | !? 164 3 | :::: 4 | |= * 5 | |= [input=path output=path ~] 6 | ^- bowl 7 | :::: 8 | :_ ~ :_ ~ 9 | ^- gift 10 | [%ok (furl (foal output .^(%cx input)) (fray input))] 11 | -------------------------------------------------------------------------------- /urb/zod/main/bin/none.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/none/hoon 3 | :: 4 | |= * 5 | |= * 6 | ^- bowl 7 | [~ ~] 8 | -------------------------------------------------------------------------------- /urb/zod/main/bin/pope.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/pope/hoon 3 | :: 4 | => .(+ =>(+ ^/===/lib/pony)) 5 | |= [est=time *] 6 | |= [who=@p ~] 7 | ^- bowl 8 | %+ (polo %pass "passphrase: " ~ ~) 9 | (boss 256 (more gon qit)) 10 | |= [now=@da fra=@] 11 | %+ pomp "generating carrier {(scow %p who)} (#{(scow %ud who)})" 12 | %- (posh (add ~s1 now)) 13 | |= now=@da 14 | :_ ~ 15 | =+ bur=(shax (add who (shax fra))) 16 | =+ arc=(brew 2.048 bur) 17 | :~ [%la %leaf "generator: {(scow %uw bur)}"] 18 | [%la %leaf "fingerprint: {(scow %uw fig:ex:arc)}"] 19 | == 20 | -------------------------------------------------------------------------------- /urb/zod/main/bin/ram.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/ram/hoon 3 | :: 4 | => .(- `[who=@p how=path]`-) 5 | |= * 6 | |= ape=(list path) 7 | =+ ^= maw ^- (list slip) 8 | :~ [~ %$ %noun] 9 | == 10 | :- ~ :- ~ 11 | :- maw 12 | |= [now=@da pax=path nut=note] 13 | ^- bowl 14 | ?+ -.nut [~ ~ maw ..$] 15 | %$ 16 | ?~ p.nut [~ ~] 17 | =| giv=(list gift) 18 | |- ^- bowl 19 | ?: |(?=(~ ape) ?=(~ q.u.p.nut)) 20 | [giv ~ maw ..^$] 21 | =+ pax=i.ape 22 | ?> ?=([@ @ @ *] pax) 23 | ?> &(=(i.pax (scot %p who)) =(i.t.t.pax (scot %da now))) 24 | %= $ 25 | ape t.ape 26 | giv 27 | :_ giv 28 | ^- gift 29 | :+ %ok i.t.pax 30 | ^- nori 31 | :- %& 32 | ^- soba 33 | :_ ~ 34 | :- t.t.t.pax 35 | ^- miso 36 | =+ lon=((hard arch) .^(%cy pax)) 37 | ?~ q.lon 38 | =+ fil=(file pax) 39 | ?~ fil 40 | [%ins i.q.u.p.nut] 41 | [%mut %a %a u.fil i.q.u.p.nut] 42 | == 43 | == 44 | -------------------------------------------------------------------------------- /urb/zod/main/bin/rat.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/rat/hoon 3 | :: 4 | |= * 5 | |= ape=(list path) 6 | :_ ~ 7 | :_ ~ 8 | ^- gift 9 | :+ %mu %noun 10 | |- ^- (list) 11 | ?~ ape ~ 12 | [.^(%cx i.ape) $(ape t.ape)] 13 | -------------------------------------------------------------------------------- /urb/zod/main/bin/reboot.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/fun/reboot/hoon 3 | :: 4 | => .(- `[who=@p how=path]`-) 5 | |= [est=time eny=@uw] 6 | |= arg=* 7 | =+ ^= lok ^- case 8 | ?: =(~ arg) [%da est] 9 | ?> =(~ +.arg) 10 | ((hard case) -.arg) 11 | =+ pre=`path`[(scot %p who) %arvo ~(rent co %$ (dime lok)) ~] 12 | =+ ^= vay ^- (list ,[p=@tas q=@tas]) 13 | :~ [%$ %zuse] 14 | [%a %ames] 15 | [%b %batz] 16 | [%c %clay] 17 | [%d %dill] 18 | [%e %eyre] 19 | [%f %ford] 20 | [%g %gall] 21 | == 22 | :_ ~ 23 | %+ turn vay 24 | |= [saw=@tas nam=@tas] 25 | =+ pax=(weld pre `path`[nam ~]) 26 | =+ txt=.^(%cx (weld pax `path`[%hoon ~])) 27 | [%xx [%veer saw pax txt]] 28 | -------------------------------------------------------------------------------- /urb/zod/main/bin/reload.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/reload/hoon 3 | :: 4 | => .(- `[who=@p how=path]`-) 5 | |= [est=time *] 6 | |= all=(list ,@tas) 7 | :_ ~ 8 | ^- (list gift) 9 | %+ turn all 10 | |= nam=@tas 11 | ^- gift 12 | =+ tip=(end 3 1 nam) 13 | =+ pax=[(scot %p who) %arvo (scot %da est) nam %hoon ~] 14 | [%xx %veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx pax))] 15 | -------------------------------------------------------------------------------- /urb/zod/main/bin/report.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/report/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= * 6 | |= [bud=@p ~] 7 | ^- bowl 8 | :_ ~ 9 | :~ :: [%la ((hard tank) .^(%c /(scot %p bud)/show=))] 10 | [%la ((hard tank) .^(%a /(scot %p who)/show=/(scot %p bud)))] 11 | == 12 | -------------------------------------------------------------------------------- /urb/zod/main/bin/reset.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/fun/reset/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= [est=time *] 6 | |= arg=* 7 | =+ ^= lok ^- case 8 | ?: =(~ arg) [%da est] 9 | ?> =(~ +.arg) 10 | ((hard case) -.arg) 11 | =+ cav=(scot (dime lok)) 12 | =+ top=`path`[(scot %p who) %arvo cav ~] 13 | =+ pax=`path`(weld top `path`[%hoon ~]) 14 | :_ ~ 15 | :- [%xx %vega pax] 16 | ^- (list gift) 17 | =+ ^= vay ^- (list ,[p=@tas q=@tas]) 18 | :~ [%$ %zuse] 19 | [%a %ames] 20 | [%b %batz] 21 | [%c %clay] 22 | [%d %dill] 23 | [%e %eyre] 24 | [%f %ford] 25 | [%g %gall] 26 | == 27 | %+ turn vay 28 | |= [a=@tas b=@tas] 29 | =+ pax=(weld top `path`[b ~]) 30 | =+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~]))) 31 | `gift`[%xx %veer a pax txt] 32 | -------------------------------------------------------------------------------- /urb/zod/main/bin/rm.hoon: -------------------------------------------------------------------------------- 1 | !: :: /=main=/bin/rm/hoon 2 | !? 164 3 | :::: 4 | |= * 5 | |= files=(list path) 6 | ^- bowl 7 | :::: 8 | :_ ~ 9 | =+ cag=(turn files fray) 10 | ?~ cag ~ 11 | :_ ~ 12 | :- %ok 13 | |- ^- toro 14 | ?~ t.cag i.cag 15 | (furl i.t.cag $(t.cag t.t.cag)) 16 | -------------------------------------------------------------------------------- /urb/zod/main/bin/secret.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/secret/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= [est=time *] 6 | |= ~ 7 | ^- bowl 8 | :_ ~ :_ ~ 9 | [%la %leaf (scow %p (,@p .^(%a (scot %p who) %code (scot %da est) ~)))] 10 | -------------------------------------------------------------------------------- /urb/zod/main/bin/set.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/set/hoon 3 | :: 4 | |= * 5 | |= [nam=@tas ~] 6 | =+ ^= rod ^- (list slip) 7 | :~ [~ %$ %noun] 8 | == 9 | :- ~ :- ~ 10 | :- rod 11 | |= [now=@da pax=path nut=note] 12 | ^- bowl 13 | ?> ?=(%$ -.nut) 14 | ?~ p.nut 15 | :_ ~ 16 | :~ [%va nam ~] 17 | == 18 | ?~ q.u.p.nut 19 | [~ ~ rod ..$] 20 | :_ ~ 21 | :~ [%va nam ~ p.u.p.nut -.q.u.p.nut] 22 | == 23 | -------------------------------------------------------------------------------- /urb/zod/main/bin/solid.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/solid/hoon 3 | :: 4 | => .(- `[who=@p how=path]`-) 5 | |= [est=time eny=@uw] 6 | |= arg=* 7 | =+ ^= lok ^- case 8 | ?: =(~ arg) [%da est] 9 | ?> =(~ +.arg) 10 | ((hard case) -.arg) 11 | =+ cav=(scot (dime lok)) 12 | =+ top=`path`[(scot %p who) %arvo cav ~] 13 | =+ pax=`path`(weld top `path`[%hoon ~]) 14 | ~& %solid-start 15 | =+ gen=(reck pax) 16 | ~& %solid-parsed 17 | =+ ken=q:(~(mint ut %noun) %noun gen) 18 | ~& %solid-compiled 19 | =+ ^= all 20 | =+ all=.*(0 ken) 21 | =+ ^= vay ^- (list ,[p=@tas q=@tas]) 22 | :~ [%$ %zuse] 23 | [%f %ford] 24 | [%a %ames] 25 | [%b %batz] 26 | [%c %clay] 27 | [%d %dill] 28 | [%e %eyre] 29 | [%g %gall] 30 | == 31 | |- ^+ all 32 | ?~ vay all 33 | =+ pax=(weld top `path`[q.i.vay ~]) 34 | =+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~]))) 35 | =+ sam=[est `ovum`[[%gold ~] [%veer p.i.vay pax txt]]] 36 | ~& [%solid-veer i.vay] 37 | =+ gat=.*(all .*(all [0 42])) 38 | =+ nex=+:.*([-.gat [sam +>.gat]] -.gat) 39 | $(vay t.vay, all nex) 40 | :_ ~ :_ ~ 41 | :: ~& %solid-jamming 42 | :: =+ pac=(jam [ken all]) 43 | :: ~& %solid-finished 44 | :: [%xx %save [%urbit %pill ~] pac] 45 | [%xx %sage [%urbit %pill ~] [ken all]] 46 | -------------------------------------------------------------------------------- /urb/zod/main/bin/sys.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/toy/sys/hoon 3 | :: 4 | |= * 5 | |= [pax=path fav=card ~] 6 | [[[%xy pax fav] ~] ~] 7 | -------------------------------------------------------------------------------- /urb/zod/main/bin/thumb.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/thumb/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= * 6 | |= [bud=@p ~] 7 | ^- bowl 8 | :_ ~ 9 | =+ dub=(scot %p bud) 10 | =+ wyl=((hard will) .^(%a /=will=/[dub])) 11 | ?~ wyl 12 | [[%la %leaf "no will for {(trip dub)}"] ~] 13 | [[%la >q.q.q.i.wyl<] ~] 14 | -------------------------------------------------------------------------------- /urb/zod/main/bin/ticket.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/ticket/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= [est=time *] 6 | |= arg=* 7 | ^- bowl 8 | :_ ~ 9 | =+ ^= fir ^- [p=@p q=@ud] 10 | ?: ?=([@ ~] arg) 11 | [-.arg 1] 12 | ?: ?=([@ @ ~] arg) 13 | [-.arg +<.arg] 14 | ~|(%ticket-arg !!) 15 | ?> =(who (sein p.fir)) 16 | =+ ^= sep ^- @ 17 | =+ mir=(clan p.fir) 18 | ?+ mir ~|(%ticket-clan !!) 19 | %king (bex 8) 20 | %duke (bex 16) 21 | %earl (bex 32) 22 | == 23 | |- ^- (list gift) 24 | ?: =(0 q.fir) ~ 25 | =+ tic=(,@p .^(%a (scot %p who) %tick (scot %da est) (scot %p p.fir) ~)) 26 | :- [%la %leaf "{}: {}"] 27 | $(p.fir (add sep p.fir), q.fir (dec q.fir)) 28 | -------------------------------------------------------------------------------- /urb/zod/main/bin/tree.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /===/bin/tree/hoon 3 | |= ^ 4 | |= [pax=path fla=$|(~ [%full ~])] 5 | =- ~[te/-]~ 6 | =+ len=(lent pax) 7 | =+ rend=?~(fla |=(a=path +:(spud (slag len a))) spud) 8 | |- ^- wain 9 | =+ ark=;;(arch .^(cy/pax)) 10 | =- ?~ q.ark - 11 | [(crip (rend pax)) -] 12 | %- zing 13 | %+ turn (~(tap by r.ark)) 14 | |=([a=@t ~] ^$(pax (weld pax `path`/[a]))) 15 | -------------------------------------------------------------------------------- /urb/zod/main/bin/type.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/type/hoon 3 | :: 4 | |= * 5 | |= ~ 6 | :- ~ :- ~ 7 | :- ^- (list slip) 8 | :~ [~ %$ %noun] 9 | == 10 | |= [now=@da pax=path nut=note] 11 | ^- bowl 12 | :_ ~ 13 | ?+ -.nut !! 14 | %$ 15 | ?~ p.nut 16 | ~ 17 | %+ weld 18 | (turn q.u.p.nut |=(a=* [%la (sell p.u.p.nut a)])) 19 | `(list gift)`[[%la (skol p.u.p.nut)] ~] 20 | == 21 | -------------------------------------------------------------------------------- /urb/zod/main/bin/verb.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/verb/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= [est=time *] 6 | |= ~ 7 | ^- bowl 8 | [[%xx %verb ~]~ ~] 9 | -------------------------------------------------------------------------------- /urb/zod/main/bin/wipe.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/wipe/hoon 3 | :: 4 | =* our -< 5 | |= * 6 | |= gon=[term (pole term)] 7 | :_ ~ 8 | %+ turn `(list term)`gon 9 | |= app=term 10 | ^- gift 11 | [%xy /g %wipe [our app]] -------------------------------------------------------------------------------- /urb/zod/main/bin/with.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/with/hoon 3 | :: 4 | |= [est=@da *] 5 | |= arg=(list path) 6 | ^- bowl 7 | :_ ~ 8 | ^- (list gift) 9 | =< abet 10 | |% 11 | ++ abet ?:(=(~ arg) [[%sc ~] ~] (turn arg |=(a=path `gift`[%sc ~ (with a)]))) 12 | ++ with 13 | |= pax=path ^- skit 14 | ?> ?=([@ @ @ *] pax) 15 | :+ ?:(=((scot %da est) i.t.t.pax) ~ [~ i.t.t.pax]) 16 | [i.pax i.t.pax ~] 17 | t.t.t.pax 18 | -- 19 | -------------------------------------------------------------------------------- /urb/zod/main/bin/ye.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/toy/hi/hoon 3 | :: 4 | => .(-< `who=@p`-<) 5 | |= * 6 | |= [ebb=$|(~ [tex=tape ~])] 7 | =+ bud=(sein who) 8 | ^- bowl 9 | :- :~ [%sq bud %ye /request ?~(ebb '' (rap 3 tex.ebb))] 10 | == 11 | :- ~ 12 | :- ^- (list slip) 13 | :~ [/request [%ow ~]] 14 | [/prompt [%up %none "waiting for {(scow %p bud)}" ~]] 15 | == 16 | |= [now=@da pax=path nut=note] 17 | ?> =(/request pax) 18 | ?> ?=(%ow -.nut) 19 | :- ?: =(%good p.nut) 20 | ~ 21 | :_ ~ 22 | :- %ha 23 | :- %leaf 24 | "hi: {(scow %p bud)} rejected a message" 25 | ~ 26 | -------------------------------------------------------------------------------- /urb/zod/main/lib/example/core.hook: -------------------------------------------------------------------------------- 1 | |% 2 | ++ fib |=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) 3 | -- 4 | 5 | 6 | -------------------------------------------------------------------------------- /urb/zod/main/mar/css/door.hook: -------------------------------------------------------------------------------- 1 | |_ mud=@t 2 | ++ grow 3 | |% ++ mime [/text/css (taco mud)] 4 | ++ hymn ;style 5 | ;- (trip mud) 6 | == 7 | -- 8 | -- 9 | -------------------------------------------------------------------------------- /urb/zod/main/mar/hook/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hook/door/hook/mar 3 | :: 4 | /? 314 5 | |_ own=@t 6 | :: 7 | ++ grow :: convert to 8 | |% 9 | ++ mime [/text/html (taco own)] :: convert to %mime 10 | ++ hymn ;div:(pre:"{(trip own)}") :: convert to %html 11 | -- 12 | -- 13 | -------------------------------------------------------------------------------- /urb/zod/main/mar/html/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/html/pro 3 | :: 4 | /? 314 5 | :: 6 | :::: compute 7 | :: 8 | |_ htm=@t 9 | :: 10 | ++ grow :: convert to 11 | |% :: 12 | ++ mime [/text/html (met 3 htm) htm] :: to %mime 13 | ++ hymn (rash htm apex:xmlp) :: to %hymn 14 | -- :: 15 | -- 16 | 17 | -------------------------------------------------------------------------------- /urb/zod/main/mar/hymn/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/hymn/pro 3 | :: 4 | /? 314 5 | |_ own=manx 6 | :: 7 | ++ grow :: convert to 8 | |% 9 | ++ html (crip (xmlt | own ~)) :: convert to %html 10 | ++ mime [/text/html (taco html)] :: convert to %mime 11 | -- 12 | -- 13 | -------------------------------------------------------------------------------- /urb/zod/main/mar/js/door.hook: -------------------------------------------------------------------------------- 1 | |_ mud=@t 2 | ++ grow 3 | |% ++ mime [/application/javascript (taco mud)] 4 | ++ hymn ;script 5 | ;- (trip mud) 6 | == 7 | -- 8 | -- 9 | -------------------------------------------------------------------------------- /urb/zod/main/mar/json/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/hymn/pro 3 | :: 4 | /? 314 5 | :: 6 | :::: compute 7 | :: 8 | |_ jon=json 9 | :: 10 | ++ grow :: convert to 11 | |% 12 | ++ mime :: convert to %mime 13 | =+ htm=(crip (pojo jon)) 14 | [/text/html (taco htm)] 15 | -- 16 | -- 17 | 18 | -------------------------------------------------------------------------------- /urb/zod/main/mar/md/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/md/pro 3 | :: 4 | /? 314 5 | |_ mud=@t 6 | ++ garb [%down ~] 7 | -- 8 | -------------------------------------------------------------------------------- /urb/zod/main/mar/mime/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/mime/pro 3 | :: 4 | /? 314 5 | |_ own=[p=mite q=octs] 6 | ++ grab 7 | |% 8 | ++ noun :: convert from %noun 9 | |= src=* 10 | ^+ +>+ 11 | +>+(own (,[mite octs] src)) 12 | -- 13 | -- 14 | -------------------------------------------------------------------------------- /urb/zod/main/mar/psal/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/psal/pro 3 | :: 4 | /? 314 5 | |_ own=manx 6 | :: 7 | ++ grow :: convert to 8 | |% 9 | ++ html (crip (xmlt | own ~)) :: convert to %html 10 | ++ mime [/text/html (taco html)] :: convert to %mime 11 | -- 12 | -- 13 | -------------------------------------------------------------------------------- /urb/zod/main/mar/user/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/user/pro 3 | :: 4 | /? 314 5 | /- user 6 | |_ use=user 7 | :: 8 | ++ grab :: convert from 9 | |% 10 | ++ noun :: convert from %noun 11 | |= src=* 12 | ^+ +>+ 13 | +>+(use (user src)) 14 | -- 15 | -- 16 | -------------------------------------------------------------------------------- /urb/zod/main/mar/users/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/users/pro 3 | :: 4 | /? 314 5 | /- users 6 | |_ use=users 7 | :: 8 | ++ grab :: convert from 9 | |% 10 | ++ noun :: convert from %noun 11 | |= src=* 12 | ^+ +>+ 13 | +>+(use (users src)) 14 | -- 15 | -- 16 | -------------------------------------------------------------------------------- /urb/zod/main/mar/zing/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/zing/pro 3 | :: 4 | /? 314 5 | /- zing 6 | |_ zig=zing 7 | :: 8 | ++ grab :: convert from 9 | |% 10 | ++ noun :: convert from %noun 11 | |= src=* 12 | ^+ +>+ 13 | +>+(zig (zing src)) 14 | -- 15 | -- 16 | -------------------------------------------------------------------------------- /urb/zod/main/mar/zong/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/zong/pro 3 | :: 4 | /? 314 5 | /- zong 6 | |_ zog=zong 7 | :: 8 | ++ grab :: convert from 9 | |% 10 | ++ noun :: convert from %noun 11 | |= src=* 12 | ^+ +>+ 13 | +>+(zog (zong src)) 14 | -- 15 | -- 16 | -------------------------------------------------------------------------------- /urb/zod/main/mar/zongs/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/zing/pro 3 | :: 4 | /? 314 5 | /- zong 6 | |_ zos=(list zong) 7 | :: 8 | ++ grab :: convert from 9 | |% 10 | ++ noun :: convert from %noun 11 | |= src=* 12 | ^+ +>+ 13 | +>+(zos ((list zong) src)) 14 | -- 15 | :: 16 | ++ grow :: convert to 17 | |% 18 | ++ hymn :: convert to %hymn 19 | ^- manx 20 | ;html 21 | ;head 22 | ;title: Zongs! 23 | == 24 | ;body ;table 25 | ;* %+ turn (flop zos) 26 | |= zog=zong 27 | =. p.zog (lsh 6 1 (rsh 6 1 p.zog)) :: round off subsecond 28 | ;tr ;td: {} 29 | ;td: {} 30 | ;+ ?- -.r.zog 31 | %do 32 | ;td: {(trip p.r.zog)} 33 | %say 34 | ;td: & {(trip p.r.zog)} 35 | %exp 36 | ;td 37 | ;code:"{(trip p.r.zog)}" 38 | ; \a0 {~(ram re q.r.zog)} 39 | == == 40 | == == 41 | == == 42 | ++ html 43 | (crip (xmlt | hymn ~)) 44 | ++ mime 45 | [/text/html (taco html)] 46 | -- 47 | -- 48 | -------------------------------------------------------------------------------- /urb/zod/main/mar/zung/door.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/core/zung/pro 3 | :: 4 | /? 314 5 | /- zung 6 | |_ zig=zung 7 | :: 8 | ++ grab :: convert from 9 | |% 10 | ++ noun :: convert from %noun 11 | |= src=* 12 | ^+ +>+ 13 | +>+(zig (zung src)) 14 | -- 15 | -- 16 | 17 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/fun/five/hymn.hook: -------------------------------------------------------------------------------- 1 | /= ctx /$ |=([p=beam q=path] +<) 2 | :: 3 | ;html 4 | ;head 5 | ;title: Fun Experiment Five 6 | == 7 | ;body 8 | ;p: This page was built at {<(tope p.ctx)>}. 9 | ;br; 10 | ;p: The remainder path was {}. 11 | == 12 | == 13 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/fun/four/hymn.hook: -------------------------------------------------------------------------------- 1 | /= gas /$ fuel 2 | :: 3 | =+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) 4 | =+ fib=|=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) 5 | :: 6 | ;html 7 | ;head 8 | ;title: Fun Experiment Four 9 | == 10 | ;body 11 | ;p: Welcome, {}! 12 | ;+ ?~ arg 13 | ;p: Usage: ?number=x 14 | ;p ; This is an ;{i "HTML file"} which 15 | ; computes the Fibonacci number 16 | ; of {}: {<(fib u.arg)>}. 17 | == 18 | == 19 | == 20 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/fun/one.md: -------------------------------------------------------------------------------- 1 | This is a *fun experiment* in markdown. 2 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/fun/three/hymn.hook: -------------------------------------------------------------------------------- 1 | =+ fib=|=(x=@ ?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2))))) 2 | ;html 3 | ;head ;title: Fun Experiment Three 4 | == 5 | ;body 6 | ;p ; This is an ;{i "HTML file"} which 7 | ; computes the Fibonacci number 8 | ; of 12: {<(fib 12)>}. 9 | == 10 | == 11 | == 12 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/fun/two/down.hook: -------------------------------------------------------------------------------- 1 | :~ :- %par 2 | :~ tex/"This is a " 3 | emp/bent/~[tex/"fun experiment "] 4 | tex/"in markdown; 2 + 2 is {<(add 2 2)>}." 5 | == == 6 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/five/down.hook: -------------------------------------------------------------------------------- 1 | /- down 2 | ^- down 3 | :~ :- %par 4 | :~ tex/"This is a " 5 | emp/bent/~[tex/"fun experiment "] 6 | tex/"in markdown; 2 + 2 is {<(add 2 2)>}." 7 | == == 8 | 9 | 10 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/four/hymn.hook: -------------------------------------------------------------------------------- 1 | :: This fourth experiment is profoundly biblical. 2 | :: 3 | :::: /hoon/four/mad/fab/pub 4 | :: 5 | /= bible /: /======/res/bible 6 | /; |= a=(list (pair ,@ manx)) 7 | (turn a |=([* b=manx] b)) 8 | /@ 9 | /hymn/ 10 | :: 11 | :::: ~tasfyn-partyv 12 | :: 13 | !: 14 | ;html 15 | ;head 16 | ;title: Mad Experiment Four 17 | == 18 | ;body 19 | ;* bible 20 | == 21 | == 22 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/one/hymn.hook: -------------------------------------------------------------------------------- 1 | :: Our first experiment with major hood runes. 2 | :: 3 | :::: /hoon/one/mad/src/pub 4 | :: 5 | /= gas /$ fuel 6 | // /===/pub/src/mad/fib 7 | :: 8 | :::: ~tasfyn-partyv 9 | :: 10 | =+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) 11 | :: 12 | ;html 13 | ;head 14 | ;title: Mad Experiment One 15 | == 16 | ;body 17 | ;+ ?~ arg 18 | ;p: Usage: ?number=x 19 | ;p ; This is an ;{i "HTML file"} which 20 | ; computes the Fibonacci number 21 | ; of {}: {<(fib u.arg)>}. 22 | == 23 | == 24 | == 25 | 26 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/res/bible/1.html: -------------------------------------------------------------------------------- 1 |

The earth was without form, and void.

2 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/res/bible/2.html: -------------------------------------------------------------------------------- 1 |

Then Cain slew Abel.

2 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/res/bible/3.html: -------------------------------------------------------------------------------- 1 |

I bring not peace, but a sword.

2 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/res/bible/4.html: -------------------------------------------------------------------------------- 1 |

And I saw a pale horse, and upon him a pale rider.

2 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/res/hello/hymn.hook: -------------------------------------------------------------------------------- 1 | ;p: Hello, world. 2 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/six/hymn.hook: -------------------------------------------------------------------------------- 1 | :: Our sixth experiment with major hood runes. 2 | :: 3 | :::: /hoon/six/mad/fab/pub 4 | :: 5 | /+ example 6 | /= gas /$ fuel 7 | :: 8 | :::: ~tasfyn-partyv 9 | :: 10 | =+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) 11 | ;html 12 | ;head 13 | ;title: Mad Experiment Two 14 | == 15 | ;body 16 | ;+ ?~ arg 17 | ;p: Usage: ?number=x 18 | ;p ; This is an ;{i "HTML file"} which 19 | ; computes the Fibonacci number 20 | ; of {}: {<(fib u.arg)>}. 21 | == 22 | == 23 | == 24 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/three/hymn.hook: -------------------------------------------------------------------------------- 1 | :: This third experiment wears the horns. 2 | :: 3 | :::: /hoon/three/mad/fab/pub 4 | :: 5 | /= hello /^ manx /:/======/res/hello:/hymn/ 6 | :: 7 | :::: ~tasfyn-partyv 8 | :: 9 | ;html 10 | ;head 11 | ;title: Mad Experiment Three 12 | == 13 | ;body 14 | ;+ hello 15 | == 16 | == 17 | 18 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/mad/two/hymn.hook: -------------------------------------------------------------------------------- 1 | :: Our second experiment with major hood runes. 2 | :: 3 | :::: /hoon/two/mad/src/pub 4 | :: 5 | /= gas /$ fuel 6 | // /===/pub/src/mad/tools 7 | :: 8 | :::: ~tasfyn-partyv 9 | :: 10 | =+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) 11 | :: 12 | ;html 13 | ;head 14 | ;title: Mad Experiment Two 15 | == 16 | ;body 17 | ;+ ?~ arg 18 | ;p: Usage: ?number=x 19 | ;p ; This is an ;{i "HTML file"} which 20 | ; computes the Fibonacci number 21 | ; of {}: {<(fib u.arg)>}. 22 | == 23 | == 24 | == 25 | 26 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/ref/foreword/hymn.hook: -------------------------------------------------------------------------------- 1 | 2 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 3 | /= bod /^ manx /: /===/pub/src/doc/ref/nock /psal/ 4 | :: 5 | :::: ~tomsyt-balsen 6 | :: 7 | ;html 8 | ;head 9 | ;title: Urbit: Personal Cloud Computing 10 | ;style:"{(trip sty)}" 11 | == 12 | ;body 13 | ;div(class "content container") 14 | ;div.subpage 15 | ;+ bod 16 | == 17 | == 18 | == 19 | == 20 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/ref/vol0/hymn.hook: -------------------------------------------------------------------------------- 1 | /= bod /^ manx /: /===/pub/src/doc/ref/vol0 /psal/ 2 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/ref/vol1/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/ref/vol1 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/ref/vol2/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/ref/vol2 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/ref/vol3/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/ref/vol3 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/ref/vol4/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/ref/vol4 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/arvo1/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/arvo/1 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/arvo2/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/arvo/2 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/arvo3/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/arvo/app /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/arvo4/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/arvo/pub2 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/arvo5/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/arvo/pub3 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/demo/hymn.hook: -------------------------------------------------------------------------------- 1 | /= bod /^ manx /: /===/app/twit/core /hymn/ 2 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon1/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/1 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon2/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/2 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon3/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/3 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon4/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/4 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon5/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/5 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon6/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/6 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/hoon7/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/hoon/7 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/nock1/hymn.hook: -------------------------------------------------------------------------------- 1 | /= bod /^ manx /: /===/pub/src/doc/say/nock/1 /psal/ 2 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/nock2/hymn.hook: -------------------------------------------------------------------------------- 1 | /= bod /^ manx /: /===/pub/src/doc/say/nock/2 /psal/ 2 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/nock3/hymn.hook: -------------------------------------------------------------------------------- 1 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 2 | /= bod /^ manx /: /===/pub/src/doc/say/nock/3 /psal/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/fab/site/tut/setup/hymn.hook: -------------------------------------------------------------------------------- 1 | /= bod /^ manx /: /===/pub/src/doc/say/setup /psal/ 2 | /= sty /^ @t /: /===/pub/fab/site/styles /css/ 3 | :: 4 | :::: ~tomsyt-balsen 5 | :: 6 | ;html 7 | ;head 8 | ;title: Urbit: Personal Cloud Computing 9 | ;style:"{(trip sty)}" 10 | == 11 | ;body 12 | ;div(class "content container") 13 | ;div.subpage 14 | ;+ bod 15 | == 16 | == 17 | == 18 | == 19 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | One basic human instinct is the urge to form political tribes. 3 | In a network that fights this need, these tribes form anyway and 4 | they form badly. Urbit designs them into the infrastructure. 5 | Inspired by the Qing Dynasty, you'll align yourself with one of 6 | five colored "banners" - %red, %blue, %orange, %black or %white. 7 | 8 | Political discourse across tribal boundaries is almost always an 9 | antisocial act - less communication, than symbolic violence. In 10 | Urbit, messages marked political stay within your own banner; 11 | your friends in other banners simply won't see them. Between 12 | banners, politics doesn't erode apolitical relationships; inside 13 | each banner, political discourse is harmonious and productive. 14 | 15 | Pick a banner by the adjective you feel best describes you: 16 | 17 | %red far left: radical, anarchist 18 | %blue center-left: moderate, liberal 19 | %orange center-right: conservative, libertarian 20 | %black far right: traditionalist, reactionary 21 | 22 | Or if digital agitation isn't your cup of tea, choose %white, and 23 | your Urbit experience will remain politics-free. 24 | 25 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/entropy.txt: -------------------------------------------------------------------------------- 1 | 2 | Enter a passphrase or other unusual text. You (or your enemies) 3 | can regenerate your ship from this entropy. 4 | 5 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/govt.txt: -------------------------------------------------------------------------------- 1 | 2 | Enter 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/identity.txt: -------------------------------------------------------------------------------- 1 | 2 | Please select one of the pre-chosen forms: 3 | 4 | %lady female-identified individual 5 | %lord male-identified individual 6 | %punk opaque handle 7 | %anon totally anonymous 8 | 9 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/language.txt: -------------------------------------------------------------------------------- 1 | 2 | What language would your ship rather speak? Enter it as a 3 | two-letter (ISO 639-1) code, like "en" for English. Whatever 4 | language you pick, it'll all be English now, but in future 5 | we'll be more sensitive to your needs. 6 | 7 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/location.txt: -------------------------------------------------------------------------------- 1 | 2 | Where are you? This is totally optional, but we'd like to 3 | know your vague general location. You can enter nothing at 4 | all, just a country code, or country and postal code. 5 | 6 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/name.txt: -------------------------------------------------------------------------------- 1 | 2 | Please tell us your name - and please make it a real name. 3 | Pseudonyms are totally cool, but please use %punk. Middle 4 | name and nickname are optional. Ünicode is encouraged. 5 | 6 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/person.txt: -------------------------------------------------------------------------------- 1 | 2 | You've selected a personal identity. For a %lord or a %lady, 3 | please use your real name only. If you'd prefer a fictitious 4 | handle, you can hit ^D and start over as a %punk. Or you can 5 | use %anon and go by your ship name alone. 6 | 7 | As a real person, we're going to ask you for a little bit of 8 | personal information - not enough to compromise your privacy, 9 | just enough to make everyone on Urbit feel like a neighbor. 10 | 11 | What we're going to ask you for is information that's (a) 12 | public (would be obvious, or at least easy to guess, for 13 | someone who met you in person); (b) durable (doesn't change 14 | often); and (c) relevant (helps you connect with friends). 15 | 16 | For example, we'll ask for the year (not day) you were born, 17 | because your age is easy to guess in person, doesn't change, 18 | and has a big effect on how people perceive you. 19 | 20 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/ship.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/ticket.txt: -------------------------------------------------------------------------------- 1 | 2 | You should already have a ticket (invitation code). 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/begin/warning.txt: -------------------------------------------------------------------------------- 1 | 2 | Let's configure your identity. Warning - it's nontrivial to 3 | change this data once you've sent it to the server. If you enter 4 | something wrong, hit ^D to cancel, then run the program again. 5 | 6 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/chat/help.txt: -------------------------------------------------------------------------------- 1 | prompts: 2 | & broadcast message to station 3 | ~ship private message to ship 4 | 5 | type the prompt, then the message. ex: to send to ~hoclur-bicrel, type 6 | "~hoclur-bicrel hello mars". prompt changes are persistent. 7 | 8 | actions: 9 | @ send message in third person (irc /me) 10 | # evaluate expression (ex: "#(add 2 2)") 11 | 12 | other: 13 | = show ships in current station 14 | \\ 5 show recent backlog (last n messages) 15 | \\ ~m5 show recent backlog (using @dr syntax) 16 | \\ ~2014.07.04 show recent backlog (using @da syntax) 17 | 18 | command-line parameters: 19 | [%tower ~hoclur-bicrel] select haus server (default: ticketing ship) 20 | [%s /mars] select a station (default: /) 21 | %monitor display entrance and exit notices 22 | %quiet do not display entrance and exit notices 23 | %leet only display ship names 24 | %noob display ship and textual names 25 | %time display timestamps for messages 26 | 27 | only one of %monitor and %quiet may be specfied. default behavior is %quiet. 28 | only one of %leet and %noob may be specified. default behavior is %leet. 29 | 30 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/K.md: -------------------------------------------------------------------------------- 1 | section 2eK, formatting (layout) 2 | 3 | ##++re 4 | 5 | ##++ram 6 | 7 | ##++win 8 | 9 | ##++din 10 | 11 | ##++fit 12 | 13 | ##++rig 14 | 15 | ##++wig 16 | 17 | 18 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/M.md: -------------------------------------------------------------------------------- 1 | section 2eM, regular-expressions 2 | 3 | ##++pars 4 | 5 | ##++nor 6 | 7 | ##++les 8 | ##++lep 9 | 10 | ##++alm 11 | 12 | ##++alb 13 | 14 | ##++mis 15 | 16 | ##++anns 17 | 18 | ##++mall 19 | 20 | ##++bets 21 | 22 | ##++ranc 23 | 24 | ##++flap 25 | 26 | ##++rang 27 | 28 | ##++chun 29 | 30 | ##++seac 31 | 32 | ##++sead 33 | 34 | ##++sade 35 | 36 | ##++seap 37 | 38 | ##++cape 39 | 40 | ##++lower 41 | 42 | ##++upper 43 | 44 | ##++digit 45 | 46 | ##++print 47 | 48 | ##++graph 49 | 50 | ##++blank 51 | 52 | ##++space 53 | 54 | ##++cntrl 55 | 56 | ##++alpha 57 | 58 | ##++alnum 59 | 60 | ##++punct 61 | 62 | ##++wordc 63 | 64 | ##++white 65 | 66 | ##++xdigi 67 | 68 | ##++chad 69 | 70 | ##++escd 71 | 72 | ##++escp 73 | 74 | ##++unid 75 | 76 | ##++proc 77 | 78 | ##++cont 79 | 80 | ##++abor 81 | 82 | ##++matc 83 | 84 | ##++chet 85 | 86 | ##++blak 87 | 88 | ##++deep 89 | 90 | ##++rexp 91 | 92 | ##++repg 93 | 94 | 95 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/N.md: -------------------------------------------------------------------------------- 1 | section 2eN, pseudo-cryptography 2 | 3 | ##++un 4 | 5 | ##++wre 6 | 7 | ##++wre 8 | 9 | ##++xaf 10 | 11 | ##++xar 12 | 13 | ##++zaf 14 | 15 | ##++zar 16 | 17 | ##++zyf 18 | 19 | ##++zyr 20 | 21 | --- 22 | 23 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/P.md: -------------------------------------------------------------------------------- 1 | section 2eP, diff **noted as "(move me)" in source** 2 | --- 3 | 4 | ##++ berk 5 | ##++ diff 6 | ##++ loss 7 | ## ++ abet 8 | ## ++ hink 9 | ## ++ lonk 10 | ## ++ lune 11 | ## ++ merg 12 | ## ++ main 13 | ##++ locz 14 | ##++ lore 15 | ##++ role 16 | ##++ lump 17 | ##++ lure 18 | ##++ limp 19 | ##++ hump 20 | ##++ husk 21 | ##++ lurk 22 | ##++ lusk 23 | ## ++ abet 24 | ## ++ done 25 | ## ++ main 26 | ##++ nude 27 | ## ++ axes 28 | ## ++ tred 29 | 30 | --- 31 | 32 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/W.md: -------------------------------------------------------------------------------- 1 | section 2eW, lite number theory 2 | --- 3 | 4 | ##++ egcd 5 | ##++ pram 6 | ##++ ramp 7 | ##++ fo 8 | ## ++ dif 9 | ## ++ exp 10 | ## ++ fra 11 | ## ++ inv 12 | ## ++ pro 13 | ## ++ sit 14 | ## ++ sum 15 | ##++ ga 16 | ## ++ dif 17 | ## ++ dub 18 | ## ++ pro 19 | ## ++ toe 20 | ## ++ sit 21 | ## ++ fra 22 | ## ++ inv 23 | ## ++ pow 24 | ## ++ pro 25 | 26 | --- 27 | 28 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/X.md: -------------------------------------------------------------------------------- 1 | section 2eX, jetted crypto 2 | --- 3 | 4 | ##++ aesc 5 | ## ++ en 6 | ## ++ de 7 | ##++ ahem 8 | ## ++ cipa 9 | ## ++ co 10 | ## ++ ix 11 | ## ++ ro 12 | ## ++ su 13 | ## ++ pen 14 | ## ++ co 15 | ## ++ ix 16 | ## ++ ro 17 | ## ++ su 18 | ## ++ pin 19 | ## ++ co 20 | ## ++ ix 21 | ## ++ ro 22 | ## ++ su 23 | ## ++ mcol 24 | ## ++ pode 25 | ## ++ sube 26 | ## ++ be 27 | ## ++ ankh 28 | ## ++ sark 29 | ## ++ srow 30 | ## ++ subs 31 | ## ++ ex 32 | ## ++ ix 33 | ##++ curt 34 | ## ++ cla 35 | ## ++ sqr 36 | ## ++ inv 37 | ## ++ cad 38 | ## ++ cub 39 | ##++ ed 40 | ## ++ norm 41 | ## ++ xrec 42 | ## ++ ward 43 | ## ++ scam 44 | ## ++ etch 45 | ## ++ curv 46 | ## ++ deco 47 | ## ++ bb 48 | ## ++ puck 49 | ## ++ suck 50 | ## ++ sign 51 | ## ++ veri 52 | 53 | --- 54 | 55 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/Y.md: -------------------------------------------------------------------------------- 1 | section 2eY, SHA-256 2 | --- 3 | 4 | ##++ shad 5 | ##++ shaf 6 | ##++ shak 7 | ##++ sham 8 | ##++ shas 9 | ##++ shax 10 | ##++ shaw 11 | ##++ og 12 | ## ++ rad 13 | ## ++ raw 14 | ##++ shaz 15 | ##++ shal 16 | ##++ shan 17 | 18 | --- 19 | 20 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/e/Z.md: -------------------------------------------------------------------------------- 1 | section 2eZ, OLD rendering 2 | --- 3 | 4 | ##++ show 5 | ## ++ shep 6 | ## ++ shop 7 | ##++ at 8 | ## ++ r 9 | ## ++ rf 10 | ## ++ rn 11 | ## ++ rt 12 | ## ++ rta 13 | ## ++ rtam 14 | ## ++ rub 15 | ## ++ rud 16 | ## ++ rum 17 | ## ++ rup 18 | ## ++ ruv 19 | ## ++ rux 20 | 21 | --- 22 | 23 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/f/A.md: -------------------------------------------------------------------------------- 1 | section 2fA, miscellaneous funs 2 | --- 3 | 4 | ##++ bull 5 | ##++ cain 6 | ##++ cell 7 | ##++ core 8 | ##++ cube 9 | ##++ face 10 | ##++ bean 11 | ##++ flay 12 | ##++ flee 13 | ##++ foil 14 | ##++ fork 15 | ##++ cove 16 | ##++ comb 17 | ##++ cond 18 | ##++ cons 19 | ##++ fitz 20 | ##++ flan 21 | ##++ flip 22 | ##++ flor 23 | ##++ hike 24 | ##++ hoax 25 | ##++ hoof 26 | ##++ jock 27 | ##++ look 28 | ##++ make 29 | ##++ noah 30 | ##++ onan 31 | ##++ rain 32 | ##++ ream 33 | ##++ reck 34 | ##++ seed 35 | ##++ seem 36 | ##++ seer 37 | ##++ sell 38 | ##++ pave 39 | ##++ loot 40 | ##++ slam 41 | ##++ slim 42 | ##++ slit 43 | ##++ slym 44 | ##++ slap 45 | ##++ slop 46 | ##++ skol 47 | ##++ spat 48 | ##++ spuc 49 | ##++ spec 50 | ##++ spud 51 | ##++ slot 52 | ##++ slum 53 | ##++ stab 54 | ##++ wash 55 | 56 | --- 57 | 58 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/f/B.md: -------------------------------------------------------------------------------- 1 | section 2fB, macro expansion 2 | --- 3 | 4 | ##++ ah 5 | ## ++ blue 6 | ## ++ gray 7 | ## ++ puce 8 | ##++ al 9 | ## ++ blah 10 | ## ++ home 11 | ## ++ bunt 12 | ## ++ clam 13 | ## ++ cloq 14 | ## ++ whip 15 | ##++ ap 16 | ## ++ etch 17 | ## ++ feck 18 | ## ++ hock 19 | ## ++ open 20 | ## ++ rake 21 | ## ++ rusk 22 | 23 | --- 24 | 25 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/2/f/C.md: -------------------------------------------------------------------------------- 1 | section 2fC, compilation proper 2 | --- 3 | 4 | ##++ ut 5 | ## ++ burn 6 | ## ++ busk 7 | ## ++ conk 8 | ## ++ crop 9 | ## ++ dext 10 | ## ++ sint 11 | ## ++ cool 12 | ## ++ dank 13 | ## ++ dart 14 | ## ++ deal 15 | ## ++ dial 16 | ## ++ dish 17 | ## ++ doge 18 | ## ++ dole 19 | ## ++ duck 20 | ## ++ dune 21 | ## ++ dunk 22 | ## ++ fino 23 | ## ++ fink 24 | ## ++ finq 25 | ## ++ fire 26 | ## ++ firm 27 | ## ++ fish 28 | ## ++ fuse 29 | ## ++ gain 30 | ## ++ hang 31 | ## ++ harp 32 | ## ++ lose 33 | ## ++ chip 34 | ## ++ heal 35 | ## ++ mint 36 | ## ++ nice 37 | ## ++ grow 38 | ## ++ moot 39 | ## ++ mull 40 | ## ++ both 41 | ## ++ nice 42 | ## ++ grow 43 | ## ++ bake 44 | ## ++ meet 45 | ## ++ nest 46 | ## ++ cong 47 | ## ++ cram 48 | ## ++ dext 49 | ## ++ sint 50 | ## ++ park 51 | ## ++ peek 52 | ## ++ play 53 | ## ++ reco 54 | ## ++ repo 55 | ## ++ rest 56 | ## ++ seek 57 | ## ++ seep 58 | ## ++ sift 59 | ## ++ snub 60 | ## ++ tack 61 | ## ++ tock 62 | ## ++ wrap 63 | 64 | 65 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/4/b.md: -------------------------------------------------------------------------------- 1 | Batz 2 | === 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/4/e.md: -------------------------------------------------------------------------------- 1 | Eyre 2 | ==== 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/4/f.md: -------------------------------------------------------------------------------- 1 | Ford 2 | ==== 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/ref/vol/4/g.md: -------------------------------------------------------------------------------- 1 | Gall 2 | ==== 3 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/doc/say/intro.md: -------------------------------------------------------------------------------- 1 | #Urbit 2 | 3 | We got tired of system software from the 1970s. So we wrote our own. From scratch. 4 | 5 | ##Nock, a minimal virtual machine 6 | 7 | [Nock](https://github.com/urbit/urbit/blob/master/urb/zod/spec/nock/5.txt) is a 8 | homoiconic combinator algebra, not much fancier than SKI combinators. The spec 9 | fits on a T-shirt and gzips to 340 bytes. We never extend Nock or call out to Unix from it. 10 | 11 | ##Hoon, a typed functional language 12 | 13 | Hoon is a strict, typed, functional language that compiles itself to Nock. 14 | As a functional systems language, Hoon is especially good at metaprogramming, 15 | self-virtualization, hotpatching; marshalling and validating untyped data; 16 | decoding and encoding binary message formats. Hoon is designed for event 17 | programming, so there is no concurrency model. 18 | 19 | ##Arvo, a functional operating system 20 | 21 | Arvo is an event-driven server OS built on the same event library as node.js 22 | (libuv). Unlike node.js, Arvo is written in Hoon, isolated from Unix and a 23 | persistent single-level store. Arvo is modular. Present modules provide a 24 | network messaging protocol, a REPL and task manager, a revision-controlled 25 | filesystem, a text console, and an HTTP server. 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/mad/fib.hoon: -------------------------------------------------------------------------------- 1 | |% 2 | ++ fib |=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) 3 | -- 4 | -------------------------------------------------------------------------------- /urb/zod/main/pub/src/mad/tools/fib.hoon: -------------------------------------------------------------------------------- 1 | |=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) 2 | -------------------------------------------------------------------------------- /urb/zod/main/sur/down/gate.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/gate/down/sur 3 | :: 4 | /? 314 5 | /- *markdown 6 | down 7 | 8 | -------------------------------------------------------------------------------- /urb/zod/main/sur/foobar/gate.hook: -------------------------------------------------------------------------------- 1 | ,@ 2 | -------------------------------------------------------------------------------- /urb/zod/main/sur/markdown/core.hook: -------------------------------------------------------------------------------- 1 | |% 2 | ++ down (list barb) :: markdown structure 3 | ++ barb :: block elements 4 | $% [%had p=@ud q=(list shin) r=(unit tape)] :: depth, contents, id 5 | [%hem p=manx] :: html tag 6 | [%hot ~] :: horizontal rule 7 | [%lie p=down] :: list element 8 | [%lit p=? q=down] :: list 9 | [%par p=(list shin)] :: paragraph 10 | [%pre p=wall] :: preformatted text 11 | [%quo p=down] :: blockquote 12 | == :: 13 | ++ shin :: span elements 14 | $% [%cod p=tape] :: inline code 15 | [%cut ~] :: break 16 | [%emp p=?(%bent %bold %both) q=(list shin)] :: emphasis 17 | [%ike p=(list shin)] :: strikethrough 18 | [%lin p=(list shin) q=tape r=(unit tape)] :: link 19 | [%tex p=tape] :: text 20 | == :: 21 | -- 22 | 23 | -------------------------------------------------------------------------------- /urb/zod/main/sur/mess/gate.hook: -------------------------------------------------------------------------------- 1 | $% [%do p=@t] 2 | [%exp p=@t q=tank] 3 | [%say p=@t] 4 | == 5 | -------------------------------------------------------------------------------- /urb/zod/main/sur/user/gate.hook: -------------------------------------------------------------------------------- 1 | $% [%in p=[p=@p q=@t]] 2 | [%out p=[p=@p q=@t]] 3 | == 4 | -------------------------------------------------------------------------------- /urb/zod/main/sur/users/gate.hook: -------------------------------------------------------------------------------- 1 | (list ,[p=@p q=@t]) 2 | -------------------------------------------------------------------------------- /urb/zod/main/sur/wand/gate.hook: -------------------------------------------------------------------------------- 1 | :: 2 | :::: /hoon/gate/down/sur 3 | :: 4 | /? 314 5 | /- *markdown 6 | down 7 | -------------------------------------------------------------------------------- /urb/zod/main/sur/zing/gate.hook: -------------------------------------------------------------------------------- 1 | $% [%hola p=path] 2 | $: %mess p=path 3 | $= q 4 | $% [%do p=@t] 5 | [%exp p=@t q=tank] 6 | [%say p=@t] 7 | == == == 8 | -------------------------------------------------------------------------------- /urb/zod/main/sur/zong/gate.hook: -------------------------------------------------------------------------------- 1 | $% $: %mess p=@da q=ship 2 | $= r 3 | $% [%do p=@t] 4 | [%exp p=@t q=tank] 5 | [%say p=@t] 6 | == == == 7 | -------------------------------------------------------------------------------- /urb/zod/main/sur/zung/gate.hook: -------------------------------------------------------------------------------- 1 | $% [%backlog p=path q=?(%da %dr %ud) r=@] 2 | [%hola p=path] 3 | $: %mess p=path 4 | $= q 5 | $% [%do p=@t] 6 | [%exp p=@t q=tank] 7 | [%say p=@t] 8 | == == 9 | [%tint p=ship] 10 | == 11 | -------------------------------------------------------------------------------- /urb/zod/spec/nock/5.txt: -------------------------------------------------------------------------------- 1 | A noun is an atom or a cell. 2 | An atom is a natural number. 3 | A cell is an ordered pair of nouns. 4 | 5 | nock(a) *a 6 | [a b c] [a [b c]] 7 | 8 | ?[a b] 0 9 | ?a 1 10 | +[a b] +[a b] 11 | +a 1 + a 12 | =[a a] 0 13 | =[a b] 1 14 | =a =a 15 | 16 | /[1 a] a 17 | /[2 a b] a 18 | /[3 a b] b 19 | /[(a + a) b] /[2 /[a b]] 20 | /[(a + a + 1) b] /[3 /[a b]] 21 | /a /a 22 | 23 | *[a [b c] d] [*[a b c] *[a d]] 24 | 25 | *[a 0 b] /[b a] 26 | *[a 1 b] b 27 | *[a 2 b c] *[*[a b] *[a c]] 28 | *[a 3 b] ?*[a b] 29 | *[a 4 b] +*[a b] 30 | *[a 5 b] =*[a b] 31 | 32 | *[a 6 b c d] *[a 2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b] 33 | *[a 7 b c] *[a 2 b 1 c] 34 | *[a 8 b c] *[a 7 [[7 [0 1] b] 0 1] c] 35 | *[a 9 b c] *[a 7 c 2 [0 1] 0 b] 36 | *[a 10 [b c] d] *[a 8 c 7 [0 3] d] 37 | *[a 10 b c] *[a c] 38 | 39 | *a *a 40 | -------------------------------------------------------------------------------- /urb/zod/try/bin/aesde.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/aesde/hoon 3 | :: 4 | :: AES decryption toy. Don't use this for anything real. 5 | :: It will threaten non-termination and send your private key to 6 | :: General Alexander via singing telegram. 7 | :: 8 | => %= . 9 | + 10 | => + 11 | ^/===/lib/cryo 12 | == 13 | |= * 14 | |= [k=@I c=@ ~] 15 | ^- bowl 16 | =+ m=(de:aes k c) 17 | :_ ~ :_ ~ 18 | :- %$ 19 | !> m 20 | -------------------------------------------------------------------------------- /urb/zod/try/bin/aesen.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/aesen/hoon 3 | :: 4 | :: AES encryption toy. Don't use this for anything real. 5 | :: It will threaten non-termination and send your private key to 6 | :: General Alexander via singing telegram. 7 | :: 8 | => %= . 9 | + 10 | => + 11 | ^/===/lib/cryo 12 | == 13 | |= * 14 | |= [k=@I m=@ ~] 15 | ^- bowl 16 | =+ c=(en:aes k m) 17 | :_ ~ :_ ~ 18 | :- %$ 19 | !> c 20 | -------------------------------------------------------------------------------- /urb/zod/try/bin/aestest.hoon: -------------------------------------------------------------------------------- 1 | :: 2 | :: /=try=/bin/aestest/hoon 3 | :: 4 | |= [est=time eny=@uw] 5 | |= ~ 6 | :_ ~ :_ ~ 7 | =+ i=0 8 | :- %$ 9 | !> 10 | |- ^- @ 11 | ?: =(1.000.000 i) 0 12 | =+ k=(con (lsh 3 16 (en:aesc eny i)) (en:aesc +(eny) i)) 13 | =+ m=(en:aesc (add 2 eny) i) 14 | =+ suc==(m (de:aesc k (en:aesc k m))) 15 | ?. suc 16 | ~| [%fail `@ux`k `@ux`m] 17 | !! 18 | ?: &(!=(0 i) =(0 (mod i 10.000))) 19 | ~& [i `@ux`k `@ux`m] 20 | $(i +(i)) 21 | $(i +(i)) 22 | -------------------------------------------------------------------------------- /urb/zod/try/bin/app.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/app/hoon 3 | :: 4 | => %= . 5 | + 6 | => + 7 | |% 8 | ++ word %hello 9 | -- 10 | == 11 | |= * 12 | |= ~ 13 | ^- bowl 14 | :_ ~ :_ ~ 15 | :- %$ 16 | !> :_ %- turn :_ trip %- lore %- crip 17 | """ 18 | This quote don't need no extra ws 19 | But further indents are preserved 20 | and {<%inter %polation>} is possible 21 | Yay. 22 | """ 23 | %- lore 24 | ''' 25 | Ph'nglui mglw'nafh \ ::no comments etc. 26 | Heredoc R'lyeh wgah'nahgl fhtagn 27 | 28 | ''' 29 | -------------------------------------------------------------------------------- /urb/zod/try/bin/curve.hoon: -------------------------------------------------------------------------------- 1 | :: 2 | :: /=main=/bin/curve/hoon 3 | :: 4 | => %= . 5 | + 6 | => + 7 | ^/===/lib/cryo 8 | == 9 | |= [est=time eny=@uw] 10 | |= ~ 11 | ^- bowl 12 | :_ ~ :_ ~ 13 | :- %$ 14 | !> 15 | =+ pk=48.084.050.389.777.770.101.701.157.326.923.977.117. 16 | 307.187.144.965.043.058.462.938.058.489.685.090.437 17 | =+ sk=(cla:curv 19.076.158.533.740.022.697.853.188.432.810. 18 | 029.468.508.100.820.210.985.396.154.491.514.718.125.885.303) 19 | =+ ska=(gen:curv eny) 20 | =+ sky=(gen:curv (shax eny)) 21 | :* 22 | %public-test 23 | :+ 24 | [%reference-public pk] 25 | [%calculate-public (curve:curv sk 9)] 26 | [%equals =((curve:curv sk 9) pk)] 27 | %diffie-hellman 28 | [%alice-secret ska] 29 | [%bob-secret sky] 30 | [%alice-calcs (curve:curv sky (curve:curv ska 9))] 31 | [%bobp-calcs (curve:curv ska (curve:curv sky 9))] 32 | %equals 33 | =((curve:curv sky (curve:curv ska 9)) (curve:curv ska (curve:curv sky 9))) 34 | == 35 | -------------------------------------------------------------------------------- /urb/zod/try/bin/def.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: Define :: 3 | => |% 4 | ++ isin |= [a=tape b=tape] 5 | ?. (gte (lent a) (lent b)) | 6 | ?: =(b (scag (lent b) a)) & 7 | $(a +.a) 8 | :: 9 | ++ range |= [[a=tape b=tape] c=wain] 10 | ^- wain 11 | ?~ c ~ 12 | ?. (isin (trip i.c) a) $(c t.c) 13 | :- i.c => .(c t.c) 14 | |- ^- wain 15 | ?~ c ~ 16 | ?: (isin (trip i.c) b) ~ 17 | [i.c $(c t.c)] 18 | :: 19 | ++ vanes 20 | %- turn :_ |=([a=@t ~] a) 21 | (~(tap by r:;;(arch .^(cy//=arvo=)))) 22 | -- 23 | |= ^ 24 | |= [a=@tas ~] 25 | =- ~[te/-]~ 26 | %- zing 27 | %+ turn vanes |= b=@t 28 | =- ?~ - ~ 29 | [(cat 3 '%' b) -] 30 | %+ range ["++ {(trip a)}" "++"] 31 | =- (lore ;;(,@ .^(cx//=arvo=/[b]/hoon))) 32 | ''' 33 | ++ by 34 | my 35 | stuff 36 | ++ron 37 | 38 | as 39 | ''' 40 | -------------------------------------------------------------------------------- /urb/zod/try/bin/edpk.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/edpk/hoon 3 | :: 4 | :: ed25519 public key toy. 5 | :: 6 | :: Needless to say, don't use this for anything real. Not only will it be 7 | :: embarrassingly slow, but it'll probably mail your private key to the NSA. 8 | :: 9 | => %= . 10 | + 11 | => + 12 | ^/===/lib/cryo 13 | == 14 | |= [est=time eny=@uw] 15 | |= [sk=@ ~] 16 | ^- bowl 17 | =+ pk=(puck:ed sk) 18 | :_ ~ :_ ~ 19 | :- %$ 20 | !> `@ux`pk 21 | -------------------------------------------------------------------------------- /urb/zod/try/bin/edsi.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/edsi/hoon 3 | :: 4 | :: ed25519 signature toy. 5 | :: 6 | :: Needless to say, don't use this for anything real. Not only will it be 7 | :: embarrassingly slow, but it'll probably mail your private key to the NSA. 8 | :: 9 | => %= . 10 | + 11 | => + 12 | ^/===/lib/cryo 13 | == 14 | |= [est=time eny=@uw] 15 | |= [sk=@ pk=@ m=@ ~] 16 | ^- bowl 17 | =+ si=(sign:ed m sk pk) 18 | :_ ~ :_ ~ 19 | :- %$ 20 | !> `@ux`si 21 | -------------------------------------------------------------------------------- /urb/zod/try/bin/edtest.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/edtest/hoon 3 | :: 4 | => %= . 5 | + 6 | => + 7 | |% 8 | ++ swab |=(a=@ (rep 3 (flop (rip 3 a)))) 9 | ++ tase ,[sk=@ux pk=@ux m=@ux sm=@ux] :: test-case 10 | ++ read 11 | |. 12 | =+ fil=((hard ,@) .^(%cx /===/doc/ed/test)) 13 | (rash fil pars) 14 | ++ line 15 | %+ knee *tase |. ~+ 16 | ;~ plug 17 | ;~(sfix (bass 16 (star hit)) col) 18 | ;~(sfix (bass 16 (star hit)) col) 19 | ;~(sfix (bass 16 (star hit)) col) 20 | ;~(sfix (bass 16 (star hit)) col (just `@`10)) 21 | == 22 | ++ pars 23 | %+ knee *(list tase) |. ~+ 24 | (star line) 25 | ++ chek 26 | |= a=tase 27 | ~| a 28 | =+ gsk=`@ux`(cut 3 [0 32] (swab sk.a)) :: endian hell 29 | =+ cpk=`@ux`(puck:ed gsk) 30 | =+ ypk=`@ux`(swab pk.a) 31 | ~| [%pk cpk ypk] 32 | ?> =(cpk ypk) 33 | =+ sig=`@ux`(sign:ed (swab m.a) gsk) 34 | =+ tsg=`@ux`(cut 3 [0 64] (swab sm.a)) 35 | ~| [%sg sig tsg] 36 | ?> =(sig tsg) 37 | ?> (veri:ed tsg (swab m.a) ypk) 38 | ~& [%a-ok a] 39 | & 40 | ++ test 41 | |= a=(list tase) 42 | ^- (list ,*) 43 | ?~ a 44 | ~ 45 | [(chek i.a) $(a t.a)] 46 | -- 47 | == 48 | |= [est=time eny=@uw] 49 | |= ~ 50 | ^- bowl 51 | ~& (test (read)) 52 | [~ ~] 53 | -------------------------------------------------------------------------------- /urb/zod/try/bin/edve.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/edpk/hoon 3 | :: 4 | :: ed25519 signature verification toy. 5 | :: 6 | => %= . 7 | + 8 | => + 9 | ^/===/lib/cryo 10 | == 11 | |= [est=time eny=@uw] 12 | |= [pk=@ s=@ m=@ ~] 13 | ^- bowl 14 | :_ ~ :_ ~ 15 | :- %$ 16 | !> ?: (veri:ed s m pk) 17 | 'valid sig' 18 | 'invalid sig' 19 | -------------------------------------------------------------------------------- /urb/zod/try/bin/fib.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/fib/hoon 3 | :: 4 | |= * 5 | |= [num=@ud ~] 6 | :_ ~ :_ ~ 7 | :+ %la %leaf 8 | (scow %ud %.(num |=(x=@ ?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2))))))) 9 | 10 | -------------------------------------------------------------------------------- /urb/zod/try/bin/flopp.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=main=/bin/app/hoon 3 | :: 4 | => %= . 5 | + 6 | => + 7 | |% 8 | ++ sii !: 9 | =| * 10 | |% 11 | +- $ 12 | ?~ +< 13 | +< 14 | $(+< +<+) 15 | -- 16 | ++ flopp 17 | =| * 18 | =| * 19 | |% 20 | +- $ 21 | ?~ +< 22 | ?~ +>- ~ 23 | +>- 24 | ?~ +>- 25 | $(+< +<+, +>- [+<- +<+(. ~)]) 26 | $(+< +<+, +>- [+<- +<+(. +>-)]) 27 | -- 28 | -- 29 | == 30 | |= * 31 | |= ~ 32 | ^- bowl 33 | :_ ~ :_ ~ 34 | :- %$ 35 | !> 36 | =+ x=[i=1 t=[i=2 t=[i=3 t=[i=4 t=~]]]] 37 | =+ y=(limo [1 2 3 4 ~]) 38 | (flopp x) 39 | -------------------------------------------------------------------------------- /urb/zod/try/bin/fptest.hoon: -------------------------------------------------------------------------------- 1 | :: 2 | :: /=try=/bin/aestest/hoon 3 | :: 4 | |= [est=time eny=@uw] 5 | |= ~ 6 | :_ ~ :_ ~ 7 | =+ i=0 8 | :- %$ 9 | !> 10 | |- ^- @ 11 | ?: =(1.000.000 i) 0 12 | =+ n=`@rd`(end 6 1 (en:aesc eny i)) 13 | =+ m=`@rd`(rsh 6 1 (en:aesc +(eny) i)) 14 | :: ~& [%try `@ux`n `@ux`m] 15 | ~| $(i +(i)) 16 | =+ a=(add:rd n m) 17 | =+ b=(sub:rd n m) 18 | =+ c=(mul:rd n m) 19 | =+ d=(div:rd n m) 20 | =+ suc=%.y 21 | ?. suc 22 | ~| [%fail i `@ux`n `@ux`m] 23 | !! 24 | ?: &(!=(0 i) =(0 (mod i 2))) 25 | ~& [%try i `@ux`n `@ux`m] 26 | $(i +(i)) 27 | $(i +(i)) 28 | -------------------------------------------------------------------------------- /urb/zod/try/bin/game.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/game/hoon 3 | :: 4 | => .(- `[who=@p how=path]`-) 5 | => .(+ =>(+ ^/=main=/lib/hume)) 6 | |= [est=time eny=@uw] 7 | |= [neighbor=tape ~] 8 | ^- bowl 9 | =+ messages=*(list ,@t) 10 | %- lunt 11 | :* who 12 | %none 13 | :- :~ :* :~ [%& /localhost] 14 | [%| .127.0.0.1] 15 | == 16 | /game 17 | (shas %game eny) 18 | /try 19 | == 20 | == 21 | ^- vase 22 | !> |% 23 | ++ give 24 | |= [now=@da fig=weev] 25 | ^- [p=(list gift) q=(unit ,[p=(list slip) q=_+>.$])] 26 | ?+ -.fig 27 | [~[la/leaf/"give other {}"] ~] 28 | :: 29 | %form 30 | =+ msg=(~(get by q.fig) %msg) 31 | ?~ msg 32 | [~[la/leaf/"give odd form {}"] ~] 33 | [~ [~ ~ +>.$(messages [u.msg messages])]] 34 | == 35 | :: 36 | ++ miss 37 | |= [pac=pact ced=cred] 38 | ^- (unit purl) 39 | ~ 40 | -- 41 | == 42 | -------------------------------------------------------------------------------- /urb/zod/try/bin/gen.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/gen/hoon 3 | :: 4 | :: produce 256 bits of entropy. 5 | :: 6 | |= [est=time eny=@uw] 7 | |= ~ 8 | ^- bowl 9 | :_ ~ :_ ~ 10 | :- %$ 11 | !> `@ux`(shax eny) 12 | -------------------------------------------------------------------------------- /urb/zod/try/bin/goodbye.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | |= [planet=tape ~] 3 | ^- bowl :_ ~ :_ ~ :- %$ !> 4 | "hasta la vista, {planet}." 5 | -------------------------------------------------------------------------------- /urb/zod/try/bin/honk.hoon: -------------------------------------------------------------------------------- 1 | |= * :: To see what Hoon compiles into 2 | |= [a=* ~] :: 3 | :_ ~ :_ ~ :: Preserve this mysterious boilerplate square 4 | :- %$ :: 5 | !> != :: 6 | ::::::::::::::::: Replace this with your code 7 | |=(b=@ |=(c=@ [b c])) 8 | -------------------------------------------------------------------------------- /urb/zod/try/bin/infinite.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | |= * 3 | =+ a=1 4 | |- ^- bowl 5 | ?: =(0 a) [~ ~] 6 | $(a +(a)) 7 | -------------------------------------------------------------------------------- /urb/zod/try/bin/memory.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | |= * 3 | =+ a=1 4 | =| b=(list) 5 | |- ^- bowl 6 | ?: =(0 a) [~ ~] 7 | $(a +(a), b [(bex (bex 13)) b]) 8 | -------------------------------------------------------------------------------- /urb/zod/try/bin/merge.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/merge/hoon 3 | :: Call with two desks and an optional germ as a merge option 4 | :: 5 | => .(-< `who=@p`-<) 6 | => .(+ =>(+ ^/=/main/=/lib/pony)) 7 | |= [est=time eny=@uw] 8 | |= $: pes=[ses=span des=span cas=span ~] 9 | pen=[sen=span den=span can=span ~] 10 | gem=$|([germ ~] ~) 11 | == 12 | =+ vsr=((hard dome) .^(%cv pes)) 13 | =+ ves=((hard dome) .^(%cv pen)) 14 | %- (posh (add ~s1 est)) 15 | |= tim=@da 16 | ^- bowl 17 | :_ ~ 18 | ^- (list gift) 19 | :_ ~ 20 | =+ ran=((hard rang) .^(%cu /(scot %p who)/main/(scot %da tim))) 21 | =+ ^= sab ^- saba :* 22 | (need (slaw 'p' ses.pes)) 23 | des.pes 24 | [0 let.vsr] 25 | vsr 26 | == 27 | =+ ^= lum 28 | %- ~(auld ze est ves ran) 29 | [?~(gem %fine -.gem) (need (slaw 'p' sen.pen)) den.pen sab est] 30 | ?~ lum 31 | ^- gift 32 | :* %la %leaf 33 | "{(trip des.pes)} failed to apply, please rerun with a merge option" 34 | == 35 | ?~ u.lum 36 | `gift`[%la %leaf "{(trip den.pen)} is up to date"] 37 | `gift`[%og den.pen u.u.lum] 38 | -------------------------------------------------------------------------------- /urb/zod/try/bin/nock.hoon: -------------------------------------------------------------------------------- 1 | !: :: To write Nock as an Arvo application in Hoon 2 | |= * :: 3 | |= [a=* ~] :: For educational purposes only 4 | :_ ~ :_ ~ :: 5 | :- %la :: Preserve this mysterious boilerplate square 6 | %+ sell %noun:: 7 | .* a :: Replace the formula with your own 8 | ::::::::::::::::: 9 | :: Formula: increment 10 | [1 0] 11 | -------------------------------------------------------------------------------- /urb/zod/try/bin/nonk.hoon: -------------------------------------------------------------------------------- 1 | |= * :: To use :honk code, pasted back 2 | |= [a=* ~] :: 3 | :_ ~ :_ ~ :: Preserve this mysterious boilerplate square 4 | :+ %$ %noun :: 5 | .* . :: 6 | ::::::::::::::::: Replace this with your Nock 7 | [8 [1 0] [1 8 [1 0 0] [1 [[[1 24.940] 8 [9 97.964 0 4.095] 9 2 [0 4] [7 [0 3] [1 1.853.189.998] 2 [0 12] 1 1 0] 0 11] 1 0] 1 0] 0 1] 0 1] 8 | -------------------------------------------------------------------------------- /urb/zod/try/bin/overflow.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= * 3 | |= * 4 | =+ a=1 5 | |- ^- bowl 6 | ?: =(0 a) [~ ~] 7 | $(a +(a)) 8 | -------------------------------------------------------------------------------- /urb/zod/try/bin/pars.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | => |% 3 | ++ norm 4 | |* (pole ,_:/(*$&(_rule tape))) 5 | ?~ +< ~ 6 | => .(+< [i=+<- t=+<+]) 7 | :_ t=$(+< t) 8 | =+ rul=->->.i 9 | ^= i 10 | ?~ rul [%| p=rul] 11 | ?~ +.rul [%| p=rul] 12 | ?@ &2.rul [%| p=;;(tape rul)] 13 | [%& p=rul] 14 | ++ parz 15 | |* (list (each ,_rule tape)) 16 | ?~ +< (easy ~) 17 | ?: ?=(| -.i) ;~(pfix (jest (crip p.i)) $(+< t)) 18 | %+ cook |*([* *] [i t]=+<) 19 | ;~(plug p.i $(+< t)) 20 | ++ scanf 21 | |* [tape (pole ,_:/(*$&(_rule tape)))] 22 | => .(+< [a b]=+<) 23 | ~! (scan "" (parz (norm ;"number {dim:ag}\-{dim:ag}"))) 24 | ~! (norm ;"qwert{y/o/p/~}as{rule}d") 25 | ::=+ aaaa 26 | %. (scan a (parz (norm b))) 27 | |* (list) 28 | ?~ +< ~ 29 | ?~ t i 30 | [i $(+< t)] 31 | -- 32 | |= ^ 33 | |= ~ :: [tape (pole ,_:/(*$&($+(nail edge) tape))) ~] ::$|(~ [p=gate ~])] 34 | ::=> .(+< [a=&1.+< b=&2.+<]) :: c=|2.+<]) 35 | =- ~[$/!>(res)]~ 36 | ^= res 37 | :::- (scanf a b) 38 | :: (p.c ^+(+<.p.c (scanf a b))) 39 | =+ n=;~(pfix (star (just '0')) (cook |=(@ud +<) dim:ag)) 40 | :- ^- @da %- year 41 | =- `date`dat(- [%& -.dat], |6 ~[(div (mul |6.dat (bex 16)) 1.000)]) 42 | dat=(scanf "2014-08-12T02:11:57.030Z" ;"{n}\-{n}\-{n}T{n}:{n}:{n}.{n}Z") 43 | =+ (scanf "It is 12:54, offset 2" ;"It is {n}:{n}, offset {n}") 44 | ~! - 45 | `[p=@ q=@ r=@]`- 46 | -------------------------------------------------------------------------------- /urb/zod/try/bin/poxo.hoon: -------------------------------------------------------------------------------- 1 | |= ^ 2 | |= [a=manx ~] 3 | =- ~[$/!>(-)]~ 4 | (xmlt | a "") 5 | -------------------------------------------------------------------------------- /urb/zod/try/bin/reverse.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/reverse/hoon 3 | :: 4 | |= * 5 | |= ~ 6 | :- ~ :- ~ 7 | :- ^- (list slip) 8 | :~ [~ %$ %atom %t] 9 | == 10 | |= [now=@da pax=path nut=note] 11 | ^- bowl 12 | ?+ -.nut !! 13 | %$ 14 | ?~ p.nut 15 | [~ ~] 16 | =+ liz=((hard (list ,@t)) q.u.p.nut) 17 | :- ^- (list gift) 18 | :~ :+ %mu [%atom %t] 19 | (turn liz |=(a=@t (rap 3 (flop (trip a))))) 20 | == 21 | :- ~ 22 | :- ^- (list slip) 23 | :~ [~ %$ %atom %t] 24 | == 25 | ..$ 26 | == 27 | -------------------------------------------------------------------------------- /urb/zod/try/bin/revert.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/revert/hoon 3 | :: Call with desk & change to revert 4 | :: 5 | => .(-< `who=@p`-<) 6 | => .(+ =>(+ ^/=/main/=/lib/pony)) 7 | |= [est=time eny=@uw] 8 | |= $: des=span 9 | cas=@ud 10 | ~ 11 | == 12 | =+ dom=((hard dome) .^(%cv /=/[des]/=)) 13 | ::%- (posh (add ~s1 est)) 14 | ::|= tim=@da 15 | =+ tim=est 16 | ^- bowl 17 | :_ ~ 18 | ^- (list gift) 19 | :_ ~ 20 | =+ ran=((hard rang) .^(%cu /(scot %p who)/main/(scot %da tim))) 21 | =+ hed=(~(got by hut.ran) (~(got by hit.dom) let.dom)) 22 | =+ rev=(~(got by hut.ran) (~(got by hit.dom) cas)) 23 | ?~ p.rev !! 24 | =+ nex=(~(got by hut.ran) i.p.rev) 25 | =+ ^= vex 26 | %- %~ zoal ze 27 | :+ est dom ran 28 | :- [r.rev ~] 29 | :- q.nex 30 | est 31 | =+ run=ran(hut (~(put by hut.ran) r.vex vex)) :: hack 32 | =+ ^= gar 33 | %- %- %~ merge ze 34 | :+ est dom ran 35 | :- [who des] 36 | [who des] 37 | :- vex 38 | :- hed 39 | :- tim 40 | %- %~ strat ze 41 | :+ est dom run 42 | %meld 43 | =+ ^= yak 44 | %- %~ zoal ze 45 | :+ est dom ran 46 | :- [r.hed ~] 47 | :- q.-.gar 48 | est 49 | =+ hek=+.gar 50 | =+ lat=-:(~(aqel ze est dom ran) hek ~) 51 | =+ hut=(~(put by _(map tako yaki)) r.yak yak) 52 | =+ let=+(let.dom) 53 | =+ hit=(~(put by _(map ,@ud tako)) let r.yak) 54 | `gift`[%og des [let hit hut lat]] 55 | -------------------------------------------------------------------------------- /urb/zod/try/bin/sleep.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | => .(+ =>(+ ^/=main=/lib/pony)) 3 | |= [est=@da *] 4 | |= [sle=@dr ~] 5 | ^- bowl 6 | %+ pomp "sleeping for {(scow %dr sle)}..." 7 | %- (posh (add est sle)) 8 | |= now=@da 9 | :_ ~ 10 | :~ [%la %leaf "slept."] 11 | == 12 | -------------------------------------------------------------------------------- /urb/zod/try/bin/tiff.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/toy/diff/hoon 3 | :: 4 | |= [who=seat est=time eny=@uw was=path] 5 | |= ~ 6 | :_ ~ 7 | =< main 8 | |% 9 | ++ main 10 | ^- (list gift) 11 | =+ pod=test 12 | |- ^- (list gift) 13 | ?~ pod ~ 14 | =+ dis=(loss p.i.pod q.i.pod) 15 | ?> =((lurk p.i.pod (lusk p.i.pod q.i.pod dis)) q.i.pod) 16 | :- [%la %leaf "{p.i.pod} to {q.i.pod}: loss {dis}"] 17 | $(pod t.pod) 18 | :: 19 | ++ fake 20 | =+ ram=(shax eny) 21 | =+ inx=0 22 | |- ^- tape 23 | ?: =(inx 128) ~ 24 | [[(add 'a' (end 0 2 ram))] $(inx +(inx), ram (rsh 0 2 ram))] 25 | :: 26 | ++ test 27 | =+ inx=0 28 | |- ^- (list ,[p=tape q=tape]) 29 | ?: =(inx 32) ~ 30 | [[fake(eny (add 1 eny)) fake(eny (add 2 eny))] $(inx +(inx), eny (add 3 eny))] 31 | -- 32 | -------------------------------------------------------------------------------- /urb/zod/try/bin/till.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/bin/till/hoon 3 | :: 4 | => .(- `[who=@p how=path]`-) 5 | |= [est=time eny=@uw] 6 | |= [pax=path ~] 7 | ^- bowl 8 | =+ gen=(reck pax) 9 | =+ ken=q:(~(mint ut %noun) %noun gen) 10 | =+ pac=(jam ken) 11 | :_ ~ :_ ~ 12 | [%xx %save [%test %pill ~] pac] 13 | -------------------------------------------------------------------------------- /urb/zod/try/bin/toy.hoon: -------------------------------------------------------------------------------- 1 | !: :: To write a trivial Hoon program 2 | |= * :: 3 | |= [x=@ ~] :: For educational purposes only 4 | :_ ~ :_ ~ :: 5 | :- %$ :: Preserve this mysterious boilerplate square 6 | !> :: 7 | ::::::::::::::::: Produce a value below 8 | ~& %foo 9 | (add 2 x) 10 | -------------------------------------------------------------------------------- /urb/zod/try/bin/write.hoon: -------------------------------------------------------------------------------- 1 | !: :: /=try=/bin/env/hoon 2 | !? 164 3 | :::: 4 | => .(- `[who=@p how=path]`-) 5 | => .(- [woh=(scot %p who) -]) 6 | => .(+ =>(+ ^/=main=/lib/pony)) 7 | :::: 8 | |= [est=time eny=@] 9 | |= [loc=[mih=span dez=span caz=span sup=path] ~] 10 | :::: 11 | ?. =(woh mih.loc) 12 | ~|("you are not {(trip mih.loc)}!" !!) 13 | =+ yaz=(zu ((hard ankh) .^(%cz mih.loc dez.loc caz.loc ~))) 14 | %+ pomp "appending to {(dart:ut loc)}..." 15 | =< work 16 | |% 17 | ++ pend 18 | |= den=@t 19 | ^- [(list gift) _+>] 20 | =+ nyp=`soba`[*cart (turn (plan den) |=(p=miso [sup.loc p]))] 21 | :- [[%ok dez.loc `nori`[%& ~ nyp]] ~] 22 | =. yaz (durn:yaz nyp) 23 | +>.$ 24 | :: 25 | ++ plan 26 | |= den=@t 27 | ^- (list miso) 28 | =+ cur=q:ank:(deny:yaz sup.loc) 29 | ?~ cur 30 | [[%ins den] ~] 31 | ?^ q.u.cur 32 | [[%del q.u.cur] [%ins den] ~] 33 | [[%mut ((diff %c) q.u.cur (cat 3 q.u.cur den))] ~] 34 | :: 35 | ++ work 36 | |- ^- bowl 37 | %+ (polo %text "> " ~ ~) 38 | (plus alp) 39 | |= [now=@da txt=tape] 40 | ^- bowl 41 | =^ giv +.^$ (pend (rap 3 (weld txt `tape`[`@`10 ~]))) 42 | (pome giv ^$) 43 | -- 44 | -------------------------------------------------------------------------------- /urb/zod/try/bin/zero.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= * 3 | |= ~ 4 | ^- bowl 5 | :_ ~ 6 | =+ inx=0 7 | |- ^- (list gift) 8 | ?: =(inx 256) ~ 9 | :_ $(inx +(inx)) 10 | [%la %leaf "0 :: {(scow %ud inx)}, {(scow %p inx)}"] 11 | -------------------------------------------------------------------------------- /urb/zod/try/doc/ireg.md: -------------------------------------------------------------------------------- 1 | Some obscure `:-` irregular forms. 2 | ================================== 3 | 4 | Moveme: irregular form doc 5 | 6 | ###Infix `^` 7 | 8 | ``` 9 | ~zod/main=/app> 1^2^3 10 | [1 2 3] 11 | ``` 12 | 13 | `a^b` is equivalent to `:- a b` 14 | 15 | ###Infix `/` 16 | 17 | ``` 18 | ~zod/main=/app> a/1 19 | [%a 1] 20 | ~zod/main=/app> a/'twig' 21 | [%a 'twig'] 22 | ``` 23 | 24 | Like `^`, but first item must be a term, and is cubed. Used to construct paths 25 | and fronds. 26 | 27 | ###Prefix `` ` ``, postfix `~` 28 | 29 | ``` 30 | ~zod/main=/app> ````20 31 | [~ ~ ~ ~ 20] 32 | ~zod/main=/app> [42 30]~ 33 | [[42 30] ~] 34 | ``` 35 | 36 | Complimenting each other, these construct pairs with nil in the head and tail 37 | respectively. Multiple postfix `~` do not work for unknown reasons. 38 | -------------------------------------------------------------------------------- /urb/zod/try/lib/diff.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | :: /=try=/nub/diff/hoon 3 | :: 4 | |% 5 | -- 6 | -------------------------------------------------------------------------------- /urb/zod/try/syn/fun/goodbye/html.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= [for=@tas pre=path mid=path but=path] 3 | %- crip 4 | "Goodbye, Galen {<[for pre mid but]>} (from Hoon)!" 5 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/complete/htmn.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | %- give 3 | |= [quy=quay own=@p ced=cred pos=pred suf=path but=path for=@tas nep=@tas] 4 | ^- manx 5 | :~ %html 6 | :~ %body 7 | [%h3 -"{:/(scow %p own)} is generally a happy camper."] 8 | [%p -"a paragraph with {i/-"italics"} is nice."] 9 | [%p -"we can go crazy by embedding {:/(scow %p own)}."] 10 | +"Hi, neighbor!{?:(=(~ quy) "" " You ask: {}?")}" 11 | %br 12 | +"You addressed the {?:(p.hut.ced "" "in")}secure," 13 | +"{?:(q.hut.ced "" "un")}bound " 14 | +"{?:(-.s.hut.ced "DNS host {}" "IPv4 host {}")}" 15 | ?~(r.hut.ced +"" +" at port {}.") 16 | %br 17 | +"Your CSRF token is '{}'." 18 | %br 19 | ?: ?=(~ acl.ced) 20 | +"You sent no accept-language." 21 | +"Your language is {}." 22 | %br 23 | ?- -.cip.ced 24 | & +"You came from the IPv4 address {}." 25 | | +"You came from the IPv6 address {}." 26 | == 27 | %br 28 | ?: =(~ aut.ced) 29 | +"You have no authenticated identities." 30 | +"Authenticated identities: {}." 31 | %br 32 | +"This {} page was produced from {<`path`pos>}, under {}" 33 | +", as {}" 34 | +"{?:(=(~ but) "." ", in {}.")}" 35 | == 36 | == 37 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/goodbye/html.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= [for=@tas pre=path mid=path but=path] 3 | %- crip 4 | "Goodbye, Galen {<[for pre mid but]>} (from Hoon)!" 5 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello, world (simply). 4 | 5 | 6 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/hello/html.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | 'Hello, world (from Hoon)!' 3 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/screw.html: -------------------------------------------------------------------------------- 1 | It will prefer this. 2 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/screw.txt: -------------------------------------------------------------------------------- 1 | Hi Jaan! This is just text 2 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/screw/txt.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | %- epic 3 | |= [quy=quay own=@p *] 4 | %- crip 5 | "Hi Jaan! Serving query {} from {}" 6 | 7 | -------------------------------------------------------------------------------- /urb/zod/try/syn/web/simple/htmn.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | %- give 3 | |= [quy=quay own=@p *] 4 | ^- manx 5 | :~ %html 6 | :~ %body 7 | ~[%h3 +"{(scow %p own)} hails you from afar"] 8 | +"Hi, neighbor!{?:(=(~ quy) "" " You ask: {}")}?" 9 | == 10 | == 11 | -------------------------------------------------------------------------------- /urb/zod/try/sys/hoon/ref/gate.hoon: -------------------------------------------------------------------------------- 1 | |= rem=spur 2 | ~& [%html rem] 3 | ,@ 4 | -------------------------------------------------------------------------------- /urb/zod/try/sys/html/ref/gate.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | ,@ 3 | -------------------------------------------------------------------------------- /urb/zod/try/sys/html/tan/mime/gate.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | |= htm=@ 3 | [/text/html (met 3 htm) htm] 4 | -------------------------------------------------------------------------------- /urb/zod/try/sys/md/ref/gate.hoon: -------------------------------------------------------------------------------- 1 | |=(* ,@) 2 | -------------------------------------------------------------------------------- /urb/zod/try/sys/md/tan/mime/gate.hoon: -------------------------------------------------------------------------------- 1 | |= * 2 | |= htm=@ 3 | [/text/html (met 3 htm) htm] 4 | -------------------------------------------------------------------------------- /urb/zod/try/tan/css/mime.hoon: -------------------------------------------------------------------------------- 1 | |= css=@ 2 | [/text/css (met 3 css) css] 3 | -------------------------------------------------------------------------------- /urb/zod/try/tan/html/mime.hoon: -------------------------------------------------------------------------------- 1 | |= htm=@ 2 | [/text/html (met 3 htm) htm] 3 | -------------------------------------------------------------------------------- /urb/zod/try/tan/htmn/html.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= mex=manx 3 | (crip (xmlt | mex ~)) 4 | -------------------------------------------------------------------------------- /urb/zod/try/tan/txt/html.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= txt=@ 3 | (cat 3 '' (cat 3 txt '')) 4 | -------------------------------------------------------------------------------- /urb/zod/try/web/game/fun.hoon: -------------------------------------------------------------------------------- 1 | !: 2 | |= mad=[who=@p now=@da eny=@uw ced=cred] 3 | |= zab=[sud=scud quy=quay] 4 | ^- love 5 | :- %ham 6 | :~ %html 7 | :~ %body 8 | +"urbit: {neighbor} ready at {}." 9 | :: 10 | :- %ul 11 | |- ^- marl 12 | ?~ messages ~ 13 | :_ $(messages t.messages) 14 | ~[%li +"someone said: {(trip i.messages)}"] 15 | :: 16 | :~ ~[%form action/"fun" method/"post"] 17 | -"message: {%[%input type/"text" name/"msg"]}" 18 | -"message: {~[%i "foo"]} 19 | {I could have 8347r63874r887*&$^*&^$%*&^#* in here} 20 | == 21 | == 22 | == 23 | -------------------------------------------------------------------------------- /urb/zod/try/web/test.md: -------------------------------------------------------------------------------- 1 | #This is a header 2 | 3 | This is a simple **markdown file**. When I type stuff, it appears! 4 | 5 | I can get it to reload and everything... 6 | But if there are multiple lines... 7 | 8 | I really do expect a paragraph break, here, though. I don't 9 | -------------------------------------------------------------------------------- /urbit.spec: -------------------------------------------------------------------------------- 1 | Name: urbit 2 | Version: 0.2 3 | Release: 1%{?dist} 4 | Summary: The Urbit environment 5 | 6 | License: Public domain 7 | URL: http://urbit.org/ 8 | Source0: urbit.tar.gz 9 | 10 | BuildRequires: openssl-devel, ncurses-devel, gmp-devel, libsigsegv-devel 11 | Requires: openssl, ncurses, gmp, libsigsegv 12 | 13 | %description 14 | Urbit is a new operating environment designed from scratch. 15 | 16 | %prep 17 | %setup -q 18 | 19 | %build 20 | make debbuild LIB=%{_datadir} 21 | 22 | %install 23 | rm -rf $RPM_BUILD_ROOT 24 | make debinstall DESTDIR=$RPM_BUILD_ROOT 25 | 26 | 27 | %files 28 | %{_bindir}/vere 29 | %{_datadir}/urb/* 30 | %doc 31 | 32 | 33 | 34 | %changelog 35 | * Sun May 25 2014 urbit 36 | - Package for Red Hat 37 | --------------------------------------------------------------------------------