Live data from Hacker News

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

news.ycombinator.com

331–340 of 354 posts

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

#331
post #100

Earlier quoted context omitted.

I've thought about this a lot. I considered "con" for constants. I don't hate it. It also works as a double entendre-- "con" in Spanish means "with". So the following code could be read as "with name equal to Brad". con name = 'Brad' I can't help but feel that it's somewhat jarring though. If I had my druthers, I think I would choose "var" and "def" to declare mutable and immutable variables, respectively. def PI = 3…

> It also works as a double entendre-- "con" in Spanish means "with". Triple even! In French it's the equivalent of "cunt".

And in English, to go full circle, a con is what a con man pulls; a confidence trick.

Hey BTW, is a JS "const" really constant, or can it (like in some other languages) be changed after all? Because if it can, then it isn't really const but more of a con...

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

#332
post #16

Earlier quoted context omitted.

I think it has three reasons: The more often a construct is used in a language, the shorter I like it to be. It groups variable definitions mentally by having them all the same length if they are "var", "let" and "con". It would often make the code look more uniform which is more beautiful in my eyes. Example: https://github.com/facebook/react/blob/cae635054e17a6f107a39... I would prefer the lines 226 and 227 to star…

As far as code being visually appealing, for me those two lines are the least of that code’s troubles. I’m sympathetic to wanting code to have good aesthetics. If I was writing those lines I probably would have daydreamed for 5 minutes thinking of new names for map and record so that the equal signs would line up.

   con map = ...

   let rec = ...

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

#333

Wow you are clearly a genius. The syntax looks beautiful! This is great. I don't want to use it (the best tool for the job for me is one that fits my own mental models, my own mind, and this is not it) but you are a genius. Also -- wow those Nordics are super productive programmers/coders/developers/open-sorcerers (Sindre Aarsaether & Sindre Sorhus & Linus Torvalds & ... ...) -- could it maybe have something to do wi…

> please insert other names below to educate me

Bjarne Stroustrup, Anders Hejlsberg.

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

#334
The author mentioned it's liberating to not need to manually manage the state.

This is also the downside of react compared to angular. You have to explicitly call function to update state, as oppo to transparent state update in angular or stencil.

I made a react hook (use-state-proxy) using proxy to auto call the set state function but it's still doing the work behind.

Memorized dom in lmba, solid.js and surplus look like more efficient and reasonable design.

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

#336

Earlier quoted context omitted.

Any extra salary? No of course not. Lol.

Ha ha no. I didnt even have a discussion about that. I think i need to talk to my manager at some point. But he has been very supportive!

Just out of curiosity, what is your age? You can give a range if you are not comfortable sharing the exact number.

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

#337

Earlier quoted context omitted.

"I know almost nothing about the subject at hand, so here's my expert opinion on it"

I've been a software developer for 20 years. I've been doing JavaScript since it was invented. I do actually know a lot about these things.

Confession: when I say “completely new to JavaScript”, I mean that I once used it to make badly-animated pages as a kid in the 90s. It’s completely different now, so I say I’m a complete beginner.

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

#338
post #91

I read this and still have no idea what the ‘memoized DOM’ is. There is a broken link to ‘how it really works’. Apparently there is a huge speed-up over react. I don’t actually care about this; I’d rather know what the slow parts of browser DOM changes are, and how it gets around them. Forgive my ignorance if I’m missing something obvious; I am completely new to JavaScript, but so far have found react/vue/etc confusi…

I learned React to know what it was about and what people were talking about. I think a lot of people get the wrong idea about React. They say the virtual DOM is the most important feature, but I think it's actually the fact that it forces you to componentize your code. And it does this by making non-componentized code very painful to work with, so you have to componentize to be able to have any shot at getting React…

> They say the virtual DOM is the most important feature

Who says that now? I mean, in recent years VDOM seems to be more often criticized as the problem (with performance, but also otherwise) with React, even by people who like its basic dev-facing structure. Which is why you see frameworks with JSX and React-like structure (even Hooks, but without the explicit dependency pain point in the case of Solidjs) whose key selling point is no VDOM.

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

#339
post #71

Earlier quoted context omitted.

https://krausest.github.io/js-framework-benchmark/2020/table... This lets you choose from multiple frameworks - comparing svelte against a few react variations, what I saw was that svelte was always fastest, but usually by a factor less than 2 (any react was 1.x times slower than the svelte). The imba vs react numbers (from the article at https://www.freecodecamp.org/news/the-virtual-dom-is-slow-me... ) shows a 30-40…

Tbh, I think the js-framework-benchmark is flawed. It mostly tests the performance of the browser. I should write a whole blog post about this. Just as an example, all the table benchmarks uses a table with non-fixed width, which results in a full repaint AND layout of the whole table+page whenever a cell changes. If you change the table to a fixed width (as all real tables are) the relative difference between the fr…

This is a cool project somebee. Interested to explore more.

On benchmarking: I went through the same concerns and ended up building a little benchmarking tool for a simple reactive UI library I'm working on. It's not super user-friendly yet but doing a good job of profiling tasks.

You can write custom benchmarks by clearly separating pre-setup work than relying on ready-made benchmarks (a bit of a pain initially, but helps a lot to fine-tune at unit-level going forward).

It uses Chrome DevTools Protocol(CDP) through Puppeteer and allows to analyze execution durations separately (Scripting, Layout, Paint, etc). Plus, it saves raw JSON profiling data, so you could import & examine it visually on DevTools Performance Tab's Timeline.

Think it will be helpful: https://github.com/dumijay/pfreak This is how the results look like: https://caldom.org/benchmark/

Post reply on HN