HNHacker News
TopNewBestAskShowJobs

oddlama

206 karma · joined January 8, 2020

submissionscomments
oddlama··on OpenFLOW – Quickly make beautiful infrastructure diagrams local to your machine
I've written something like this for NixOS a while back [1], which generates infrastructure diagrams directly from the source of truth (albeit not as pretty as isoflow). I'm sure this could be applied to other declarative tech stacks aswell!

[1]: https://github.com/oddlama/nix-topology

oddlama··on Bypassing disk encryption on systems with automatic TPM2 unlock
This is great if you only have a single disk, but if you have multiple encrypted disks that are unlocked in the initrd this way, then if you can gain control flow by faking data on the last decrypted disk you can still gain access to all the previously unlocked partitions.

Of course you cannot unseal the secret from the TPM anymore.

oddlama··on Variadic generics, again
I can think of plenty real world usecases. Take for example a network interface that can send or receive predefined packet structs.

Imagine each packet requires a size header. When you want to send multiple packets at once, you now want to optimize that and only write a single initial header to the interface, preceding the data.

With variadic generics, you can enable a syntax like `interface.write_packets(packet1, packet2, packet3, /* ... */);` which writes the packets in the desired optimized way. It can internally construct a serializable data tuple from the variadic generics and add the correct header only to the beginning.

Without variadic generics a similar syntax is only possible with macros, which means that it cannot be implemented as a reusable trait.

> It would seem to me, you're just skipping the part where you give your tuple a name, but is that even a good idea to do?

Sometimes you explicitly don't want to require naming the tuple for flexibility, like in the example above.

oddlama··on Stanford researchers find only 3% of HTTP runs on port 80 [pdf]
And additionally I would't want anyone on my network path to be able to read what data I exchange - even if it is a static site.
oddlama··on The IAB loves tracking users but hates users tracking them
Not parent, but I'm doing the same thing and I have had 5 leaks out of (currently) 387 accounts over the past 4 years (which is when I started doing this).

Oh and none of the involved entities ever acknowledged the leaks. I'd also be highly interested in the rates other people encounter.

oddlama··on Finding Nice MD5s Using Rust
I haven't looked at the project but would assume that several people generated their wallets by using this tool. The attackers were thus able to generate keys for existing wallets by simply bruteforcing the measly 31 bits that were used in the tool's random initialization.
oddlama··on Saving power on an ESP8266 web server using delays
Just a battery would be the simplest option. Just measure time until empty.

If you want higher time resolution, there are several fully integrated hall effect current measurement ICs out there, like for example the ACS723.

If you need even better accuracy or resolution and you can spare 100 bucks, just buy one of the Nordic Power Profiler Kits.

oddlama··on Eufy “local only” cameras upload facial recognition data to the cloud
Nothing here requires uploading the image to some form of cloud service. Do the recognition locally - maybe on a phone connected via Bluetooth. Never have any information leave the device and you will have significantly less privacy concerns.
oddlama··on GPS vs. Glonass vs. Galileo
If anyone wants to learn about GPS from the ground up, there's an excellent website with interactive explanations by Bartosz Ciechanowski that I can wholeheartedly recommend [1].

His blog also covers other topics in a similar style - it's a real treasure trove.

[1] https://ciechanow.ski/gps/

oddlama··on When did POP and IMAP become a “legacy protocol?”
I for example just wouldn't like anyone to be able to see what data I exchange with any server, be it small profile blog or a login page.
oddlama··on Ask HN: What are the best-designed personal blogs you’ve come across?
Ome of the best I came across, regarding both readability and content:

https://ciechanow.ski/

oddlama··on How do I exit Vim?
esc esc esc :qa!<cr> (8 strokes)

This is the shortest I can think of right now, 3 esc to exit Ctrl-v, Ctrl-r and insert mode, then :qa! to quit even if there are splits or modified background buffers.

If ^C is considered one keystroke I'd replace all esc by ^C to prevent vim from hanging forever in the following starting situation: 999999999asometext^R^V<exit sequence>

With esc it would try to insert a lot of text after the last esc, which will make vim unresponsive for days at least.

Not sure if you want to count this one: alt+sysrq+k (1 stroke or 3 strokes depending on how you count)

oddlama··on Booting Linux in five seconds (2008)
Yes, and it's quite comfortable. If you don't want to use external media, many boards also come with a builtin UEFI shell which is quite powerful. From there you can simply execute the kernel with the desired cmdline. (like ./vmlinuz root=...)
oddlama··on Ask HN: Your admittedly useless side projects?
I got fed up with ansible and pyinfra and created a new tool [1] to fix some of the issues I've had. I spent weeks on documentation, yet it is kind of useless. There simply are industry proven tools for the same thing already in existence - so I'm the only one using it.

[1]: https://github.com/oddlama/fora

