Commit Graph

256 Commits

Author SHA1 Message Date
Philip Monk
00d180c008 Merge branch 'pr' into philip/tomb 2022-05-14 20:59:33 -07:00
Philip Monk
915dc733f5 Merge remote-tracking branch 'origin/m/buclus' into philip/tomb 2022-05-14 20:39:51 -07:00
Philip Monk
27a4a9584f hoon: in molds, unify result with input 2022-05-10 01:01:25 -07:00
fang
13d1c28927
hoon: make manual shorthand type printing prettier 2022-04-06 23:24:43 +02:00
Joe Bryan
9a1b3eaf15
Merge pull request #5664 from urbit/jb/type-leak
hoon: plug type leak in compiler bootstrap
2022-03-28 09:08:59 -04:00
Philip Monk
4278d4c8b3
Merge pull request #5673 from urbit/philip/fix-uno
hoon: fix +uno:by when map is null
2022-03-25 18:23:32 -07:00
Philip Monk
50fb239d2f hoon: fix +uno:by when map is null
This crashed at runtime when `a` is null because it tried to instantiate
`meg`, and that means bunting its argument, and that calls `node`, where
the assert failed.

Wet gates use the bunt of their formal argument, so we use that.
2022-03-25 18:08:13 -07:00
Joe Bryan
d937e131a4 hoon: preserve structural sharing by testing subject/product equality in +burp 2022-03-25 10:28:05 -04:00
Joe Bryan
15e570a622 hoon: plug type leak in vase literals by properly burping %hint 2022-03-25 10:27:32 -04:00
Jōshin
4be43d5e28
hoon: fix comment whitespace 2022-03-21 10:24:27 -06:00
fang
3df227760f
hoon: hook up $+ for shorthand type rendering
Too often when dealing with big types the compiler traces and other such
outputs become hard to read. Wrapping a type as $+(shorthand big-type)
will now print #shorthand in place of the type.
2022-03-10 01:45:18 +01:00
Joe Bryan
ff3bb495d8 hoon: updates %mcgl with an hygienic expansion 2022-02-22 20:39:30 -05:00
~nallux-dozryl
dd53baa059
Fix comment indent for abs:si 2022-01-24 15:24:01 +08:00
fang
bbd044185c
Merge pull request #5227 from urbit/m/righteous-paths
hoon: correctly parse empty path
2021-10-14 23:12:29 +02:00
fang
d0f8eda937
hoon: correctly parse empty path
And reject paths ending in empty segments.

The following cases were being parsed incorrectly:
- `/` represents the empty path, `~`. This was being parsed into `[~. ~]`
- `/x/` is not valid. This was being parsed into `[~.x ~. ~]`

This happens because `urs:ab` has no problem parsing the empty string.
For some supported cases, like `//x` (`[~. ~.x ~]`), this is actually desired
behavior, but it results in trailing empty segments for paths ending in `/`.

Here we apply a `+sear` on top of the existing parser, that transform the `/`
case to produce `~`, and ensures the absence of a trailing empty segment in
all other cases.

Note that we change `(more fas urs:ab)` to `(most fas urs:ab)`. Since `urs:ab`
parses the empty string, this doesn't actually make a difference, but it does
make it more obvious that the `+rear` call will never crash.

Alternative approaches I attempted all resulted in much more complicated
parser, so the dumb `+sear` seems preferable.
We do eat the performance cost of an additional list traversal (in `+rear`)
with this change, but that is probably not the end of the world.

