HNHacker News
TopNewBestAskShowJobs

kevinoid

305 karma · joined February 28, 2013

Email: kevin@kevinlocke.name

Website: https://kevinlocke.name

GitHub: https://github.com/kevinoid

GitLab: https://gitlab.com/kevinoid

submissionscomments
kevinoid··on Hospitals and universities repurposing drugs at lower cost
A significant effect is through opioid receptor activation, as demonstrated by Williams et al. <https://doi.org/10.1038/s41380-019-0503-4> by blocking the receptor with naltrexone, which attenuated the antisuicidality effects.

The Huberman Lab episode Ketamine: Benefits and Risks for Depression, PTSD & Neuroplasticity <https://www.hubermanlab.com/episode/ketamine-benefits-and-ri...> and the referenced journal articles (including the above) have a lot of detail on it.

kevinoid··on Ask HN: Who wants to be hired? (November 2024)
Location: Bozeman, MT

Remote: Yes

Willing to relocate: No

Technologies: C#, Python, Node.js, MSSQL, ASP.NET WebForms, ASP.NET Core, JavaScript, OpenAPI, Selenium, REST, XML, XSLT, Git, Docker, Ansible, Debian, Bash, POSIX Shell, and many others.

Résumé/CV: https://kevinlocke.name/resume

Email: kevin@kevinlocke.name

Hi, I'm Kevin. I'm a generalist senior software engineer and consultant with over a decade of experience with a broad range of technologies, roles, and industries. I graduated magna cum laude with a B.S. in C.S. from Cornell, co-founded Digital Engine Software in 2009, joined early-stage fintech startup Quantpost in 2013, and have been developing and consulting independently since 2016 for a variety of clients, particularly in home health care and construction. Recently I've worked on many backend web sites and services (ASP.NET+MSSQL and MEAN Stack), automation, integration, and synchronization (Selenium+C#, Python, PowerShell), and Linux DevOps (Docker, Ansible, Bash) projects, but I particularly enjoy lower-level embedded and systems programming. I'm a free and open-source software proponent and contributor. I'm looking forward to joining a team doing meaningful work, particularly toward a social good, contributing my expertise, and learning and collaborating with other professionals.

kevinoid··on No more boot loader: Please use the kernel instead
This approach sounds similar to Petitboot <http://www.kernel.org/pub/linux/kernel/people/geoff/petitboo...> which is a kexec-based bootloader that I used on the Playstation 3 many years ago. Apparently it now targets many other systems and there is a (dead?) fork for Coreboot <https://github.com/ArthurHeymans/petitboot_for_coreboot>.
kevinoid··on AWS switch from gzip to zstd – about 30% reduction in compressed S3 storage
zstd 1.3.8 and later also has an rsync-friendly mode (via the --rsyncable command-line option). See https://github.com/facebook/zstd/issues/1155
kevinoid··on Windows' Undocumented “Emergency Restart”
Perhaps a closer analog would be halt(8) with the -q (BSD) or -f (Linux) option to avoid calling init(8):

https://man.openbsd.org/halt

https://manpages.debian.org/halt

kevinoid··on Text consoles and framebuffer consoles in Linux
It sounds like you may be remembering VBE display modes.[1] I think you can still play with these modes by adding `nomodeset vga=ask` to the kernel parameters[2] if you are booting with BIOS (or UEFI with CSM).

[1]: https://en.wikipedia.org/wiki/VESA_BIOS_Extensions

[2]: https://docs.kernel.org/admin-guide/svga.html

kevinoid··on Fedora considers deprecating legacy BIOS
Perhaps this is a good time to ask: I'd like to use UEFI for my qemu+libvirt virtual machines, but I need snapshot support. Since QEMU doesn't support pflash internal snapshots <https://gitlab.com/libvirt/libvirt/-/commit/9e2465834f4bff40...> and libvirt can't revert or delete external snapshots <https://bugzilla.redhat.com/show_bug.cgi?id=1519002>, I don't see a way to achieve this. The issue was discussed on virt-tools in 2017 <https://listman.redhat.com/archives/virt-tools-list/2017-Sep...> and the situation appears to be unchanged. Do others have a workable solution?
kevinoid··on Windows 11 upgrade tool that bypasses Microsoft´s requirements
Interesting. If I understand correctly, the "bypass" is https://github.com/coofcookie/Windows11Upgrade/blob/1.0.0/Wi... which is a copy of https://github.com/AveYo/MediaCreationTool.bat/blob/main/MCT... which appears to be intentionally cryptic.

