Work mechanism


#1

Hello … I NEED HELP !
I need to know the work mechanism of Atom , i mean how does it works from inside “from compiler side for example” and if there are other sides can you explain them for me ?


#2

Atom is built on Electron, and that Node.JS


#3

thank you … but if you can give me more details about how does atom works


#4

What specific issue are you having difficulty with?


#5

i have a presentation about notepad++ vs Atom …and i want to talk about for example how the code in
atom text editor compiled what does the atom use to compile codes with different types of programming languages ?


#6

Atom doesn’t run / compile code. You must be using a third party package to do that.


#7

ok if it doesn’t compile codes "compile by install packages " what does it do then?
how can atom install packages and from where and other things ?
does my question is unclear ?


#8

Atom allows you to type text into it and save that text as files on your computer. Atom will highlight anything it has a language package for, keeps track of live changes to files and updates open files as needed, displays the current project and the git status of files, and has an API that essentially allows packages to do anything.

how can atom install packages

Atom comes with a program called Atom Package Manager (APM) which downloads and installs packages for you. Packages are structured as NPM packages and APM is very similar to NPM in terms of features.

does my question is unclear ?

Yes, very. You keep using phrases like “other things” that don’t provide us with any information about what exactly you are seeking to understand. Let’s start from the beginning: what is the purpose of your presentation? Is it a subject matter you chose? Is it for school? Work? If it’s for school, then I do not think it is a good subject matter to give a presentation on. The meaningful differences between Notepad++ and Atom are quite boring for most people. If you are doing it for a class where the presentations are supposed to be boring to most people, then you should talk about Atom’s API and you should pick out a small number of specific packages to describe in detail as examples of the kind of flexibility and power that Atom gives to its users.


#9

THANK YOU for explaining >> I don’t use it that’s why i keep use word things , i don’t know what does it contain … i’m a programming computer student and i decide to talk about this subject “for school " because we used notepad++ before as a code editor , and now i want to give more information " DETAILS”…
YES ! i want from you to describe atom’ API and if you can chose one of most important package to tell
me about more with details " the same way how you described "how atom install packages " . that’s what i want !
what’s the structure of atom ?


#10

Okay. Here’s the interesting part about Atom: it’s basically a web site. Everything you see is described in HTML, CSS, and JavaScript. This makes it much more flexible than other editors. In theory, Notepad++ can do anything Atom can do, faster and better, just because it uses native code instead of JS. It’s open source, so anyone can go edit the code and build their own version. The reality of making plugins for older open source projects is that it’s always been limited to a specific group of C/C++/Java developers. The good programs allow for Lua or Python scripts to control their behavior, and that works well for making the program do things that it already knows how to do.

Where Atom is different is the fact that it’s built on JavaScript and plugins (called “packages” in the Atom community) are built in JavaScript. This was made possible by taking some of the source code for Chromium (the open source branch of Chrome) and connecting it to Node.js to allow it to run code on the user’s computer. Everything you see in Atom is JavaScript, interpreted in real time by the Chromium rendering engine.

Since everything is JavaScript and HTML, a package can do just about anything you can think of, and it’s pretty easy to turn your thoughts into code. People have made a variety of different user interface additions (I use process-palette and project-viewer constantly) and even separate distributions designed for specific purposes (Nuclide, Juno, and PlatformIO). When you install it, Atom will let you edit files, it will highlight a few languages, and it can do normal editor things, but not much else. Once you dive into the package ecosystem and figure out what you want your editor to be, then it can run code for you or tell you your battery status or anything else you want to know or automate. And Atom has (mostly) great documentation about how to make it do things.

The down side of this is that Atom requires work. Atom will not hold your hand and doesn’t do as much as other programs until you start working with it. To really take control, you need at least a little JavaScript or CoffeeScript experience. For a certain kind of personality, Atom is a great way to get that experience, and it’s not nearly as hard as coding in C++. But for people who want flexibility and power, Atom will reward them for the time they spend on it. I like being able to change pretty much anything I want about the program.


#11

Thank you very much … now i decide what parts of atom i want to talk about it …i couldn’t find what i want on internet with details and i have many questions can you help me answering them … and i’m sorry if i bothered you


#12

I can answer most of your questions.


#13

thank you …
Q1- if you can tell me 5 disadvantages and advantages of using atom from the point of view of the programmers ?
Q2- I want to explain one of packages called " gpp - compiler " package which run c/c++ code … if you have more information about it … "if you know other package with details i can talk about it "
Q3- did you heard about Gingw software ? i had to download it when i installed gpp-compiler package? why?


