Logic Puzzles with Prolog (2017)
Solving Logic Puzzles with Prolog
The latest blog posts to take off on Hacker News. 3,709 posts.
Solving Logic Puzzles with Prolog
Algebraic data types and algebraic data structures sound similar. It’s like they ought to be the same thing. But they’re not. They both have ‘algebraic’ in the name, so it’s confusing. I got them mixed up at times. Others have too. But, they’re different concepts. Understanding the difference will help if you’re…
Haskell has a proliferation of libraries to choose from for all of your basic backend needs, from logging to database access to routing and web server definition. It's nice to have the freedom of choice, but if you're just starting out, the amount of decisions needed can be overwhelming. Maybe you're not even…
Serde is one of the most popular Rust crates, and deservedly so. If you aren't familiar, Serde describes itself as "a framework for serializing and deserializing Rust data structures efficiently and generically." What is most impressive to me is how robust the Serde data model has proven to be, allowing it to support…
One of the anonymous reviewers of my recently published Storage Combinators paper ( pdf ) complained that hiding disk-based, remote, and lo...
After using Go for a couple years, I’ve really come to appreciate its simplicity. I started writing Go at work a couple months ago, and have found it really easy to iterate on – much more so than Python and Java.
Optimizing compilers are a mainstay of modern software: allowing a programmer to write code in a language that makes sense to them, while transforming it into a form that makes sense for the underlying hardware to run efficiently. The optimizing compiler's job is to figure out what your input program does, and create…
Over the years I’ve found myself with a weird amount of knowledge about how types and ABIs in Rust work, and I wanted to write it all down in one place so that… it’s written down in one place. Much of this information can or should be found in the Rust Language Reference and the Rustonomicon .
For those who don’t follow Swift’s development, ABI stability has been one of its most ambitious projects and possibly it’s defining feature, and it finally shipped in Swift 5 . The result is something I find endlessly fascinating, because I think Swift has pushed the notion of ABI stability farther than any language…
Historically, I’ve struggled to find a concise, simple way to explain what it means to practice type-driven design. Too often, when someone asks me “How did you come up with this approach?” I find I can’t give them a satisfying answer. I know it didn’t just come to me in a vision—I have an iterative design process…
My last post C++20: The Big Four started with an overview of concepts, ranges, coroutines, and modules. Of course, C++20 has more to offer. Today, let’s continue my overview of the core language.
Algebraic Structures are something I wish I’d understood better, sooner. I had a hazy idea of what they were, but didn’t know the correct terminology. That was a massive barrier to finding out more. This article is my attempt to stop that happening to others. We’ll look at: What are algebraic structures? How do we use…
A long time ago, the Rust language was a language with typestate. Officially, typestates were dropped long before Rust 1.0. In this entry, I’ll get you in on the worst kept secret of the Rust community: Rust still has typestates.
JavaScript and C both make you maintain your invariants the most painful way possible. Happily, there are better alternatives these days.
How I fell in love with Ruby
After reading boat’s excellent post on asynchronous destructors , I thought it might be a good idea to write some about async fn in traits. Support for async fn in traits is probably the single most common feature request that I hear about. It’s also one of the more complex topics. So I thought it’d be nice to do a…
قلب is a programming language exploring the role of human culture in coding. Code is written entirely in Arabic, highlighting cultural biases of computer science and challenging the assumptions we make about programming. It is implemented as a tree-walking language interpreter in JavaScript.
Once you get past the growing pains of the Borrow Checker and realise Rust gives you the power to do things which would be unheard of (or just plain dangerous) in other languages, the temptation to Rewrite it in Rust can be quite strong. However at best, the temptation to RiiR is unproductive (unnecessary duplication…
At the beginning of this decade (2010), a few of us Haskellers were exploring how best to do client-side web programming. We didn’t want to write JavaScript. There’s a surprising number of techniques we tried to avoid doing so. There was work coming from academia and industry. Here’s a history of my own experience in…
Jaseem Abid's blogs and musings
Tales of Developing Clojure
Derek's Personal Portfolio/Blog
Some personal reflections about the evolution and death or programming languages. By the forces a circumstances, I had to reverse engineer and decommission a few Perl scripts in an old company earl…
It has still often been difficult to find answers to my questions. I think this is largely due to the fact that when discussing things with the average Haskell programmer, I feel like I have a fourth-grade education.
Many programmers are aware that C++ templates are Turing-complete, andthis was proved in the 2003 paper C++ Templates areTuring Complete.
Update 5/10/2019: check the bottom of this post for some links to comments and discussion.