An unexpected way to do strlen()

The general rule of thumb is that if you have a function written in an interpreted language (Perl, Python, etc.), it’ll be faster in C.  If you need it faster than that, you go to assembly.  Prepare to have your world rocked: Venkatesh Srinivas found that strlen() in libc was actually slower written in assembly than in C.  His commit message has numbers to back that up.

Lazy Reading for 2011/11/27

Happy (post) Turkey Day for the U.S. readers!  A light link week this week.

  • Facebook is bad for the Internet.  ‘Gaslighting’ is a new term to me.  As that article points out, I can’t even put my posts to the Digest onto Facebook in any sort of automated way.  Facebook suggests that of course I’d love to retype them all by hand.  That’s not realistic.    Facebook doesn’t want any sort of useful external link to be visible to their customers.  Customers isn’t actually the right word; the customers are the advertisers.  What would be a better word for the users?  Crop?
  • the internet is above and beyond all else a resentment machine.”  It’s a very long essay that points out people are confusing brand identity with personal identity.  (via)
  • You know what would be good?  More conversations about games on BSD, cause it could use some attention.  Oh hey there you go.
  • A Dragonfly lamp (via Julian Gehtdichgarnichtsan)

Your unrelated link of the week: Animals Talking In All Caps.  It is what it says it is.


Video and USB fix

Matthew Dillon has written a contiguous memory mapper, which is designed to fix problems with video cards and USB drives that need a big chunk of memory to keep.  This can affect booting or later on, when disconnecting/reconnecting a USB drive.  If this still doesn’t fix the problem for you, try adjusting the sysctl ‘vm.dma_reserved’ to something bigger, like 64M.  It defaults to 16M.

(Normal mailarchive isn’t updating because of an ongoing upgrade to – sorry!)

What to do with /usr/obj

When building world and kernel on DragonFly, /usr/obj is where the work files get placed.  This can eat a bit of space, but it can be safely deleted.  If you keep the files around, subsequent rebuilds can be done faster with a quickwork/quickkernel, but this may not matter to you.

(This was answered on the mailing lists by Max Herrgaard, but I don’t have a link to his reply – sorry!)

Lazy Reading for 2011/11/20

Hey, the date’s sorta palindromic!  Sorta.

  • “Bundled, Buried and Behind Closed Doors” – a video description of the physical parts of the Internet.  Remember when MAE-East or MAE-West would have a bad day and half the Internet felt it?  Really, half.  I don’t think I’m exaggerating. (via)
  • Google has a verbatim search mode now, for those of you who regret the loss of ‘+’ as a required search term designator.  (via and also sort of via)  There’s always alternatives.
  • The expr program is a real piece of crap.”  Laser-focused complaining about a small program that’s had 4 decades to improve, and hasn’t.
  • Mechanics for Pure Aesthetics”  The videos are interesting, and I’m linking to this because so much of what I post here and deal with is focused computer work.  Everything is a tool, with a purpose, and a result that you expect.  This idea of machinery or even software having a purpose other than result generation is underexplored.  There’s lots of tools to create art, but there’s little that is art itself.  Even with that general lack, we still get excited when the edge of some sort of aesthetic appeal nudges its way into the materials we use.  You could argue that Apple’s success (for instance) comes from being the one company that consistently thinks about what a product is, instead of what it does.
  • If you use fastcgi, you may need the patch that this blog post talks about.  Also, apache-mpm-prefork is the better choice for Apache on DragonFly.
  • DragonFly mug shot

Your random comic link of the day: Calamity of Challenge.  Also here.  And here.  If this artist’s way of drawing grabs you like it grabs me, he has pages and commissions for sale.