#14

TL;DR Basically, the package doesn’t do any compilation itself. It just adds a command to Atom that calls the compiler installed on your computer when you trigger it.

This is almost always true for everything, even other editors. @idleberg posted a link about the UNIX philosophy in a similar thread asking about beautifying LaTeX. The asker wondered whether they needed atom-beautify, given that the actual program that did the leg work was completely separate and could be run manually.

The answer is that using the atom-beautify package is more convenient. It doesn’t add ground breaking functionality, but it unifies beautification of any and all supported languages under one easy to use, in-editor interface.

In fact, it’s exactly the same with the gpp-compiler package. Behind the scenes, it’s just using the command line executable. The reason it’s good is because you don’t have to fiddle around with these commands yourself. You can also set up more complicated behaviours, which can be useful.

Everything I said here also applies to Notepad++. Like Atom, Notepad++ does not know how to compile code. It just knows how to call the executable you have installed that does.

MinGW is needed for the compilation. From it’s homepage:

MinGW includes:

  • A port of the GNU Compiler Collection (GCC), including C, C++, ADA and Fortran compilers;

#15

Disadvantages

  1. Atom comes without most of the features that people associate with IDEs. It can’t run code by itself, and you have to search through the package registry to find what you need.
  2. Because Atom includes a substantial part of Chrome plus all of Node, it’s a fairly large program for what it is. Since JavaScript doesn’t get compiled into machine code, it’s larger and slower than software written in native languages like C++ that do compile. It takes a long time to open an Atom window compared to some other code editors (Notepad++ being one of them). I personally have both N++ and Atom installed, and when I need to quickly edit a single file, I open it in N++.
  3. Because packages can do anything they want, downloading a package that contains malicious code could potentially compromise your work.
  4. Because packages are mostly community-driven, they can and do get abandoned. It’s possible that the person who made your favorite package will disappear or stop being able to support it.
  5. If you want to use Atom at a certain level of effectiveness, you probably have to learn JavaScript.

Advantages

  1. If you know JavaScript or CoffeeScript, it’s a small step from simply using Atom to making it do whatever you want. I have solved many problems for people that didn’t include more than a few lines of code dropped into init.coffee. For example, the following code is all you need to tell Atom how to force a log file to keep scrolling down as new content is added:
atom.workspace.observeTextEditors (editor) ->
  editor.onDidChange ->
    if not editor.isModified() and editor.getTitle() is "log.txt" then editor.moveToBottom()
  1. Atom’s flexibility makes it easier for more people to make packages. While this can have negative effects when it comes to the quality of some packages, it also means that the barrier to entry is lower for people with good ideas.
  2. Since Atom includes Node, package authors can make use of the wide array of libraries available as modules through NPM. Frequently, creating a new feature for Atom just consists of taking an existing module and connecting its functions to Atom commands and UI elements.
  3. All packages are open-source with code available on GitHub, so it’s possible (and relatively easy) to read and edit all code that you put into Atom. If you have particularly strict requirements, you are completely free to clone and edit every package you use, even the core packages.
  4. Atom does not hold your hand very much and it has some substantial barriers to using it to its fullest potential that can be overcome by learning new things. However, for the programmer who wants to have the option to learn the ins and outs of the editor and make it their own, Atom offers a lot of options. Now that I know how it works, it is fairly easy for me to make significant changes. For most other pieces of software, I would not have that power. I know this sounds like #1, but it’s not just about the API. I could turn Atom into a 3D modeling program if I really wanted to and spent the time to learn how to do it. In theory, anything meant to work on a web site will work in Atom. Video player? Sure. Video game? Why not? The only limits are your imagination and your computer’s resources.

Because Windows doesn’t include the compiler tool g++. On Mac, you’d download Xcode, and virtually every version of Linux includes it by default.


#16

Thank you very much … you said in one of your sentences , that when you want to edit a file quickly you use N++.
do you have answers of my questions but this time about notepad++


#17

You said that you had previously used Notepad++, so I imagine that your institution has people who have experience with it and can help you. I honestly haven’t done much with it, because it was my attempt to make it do extra things was what led me to Atom.


#18

Yes…but I don’t know anyone who is expert in this software … but thank you very much for answering my questions … do you know how many programming languages can i use in Atom ?


#19

You can find additional language packages by going to the Packages page of this web site or Settings -> Install inside Atom. Just search for any language you want. If nobody has made one, then it’s actually not too difficult to make a new one.


#20

I see … okay what’s your personal opinion " why do you think atom is better than notepad++ "