All I’m going to say about today’s solutions is read the problem carefully. I missed a key fact, which meant I spent way too much time handling cases I didn’t need to. There’re still some vestiges of that approach in the (working) solutions.
Sheesh.
Read more →
I’ve got today’s solutions up. This problem wasn’t really amenable to using hashes, so I just brute-forced it with a 1,000×1,000-element array (hey, memory is cheap!). FIND-VALID-CLAIMS is O(n²) (due to a O(n) list deletion performed O(n) times), but … CPU is cheap too, and these are puzzles, not production code. That’s a running theme throughout these solutions: I’m not playing for high-performance or highly-elegant solutions to the puzzles, just the correct answers, quickly.
Read more →
I’ve got my solutions to today’s puzzles up. Believe it or not, a lot of folks dislike LOOP because it’s not terribly Lispy — they’re right, of course, but it is a pretty handy Swiss Army knife to keep in one’s pocket.
I use hash tables a lot, but that’s because hash tables are an awesome data structure. My biggest takeaway from working on these puzzles so far is gratitude that Common Lisp is a large enough language that it has hash tables; were I writing in C I’d either be scanning & rescanning & re-rescanning strings, or I’d have to write my own hash table implementation.
Read more →
I’ve decided to participate in the Advent of Code this year. The idea is that each day two simple puzzles are released, and folks use their favourite programming language to solve them. Folks compete to be the first person to submit a solution (only the first 100 count for points, though). Following Javier Olaechea’s example, I’ll track each day’s solution and post notes here.
Sum numbers I decided to just drop the input in as a string.
Read more →
Cryptographer & Johns Hopkins professor Matthew Green details why he’s switching from Chrome. Google simply aren’t making decisions in their users’ best interests anymore.
Read more →
I had an idea late last night about how to handle multi-device end-to-end encryption and identity.
An issue with end-to-end encryption is how to support multiple devices: I may want to read messages on my laptop, my phone, my desktop and my tablet, but I don’t want a central server to be able to read those messages. This can be handled with encryption: when someone sends me a message, he encrypts it for all of my devices.
Read more →
My employer published an article I wrote about encrypting sensitive
data when debugging a Go backend service. In it, I use
golang.org/x/crypto/nacl
& net/http
to encrypt HTTP requests &
responses in debug logs. Worth a read, I think — and unlike the rest
of my blog, in this one I actually am speaking for my employer!
Read more →
A fellow is going to prison for 15 months for selling bit-for-bit
identical copies of software Microsoft gave away for free. TechCrunch
has an excellent has the details. It just doesn’t sound right to
me to value something which is free at $25/copy.
Read more →
Back in 2007 Peter Norvig shared a simple spelling corrector (last
updated in 2016); I thought that I’d share my translation into Lisp,
with some comments. Norvig’s original article explains the actual
algorithm he’s using; I’ll focus on stuff specific to my own version.
I’m definitely not a Lisp wizard (although I’ve been using it for many
years), so it’s entirely possible that I’ve messed one thing or
another up — I’m glad to receive corrections or comments.
Read more →
Nathan Toups has an interesting set of suggestions for a dumber smartphone, intended to retain utility while reducing their potential for addiction. They’re good ideas, but I do have a few quibbles. I think that it’s fine to retain non-addictive entertainment, in order to use the phone with e.g. a Chromecast. Thus it’s okay to have YouTube, Hulu or Netflix, but it’s still good to get rid of Facebook, Twitter, Instagram &c.
Read more →
Paragon Initiative Enterprises wrote a nice blog entry on how to
generate secure random numbers in various languages awhile back. They
did leave out Common Lisp, but it’s easy to do there, too:
Read more →
Ten hours of white noise on YouTube received five copyright-infringement claims. The claims were imposed in order to attempt to steal ad revenue. Why isn’t this considered a form of piracy or barratry?
Read more →