Atom Editor: written in JS
-
Examining the open source Atom editor. It's an interesting idea that the entire thing is written in JavaScript, but it doesn't feel like they picked the correct tool to write it in. Just seems like an exercise to see if it is possible. However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible. JS syntax is so stringy. Here's some code (from https://github.com/atom/atom/blob/master/src/path-watcher.js[^] ) with interesting comment:
// Giant-ass brittle hack to hook files (and eventually directories) created from the TreeView.
const treeViewPackage = await atom.packages.getLoadedPackage('tree-view')
if (!treeViewPackage) return
await treeViewPackage.activationPromise
const treeViewModule = treeViewPackage.mainModule
if (!treeViewModule) return
const treeView = treeViewModule.getTreeViewInstance() -
Examining the open source Atom editor. It's an interesting idea that the entire thing is written in JavaScript, but it doesn't feel like they picked the correct tool to write it in. Just seems like an exercise to see if it is possible. However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible. JS syntax is so stringy. Here's some code (from https://github.com/atom/atom/blob/master/src/path-watcher.js[^] ) with interesting comment:
// Giant-ass brittle hack to hook files (and eventually directories) created from the TreeView.
const treeViewPackage = await atom.packages.getLoadedPackage('tree-view')
if (!treeViewPackage) return
await treeViewPackage.activationPromise
const treeViewModule = treeViewPackage.mainModule
if (!treeViewModule) return
const treeView = treeViewModule.getTreeViewInstance()raddevus wrote:
However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible.
If you consider a webbrowser to be a platform, yes. Since webbrowsers do not boot, it is not cross-OS. Your OS would need to come with a browser that supports said JavaScript, making it as cross-platform as GWBASIC.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
Examining the open source Atom editor. It's an interesting idea that the entire thing is written in JavaScript, but it doesn't feel like they picked the correct tool to write it in. Just seems like an exercise to see if it is possible. However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible. JS syntax is so stringy. Here's some code (from https://github.com/atom/atom/blob/master/src/path-watcher.js[^] ) with interesting comment:
// Giant-ass brittle hack to hook files (and eventually directories) created from the TreeView.
const treeViewPackage = await atom.packages.getLoadedPackage('tree-view')
if (!treeViewPackage) return
await treeViewPackage.activationPromise
const treeViewModule = treeViewPackage.mainModule
if (!treeViewModule) return
const treeView = treeViewModule.getTreeViewInstance() -
Examining the open source Atom editor. It's an interesting idea that the entire thing is written in JavaScript, but it doesn't feel like they picked the correct tool to write it in. Just seems like an exercise to see if it is possible. However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible. JS syntax is so stringy. Here's some code (from https://github.com/atom/atom/blob/master/src/path-watcher.js[^] ) with interesting comment:
// Giant-ass brittle hack to hook files (and eventually directories) created from the TreeView.
const treeViewPackage = await atom.packages.getLoadedPackage('tree-view')
if (!treeViewPackage) return
await treeViewPackage.activationPromise
const treeViewModule = treeViewPackage.mainModule
if (!treeViewModule) return
const treeView = treeViewModule.getTreeViewInstance()Visual Studio Code uses the same underlying technology (electron).
-
Visual Studio Code uses the same underlying technology (electron).
-
-
raddevus wrote:
However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible.
If you consider a webbrowser to be a platform, yes. Since webbrowsers do not boot, it is not cross-OS. Your OS would need to come with a browser that supports said JavaScript, making it as cross-platform as GWBASIC.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
raddevus wrote:
However, it is pretty cool that the thing is cross-platform -- obviously JS makes that very possible.
If you consider a webbrowser to be a platform, yes. Since webbrowsers do not boot, it is not cross-OS. Your OS would need to come with a browser that supports said JavaScript, making it as cross-platform as GWBASIC.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
This editor is a standalone project that runs in Node.js (on V8 I believe) and doesn't require a browser. There are native installs for macOS, Windows and Linux.