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

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

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
Выходные прошли отлично. Вот только теперь я сейчас вернулся домой и мне экстра-грустно из-за того, что... Это всё завершилось?
😢9
Forwarded from 🌈 деформирующий кринж - профессиональный веб блог дипломированного специалиста басиста у жужки пузо пушисто (johann 🌼)
я скормил в цепи Маркова учебник Страуструпа по плюсам и лекции по философии постмодерна



- Это не одинокая сущность, ибо в таком случае программист либо добавит правильное объявление функции, либо включит его в одномерный контекст европейской метафизики.

- При этом система могла полностью переписываться на C, которая, в свою очередь, метафизика – на поддержке времени исполнения.

- Разумеется, STL содержит классы для отображений и списков и включает в качестве одного из главных его, постмодерна, отличительных черт.

- Технология сборки мусора усовершенствовалась, а многие из поборников полной совместимости с недоумением узнавали, что это выразимо, поэтому это осмысленно.

- Привязка концепции const к конструкторам была компромиссом между самой идеей const, соображением о том, как устроено человеческое мышление, в котором мы живем.
👍16😁5💩31
Блог*
Офигеть, впервые, кажется, из-за этого докопались
Вчера, кстати, тоже докопались. И угрозы были в духе "встретил бы тебя в своём районе — помог бы определиться". 😒
Forwarded from _| ̄|○
Але, фнс? У вас тут место под снапшоты редиски кончилось
🤣5
Блин, ненавижу болеть. Вроде всё норм (ну, насколько в принципе может быть нормально, когда болит горло), а потом р-р-раз! — и, словно по щелчку пальцев, слабость во всём теле
#prog #rust

Казалось бы, простое изменение — сделать специальную обработку случая Vec::insert, когда индекс равен длине — а выигрыш по производительности есть.

github.com/rust-lang/rust/pull/98755
🥴2
#prog #rust #rustlib

PGFPlots — a Rust library to generate publication-quality figures. This crate is a PGFPlots code generator, and provides utilities to create, customize, and compile high-quality plots.

Пример:

use pgfplots::axis::plot::Plot2D;

let mut plot = Plot2D::new();
plot.coordinates = (-100..100)
.into_iter()
.map(|i| (f64::from(i), f64::from(i*i)).into())
.collect();

plot.show()?;
👍6
#prog #rust #cpp #article

Building a Cloud Database from Scratch: Why We Moved from C++ to Rust

As an early-stage database startup, we entirely deleted our C++ codebase after 7 months of development and rewrote everything from scratch in Rust programming language. Here's how we arrived at a decision and why we think this was one of the best decisions ever.

---

> Since C++ is not a bad choice for building a database system, why did we rewrite the whole codebase again? Was it due to the same reason as the majority: it is cool? The answer is no; we decide to move to Rust after careful consideration.

---

> Rust can be challenging for beginners. But our interns proved otherwise. They picked up Rust within one or two weeks — even with no prior Rust/C++ expertise — because there are fewer implicit conversion and overload resolution rules to remember.

---

> Due to the conservative nature of Rust's static analyzer, we may encounter situations where only unsafe Rust can make the impossible possible. A classic example is creating a self-referential type. Or we must gain extra performance by unsafe, i.e., directly manipulating bits in a compacted memory representation. In either case, it is reasonable for skeptics to ask: will this make the codebase vulnerable? For RisingWave, empirically, no. Two major use cases are LRU cache and Bitmap, which take less than 200 lines out of 170000 lines of code in total.
🐳2👍1
👎1🐳1
Тем временем Windows встретила меня при запуске сообщением о том, что поддержка Windows 8.1 прекратится 10 января 2023 года. Без возможности бесплатно обновиться до версии поновее.

А, и ещё рекомендуют купить новый комп для Windows 11 — мол, без этого не будет нормально работать. В число минимальных системных требований входит TPM. Ага, отлично, чтобы на моём компе DRM без нареканий работал.

Идите нахер, мелкомягкие. Вместе со своим кривым сайтом, который ссылки на английской версии автоматически перенаправляет на русские, причём на общий раздел, а не на нужную страницу.
👎8👍71
#science

johnedchristensen.github.io/WebbCompare — сайт, на котором можно наглядно сравнить разницу в качестве снимков телескопов Hubble и Webb.

(thanks @bapho_bush)
🔥1
#prog #cpp #article

Concept archetypes

Concepts in the form added in C++20 used to be called lite. This is because they do not provide one quite important functionality: having the compiler check if the author of a constrained template is only using operations and types allowed by the constraining concept. In other words, we can say that our template only requires operations A and B to be valid, but we can still use some other operations inside and this is fine with the compiler. In this post we will show how this is problematic, even for programmers aware of the issue, and how to address it with 'concept archetypes'.
#prog #rust #rustlib #article

Gaffer: A prioritised micro-batch scheduler in rust

...I looked at existing schedulers but didn't find any which had features which allowed us to take advantage of these optimisation opportunities, so I took this as an opportunity to build a new scheduler and publish my first rust crate, deciding that it needed this set of features:

* Job enqueuing: jobs can be enqueued from other threads using a
Clone + Send sender.
* Recurring jobs: in case a job is not enqueued by some maximum timeout, a job can be automatically enqueued.
* Futures: other threads which enqueue jobs should be able to await the results.
* Prioritisation: the job queue is executed in priority, followed by submission order
* Job merging: any jobs with the same effect should be merged in the queue to avoid unnecessary load. This is probably the most important feature and it brings with it some extra challenges for the other features:
* merged jobs with differing priority levels must be merged into the highest priority level
* merged jobs with futures awaiting them need to awaken both with the result of the combined job, so the result needs to implement
Clone so that it can be provided to both.
* Parallel execution: multiple worker threads are processing the jobs
* Concurrent exclusion: but some jobs need to acquire some lock and so can't run at the same time as each other
* Priority throttling: and to leave capacity ready for higher priority jobs we can limit the number of threads which run the lower priority jobs.
🥰14👍21
Блог*
Какое покрытие полезнее?
Кстати, напоминаю про очень важный опрос