News for hackers. Stuff that matters.
Re:Emacs script pitfalls by michaelsbradley on Sunday November 23, 2014 @09:39PM (#8650808)
At the end of the write-up, the author suggests "put[ting] your hands on a decent functional language [such] as OCaml or Haskell."

Racket would be another fine alternative, for those who would like to do command-line scripting in a Lisp but prefer a more robust language (than Emacs Lisp) with excellent support for functional programming patterns:

http://docs.racket-lang.org/guide/scripts.html

Re:Emacs script pitfalls by pmoriarty on Sunday November 23, 2014 @11:06PM (#8651011)
I'd add Chicken Scheme[1], which allows you tune the amount of safety the compiler offers you (if that matters to you), along with many other nice features.

And, as long as we're talking Schemes, perhaps the most appropriate Scheme for Emacs users to try is Guile,[2] for its integration in to Emacs.[3]

That said, no Scheme (or Lisp) can be properly called a "functional language". They are multi-pradigm languages. You can write in a functional style in them, but you are not forced to do so. Same with OCaml, for that matter.

[1] - http://www.call-cc.org/

[2] - https://www.gnu.org/software/guile/

[3] - http://www.emacswiki.org/emacs/GuileEmacs

Re:Emacs script pitfalls by michaelsbradley on Sunday November 23, 2014 @11:34PM (#8651067)
Sure, Racket is not a functional language in the same sense as Haskell, Pure, Clean, etc.

However, some Lisps/Schemes go further than others to support and promote programming in a functional style. I'm unfamiliar with Chicken Scheme and haven't spent any time with Guile, so I can't comment on those languages.

Racket and Clojure, in my experience, both tend to heavily favor the functional style with respect to their core libraries and defaults regarding im/mutability.

Re:Emacs script pitfalls by tumba on Monday November 24, 2014 @01:44AM (#8651326)
With cl-launch [1], Common Lisp has become a useable alternative for scripting. Improvements to ASDF have also helped (see ASDF 3, or Why Lisp is Now an Acceptable Scripting Language [2]).

François-René Rideau gave a talk called "Using Common Lisp as a Scripting Language" at this year's ILC [3] that covered these subjects in detail, but I don't believe any videos have been posted.

[1] http://cliki.net/cl-launch

[2] http://tunes.org/files/asdf3/asdf3-2014.html

[3] http://ilc2014.iro.umontreal.ca/program.php

Re:Emacs script pitfalls by codygman on Sunday November 23, 2014 @11:06PM (#8651012)
I would like to second the recommendation of either Racket or Chicken Scheme (Gambit is good too) where you are writing command line scripts with a LISP. I'm sure Common Lisp has excellent options as well, but I can't speak to those as much (yet!).
Re:Emacs script pitfalls by bostan on Sunday November 23, 2014 @09:56PM (#8650844)
I have to add Clojure to the list.
Re:Emacs script pitfalls by michaelsbradley on Sunday November 23, 2014 @10:02PM (#8650863)
The startup-time/overhead of Clojure/JVM make it a not so great choice for command-line scripting.

In general, sure, it's a powerful tool.

[ Edited: in light of the reply below. ]

Re:Emacs script pitfalls by omaranto on Sunday November 23, 2014 @10:07PM (#8650879)
You mean Clojure's startup-time, the JVM starts up pretty fast!

http://nicholaskariniemi.github.io/2014/02/11/jvm-slow-start...

Re:Emacs script pitfalls by michaelsbradley on Sunday November 23, 2014 @10:10PM (#8650887)
Ah, good point, thanks for the link.