Live data from Hacker News

Atom Shell is now Electron

blog.atom.io

51–60 of 84 posts

Re: Atom Shell is now Electron

#51

Earlier quoted context omitted.

Translation: "more people know JavaScript than CoffeeScript, so you shouldn't bother with CoffeeScript" More people are familiar with Notepad than vi. Does that make vi a bad choice?

> More people are familiar with Notepad than vi. Does that make vi a bad choice? That analogy doesn't work, because editors don't have network effects, whereas programming languages do.

There's many reasons why that analogy doesn't work, and "network effect" isn't one.

Appropriate tool, appropriate job.

Re: Atom Shell is now Electron

#52

Electron's / Atom Shell's homepage isn't doing a good job of explaining what it is (as someone who's unfamiliar with it). Is it a site-specific-browser implementation? It's certainly not a "shell" in the normal sense of the term.

>Electron is the cross-platform application shell we originally built for the Atom editor to handle the Chromium/Node.js event loop integration and native APIs.

Sounds pretty straightforward to me. They created APIs for Node.js to allow people to make cross-platform applications, such as Atom (a text editor).

Re: Atom Shell is now Electron

#54

Earlier quoted context omitted.

That's like saying you won't use Rails because it's written in Ruby and not C. Also, it's nice to work in a language that has the right features and not just all the features. I like CoffeeScript as much for what it doesn't have as for what it does have. I recently saw this piece of code: new Array(26) .map(function (item, index) { return String.fromCharCode(65 + index); }) as a "heads up" for map lovers. That's the…

const caps = new Array(26).map((item, index) => String.fromCharCode(65 + index)); It's not wrong. Could maybe be better though.

As others have pointed out, the semantics are pretty hard to deal with. But, it's the style that I think is the really bad part of this snippet. Why would you create an array of empty elements to iterate over just to grab the index? In CoffeeScript, however, the language guides you to this solution:

    [65..90].map (number) -> String.fromCharCode(number)
where you're operating on the elements of your array and you don't care about their index.

Re: Atom Shell is now Electron

#55

Earlier quoted context omitted.

> More people are familiar with Notepad than vi. Does that make vi a bad choice? That analogy doesn't work, because editors don't have network effects, whereas programming languages do.

There's many reasons why that analogy doesn't work, and "network effect" isn't one. Appropriate tool, appropriate job.

I'd argue that Javascript is never the appropriate tool for any job, but to each his/her own :)

Re: Atom Shell is now Electron

#56
post #13

The thing that turned me away from Atom and its' development is CoffeeScript. As someone who loves idiomatic JS, I still can't get why you'd pick a language that makes tooling and debugging a nightmare. It's also a kick in the gut to efforts to fix the shortcomings of ECMAScript like ES6 [1]. [1] https://github.com/lukehoban/es6features

> It's also a kick in the gut to efforts to fix the shortcomings of ECMAScript like ES6 [1]. irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows. Without CoffeeScript, lots of people wouldn’t have known that they wanted some of the things that are in ES-6. As it is, you don’t need CoffeeScript to develop for Atom. Which is p…

  irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows.
ES6 is a real specification supported by JavaScript engines.

  As it is, you don’t need CoffeeScript to develop for Atom. Which is part of the beauty of CoffeeScript. It’s interoperable with what you’re doing today.
The core of the Open Source project is in CoffeeScript.

Let's say the community had their way, and Atom was rewritten in JS well.

There's still a JS/V8/Chrome for a dependency. On an application where we're rendering huge walls of text - we forgo native redraw. Crucial to response time.

It's fun and time-saving for core developers to forgo the grueling work of portable, native, fast code.

But who pays the cost for the shortcuts?

Re: Atom Shell is now Electron

#57

Earlier quoted context omitted.

const caps = new Array(26).map((item, index) => String.fromCharCode(65 + index)); It's not wrong. Could maybe be better though.

As others have pointed out, the semantics are pretty hard to deal with. But, it's the style that I think is the really bad part of this snippet. Why would you create an array of empty elements to iterate over just to grab the index? In CoffeeScript, however, the language guides you to this solution: [65..90].map (number) -> String.fromCharCode(number) where you're operating on the elements of your array and you don't…

> Why would you create an array of empty elements to iterate over just to grab the index?

Because it's the shortest way to do it in that language.

I think something like:

    [A-Z].reverse
or:

    reverse([A-Z])
might even be better. Do you know of a language with that syntax?

Re: Atom Shell is now Electron

#59
post #56

Earlier quoted context omitted.

> It's also a kick in the gut to efforts to fix the shortcomings of ECMAScript like ES6 [1]. irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows. Without CoffeeScript, lots of people wouldn’t have known that they wanted some of the things that are in ES-6. As it is, you don’t need CoffeeScript to develop for Atom. Which is p…

irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows. ES6 is a real specification supported by JavaScript engines. As it is, you don’t need CoffeeScript to develop for Atom. Which is part of the beauty of CoffeeScript. It’s interoperable with what you’re doing today. The core of the Open Source project is in CoffeeScript. Let…

> The thing that turned me away from Atom and its' development is CoffeeScript.

...

> There's still a JS/V8/Chrome for a dependency. On an application where we're rendering huge walls of text - we forgo native redraw. Crucial to response time. > What makes Atom a viable choice when there already is free, open source, native, cross-platform editors with great plugin ecosystems?

I guess maybe CoffeeScript isn't what turned you away?

Re: Atom Shell is now Electron

#60
post #59
post #56

Earlier quoted context omitted.

irony alert: Brendan Eich has said publicly that CoffeeScript was the impetus for several of the features that made it into ES-6, like fat arrows. ES6 is a real specification supported by JavaScript engines. As it is, you don’t need CoffeeScript to develop for Atom. Which is part of the beauty of CoffeeScript. It’s interoperable with what you’re doing today. The core of the Open Source project is in CoffeeScript. Let…

> The thing that turned me away from Atom and its' development is CoffeeScript. ... > There's still a JS/V8/Chrome for a dependency. On an application where we're rendering huge walls of text - we forgo native redraw. Crucial to response time. > What makes Atom a viable choice when there already is free, open source, native, cross-platform editors with great plugin ecosystems? I guess maybe CoffeeScript isn't what tu…

As a node developer, seeing any official, open source package in CoffeeScript is a red flag.

The sibling I made a link to a thread about CS in Atom. The creator of express.js has his take:

"Hell I had to rewrite a coffeescript driver this week because I can't have our company relying on things written by people who are unfamiliar with javascript, throwing strings, super awkward apis, lots of indirection, and stepping through the compiled source is a nightmare. It's not like I didn't want to contribute, I even tried for a while, but it's just not worth the hell, it was quicker to just rewrite the thing. Not to say all coffeescript libraries are written poorly, but regardless you're really not gaining much, just losing a lot." [1]

If you write an open source application in CoffeeScript, you're not doing the community a favor, you're doing yourself a favor. They pay the penalty.

[1] https://discuss.atom.io/t/why-coffeescript/131/8

Post reply on HN