Do It by Code
54 subscribers
712 photos
99 videos
14 files
1.24K links
We uhhhhh... do things by coding them.
Download Telegram
string literal concatenation
(also known as "string literal joining")

When you place two string literals next to each other with only whitespace between them, Python automatically concatenates them during the parsing phase.

So these are equivalent:
x = "hi" "hello"    # Results in "hihello"
x = "hi" + "hello" # Also results in "hihello"


This feature is particularly useful for breaking long strings across multiple lines:
long_string = "This is a very long string " \
"that I want to break " \
"across multiple lines"


As for other languages:
- C and C++ support this feature
- Java does not support this
- JavaScript does not support this
- Rust does not support this

It's worth noting that this only works with string literals (strings written directly in quotes in the code). It won't work with variables or expressions:
a = "hi"
b = "hello"
c = a b # This will cause a SyntaxError
c = a + b # This is the correct way


This feature is most commonly seen in C/C++ and Python, but it's relatively rare in modern programming languages.
Regex validator for JSON data

https://regex101.com/r/tA9pM8/1
React Flow

A customizable React component for building node-based editors and interactive diagrams

https://reactflow.dev/
https://reactflow.dev/examples
https://github.com/xyflow/xyflow

#react #flowchart
Yes, Claude Code can decompile itself. Here's the source code
Article, Comments

https://github.com/ghuntley/claude-code-source-code-deobfuscation
GrapheneOS blocked exploitation of 3 Android zero-days used by Cellebrite
Article, Comments

Each of these is an upstream Linux kernel vulnerability:

* CVE-2024-53104: heap overflow in a Linux kernel USB webcam driver
* CVE-2024-53197: heap overflow in a Linux kernel USB sound card driver
* CVE-2024-50302: uninitialized heap memory in a Linux kernel USB touchpad driver

#vulnerability
Should I blame caching

https://shouldiblamecaching.com/
CVE-2025-21333 (score: 7.8, high)
Windows Hyper-V Zero-Day
POC Repository

heap-based buffer overflow. It leverages WNF state data and I/O ring IOP_MC_BUFFER_ENTRY
The vulnerability was detected as being actively exploited by threat actors. Tested on Windows 11 23h2.

Overwriting I/O Ring buffer entry to get arbitrary read/write
It allocates in the Paged Pool an array of pointers to _IOP_MC_BUFFER_ENTRY and overwrites the first pointer with a malicious IOP_MC_BUFFER_ENTRY* located in user-space. Using BuildIoRingWriteFile()/BuildIoRingReadFile() It is possible to obtain arbitrary read/write in the kernel.

The array of pointers to _IOP_MC_BUFFER_ENTRY is an object with PoolTag IrRB.


#vulnerability #cve
"An atomic load is ~5x faster than a mutex, which can matter in tight loops."

1. Mutex Operations: A mutex involves several expensive operations:
- System calls to the kernel
- Potential context switches
- Lock contention handling
- Thread scheduling overhead

2. Atomic Operations:
- Execute directly on the CPU using special hardware instructions
- Don't require kernel intervention
- No context switching
- No thread scheduling overhead

The ~5x performance difference comes from eliminating all the mutex-related overhead. However, it's important to note that atomic operations aren't always the best solution - they're ideal for simple operations like this error check, but mutexes are still necessary for more complex critical sections where you need to protect multiple operations.


- Commit
👍1
Urban Dead is shutting down
Article, Comments