It sets HKLM\SYSTEM\Setup\MoSetup\AllowUpgradesWithUnsupportedTPMOrCPU=1 which is mentioned by Microsoft in https://support.microsoft.com/windows/ways-to-install-window... which seems reasonable.

According to the comment, the rest of the script "uses IFEO to attach to Virtual Disk Service Loader process running during setup, then erases appraiserres.dll [...] it must also do some ping-pong renaming of vdsldr in system32\11" Could anyone explain this in more detail?

Also note, according to https://github.com/AveYo/MediaCreationTool.bat/issues/11 it skips the CPU and TPM checks, but not the Secure Boot checks.

kevinoid··on There is no 'printf'
To clarify, gcc -Wall only produces the warning with -std=c89/gnu89 (or GCC < 5 without -std=c99/gnu99). As with clang, it implements the implicit `return 0;` for C99 and later. Example: https://godbolt.org/z/Y7Wx5Y89q
kevinoid··on RSA/SHA1 signature type disabled by default in OpenSSH
Agreed. I should have made my post clearer. OpenWrt does not suppport SHA-2 signature hashing or any of the newer key algorithms I mentioned, so you are stuck with RSA+SHA1.
kevinoid··on RSA/SHA1 signature type disabled by default in OpenSSH
I've been running with ssh-rsa disabled for a while (with a config based on https://infosec.mozilla.org/guidelines/openssh#modern-openss... ) and it's been pretty smooth. Support for better algorithms is widespread, with a few exceptions (like bazaar.launchpad.net).

One gotcha: OpenWrt does not enable ECDSA by default[1] and only recently enabled support for ed25519 by default.[2][3] It's available in release candidates for 21.02, but not in current stable releases. So if you're running a stable release you'll need to either add `PubkeyAcceptedKeyTypes +ssh-rsa` to your client ssh_config or use a custom build of OpenWrt with DROPBEAR_ECC or DROPBEAR_ECC_FULL enabled.

[1]: https://bugs.openwrt.org/index.php?do=details&task_id=786

[2]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d0...

[3]: https://bugs.openwrt.org/index.php?do=details&task_id=3216&s...

[4]: https://bugs.openwrt.org/index.php?do=details&task_id=3452

kevinoid··on Getting the maximum of your C compiler, for security
Great suggestions! One caveat: -fsanitize=pointer-compare and -fsanitize=pointer-subtract have some sharp edges and (last I knew) are not considered production ready by the sanitizers team. For example: https://github.com/google/sanitizers/issues/1324
kevinoid··on Show HN: Micro HTTP server in 22 lines of C
It's neat, but I don't believe it is a compliant implementation of HTTP/1.1 (or 1.0). For example, it does not handle percent-encoded characters in the request URI.[1][2]

[1]: https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.1

[2]: https://www.w3.org/Protocols/HTTP/1.0/spec.html#Request-URI

kevinoid··on Show HN: Micro HTTP server in 22 lines of C
I agree. As with many things, it's only simple as long as you ignore the complexities. As they say, the devil's in the details.

> this "server" only responds to a simple well formed GET request.

And not even that. The Request-URI in a Simple-Request line (inherited from HTTP/0.9) may contain escape characters. (e.g. `GET /my%20file.txt` to get `my file.txt`) HTTP/1.0 states "The origin server must decode the Request-URI in order to properly interpret the request."[1] This server does not.

Which is not to say that this server isn't interesting. Just that it's not a demonstration of how easy HTTP/1 is to parse.

[1]: https://www.w3.org/Protocols/HTTP/1.0/spec.html#Request-URI

kevinoid··on Neovim 0.5 is overpowering
I still use both, with a shared vimrc. The biggest advantage of neovim for me is support for the clipboard in Wayland.[1] There are workarounds for vim (vim-fakeclip[2] is the best I found) but they have many limitations which can be frustrating.

[1]: https://github.com/vim/vim/issues/5157

[2]: https://github.com/kana/vim-fakeclip

kevinoid··on Nassim Taleb says Bitcoin is an open Ponzi scheme and a failed currency
A discussion of Nassim Taleb's tweet of the same sentiment last week: https://news.ycombinator.com/item?id=26840006 (430 comments)
kevinoid··on The Sisyphean Task of DNS Client Config on Linux
I agree! As a non-expert, I've also had good luck with NetworkManager, but wouldn't recommend systemd-resolved yet if you use DNSSEC:

https://github.com/systemd/systemd/issues/6490 (fixed in v248)

