Finally, the following for_each call outputs the sorted content of vp separated by line breaks:for_each(vp.begin(), vp.end(), cout << *_1 << "\n");
But wait, it gets much better.
Note that a normal (non-lambda) expression as subexpression of a lambda expression is evaluated immediately. This may cause surprises. For instance, if the previous example is rewritten asfor_each(vp.begin(), vp.end(), cout << "\n" << *_1);
the subexpression cout << "\n" is evaluated immediately and the effect is to output a single line break, followed by the elements of vp.
I'd love to see the compiler messages you get when you make a typo.
(An old post from Lambda the Ultimate has more information.)
Students at UCLA studing the idea of socially adept machines used Evolution's ER1 robots in a series of skits. “The skits incorporated ER1 robots with human actors, and the skits addressed issues plausibly relevant in the future, such as robot-human love, or the political influence of sentient machines.”
Gary King has a very nice new Lisp weblog: unCLog: “opening it up with Common Lisp.”
It's been a while since Peter Seibel put up a new chapter of his book, Practical Common Lisp, but here it is: “Object Reorientation: An Introduction to Object Orientation in Common Lisp”
Last weekend, after In Flames “rocked my [ass]” and we carefully fondled aerogel at the JPL open house, Lori and I went to San Diego, where she was speaking at the HOW Design Conference.
I forgot that San Diego has a big naval station, so when I opened the curtains in our hotel room it was kind of a shock to see three giant aircraft carriers laid out in front of me. It's a little weird to be confronted with these potent symbols, “90,000 tons of diplomacy”, war machines capable of devastating cities, so suddenly and only a couple miles away.
Lori said “You just made a noise that I've never heard you make before.”
Her talk was excellent, an unexpected curveball among the presentations on dealing with difficult clients and advancing your career.
We didn't have a chance to see much of the conference, though Colin Berry's talk on graphic design in a campaign year was inspiring. Later I bought David Rees, Mr. Get Your War On, a drink or two. (Are there any bars other than hotel bars, that use marble and leather as primary design elements? Hm, watch for my new book, Design For Alcoholophiles, coming soon.)
The Wired review of Paul Graham's new book:
Hackers and Painters is not a masterpiece, but it's far from bland match-your-couch art, either. It's a very personal, often illuminating, rather jumbled and only occasionally tedious look at one man's ideas about how to create good things.
They didn't like the part of the book that explains why geeks aren't popular in high school either.
That t-shirt cracks me up [via mo].
The Institute For Figuring in Culver City is hosting a talk next Thursday [via Lori]:
Daina Taimina and David Henderson are mathematicians at Cornell University. They are co-authors of Experiencing Geometry, a classic text on euclidean and non-euclidean space. In 1997 Daina worked out how “hyperbolic” space could be modeled by crochet. Since then, she and David have used her woolen models to further explore this peculiar topology. Here, David and Daina will talk about crocheting the hyperbolic plane, the geometry of lettuce, and the architecture of the universe.
For you Los Angeles knitters with an interest in the architecture of the universe.
bknr, maintained by Hans Huebner and Manuel Odendahl, is
The name bknr comes from Baikonur, the world's oldest and largest space launch facility, located in Kazakhstan. As the maintainers put it, “bknr is a software launch platform for LISP satellites.” [via Gavin and lispmeister.]
This informal paper introduces the Lisp machine, describes the goals and current status of the project, and explicates some of the key ideas. It covers the Lisp machine implementation, Lisp as a system language, input/output, representation of data, representation of programs, control structures, storage organization, garbage collection, the editor, and the current status of the work
The memory is typically 64K of core or semiconductor memory, and is expandable to about 1 million words. The full virtual address space is stored an a 16 million word disk and paged into core (or semiconductor) memory as required. A given virtual address is always located at the same place an the disk. The access time of the core memory is about 1 microsecond, and of the disk about 25 milliseconds. Additionally, there is an internal 1K buffer used for holding the top of the stack (the PDL buffer) with a 200ns access time (see [CONS] for more detail)."
The complete LISP machine, including processor, memory, disk, terminal, and connection to the shared file system, is packaged in a single 19" logic cabinet, except for the disk which is freestanding. The complete machine would be likely to cost about $80,000 if commercially produced. Since this is a complete, fully-capable system (for one user at a time) it can substantially lower the cost of entry by new organizations into serious Artificial Intelligence work.
1 megaword of RAM in 1977, no wonder it cost $80,000.
Last Thursday the technical papers from all Grand Challenge entries to make it through the final qualifying round were posted to the DARPA web site. I haven't looked at all of them, but they will probably interest those looking for at least a high-level overview of how any particular entry was designed and implemented.
The June issue of Wired has, on page 54, a short comic (illustration? infographic?) by Patrick Farley. The couple in the first panel of that comic may look familiar; this is not a coincidence.
Someone (I've forgetten who, sorry) mentioned that Michael Stover had a new article up at lisp-p.org on parsing dates with Lisp, and when I went over to check it out I saw that Michael's been very busy; He's posted 22 new Lisp-related articles since the last time I checked, which was last June. Incredible.
Michael has also posted a brief article called ”What Happened to lisp-p.org?”, which while not exactly explaining the new lisp-p.org, does at least recognize that it is not now what it was initially aiming for (and states that it's going to stay the way it is).
Some of the articles are incomplete (or just short—the article on installing clisp ends when he is unable to install clisp on Red Hat Enterprise Workstation version 3, even with the help of the clisp maintainer), but here are a few that looked potentially interesting:
Speaking of slurping files, here's my version of a function to return the entire contents of a file as a string (for the record, as it were):
(defun contents-of-file (pathname) "Returns a string with the entire contents of the specified file." (with-output-to-string (contents) (with-open-file (in pathname :direction :input) (let* ((buffer-size 4096) (buffer (make-string buffer-size))) (labels ((read-chunks () (let ((size (read-sequence buffer in))) (if (< size buffer-size) (princ (subseq buffer 0 size) contents) (progn (princ buffer contents) (read-chunks)))))) (read-chunks))))))
Curiously, this turns out to be slightly slower in OpenMCL than Stover's version, which uses read-char and vector-push-extend. You'd think read-sequence and with-output-to-string would win, but apparently not.
Paul Graham: “As of May 12, there are actual physical copies of Hackers & Painters in the pipeline between the printer and bookstores. I'm told that online outlets tend to have books a bit before physical bookstores do, so if you want a copy soon, Amazon or BN.Com may be the best place to get it.” [via gavin.]
Last night: After a big slab of prime rib at Musso & Frank (Ron Perlman looked over at me from his table and seemed either impressed or disgusted at my eating technique) (OK, maybe he was actually looking at Lori), I saw the 70mm print of “Tron” being shown at the El Capitan Theatre. Good hootin' fun. I've been to one or two Star Trek “experiences” in my time, so I know that props look pretty disappointing close-up, but man, the Tron stuff on display in the lobby was... well, only about 10% cheesier than it looks in the movie.
Tomorrow night: First I'm going to the opening of the new CLUI show, “Emergency State: First Responder and Law Enforcement Training Architecture”, “A new exhibit depicting emergency and police training facilities in southern California”.
Then it's time for beer and metal as I see In Flames and Killswitch Engage at the Wiltern.
I'm working on this project now: “Sniffing out Shoplifting”. (Note that Mario neither “envented” nor invented the Aibo.)
Glenn Ehrlich has a new Lisp weblog, Cooking With Lisp. “Question: Why does the Internet need another blog about Lisp? Answer: Because there's not enough of them!”
It used to be that lemonodor was about it, as far as lisp weblogs went. Now I can barely keep up with Planet Lisp. Whether this says more about Lisp or weblogs, I don't know.
Dan Barlow announced the release of CLiki 0.4.3, which adds versioning of pages, begins to separate the generic cliki engine from cliki.net -specific stuff and fixes RSS generation among other things.
OpenMCL is my preferred Lisp for hacking these days, though that doesn't mean I use it much. Must work on that.
P.S. I applaud the effort that Gary Byers puts into creating an informative and nicely structured page for each release of OpenMCL.
lisp-cgi-utils, by Alexander Schreiber, is “a software package for developing CGI scripts with Common Lisp. It implements a very basic HTTP/CGI interface (sending headers, getting GET/POST and environment variables) and offers tools for easier HTML generation with special support for handling HTML forms.” [via Markus Fix.]
Holy “crap”, Fred updated. I came back after lunch and a margarita and thought, “Hey, I think I'll go look at that moribund site Fred used to do, just for fun.” Only there was new stuff.
Ohhhh. Crap. I am supposed to post links here nad stuff. Cool links to cool web sites and stuff! It's a fucking blog! Everytime i hear or read that word i die a little.
Go for the topless photos of Sofia Coppola and every message Steve Albini ever posted to some bulletin board, stay for the Elizabeth Taylor photo gallery and the topless photos of Sofia Coppola.
OH YEAH1 I ALMOST FORGOT--- I HAVE ALSO DECIDED THAT THIS BBBLOG REPRESENTS THE FUTURE OF JOURNALISM. CAN YOU GET YOUR HEAD AROUND THAT?
Metascene is one of the select group of sites that seem to have about three fans each, of which I am the most rabid. (hi, Gavin!) My recommendation: Start with Oct. 23, 2003, and work your way up. Do not stop. (If you like lists, as I know some of you do, see “Stuff I Used to Think Was Funny” and “The Metascene Guide to International Travel”.)
Nikodemus Siivola recently updated two of his projects [via Markus Fix]:
Linedit 0.15.12 is a readline-like library in Lisp that uses UFFI on unix platforms to provide the following features:
Linedit works in Linux, FreeBSD and Darwin.
Osicat, at version 0.4.0, is “a lightweight operating system interface for Common Lisp on Unix-platforms.” It offers functionality related to
An example of using osicat:
CL-USER(5): (with-directory-iterator (next "/var") (loop for entry = (next) while entry when (member :group-write (file-permissions entry)) collect entry)) (#P"local/" #P"lock/" #P"tmp/" #P"mail/")
<malaclyps> i'm going to Camp Smalltalk this year
<malaclyps> i believe as a UN Observer
<malaclyps> it's like Camp X-Ray but the interrogators try to get the prisoners to document their code
A reminder to anyone reading lemonodor via an aggregator, whether it's the LiveJournal feed (68 of you), Bloglines (65 of you) or Planet Lisp (over 300 of you): You may want to occasionally check the lemonodor site itself just to see what comments are being posted—how else are you going to stay current with the latest thoughts on Beyoncé? (By the way, here's a phrase, idiomatically correct, that appears in that thread but appears nowhere else on the internet: “pop they butt”.)
The LiveJournal feed can be particularly confusing because LJ allows readers to post comments to lemonodor entries, but those comments live in a completely different universe from the comments here. Er, by “here” I mean the place you're at if you're reading lemonodor in a web browser that currently says “lemonodor.com” in that little box at the top. And by place, I mean a location that has no concrete grounding in the physical world, I guess. Yes, that's right; I'm talking CYBERSPACE.
From the AP story “ U.S. navy loses high-tech mini-sub off Norway” [via Mike Hannemann]:
The U.S. navy has been searching for nearly a week for a high-technology miniature unmanned submarine that vanished during a military exercise off Norway, the Norwegian military said Wednesday.
The mini-sub, or Battlespace Preparation Autonomous Underwater Vehicle, is programmed before being launched to search for mines and, if necessary, destroy them.
“Danger UXB” gets a whole lot more interesting when the bomb you disturb turns out to be robotic.
Gavin: “Your phone will soon be your dynamic little friend, acting on your behalf, initiating machine to machine conversations. What will they talk about?”
I have quite a bit of Lisp-related news to catch up on. Some of it is weeks old, but given that this language has been around for over 40 years a few weeks probably won't make much difference one way or the other (anyway, doesn't it feel a little relentless sometimes, the way that weblogs seem so focused on the news of the minute? lemonodor's jumping off that treadmill, ha!). There won't be anything you haven't already seen at Planet Lisp, but I find it's handy to use lemonodor as a sort of personal notebook of record, and the very act of writing a post about something helps me to remember that thing. I suppose it's possible not everyone reads Planet Lisp, too.
So here's the first in a series of posts to get me caught up to my archival desires:
Back when I started grad school, I was pretty into ray tracing. I was also flush with excitement over my newly gained access to 20 or 30 Sun workstations (ray tracing on my own 16 MHz 386sx had already taught me as much patience as I was willing to learn), so when I found a patch for the ray tracing software I preferred that used PVM to do distributed ray tracing across multiple machines, I had to try it.
Unfortunately the patch as published was buggy and only accomplished the feat of turning the ray tracer into a very effective fork bomb. The first time I ran it on the main shared departmental server I thought it was just coincidence that an instant after I hit Enter my dialup connection froze. So a few minutes later when I was able to dial back in and login to my account, I ran it again. Oops, the machine crashed. Again. I just thought it was being really flaky. The next time I reconnected, before I could run the ray tracer a third time a message scrolled onto my terminal:
John Wiseman: please call techstaff immediately! 773-555-9054.
Man, I felt awful.
That reminds me: Ivan's code is “pre-alpha”. Be careful.
For more background on PVM and parallel computing with Lisp, see this post by Bill Clementson.