Programming Leftovers
-
We are stuck with egrep and fgrep (unless you like beating people)
What's special about GNU Grep 3.8 is that its version of egrep and fgrep now print an extra message when you run them. Specifically, these messages 'warn' (ie nag) you to stop using them and use 'grep -E' and 'grep -F' instead.
(I assume that these messages are printed to standard error, because not even GNU Grep would be so hostile as to put them in standard output.)
-
What a Wedding Taught Me About Software Engineering
Same way for all heuristics: use it to make very low cost judgements or to jumpstart deeper investigations. If simplicity and performance are distinct goal qualities, what do the tradeoff choices look like? Is there a common pattern to them? Is there a conceptual group of “things that trade simplicity for performance” and vice-versa?
-
Brain cells in dish learn to play video game
Brett Kagan, who led a study published in the journal Neuron Wednesday, told AFP his findings open the door to a new type of research into biological information processors, complementing normal digital computers.
-
Porting the Solana eBPF JIT compiler to ARM64
During my summer internship at Trail of Bits, I worked on the fork of the RBPF JIT compiler that is used to execute Solana smart contracts. The RBPF JIT compiler plays a critical role on the Solana blockchain, as it facilitates the execution of contracts on validator nodes by default.
-
Unravelling `if` statements
The key insight is that if you put a break at the very end of a while statement, it will exit the loop unconditionally. That means if you make the conditional guard on the while loop be what the conditional guard would have been for an if statement, you end up with the same outcome!
-
ref
Ref is a universal version of list-ref, hash-table-ref etc.
It can handle lists, alists, hash-tables, strings, vectors, records, and all callable procedures (like call-tables).
You can also pass multiple arguments to dereference recursively.
-
What you need to know about compiling code
Source code must be compiled in order to run, and in open source software everyone has access to source code. Whether you've written code yourself and you want to compile and run it, or whether you've downloaded somebody's project to try it out, it's useful to know how to process source code through a compiler, and also what exactly a compiler does with all that code.
-
Adding fragmention links to my website
An extension of this idea is the "fragmention." Fragmentions let you link to a particular string of text on a document. This is useful if you want to link to a particular paragraph rather than an entire section. With direct links to a text in a paragraph, a website can apply styling to highlight either a particular string or a whole paragraph. I like this idea. Imagine being able to link to exactly the part of a document rather than conveying "click this link, then read the third sentence two paragraphs down."
-
Python dependency management difficulty is an unhelpful meme
Python package management / installation is famously difficult… or so the story goes. This keeps getting reinforced by forum comments, quoting that one xkcd page, and people who aren’t actually running into the issues repeating the meme. In practice, it will take just a few minutes to understand and not end up in a mess.
That’s not to say the Python ecosystem doesn’t have its issues. But let’s have a look at what’s actually simple, how things work in practice and what the real issues are. Warning: things will be simplified - if you think “yes but actually …”, you’re likely right and likely not the target for this post :)
Let’s start with tooling. There are 3 categories of tools for helping with Python development: [...]
-
Python on Microcontrollers Newsletter: CircuitPython Supports Pico W in Latest Beta and much more! #CircuitPython #ICYMI #Python @micropython @Raspberry_Pi
Work on the CircuitPython support for Raspberry Pi Pico W has reached the point where it has been released on circuitpython.org. While not feature-complete in CircuitPython 8.0.0-beta.1, it is usable for several types of WiFi use. It is currently being actively worked on by Adafruit – circuitpython.org.
-
This Week In Rust: This Week in Rust 464
-
Asynchronous programming in Rust
Asynchronous programming: Incredibly useful but difficult to learn. You can't avoid async programming to create a fast and reactive application. Applications with a high amount of file or network I/O or with a GUI that should always be reactive benefit tremendously from async programming. Tasks can be executed in the background while the user still makes inputs. Async programming is possible in many languages, each with different styles and syntax. Rust is no exception. In Rust, this feature is called async-await.
While async-await has been an integral part of Rust since version 1.39.0, most applications depend on community crates. In Rust, except for a larger binary, async-await comes with zero costs. This article gives you an insight into asynchronous programming in Rust.
-
Tools vs standards
Figure out ways to use what’s there and to make what’s there better.