urbit / shrub

An operating function (Prototype)
https://urbit.org
MIT License
28 stars 2 forks source link

Kids in Accel #26

Closed hanfel-dovned closed 2 months ago

hanfel-dovned commented 3 months ago

There are two solutions here:

  1. Grab the entire (map pith pail) from kids.bowl, slop it in with the face kids, and then have users manually get values from this map. Referencing kid values as a map here feels nicer to me than kidface.kids, but it has the downside of the user not being able to de-vase the values using the stud of the pail, since they can't use ford runes inside of their code. The question here then is: will studs ever work like marks, with global availability? This would be a prerequisite to this solution feeling nice.

  2. Slop each kid's vase in individually and give them faces by parsing the pith into a @tas. I think that this form of referencing is inferior UX due to its opinionated parsing decreasing the level of homointeractivity with the underlying system, but it is immediately doable, and @tiller-tolbus believes it to be superior UX (and I typically trust his intuition on this more than mine). Did we have another issue with this solution? If so, I forget what it was.

Other ideas are welcome.

liam-fitzgerald commented 3 months ago

will studs ever work like marks? can you elaborate?

hanfel-dovned commented 3 months ago

I think I'm being dumb with the mark comparison, but what I really want is something like !<((stud-to-type stud.pail) vase.pail)

hanfel-dovned commented 3 months ago

Actually, I'm realizing that Solution 1 won't work because of nested vases anyway. How do you guys feel about Solution 2?

liam-fitzgerald commented 3 months ago

I think I'm being dumb with the mark comparison, but what I really want is something like !<((stud-to-type stud.pail) vase.pail)

This is intractable because of the hoon type system. There is a vague proposal to run certain files with a compiler that codegens $pail to be a giant $% of all the types it knows about, which would buy you what you want. But I guess I'm wondering what the use case is here?

tiller-tolbus commented 3 months ago

Use-case: I ~zod would like to have an item in my spreadsheet that is the longest message within my DMs from ~nec I give my accel-cell a1 the dependency of /~zod/home/chat/~nec The state of this cell is not very interesting to me, but its kids are interesting What I want in the end is probably just a (list message)

/@ message /> con=message %+ turn ~(val by kids.ref) con

hanfel-dovned commented 2 months ago

Superseded by #30