Book Review: Perl One-Liners

No Starch Press noticed that I keep talking about Michael W. Lucas’s BSD-related books, and I’ve linked to Peteris Krumins’s catonmat site before, so they sent a copy of Krumins’s new “Perl One-Liners” book to me.

Stole image right from the site.

 

Here’s the hook for me: Perl was the first language I wrote a program of any real use in.  Years ago, I had the Perl Cookbook.  It was a pretty simple formula, where I’d have a problem.  I’d look it up in the Perl Cookbook.  If there was already a recipe that matched what I needed, I was set.  I ended up having to stuff the book into a binder because the spine broke.

This reference is essentially what the Perl One-Liners book is, though this is less about  programming and more about the solution you need right now. The book realizes this and it’s laid out like a menu.  Flip through the index to find your problem, and then type the answer.  The book even includes a link to a text file that you can copy down and grep for answers – I won’t link to it because it’s not mentioned on the author’s page, though he does include example chapters.

It’s not about learning Perl, and it’s not about technique – these are one-liners, after all.  If you are doing the sort of thing Perl excels at, like text mangling, this will be a book full of tools for you.  I think the author is going to continue in this style; he’s done a lot of one-liner articles and even some previous e-books.

Probably a good idea to make this disclaimer: As with other books, I get no reward for this review, unless you count me having another book in the house.  That’s more of a problem than a benefit for me.

Lazy Reading for 2013/12/01

Now that I’m going into more descriptive detail with these, I’m going to try without the bullet points.  It’s less of a Wall Of Text that way.

Things I Wish Someone Had Told Me When I Was Learning How to Code.  Really, very good advice.  (via)

‘vr’ mentioned the Space Cadet and Symbolics Macivory keyboards in comments for last week’s Lazy Reading keyboard links.  I didn’t know what they were, so searching around found me this Symbolics keyboard image (the model itself is apparently dearly missed)and the inevitable Wikipedia Space Cadet entry.  I also found this study of keyboards that mentions some other ‘special’ modern models I’ve heard of in passing – Das Keyboard and Happy Hacking models.

Also found as part of that search: one man’s quest to get his own Lisp Machine.  That appears to be about 10 years old, so my guess is that you’d go for emulation these days.

Sorting information that isn’t quite numeric.  This bites everyone sooner or later.

The death and life of great Internet cities.  “Whatever we may ultimately make of our move towards sites like Facebook, it’s almost certainly the case that, for the average netizen, it was a movement away from online literacy.”  An excellent article about how communities are no longer built online – at least not through social networks.  (via)

Farming hard drives: 2 years and $1m later.  Data-driven analysis of hard drive prices, and how they’ve recovered poorly from the Thailand floods.  I always like it when a company takes data from doing something on a large scale – something very few people are doing or could do – and releases it.  (via)

Systems Software Research is Irrelevant.  Rob Pike pointing out how the system ecosystem was becoming monocultural.  It’s over 10 years old, so some of the problems have changed.  The interesting thing is to look at it and see which parts were identification of upcoming trends.  (via)

DragonFly 3.6 video review.  This person doesn’t realize the shell is tcsh, not bash, and it really, really messes him up.  I had to stop watching about 6 minutes in.  (via blakkheim on IRC)

Your unrelated link of the week: The Church of the Subgenius is selling 2-for-1 deals on ordainment.  It’s really a legal ordainment, too, at least in the U.S.  You can perform weddings, funerals… circumcisions?  Not sure about the legal restrictions on that, and maybe I don’t want to know.  Anyway, you get an entertaining pack of literature which you can take either completely seriously, or not at all.

 

In Other BSDs for 2013/11/30

A lighter week for commits probably because of the U.S. holiday, but still plenty of things to link.

Hammer2 status

This is a little old, but Matthew Dillon noted the status of his Hammer2 work a little while ago.  Some highlights: he’s intending Hammer2 to be usable on a single host by the time of the next DragonFly release (summer 2014), the Summer of Code project for compression has already been integrated, and he listed different parts of the work that may be interesting for anyone wanting to chip in.

Slightly related: Matt posted some Hammer2 comments on the DragonFly 3.6 release story on Slashdot that may be interesting.  Don’t bother reading the other comments; they’ll make your eyeballs bleed.

