#rust
Increasing the glibc and Linux kernel requirements
TL;DR: с версии Rust 1.64.0 будут подняты минимальные требования для версий ядра Linux и glibc (как для компиляции, так и для запуска бинарей):
- glibc >= 2.11 ➡️ glibc >= 2.17
- ядро >= 2.6.32 ➡️ ядро >= 3.2
Учитывая, что обеим упомянутым старым версиям почти по десять лет, скорее всего, вас это не коснётся.
Increasing the glibc and Linux kernel requirements
TL;DR: с версии Rust 1.64.0 будут подняты минимальные требования для версий ядра Linux и glibc (как для компиляции, так и для запуска бинарей):
- glibc >= 2.11 ➡️ glibc >= 2.17
- ядро >= 2.6.32 ➡️ ядро >= 3.2
Учитывая, что обеим упомянутым старым версиям почти по десять лет, скорее всего, вас это не коснётся.
❤2
#prog #rust #rustasync #article
Fixing the Next Thousand Deadlocks: Why Buffered Streams Are Broken and How To Make Them Safer
<...> Last month, our service was brought down for days by a nasty deadlock bug, and this isn’t the first deadlock we’ve seen - it’s at least the fourth. And just last week, we saw yet another deadlock-induced outage. Fortunately, four of the five deadlocks (including the most recent two) have the same root cause -
<...>
If there’s one lesson from decades of software engineering, it is the failure of “just be careful” as a strategy. C/C++ programmers still experience memory corruption constantly, no matter how careful they are. Java programmers still frequently see
As shown by the fact that we keep seeing new deadlock bugs, despite our best efforts to avoid them, “just be careful” is not a strategy that can avoid this kind of bug in nontrivial codebases. We need some way to statically eliminate the issue.
P. S.:
> I am fortunate enough to work on a production Rust service (a real one, not cryptocurrency nonsense)
Ке-ке-ке
Fixing the Next Thousand Deadlocks: Why Buffered Streams Are Broken and How To Make Them Safer
<...> Last month, our service was brought down for days by a nasty deadlock bug, and this isn’t the first deadlock we’ve seen - it’s at least the fourth. And just last week, we saw yet another deadlock-induced outage. Fortunately, four of the five deadlocks (including the most recent two) have the same root cause -
futures::stream::Buffered
is inherently prone to deadlocks. In this post, I will explain the issue and explore ways to prevent this from happening again.<...>
If there’s one lesson from decades of software engineering, it is the failure of “just be careful” as a strategy. C/C++ programmers still experience memory corruption constantly, no matter how careful they are. Java programmers still frequently see
NullPointerException
s, no matter how careful they are. And so on. One of the reasons that Rust is so successful is that it adds automated checks to prevent many common mistakes.As shown by the fact that we keep seeing new deadlock bugs, despite our best efforts to avoid them, “just be careful” is not a strategy that can avoid this kind of bug in nontrivial codebases. We need some way to statically eliminate the issue.
P. S.:
> I am fortunate enough to work on a production Rust service (a real one, not cryptocurrency nonsense)
Ке-ке-ке
Considerations on Codecrafting
Fixing the Next Thousand Deadlocks: Why Buffered Streams Are Broken and How To Make Them Safer
I am fortunate enough to work on a production Rust service (a real one, not cryptocurrency nonsense). Rust virtually eliminates the kinds of stupid bugs and gotchas that are endemic in other languages, making it much easier to develop and maintain our project.…
Forwarded from Neural Shit
У нас тут новые статьи в нейроуголовном кодексе. Помните, что незнание правил не освобождает от ответственности.
>>Статья 93.Неосторожная генитальная стимуляция при прослушивании рок- музыки.
>>Статья 54.Изменение внешности путем подмены человеческих лиц собачьими и свиными
>>Статья 129.Перманентное обивание порогов власти.
>>Статья 348.Незаконные переговоры с дьяволом, инфернальной силой, исчадиями ада, укурками, с немецким Гитлером, западной демократией
>>Статья 451.Нежелание разъяснить своим детям смысл происходящих в стране событий
>>Статья 144.Бегство из Москвы в волчьем облике
>>Статья 874.Мобилизация падших женщин для продолжения рода оборотней.
>>Статья 443.Отказ от предложенной водки.
>>Статья 113.Пытки, вызываемые щекотанием и игрой на музыкальных инструментах.
>>Статья 82.Перемещение отрицательной энергии, заблокированной кармой.
>>Статья 65.Подражание Джордано Бруно
>>Статья 398.Превращение людей в полулюдей-полукошек
>>Статья 127.Использование младенца (зачатого под влиянием гипноза) в качестве Цукерберга
>>Статья 93.Неосторожная генитальная стимуляция при прослушивании рок- музыки.
>>Статья 54.Изменение внешности путем подмены человеческих лиц собачьими и свиными
>>Статья 129.Перманентное обивание порогов власти.
>>Статья 348.Незаконные переговоры с дьяволом, инфернальной силой, исчадиями ада, укурками, с немецким Гитлером, западной демократией
>>Статья 451.Нежелание разъяснить своим детям смысл происходящих в стране событий
>>Статья 144.Бегство из Москвы в волчьем облике
>>Статья 874.Мобилизация падших женщин для продолжения рода оборотней.
>>Статья 443.Отказ от предложенной водки.
>>Статья 113.Пытки, вызываемые щекотанием и игрой на музыкальных инструментах.
>>Статья 82.Перемещение отрицательной энергии, заблокированной кармой.
>>Статья 65.Подражание Джордано Бруно
>>Статья 398.Превращение людей в полулюдей-полукошек
>>Статья 127.Использование младенца (зачатого под влиянием гипноза) в качестве Цукерберга
👍6🤔1💩1
#prog #game #article
Factorio Is The Best Technical Interview We Have (перевод, но его качество в комментариях ругают)
There's been a lot of hand-wringing over The Technical Interview lately. Many people realize that inverting a binary tree on a whiteboard has basically zero correlation to whether or not someone is actually a good software developer. The most effective programming test anyone's come up with is still Fizzbuzz. One consequence of this has been an increased emphasis on Open Source Contributions, but it turns out these aren't a very good metric either, because most people don't have that kind of time.
The most effective programming interview we have now is usually some kind of take-home project, where a candidate is asked to fix a bug or implement a small feature within a few days. This isn't great because it takes up a lot of time, and they could recieve outside help (or, if the feature is sufficiently common, google it). On the other hand, some large companies have instead doubled-down on whiteboard style interviews by subjecting prospective engineers to multiple hour-long online coding assessments, with varying levels of invasive surveillience.
All these interviewing methods pale in comparison to a very simple metric: playing Factorio with someone. Going through an entire run of Factorio is almost the best possible indication of how well someone deals with common technical problems. You can even tweak the playthrough based on the seniority of the position you're hiring for to get a better sense of how they'll function in that role.
Factorio Is The Best Technical Interview We Have (перевод, но его качество в комментариях ругают)
There's been a lot of hand-wringing over The Technical Interview lately. Many people realize that inverting a binary tree on a whiteboard has basically zero correlation to whether or not someone is actually a good software developer. The most effective programming test anyone's come up with is still Fizzbuzz. One consequence of this has been an increased emphasis on Open Source Contributions, but it turns out these aren't a very good metric either, because most people don't have that kind of time.
The most effective programming interview we have now is usually some kind of take-home project, where a candidate is asked to fix a bug or implement a small feature within a few days. This isn't great because it takes up a lot of time, and they could recieve outside help (or, if the feature is sufficiently common, google it). On the other hand, some large companies have instead doubled-down on whiteboard style interviews by subjecting prospective engineers to multiple hour-long online coding assessments, with varying levels of invasive surveillience.
All these interviewing methods pale in comparison to a very simple metric: playing Factorio with someone. Going through an entire run of Factorio is almost the best possible indication of how well someone deals with common technical problems. You can even tweak the playthrough based on the seniority of the position you're hiring for to get a better sense of how they'll function in that role.
Erik McClure
Factorio Is The Best Technical Interview We Have
There’s been a lot of hand-wringing over The Technical Interview lately. Many people realize that inverting a binary tree on a whiteboard has basically zero correlation to whether or not someone is actually a good software developer. The most effective programming…
👍10🤔1
#prog #sql #article
A Formalization of SQL with Nulls (pdf)
SQL is the world’s most popular declarative language, forming the basis of the multi-billion-dollar database industry. Although SQL has been standardized, the full standard is based on ambiguous natural language rather than formal specification. Commercial SQL implementations interpret the standard in different ways, so that, given the same input data, the same query can yield different results depending on the SQL system it is run on. Even for a particular system, mechanically checked formalization of all widely-used features of SQL remains an open problem. The lack of a well-understood formal semantics makes it very difficult to validate the soundness of database implementations. Although formal semantics for fragments of SQL were designed in the past, they usually did not support set and bag operations, lateral joins, nested subqueries, and, crucially, null values. Null values complicate SQL’s semantics in profound ways analogous to null pointers or side-effects in other programming languages. Since certain SQL queries are equivalent in the absence of null values, but produce different results when applied to tables containing incomplete data, semantics which ignore null values are able to prove query equivalences that are unsound in realistic databases. A formal semantics of SQL supporting all the aforementioned features was only proposed recently. In this paper, we report about our mechanization of SQL semantics covering set/bag operations, lateral joins, nested subqueries, and nulls, written in the Coq proof assistant, and describe the validation of key metatheoretic properties. Additionally, we are able to use the same framework to formalize the semantics of a flat relational calculus (with null values), and show a certified translation of its normal forms into SQL.
(thanks @daily_ponv)
Пара моментов:
В этой формализации не рассматриваются операции агрегирования и группировки.
Семантика, построенная для их формализации SQL, параметризована используемой логикой. Она может быть классической булевой (двухзначной) или же трёхзначной, как в SQL. В статье авторы показывают, что трёхзначность логики на самом деле не добавляет выразительности: они доказывают (конструктивно), что для любого запроса в трёхзначной логике есть эквивалентный в смысле семантики запрос, работающий в двухзначной логике. Обратное тоже верно.
---
Вообще, на мой взгляд, это какая-то дичь, что оптимизаторы запросов в БД до сих пор делают, не утруждаясь доказательствами корректности преобразований запросов.
A Formalization of SQL with Nulls (pdf)
SQL is the world’s most popular declarative language, forming the basis of the multi-billion-dollar database industry. Although SQL has been standardized, the full standard is based on ambiguous natural language rather than formal specification. Commercial SQL implementations interpret the standard in different ways, so that, given the same input data, the same query can yield different results depending on the SQL system it is run on. Even for a particular system, mechanically checked formalization of all widely-used features of SQL remains an open problem. The lack of a well-understood formal semantics makes it very difficult to validate the soundness of database implementations. Although formal semantics for fragments of SQL were designed in the past, they usually did not support set and bag operations, lateral joins, nested subqueries, and, crucially, null values. Null values complicate SQL’s semantics in profound ways analogous to null pointers or side-effects in other programming languages. Since certain SQL queries are equivalent in the absence of null values, but produce different results when applied to tables containing incomplete data, semantics which ignore null values are able to prove query equivalences that are unsound in realistic databases. A formal semantics of SQL supporting all the aforementioned features was only proposed recently. In this paper, we report about our mechanization of SQL semantics covering set/bag operations, lateral joins, nested subqueries, and nulls, written in the Coq proof assistant, and describe the validation of key metatheoretic properties. Additionally, we are able to use the same framework to formalize the semantics of a flat relational calculus (with null values), and show a certified translation of its normal forms into SQL.
(thanks @daily_ponv)
Пара моментов:
В этой формализации не рассматриваются операции агрегирования и группировки.
Семантика, построенная для их формализации SQL, параметризована используемой логикой. Она может быть классической булевой (двухзначной) или же трёхзначной, как в SQL. В статье авторы показывают, что трёхзначность логики на самом деле не добавляет выразительности: они доказывают (конструктивно), что для любого запроса в трёхзначной логике есть эквивалентный в смысле семантики запрос, работающий в двухзначной логике. Обратное тоже верно.
---
Вообще, на мой взгляд, это какая-то дичь, что оптимизаторы запросов в БД до сих пор делают, не утруждаясь доказательствами корректности преобразований запросов.
Paperswithcode
Papers with Code - A Formalization of SQL with Nulls
SQL is the world's most popular declarative language, forming the basis of the multi-billion-dollar database industry. Although SQL has been standardized, the full standard is based on ambiguous natural language rather than formal specification. Commercial…
👍2
Forwarded from Generative Anton
Cмотрим на красную точку 30 секунд не отрываясь и очень пристально, а потом переводим взгляд на стену и начинаем быстро моргать.
Работает это из-за перенасыщения одной группы цветовых рецепторов в глазу (сине-желтые) и синие перенасыщаются, а желтые -- нет. Вот тут описание феномена: https://www.verywellmind.com/what-is-an-afterimage-2795828
Когда решал соревнование с саккадами, то столько нового узнал про зрение. Там костыль на костыле. Хуже чем в любом продакшне.
Работает это из-за перенасыщения одной группы цветовых рецепторов в глазу (сине-желтые) и синие перенасыщаются, а желтые -- нет. Вот тут описание феномена: https://www.verywellmind.com/what-is-an-afterimage-2795828
Когда решал соревнование с саккадами, то столько нового узнал про зрение. Там костыль на костыле. Хуже чем в любом продакшне.
👍3
Резидент «Сколково» создал замену популярного во всём мире британского компьютера Raspberry Pi — и назвал её Repka Pi.
Примечательно, что предзаказы принимают уже сейчас (причём исключительно через форму заказа, без указанной цены), а степень готовности — "Подготовка начала производства".
Ы - ымпортозамещение.
Примечательно, что предзаказы принимают уже сейчас (причём исключительно через форму заказа, без указанной цены), а степень готовности — "Подготовка начала производства".
Ы - ымпортозамещение.
sk.ru
Резидент «Сколково» создал замену популярного во всём мире
Запуск производства нового отечественного малогабаритного одноплатного компьютера готовится в октябре 2022 года. Российскую версию продукта
🤡13😁2
#prog #gamedev #article
Cramming 'Papers, Please' Onto Phones (перевод)
Статья от автора 'Papers, Pleaze' о том, как он портировал игру на мобильные устройства и о том, на какие сложности он наткнулся: как технические, так и куда как более значительные интерфейсные.
P. S.: Слава Арстоцке!
Cramming 'Papers, Please' Onto Phones (перевод)
Статья от автора 'Papers, Pleaze' о том, как он портировал игру на мобильные устройства и о том, на какие сложности он наткнулся: как технические, так и куда как более значительные интерфейсные.
P. S.: Слава Арстоцке!
Dukope
Cramming 'Papers, Please' Onto Phones
I created Papers, Please in 2013 specifically for desktop computers with mouse control. Now, here, in 2022, desktop computers no longer exist and all computing is done via handheld mobile telephone. Time to update this dinosaur.
These thousands of words and…
These thousands of words and…
🔥6❤1👍1
#prog #gamedev #article
Localizing Papers, Please (часть 1, часть 2)
(разбито на две части из-за ограничений tumblr на размер постов)
Localizing Papers, Please (часть 1, часть 2)
(разбито на две части из-за ограничений tumblr на размер постов)
Tumblr
Localizing Papers, Please
Papers, Please was released on August 8th, 2013 without multilingual support. Even though it would've been great to support other languages besides English, I decided to push that work until after th…
🔥4👍1
Forwarded from мне не нравится реальность
Там кстати Rust 1.63 вышел. TL;DR интересного (по моему мнению):
— из компилятора выкинули старый borrowck (я так и не понял что это меняет)
—
— турборыбу можно использовать для дженериков в функциях с APIT [1]
—
— std теперь поддерживает nintendo 3DS 👀
—
—
—
— Стабилизорована / const-ифицирована куча функций (мне лень их все перечислять) (кстати к некоторым я приложил лапки), в том числе стабилизировали scoped треды (!!!), более безопасные типы для работы с платформо зависимым IO и
— Добавили в документацию заметку про то, что safety гарантии раста никак не защищают от
[blog] [github release]
[1]: это позволяет делать такое:
[2]: Termination это трейт для типов, которые можно вернуть из
— из компилятора выкинули старый borrowck (я так и не понял что это меняет)
—
[x; 0]
теперь дропает x
(ранее был баг из-за которого это было эквивалентно mem::forget
)— турборыбу можно использовать для дженериков в функциях с APIT [1]
—
null
и null_mut
теперь работают с extern типами— std теперь поддерживает nintendo 3DS 👀
—
write!
/print!
теперь дропают tmp раньше—
Layout
теперь реализует Hash
— needs_drop
теперь работает для не Sized
типов—
Termination
теперь реализован для большего количества типов [2]— Стабилизорована / const-ифицирована куча функций (мне лень их все перечислять) (кстати к некоторым я приложил лапки), в том числе стабилизировали scoped треды (!!!), более безопасные типы для работы с платформо зависимым IO и
Mutex::new
в const
контексте— Добавили в документацию заметку про то, что safety гарантии раста никак не защищают от
/proc/self/mem
— У коллекций улучшена документация на счёт того, что происходит при логических ошибках (например в реализации Ord
)[blog] [github release]
[1]: это позволяет делать такое:
fn f<T>(f: impl FnOnce() -> T) { ... }
f::<u32>(|| 0);
раньше ::<u32>
было нельзя писать из-за impl Trait
в аргументах. сам APIT
явно задать нельзя, но это может быть и плюсом, когда явно хочется задать только другие параметры.[2]: Termination это трейт для типов, которые можно вернуть из
main
. В этом релизе добавили реализации для Infallible
и Result<impl Termination, impl Debug>
(ранее можно было возвращать только Result<(), _>
, Result<!, _>
и Result<Infallible, _>
).🎉6