singalen: (Default)
Если std::ifstream(char* ) рушится сам по себе - это убеждает в правоте автора C++ FQA.
singalen: (freeman)
Кто подскажет библиотеку для персистентной мемоизации на C++?
Чтобы один раз сохранить мемоизированные таблицы, потом прочитать...

Я нашёл:
* предложение на мейллисте Буста от Jim Apple,
* статью в Dr. Dobb's-е;
* это: http://blogs.msdn.com/b/vcblog/archive/2008/11/18/stupid-lambda-tricks.aspx
* это: http://cplusplus.co.il/2010/01/07/memoization/

но ничего персистентного.

Пока ухватил последнее.
Tags:
singalen: (Default)
Если кто не бывает в нашей уютной рассылке...
Вот как это выглядит в po-файле (файле локализуемых ресурсов). Я сам узнал, только когда занялся переводом.

Для русского:
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
...
msgid "year"
msgid_plural "years"
msgstr[0] "%i год"
msgstr[1] "%i года"
msgstr[2] "%i лет"


И функция:
char * ngettext (const char *msgid1, const char *msgid2, unsigned long int n)

Соответственно, код не зависит от количества и структуры множественных чисел в языке.
Tags:
singalen: (hope_never_dies)
Беседовали с [livejournal.com profile] gabriel_irk. Я пожаловался, что CDT (C++ для Eclipse) делают уже пять лет, а рефакторинга всё, считай, нет. Это для самого популярного языка.
В версии 5.0 главный по Фаулеру барьёр, extract method, взят!
Два дня назад :))
Браво, CDT team!

Помянули плагин для Эйфеля. Там есть подсветка синтаксиса, folding, code snippets и, считай, всё. С 2005-го года плагин мёртв. Гэбриэл говорит, что IDE для Eiffel надо искать в Eiffel Studio.
Tags:
singalen: (Default)

Originally published at Fiberglass flowers. You can comment here or there.

Did you ever try parsing C++? What about parsing for every combination of possible define-s at once?

Microsoft has a static code checker tools for C++, like FxCop for .NET.

That’s awfully complex task, you now see. In .NET you can analyze bytecode, and luckily don’t really need to account for conditional compilation. In C++ where everthing is about #ifdef - it’s hell.

I never heared of anything like that. Though Insure++ or AQTime do way more things when profiling runtime, they of course find only things that were on necessary execution paths.

Tags: