Ghosts in the Speakers

I’ve got two sets of D’Feldt Audioengine 5 “active” speakers (i.e., with built-in amplifiers).

Yesterday one of the sets (in the office) started making a thunder-ish noise, but only in the “sattellite” speaker.  So I disconnected it.

This morning I was awoken by an insane noise.  It sounded like someone were putting asphalt down in my apartment.

It turned out to be the other set of the speakers, in the bathroom, was making the racket.  It sounds kinda like the noise in the other set, only louder.

The sound is very much like the sound that broken amplifiers make when warming up.  Just listen:


<div class="separator" style="clear:both;text-align:center;">https://www.youtube.com/watch?v=xkexrGfSsvM

See?

There’s nothing connected to these speakers except electricity.  There’s no audio signal.

What are the odds that two pairs of these go bad — this bad — one day apart?

It sort of seems not very likely.

Does anybody have any other explanation for this phenomenon?  Animal magnetism?  Comic rays?  Neighbors conducting experiments with their home-built hadron collider?

Filmin’ Finish’d

Peeps decided to film (bits of) a movie in my apt.  So I went away to various parts of the world and wrote the Gwene web interface.

I came back on Friday and had to like (eww!) work and stuff, but now I’ve gotten the apartment wired back up again so that I can listen to music and stuff.

The movie peeps moved most of my furniture out of the apt., and their stuff in.  They did an admirable job of putting All My Precious Stuff back where it was, but the computer stuff…  It’s complicated.  So I did that myself.

Unfortunately the main piece of equipment in my stereo setup, the RME Hammerfall DSP Multiface II (that’s a mouthful), just didn’t want to work.  So if you’re googling this, the symtoms were that the digital “firewire” interface worked perfectly.  The driver loaded, all the meters worked as normal, bopping up and down, but no sound came out of the analogue ports.  And nothing came in from the analogue input ports, either.  It was like the entire analogue bit was dead while the rest worked.

I went to my friendly neighborhood audio shop, ProLyd, and asked for advice, but they hadn’t heard of those symptoms before, so I bought a new one. And it worked!  I have music!

So that’s apparently a thing.  The Multiface II can semi-die.  I’ll ship the old one off for the fiords.

So unfortunately I have no harrowing stories about a trashed apt. or anything.  The film peeps were very nice, and everything proceeded as much according to plan as anybody could expect.  No new mysterious holes in the floor or the walls.  No mysterious footprints on the ceiling.  Or anything.   

Very disappointing.

They did some final tiny shoots today, and now they’re off forever.

However, I just discovered this in the room next to the bathroom:

Doesn’t everybody dream of having a bathroom like this?

So chi chi.  So recherche.

Ok, I should send them a message…

JavaScript Is Fun

In this blog post I ramble on about how writing stuff in JavaScript is fun.  Bonus conclusion: Node.js doesn’t suck, either!

But first: Context.

After some discussion, I decided that it might be nice to allow comments on Gwene.  However, if people make public comments, there should be a way to display these comments to the public at large.  “Here.  I’ve made these comments about your crappy blog.  See how wrong you were.”  So Gwene would have to have a web interface.

I though extremely briefly about using the Gmane interface.  However, it uses rather a lot of resources, and I didn’t want to use it for something as frivolous as this.

Besides, it would mean rewriting bits of it, since it would be Wrong for Gwene to show the entire contents of the RSS feeds. Doing so might mean that Gwene would (possibly) take away some traffic from the original sites.  Besides: Legal stuff.

So I decided to write a new interface.  Besides, I needed something to do while not being away on holiday for a few days.

I wrote a C program called warp that takes an inn overview file, parses the thread information, and outputs a (binary) index file suitable for parsing and squirting out onto the web.  The main point of this program is to enable the web interface to do a O(1) lookup onto the index file on (SSD) disk, read a chunk of data, and output all the thread roots for the group.

I then wrote another C program called woof that takes a list of articles (stored in the binary index file created by warp) and outputs HTML of the article contents.  The original RSS entries are shortened drastically (to 100 characters), while the comments originated on Gwene are presented in full.

Then we get to the JavaScript bits.

The fun bits.

Since there are no usability constraints here (blind people just use the NNTP interface), I wrote the web interface in a very JS-ey way.  The HTML output by the server is extremely trivial, but is transformed by client-side JavaScript into a pleasant (I hope) DOM.

All fun and games, so far, but the thought of writing the server bits in PHP just made me gnash my teeth.  There’s nothing much wrong with PHP, but it’s simply the most boring programming language ever.  There’s absolutely nothing fun about it.  Just a boring soup of mis-named functions.

So I looked into the most hyped of all hyped yesterday’s technologies: Node.js. 

I looked at an example static server, copied the code to the local disk, pointed Node at it, and specified http://localhost:8080/../../../../../../../etc/passwd as the URL, and was promptly served my password file in the browser.

It just works!

After writing some functions to parse the binary index file by warp, I then had a complete working interface to the spool.  It took me just a few hours to implement the Node bits.  The async callback style for something as simple as this just had four levels or so.

So here’s my point: JavaScript is fun.  JavaScript is fun because it’s a simple, logical, straightforward language, that has one single killer feature: How natural and easy it is to create closures.  After a while you start introducing closures all over the place, and use mappers and other functional goodies instead of iteration.

People complain about the awfulness of programming with callbacks in Node.js. I think these people are, to use a technical term, retards.  I can’t back that up with hard evidence, but I think it’s pretty self-evident.

JavaScript is fun to me in a similar way that C is fun to me.  For my day job I program in Common Lisp.  For my Emacs hobby I program in Emacs Lisp.  Both languages are so expressive that I have to think about what I’m doing.  With C, and to a lesser extent JavaScript, I can just type away without having to think about a single thing for minutes on end, because you have to type so much to get anything done.

In addition, I get a feeling of accomplishment when doing something — anything — in these languages.  Implement a bank in Common Lisp?  Eh.  Whatevs.  Parse a NOV line in C?  Whoho!  It doesn’t crash!  Yes!

Not that JavaScript is like C in that regard.  It’s very un-crashey, and more expressive than most languages people futz around in.

Writing a simple service in Node feels like programming, while doing the same in PHP feels like script drudgery.  I’m not quite sure why that is, but there’s just something intrinsically boring about PHP that sucks all joy out of using it.

So why all the hate for JavaScript?

I think that most people who natter on endlessly about how awful JavaScript is have one thing in common:  It’s the one other language than the one they’re trained to write in that they come in touch with.  (And I use the word “trained” deliberately.)

They’ve been trained to use one single crappy language, like Java or C#, and then they come into contact with The Other, and every way The Other differs from The One True Language I’ve Trained In is Evil.

So, to them, declaring local variables to avoid making them global is just moronic.  No matter that that’s how it works in plenty of other languages they aren’t familiar with.  Having several equality operators is just iNsAnE, despite all sensible languages having the same concerns (== is kinda like equal while === is very much like eq).  And closures are just so incomprehensible. Boo hoo. And on and on and on.

The biggest wart JavaScript has is that fucking + operator.  Other than that, it’s a downright cute language.  Once you understand the semantics, JavaScript is nice and regular, and nothing surprising happens when you write stuff in it.

So stop trying to use insane languages that compile to JavaScript.  It’s fine the way it is.

Aww.  JavaScript.  Cute and fun.