jump to navigation

New Version of Haskell Released: Haskell 2010 December 6, 2009

Posted by ddouthitt in Functional, Haskell.
Tags: ,
add a comment

On November 24, Simon Marlow announced the release of the new version of the Haskell language, Haskell 2010. There are a few new features in the language, and the features will be propagating into compilers over time.

The new specification was coordinated by the Haskell Prime committee, which will continue its work in language development.

Hackers and Disaster Relief November 17, 2009

Posted by ddouthitt in Industry.
Tags: , , ,
add a comment

Disaster relief is an area of concern close to my heart; amateur radio operators have been part of disaster relief for years. When things like Hurricane Rita, Hurricane Andrew, 9/11, and more happen, it is the disaster relief workers such as folks from ARES, the American Red Cross (or the International Red Cross), Doctors Without Borders (or Medicins Sans Frontieres), and many others that help and provide needed services.

What can a programmer – a hacker – do in these cases? During the first ever Random Hacks of Kindness conference put on by Microsoft, Yahoo, Google, NASA, the World Bank, and the PR firm Second Muse, programmers from all over put their talents to providing software and other solutions to problems faced in disasters.

The event came about after the Crisis Camp held in Washington, D.C. in June 2009.

The only thing that I keep thinking about many technological solutions is that assumptions are often made that will not be true in practice:

  • The Internet is available. The Internet will likely be unavaiable, since many of the affected sites will be data centers, and perhaps even Internet central hubs like MAE West and MAE East and others. Any Internet bandwidth that is available will likely be saturated during the immediate disaster aftermath.
  • Cellular services will be available. The same problems that exist with the Internet will exist for cellular services as well. During 9/11 the cellular system was nonfunctional, if not because of the massive traffic hit, but also because the World Trade Center towers held major cell-phone tower installations for the area.
  • Electricity will be available. In many cases, it is electrical lines that will be down and the entire city – or more – can be without power. During Hurricane Rita, this was certainly the case.
  • Telephones will be available. Like the others, any available phone services will be overwhelmed, both from within and from without – even as the available space for phone calls is reduced.

It is for these reasons that amateur radio operators still provide a valuable service – after all, every year they practice operating with nothing more than they can carry. Wikipedia has a nice article on Field Day.

The technological problems that I remember hearing about from the aftermath of Hurricane Rita was that the Federal Emergency Management Agency (FEMA) was unable to handle the influx of requests, and the server – Windows-based – groaned under the weight.

There was also the “I’m alright!” aspect: letting people know that one was alright. Several web sites sprung up that let people know that loved ones were alright, and where they were.

During a disaster, it seems to me that most technology services will be either severely curtailed or impossible; amateur radio and other self-sustaining environments will be of the biggest help.

What would be helpful? Here are some ideas:

  • Mesh-based mobile phone networks. Mobile phone towers are likely to be unavailable and normal methods of communication overwhelmed. Mesh-based networks do not rely on a large and static infrastructure, but rather a “crowd” of tiny rebroadcast stations – such as other phone users.
  • Self-contained portable data centers. Data centers will inevitably be affected by many disasters; getting a business back up and running will take time. Disaster services will also be able to use the services of a portable data center to provide services.
  • Data restoration services. Businesses will find that their backups (if they have any) will need to be retrieved and restored quickly.
  • Low power devices. With electricity at a premium, low-power ready to go servers and workstations will be of great help.

Google’s Languages: Introducing Go November 15, 2009

Posted by ddouthitt in General Languages.
Tags: , , ,
add a comment

A few days ago, Google introduced the Go programming language (with a flurry of press attention). It’s not the first time – Google created the Noop language for the Java Virtual Machine, and Simple, a BASIC-derivative for Android – but it does seem to be creating quite a stir, more so than the others.

It appears that the Go language will be used in-house in time, though it is not currently so.

The language was created by several Google engineers, including some UNIX historical icons: Ken Thompson and Rob Pike (with Robert Griesemer). Thus, is it any wonder that the icon for Go is very similar to that for Plan 9, the unsuccessful follow-up act to UNIX?

The press attention has been amazing. Chris Dawson over at ZDNet wrote Is Google’s Go language worth teaching or learning? – I say yes to both. The magazine eWeek had an article about the launch,ComputerWorld’s IT Blogwatch had an article detailing a smattering of blog reactions, and InfoWeek also covered the language’s introduction as well.

