Skip to content

Instantly share code, notes, and snippets.

@vitkarpov
Created November 6, 2017 19:20
Show Gist options
  • Save vitkarpov/a699ba4133c4c44dabc722630db67feb to your computer and use it in GitHub Desktop.
Save vitkarpov/a699ba4133c4c44dabc722630db67feb to your computer and use it in GitHub Desktop.
How do I get into a programming languages development?

How do I get into a programming languages development?

I'm a web developer and have been doing JavaScript both on client and server for quite a while. At some point I started to understand that I want to focus on JavaScript as a language and a tool for developers rather than using it as a JavaScript developer.

I'm wondering which theory basis and practical skills should I get if I want, for instance, to end up at V8 JavaScript runtime team?

@RaoulMarz
Copy link

I have seen your question on Quora. These kind of questions on Quora I really dislike in general as you get thousands of variations of such questions, and there are almost zero context to them. In your case the link you provided helped, as else I would have skipped your question.

@RaoulMarz
Copy link

RaoulMarz commented Nov 6, 2017

Sorry for the break. Since I know far less JS than you do, my question is if you have worked on any open source JS tools, libraries or frameworks? If you want to work on JS as a language or tool what parts of do you think doesn't work, is broken or can be substantially improved. Personally I can tell you that JS irks me, many things about it just don't feel right.

Recently I was trying to find out why a particular extension in the Atom editor didn't work and I wanted to see if I could fix it. The extension is "tokamak-terminal' For some reason (perhaps a good one) it seems traditionally many extensions for Atom are done in Coffeescript. This terminal extension was like this, now I get errors and since I don't really know Coffeescript I can't say for certain say if the errors are due to some transpile bugs in Coffeescript to JS conversion. I will give some more details on my entire bad experience with this fragile JS ecosystem in the next comment.

@RaoulMarz
Copy link

RaoulMarz commented Nov 6, 2017

So some information about the Atom editor I compiled from source.
Atom 1.23.0-dev.

Now if I do a search on the initial error I received when I installed the "original" tokamak-terminal I really get no help.
Here is the error that I first viewed:

TypeError: target[Symbol.iterator] is not a function
at TooltipManager.add (/usr/share/atom/resources/app/src/tooltip-manager.js:117:35)
at TokamakTerminalView.module.exports.TokamakTerminalView.initialize (/home/raoul/.atom/packages/tokamak-terminal/lib/view.coffee:47:38)
at TokamakTerminalView.View [as constructor] (/home/raoul/.atom/packages/build/node_modules/space-pen/lib/space-pen.js:184:25)
at new TokamakTerminalView (/home/raoul/.atom/packages/tokamak-terminal/lib/view.coffee:15:7)
at StatusBar.module.exports.StatusBar.createTerminalView (/home/raoul/.atom/packages/tokamak-terminal/lib/status-bar.coffee:167:27)
at StatusBar.module.exports.StatusBar.newTerminalView (/home/raoul/.atom/packages/tokamak-terminal/lib/status-bar.coffee:258:24)

I came across a similar error when I did a Google search for another extension. See the link that follows.
[(https://github.com/atom/settings-view/issues/962)]

Part of the error that appears in that discussion.

TypeError: packages[Symbol.iterator] is not a function
at InstallPanel.addPackageViews (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:390:30)
at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:461:26
at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:68:26
at AtomIoClient.module.exports.AtomIoClient.fetchFromCache (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:160:22)
at AtomIoClient.module.exports.AtomIoClient.featuredPackages (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:65:25)

What strikes me in that 4 months nobody seems to have been able to fix of what seems to a garden-variety defect. The issue is still open. So where does the problem lie? Once again does the function exist in this case, or is it called with the wrong parameters or what exactly? How does one easily find out? The whole coffeescript just adds another layer of confusion in the case of the tokamak-terminal scenario. Unfortunately Atom doesn't see the view.js source when I convert/transpile view.coffee to view.js, very hard to comprehend why.

Ok so I do a search within all extensions of my personal atom folder to see which other source files uses atom.tooltips.
I find quite a few and seemingly none of them triggers the same kind of error as with tokamak-terminal.

I do come across an interesting piece of code in space-pen.js

$.fn.setTooltip = function() {
throw new Error("setTooltip is no longer available. Please use atom.tooltips.add instead.\nSee the docs at https://atom.io/docs/api/latest/TooltipManager#instance-add");
};

So the atom.tooltips.add function should exist, as I am using the latest development version of Atom!

In another extension tool-bar, in the file tool-bar-button-view.js, there is a piece of code that also uses atom.tooltips.add

if (options.tooltip) {
this.element.title = options.tooltip;
this.subscriptions.add(
atom.tooltips.add(this.element, {
title: options.tooltip,
placement: getTooltipPlacement
})
);
}

This seems to work fine. So what is happening here? Is the other errors related to atom.tooltips.add , false errors? Could be that atom.tooltips itself is not declared, in those source files where the error occurs as described at the start of this comment. So maybe the object doesn't exist because of something wonky going on when JS does the require imports.

This weird error messages and hard to trace issues with JS seems very common place. If you gain can the practical skills to improve JS error messages, improve on many JS quirks, e.g circular dependency detection you would be on a good start I believe.

https://stackoverflow.com/questions/37462055/detect-circular-dependencies-in-es6

tokmak_terminal_crazy

@vitkarpov
Copy link
Author

@RaoulMarz thanks for your response! Didn't notice it on time, sorry.

I agree about CoffeeScript, it doesn't help too much, I guess. In my opinion, ES evolves quite fast, so you don't need a sugar for it.

Since I know far less JS than you do, my question is if you have worked on any open source JS tools, libraries or frameworks?

Actually, I used to work on some open source JavaScript projects. Right now I'm into Node.js (use it every day, so I have to :), at least I keep track of what's happening there, unfortunately, don't write much code so far, but diving deeper.

My question was how can I start working on something like V8 (or any JavaScript VM and eventually other language based on virtual machines, like Dart, for instance). Obviously, I have to know C++, got it: already educating myself and practicing, but what's about theory, maybe formal education, books and so on.

Actually, I've found some info, for instance, https://github.com/ossu/computer-science — but anyway, I was wondering what other people think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment