In the English media, this time of year is known as the silly season. All the politicians, news makers, and opinion shapers have gone on holiday, to their Italian villas, country houses, or tropical islands. The newspapers are staffed by a few lonely hacks trying to fill a paper with fabricated news stories, pointless lists, and celebrity-based trivia. We can do that too! Here’s some newLISP trivia, a little light holiday reading for these lazy hot summer days and nights.
Why, newLISP, of course. That’s the philosophy, according to its creator.
Do you know what a Byom is? These guys do. It’s a cool IM search thingy. They like newLISP too.
/usr/bin/newlisp is 218932 bytes. As someone said after downloading it: “Is that really a complete language, in 220K?”. It is, and it would fit nicely on my camera’s flash memory card.
Some lazy journalists do most of their research with Google. For example, they would write something like this:
The Visual Basic language is rapidly being superseded by Ruby, according to the latest research. Figures show the version of BASIC from the Seattle software giant is only half as popular as the trendy new object-oriented scripting language written by Yukihiro “Matz” Matsumoto.
Let’s see how popular various program languages are according to the number of hits Google finds:
5,960,000,000 c
343,000,000 perl
233,000,000 c++
173,000,000 ruby
99,500,000 pascal
98,100,000 "visual basic"
65,100,000 dylan
43,000,000 python
29,700,000 lisp
9,000,000 haskell
6,700,000 lua
5,140,000 erlang
4,330,000 ocaml
23,300 newlisp
Scientific proof! The numbers also show that we still have quite a lot of work to do to promote newLISP. newLISP, newLISP, newLISP. There, that’s three more occurrences for Google to find and add to the list. Also, we’ll get Madonna to call her next album “naked and newLISP” - that should do the trick.
Did You Know Dept. The author of newlisp once wrote a FORTH interpreter/compiler. Here’s the first line of my FORTH interpreter:
> (while true (eval-string (read-line 0)) (println "OK"))
OK? ;-)
Did You Know Dept. Did you know that you can easily run newLISP scripts from the MacOS X menu bar? All you need is Apple’s Script Menu, designed both for AppleScripts and other scripts. (If you can’t see it, run /Applications/AppleScript/AppleScript Utility.) The Script Menu shows both global scripts and the scripts that are designed for the application you’re running. Global scripts should be stored in /Users/you/Library/Scripts/. Scripts to be run in, say, Safari should be in /Users/you/Library/Scripts/Applications/Safari/.
Here’s a bit of script to get you started:
#!/usr/bin/newlisp
(define (get-safari-page-link)
(exec
(format [text]osascript -e 'tell application "Safari" to set urlLink to URL of front document
return urlLink'[ /text] )))
(define (get-safari-page-title)
(exec
(format [text]osascript -e 'tell application "Safari" to set urlTitle to name of front document
return urlTitle'[ /text] )))
(define (get-safari-page-source)
(exec
(format [text]osascript -e 'tell application "Safari" to set urlSource to source of front document
return urlSource'[ /text] )))
(println
(get-safari-page-link)
(get-safari-page-title)
(get-safari-page-source))
You don’t have to use a special suffix for the file. Output goes to the console. And don’t forget to make the file executable first…(like I do)!
Hey, who needs Common LISP, now we have newLISP!
‘newLISP’ is a farce.
I’m trying to get started with lisp and newlisp is just way more accessible than this huge thing called common lisp
If I could, I would euthanize newlisp for the good of programmers the world over.
It’s really fast and cool for programming, really enjoyable…
It’s appropriately named - sort of like Orwell’s newspeak…
It is a remarkable language. I don’t want to write code in anything else.
Rarely can one point to a language that’s even more fucked up than early Perl or PHP, but today you can…
It’s faster than bejeepers. I run it on my webhost as a scripting language. Simple, fast, elegant.
It seems worse than a disaster.
The designers seem to know how to spell intuition.
Seems to be really alien.
Yes. I love it. It is small quick-hack-friendly and easy.
(That’s not 10 - Ed.)
That’s all from me for a few weeks. Have a good holiday!