Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vaporization Memory Management #9

Closed
Pebaz opened this issue Dec 9, 2020 · 4 comments
Closed

Vaporization Memory Management #9

Pebaz opened this issue Dec 9, 2020 · 4 comments

Comments

@Pebaz
Copy link

Pebaz commented Dec 9, 2020

I'd like to know more about this particular technique mentioned here:

https://www.slightknack.dev/perma/master/131/53d2e32b388719c6165058f69621281fb78b5669434cf69b6f704fde2eb35969

Do you think you could finish the blog post or give me a brief rundown here?

Also, I think your software has a lot of potential, hitting "watch" on GitHub for future development ;)

One more thing, I'm intrigued by the Veritable Computation Initiative but little information is given about it. Is a website coming soon?

🐝

@slightknack
Copy link
Member

slightknack commented Dec 9, 2020

The website's a bit outdated: So vaporization was a memory management technique I was working on for a while. It's essentially SSA + COW — at compile time, the compiler tracks how data moves through the program, and automatically determines the lifetime of certain objects. Using this information, it optimizes away what it can, and leaves simple instructions for the interpreter to automatically free memory when applicable. This circumvents the heap, and essentially makes just about everything really fast alloca-style allocation.

The main issue with this is closures. When you close over some data, you're basically making a reference to some data. This isn't an issue for COW semantics, the issue is mutation. Why have mutation in a functional language? a quote from withoutboats:

As I said once, pure functional programming is an ingenious trick to show you can code without mutation, but Rust is an even cleverer trick to show you can just have mutation.

Passerine isn't Rust, but it takes inspiration from it. Some problems can be solved elegantly with mutation, there's no other way to put it. I'm considering removing mutation in closures, but I'm still thinking about if. If I do that, I can move back vaporization, which will be pretty cool. For now passerine is just reference-counted with mechanisms in place to prevent cycles.

I've got to go for now, but I'll follow up with what Veritable is about later. Hope that helped clear some things up! (This was a super quick post, so please forgive any silly eratta.)

@Pebaz
Copy link
Author

Pebaz commented Dec 9, 2020

Thanks for the quick reply! That's very interesting, I like it

@slightknack
Copy link
Member

slightknack commented Dec 10, 2020

One more thing, I'm intrigued by the Veritable Computation Initiative but little information is given about it. Is a website coming soon?

I'm working on a website, but it might be a while before I pull everything together.

What is Veritable? From kitbag's¹ README:

Many issues seem daunting today because we do not yet have the tools to solve them. Veritable is an open initiative to develop new tools to solve today's [and tomorrow's] technological problems. There are currently two publicized Veritable projects:

  • Passerine, a small extensible programming language.
  • Solidarity, a distributed platform built for communication and collaboration.

So to answer your question: Veritable is an Initiative to develop tools to tackle hard technological problems (we might not know exist yet). I'm starting small – with a programming language – but I'm in this for the long run:

My next goal [after Passerine has matured] is Solidarity, another project of the Veritable Computation Initiative. It will act as an alternative to the world-wide-web; built around privacy, collaboration, versioning, and local-first applications. I plan to use Passerine, Rust, and Wasm to build this future.

— Me, quote from here

My overarching goal is to create an organization of project leaders each overseeing and actively working on a bazaar-style open-source passion projects/tools (cornerstones) that further these goals.

It's fairly very ambitious, and will undoubtedly take a lot of hard work to pull off. This is something that will happen on the order of years, not days or weeks. I want to do it the right way: I'm still working out how leaderless merit-based governance, contribution recognition, project sponsorship, and a number of other factors can work together to create a strong, directed, – well – Initiative toward a common goal.

I know Veritable all sounds a bit crazy, but I'm putting in the work, taking things one day at a time, and hoping for the best.

😄

  1. Kitbag being the (WIP) protocol that underpins Solidarity.

@Pebaz
Copy link
Author

Pebaz commented Dec 10, 2020

I appreciate the detailed reply! I'm super interested in stuff like this, and I'll be watching your progress from afar.

As a side note, you might be able to get some general inspiration from Urbit because they're doing something completely different (OS dev), but starting at ground 0 with a base programming language. The solutions to their various implementation challenges may be helpful to you.

I wish you the best on achieving your dreams with this/these projects!

@Pebaz Pebaz closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants