Forwarded from oleg_log (Oleg Kovalov)
Тут Денис в лс принёс отличный сборник советов и сниппетов для Github Actions. Так сказать выстраданно миграциями с Travis.
Звездочка и ПР приветствуются!
https://github.com/yengoteam/awesome-gha-snippets
Звездочка и ПР приветствуются!
https://github.com/yengoteam/awesome-gha-snippets
GitHub
GitHub - yengoteam/awesome-gha-snippets: 🤯 A list of useful snippets and tips for GitHub Actions (GHA).
🤯 A list of useful snippets and tips for GitHub Actions (GHA). - yengoteam/awesome-gha-snippets
Уже в который раз "теряю" свои наушники только для того, чтобы найти их на своей шее -_-
Причём это не какие-то затычки, а полноценные наушники с толстой дужкой, которые закрывают уши
Причём это не какие-то затычки, а полноценные наушники с толстой дужкой, которые закрывают уши
#prog #c #cpp #article
Свод правил, которые надо иметь в виду при написании кода с целочисленной арифметикой на C и C++. Если коротко, то их дофига.
Статья
Перевод на Хабре
Свод правил, которые надо иметь в виду при написании кода с целочисленной арифметикой на C и C++. Если коротко, то их дофига.
Статья
Перевод на Хабре
Хабр
Свод правил по работе с целыми числами в C/C++
В основу статьи легли мои собственные выработанные нелегким путем знания о принципах работы и правильном использовании целых чисел в C/C++. Помимо самих правил,...
#prog #rust #abnormalprogramming
Умные указатель с семантикой
Why?
* Biggest issue facing $125 billion security industry: Memory safety.
* "~70% of the vulnerabilities addressed through a security update each year continue to be memory safety issues." - Microsoft Security Response Center
* The world's largest codebases are written in C++
* Browsers, operating systems, databases, financial systems
* C++ memory management is hard to understand, opaque, and not secure
* As we all know, adding blockchain to a problem automatically makes it simple, transparent, and cryptographically secure.
* Thus, we extend
* Non-Fungible Tokens and
* each token/object is unique, not fungible with other tokens/objects
* each token/object is owned by one owner/unique_ptr
* others may view the NFT/use the object, but only the owner can transfer/destroy the NFT/object.
* absolutely no protection against just pirating the image represented by the NFT/copying the pointer out of the unique_ptr
* Written in Rust for the hipster cred.
* Made with 💖 by a Blockchain Expert who wrote like 100 lines of Solidity in 2017 (which didn't work)
github.com/zhuowei/nft_ptr
Умные указатель с семантикой
std::unique_ptr
, который хранит объекты в виде NFT-токенов.Why?
* Biggest issue facing $125 billion security industry: Memory safety.
* "~70% of the vulnerabilities addressed through a security update each year continue to be memory safety issues." - Microsoft Security Response Center
* The world's largest codebases are written in C++
* Browsers, operating systems, databases, financial systems
* C++ memory management is hard to understand, opaque, and not secure
* As we all know, adding blockchain to a problem automatically makes it simple, transparent, and cryptographically secure.
* Thus, we extend
std::unique_ptr
, the most popular C++ smart pointer used for memory management, with blockchain support* Non-Fungible Tokens and
std::unique_ptr
have the exact same semantics:* each token/object is unique, not fungible with other tokens/objects
* each token/object is owned by one owner/unique_ptr
* others may view the NFT/use the object, but only the owner can transfer/destroy the NFT/object.
* absolutely no protection against just pirating the image represented by the NFT/copying the pointer out of the unique_ptr
* Written in Rust for the hipster cred.
* Made with 💖 by a Blockchain Expert who wrote like 100 lines of Solidity in 2017 (which didn't work)
github.com/zhuowei/nft_ptr
GitHub
GitHub - zhuowei/nft_ptr: C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain
C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain - zhuowei/nft_ptr
#prog #rust #rustlib
Библиотека pretty_sure — макрос
Библиотека pretty_sure — макрос
sure
, являющийся обобщением unwrap{, _or}
для произвольных паттернов.docs.rs
pretty_sure::sure - Rust
API documentation for the Rust `sure` macro in crate `pretty_sure`.
На меня навесили спам-лимит. На этот раз — на три дня.
Кто пожаловался — разумеется, не ясно. За что? А фиг его знает.
Паша, какого хрена.
Кто пожаловался — разумеется, не ясно. За что? А фиг его знает.
Паша, какого хрена.
#prog #python #suckassstory
Как свалить интерпретатор Python с
Баг заведён в ноябре 2019 и до сих пор не разрешён.
Как свалить интерпретатор Python с
SyntaxError
? Один из способов — это просто написать достаточно длинную строку юникодных символов. Если строка не влезает в буфер фиксированного размера, используемый в парсере, она может быть обрезана внутри мультибайтового символа, что позднее вызовет ошибку из-за невалидной Unicode-строки.Баг заведён в ноябре 2019 и до сих пор не разрешён.
Обзор конференции SIGBOVIK-2021 от Жалких низкочастотников
Telegram
Жалкие низкочастотники
Не так давно прошёл SIGBOVIK-2021 (пародийная научная конференция в Carnegie Mellon University, о которой я уже писал и даже как-то публиковался на ней). Труды можно почитать тут, а вот здесь есть twitch-стрим с докладов. В этом году году, как обычно, среди…
#prog #haskell
Товарищ Мёртвопищ написал небольшую библиотеку для облегчения кастомизации (де)сериализации, реализованных при помощи тайпклассов Binary (того, который базируется на Generic).
github.com/0xd34df00d/binary-generic-combinators
Товарищ Мёртвопищ написал небольшую библиотеку для облегчения кастомизации (де)сериализации, реализованных при помощи тайпклассов Binary (того, который базируется на Generic).
github.com/0xd34df00d/binary-generic-combinators
GitHub
GitHub - 0xd34df00d/binary-generic-combinators: Combinators and utilities to make Generic-based deriving of Binary easier and more…
Combinators and utilities to make Generic-based deriving of Binary easier and more expressive - GitHub - 0xd34df00d/binary-generic-combinators: Combinators and utilities to make Generic-based deriv...