Plurrrr

home

Why Async Rust

I often find async Rust to be misunderstood. Conversations around "why async" often focus on performance 1 - a topic which is highly dependent on workloads, and results with people wholly talking past each other. While performance is not a bad reason to choose async Rust, we often we only notice performance when we experience a lack of it. So I want to instead on which features async Rust provides which aren't present in non-async Rust. Though we'll talk a bit about performance too at the end of this post.

Source: Why Async Rust, an article by Yoshua Wuyts.

WHOIS: Fragile, unparseable, obsolete...

The WHOIS protocol is one of the older internet protocols around. It's infuriatingly simple, by and large considered obsolete, and the data provided by it unpredictable, unreliable, incomplete, and, of course, still one of the corner stones of internet operations. In other words, it's the kind of thing I like to waste my time on trying to understand.

Source: WHOIS: Fragile, unparseable, obsolete... and universally relied upon, an article by Jan Schaumann.

Under-documented Kubernetes Security Tips

The fast proliferation of Kubernetes has meant that many more organizations are running Kubernetes without the personnel or the money to secure it properly. And yes, that includes you, "person who is primarily a developer, but deployed an GKE cluster 6 months ago while following the CIS benchmarks and hasn't looked at it since, thinking it's super secure because it's 'managed' by Google". Hopefully this collection of tips will help you out!

Source: Under-documented Kubernetes Security Tips, an article by Mac Chaffee.

redframes

redframes (rectangular data frames) is a data manipulation library for ML and visualization. It is fully interoperable with pandas, compatible with scikit-learn, and works great with matplotlib!

redframes prioritizes syntax over flexibility and scope. And minimizes the number-of-googles-per-lines-of-code™ so that you can focus on the work that matters most.

Source: redframes, an article by Max Humber.

Postgres Data Flow

At Crunchy we talk a lot about memory, shared buffers, and cache hit ratios. Even our new playground tutorials can help users learn about memory usage. The gist of many of those conversations is that you want to have most of your frequently accessed data in the memory pool closest to the database, the shared buffer cache.

There's a lot more to the data flow of an application using Postgres than that. There could be application-level poolers and Redis caches in front of the database. Even on the database server, data exists at multiple layers, including the kernel and various on-disk caches. So for those of you that like to know the whole story, this post pulls together the full data flow for Postgres reads and writes, stem-to-stern.

Source: Postgres Data Flow, an article by David Christensen.

Operator Glossary

One aspect of Haskell that many new users find difficult to get a handle on is operators. Unlike many other languages, Haskell gives a lot of flexibility to developers to define custom operators. This can lead to shorter, more elegant code in many cases.

Source: Operator Glossary.

Shorter Hacks 16: IPython Autoreload

When developing some python code and testing it in IPython, I love the autoreload feature of IPython. When enabled it will reload imported modules automatically. So you will always use the newest version of your code. It even patches modifications on class methods into existing class instances. To enable it first load it with %load_ext autoreload, then enable it with %autoreload 2 – See the documentation for explanations of the options and how to autoreload only selected imports.

Source: Shorter Hacks 16 IPython Autoreload, an article by Michael F. Schönitzer.

Distributed Tracing in Rust

Here is another shot at distributed tracing in Rust. I saw multiple articles online but sadly none gave me the necessary tips to make distributed tracing work in my context.

What I wanted to achieve was to get a complete trace starting from the API request to the database across multiple services communicating through AMQP.

This article will guide you through every steps required to instrument your application.

Distributed Tracing in Rust, an article by Romain Lebran.

Manage containers on Fedora Linux with Podman Desktop

Podman Desktop is an open-source GUI application for managing containers on Linux, macOS, and Windows.

Historically, developers have been using Docker Desktop for graphical management of containers. This worked for those who had Docker Daemon and Docker CLI installed. However, for those who used Podman daemon-less tool, although there were a few Podman frontends like Pods, Podman desktop companion, and Cockpit, there was no official application. This is not the case anymore. Enter Podman Desktop!

Source: Manage containers on Fedora Linux with Podman Desktop, an article by Mehdi Haghgoo.

Ten challenges for Rust

Rust is in a pretty good place; it is getting more and more popular, has more and more contributors, and is used in some pretty significant places. However, it is a time of flux and change, and transitioning from a research project then a new, rapidly changing language to a popular, established project is a difficult change.

Here, I want to describe what I think are the ten biggest challenges for Rust for now and the next few years. I have some ideas for solutions, but they are all big, difficult questions with no simple answer, so the real solutions will all take iteration, energy, and creativity. My focus is on the core project; there are many challenges for the community and ecosystem (e.g., how to make GUIs with Rust, or how to get more crates to 1.0) which I think must be primarily solved by the community.

Source: Ten challenges for Rust, an article by Nick Cameron.

Photography for geeks

Billions of people carry cameras in their pockets and use them to document their lives. Yet, despite the democratization of the hardware, the knowledge of photographic techniques remains elusive. Countless books, webpages, and YouTube videos purport to offer advice, but tend to dwell on topics of little consequence - such as shopping for gear or memorizing made-up rules of composition that seldom make for a good shot.

I'm not a pro, but I dabbled in photography for more than two decades - and after making countless mistakes, I have gotten fairly good. This page is an impassioned contrarian take on what it takes to snap great photos, along with a set of simple experiments that can be repeated at home.

