Dödlig attack mot egyptisk kyrka SvD Utrikes(cached at October 20, 2013, 11:32 pm)

Beväpnade män öppnade i dag eld mot bröllopsgäster vid en kyrka i en förort till Kairo.
Why Is Using Associated Objects a Hack? inessential.comat January 1, 1970, 8:00 am (cached at October 20, 2013, 11:30 pm)

This came up on Twitter as a response to my post about NSURL­Session­Data­Delegate.

I’ll clarify.

I have a bunch of rules-of-thumb. One is that any time you #import <objc/runtime.h> in production code, you’re making a mistake. You’re hacking rather than doing the right thing.

The runtime is fun and interesting and every Cocoa developer ought to get to know it.

But if you find yourself resorting to runtime functions rather than using the non-runtime APIs as they are designed, you’re probably fighting the frameworks — and fighting the frameworks leads only to bad software and heartbreak.

Instead, it’s better to understand the non-runtime APIs and use them as they are designed to be used. (Think of the runtime APIs as protomatter.)

That said, of all the runtime APIs, associated objects comes the closest to getting a pass. The feature is convenient and useful, and with normal care is not going to have unintended consequences.

Nevertheless, I think of associated objects as a last resort, just because #import <objc/runtime.h> is a big red flag. If the non-runtime APIs — the APIs closer to the problem at hand — provide a way to do what you want to do, then that’s the way to go.

I’ve used associated objects before, and I may again. But, every time I do, I think of it as a failure and I try to understand what failed. It’s either a non-runtime API or my own design, or both, that failed. If it’s my design, I should fix it rather than take the shortcut.

So I can’t really say that using associated objects is a hack in the sense that you’re depending on undocumented behavior. It’s documented. It’s a hack in the sense that you’re taking a shortcut. There is a more appropriate way of solving the problem.

(Except when there isn’t.)

Oktoberkriget 40 år SvD Utrikes(cached at October 20, 2013, 11:02 pm)

Israel attackerar Syrien från Golan höjderna i oktober 1973.
Fyra män skjutna i Tensta SvD Inrikes(cached at October 20, 2013, 11:02 pm)

Oklart hur skadade de är – fördes till sjukhus i privatbilar.
Ask Slashdot: Do You Use Markdown and Pandoc? Slashdotby timothy on programming at January 1, 1970, 1:00 am (cached at October 20, 2013, 11:02 pm)

BartlebyScrivener writes "I am a author, screenwriter, law prof, and a hobbyist programmer. I love MacVim and write almost everything in it: Exams, novels, even screenplays now that Fountain is available. I use LaTeX and WordPress and so on, but several years ago I discovered Markdown and the wonderful Pandoc. I searched Slashdot expecting to find lively discussions of both Markdown and Pandoc, but found nothing. Do Slashdotters look down their noses at these tools and do their work in HTML and LaTeX? I can't imagine computer geeks using Word instead of their favorite text editors. If not Markdown and Pandoc, what tools do Slashdotters use when they create documents that probably need to be distributed in more than one format: HTML, PDF, EPUB or perhaps even docx?" And then there's DocBook, LyX, and a host of other markup languages. What do you use, in what context?

Read more of this story at Slashdot.








Junckers parti fick flest röster SvD Utrikes(cached at October 20, 2013, 10:32 pm)

Luxemburgs sedan 18 år tillbaka sittande premiärminister Jean-Claude Juncker, och hans kristdemokratiska parti CSV, fick som väntat flest röster i dagens parlamentsval.
Fyra skjutna i Tensta SvD Inrikes(cached at October 20, 2013, 10:32 pm)

Fyra personer har skjutits i Tensta i nordvästra Stockholm, uppger Stockholmspolisen för TT.
Man skadad av hemmagjord kanon SvD Inrikes(cached at October 20, 2013, 10:32 pm)

En man i 20-årsåldern fördes till sjukhus med handskador i kväll efter en smäll i en lägenhet i Örebro.
Motorcyklist svårt skadad i älgkrock SvD Inrikes(cached at October 20, 2013, 10:02 pm)

En 32-årig man skadades svårt när han på motorcykel körde på en älg på länsväg 219 mellan Trosa och Nyköping i kväll.
Gentoo-Dependency-AST-0.001000 search.cpan.orgby Kent Fredric at January 1, 1970, 1:00 am (cached at October 20, 2013, 10:01 pm)

Convert a canonicalized (R|P|)DEPEND into an Abstract Syntax Tree
Net-Async-Webservice-S3-0.15 search.cpan.orgby Paul Evans at January 1, 1970, 1:00 am (cached at October 20, 2013, 10:01 pm)

use Amazon's S3 web service with C
Types-Numbers-0.93 search.cpan.orgby Brendan Byrd at January 1, 1970, 1:00 am (cached at October 20, 2013, 10:01 pm)

Type constraints for numbers
Devel-Pragma-0.60 search.cpan.orgby chocolateboy at January 1, 1970, 1:00 am (cached at October 20, 2013, 10:01 pm)

helper functions for developers of lexical pragmas
POE-Test-Loops-1.354 search.cpan.orgby Rocco Caputo at January 1, 1970, 1:00 am (cached at October 20, 2013, 10:01 pm)

Reusable tests for POE::Loop authors
Dist-Zilla-Plugin-MakeMaker-Awesome-0.18 search.cpan.orgby Karen Etheridge at January 1, 1970, 1:00 am (cached at October 20, 2013, 10:01 pm)

A more awesome MakeMaker plugin for L