What are you working on? - Programming On Unix
Users browsing this thread: 1 Guest(s)
|
|||
(06-07-2015, 03:26 PM)nounoursheureux Wrote: greduan: have you heard of [Atom](https://atom.io) ? It is also Node.js editor, but it relies on [Electron](https://electron.atom.io) for the desktop stuff. You might be interested in how they solve their problems :P Yes. And I have looked at some of their code. My text editor is in the CLI, while theirs is pure GUI, so the UI stuff will not match up, sadly. Otherwise, IMO their code is way too complex. I looked at their `text-buffer` package, that's thousands of lines for a buffer implementation. Their FS code is sloppy from what I could tell, they just `fs.writeSync`, and store the whole file in memory, which is not good for >50MB files IIRC. This may have changed recently cause I remember them mentioning larger files are supported now. Right now I'm stuck with the FS stuff, in this case applyChangesToFile.js[1]. I'm coding up a way to apply changes to a file without having to store the whole file in memory to know what the changes are. So you just tell it "this is the file I want you to change, these are the changes" and so it reads the whole file and writes it while applying the changes. Using streams or something in order to make sure that crap doesn't overload. [1]: https://github.com/greduan/applyChangesToFile.js (06-07-2015, 08:40 PM)Webtm Wrote: How fast is development with node.js? A friend and I are trying to pick a language neither of us know at all for a project and node.js is one of the options. The hardest part for a new person to Node.js will be learning JS. JS is not a hard language, but it allows you to do incredibly dumb and stupid stuff (like re-define `true` and `false`, lol), and I'd say like 90% (perhaps less) of people that code in JS don't actually understand JS, so their code is not optimal. So yeah, it's a great language but you gotta know how to use it, in other words understand the language. In terms of speed, I mean it's as quick as other languages? I dunno what to tell you. |
|||