What is a parser generator?

Finds the hierarchical structure of the program .Converts a grammar description for an LALR(1) context-free grammar into a C program to parse that grammar[1]
Quoting the maker Stephen C. Johnson AT&T (company)[2]

Computer program input generally has some structure; in fact, every computer program that does input can be thought of as defining an “input language'' which it accepts.

 A parser generator [bison or YACC]  is a general tool for describing the input to a computer program.

How it works

User specifies the structures of his input, together with code to be invoked as each such structure is recognized.

It turns such a specification into a subroutine that handles the input process; frequently, it is convenient and appropriate to have most of the flow of control in the user's application handled by this subroutine.

The input subroutine produced by Yacc calls a user-supplied routine to return the next basic input item.

Thus, the user can specify his input in terms of individual input characters, or in terms of higher level constructs such as names and numbers. The user-supplied routine may also handle idiomatic features such as comment and continuation conventions, which typically defy easy grammatical specification

  1. http://dinosaur.compilertools.net/
  2. http://dinosaur.compilertools.ne…

How does LLVM work?

It's structured like most compilers: there's a language-dependent front-end that translates the language into an intermediate representation (in this case, LLVM IR). The IR is run through an architecture-dependent backend that translates the IR into machine code. This decoupling of the source language from the target architecture means you can add language support to LLVM by only writing a new front-end, and you can add support for a new instruction set by only dealing with the back-end.

What sets LLVM apart is the strict adherence to this architecture. The IR is completely specified, and there are no weird dependencies like the back-end iterating over the front-end's data structures during code generation. The upshot of this is that the various components are easily split off into separate libraries, e.g. the front-end can be split off as a library for use by a compiler to power code completion.

You're best off reading an overview from Chris Lattner himself:


Which projects use LLVM?

Turns out LLVM keeps this list at http://llvm.org/ProjectsWithLLVM.

Some of the better-known entries on the list:
Rubinus: http://github.com/evanphx/rubinius
Unladen Swallow: http://code.google.com/p/unladen…
Clang: http://clang.llvm.org
DragonEgg: http://dragonegg.llvm.org ("a GCC plugin which replaces the bulk of GCC's optimization and code-generation system with the LLVM implementation", according to http://lwn.net/Articles/383201).

What's the best way for a beginner to start learning Ruby on Rails?

Computer programming is something that you learn by doing.  To learn a programming language you need to use it.  In this case we're talking about ruby, but it applies to all programing languages.

After going through a few of the tutorials mentioned elsewhere on this page you will probably feel like you're comfortable following tutorials, but that you don't feel like "you know ruby". 

And you never will feel like you've truly learned the language until you start venturing out and using it without the hand-holding that most tutorials provide.

Here is what you need to do to actually learn ruby.

So shortly after completing a few tutorials, the approach you should take is the same approach that Japanese martial arts masters use to master their craft: kata.

If you're looking to become a Rex-Kwon-Do master, you'll practice reacting in response to a specific move an opponent makes with a certain choreographed patterns of movements until it becomes muscle memory.  You'll want to do the same with coding challenges.

So from various tutorials you'll learn what different commands you can write.  When you face your first problems it's common to feel overwhelmed.  There is SO MUCH stuff in that this ruby programming language has to offer.  Should you use an each command or a return one?

The nice thing about programming is that it is possible to solve all computing problems with a remarkably small number of commands – by mastering a relatively few commands you can glue them together to solve all your problems.  Once you master the most important commands of the programming language – you can work on some of the other "cosmetic" commands, which might allow you to solve a problem with 1 line of code instead of 3.

The master has encountered every single variation of every problem countless times and immediately has the muscle memory of how to solve the problem.  It's a reaction without even needing to think.

A beginner doesn't have these coding instincts.  To develop them, but you can develop them using kata.

Kata in programming are coding challenges that will push you towards using a small number of specific pieces of the programming language at your disposal to give you this muscle memory.

Here's an example of a programming kata.

Reverse a sentence, for example the turn the text "bob likes dogs" into the text "dogs likes bob"

This is a relatively simple problem, but it will require that you know how to do the following steps:

  • Covert text into a list of words
  • Reverse a list of words
  • Recombine the words together into a sentence

And the first kata you get will kick your ass! It may take you an hour or more and you might not be able to solve the problem.  You'll struggle and the process will feel frustrated.

And eventually you might give up and ask for help.  But then when you look at the code that solves the problem, you'll understand how and why it's working.  By fully understanding the solution to each kata before moving on to the next you'll start developing this mastery of the craft.