Fixes #1501.
2021-09-16 12:39:50 +02:00
Philip Monk
98d8419c9e
hoon: don't compile .= children twice 2021-08-04 17:02:48 -04:00
Philip Monk
4e16b9c555
hoon: remove +ad
This reverts d96d50199 because +ad is incredibly opaque, and +ergo's
sitting right there anyway.  It looks like it was intended to abstract
over +endo, +elbo, and +ergo, but only +ergo was every implemented.  I
don't doubt the others could be as well, but then they would be just as
inscrutable.
2021-08-04 16:57:03 -04:00
Philip Monk
b0c9fd1940
Merge remote-tracking branch 'origin/lf/hoon-inc' into release/next-sys 2021-06-08 08:59:27 -10:00
Logan Allen
b6206728cc hoon: make +sink more concise 2021-06-04 16:06:40 -05:00
Logan Allen
7ef313c5e1 hoon: add +sink, a slow (but faster than dunk) type printing 2021-06-04 14:40:28 -05:00
Philip Monk
57bea9407e
Merge pull request #4623 from urbit/jb/seminoun-bunt
hoon: update seminoun bunt to be fully blocked
2021-05-18 10:23:30 -07:00
Philip Monk
a57b6f9c9e
Merge branch 'pr' into release/next-sys 2021-05-13 07:04:07 -10:00
Liam Fitzgerald
9b2061a824
hoon: add +succ gate
Adds an +succ (successor) gate. Whilst .+ exists, it is impossible to use
in a point free style and doesn't compose functionally.
2021-04-27 10:24:21 +10:00
Philip Monk
66b4c3f193
Merge pull request #4677 from urbit/philip/fast-refresh
sys: Speed up things used in Landscape
2021-04-19 15:43:16 -07:00
fang
1ec5e5acfb
hoon: add +stap, path parser
And cleans up a bunch of locally hand-written implementations of it.
2021-04-07 21:14:13 +02:00
Philip Monk
7b55097ef4
hoon: memoize rend:co
We commonly print many names in a row, often the same ones.  For
example, on landscape's initial load, we send all the members of all the
groups we're in, and there's substantial overlap.

At least half the cost is in +fein, which is not currently jetted, but I
believe there's an old jet in the git history.
2021-03-28 00:21:30 -07:00
Joe Bryan
549c5e5db9 hoon: update seminoun bunt to be fully blocked 2021-03-17 14:21:58 -07:00
Philip Monk
a5993cc3e7
Merge remote-tracking branch 'origin/release/next-hoon' into release/next-sys 2020-12-18 12:43:07 -08:00
Joe Bryan
6678e7313b hoon: crash with valid tank on %eror 2020-12-15 18:22:51 -08:00
fang
0ef30e0360
hoon: add jet hint for +redo 2020-12-11 21:58:19 +01:00
Joe Bryan
4f79777e0b hoon: reverts to 3e577d4ae7 2020-12-08 16:26:11 -08:00
Joe Bryan
563c2d4c06 hoon: restrict trap subject in +swat 2020-12-07 23:51:10 -08:00
Joe Bryan
c807769b9e hoon: removes +ride printfs 2020-12-07 23:27:31 -08:00
Joe Bryan
fb403bf080 hoon: removes obsolete compiler hooks 2020-12-07 23:27:25 -08:00
Joe Bryan
3e577d4ae7 arvo: kelvins 2020-12-07 22:56:01 -08:00
Joe Bryan
115d4f9ac8 arvo: removes $monk 2020-12-07 00:42:09 -08:00
Joe Bryan
a08e196a95 hoon: avoid "fund: in/by" jet printfs by tweaking +map/+set/+qeu 2020-12-06 17:14:04 -08:00
Joe Bryan
ff06ccd2b9 arvo: completes scry reform 2020-12-06 03:33:43 -08:00
Joe Bryan
a5861a1349 hoon: moves |wa and $worm to arvo 2020-12-05 02:32:54 -08:00
Joe Bryan
d8a6c5e387 hoon: use +mole to virtualize +cue in |so 2020-12-05 00:51:49 -08:00
Joe Bryan
3a42c36298 hoon: adds +swat: deferred +slap 2020-12-04 22:46:02 -08:00
Joe Bryan
1e3378a7f5 hoon: fixes logic bug in date printer (truncation) 2020-12-04 21:38:39 -08:00
Joe Bryan
fa0680d201 hoon: updates +rap comment, removes jet-match hack 2020-12-02 01:21:55 -08:00
Joe Bryan
0e3941f146 hoon: updates +fil to bloq-truncate the repeated atom 2020-12-02 01:20:49 -08:00
Joe Bryan
b5ec0c30f0 hoon: renames +new-end, +new-lsh, +new-rsh 2020-12-02 01:00:09 -08:00
Joe Bryan
9e713a5e10 hoon: removes +end, +lsh, and +rsh 2020-12-02 01:00:09 -08:00
Joe Bryan
bec63413b0 hoon: adds +new-rsh, switches all +rsh call sites 2020-12-02 00:21:51 -08:00
Joe Bryan
089852e948 hoon: adds +new-lsh, switches all +lsh call sites 2020-12-02 00:21:38 -08:00
Joe Bryan
4f9cba2baf hoon: adds +new-end, switches all +end call sites 2020-12-02 00:21:12 -08:00
Joe Bryan
181b1fbdb6 hoon: (and %zuse) use +run and +rut where appropriate 2020-12-01 18:26:18 -08:00