Machine Learning: Full-Text Search in JavaScript – Relevance Scoring (2015)
Full-text search is a powerful machine learning algorithm, especially relevant for web developers. This article teaches you the basics, from scratch.
Full-text search is a powerful machine learning algorithm, especially relevant for web developers. This article teaches you the basics, from scratch.
Removing spaces from a string is a common task in text processing. Instead of removing single character we often want to remove all the white space characters or the punctuation characters etc.
How to make an access-limiting proxy for any API
I’m a huge proponent of designing your code around the data, rather than the other way around, and I think it’s one of the reasons git has been fairly successful… I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important…
Vim 8.1 was released in May 2018. The “main new feature” was official support for running a terminal within vim. Along with this came a built-in debugger plugin, termdebug, which provid…
Some years ago someone asked whether it would make sense to switch Python to a PEG parser. (Or a PEG grammar; I don’t recall exactly what…
It seems like small thing, but it’s an engineering detail I’ve always had a lot of respect for.
Getting your messages without giving a third party your credentials and data
As it’s the 50th anniversary of the Apollo 11 moon landings, I thought this would be a great opportunity to live code a demonstration of using my new compiler to write a simple lunar lander game… but first, I’m going to port the compiler to generate code for an actual lunar lander. Yes, my target platform is the…
In the last post , we described a protocol that should satisfy the requirements and invariants established in the first post . Today we will look at formal verification with TLA+. Formal verification is just another (niche) tool in the toolbox. Some tools require more skill than others to use. So
There's nothing here. The Internet is far too dangerous right now. The blog may return in future, if I get around to it.
A look at what the newest generation of Java GCs can do
If you've ever hit the tab key while typing commands in the shell, you are familiar with the value of shell completions. Bash has some default completion behavior, which is why you can type hel<TAB> and end up with help . It is also possible to add additional completion scripts which define the completion behavior for…
PostgreSQL 11 offers the best OVER clause support among its competitors, true procedures, and improvements in FETCH FIRST and XML.
This morning I had a shower for 6.11686718 minutes. For breakfast I had 189.41576911 ml of fruit juice, followed by 75.24902503 g of muesli topped with 36.55668786 ml of milk and 15.44171338 g of yogurt.
I’m pleased to report that Hyperscan, the regular expression matcher that ate my life from 2008 through 2018, finally has a paper (pdf) – it’s being presented this week at NSDI &#…
When Apple introduced Bitcode and made it mandatory on watchOS and tvOS, they kinda hand-waved away questions about why it existed, with nebulous claims about it being useful to tune-up binaries by utilizing the latest compiler improvements.
Web Assembly is written in an s-expression syntax (wast) and then needs to be translated down to binary encoded wasm. Below is a gist of wast that imports the stdlib.print function taking a memory location offset and a length, as well as importing a block of memory from the controlling runtime. We then store the…
Approaching the world of concurrency, one step at a time.
The vchan protocol is used to stream data between virtual machines on a Xen host without needing any locks. It is largely undocumented. The TLA …
Reverse engineering an unfamiliar data file could be described as the bootstrapping of understanding. In many ways the process resembles the scientific method, only applied to human-made, abstract objects instead of the natural world. You begin by gathering data, and then you use that information to put forth one or…
I learned to program with BASIC back when I was twelve. I would write elaborate programs and run them. Invariably, they would surprise me by failing to do what I expect. I would struggle for a time, but I'd eventually give up and just accept that whatever "bugs" I had created were there to stay. … Continue reading I…
Very roughly speaking, functional programming (“FP”) and object-oriented programming (“OOP”) have similar levels of expressive power and similar abilities to encapsulate programs into smaller parts that can be combined and recombined.
Building progressive and performant sites with React