You'll appreciate what each piece of the program is doing and be better prepare for next time, when you'll have a different, but similar problem.

And then when you tackle your next programming kata, for example:

Remove the word "likes" from a sentence, for example turn the text "bob likes dogs" into "bob dogs".

This is a problem that has similar steps as the previous problem:

  • Convert text into a list of words
  • Remove one word from the list
  • Recombine the words together into a sentence

This second kata shares a lot of commonalities with the first one (it's 2/3's the same as the previous problem!).  So by fully understanding how the previous program works, you'll be able to do something similar for this problem.  You can re-use a lot of the same steps.

The key is to continue working through harder and harder challenges.  After you solve a number of different programming challenges without instructions of exactly what to type you'll realize that problems that used to challenge you are now really easy for you to solve.

And when you finally start solving the problems it will feel so satisfying and fulfilling to conquer such a hard challenge.

If you're looking to land a job as a web developer, you'll notice that on the technical interview process you'll be given kata to test your ability as a programmer.

The kata you'll be given as part of an interview test will probably be a lot harder than the ones that you're starting out with, but you need to work your way up to this level of question slowly.

Tools like tryruby and RubyMonk can give you a 360° view of the ruby programming language.  Learn Ruby The Hard Way is a good overview and I'd suggest completing the study-drills they have as well (the study-drills are kata at a timely fashion!).

From there, to take your ruby-fu to the next level, solve problems from sites like CodeWars and excercism.io.  Codewars in particular is super cool because you can review solutions other people have written.  Some people will use cool tricks on their solutions and you can learn from them.

Finally CodeAbbey has some really complicated challenges, which will help you really master the language.
Before you know it, you'll know exactly when it's the right time to: Sweep the Leg, Johnny.

[As a side-note this is a slightly different answer than How do I learn Web Development? which is a related question, since ruby is often used in Web Development]

I also can suggest going through the Intro course I've setup for my online coding bootcamp, Firehose.  It's free and takes most people around 2 weeks to complete it. It's is a combination of instruction and coding challenges and whether you're looking to sign up for a coding bootcamp or not I think most people learn a lot from it.

Firehose Intro to Web Development Course – 2 Weeks Free

If you liked my answer, it would mean a lot to me if you upvoted it, by pressing the light blue button below.

Where can I find a fast and memory efficient skip list implementation in C or C++?

I just happened to implement one and released it on GitHub.

Here is my blog post about it: http://kofif.tumblr.com/post/901…

Feel free to use it, fork it and contribute to it and really do anything you want with it.

I am still working on improving it, adding iteration, etc., but it is definitely ready for use.

Is there a correlation between programming language appeal and educational/programming background?

I wonder if there's the exotic other effect here. I am an industry programmer and I like languages which have wide industrial use (OCaml, Scala, Lisps, C) but (at least for three of them) are still considered academic.

 On the other hand, I know lots of academics who almost exclusively use C, Perl and a numerics language (such as Matlab or Fortran): often times they're the appropriate tools for academic work and features like OO, generic programming and functional programming are considered (by them) to be distractions from their task. I remember taking a scientific programming class as an undergrad which briefly exposed students to Fortran90 (which is a lot closer to Modula-{2,3} or Pascal than it is to Fortran). I remember asking "how to do something like a void pointer or a templated class" and the answer being "why would you need to do this in the context of numeric computation?".

