This is post number 1,000! 🎉
Rust's ownership and borrowing system involves the use of references to operate on borrowed data, and the type system distinguishes two different fundamental reference types. In code they are spelled
&mut Tis commonly known as a "mutable reference" to data of type
T. By juxtaposition,
&Tis then an "immutable reference" or "const reference" to
T. These names are fine and reasonably intuitive for Rust beginners, but this article lays out the motivation for preferring the names "shared reference" and "exclusive reference" as you grow beyond the beginner stage and get into library design and some more advanced aspects of the language.
Rust needs a better non-cryptographic prng for its rand crate. This is an explanation of how I went about designing one. I hope it will not only demonstrate that the resulting algorithm is worthy of consideration, but be useable as a guide for others who want to build a PRNG.
Source: Designing a new PRNG, an article by Tom Kaitchuck.
Transformers architectures are the hottest thing in supervised and unsupervised learning, achieving SOTA results on natural language processing, vision, audio and multimodal tasks. Their key capability is to capture which elements in a long sequence are worthy of attention, resulting in great summarisation and generative skills. Can we transfer any of these skills to reinforcement learning? The answer is yes (with some caveats). I will cover how it’s possible to refactor reinforcement learning as a sequence problem and reflect on potential and limitations of this approach.
Source: On the potential of Transformers in Reinforcement Learning, an article by Lorenzo Pieri.
If you spend a lot of time typing plain text, writing programs or HTML, you can save much of that time by using a good editor and using it effectively. This paper will present guidelines and hints for doing your work more quickly and with fewer mistakes.
The open source text editor Vim (Vi IMproved) will be used here to present the ideas about effective editing, but they apply to other editors just as well. Choosing the right editor is actually the first step towards effective editing. The discussion about which editor is the best for you would take too much room and is avoided. If you don't know which editor to use or are dissatisfied with what you are currently using, give Vim a try; you won't be disappointed.
Source: Vim: Seven habits of effective text editing, an article by Bram Moolenaar.
Last year I lead an engineering team for 5 months. During this time we practiced SCRUM, which enabled us to predictably accomplish what we committed to. Predictable delivery is essential for mid and long term projects, where missing commitments could put deadlines at risk. This post outlines what we achieved, how we operated, and why it matters.
Go is a language designed by Google for use in a modern internet environment. It comes with a highly capable standard library and a built-in HTTP client. I’m on the record as being against including a lot of dependencies. So why did I end up writing my own HTTP client helper library for Go?
Source: Why I wrote my own Go HTTP client, an article by Carl M. Johnson.
Parsers are crucial for many data processing tasks. Contrary to what appearances might imply, writing a parser from scratch is not difficult given the right starting point. This article presents a flexible system for writing custom parsers for a wide range of languages. It assumes some experience with Rust, but no experience with language theory. More experienced readers might want to skip directly to the Lyn crate.
Source: A Beginner's Guide to Parsing in Rust, an article by Richard L. Apodaca.
Error handling in Rust has been a topic of discussion for years. There's a working group devoted to it (announcement here) that seems active, but to be honest I haven't heard a lot from them (naturally, a few days after I wrote this, they popped-up on Reddit). There has, however, been a steady stream of articles & posts about best practices in this regard. I surveyed them while reconsidering my own error-handling strategy for mpdpopm & found myself taking pieces from each, but no one author really captured my thinking. With this, I throw my own thoughts on the pile.
Source: Rust Error Handling.
I’ve been having this thought on the back of my mind for a long time to write about why it’s often a bad idea to start with microservices for a brand new project.
The time has come, that’s exactly what I’ll talk about in this article.
Source: Don’t start with microservices in production – monoliths are your friend, an article by Arnold Galovics.
Django is an extremely popular and fully featured server-side web framework, written in Python. This module shows you why Django is one of the most popular web server frameworks, how to set up a development environment, and how to start using it to create your own web applications.
Source: Django Web Framework.
At WWDC21 Apple revealed that Swift Playgrounds was getting a huge upgrade to allow us to build complete SwiftUI apps, including not only a live preview of our work but also the ability to ship direct to the App Store.
Well, Playgrounds 4 just arrived and I’m really pleased to say they nailed it: this is a landmark release for Swift Playgrounds, introducing instant interactive previews, lightning-fast code completion, complete integration for Swift Package Manager repositories, and so much more…
Source: Swift Playgrounds 4 is here, and it’s a thing of beauty, an article by Paul Hudson.
I've seen too many good programmers struggle learning Rust, or even give up.
Here are the mistakes I've seen which may make you fail at learning Rust. I hope this list will help you avoid them.
Source: How not to learn Rust, an article by Denys Séguret.
This tutorial introduces the basics of generics in Go. With generics, you can declare and use functions or types that are written to work with any of a set of types provided by calling code.
In this tutorial, you’ll declare two simple non-generic functions, then capture the same logic in a single generic function.
Note the double-colon
::beforeversus the single-colon
:before. Which one is correct?
Technically, the correct answer is
::before. But that doesn’t mean you should automatically use it.
Source: ::before vs :before, an article by Chris Coyier.
Upgrading to new software versions is work, and work that doesn’t benefit your software’s users. Users care about features and bug fixes, not how up-to-date you are.
But there is only so much time you can delay upgrading, and for Python 3.6, the time to upgrade is right now. Python 3.6 is reaching its end of life as of December 2021.
Source: It’s time to stop using Python 3.6, an article by Itamar Turner-Trauring.
In this post I’ll also demo how you can automate anything in the Apple ecosystem from the comfort of GNU Emacs, the world’s most extensible editor.
Source: Integrating Emacs with Siri Shortcuts, an article by Daniils Petrovs.
A total function is a function defined for every element of its domain. This terminology is more common in computer science than in math. A lot of what we call functions in software are actually partial functions because they’re not defined everywhere.
Source: Partial functions and total functions, an article by John D. Cook.
When you treat it as its own separate programming language, Haskell’s type system has some strange syntax, weird fundamental choices, and occasionally bad ergonomics. In other words, it’s like any other programming language.
Source: Haskell’s Type System Standing Alone, an article by Mitchell Vitez.
I am kinda hooked up on modifying my git terminal workflow and integrate FZF wherever I can, this is such an example script to see changes in a python function overtime in your git history.
Haskell is a general-purpose purely functional programming language. Its distinctive features include strict static typing, lazy evaluations, algebraic data types, and a serious theoretical background. This language is relatively young, it emerged in 1990 but has already produced a big impact on other languages and programming language theory on the whole.
One of our recent posts described useful Haskell-based utilities, but all of them are intended to be used by tech-savvy people. Today we’re going to give some examples of practical use in various industries.
Source: Do You Know Where Haskell Is Used?, an article by Catherine Galkina.