Hacker News new | ask | show | jobs
by practal 1244 days ago
Very interesting read. Also very timely for me (I am always amazed how HN often has posts that resonate strongly with what I am currently doing), as I am just now designing a programming language based on a generalisation of Algebra, which I call Abstraction Algebra. I think there is a strong connection to this post: Behaviours are just an abstraction algebra you program against. Switch out the algebra implementation against another one, and you can adapt the same program to different scenarios without changing the program itself.
3 comments

I always thought it would be neat to have a system that takes math symbols / formulas / functions etc in the notation of a mathematician, and automatically generates highly performant implementations — sort of like Taichi but instead of using python, you just use mathematics.

Seems to me all the tools are available to accomplish this effectively now days.

Good luck on your project, in any case.

Thank you!

Yes, a large part of programming will be just a special case of doing mathematics.

> I am just now designing a programming language based on a generalisation of Algebra, which I call Abstraction Algebra.

I admire your ambition!

To be honest, I am quite amazed by how nicely all the pieces are coming together now. It all just feels right, it feels like collecting fruit from under a huge apple tree.
I am also designing a language based on algebra.

https://GitHub.com/samsquire/algebralang

It's based on the idea there are relations between variables and every function is a concurrent process.

I see you are starting from what you want it to look like. That's a good idea! Did the same for Practal [1]. You might be interested in trying to express your language within Practal. Within the next 1 to 2 weeks something you can start playing with should be available. You will then be able to define your own syntax freely (as Practal contains an LR parser, hidden behind an easy-to-use syntax extension mechanism), together with its semantics. By the end of February functionality like execution via rewriting should be available. By the end of March modules are planned, and I think this is when it will start being real fun to use Practal. You could then define your language just as a module/theory in Practal. That's what I am going to do with the language I am working on anyways!

[1] https://practal.com