Блог*
Открыть в Telegram
Блог со звёздочкой. Много репостов, немножко программирования. Небольшое прикольное комьюнити: @decltype_chat_ptr_t Автор: @insert_reference_here
Больше1 987
Подписчики
-124 часа
-127 дней
+630 дней
Архив постов
1 987
А баг произошёл из-за того, что возвращаемое значение типа long сохранили в переменную типа int. И это, кстати, вполне себе ошибка, которую современные компиляторы легко ловят.
Позорище (и авторам glibc, и дилетантам Керниганну и Ритчи)
1 987
Repost from N/a
Интересный кейс подъехал: есть полезный сисколл copy_file_range, и если файловая система позволила принять через него запрос на копирование байтов больше, чем помещается в 32-битное число, то всё остальное будет забито нулями.
Если бы я хотел написать кликбейтный заголовок, то он бы выглядел так: "ZFS опять бьёт данные! Ну что за ненадёжная ФС!"
Вот только это баг в glibc, а ZFS (чуть ли не) единственная позволяет разом скопировать через данный сисколл сильно больше. К слову, фикс уже летит.
Будьте дети аккуратны с жирными операциями больше 32 бит.
1 987
#rust
Vitaly Reads: #3, August 2025
I’ve just completed reading an amazingly well-written book called “Refactoring to Rust” by Lily Mara and Joel Holmes, published recently by Manning Publications. I’m pretty sure that the book was supposed to be called “Rewrite it to Rust,” but then someone realized that this is already a meme, so it’d be too much. Yet, the goal is exactly that – to teach folks how to gradually introduce Rust components to their existing codebases written in C/C++, Java, Python, or JavaScript. Such a goal reflects the intended audience: developers in those languages with little or no knowledge of Rust. One interesting thing, though, is that even Rust professionals might find a lot of interesting details about Rust itself, especially if they are not experienced in such areas as FFI (Foreign Function Interface), Rust-Python interoperability, or WebAssembly – those are the key topics of the book.(thanks, разумеется, @bravit)
1 987
Repost from То шо нейросети
🗺 Как “слепая” LLM видит Землю
Чувак решил проверить, какую карту мира “держит в голове” Large Language Model, никогда напрямую не видевшая планету. Эксперимент прост, но изящен: для равномерно выбранных координат (lat/long) модель получает вопрос:
“If this location is over land, say ‘Land’. If this location is over water, say ‘Water’.”
Дальше берутся logprobs для токенов “Land” и “Water” и через softmax превращаются в вероятности. Так, точка за точкой, строится equirectangular-проекция «внутренней карты» модели.
🔍 Нюансы и находки:
• Масштаб имеет значение: от 500M параметров, где “всё суша”, до 1T+ параметров с узнаваемыми Африкой, Южной Америкой и даже Антарктидой.
• Instruction-tuning и MoE routing сильно влияют на результат — иногда разрушая, иногда улучшая “географическую память”.
• Мультимодальные модели пока не дают явного скачка качества — вероятно, их “зрение” ещё слишком грубое.
• У некоторых LLM формируются удивительно “гладкие” границы материков, что говорит не о запоминании карт, а о внутреннем представлении глобальных форм.
💡 Автор предполагает, что у моделей есть некий “Platonic Primitive Representation” планеты — абстрактная схема, проявляющаяся даже у относительно маленьких LLM.
Статья: https://outsidetext.substack.com/p/how-does-a-blind-model-see-the-earth
@toshoseti
1 987
#prog #rust #article
Can Rust prevent logic errors?
TL;DR: да, потому что в Rust есть для этого средства, которые отсутствуют в подавляющем большинстве мейнстримных ЯП. Автор, впрочем, сравнивает в основном с Ruby.
Предотвращаемые ошибки показаны с примерами на других ЯП.
1 987
Repost from лингвист реалист
Жизнь в Челябинске: "32 градуса? О нет, я умру, растаю... За что мне все это???"
Жизнь в Ереване: "Ну когда уже эти грёбаные 32 градуса? Хочется прохлады и свежести!"
1 987
Repost from AlexTCH
VS Code now has "AI settings search".
Yep, that's right, they use a freaking LLM to search in a code editor settings.
And they showcase in the release notes an example search for "increase text size" that returns font size settings. Are you sure that's a meaningful example? Do we really need an LLM to discover font size settings?
At any rate, did you consider simplifying freaking settings before implementing a LLM search through them?
1 987
Repost from AlexTCH
https://github.com/marimo-team/marimo
An alternative to good (not really) 'ol Jupyter Notebooks.
Looks promising. First of all, they solve the biggest Jupyter problem: stateful execution and thus dependence on the order of cell evaluation. The problem is so large they trained ML models to predict the correct evaluation order. I kid you not.
The solution is pretty common and straightforward: upon loading a file, build the Dataflow Graph, then re-run all the transitive dependencies upon a cell change. This also gives you the "reactive programming for free".
Reactive updates also give you a reactive UI (almost for free). Demos look pretty nice and useful:
https://marimo.io/p/@marimo/embedding-visualizer
And while we're at it, yeah they have a Web playground, and can convert notebooks into Web pages (also slides) out-of-the-box. Moreover, they can produce dynamic Web pages without a server employing WebAssembly. I haven't tried it, but if it works well, that's immensely useful.
Among other things, they store notebooks as valid Python files, which provides integration with Git and many other tools for free. They also integrate with package managers, especially
uv, and support per-project virtual environments out-of-the-box.
Additionally, they support DuckDB for running SQL queries, including on DataFrames. And implement nice UI to view, filter and summarize the results.
Overall, feels like a cool and handy, batteries included tool, alleviating a lot of Jupyter Notebooks quirks and letting you get your crap done quicker.