May 2015 Links, Part 2

Prolog

I’ve revived my interest in prolog, because no matter how hard I look, I can’t find anything more pleasant for programming work. There are warts, of course, and speed concerns at times, but it really is a unique island in a sea or samey computer languages.

  • Lazy lists (streams) In prolog – I thought I’d have to build these into a new dialect, but the suggestions in this post make it seem like standard implementations have lazy lists covered.

RPGs

On and off, I find myself reading about RPGs… here are the links I enjoyed in the second half of the month:

WordStar

One of the first big DOS-era word processors. It lost its #1 spot to WordPerfect, who then lost it to MS Word. It still has a few rabid fans left.

Conlangs

A paradoxical movement by people who want everyone to speak the same language, as long as it’s their own pet language. NIH Syndrome isn’t only for programmers!

Misc Programming Lanugages

  • The Story of Squeak, a practical Smalltalk written in itself. I always love articles from people who were there.
  • Why I’m Betting On Julia, a fast language that works, and supports “Cowboy Coding.”
  • A comment on LtU caught my eye… a wish list for languages to rise in popularity in the near future:

    Factor. I seriously doubt this will come to pass, but in any case I am impressed by how fast the implementation has evolved. Factor already has an interactive top-level, machine code generating optimizing compiler for three major processor families (x86, PowerPC, ARM), a web server, GUI package, IDE, etc. Look at how long it took Python to hit the same point…well, Python still doesn’t have a standard machine code compiler and still uses Tk for the GUI.

    Erlang 2. There is no such language yet, but I keep expecting it. Take the core of Erlang and fix all the sticking points and bits of ugliness: switch to indentation-based syntax instead of all the issues with commas and semicolons as separators; add destructive local variables; add local-to-processes updateable arrays and hashes; allow user-defined guards; make modules be first-class.

May 2015 Links, Part 1

Here are the links I enjoyed in April and the first half of May:

Java/Scala

I’ve been looking to stick to one language, as much as possible, so that I build up a large library of software over time. The last 10 years I’ve been jumping from cool language to cool language, starting from scratch every time. I see now that the language doesn’t matter as much as the code you build with it, and right now I’m leaning toward none other than Java. I’ll discuss my reasoning in another post, but I’ve been re-acquainting myself with the language this month.

  • Learn Java From the Ground Up – it’s cool to see someone discuss Java as if you’ve never heard of it before!
  • Awesome Scala – a collection of interesting Scala work on GitHub
  • Modern Java – a great three-part series on what’s good in the Java space these days
  • Lambdas, InvokeDynamic and the DLR – A good comparison of java8’s dynamic capabilities vs. the DLR
  • Oracle Nashorn – I’m struggling to imagine why I would care about Jython or Jruby if I have a fully-functional javascript engine built into the Java SDK. Fewer dependencies outweigh small language differences most of the time.

Pixel Art

Retro-style art made by placing individual pixels…

Interactive Fiction

You know… like Zork

Computing History

Random

Borwein Revisited

In a February post, I wrote a few implementations of Borwein’s Pi-approximation algorithm, just for fun.

Today, I re-wrote it in C, and I can’t help but note that it’s:

  • shorter than the other implementations
  • equally clear, if not more clear

Something to think about, next time you want to put C down for not being modern and clean.

double borw(int iterations) {
  double y = sqrt(2.0) - 1.0;
  double a = 6.0 - 4.0*sqrt(2.0);
  for(int k = 0; k < iterations; ++k)
  {
    double fy = pow(1 - pow(y,4),0.25);
    y = (1.0 - fy)/(1.0 + fy);
    a = a*pow(1.0+y,4.0) -
    pow(2.0,2.0*k+3.0)*y*(1.0+y+y*y);
  }
  return 1.0/a;
}