DragonFly 3.6 released

The 3.6 release of DragonFly is available now.  I just put up those images last night, so if your favorite mirror doesn’t have it, give it a few hours.

For those updating from 3.4 to 3.6: there’s an ABI change, so you will have to upgrade all your packages.  If you’re using pkgsrc and ready to switch to dports, now’s the time.  If you already switched to dports on your 3.4 system, binary packages for 3.6 have already been built and you can use pkg to upgrade.

Also for upgrades from 3.4: You can pull the 3.6 source normally:

cd /usr/src
git fetch origin
git branch DragonFly_RELEASE_3_6 origin/DragonFly_RELEASE_3_6
git checkout DragonFly_RELEASE_3_6

But there’s a slight change needed for the 3.4 to 3.6 transition: an extra reboot in the build process:

# make buildworld && make buildkernel && make installkernel && make installworld && reboot

# make upgrade

This is all noted in /usr/src/UPDATING and in the release notes, but I’m taking no chances.

Lazy Reading for 2013/11/24

There’s some in-depth items to look at this week; pull up a chair and get something warm to drink.  You will be rewarded.

  • James Mickens, who you may remember from The Slow Winter a few weeks back, has written again with The Night Watch.  Gonzo tech writing is the best.  Note to self: a ;login: subscription might not be a bad idea, as apparently there’s more like that.
  • Another note to self: watch the USENIX blog.  There’s some interesting things on there.
  • Citation Needed.   There’s a plausible claim in this that the reason we have 0-based indexing in most languages is because of yacht-racing.  Seriously, read the article, and follow some of the links in it.  (via)
  • Engelbart’s Violin.  Because “a computer system should maximally reward learning.”  Found in that previous essay; good enough I had to break it out.
  • Found in the comments from that previous link: SiWriter.  One-handed phone typing, simulating a chorded keyboard.
  • History of T.  I was wondering if it was something about tea, but no, it’s a discussion about a Lisp implementation.  Lisp all seems to originate from a magical time, when computers were faster, dragons were common, and elves hadn’t retreated across the sea yet, or at least all the stories have that mythical vibe.  See the ycominator link for additional discussion about system languages like Rust, of which I have only heard in passing so far.
  • The video and audio from LISA 2013 has been posted.  There’s lots there; I’m sure you’ll find an interesting topic.
  • I wasn’t kidding about this being a dense week for links, was I?
  • This should have been in yesterday, but I only read about it this morning: Darwin/BSD on ARM.  More ARM work everywhere, please; there’s a tidal wave of these processors washing about.  (thanks, J.C. Roberts)
  • Why I use a 20-year-old Model M keyboard.  See the ycombinator discussion for alternatives.  They all may seem expensive, but it’s equipment you’re going to smash your fingers against for many years; it should be good.
  • That discussion link in the previous item led me to this image.  An old-style Thinkpad keyboard?  Now that would be pleasant to use.  Apparently these existed, though the Lenovo keyboards section doesn’t have anything exactly by that name; the keyboards there look generic.  There’s some on eBay.  Anyone ever used one?
  • The Homebrew Computer Club reconvenes.  A computer club nowadays is “we downloaded some of the same software”, while back then it was “I built a computer.”  A bit more hardcore.
  • chibitronics.  It’s ‘circuit stickers’, and a good idea.
  • mattext, a matrix-style pager.  Does it work on DragonFly?  Haven’t had a chance to find out.  It needs a video demo.  (via)
  • More UNIX script debugging.  Still Bash-specific, but still useful.
  • Puppet vs. Chef  vs. Ansible vs. Salt.  A useful comparison for those not familiar with these types of tool.  (via)
  • UNIX Proves Staying Power as Enterprise Computing Platform.  Gives a short history of commercial UNIX platforms.
  • I find stories about closing cloud companies compelling.  I’d probably feel different if it was my problems to sort out.

 

Your unrelated link of the week: Mr. T PSA.  It’s a parody of the real thing.  I explicitly mention it because you, the reader, might not be just the right age to remember this.

If that’s not confusing enough, watch this.

In Other BSDs for 2013/11/23

I’m working my way up to more than just links to source for the cross-BSD news.  There’s a lot to swim through!