Live data from Hacker News

Scrapscript: A functional, content-addressable programming language

github.com

11–20 of 43 posts

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

#12
The web site appears to claim that this solves interoperability between systems. I don't understand how. What enables one system to understand content coming out of another? For example, let's say you have two medical devices sharing patient data. Will scrapscript make it possible for them to create a mapping between the information models of the two systems?

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

#13

> 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…

Great questions and observations! -- > Why did you feel the need to create a new language? Well when I started on this language in 2017-2019(?), I definitely wasn't aware of Unison. I remember talking to Richard Feldman about scrapscript when he first started working on Roc (fun fact: I was the first person Feldman added to the private repo!). I spent a long time on the initial Scrapscript implementations, trying to…

> From what I understand, Unison has very little in common with Scrapscript.

I think you should read up on Unison a bit more, I see a lot of overlap.

Both identify code with hashes, and implement code sharing through hash based syncing. Builtin serialization is also present in both, and both are very Haskell inspired.

One difference I see is the sharing mechanism, where Unison has a local sqlite repository and tooling for uploading, while Scrapscript seems to be built more around IPFS. But that seems like an implementation detail rather than a fundemantal difference.

Unison supports algebraic effects, aka abilities with handlers, which is a much more powerful and general concept than the platforms in Roc.

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

#14

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?

Deno can do this, and some other languages but Deno is the nicest I've used for this purpose so far.

There's a great list here

https://dbohdan.com/scripts-with-dependencies

but be aware that a lot of those are through third party tools and therefore don't have proper IDE support etc.

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

#15

Earlier quoted context omitted.

Great questions and observations! -- > Why did you feel the need to create a new language? Well when I started on this language in 2017-2019(?), I definitely wasn't aware of Unison. I remember talking to Richard Feldman about scrapscript when he first started working on Roc (fun fact: I was the first person Feldman added to the private repo!). I spent a long time on the initial Scrapscript implementations, trying to…

> From what I understand, Unison has very little in common with Scrapscript. I think you should read up on Unison a bit more, I see a lot of overlap. Both identify code with hashes, and implement code sharing through hash based syncing. Builtin serialization is also present in both, and both are very Haskell inspired. One difference I see is the sharing mechanism, where Unison has a local sqlite repository and toolin…

I think ergonomics and practicality could use more consideration when discussing new languages. A language exists in an ecosystem.

At a glance to me, Scrapscript looks very traditional and easy to grok from a regular programmers perspective, there are build steps, you can use an IDE or editor etc.

Unison feels more like "Smalltalk Squeak" and Scrapscript feels more like "GNU Smalltalk". Come live in our new world, or integrate new stuff into your existing world kind of vibe.

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

#16

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

What is the runtime thing I run on a machine in order to support shipping code around? How does that work?

Unison makes reference to a node I also could find scant details of rust.

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

#17

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?

Yep! In scrapscript, you can use the hashes directly to lock down the versions of any code directly.

There's a few reasons why this might be annoying to deal with in practice, so we're working on a few different ways of managing versions throughout your script

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

#19

So, (and this is five minutes playing here no deep dive), content-addressable is taken Seriously here. Each expression is a hash of (its ancestors - not too sure) but the implication is sort of the git dag is built into the language. Looks like that has deepmimplications for releases, deployments, inspecting code chnages There is an implication that my-labcorp is using scrapscript. Which is interesting as it seems to…

I don't think I fully understand the way versioning and encapsulation happen by hashing in this, but I agree that conceptually it sounds very cool. Maybe the first new language I'd take a stab at in a long time just for the novelty of it.

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

#20

> 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…

Great questions and observations! -- > Why did you feel the need to create a new language? Well when I started on this language in 2017-2019(?), I definitely wasn't aware of Unison. I remember talking to Richard Feldman about scrapscript when he first started working on Roc (fun fact: I was the first person Feldman added to the private repo!). I spent a long time on the initial Scrapscript implementations, trying to…

> I think defeating alcoholism also made me much more productive haha

Just out of curiosity and because we all have different limits - how much do you think you used to drink, generally, and what helped you quit?

Post reply on HN