Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

=* tistar should allow for optional type annotation #585

Closed
Fang- opened this issue Jan 18, 2018 · 11 comments
Closed

=* tistar should allow for optional type annotation #585

Fang- opened this issue Jan 18, 2018 · 11 comments
Labels
good contributor issue well-specified, doesn't tie into ongoing work %hoon

Comments

@Fang-
Copy link
Member

Fang- commented Jan 18, 2018

=* is a rune strictly used for code readability, and being able to add in a type annotation seems to be in line with that.

Should help with sanity checks for both the writer ("I expect this thing here to be of this type") and the reader ("what type is the data that p.q.r.s.dat refers to again?").

@Fang- Fang- added the %hoon label Jan 18, 2018
@cgyarvin
Copy link
Contributor

cgyarvin commented Jan 18, 2018 via email

@Fang- Fang- added help wanted blocked, send help! good contributor issue well-specified, doesn't tie into ongoing work and removed help wanted blocked, send help! labels Jan 18, 2018
@mikolajpp
Copy link

Just signalling, ~palfun got me on this. We will see what happens.
Anyway, I always kind of liked compilers, especially to-nock ones ;-)

@cgyarvin
Copy link
Contributor

cgyarvin commented Jan 25, 2018 via email

@joemfb
Copy link
Member

joemfb commented Mar 26, 2018

@mikolajpp, are you working this one? I'm looking for a target, so I'll take it if you're not.

@cgyarvin
Copy link
Contributor

cgyarvin commented Mar 27, 2018 via email

@mikolajpp
Copy link

@joemfb feel free. Working, but not in an immediate sense, as in I am reading through hoon.hoon for the first time...

@joemfb
Copy link
Member

joemfb commented Mar 27, 2018

So, it appears I do need help with staging...

I've added a %tstc hoon to demonstrate what %tstr should become:
arvo and vere.

I can sync those changes, |reset or +solid, and everything works as expected:

> =`(a our a)
~zod
> =`(a=@ our a)
0
> =`(a=@ our =`(b=@p (mix (lsh 5 1 (end 5 1 eny)) a) [a b]))
[0 ~danweg-bosrym-dozzod-dozzod]

However, when I update the %tstr implementation to match %tstc in hoon.hoon
(and remove %tstc), I can no longer |reset or +solid. Specifically, I get
%find errors compiling zuse and the vanes -- the same errors regardless of
whether the changes are in vere, surprisingly enough (at least to me). I'm sure
we've discussed the staging procedure before (and I thought I had successfully
done it before), but I'm at a bit of a loss.

For the sake of clarity, here were my steps:

  • boot a fresh fake-zod from master
  • additive changes to vere
  • additive changes to hoon.hoon, |reset, success
  • mutative changes to hoon.hoon, no |reset, +solid fails
  • various failed attempts with and without mutative changes to vere
  • feel stupid

Separately, what do you think of bunting the model in +bust (the placeholder
which is to replace +buss:ut)? I'd prefer to do it in +open:ap, but it seems
like that would require an additional hoon to separate pre and post macro
expansion (due to the convention of calling +open:ap in a default case).

@cgyarvin
Copy link
Contributor

cgyarvin commented Mar 28, 2018 via email

@cgyarvin
Copy link
Contributor

cgyarvin commented Mar 28, 2018 via email

@joemfb
Copy link
Member

joemfb commented Mar 28, 2018

Thanks! I was clearly rusty...

@joemfb
Copy link
Member

joemfb commented Dec 11, 2018

This feature was added in the language changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good contributor issue well-specified, doesn't tie into ongoing work %hoon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants