Show HN: Imba – I have spent 7 years creating a programming language for the web
1216 pointsMy name is Sindre, and I am the CTO of Scrimba (YC S20). For the last 7 years, I have written all my web apps in a full-stack programming language called Imba. It compiles to JavaScript and its main goal is to make web developers more productive.
I just launched a major overhaul of Imba, so I wanted to share it here on HN, in case anyone are interested in learning more about it. It is very opinionated, so some of you might not like it, but I would love to hear anyones feedback regardless. Constructive criticism appreciated!
The backstory:
Imba initially started in 2012 as an effort to bring the elegance and conciseness of Ruby into the browser, and also because I felt that JavaScript and the DOM should be more tightly coupled together. Over the years, I have taken inspiration from React/JSX, and also Tailwind.
Since 2013, I have built several business-critical apps in Imba, so this is not a toy project or an academic exercise, it is extracted from a real project trying to solve real problems. Today, we are currently a small but passionate community of devs who use Imba all over the world.
The nitty-gritty details:
As mentioned, Imba compiles to JavaScript, and it works on both the frontend and backend. The quickest way to get a feeling of how it works is by checking out this video: https://www.youtube.com/watch?v=8XS5q9xhaMc
Alternatively, here is a list of the main benefits of the language:
* Clean syntax with built-in tags and inline styles
* Imba's Memoized DOM approach is *an order of magnitude* faster than Virtual DOMs (Vue, React). Learn more here: https://www.freecodecamp.org/news/the-virtual-dom-is-slow-me...
* Imba works with Node and the npm ecosystem, and integrates tightly with both JS and TypeScript
* Blazing-fast dev/build tools based on esbuild
Each of the benefits above are explained more thoroughly in our docs here, so please check it out if any of the above points spark your interest: https://imba.io
With this version I feel that I am very close to my vision for what Imba should be. In other words; it is finally ready for public consumption. I'd wholeheartedly advice you to look into it and give it a whirl if you are interested in web development :)
Hope you like it, and please share any feedback you might have in the comments!
PS! We're also hiring Imba developers at Scrimba - see https://jobs.scrimba.com/. We don't expect you to be a seasoned Imba developer, but we expect you to pick it up fast :)
Comments (345) 91 threads
Earlier comments> bringing the elegance and concision of Ruby into the browser
As a big fan of Ruby how does this tap into the elegance of Ruby? Ruby is readable, this is not. In Ruby it's very difficult to write code that makes people suffer greatly to understand, this seems to be the opposite.
> It is very opinionated, so some of you might not like it
As if that's the reason people won't like this. Give me a non-opinionated language and I'll show you as many people not liking it. Create a good language and people will flock.
fs = font-size
fw = font-width
ta = text-align
c = color
So that the primitives match what people are familiar with from before, and match the actual web standards/specifications.
So that code which is reproduced and communicated online is also immediately readable for people who are not familiar with the abbreviations.
To gain adoption, reducing onboarding friction is key, and judging from my impression of Imba, as well as others' comments here, I think a lot of that unnecessary friction could be reduced.
On the other hand, if pros like reading very terse code, maybe an IDE plugin could be made to toggle the abbreviations.
What a truthfully useless statement. "Good" means having opinions about things that dont matter? Like "I don't like that css uses full words, I prefer these acronyms"
Who gives a shit? Is this language designed to prevent copy pasting? You may be on to something here.
And this garbage css syntax is not concise, it's stupid, it's concise in the same sense that emoji is concise comparing to English.
Continue this thread — 2 replies
I've never heard of Imba before this post and haven't seen any real-world projects (besides Scrimba). If this is as good as it looks we'll probably get some soon.
Reminds me of Elm which took a similar route and seems to be successful.
As someone else said, one thing you probably want is static typing. Also make sure your language works well on larger projects. Everyone thinks they're making a simple website, but then it scales.
Depends what "your own" means. If it's a one-off language just for one specific project, then you're right. But this one is much more than that. Surely you don't think people should stop making new languages entirely?
All these languages are supported by huge groups. They have hyper-optimized compilers or JIT, IDE integration, libraries, and adoption.
If you can form a huge group, then you can beat these languages. Or if you target a niche. Or if you can use existing tooling (transpiling, LSP, effective existing libraries), and spend a lot of time and effort. Imba seems to be taking the third approach.
This reminds me of the AngularJS(1) days, where if something didn't work (update), you will add a few well placed $apply or $digest everywhere. And of course if it doesn't work, you throw that $apply & $digest calls in s "setTimeoutLoops"... it got ugly fast.
This was of course was not the "correct way" of doing it in a "well written application" but many programmers working on one codebase, eventually somewhere someone gets frustrated with their code not working and in 12 months, you have these little "performance suckers" all around your code.
I don't really have a solution, maybe make it more "robust" or just keep in mind, programmers of all skill level and frustration levels, might just litter the codebase with these "magic-might-fix-my-issue-calls"
Congrats again on Imba !I do really like it :)
Better productivity is nice, but putting an abstracting in the way could be worse because it hides stuff from you you would otherwise learn or even make better yourself, this is also how we get slow apps which web based applications are infamous for. We need more native apps and new areas to explore not more of the same billion JavaScript libraries etc. JavaScript is brain rot for programmers and places creative people in tiny bloated slow sandboxes where they create carbon copies of each other. I hope someone finds it useful, i don't mean to rag on about this particular project.
The truth about Svelte: https://gist.github.com/Rich-Harris/0f910048478c2a6505d1c321...
Svelte was a minimalistic and familiarity-optimised response to Imba:
"These projects are all very cool, but there's a reason they haven't hit mass adoption: they want to control the entire world. You can't adopt Elm or Imba incrementally" - Rich Harris of Svelte
Imba: Created in 2010. Released some 7 years ago, Github repo in around 2015. https://imba.github.io/imba-guide/lvl0/about/
Svelte: Initial release November 26, 2016. https://en.wikipedia.org/wiki/Svelte
All comments shown.
Couldn't load more comments. Check your connection and try again.