Why is x & -x equal to the largest power of 2 that divides x?
Or how to find the largest power of 2 that divides x?
The latest blog posts to take off on Hacker News. 14,540 posts.
Or how to find the largest power of 2 that divides x?
I apologize if this information is already known, but I couldn’t find any references about it and I wanted to understand what was going on and share with you because I think there is some value doing it. In case this wasn’t known, I apologize to the Go team for not talking to them first and jumping the full disclosure…
In my off time (and my on time, for that matter) I've been working on this quirky thing I've called Scinamalink (sounds like 'skinamarink'). Scinamalink lets customers send Magic login links to their users with a single REST API call. If you don't know what a magic
Looking beyond the hype and explaining why microservices should nearly become extinct.
From Mario bouncing off a Goomba to two cars bumping into each other in a racing game, dealing with collisions is such an integral part of most video games that we often take it for granted.
How is tail recursion different from regular recursion? What do continuations have to do with this, what is CPS, and how do trampolines help? This article provides an introduction, with code samples in Python and Clojure.
Pavel has found a new 3-state 4-symbol Busy Beaver champion which can compute an “Ackermann-level” function and halts with exactly
Sometime recently in the past I complained about Maildir. You can go read the post, but the executive summary is that I think Maildir uses an actively user-hostile directory structure and extremely convoluted filenames that do not convey any meaning at all. For good measure, I will also reiterate that Maildir does…
Ever since I finished publishing the “defer” paper and successfully defended it on its first go-around (it now has tentative approval to go to a Technical Specification, I just need to obtain the necessary written boilerplate to do so), an old criticism
Xe Iaso's personal website.
And clear, readable code is probably the hardest code to write
This project is discontinued. The github repos are still available as archives, but no deployment is maintained and no PRs will be accepted. You can still join the Discord if you want but it is not active.
This is a tale of two approaches to regular expression matching. One of them is in widespread use in the standard interpreters for many languages, including Perl. The other is used only in a few places, notably most implementations of awk and grep. The two approaches have wildly different performance characteristics:
Hi there. I am going to post here thing about my work or my technical hobbies. This means c++, java, haskell, python, linux etc.
Hello size coding fans. Today, I have something amazing to share: A tiny raycasting engine and city generator that fits in a standalone 256 byte html file. In this post I will share all the secrets…
As someone building a browser I need to parse a lot of URLs. Partially to validate them, but also to normalize them or get specific parts out of the URL. The URL API in browsers lets you do that, but it’s ergonomics aren’t ideal. The problem with new URL() The “new” in front of new […]
Using transformed ellipses to estimate perspective transformations of text.
Coding my handwriting in Javascript - how I did it and what I’m doing with it.
With some partial evaluation and specialization hints, it is possible to get pretty decent speedups on interpreters by turning them into compilers.
Productivity on every platform - a deep dive on the ways we're writing Swift code on Windows, and improving the developer experience along the way.
This is a set of notes for learning calculus using the Julia language. Julia is an open-source programming language with an easy to learn syntax that is well suited for this task.
As I'm exploring the fantastic world of indie game development lately, I end up watching a large number of video tutorials on the subject. Even though the quality of the content is pretty variable, I'm very grateful to the creators for it. That being said, I couldn't help noticing this particular bit times and times…
A wrap-up of several years of development and the alpha release of Liikennematto.
Even relatively new C programmers have no trouble reading simple C declarations such as
I am a big fan of C, but some part of me always yearn to have just enough higher level constructs.
Neovim 0.10 was the longest release cycle since the heady days of the 0.5 release. There are a ton of new features in this release (as well as some breaking changes), so be sure to check the full release notes. You can view the release notes directly in Nvim with :h news. The news file includes information on new…
A few weeks ago, Axel Roest published a simple web server comparison , that turned out to not be doing what it was thought to be doing. Figuring that out was a very interesting discussion that warrants a retrospective, to look at which parts were particularly helpful and which not so much.