Lurker News
Hi friends,

I started casually working on scrapscript in 2015. I built a few compilers over the years to test out various ideas/implementations, and I think I'm finally happy with the overall design.
The code is not public yet. Email me at hello@taylor.town if you're interested in joining the core team later this year.
Let me know if you have any questions or feedback :)

Comments (135) 41 threads

Show all comments

Showing thread 5 of 41

verdverm1 reply#
Would the IPFS-ness of this make updating all the programs that suffer from an exploit or error a difficult thing? Kind of like smart contracts, once it is published, there is no changing it? So the chain of dependencies containing the exploit or error, make updating all of the consumers a pain.
surprisetalk1 reply#
This is a great observation.

By default, using a name like `janedoe91/fibonacci` pulls the latest version of that particular scrap from the scrapyard. But all of its references are baked-in unless the author updates them.
The way around this is that consumers are empowered to use whatever forcing upgrade strategies they want. All scraps are transparent, so you can pipe everything through an "upgrader" scrap before execution, which replaces dependencies all the way down the stack with their latest versions. I'm sure many of these upgraders will exist depending on what types of tradeoffs you're looking for.

verdverm1 reply#
Can scraps be versioned? Is it possible to see the available versions of a scrap? Could you add support for dependency management?

MVS is a nice and easy algo: https://research.swtch.com/vgo-mvs

surprisetalk1 reply#
Yes, scraps can be versioned:

  user/my-scrap@99
And you can check the available versions of the scrap by querying the scrapyard directly. But omitting the version will just use the latest:

  user/my-scrap
Each scrap contains a full list of its own dependencies, so there is no need for external dependency management.

All scraps are transparent, so you can create your own tools to manually tweak/replace dependencies before execution:

  $ cat my-scrap.ss \
    | scrap apply my-dependency-helper \
    | scrap eval
verdverm4 replies#
This fixer would have to walk the dependency tree. What if something breaks contract in the middle, something I do not control? That sounds like a huge burden on developers with lots of risk.

Why opt out of proper dependency management?

Continue this thread — 4 replies