I had to write these for a colleague some months ago, and promptly forgot in classic fashion. Here’s something to mock my inability to write coherent install docs for posterity: Setting Up eJabberD From Scratch. A how to, of sorts, I guess. This was written for a Centos server, but is probably accurate for most Unices (don’t really know for sure.)
I just realized I never posted my Erlang highlighter for ConTEXT. ConTEXT is a free Windows programmer’s editor, and I’ve used it and MSVS basically exclusively for many years now.
Have you ever looked at the cost of something like MaxMind with monthly updates? It’s ridiculous. Tens of thousands of dollars a year. Makes me angry, honestly. Problem is, I went to hostip.info to get replacement free data, and one time in three it thinks I’m in Canada. (I’m not in Canada. Only Russians live in Canada.)
To that end I’ve decided that anyone who hasn’t checked (and if necessary, updated) their data in HostIP.info is officially a douche. It takes like ten seconds. C’mon.
So I’m working on a quick run at 99 Lisp Problems in Erlang, because I’m a little bored of Project Euler, and I write myself a tiny little testing rig.
And it occurs to me: if I had the ability to slap a name on that fun - say, strip_tuple - then its purpose would be far more obvious, and the whole block of code would suddenly be much easier to read. I realize that the purpose of lambdas is to just write out as functions what couldn’t easily be expressed otherwise and yet stay inline, which has enormous space-savings, readability and debugging benefits. But, there’s nothing in there that actually requires my inability to paste a label on it, is there?
… which screws you nicely for a while, while you’re trying to figure out what’s broken in your erlang port. Unfortunately, there doesn’t seem to be a portable solution. That said, here’s what you do in unix:
I’m becoming ever more convinced that the answer is yes. I’ve been playing, a bit, a game called Project Euler, a game for programmers wherein the object is to find solutions to deceptively simple problems. It’s surprisingly entertaining, and your score is a result of the function of programmers which have not succeeded in a task.
There are people who take long roundabout approaches to get to results like these, when instead they could be doing things like
p1() -> lists:sum(
[ X || X <- lists:seq(1,10),
((X rem 3) == 0) orelse ((X rem 5) == 0) ]
).
As a result, I’m starting to think that I need to start explaining things. Anyone agree or disagree?
Yeah, I know I’ve been quiet for a long time. There’s a good reason, and it’ll all make sense soon. However, I just stumbled across an article that is so amazing that I just can’t wait, and I need to share it. Andrei Alexandrescu is a brain, but this one’s special, even for him.
It’s been a good year for holy-crap technologies. This one - an MIT tool called ASSIST - boggles my mind, and it’s given me some seriously woot ideas. I’m filing it under Nintendo DS because, even though it’s not a game, that’s just the ideal platform for a better-developed such tool.
The YouTube video is short, but there’s a longer one at the main page.
That’s right. Netflix will give you a million bucks if you can write an algorithm which one-ups their existing algorithm by 10% or better on grounds of predicting what their customers will like, based on their prior history.
Yeah, so, I’m having a hard time adressing the weirdness that is ParentNode’s approach to default functions. Basically he sets a hook on the prototype for calling the function, and in that he makes a new function which checks for the presence of a particular member (we remember that functions are objects in ECMA, I trust.) If that member exists, he chops it up, and for each argument in the original function call, he tests for undefinedness, and if that’s present, he fills in the value. (This one is order-based default, but there’s also a by-name default.)
Now, I think it’s a little impractical, and it leads to a mind-bleedingly weird syntax, but it’s actually struck me that this is a very clean, very terse format for providing something akin to uniform construction behavior when you’re dealing with multiple manufacture paths to a given object. Granted, it’d be an even bigger, even uglier hack, but still, it’d work.
Witness syntax:
function exampleF(foo, bar, baz) { … }.defaults(1, 3, 7);
Hear that crashing sound? It’s your mind, breaking. But, as much as I hate to admit it, this is one genuinely lovable hack. Bravo.
When wandering around Das Intarweb one sees a lot of sad, sad code. In fact, people who should know better get busted on weak crypto all the time. Indeed, even the PHP manual examples have unacceptable security flaws. When one is writing encryption code for one’s own site, that turns into a problem. Here’s a library to wrap and a little primer on using the standard encryption facilities in PHP safely and correctly.
Am I the only person who’s sick of watching people like Joel On Software spew obvious nonsense? Starting a business is about not throwing away your budget. Most of us don’t have a several year old blog full of other nonsense to convince VCs to recapitalize us just because we lit our first budget on fire to watch the pretty dollars burn.
It’s never been entirely clear to me how articles like this article on linuxdevices.com get cleared to be published. If they’re onced over by someone with even half a clue about C++, they’d just get turned down. It makes me worry about the quality of the magazine publishing them. Nonetheless, someone used this article last night to justify a stance borne largely in ignorance as regards C++, so it’s time to clear the air about the language. Today, I start a new category to curb C++ naïveté and misapprehensions. This is the first entry in “C++ Myths.”
MSHTML is an awesome user interface tool, but it has a whole lot of standard behaviors, many of which aren’t what one wants for an application (since it’s designed for the web.) This is a list of stuff you need to do to embed IE COM and have it behave like a normal application. There’s more than a person might expect.
I always wondered how applications suppressed that god-awful clicking sound in embedded IE. Usually you catch them screwing with user preferences, but there’s a utility I have which never showed any apparent method of getting rid of the goddamned noise. I always assumed they just styled text to look like a link.
Well, I still don’t know what he does, but I found a way.
Yeah, it’s dead short: the RIAA’s page sucks. Some douche came onto IRC looking for help building a music piracy site, so I went to try to report it at the RIAA. I couldn’t find a place to report it. (I reported it to the MPAA and lied and said there were movies in there too. Hopefully they’ll pass it on.)