oddlama··on Intel's Raptor Lake CPU Appears 20% Faster Than Core I9-12900K on UserBenchmark
Here's some obligatory information about the credibility of UserBenchmark (video form only, unfortunately): https://youtube.com/watch?v=RQSBj2LKkWg
oddlama··on Bubble Tea: fun, functional and stateful way to build terminal apps
I'm actually kind of glad that X11 forwarding didn't stick. TUIs are generally efficiently navigatable using just the keyboard, a property I very much enjoy and frequently miss in "real GUI" apps.
oddlama··on Managing OpenBSD installed packages declaratively
Neither impossible nor tough, but also not a clean way of managing state. You need to keep track of all past things you once did but no longer need.
oddlama··on Major breakthrough on nuclear fusion energy
You can add graphene based technologies to that list.
oddlama··on How to Prevent the Next Heartbleed (2020)
Then the next heartbleed could be a sidechannel not covered in your theorem. Better prepare in any case.
oddlama··on Dinosaur food: 100M year old foods we still eat today
Probably when most other [insert reasearch title] would also classify you as a [insert reasearch title] instead of a hobbyist.
oddlama··on Will Nix Overtake Docker?
You might want to have a look at systemd-nspawn [1], which is basically containerized chroot based on linux namespaces.

[1] https://www.freedesktop.org/software/systemd/man/systemd-nsp...

oddlama··on Secretive: An app for storing and managing SSH keys in the Secure Enclave
I can recommend this guide [1] to setup your yubikey with gpg, which allows you to both use it to sign or encrypt with gpg and also to use it as an ssh key.

[1] https://github.com/drduh/YubiKey-Guide

oddlama··on Direct detection of dark energy: the XENON1T excess and future prospects
Dark Energy != Dark Matter. These are unrelated theories for different things.
oddlama··on Movfuscator: Compile C into only mov instructions
There also is the demovfuscator (https://github.com/kirschju/demovfuscator) which does the opposite and is capable of recovering the control-flow of the original program before movfuscation.
oddlama··on The Bourne shell lets you set variables in if expressions
I'm not your parent comments OP, but I don't like to use -e for similar reasons, and I do have public bash scripts written with explicit error handling [1].

I've tried using -e on multiple occasions, but always had to disable it again because it lead to even worse classes of errors. It hurt me more than it helped, but I also consider my explicit error handling quite pedantic and probably not the norm.

I feel that instead of fixing the problem it just shifts it around, because an exit code != 0 does not generally indicate an error:

* `((i++))` must now be written as `((i++)) || true` or it will probably kill your script, and short hand conditions become foot-guns:

* Statements such as `[[ $i -gt 3 ]] && continue` must now be written in long form in their own ifs, or `|| true` must be appended.

* Want to save the return code? Guess you have to use `command && ret=$? || ret=$?` now.

* Subshells with errors may exit independently and won't notify you of the error at all, because ylur parent is still alive afterwards.

The list goes on and on. Lots of strange edge cases appear. I recommend reading http://mywiki.wooledge.org/BashFAQ/105 which highlights some of them.

In the end, set -e requires you to think just as much as not using it to not randomly crash your program. It just shifts the problem to other statements. I already learned to handle errors in normal bash, and the only thing set -e requires me to do is to change my error handling style in those cases, which to me generally seem more obscure.

If I still have to use set -e, I always use something like the following snippet, so that I at least get a message:

``` set -e function eerr() { echo "error: $0:$1: command failed but status was never checked!" }; trap 'eerr "$LINENO"' ERR``` ```

[1] https://github.com/oddlama/gentoo-install/blob/develop/scrip...

oddlama··on A Mathematical Keyboard Layout (2018)
The older neo keyboard layout and its newer variants like bone (https://neo-layout.org/Layouts/bone) follow a similar approach to provide more symbols, and they're additionally optimized for typing.

These layouts provide several additional layers which give easy access to ASCII special characters, greek letters and frequently used math symbols.

Also there is layer 4, which is pure gold in itself. It provides cursor movement keys, backspace, enter and a numpad close to your home position. I personally couldn't go back once I had tried it.

(Beware that these layouts include the umlauts äöüß as they were designed for german writing, and make use of the additional key for '<' in the lower left corner of german keyboards)

oddlama··on Show HN: Simplenetes – I replaced Kubernetes with 17k lines of shell script
You might enjoy having a look at https://github.com/AlDanial/cloc

It can distinguish between actual lines of code, comments and empty lines for a lot of different languages.

oddlama··on Long-term study reveals harm in regular cannabis use
> “Compared to non-users, regular cannabis users were more likely to engage in high-risk alcohol consumption, smoke tobacco, use other illicit drugs and not be in a relationship at age 35,” Dr Chan said. [...] They were also at higher risk of depression and less likely to have a paid job.

> “Overall, regular use of cannabis [...] was found to have harmful consequences, regardless of the age people began using it.”

I am skeptical that this study is actually representative of the effects of cannabis, and does not instead depend on other, highly correlated effects, which are then presented as the reason. From my general (non-user) perspective, I would assume that there is probably a bias towards groups of people who have a higher chance to use substances in general, or live in a comparatively poor environment.

For example: Children of smokers often become smokers themselves (as numerous credible studies show). If they now start with cannabis, they would be included as the victims of cannabis in the discussed study. However, the causality is probably reversed here.

oddlama··on Colorize Your CLI
Relevant xkcd: https://xkcd.com/927/
oddlama··on Windows Privacy Dashboard: GUI for Windows 10 Privacy Settings
While I get your point, I think when using Windows, the majority of ibstalled software will be closed source. And most, if not all of them have been granted the same level of priviledge a some point during installation.
Page 1 of 2Next →