Older blog entries for sjanes71 (starting at number 101)

An idiom for nesting anonymous functions in CoffeeScript

I have some code that is very brief, but called with a timeout. It’s tiresome to name two functions just so you can call them indirectly. Anonymous functions are quite brief in CoffeeScript:

setTimeout(
    () ->
        somethingThatCalls( () -> some other work here )
    , 1000)

You probably don’t want to go too many levels here, but its convenient for short bits of code.


Syndicated 2012-04-28 14:30:40 from sj4̄nz

“The fundamental rule of political analysis from the point of psychology is, follow the sacredness, and around it is a ring of motivated ignorance.”―Jonathan Haidt


Syndicated 2012-04-25 05:00:46 from sj4̄nz

CoffeeLint Configuration for Tab-Indentation CoffeeScript Authors

I’m falling into “use a tab” camp for source-formatting and counting tabs as indentation. If you want to configure your source editor to make those tabs appear as 2, 3, 4 or even 8 spaces wide, go ahead. For me, I think of them as logical mark-up for your “intent” of “identation.”  Any tab to me means one level of indentation.

Here’s a CoffeeLint.json configuration for that kind of work with CoffeeScript:

{
 "no_tabs" : {
 "level" : "ignore"
 },
"no_trailing_whitespace" : {
 "level" : "error"
 },
"max_line_length" : {
 "value": 80,
 "level" : "error"
 },
"camel_case_classes" : {
 "level" : "error"
 },
"indentation" : {
 "value" : 1,
 "level" : "error"
 },
"no_implicit_braces" : {
 "level" : "ignore"
 },
"no_trailing_semicolons" : {
 "level" : "error"
 },
"no_plusplus" : {
 "level" : "ignore"
 },
"no_throwing_strings" : {
 "level" : "error"
 },
"cyclomatic_complexity" : {
 "value" : 11,
 "level" : "ignore"
 },
"line_endings" : {
 "value" : "unix",
 "level" : "ignore"
 },
"no_implicit_parens" : {
 "level" : "ignore"
 }
}

Yes, I realize that this JSON file itself is not tab-indented.


Syndicated 2012-04-17 01:55:12 from sj4̄nz

Storm Aftermath

Love the sky after a storm. It’s so much cleaner, like it has been swept of pollution.


Syndicated 2012-04-16 13:57:47 from sj4̄nz

Note to Self: Dude, You Don’t Need FLAC; gPodder WTF?

Sure, disk space is cheap. But backing up gigabytes of data is a royal drag. But I’m finding that if the MP3 is of high-enough quality (by this I’m thinking whatever lame --preset extreme excretes out in hot-and-steamy MP3 bits) I don’t mind. Additionally, I’m tired of fighting with devices that don’t understand OggVorbis or FLAC—like the in-dash media player in my car. That’s just not a battle worth fighting. MP3 has won, another case of a technically inferior standard achieving supremacy via overwhelming network-effects. So, it’s time to sweep the drive and downcode FLAC to MP3.

How to do this? Well, flac -dc FILENAME.flac | lame --preset extreme - -o FILENAME.mp3 is the recipe of the moment.  That’s one itch scratched, the next one is more complicated.

gPodder ← ಠ_ಠ

gPodder has really gotten on my bad-side of recently with broken releases. I tried going to Miro which didn’t work well anymore (like it used too) and even iTunes for a bit. No happy. Not at all. I’m a victim of my want of simple-UNIX-like-tools-that-do-just-one-thing-well. When it comes to agents that perform work for you on their own, they’re awful with syndicated media downloads. I’m this far (||) away from considering using cron and wget and bailing wire to download the media. Somehow. Take the “Back to Work” podcast for example:

 # remove the old copy of the RSS file 
rm back2work
 # grab the feed
wget http://feeds.feedburner.com/back2work
# gank out the last three episodes and 
# download if not seen before. 
grep enclosure back2work |head -3| \
cut -d '"' -f 2|xargs wget -nc

At least for now, that’s a version-0 idea of what I want done. Just the files, downloaded. For now, there’s no setup or configuration and I haven’t decided where this is going to happen on the computer yet.


Syndicated 2012-04-09 04:07:39 from sj4̄nz

“Open Ended”

Lush hip-hop from Algorhythms.


Syndicated 2012-04-04 13:41:39 from sj4̄nz

Take Away Show _ BOMBA ESTEREO

Vimeo doesn’t embed worth a crap in wordpress.com. :/

25818086

A music video that’s just people in a beautiful place with their instruments. I don’t understand a word of it, but I don’t think I need to.


Syndicated 2012-03-22 19:20:17 from sj4̄nz

A Signet for Markdown

Nice work for fans of Markdown technology which never had a super nice graphic symbolizing it:

Designed by Dustin Curtis.

In many ways, I wish Markdown was the standard in WordPress. WYSIWYG gets a little tiresome sometimes.


Syndicated 2012-03-14 13:42:02 from sj4̄nz

Why 24-bit/192kHz Music is a Waste of Bandwidth

Why 24-bit/192kHz Music is a Waste of Bandwidth

Unless you’re considering sending ultrasonic “death noise” to your recipient… and even then, there’s no guarantee their audio will be able to output it correctly.


Syndicated 2012-03-05 22:16:08 from sj4̄nz

Why can’t you buy a heterodyne/parametric array desktop audio system?

This isn’t for your music—this is just for daily communication. Just think of how awesome it will be for video bloggers to be able NOT wear headphones and look like doofuses on Skype. This seems like a massive, untapped market for http://www.holosonics.com.

Bring back payphones with this technology and you’ll never have to touch an unsanitized handset ever again or worry about a missing handset.

I mean, really, kiosk “areas” for advertising your bananas in supermarkets is a really, asinine application of this technology. The only place I’ve ever seen this in the appropriate wild was a public library in Ogden, UT at a public-information station. But add a microphone to the mix and you’ve gotten away from mere pico-broadcasting and made something better.


Syndicated 2012-02-28 20:33:18 from sj4̄nz

92 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!