Programming languages worth checking out
h3rald.com
h3rald.com
The tool we used to write the supervisor code and GUIs for machine operators was a language called Alltalk. It was inspired by Smalltalk and developed by an old graybeard at the company. Reading the description of Squeak/Smalltalk brought back some fun memories. A few interesting highlights:
- Alltalk ran in its own VM. You could create objects, change their state, and save the entire stack/image back to the original VM. Running the VM again would pick up execution right where it left off. This let someone do crazy things like email an Alltalk image to another engineer and say, "Here's the machine state halfway through an emergency shutdown. The actuators all came to rest in 10ms, but it's taking way too long to shut down the hydraulic pumps. Any ideas?" and the engineer could run the VM and debug away.
- The Alltalk VM had its own object inspector and terminal/interpreter. So you could walk up to an Alltalk instance connected to a live machine with motors spinning at 20krpm, for example, open up the inspector, and code away. Realize you need a low-pass filter on the motor speed feedback sensor? Create the object, tweak the parameters, and wire it into the signal chain live.
Cowboy coding at its absolute finest.
Problems that I've found worth studying:
- Parsing. This is hard if you don't know the standard techniques: mostly recursive descent parsing with precedence -- or a parser generator, but that won't teach you much unless you write the generator yourself. Moreover I've found that you quickly run into limitations with parser generators and they don't make parsing easier in the long run, that's probably why most real world parsers are hand written (e.g. gcc, llvm). You can probably hack something together that sorta works, but knowing the right techniques makes writing an efficient parser that you have high confidence in a breeze. I've seen many ad-hoc parsers that would have benefited greatly from proper parsing.
- Constraint solving. Examples are solving sudoku, the zebra puzzle, SAT solving, optimal register allocation and many others. The three most important techniques are backtracking, constraint propagation and conflict learning. Even professional programmers can't do this if they don't know these techniques (e.g. http://xprogramming.com/articles/oksudoku/).
- Interpretation/Compilation. In addition to being a hard problem, writing an interpreter and a compiler makes you understand how programming languages work. This is sometimes seen as a black art, but it is quite easy once you got the pattern.
- Numerical algorithms. The speed and the simplicity of numerical algorithms is astonishing. Newton's method is particularly amazing. In about 10 lines of code you can solve equations, do state of the art numerical optimization or solve differential equations. It can even handle problems that are usually considered to require specialized algorithms, like max flow and linear programming. It can also perform arithmetic operations, like division and square root.
- Machine learning. This gives you a different perspective on problem solving. Many people when presented with the task of spam filtering or determining the language a snippet of text is written in will respond with a hard coded scheme based on a lot of rules. A much better approach is to take a data set of known text and analyze the statistics of the data set and compare that with the snippet of task text. The same applies to many other problems.
What should be added to this list?
- Prolog w/ Constraint Handling Rules simplifies constraint solving
- Prolog simplifies parsing
- Lisp simplifies interpretation / compilation
That leaves numerical algorithms and machine learning, which I agree are useful to understand anyhow and different programming languages offer little leverage ;)I have to admit I am slightly interested in the psychology of that list. Would this list be immediately on the mind of someone who teaches computer science for a living, or would it be a list made by a self-taught programmer who happens to have studied all of these topics or is it just received wisdom that these are complex programming tasks?
I think if I knew something about each of these, at least enough to say something non-trivial I would explore them together in a blog or article. Somehow I find the list interesting because in some way it represents where computing is headed in the next few decades and it should therefore inform the design of languages of the future (yes I accept that it has informed the design of some of the languages of the past).
The best addition to the list that I can think of is natural language processing. Extracting information from text, especially. There's a ton of interesting pieces, and most of them are useful for one kind of large-scale internet application or another.
I don't think the author's list provides much variation. They're all important languages, to be sure, but I believe you can get better mileage for your time.
My ten recommedations, in recommended order, are:
- Racket (nee Scheme - why did they have to change the name!?)
- Haskell
- Java (reading the GoF)
- C, and the POSIX libraries and system calls
- Go
- Javascript or Lua
- Smalltalk or Squeak
- Erlang
- Forth
- Prologhttp://dave.fayr.am/posts/2011-08-19-lets-go-shopping.html
http://stackoverflow.com/questions/3958630/what-are-importan...
http://mvanier.livejournal.com/998.html
http://www.kimchy.org/coders-recession-guide/
http://matt.might.net/articles/best-programming-languages/
http://www.hackernewsers.com/skills/index.html
(scroll wayyy down to "Programming"
ref: http://tech.groups.yahoo.com/group/concatenative/message/487...
Io's purpose is to refocus attention on expressiveness by exploring higher level dynamic programming features with greater levels of runtime flexibility and simplified programming syntax and semantics.
Things are changing, but not that fast I must say. Go is definitely the biggest omission on that list, but again, it didn't exist back then!
I don't think you should assume people have used all of these, and they're all worth "checking out". Millions of people use these languages every day to create 99% of the software you're using right now. Maybe it's worth a shot if you don't know one of them to learn one and maybe even get a job with it. There's a lot more opportunity to learn Ruby and get a job in it than there is for Scala.
The draw of these other languages like Factor, Io, Erlang, Haskell, and the other is that they are different. Erlang focuses on concurrency in a way that is not seen in the common languages listed above. Haskell is strongly typed functional language with lazy evaluation (I think I have that right). I don't know where Factor and Io fit it. By learning these other languages, I would hope to learn different ways to solve problems or to think about things. I would argue it isn't about learning them for more opportunities, but for a broader perspective in general.
Moving from any of those languages to Haskell or Erlang is going to turn your brain inside-out for a while and when the learning process is done you'll likely approach every other language a bit differently. That is a good reason to learn those languages.
* Mozart/Oz - will (probably) change your thinking about concurrency.
* Clay - really pushes the idea of generic programming.
* Rust - typestate makes assertions part of the type system.
* Cilk - concurrency again.
BitC was looking quite interesting too, but I haven't heard anything about it for some time now; I hope the project hasn't died off.The only type of language I rarely seen mentioned are dependently typed languages like agda or epigram. maybe it is because they are not yet practical. They are an interesting directions things could take though. Fortress is another interesting one.
Another interesting language is Aldor. It's unique in that it has a weak form of dependent types and is a statically typed Computer Algebra/general programming language. Going through the types of the language is an education itself and a reasoning helper. While some take issue to the hierarchy it defines, it is the only one I know that has tried and is useful. The type provide some scaffolding for reinforcing the novice math person trying stuff out.
As a disclaimer I've never really learned haskell yet, I do go through tutorials and solve some problems with it and everything now and again but I haven't fully grokked the language yet.
stole the show at 2009 JVM Language Summit
"“The most obvious common ‘personality’ characteristics of hackers are high intelligence, consuming curiosity, and facility with intellectual abstractions. Also, most hackers are ‘neophiles’, stimulated by and appreciative of novelty (especially intellectual novelty). Most are also relatively individualistic and anti-conformist.” – Eric S. Raymond, The Jargon File"
Which reminds me of that immortal Reservoir Dogs line: "let's not start sucking each other's dicks quite yet"...
So I'm conflicted.
Thats the thing about the word "hacker", almost every single context where it is used, it's either used wrong, or as comes across as pompous bullshit. Including this website.
We nerds are mortals, knit from the stuff of earth, and born of woman, even as other mortals.