Larry is a fruit cake, a nut job, crazy as a loon, batty as a belfry.

Perl was created by Larry Wall. Smart guy. Has some broken mental models, but he’s smart.
Every language designer screws up now and then. No exceptions. Gosling says he got the precedence of some Java operators wrong. if (!(that’s instanceof Understatement)), I don’t know what is. McCarthy frets about all the parens in let clauses. As if those are the only ones to fret about. And Guido has been known to physically murder people who complain about Python’s syntactic whitespace.

Perl also has “contexts”, which means that you can’t trust a single line of Perl code that you ever read. Every operator in Perl (not just the Range operator) has six different behaviors depending on the invisible context in which its surrounding expression is being evaluated.

@x = (1, 2, 3, (4, 5));
It automagically turns into (1, 2, 3, 4, 5). Convenient, eh? Sure it is. If you want to be your own father’s sister, it’s extremely convenient.

It’s especially advantageous if you want to collapse the entire universe into a single electron, since that’s about all you can do with it.

Oops! Oh yeah, right. Trees. Graphs. Object models. Window systems. Company organizations. Relationships. Meaning and semantics. Heirarchical knowledge representation. Gosh. Forgot all about those. Whoops.

Like any well-designed system, Perl of course has hundreds of global variables. They’re typically two characters long, the first of which is a dollar-sign, and the second of which is either an ASCII character or a Unicode character. Changing the value of any one of these hundreds of variables changes the meaning of at least 10% of the lines of code in your code base. One can only speculate as to what $ξ does, or $葉 for that matter. I’m sure it’s in the docs somewhere.

I chatted with him afterwards about list flattening, and mentioned that it was the root of all evil. He was a bit taken aback, and said they weren’t planning on changing that feature. I read recently that they’ve decided to change it after all; you’ll have to set some godawful global variable, possibly dollar-unicode-chinese-horse-symbol, to turn on auto-list flattening.


Тут ещё много прекрасного.
Однозначный Эпик Вин.

SUPER-UX Xlib Programming Manual

Нашел убермегабук об xlib.
SUPER-UX Xlib Programming Manual.

Обычный xlib programming manual - тупая перепечатка манов.
Здесь-же временами рассказывают, что вообще происходит и, что с этим делать.

Весьма доставляет.

restful?

С одной стороны хочется сделать некий сцайт restful.
Но, не каждый посетитель может апдейтить контент, сиё задача одного-двух доверенных людей.
И при этом административный xhtml и юзерский естественно кардинально различаються.
Но дублировать ресуры вроде: юзерский ресурс articles - админский articles не хочеться.
Пока в голову приходит только отдача разного представления (сиречь xhtml) для аутентифицированых и нет запросов.

Но что-то меня гложет, не wtf-ли это?

gobby

Потестил gobby (0.4.1).


Желание проверить что такое “многопользовательский текстовый редактор” настигло часа в два ночи и единственный язык который знали мы с партнёром оказался похапеньчик, но выбирать не приходилось )

хозяйке на заметку - показываем pil изображения в gtk, ревизия вторая.

Код из предыдущего поста умеет грузить только rgb.
GdkPixbuf умеет раборать только с rgb изображениями, а pil умеет сериалайзиться только в raw дамп картинки, поэтому наверное единственный способ - сохранить Pil изображение в rgb(a) и загрузить его через GdkPixbufLoader.
def pil_to_pixbuf(pil):
        buff = cStringIO.StringIO()
        pil.save(buff, ‘BMP’)
        buff.seek(0)
        loader = gtk.gdk.PixbufLoader()
        loader.write(buff.read())
        loader.close()
        return loader.get_pixbuf()

Немного преректально, но работает.

хозяйке на заметку - показываем pil изображения в gtk.

45loc )

Pattern Hatching

Почитываю перевод Pattern hatching, дополз до него наконец-то.
Хотя чуть-ли не год назад именно я его в широкий паблик и выложил :D.

Попадаются пёрлы вроде “у Мака Файндера” (бедный Finder) и “многие обьекты могут оказаться запрещенными”.
Но в целом читается легко и интересно, вроде пока-что без глобальных косяков.

фшокке

Только что узнал, что python обьекты могут на ходу менять класс.

для программстов стоило-бы завести отдельный ад.

И сгонять туда всех (говно|быдло)кодеров.
Что-бы сгонять значитсо туда всех этих уродцев и заставлять отлаживать свои творения переписанные, ну хотя-бы на брэйнфак.