Imba – A new programming language for the web
121–130 of 180 posts
Re: Imba – A new programming language for the web
#122I quote:
"Imba is a new programming language for the web that compiles to performant and readable JavaScript."
Ok, so i understand Imba is a language spec with an implementation that compiles to javascript. "It has language level support for defining, extending, subclassing, instantiating and rendering dom nodes."
Ok so there is special syntax to create DOM elements. Nothing new here. Its just syntax over javascript. What can be done with imba, can be done with vanilla javascript. "it is more than 20 times faster than React"
Wait, what? React is a javascript library, not a programming language. Written in javascript.... How can Imba be faster? Does Imba also include a dom-diffing algorithm.. If so, why would you built that into the language... Woudnt it be better to write a library in imba-lang that can do dom diffing? I'm lost here.Re: Imba – A new programming language for the web
#123Re: Imba – A new programming language for the web
#124Earlier quoted context omitted.
No. Read what I wrote again. You just wrote a template. That's like JSX. You ALSO need a library to do the virtaul dom stuff and/or data binding to write an application. React. !=. JSX. What you have here is a programming language that compiles to javascript and has an inbuilt templating language. So does ES6; `${hi}`. That's a fundamental building block, not a replacement for a high level framework , like react.
I can only conclude that you're so focused on aggressively dismissing this person's work, in the typical HN fashion, that you didn't actually read the comment you responded to, or any of their other responses throughout this thread. You say: >You ALSO need a library to do the virtaul dom stuff and/or data binding to write an application. OP says: >Imba includes syntax for tags (scroll down to "Tags"), virtual DOM dif…
Re: Imba – A new programming language for the web
#125I for once would appreciate it if Ruby programmers would stop trying to avoid writing JavaScript by writing their own JS-based implementation of Ruby. With ES6 and Babel this "new programming language" provides nothing interesting other than making your code look more like Ruby.
Here's a quick (incomplete) list of web innovations you can thank the Ruby community for either popularizing or inventing outright: * REST * Many parts of ES.next * Front-end build tools * CSS pre-compilation * JS transpilation I spent years happily using multi-line template strings while JS developers informed me how idiotic I was for using a transpiler. Since Ruby's goal is to be a language that brings joy to the u…
What the f* are you on? Or were you born a few years ago and just worked with Ruby since then?
Really, how could somebody be so oblivious to this field in order to state stuff like that?
Re: Imba – A new programming language for the web
#126Re: Imba – A new programming language for the web
#127Earlier quoted context omitted.
Here's a quick (incomplete) list of web innovations you can thank the Ruby community for either popularizing or inventing outright: * REST * Many parts of ES.next * Front-end build tools * CSS pre-compilation * JS transpilation I spent years happily using multi-line template strings while JS developers informed me how idiotic I was for using a transpiler. Since Ruby's goal is to be a language that brings joy to the u…
REST was either popularized or outright invented by Ruby? What the f * are you on? Or were you born a few years ago and just worked with Ruby since then? Really, how could somebody be so oblivious to this field in order to state stuff like that?
> What the f* are you on? Or were you born a few years ago and just worked with Ruby since then?
I've been using Ruby professionally for 10 years.
Re: Imba – A new programming language for the web
#128Earlier quoted context omitted.
Here's a quick (incomplete) list of web innovations you can thank the Ruby community for either popularizing or inventing outright: * REST * Many parts of ES.next * Front-end build tools * CSS pre-compilation * JS transpilation I spent years happily using multi-line template strings while JS developers informed me how idiotic I was for using a transpiler. Since Ruby's goal is to be a language that brings joy to the u…
Ruby did not popularize nor invent REST. The other points I don't feel like arguing about..
Re: Imba – A new programming language for the web
#129The author of imba has some problems understanding languages vs frameworks/libraries. I quote: "Imba is a new programming language for the web that compiles to performant and readable JavaScript." Ok, so i understand Imba is a language spec with an implementation that compiles to javascript. "It has language level support for defining, extending, subclassing, instantiating and rendering dom nodes." Ok so there is spe…
Yes.
> Woudnt it be better to write a library in imba-lang that can do dom diffing?
It is: https://github.com/somebee/imba/blob/master/src/imba/dom.sta.... It's a required runtime library if you want to use the tag syntax.
The difference between "language" and "core library" is always a bit mushy. For instance, the JavaScript doesn't only specify the semantics of operations, but also the main objects (String, Array, etc) and a set of functions (push, pop, indexOf, etc).
In the sense that JavaScript ships with default objects for dealing with Arrays and Strings, Imba ships with default classes for dealing with tags and DOM elements. Yes, we could say that tags should just be sugar syntax over regular function calls (which it actually is) and move the DOM diffing out of "Imba". But really, the main point about Imba is the tag functionality and we believe we only need one good implementation.
Re: Imba – A new programming language for the web
#130I for once would appreciate it if Ruby programmers would stop trying to avoid writing JavaScript by writing their own JS-based implementation of Ruby. With ES6 and Babel this "new programming language" provides nothing interesting other than making your code look more like Ruby.
Here's a quick (incomplete) list of web innovations you can thank the Ruby community for either popularizing or inventing outright: * REST * Many parts of ES.next * Front-end build tools * CSS pre-compilation * JS transpilation I spent years happily using multi-line template strings while JS developers informed me how idiotic I was for using a transpiler. Since Ruby's goal is to be a language that brings joy to the u…
No. Rails populated a form of REST and everybody likes to pretend everything Rails is REST and there are a ton of frameworks trying to imitate Rails' approach to REST but Rails neither invented REST nor was it the one thing making REST popular. It was a major factor, yes, but claiming this purely as an accomplishment of Ruby is silly.
I would be willing to give Ruby the point for MVC because of ActiveRecord but MVC is not synonymous with REST.
> Many parts of ES.next
Again, no. ES.next is nothing like Ruby. Some of the syntax was influenced by CoffeeScript (nobody doubts that -- in fact, TC39 members have explicitly referenced it on more than one occasion) but the features are neither novel nor unique to Ruby:
* The class syntax is pretty much universal.
* The arrow functions are evidently influenced by CoffeeScript but look nothing like Ruby's lambda literals (which are the closest equivalent in Ruby). I think CoffeeScript's use of that syntax was actually pre-dated by C# but I may be mistaken.
* Template strings have no more in common with CoffeeScript's and Ruby's string interpolation than with the same feature in other languages. In fact, if anything, I'd say the interpolation syntax is borrowed from PHP -- but the backticks certainly aren't taken from any of them.
* Symbols are kinda like Ruby symbols if you tilt your head and squint really hard and then only focus on the name and not what they actually are. Again, the concept is neither novel nor unique to Ruby.
* Destructuring and rest/spread operators -- yeah, again, not unique or novel. Plus I think even Python preceded Ruby on that.
* iterators and generators -- again, closer to Python than to Ruby.
* import/export -- just an extension of the ideas of CommonJS which in turn aren't anything like what Ruby has.
* promises -- no, sorry, not Ruby.
* the object literal extensions -- again, not Ruby. Ruby doesn't even have object literals in the sense JS does (which is okay, it doesn't have prototypal inheritance either).
> Front-end build tools
No, seriously not. Yes, rake pre-dates grunt and gulp by a fair amount (as well as jake and other JS-based tools barely anyone seems to use anymore). But it certainly didn't invent them nor was the biggest factor in popularizing them. A lot of build tools before the Ruby (and now JS) toolchains came along were built in things like Java, in addition to the various less formalized build tools written in Python or simply bash.
> CSS pre-compilation
I may give you that. Less pre-dates Sass but started as a Ruby gem. Of course neither of them invented CSS minification and there were attempts at generating CSS before. Compass probably took the crown, though, even though front-end tools in generally have moved on to the Node ecosystem, which seems more appropriate for tools primarily concerned with JS (rather than Ruby, Java or bash).
> JS transpilation
Not really. Java-to-JS transpilation was the original hotness that opened up people to the idea. It was followed by various attempts to port other languages to JavaScript. I agree that CoffeeScript is the first one that gained major traction in the startup scene -- although most teams seem to have realised that the drawbacks aren't really worth it (not just the transpilation but the entire part where everyone has to learn a new language on top of a solid understanding of JS itself).
Yes, CoffeeScript was an important step in the evolution of JS but so were DHTML, pop-unders, JSS and animated mouse cursors and status bars -- and everyone agrees those were a bad idea.
The Ruby community is very vocal and self-important but it's neither as uniquely innovative nor as much of an influence as its members like to make it out to be. If PHP is the kindergarden of programming languages, Ruby is the angsty teenager complaining about how nobody understands them and writing blog posts about their deep insights gained from flipping through Atlas Shrugged.