1.83K subscribers
3.3K photos
132 videos
15 files
3.58K links
Блог со звёздочкой.

Много репостов, немножко программирования.

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
#prog #rust #cpp #article

Can you have too many programming language features?

Bjarne Stroustrup famously said, “Within C++, there is a much smaller and cleaner language struggling to get out.” I think he regrets the quote, which he clarified is about the modern semantics of C++, held down by the outdated syntax of C. It’s such a compelling quote, though, because C++ is so messy and dirty, so we want to believe in a small clean underlying core.

The truth, however, is that there isn’t one smaller and cleaner programming language struggling to get out. There’s multiple. And from the beginning, C++ was a glomming-together of multiple ideas: a Simula-like OOP system glued awkwardly to C, without a unified motivating vision. Operator overloading was intended to help integrate the two parts, which it did but at the expense of creating its own entire sub-paradigm. And then came templates, which tried to add generic containers and algorithms but unexpectedly exploded into their own programming paradigm.

So inside C++, struggling to get out, is of course C, the original “portable assembly,” which does its very simple job well. There’s also Java/C# in there, if we take the OOP features on their own. For the operator overloading and RAII and templates, the closest I can really imagine is Rust, which I think if Bjarne was being fair, he would have to admit is close to what he specified when he clarified his quote: Rust does emphasize “programming styles, libraries and programming environments that emphasized the cleaner and more effective practices over archaic uses focused on the low-level aspects of C.”
👍1
😁171
Так раздражает, когда люди, которые не пользуются на постоянной основе растом критикуют его.

Не потому что раст идеален. Но потому что они критикуют его не за то. Они не знают настоящих проблем раста.
3💩1
Блог* pinned «#soc #article People don't work as much as you think (thanks @GabrielFallen)»
Блог* pinned «#prog #rust #моё Не могу пройти мимо и удержаться от похвал Rust. Однако перед этим всё же проведу небольшой эксперимент по поводу производительности алгоритмов в стандартной библиотеке Rust. Проверять будем при помощи такого кода: use rand::prelude::*;…»
Мета-#meme, всё, как я люблю
Forwarded from ОРУ, СЭР!
13😁6💩1
Каналы, которые не дают возможности поставить дизлайк, выглядят так жалко
👍41👎145💩4🤮2❤‍🔥1🤔1👌1🤣1
Если бы мне давали по доллару каждый раз, когда я кому-то снюсь и я об этом узнаю, у меня было бы два доллара. Это немного, но всё же странно, что это произошло дважды.
4👍2
🥰
🥰5❤‍🔥1👍1
#prog #cpp #article

(Not) detecting bugs

The following code contains a bug. A developer has spent quite some time looking for the source. The intent of this code is to iterate over two vectors simultaneously, from the first up to the one-before-last element. Thus the most interesting tools that will be employed will be boost::zip_iterator and std::prev. <...>

I have simplified the program to the minimum. I am using GCC 5.3. This code compiles fine, but when I run it, it goes on and on. In this post we will see where the bug is, but more importantly, we will look at why this bug has not been detected during the compilation, and wasted a fair deal of the developer’s time.
🤯3👍1
Я думал, это Панорама. На канале Пятница будет шоу "Отсидевшая в 16"
🥰3🤯3👎1
Блог* pinned «Как же хочется...»
#prog #rust

cargo-nono — инструмент для поиска зависимостей (и их фичей), которые не дают собрать проект в #![no_std]
👍6