#prog #rust
cargo careful: run your Rust code with extra careful debug checking
Или лёгкий способ запустить программу с отладочными ассертами в std.
cargo careful: run your Rust code with extra careful debug checking
Или лёгкий способ запустить программу с отладочными ассертами в std.
www.ralfj.de
cargo careful: run your Rust code with extra careful debug checking
Did you know that the standard library is full of useful checks that users never get to see? There are plenty of debug assertions in the standard library that will do things like check that...
👍4
#prog #rust #rustasync #article
How (and why) nextest uses tokio, part 1
Или хороший пример того, как async может пригодиться в программе, которая вообще никак не связана с общением по сети.
How (and why) nextest uses tokio, part 1
Или хороший пример того, как async может пригодиться в программе, которая вообще никак не связана с общением по сети.
How (and why) nextest uses tokio
How (and why) nextest uses tokio ꞏ sunshowers
How my open source test runner uses async Rust.
🔥2
#prog #rust #article
Brute forcing protected ZIP archives in Rust
Комментарии к статье на Reddit едва ли не ценнее самой статьи. Спойлер: на rayon и проще, и быстрее.
Brute forcing protected ZIP archives in Rust
Комментарии к статье на Reddit едва ли не ценнее самой статьи. Спойлер: на rayon и проще, и быстрее.
agourlay.github.io
Brute forcing protected ZIP archives in Rust
Yet another programming blog
🤔23👎12😢1
#prog #c #article
Type Punning Functions in C
Type Punning Functions in C
#include <math.h>
#include <stdio.h>
double DoubleToTheInt(double base, int power) {
return pow(base, power);
}
int main() {
// cast to a function pointer with arguments reversed
double (*IntPowerOfDouble)(int, double) =
(double (*)(int, double))&DoubleToTheInt;
// prints 0.366032
printf("(0.99)^100: %lf \n", DoubleToTheInt(0.99, 100));
// also prints 0.366032
printf("(0.99)^100: %lf \n", IntPowerOfDouble(100, 0.99));
}
www.evanmiller.org
Type Punning Functions in C – Evan Miller
🤔4👍3🤮1
Forwarded from Врен о Японии для туриста
Арочный мост Кинтай - главная достопримечательность японского города Ивакуни. Он был построен еще в 1673 году и до сих пор выглядит (почти) как при самураях.
До отказа от феодального строя, кстати, только самураям и разрешалось ходить по ценному мосту - и так приходилось чинить его слишком часто. Крестьяне переправлялись через реку на лодках.
До отказа от феодального строя, кстати, только самураям и разрешалось ходить по ценному мосту - и так приходилось чинить его слишком часто. Крестьяне переправлялись через реку на лодках.
🔥3
мне не нравится реальность
Все же уже слышали про новый формат QOI (quite ok image format, qoiformat.org), который lossless сжимает картинки +- так же хорошо, как PNG, но при этом в 20-50 раз быстрее, а его спецификация умещается на одну страницу? Хотели бы кодинг стрим где я бы подумал…
#prog #haskell #article
ТоварищМёртвопищ 0xd34df00d написал декодер и енкодер QOI на хаскелле. И весьма быстрые.
Haskell is quite OK for images: decoding QOI
Haskell is quite OK for images: encoding QOI
Товарищ
Haskell is quite OK for images: decoding QOI
Haskell is quite OK for images: encoding QOI
❤6👍3😁2🤯2
#prog #abnormalprogramming (#evenmoreabnormalprogramming?)
Вероятно, многие мои читатели уже знают про movfuscator:
The M/o/Vfuscator (short 'o', sounds like "mobfuscator") compiles programs into "mov" instructions, and only "mov" instructions. Arithmetic, comparisons, jumps, function calls, and everything else a program needs are all performed through mov operations; there is no self-modifying code, no transport-triggered calculation, and no other form of non-mov cheating.
Так вот, оказывается, как средство обфускации этот проект не так уж и надёжен: есть Demovfuscator
This tool constitutes a generic way of recovering the control flow of the original program from movfuscated binaries. As our approach makes zero assumptions about register allocations or a particular instruction order, but rather adheres to the high-level invariants that each movfuscated binary needs to conform to, our demovfuscator is also not affected by the proposed hardening techniques such as register renaming and instruction reordering. To achieve this, we use a combination of static taint analysis on the movfuscated code and a satisfiable modulo theory (SMT) solver. We successfully used our demovfuscator against several movfuscated binaries that emerged during several CTFs during the last months (Hackover CTF and 0CTF) proving that it already can handle real-world binaries that were not created by us.
(thanks @vitvakatu)
Вероятно, многие мои читатели уже знают про movfuscator:
The M/o/Vfuscator (short 'o', sounds like "mobfuscator") compiles programs into "mov" instructions, and only "mov" instructions. Arithmetic, comparisons, jumps, function calls, and everything else a program needs are all performed through mov operations; there is no self-modifying code, no transport-triggered calculation, and no other form of non-mov cheating.
Так вот, оказывается, как средство обфускации этот проект не так уж и надёжен: есть Demovfuscator
This tool constitutes a generic way of recovering the control flow of the original program from movfuscated binaries. As our approach makes zero assumptions about register allocations or a particular instruction order, but rather adheres to the high-level invariants that each movfuscated binary needs to conform to, our demovfuscator is also not affected by the proposed hardening techniques such as register renaming and instruction reordering. To achieve this, we use a combination of static taint analysis on the movfuscated code and a satisfiable modulo theory (SMT) solver. We successfully used our demovfuscator against several movfuscated binaries that emerged during several CTFs during the last months (Hackover CTF and 0CTF) proving that it already can handle real-world binaries that were not created by us.
(thanks @vitvakatu)
GitHub
GitHub - xoreaxeaxeax/movfuscator: The single instruction C compiler
The single instruction C compiler. Contribute to xoreaxeaxeax/movfuscator development by creating an account on GitHub.
🔥7🤯3😁1
Forwarded from Меня заставили создать канал
GitHub Copilot ленится по пятницам.
Это он, если что, после сигнатуры гордо дописал мне // TODO.
Это он, если что, после сигнатуры гордо дописал мне // TODO.
😁14
#prog #bash #abnormalprogramming
TickTick enables you to put JSON in bash scripts. Yes, just encapsulate them with two back-ticks.
github.com/kristopolous/TickTick
TickTick enables you to put JSON in bash scripts. Yes, just encapsulate them with two back-ticks.
github.com/kristopolous/TickTick
GitHub
GitHub - kristopolous/TickTick: JSON in your Bash scripts
JSON in your Bash scripts. Contribute to kristopolous/TickTick development by creating an account on GitHub.
👍2🤯1
Forwarded from Женское радио в Тбилиси
Карта Грузии по мнению россиян в поисках жилья заехавших через Ларс
😁18