Over at Ars Technica, they had an extensive writeup on the language (though they seem to have used an illustration from P.D. Eastman’s Go Dog Go! – isn’t it still under copyright?) The article talked with Rob Pike about the language and provided some examples.

Perhaps the most interesting article for programmers was an article by Google’s own Mark Chu-Carroll over at Good Math, Bad Math – which article he followed up the next day with another about concurrency in Go.

The only sour note so far is from Frank McCabe, who states that the name was taken by his Go! language since 2000. The issue came up in the language’s issues section and was noticed by InformationWeek; no word yet on what Google will do.

Project Euler: Programming (and Math!) Practice November 7, 2009

Posted by ddouthitt in Mathematics, Scala.
Tags: ,
add a comment

As one who loved mathematics (and still do – I considered becoming a mathematician) – Project Euler is a beautiful place to try and get practice on new programming languages as well as mathematical principles. Project Euler provides problems that require solutions, and which are designed for less than one minute solutions using the computer. The problems also highlight a mathematical principle in their solution.

I’ve only worked on a very few problems so far, but it appears that it is quite easy to write a brute force programming algorithm for some of these problems; personally, I am attempting to find the mathematical solution as well as solving the problem in Scala. There is a nice article about one person using Scala to solve Project Euler problems.

The biggest problem in using Project Euler for learning a programming language is that Project Euler isn’t set up for multiple language users: each user is able to specify (and track) solutions in only one language – but this is not a problem really.

If you want to solve more mathematical problems (not necessarily with a computer), the MathsChallenge web site is an excellent one, and is apparently the predecessor to the Project Euler site.

Why I Like COBOL October 30, 2009

Posted by ddouthitt in Cobol.
1 comment so far

COBOL over the years has been attacked as a dinosaur and as irrelevant to the modern age (where “modern” is 1980s and forward). The COBOL standard has, nonetheless, been updated several times over the years.

The most interesting thing about the COBOL standards over the years was the standardization of object-oriented COBOL in 2002.

There are many commercial providers of COBOL compilers and so on, including IBM, Fujitsu, and Microfocus. Microfocus also sponsors a COBOL Portal which is a one-stop resource for Cobol. Some of the Fujitsu compilers appear to be available from a company called Alchemy Solutions. There are also several significant open source compilers, including OpenCobol and TinyCOBOL. There is even a complete development environment called the Cobos Project from Metrixware. There is even a COBOL IDE for Eclipse.

ComputerWorld had a nice article in October of 2006 titled Cobol: Not Dead Yet. In December of 2006 TechWorld had an interview with MicroFocus titled The Future’s Bright – The Future’s Cobol. The first article describes how Cobol remains present, despite attempts to get rid of it; the second describes how Cobol is still relevant today and is still alive. More recently, the Guardian newspaper had an article about Cobol’s 50th anniversary titled Cobol Hits 50 and Keeps Counting. CIO Magazine had an article titled COBOL – Still Doing the Business, and Jeff Atwood over at Coding Horror had a nice discussion entitled (Cobol: Everywhere and Nowhere) relating to the article as well.

There is a company called LegacyJ that will actually help you to run Cobol code on the Java JVM. They have a whitepaper on the Future of Cobol.

For more resources, check out the COBOL bookmarks on del.icio.us.

To me, the biggest complaint about Cobol would be its wordiness – and that isn’t a very big complaint at that. I’d much rather be programming in Cobol than in RPG. I like Cobol – it’s not my favorite by a long shot, but it’s like an old friend that never goes away.

Concurrency October 29, 2009

Posted by ddouthitt in Erlang, Haskell, Scala.
Tags: ,
add a comment

One of the most interesting things about some of these languages (such as Scala) is their innate support of concurrency.

Concurrency is a huge benefit for making systems work together or for making programming systems that can scale (that is, grow and adapt to heavier usage).

Ted Leung at his blog wrote an article about concurrency called The Cambrian Period of Concurrency (and a follow-up). He also gave a talk at OSCON 2009 titled A Survey of Concurrency Constructs which was well received.

Tim Bray, also from Sun Microsystems, created a series of articles on the same topic entitled Concur.next. He talks about Haskell, Erlang, and Clojure. Erlang and Haskell are fascinating, but to me Clojure seems like it took Lisp and obfuscated it and made it harder to learn and use – and became slower besides.