https://github.com/systemd/systemd/issues/8451

https://github.com/systemd/systemd/issues/9867

https://github.com/systemd/systemd/issues/12388

kevinoid··on FFmpeg 4.4
It needs both hardware and driver support. You can check supported formats using vdpauinfo. Nouveau maintains a list of supported formats for different hardware at https://nouveau.freedesktop.org/VideoAcceleration.html (I don't think HEVC is supported by nouveau on any hardware.)
kevinoid··on Ash (Almquist Shell) Variants
> Why not just settle on bash, zsh and fish shell?

When Ubuntu and Debian switched from bash to dash for /bin/sh, the stated motivations were mostly performance (particularly during boot) and size:

https://wiki.ubuntu.com/DashAsBinSh#Why_was_this_change_made...

https://lists.debian.org/debian-release/2007/07/msg00027.htm...

https://lwn.net/Articles/343924/

kevinoid··on Man who thought opening a TXT file is fine thought wrong
Although it was disabled in Debian bash 2.04-5 on 2000-06-05, it was re-enabled in bash 4.0-5 on 2009-09-13 and is currently enabled. See https://metadata.ftp-master.debian.org/changelogs/main/b/bas...
kevinoid··on Pam 1.5.0 has a auth bypass under some conditions
I agree. I think the GP commit introduced the bug and the fixing commit was https://github.com/linux-pam/linux-pam/commit/30fdfb90d9864b...
kevinoid··on Firefox 83 introduces HTTPS-Only Mode
I was interested in this as well. Unfortunately, excluded sites are configured using PermissionManager <https://bugzilla.mozilla.org/1640853> which stores data in permissions.sqlite.
kevinoid··on Deprecating scp
https://github.com/scponly/scponly can be used to prevent command execution and supports chroot. It avoids the server-side scp protocol security issues by rejecting shell metacharacters in commands. It also supports sftp.

If you don't need scp, you could force the use of internal-sftp <https://serverfault.com/a/354618>.

kevinoid··on File Descriptor Transfer over Unix Domain Sockets
Another real-world use case is zero-copy interprocess communication, as in the Wayland protocol <https://wayland-book.com/surfaces/shared-memory.html>. It can also be combined with sealed files <https://lwn.net/Articles/593918/> to avoid some of the pitfalls of shared memory.
kevinoid··on Firefox 80 and my confusion over its hardware accelerated video on Linux
You can read about the specific reasons that driver versions were blocked on the Mozilla Wiki https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drive... Most are due to the drivers causing crashes or security issues in Firefox.

I think a broader answer to your question is that most apps accept that if a driver causes a crash or security problem, it's not their problem and it's up to the user (and driver developer) to remediate it. Firefox has chosen to attempt software fallback to avoid the issues. There are obviously many trade-offs for good and ill with this approach.

kevinoid··on Firefox 80 and my confusion over its hardware accelerated video on Linux
I ran into similar issues with driver blocklists on both Linux and Windows. There are workarounds, such as setting MOZ_GFX_SPOOF_* environment variables, but even the suggestions on the Mozilla Wiki at https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drive... no longer work, because the spoofed driver version (8.15.10.2302) was blocked in https://bugzilla.mozilla.org/843273 It's a mess.

I can understand the desire to avoid using drivers which cause a poor user experience. I don't envy the task of trying to implement and maintain a system to achieve that. I do wish it wasn't so painful and confusing for users when the behavior doesn't match our expectations.

kevinoid··on Windows 10: HOSTS file blocking telemetry is now flagged as a risk
Thanks for the info. What registry changes are required?
kevinoid··on Windows 10: HOSTS file blocking telemetry is now flagged as a risk
Since both the video and Shutup10 cover lots of different settings, I'm guessing you are referring to sending "activity history"[1] to Microsoft specifically? Was disabling it via Settings[2] not sufficient? Is there another registry change that is required? Or was DNS filtering the only solution you found workable?

[1]: https://support.microsoft.com/kb/4468227

[2]: https://www.tenforums.com/tutorials/100341-enable-disable-co...

kevinoid··on UASP makes Raspberry Pi 4 disk IO 50% faster
I was curious about this as well. The issue appears to be lack of scatter-gather support. See: https://github.com/raspberrypi/linux/issues/875#issuecomment...
kevinoid··on Linux to begin tightening up ability to write to CPU MSRs from user-space
For the curious, I think this article is referring to the LKML thread starting at https://lore.kernel.org/lkml/20200612105026.GA22660@zn.tnic/
Page 1 of 3Next →