Rip language. Compiles to ES2022. Built-in reactivity
25 points
2 days ago
| 4 comments
| github.com
| HN
angleofrepose
11 hours ago
[-]
This is cool. I enjoy seeing these kinds of projects, thanks for sharing it and thanks for making it.

There has been so much innovation over the years around transpilers/compilers to JS, it makes me wonder what a programming paradigm of à la carte first class language functionality could look like and how it might interoperate. A system in which I might grab Haskell type syntax, Clojure list comprehensions and JS arrow functions, all together, and all working just fine.

Probably want to break up files into more granular chunks, probably more like next gen polyglot notebooks beyond a cell per language and more like custom languages composed of features in any given cell.

The system could be made to translate between functionality based on editor preference. Like python list comprehensions? Read my Clojure comprehension in that syntax.

I know this would not perfectly map, as some language functionality is more powerful than others. Still interesting to think about.

reply
ngruhn
11 hours ago
[-]
> New operators — !, //, %%, =~, |>, .new(), and more Reactive operators — :=, ~=, ~> as language syntax

I my mind, this is such common mistake in language design. For people familiar with the language, adding just-one-more operator is very enticing: it's succinct and avoids naming things. But do that a few times and the language becomes a cryptic mess where everything has a random !,*,#,$,# attached somewhere. Looking at you JavaScript and C++. It can get even worse when operators can be defined in userland like in Haskell. Props to Python for keeping it mostly at bay.

reply
jampekka
5 hours ago
[-]
I think those are mostly well justified and substantially add to ergonomics. Await and the reactive operations are used very heavily in many codebases, and especially the reactive code is quite verbose with useState et al. .new allows constructor chaining. Python has // too, and it makes many indexing operations a lot easier to read.

One missed opportunity here is using the bitwise operators for more common use cases. They are very rarely used in this high level languages, and are a bit weird C remnant in them.

reply
burky
9 hours ago
[-]
This made me think of Perl.
reply
childintime
5 hours ago
[-]
What about APL? Sigh, why not just use named functions?

I also doubt array comprehensions are a win, it feels like niche syntax.

reply
jampekka
5 hours ago
[-]
> Sigh, why not just use named functions?

I.e. a Lisp?

reply
childintime
5 hours ago
[-]
> Inspired by: CoffeeScript, Lisp, Ruby | Powered by: Bun
reply
jampekka
5 hours ago
[-]
I meant that most Lisps are named functions/macros only (with some named special forms), and you are calling for that kind of syntax?
reply
Yiin
10 hours ago
[-]
been using my own vue inspired library @yiin/reactive-proxy-state in backend environments with lot of joy and was thinking if the time will come for some new language to have reactivity as first class citizen, I guess this is a step towards that, interesting to see.
reply
nothinkjustai
10 hours ago
[-]
Completely AI generated btw :)
reply
perfunctory
3 hours ago
[-]
How can you tell?
reply