After reading Tim’s article, one of the Glaskow Haskell Compiler (GHC) folks wrote an article comparing parallelism and concurrency. (By the way, not everyone thinks of Haskell when one talks of GHC…)

What intrigues me most about concurrent systems is the ability of multiple systems to work together – not as a cluster, nor in a failover configuration – but as a coherent set of multiple systems doing what each does best. A compute-farm with dynamically responding discrete and unique systems would be one example. Another example (which intrigues me to no end) is a network of servers that responds as a whole to a threat on any one of the servers individually.

Concurrent programming over the network, when used to its fullest, means that a server no longer needs to be the largest unit of response: it means that a network may respond, not just the server. It means that information can be shared among a group of servers rather than just one. Concurrency opens up a vast amount of fascinating ideas.

More Resources for Scala Programmers October 28, 2009

Posted by ddouthitt in Scala.
add a comment

There are a number of excellent resources for those that want to program in Scala – or learn to.

O’Reilly Media recently came out with a book Programming Scala by Wampler and Payne. The real interesting thing is that Programming Scala is also available for reading free online – and it is also available as an ebook.

There is a nice set of slides to introduce you to Scala. There are two quotes in the slides that I just love:

If I were to pick a language to use today other than Java, it would be Scala.
- James Gosling

I can honestly say that if someone had shown me the Programming in Scala book … back in 2003, I’d probably have never created Groovy.
- James Strachan

Scala: Beginnings October 24, 2009

Posted by ddouthitt in Functional, Object-orientation, Scala.
add a comment

Scala is an object-orientated language (similar to Smalltalk) that runs on the Java Virtual Machine. It can be compiled to Java byte-code, which means it will run at compiled speeds.

Scala is also a functional language as well, allowing the programmer to use the same programming methods as languages such as LISP.

In Scala, everything is an object – which is really the way it should be. A lot of “object-oriented” languages don’t subscribe to this requirement – such as Java. Smalltalk, Ruby, and Scala all do – and are sometimes called “pure” object-oriented languages.

The biggest obstacle in learning an object-oriented language is learning all of the classes and methods. Smalltalk makes this easy with a class browser, but languages such as Ruby (scripting) and Scala (compiled) don’t, as there is no way to learn the classes except studying references.

Going from the traditional imperative style to an object-oriented style of programming is not all that hard; it is a one-time “shift” in thinking. It is the classes and methods that require study.

Ruby has a good class reference (both in book form and as a web reference) – and Scala has one for the most recent version 2.7.7 (using the traditional scaladoc format) or one for 2.7.1 (in the new vscaladoc format). It can be also downloaded as a package.

Programmagic: Programming and More October 22, 2009

Posted by ddouthitt in Uncategorized.
add a comment

This is a blog about programming – in all languages. I have been programming in some fashion since 1976, in BASIC, C, FORTRAN, Pascal, C++, Korn Shell, Assembly (IBM 360 and 6502), FORTH, LISP, Perl, Ruby…

Topics include methods, concepts, new languages, trials and tribulations, and my learning as I go. Languages covered will vary widely but will likely initially focus on iTcl, Eiffel, LISP, and Scala.

Itcl is an object-oriented version of Tcl. Object-orientation will be a common theme – Eiffel and Scala are both also object-oriented.

However, functional languages are also of interest; LISP and Scala are both functional languages (Scala has both object-orientated and functional capabilities).

Any and all programming topics are of interest – and hope you’ll come along for the ride.

Hello world! October 22, 2009

Posted by ddouthitt in General Languages.
add a comment

This post was originally an automated first post – but the topic is appropriate for this new blog about programming. “Hello world” is traditionally one of the very first programs written in any language.

Wikipedia has an article on it, and Wikibooks has an extensive list of program examples; there is even a joke over at gnu.org about it.

“Hello World” is a simple program in most any language, and provides the initial introduction to syntax. It is usually very short and easy to type in and process. There also may be different ways to do it, given different methods.

Update: There are more sites that show various “Hello World” programming language examples. This article lists 300 languages! This German site lists a lot as well.

There used to be a page for Hello World programs set up by the student chapter of ACM at a Texas university – either Texas A&M or the University of Texas. The most notable programs on this site were the multi-lingual entries: programs that could be run or compiled by different languages without change – astounding!