Live data from Hacker News

Show HN: Imba – I have spent 7 years creating a programming language for the web

news.ycombinator.com

201–210 of 354 posts

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#201

> Getting started > > The best way to get started with Imba is to use npx to get a brand-new project up and running. What is npx?

It's a command from node that allows executing commands from node_modules.

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#202
Really amazing landing page, normally I just scroll though in one second but now I'm really taking the time to try and understand the examples.

Small note, the clock demos don't update every second in Firefox for some reason. On Edge it worked fine.

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#203
post #31

Looks cool. I'm honestly curious as to why a lot of new web languages/frameworks are mixing logic and content in the same file again though. The distinction between HTML, JS and CSS always made perfect sense to me. Anyone care to enlighten me?

A bad metaphor I just came up with: You're cutting a birthday cake. If you do the horizontal cuts you could at best have like 4 cuts and it's very hard. If you do the vertical cuts you could easily have like 16 cuts for everyone.

Because the horizontal way separates the concern the wrong way, or more precisely, the non-scalable way.

The idea is the same way that backend architectures are migrating from layered architectures to microservice or DDD alike architectures.

HTML, CSS, JavaScript separation of concern: 3 layers. Layered architectures: presentation, application, domain, infrastructure etc. There's only O(1) number of layers, so it's not scalable enough for modern applications. You can came up with more layers, but it's still O(1) and would be more strechy, despite the business and codespace are growing fast. People will struggle because everytime they change one layer, they have to find the corresponding other layers of code - it starts to defeat the purpose of separation where it should help people not caring other layers when modifying code.

A more critical separation of concern is to have O(n) separation: you can different domains like products, inventory, sellers, account managment, custommer support etc. If your business continue to grow, you could have more of them. And more importantly, it's much easier to separate teams into pizza-sized teams than layered separation.

Don't get me wrong, layered architectures are still useful. In fact, most of the DDD implementations are layered. But there's mental overhead when you introduce separation. Communities like React and Vue decide that it makes sense to merge layers in Front-end for local reasoning over separation, and accoding to my experience it works well (because I find it's very common to modify HTML, JavaScript, and CSS at the same time before I even started to use React).

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#204
How does it know whether to run the code client-side or server-side? How easy is it to accidentally end up creating SQL statements client-side and running them on the server?

If all the code runs server-side, is it not possible to create modern web apps on it where most interactions happen client-side, or does every request have to wait for the server's response?

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#206
post #31

Looks cool. I'm honestly curious as to why a lot of new web languages/frameworks are mixing logic and content in the same file again though. The distinction between HTML, JS and CSS always made perfect sense to me. Anyone care to enlighten me?

Another way too look at it: Do you prefer backend, frontend, and databases to be separate teams, or should each team have ownership over their own backend, frontend, and db?

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#207

Earlier quoted context omitted.

Considering Javascript is the only language supported on the frontend, claiming to be more productive is definitely valid. Coffeescript was a breath of fresh air compared to writing ES5.

We need a Coffeescript Renaissance!

Nothing is holding you back from using it!

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#208

Earlier quoted context omitted.

Considering Javascript is the only language supported on the frontend, claiming to be more productive is definitely valid. Coffeescript was a breath of fresh air compared to writing ES5.

I sure am tired of Javascript being the lingua franca of the web. Imagine if we decided C was good enough and now all programming languages from that point on should just be something that cross-compiles to it.

Isn't that what WebAssembly is for? It's kind of the web version of C pretending that everything is a PDP-11.
Post reply on HN