From my experience, most computer science students at universities (the type who got excellent marks in mathematics and did well on the AP Computer Science exam in high school, but didn't necessarily spend their nights hacking Linux since the age of twelve) tend to *hate* Haskell (language my university used for the 6.001/CS68a equivalent course), ML, Scheme and other languages that they're *forced* to learn and would rather program in Python, Java/C# or PHP. Programmers who are self-taught or who (like me) supplemented their formal CS education with extra-curicullar hacking, learning and industry work tend to be more interested in non-mainstream languages as they don't associate them with "that weird recursion class I had to take as a freshman". I suspect, the dynamic is not that different from industrial programmers hating Java/C#/C++ and yearning for Haskell and Lisp.

What programming language should someone learn if they've never programmed before but wanted to pursue an alternative job market?

My quip of an answer is PHP. (Browser differences with Javascript will drive you insane – don't start there. It's also object-oriented which is a whole other ball of wax I don't recommend at all, let alone for beginners. PHP is procedural and server-side, which means you can focus on programming instead of minutae.)

My real answer goes like this:

1. Programming is one of the most heavily outsourced functions around – why anyone would pursue it as a career strategy is beyond me. I am a PHP programmer (among many, many other things) and I hire other PHP programmers and I think the programming work that pays money in the US basically breaks down like this:

  • Corporate work – 90% is off-shored for cost savings. There will be some pendulum swinging against this as errors rise and quality falls and overall costs go up because it takes longer to get to quality product. However, by the time everyone really understands the financial implications of off-shoring and is willing to pay more up-front, the customization of core products will be at a point where either a) a non-programmer can get what is needed done or b) you need a very high level LAMP administrator-type (see the work being done in CMSes). Most of the jobs in this segment are for managers who talk to India in the early morning and again at night.
  • Google-type work – Unless you want to go back to college for a CS degree from a top 10 CS program and be in the 10% of your class or you're really out-of-this-world smart and want to read about programming for years to get up to speed, you're not going to qualify for these jobs.
  • Startup work – I think of this type as 24/7 live-on-caffeine work done by (young) people who taught themselves and don't necessarily have a structured or CS background. They either know too much or too little for their own good and personality (and/or geek cred) rules here.
  • General website work/freelance one-offs – This work is really more about design – especially now that WordPress and other CMSes exist. The graphics people are taking over this segment because they can offer greater customer satisfaction and charge less.
  • The segment I hire (which I think is occupied by me alone) – it boils down to people (aka men, as getting a female programmer resume just simply does not happen) with 10+ years professional experience (most of which is in a structured programming role, not freelance consulting) writing actual code because I am willing to pay for the experience level in exchange for the lack of bullshitting/babysitting.

2. What alternative job market are you trying to get into? If you want to get into a sector dominated by cross-platform work obviously you would want to choose Java. Find the job posting for the job you want and work to make your skills match it to make sure you don't go learn C++ when they need Python.

3. Programming languages tend not to work in isolation. You're at least going to need to communicate with a database in order to do anything of note so you're at least signing up to learn 2 languages. In the case of PHP I recommend pairing it with MySQL. There is also T-SQL/MS SQL and ORACLE, PostgreSQL, and many more which pair up in different combinations with programming languages.

That being said – putting alphabet soup on your resume in a big long list is just a sign that you don't know enough about any one thing to accomplish anything, so don't go overboard.

4. Start with Excel. Most people dismiss it as a Word table that can sum numbers together, but it's actually able to program some pretty complex stuff. Unfortunately, no one has written "How to Program with Excel" (that I know of). When you think of VLOOKUPs and PivotTables and "trace dependents" as the best things around you're ready to jump into PHP/MySQL.

Is JavaScript the most popular programming language in the world?

At this moment the web is certainly the popular and most widely used platform for application development.The rendering engine used in browser is leveraged to build cross platform applications like hybrid apps and progressive web apps. As you perhaps know JavaScript was born for the browser. If it is said that "C/C++ is closer to the machine" then it can be said that "JavaScript is closer to the browser".

Right now if you are building anything for the web or more precisely anything that is rendered with the browser's engine, you pretty much need to have JavaScript in your technology stack. (Try to recall the last time you had to use a website/ web application that does not use JavaScript !! )

Having said all these, let's take a look at Stack Overflow Developer Survey 2016 Results

(I hope you will take time to check out the whole survey)

Some key results that tops this survey :

  • Developer Occupations : Full Stack Web Developer
  • Most Popular Technologies per Dev Type
    • Full-Stack : JavaScript
    • Front-End: JavaScript
    • Back-End: JavaScript (Not my personal opinion, it's the survey results)
    • Mobile: JavaScript (6th)
    • Math & Data: JavaScript (5th)
    • Students: JavaScript (2nd)
  • Most Popular Technologies
    • 2016 : JavaScript
    • 2015 : JavaScript
    • 2014 : JavaScript
    • 2013 : JavaScript

(Source: Stack Overflow Developer Survey 2016 Results)

phew , that's a long list !!

Now, let's check out JavaScript in the open-source world.

It will be pretty obvious once you take a look at this question here : What are the most popular GitHub repositories of all time?

Or, the most starred repo at GitHub : Build software better, together

Or, the repositories with most forks on GitHub: Build software better, together

Before I finish, let me just remind you (as well as myself) that Stack Overflow and GitHub are just two metrics focused here to describe the popularity of JavaScript. And it is certainly expected that these metrics are not perfect and if we had used other metrics we might come up with different conclusions.

Where can I learn more about domain specific programming languages and language oriented programming?

In terms of macro-based DSLs:

Check out Doug Hoyte's Let Over Lambda:
http://www.amazon.com/Let-Over-L… . I found it to be very readable.

Graham's On Lisp is available online and is spoken very highly off.