Recent submissions

Comment · 3 years ago
Not 5 levels, but I once wrote debug visualizers for a compiler using funceval (the visualizer uses the debugger to run code in the target process).

I think I once had to debug the debugger debugging the compiler compiling itself which felt like another really weird kind of recursion.

Comment · 4 years ago
Comment · 5 years ago
Comment · 5 years ago
Saqib Shaikh, a blind developer at Microsoft, gave this short talk on using Visual Studio: https://www.youtube.com/watch?v=94swlF55tVc

I realize this isn't a console, but I think it is a good demonstration of an expert doing typical developer activities.

Comment · 6 years ago
PowerShell can be shorter by 1 character for this use case:

  irm wttr.in
irm is an alias for Invoke-RestMethod which is similar to Invoke-WebRequest but better for non-html responses like json or plain text.
Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
I guess it's time to reread Starship and the Canoe - a great book about Freeman's nuclear weapon powered spaceship and his son George's interest in building boats. I thoroughly enjoyed it 25+ years ago.
Comment · 7 years ago
Comment · 7 years ago
Visual C++ has the __debugbreak() intrinsic function.

If you have JIT debug enabled, you will be prompted to attach your debugger to the process when hitting such a breakpoint.

Comment · 8 years ago
With PSReadLine, you can change that:

  Set-PSReadLineOption -EditMode Emacs
Or

  Set-PSReadLineKeyHandler -Key Tab -Function Complete
Comment · 8 years ago
I'm optimistic about binaries providing completions, I think we'll see more of that as tools adopt frameworks like https://github.com/clap-rs/clap or https://pypi.org/project/argcomplete/ which can provide completions for your favorite shell.

But I do think many important/useful binaries will never provide completions, or provide sub-par completion that people will want to improve, so we can't ever count on completions from binaries.

Recently I've been thinking some about how the LSP (https://microsoft.github.io/language-server-protocol/) might be useful for a CLI. A readline implementation could use something like a LSP for syntax coloring and completion.

Imagine having a consistent editing in your favorite shell, repl, and editor.

Comment · 8 years ago
Comment · 9 years ago
I have no specific insight to this patch, but I do have personal experience binary patching a popular Microsoft product.

My patch was to the VC++ compiler nearly 20 years ago. We had source, and my fix was also applied to the source (which I'd imagine is still there today), but a binary patch also made sense in the short term.

The binary that I patched was used to build another important Microsoft product, and this bug was found late in the product cycle where any compiler change was risky.

We weren't 100% confident we had the exact sources used to build that version of the compiler (git would have been handy then), we only knew, plus or minus one day, what the sources where.

After carefully evaluating the binary patch versus the risk of building from uncertain source, the binary patch was taken to reduce risk.

I'm no reverse engineer, but this was a pretty interesting exercise in RE even though I had sources. I had no symbols, and the binary was optimized so that functions were not contiguous, cold paths were moved to the end of the binary. Just finding the code I needed to patch was not easy.

The code review was fun - a dozen or so compiler engineers reviewed the change on paper printouts - the most thorough review I've had in my career, and the only one that used paper.

To the best of my knowledge, this binary was never used to build anything other than that specific version of the product which I won't name - not that it matters really, the product is still in use, but that version is unlikely to be in use anywhere anymore.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton