Live data from Hacker News

Scrapscript: A functional, content-addressable programming language

github.com

31–40 of 43 posts

Re: Scrapscript: A functional, content-addressable programming language

#31

> Scrapscript solves the software sharability problem. > it’s JSON with types and functions and hashed references > it’s tiny Haskell with extreme syntactic consistency Content-addressability is one of the main features of Unison [1]. How do the languages compare? Why did you feel the need to create a new language (especially since both have a strong Haskell flavor). I'm guessing lots of people will have these questi…

I've had an unnamed content-addressable language in my private repos for awhile now. The language was an exploration of what it would look like if an entire language was transactional, and any failures (power loss, etc) could be mitigated by simply restarting execution at the last line of code executed. Content addressability helped solve the issue of ensuring state was consistent even in the presence of restarted I/O transactions.

Re: Scrapscript: A functional, content-addressable programming language

#32
Lots of amazing ideas here! One more that would be great is 'sandboxing' if a program can use network/filesystem/etc, then I would feel safe to run any random scrap if I knew I would get some sort of oauth-looking screen that said what it wanted to access.

Re: Scrapscript: A functional, content-addressable programming language

#33

I am interested in this as a replacement for bash scripts The killer feature would be pulling in other scripts as libraries (they may be published anywhere) but I can lock down the hash of these dependencies inside of my script file. Is this possible?

FWIW we can do this* with bash in the nix ecosystem (not that this knowledge should deter you from checking out scrapscript).

* you said locking the hash in the script, and in the nix approach these are generally locked in either a lockfile or in the nix expression.

Can elaborate if you're curious.

Re: Scrapscript: A functional, content-addressable programming language

#35
Related:

Some Tricks from the Scrapscript Compiler - https://news.ycombinator.com/item?id=40933250 - July 2024 (6 comments)

Scrapscript - https://news.ycombinator.com/item?id=40613756 - June 2024 (1 comment)

A Baseline Scrapscript Compiler - https://news.ycombinator.com/item?id=40551583 - June 2024 (4 comments)

scrapscript.py - https://news.ycombinator.com/item?id=39104504 - Jan 2024 (75 comments)

Show HN: Scrapscript “guide”, proposals, and community chat - https://news.ycombinator.com/item?id=36519579 - June 2023 (2 comments)

Show HN: ScrapScript – A tiny functional language for sharable software - https://news.ycombinator.com/item?id=35712163 - April 2023 (135 comments)

Re: Scrapscript: A functional, content-addressable programming language

#36

Hi! It's me, I'm one of the interpreter and compiler authors. Happy to answer questions

This might be a stupid question, but by "content-addressable" do you mean that namespaces are eliminated? This thing where you store each individual version of a function indexed by hash, that's content addressability?

Re: Scrapscript: A functional, content-addressable programming language

#38
post #36

Hi! It's me, I'm one of the interpreter and compiler authors. Happy to answer questions

This might be a stupid question, but by "content-addressable" do you mean that namespaces are eliminated? This thing where you store each individual version of a function indexed by hash, that's content addressability?

Because when I think of content-addressability, I mean you can find things intensionally and not just extensionally, that is, you can know the shape of what you're after and find something that matches that shape. More or less what vector databases are doing these days. But in this context, it seems to mean that all the transactions (? maybe?) are stored and indexed by a unique key - but that still means I need that key to get something, right?
Post reply on HN