You can do it in Bash as well. Put this in .inputrc:
"\e[A":history-substring-search-backward
"\e[B":history-substring-search-forward
# or, if you want to search only from the start of the command
"\e[A": history-search-backward
"\e[B": history-search-forward
An explaination of how to implement practical procedural macros in the Rust programming language. Explains the different types of macros, then shows an implementation of a procedural macro following best practices, focusing on testing and ergonomics. Assumes some familiarity with Rust.
If we focus on the most-important critical fundamentals, we should be able to become comfortable with the command line in a remarkably short amount of time.
That's what this blog post is all about. It's the missing manual of terminal fundamentals needed to work with modern JS frameworks like React, so you can move onto the fun stuff: building user interfaces!
Most people think assembly is only to be used to write toy programs for learning purposes, or to write a highly optimized version of a specific function inside a codebase written in a high-level language.
Well, what if we wrote a whole program in assembly that opens a GUI window? It will be the hello world of the GUI world, but that still counts.
This is the first post in a three part series. Check out [part 2](https://austinhenley.com/blog/teenytinycompiler2.html) and [part 3](https://austinhenley.com/blog/teenytinycompiler3.html) when you are ready.
It is a beautiful day outside, so let's make a compiler. You don't need any knowledge of how compilers work to follow along. We are going to use Python to implement our own programming language, Teeny Tiny, that will compile to C code. It will take about 500 lines of code and provide the initial infrastructure needed to customize and extend the compiler into your own billion dollar production-ready compiler.
This tutorial is a series of posts that go step by step in building a working compiler. All of the source code can be found in the GitHub [repo](https://github.com/AZHenley/teenytinycompiler). If you follow along with all the posts, I guesstimate that it will take you only a few hours.
The Teeny Tiny language we are going to implement is a dialect of [BASIC](https://en.wikipedia.org/wiki/BASIC). The syntax is clean and simple. If you prefer a C-like syntax then it will be trivial to modify the compiler at the end.
As a programmer, you use hash functions every day. They're used in databases to optimise queries, they're used in data structures to make things faster, they're used in security to keep data safe. Almost every interaction you have with technology will involve hash functions in one way or another.
Hash functions are foundational, and they are **everywhere**.
But what is a hash function, and how do they work?
In this post, we're going to demystify hash functions. We're going to start by looking at a simple hash function, then we're going to learn how to test if a hash function is good or not, and then we're going to look at a real-world use of hash functions: the hash map.