Source: Photography for geeks, an article by Michal Zalewski.

Metaprogramming in Python

Just like metadata is data about data, metaprogramming is writing programs that manipulate programs. It's a common perception that metaprograms are the programs that generate other programs. But the paradigm is even broader. All of the programs designed to read, analyze, transform, or modify themselves are examples of metaprogramming.

Source: Metaprogramming in Python, an article by Satwik Kansal.

A Complete Guide to Logging in Go with Zerolog

Zerolog is a high-performance, zero-allocation Go logging library. It provides structured logging capabilities for latency-sensitive applications where garbage collection is undesirable. You can use in a completely zero-allocation manner such that after the logger object is initialized, no further objects will be allocated on the heap, thus preventing the garbage collector from being triggered.

This tutorial will explain how to install, set up, and use the Zerolog logger in a Go application. We'll start by going through its API and all the options it provides, and show how to customize them in various ways. Finally, we'll describe how to use it in a typical web application so you can get a good idea of how to adopt it in your projects.

Source: A Complete Guide to Logging in Go with Zerolog.

More Details on details

A lot of chatter around the ol’ <details> and <summary> elements lately! I saw Lea Verou recently tweet an observation about the element’s display behavior and that sorta splintered into more observations and usage notes from folks, including a revived discussion on whether <summary> should be allowed to contain interactive elements or not.

There are a lot of dots to connect and I’ll do my best here to do exactly that.

Source: More Details on details, an article by Geoff Graham.

Ship Small Diffs

I’ll make the case for one practice that works very well operationally: deploying small units of code to production on a regular basis. I think that your deploys should be measured in dozens of lines of code rather than hundreds. You’ll find that taking this as a fixed point requires only relatively simple uses of revision control.

Source: Ship Small Diffs, an article by Dan McKinley.

Locklands

Once, Sancia Grado was just a thief with a grudge and a rare talent. Then she learned how to use that talent, and beat the great merchant houses of Tevanne at their own game. With Clef and Berenice, she even saw off an immortal hierophant - but the war they're fighting now is one they know they can't win.

This time, they're not facing robber-baron elites or an immortal hierophant, but an entity whose intelligence is spread over half the globe: a ghost in the machine using the magic of scriving to possess and control not just objects, but human minds.

Despite all their efforts their enemy marches on, implacable, unstoppable - and it's closing in on its true prize: an ancient doorway that leads to the centre of creation itself.

Sancia and her friends glimpse a last desperate opportunity to stop this unbeatable foe - but to do so, they'll have to unlock the centuries-old mystery of scriving's origins and pull off the most daring heist they've ever attempted.

And as if that weren't enough, their adversary might just have a spy in their ranks - and a last trick up its sleeve . . .

In the evening I started in Locklands, book 3 in The Founders Trilogy by Robert Jackson Bennett.

Swift 5.7 Released!

Swift 5.7 is now officially released! Swift 5.7 includes major additions to the language and standard library, enhancements to the compiler for a better developer experience, improvements to tools in the Swift ecosystem including SourceKit-LSP and the Swift Package Manager, refined Windows support, and more.

Source: Swift 5.7 Released!, an article by Holly Borla.

Writing A Lisp Interpreter In Haskell

A while ago, after what now seems like eternity of flirting with Haskell articles and papers, I finally crossed the boundary between theory and practice and downloaded a Haskell compiler. I decided to do a field evaluation of the language by two means. I was going to solve a problem in a domain that Haskell is known to excel at followed by a real world problem1 that hasn't had much exploration in Haskell2. Picking the problems was easy. There's a lot of folklore that suggests Haskell is great for building compilers and interpreters so I didn't have to think long to a pick a problem that would be self contained, reasonably short, and fun - writing an interpreter of a Lisp dialect. For the second test case I decided to go with a web application - plenty of people are writing them for money and there hasn't been much Haskell-related work done in this area.

Source: Writing A Lisp Interpreter In Haskell, an article by Slava Akhmechet.

3 Common Misconceptions About Object-relational Mapping

Most software developers are familiar with object-relational mapping (ORM), a coding technique that creates an abstraction layer between object-oriented programming languages and databases. But despite its value, ORM isn’t ideal in all situations – particularly when programmers make wrong assumptions about its use. We debunk several such mistaken beliefs so that you can use ORM the right way.

Source: 3 Common Misconceptions About Object-relational Mapping, an article by Will Johnston.

What is a LSM Tree

In this post, we'll dive deep into Log Structured Merge Tree aka LSM Tree: the data structure underlying many highly scalable NoSQL distributed key-value type databases such as Amazon's DynamoDB, Cassandra and ScyllaDB. These databases by design are known to support write rates far more than what traditional relational databases can offer. We'll see how LSM Tree enables them to allow the write speeds that they claim, as well as how they facilitate reads.

Source: What is a LSM Tree, an article by Rahul Sharma.

Go Traps - nil interfaces

Go is one of the programming languages I love the most. It allows a very fast execution time (unlike Python) without affecting negatively the developer experience (unlike C), and is strongly typed (unlike TS where you can lie to the compiler). But it has some flaws, and nil interfaces are a tricky one I have to address.

Source: Go Traps - nil interfaces, an article by Ewen Quimerc'h.