Latest articles

SDLang-D v0.8.3 - Improved API/Docs

SDLang-D is D library to read/write SDL (Simple Declarative Language), a data language like JSON/XML/YAML, but easier and cleaner.

The main focuses of this version are a revamped API and improved/expanded GitHub-flavored documentation.

// Sample, but useful, SDL: latest-version "v0.8.3" release-date 2013/03/26 links { original-sdl "http://sdl.ikayzo.org/display/SDL/Language+Guide" sdlang-d:home "https://github.com/Abscissa/SDLang-D" // Full changelog sdlang-d:changelog "https://github.com/Abscissa/SDLang-D/blob/master/CHANGELOG.md" // How-to-Use and API Overview sdlang-d:how-to-use "https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md" }

The codename for this release is "v0.8.3".

Read more


Facebook is not written in PHP

Yea, I know you're thinking "This guy's nuts! Everyone knows Facebook is PHP!" Sit down, shaddup, and I'll explain...

But let me address this first: The claim that "Facebook is written in PHP" is frequently used to rationalize using the world's worst language. This is, of course, idiotic because appeal to authority is a logical fallacy. To put it in simpler terms: Just because Ozzy Osbourne abused the hell out of drugs and alcohol and wound up rich, famous and alive, obviously doesn't mean it's a good approach to imitate. Get the picture? So quit saying stupid shit like "PHP is fine because XXXX uses it". It makes it obvious you're an idiot.

Ok, back to Facebook's usage, or not, of PHP:

Like any remotely sane company, Facebook doesn't use PHP for its core systems. The actual "core stuff" language used varies by company, but at Facebook, they "use C++ heavily on [their] back-end systems"[1]. In fact, they "use C++ at Facebook all over the place".

While Facebook has things that are ostensibly PHP, it's not the real PHP. The real PHP is such a piece of shit, Facebook had to write their own alternate version of it (HipHop's HPHPc, which converted the "PHP" to C++). Then they had to make another, the HPHPi. And then yet another, the HipHop VM. Facebook does not use real PHP, and that's because true PHP is just simply crap unsuitable for them.

Not only that, but the psuedo-PHP that Facebook does use is being quickly overtaken by Facebook's increasing usage of C++: "...two years ago, maybe 90% of [Facebook] programmers wrote PHP and 10% C++. Now there are roughly as many C++ programmers as PHP programmers." Additionally, Facebook has had growing internal interest in D (note that link is over a year old already), and Facebook's HipHop team is one of the sponsors at this year's D conference.

So ultimately, no; contrary to conventional "wisdom", Facebook is not written in PHP.

[1]: See question #4 here.

Read more


New Lib: SDLang-D v0.8.2 - Like JSON/XML, But Nicer

I wasn't able to announce it here before, due to this CMS's latest cock-up, so this is late, but here goes:

SDLang-D is D library to read/write SDL (Simple Declarative Language). SDL is a data language like XML , JSON, or YAML, except it's less verbose, type-aware and easy to read.

This is what SDL looks like (some of these examples, and more, are from the SDL site):

// Tags with one value first "Joe" last "Coder" // Tags with multiple values numbers 12 53 2 635 names "Sally" "Frank N. Stein" // Tag with multiple attributes pets chihuahua="small" dalmation="hyper" mastiff="big" // Values come before attributes mixed 34.7f "Tim" somedate=2010/08/14 // Child tags (nestable to arbitrary depths) myNamespace:person name="Joe Coder" { age 36 }

The initial release was v0.8.1, but the latest version is v0.8.2.

SDLang-D Homepage

Read more


The PHP CMS Screwed Up The Previous Article - And This One

Wow, leave it to a PHP-based content management system to help me prove a point about useless bug-riddled crapware.

No later than when I wrote and tried to post the following message, that's when this PHP-based article system inexplicably corrupted the post and turned it into a black hole. If I'm lucky, the same wont happen again right now...

Original *attempted* posting:

Anti-Perfectionism Doesn't Mean "Release Crapware"

"Don't let perfection become the enemy of the good"?

That's all fine and good to an extent, but many people take it too far and wind up with products that are only minimally useful. Or useless bug-riddled crap.

Don't let rapid development become the enemy of a worthwhile product.

UPDATE 2013-03-20: I've fixed the problem. For some idiotic reason, the id (primary key) column of the database's "article parts" table (actually "tcm_mod_article_parts") was set to signed TINYINT. Seriously. That meant only 127 articles parts (I have one or two articles here that are two-parters) and then KABOOM, error upon INSERTs, which is exactly what happened. I have no idea whether the TangoCMS installation script set it up that way or if MySQL's migration tool fucked it up when I changed servers, and I'm not going to investigate either. Either way: fuck!

Oh yea, and wasn't it nice of my PHP-based CMS to not bother to give me any indication whatsoever the DB had returned an error, or that there has been any error at all? Wasn't even in the damn logfile for shit's sake. But then that's the whole philosophy of these damn dynamic languages, isn't it: Never flag an error when you can silently do the wrong thing.

I am still working on my own custom D/Vibe.d-based replacement, and it's been coming along, but slowly since I haven't had much time lately to dedicate to my various pet projects. It's not too far from a releasable state, but still needs some work on a few things.

Read more


Anti-Perfectionism Doesn't Mean "Release Crapware"

"Don't let perfection become the enemy of the good"?

That's all fine and good to an extent, but many people take it too far and wind up with products that are only minimally useful. Or useless bug-riddled crap.

Don't let rapid development become the enemy of a worthwhile product.

Read more


One D Annoyance: Conflicting UFCS and opDispatch

I love D's UFCS. I find D's opDispatch questionable (particularly in comparison to opIndex(string)). Unfortunately, opDispatch takes precedence over UFCS (And does so silently, annoyingly enough).

The consequence is UFCS cannot be used on most data structures that employ opDispatch. At least not without modifying the data structure's opDispatch itself - which defeats much of UFCS's point of adding "member" functions to a data structure without actually modifying the data structure itself.

I hate that. And it makes me hate opDispatch, too.

Read more