urbit / urbit.org

The source for urbit.org
https://urbit.org
MIT License
93 stars 197 forks source link

Hoon pedagogy - Plato now allows anonymous code execution #870

Closed mikolajpp closed 3 years ago

mikolajpp commented 6 years ago

While everyone was asleep, Plato has reached another milestone: a ship running plato can now offer remote code evaluation without logging in.

You can try it out here: http://plato.urbitetorbi.org:8080/plato.html

By default, if plato detects you are not logged in to your ship, it will obtain a fake identity for you (or others) to use using eyre /~as/anon mechanism.

My current idea is to not make plato embeddable. Instead in the future plato will offer "story-like" experience, with specially crafted hoon files, thus departing from traditional programming books style. Instead, we will offer a 'Hoon story' like experience, which is immersive from the beginning. It should feel more like playing with a console, than like grabbing a heavy handbook and painstakingly work your way through the chapters. This is especially important as Hoon requires familiarizing with large amount of runes. Urbit neophyte should spend as much time as possible writing and thinking about them.

While we await this glorious future, Plato as it stands now allows us to play with Hoon without even coming near the console, or actually running Urbit - significantly decreasing amount of work needed to taste Urbit.

We can treat as a boon for not-yet-martians who could perhaps become intrigued that this stuff actually works ;-)

Feel free to make plans for incorporating this into docs at some point.

joshuareagan commented 6 years ago

This is wonderful!

galenwp commented 6 years ago

It really is.

cgyarvin commented 6 years ago

When I hear the phrase “anonymous code execution,” I always stand up and cheer! :-)

Sent from my iPhone

On Mar 31, 2018, at 10:36 AM, Galen Wolfe-Pauly notifications@github.com wrote:

It really is.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

joshuareagan commented 6 years ago

lol

mikolajpp commented 6 years ago

@cgyarvin I had my doubts, but then the people demanded it long enough.

When something hacks my urbit at least we know there is an exploit in mule :))

Jokes aside, previously anonymous code execution was enforced on the frontend only. You could still poke the plato manually. The proper solution to this is having flag in plato which could be set.

joshuareagan commented 6 years ago

At this stage if people are learning enough Hoon to hack tutorial comets running Plato, I see that as a good thing.

joshuareagan commented 6 years ago

@mikolajpp , is Plato still up somewhere?

@baudtack

mikolajpp commented 6 years ago

It is, however need to update it. Will message you later on your urbit

mikolajpp commented 6 years ago

Migration to Elm 0.19 is taking longer than I expected... I should finish in a couple of days, will message you once I got the hosting plato moon up and running again.

Sorry for delay!

mikolajpp commented 6 years ago

Okay, got it working mostly. We can do some testing together. Message me on my urbit @joshuareagan @baudtack

joshuareagan commented 6 years ago

His urbit is ~ponmep-litsem, for Plato fans.