Readit News logoReadit News
franga2000 commented on macOS dotfiles should not go in –/Library/Application Support   becca.ooo/blog/macos-dotf... · Posted by u/zdw
Hendrikto · 13 hours ago
This has been a solved problem forever. It is very simple, very easy, very short, extremely maintainable code.

When writing the files, check the old location first, fall back to the new one. When reading, check check the new location first, fall back to the old one.

The app does not need to migrate anything. Using the algorithm described above, new installations will automatically use the new paths, old installations will continue using the old paths, but can optionally be migrated at the user’s convenience.

franga2000 · 11 hours ago
But how do you find the old location? Do you need to build against both libraries, call old_lib.get_path(), check if it exists, then call new_lib.get_path(), copy the files, delete the old dir, them and then read from the new one. What if it's a symlink? What if copying fails mid-way? Does the library or the program handle all of this? Can you even compile against both libraries if one is a fork of the other (namespace issues)?
franga2000 commented on macOS dotfiles should not go in –/Library/Application Support   becca.ooo/blog/macos-dotf... · Posted by u/zdw
kstenerud · 16 hours ago
Sounds like it's time to make a fork of dirs-rs that actually follows the rules.

Most libraries that use dirs-rs are doing so because they don't want to have to think about those things. So if there were a library that did it right, you'd probably have decent adoption if it's a simple crate replacement.

franga2000 · 14 hours ago
Where do I store my files is never a simple replacement. At the very least you need to write a migration routine and maintain it for a very long time.
franga2000 commented on Modern CI is too complex and misdirected (2021)   gregoryszorc.com/blog/202... · Posted by u/thundergolfer
stonemetal12 · 6 days ago
>I use it because it's the easiest way I've found to get all of these features. Every deployment I've seen that didn't use containers and something like k8s either didn't have a lot of these features, implemented them with a bespoke pile of shell scripts, or a mix of both.

Features aren't pokemon you don't have to catch them all.

Back when stackoverflow was cool and they talked about their infrastructure, they were running the whole site at 5 9s on 10-20 boxes. For a setup like that k8s would have A) required more hardware B) a complete rewrite of their system to k8sify it C) delivered no additional value.

k8s does good things if you have multiple datacenters worth of hardware to manage, for everyone else it adds overhead for features you don't really need.

franga2000 · 6 days ago
A) Not much more. The per-node overhead is relatively small and it's not unlikely that they could have made some efficiency gains by having a homogenous cluster that saved them some nodes to offset that.

B) Why on earth would you need to do that? K8s is, at its core, just a thing that runs containers. Take your existing app, stick it in a container and write a little yaml explaining which other containers it connects to. It can do many other things, but just...don't use them?

C) The value is in not having to develop orchestration in house. They already had it so yea, I wouldn't say "throw it out and go to k8s", but if you're starting from scratch and considering between "write and maintain a bunch of bespoke deployment scripts" and "just spin up Talos, write a few yaml files and call it a day" I think the latter is quite compelling.

franga2000 commented on Modern CI is too complex and misdirected (2021)   gregoryszorc.com/blog/202... · Posted by u/thundergolfer
mettamage · 6 days ago
> you likely do need zero-downtime deployment

I know SaaS businesses that don't as they operate in a single country, within a single timezone and the availability needs to be during business days and business hours.

> easy rollbacks

Yea, I haven't seen exceptions at all on this. So yea.

> server fault tolerance

That really depends. Many B2B or internal apps are fine with a few hours, or even a day, of downtime.

> service isolation

Many companies just have one app and if it's a monolith, then perhaps not.

> Hand-rolling even one of those things

Wow, I see what you're trying to say and I agree. But it really comes across as "if you don't use something like Kubernetes you need to handroll these things yourself." And that's definitely not true. But yea, I don't think that's what you meant to say.

Again, it depends

franga2000 · 6 days ago
I'm definitely curious about alternatives for getting these features without k8s. Frankly, I don't like it, but I use it because it's the easiest way I've found to get all of these features. Every deployment I've seen that didn't use containers and something like k8s either didn't have a lot of these features, implemented them with a bespoke pile of shell scripts, or a mix of both.

For context, I work in exactly that kind of "everyone in one time zone" situation and none of our customers would be losing thousands by the minute if something went down for a few hours or even a day. But I still like all the benefits of a "modern devops" approach because they don't really cost much at all and it means if I screw something up, I don't have to spend too much time unscrewing it. It took a bit more time to set up compared to a basic debian server, but then again, I was only learning it at the time and I've seen friends spin up fully production-grade Kubernetes clusters in minutes. The compute costs are also negligible in the grand scheme of things.

franga2000 commented on Modern CI is too complex and misdirected (2021)   gregoryszorc.com/blog/202... · Posted by u/thundergolfer
s_Hogg · 7 days ago
Holy shit you don't get anything for _free_ as a result of adopting Kubernetes dude. The cost is in fact quite high in many cases - you adopt Kubernetes and all of the associated idiosyncrasies, which can be a lot more than what you left behind.
franga2000 · 7 days ago
For free as in "don't have to do anything to make those features, they're included".

What costs are you talking about? Packaging your app in a container is already quite common so if you already do that all you need to do is replace your existing yaml with a slightly different yaml.

If you don't do that already, it's not really that difficult. Just copy-paste your your install script or rewrite your Ansible playbooks into a Dockerfile. Enjoy the free security boost as well.

What are the other costs? Maintaining something like Talos is actually less work than a normal Linux distro. You already hopefully have a git repo and CI for testing and QA, so adding a "build and push a container" step is a simple one-time change. What am I missing here?

franga2000 commented on Modern CI is too complex and misdirected (2021)   gregoryszorc.com/blog/202... · Posted by u/thundergolfer
dapperdrake · 7 days ago
Unix filesystem inodes and file descriptors stick around until they are closed, even if the inode has been unlinked from a directory. The latter is usually called "deleting the file".

All the stuff Erlang does.

Static linking and chroot.

The problems and the concepts and solutions have been around for a long time.

Piles and piles of untold complexity, missing injectivity on data in the name of (leaky) abstractions and cargo-culting have been with us on the human side if things for even longer.

And as always: technical and social problems may not always benefit from the same solutions.

franga2000 · 7 days ago
Ok so let's say you statically link your entire project. There are many reasons you shouldn't or couldn't, but let's say you do. How do you deploy it to the server? Rsync, sure. How do you run it? Let's say a service manager like systemd. Can you start a new instance while the old one is running? Not really, you'll need to add some bash script glue. Then you need a loadbalancer to poll the readiness of the new one and shift the load. What if the new instance doesn't work right? You need to watch for that, presumably with another bash script, stop it and keep the old one as "primary". Also, you'll need to write some selinux rules to make it so if someone exploits one service, they can't pivot to others.

Congrats, you've just rewritten half of kubernetes in bash. This isn't reducing complexity, it's NIH syndrome. You've recreated it, but in a way that nobody else can understand or maintain.

franga2000 commented on Modern CI is too complex and misdirected (2021)   gregoryszorc.com/blog/202... · Posted by u/thundergolfer
mettamage · 7 days ago
IMO development is too complex and misdirected in general since we cargo cult FAANG.

Need AWS, Azure or GCP deployment? Ever thought about putting it on bare metal yourself? If not, why not? Because it's not best practice? Nonsense. The answer with these things is: it depends, and if your app has not that many users, you can get away with it, especially if it's a B2B or internal app.

It's also too US centric. The idea of scalability applies less to most other countries.

franga2000 · 7 days ago
Requirements are complex too. Even if you don't need to scale at all, you likely do need zero-downtime deployment, easy rollbacks, server fault tolerance, service isolation... If you put your apps into containers and throw them onto Kubernetes, you get a lot of that "for free" and in a well-known and well-tested way. Hand-rolling even one of those things, let alone all of them together, would take far too much effort.
franga2000 commented on Show HN: Whispering – Open-source, local-first dictation you can trust   github.com/epicenter-so/e... · Posted by u/braden-w
divan · 8 days ago
As many other people commented on similar projects, one of the issues of trying to use voice dictation instead of typing is the lack of real-time visual indication. When we write, we immediately see the text, which helps to keep the thought (especially in longer sentences/paragraphs). But with dictation, it either comes with a delay or only when dictation is over, and it doesn't feel as comfortable as writing. Tangentially, many people "think as they write" and dictation doesn't offer that experience.

I wonder if it changes with time for people who use dictation often.

franga2000 · 8 days ago
There are many situations where dictation makes far more sense. Around here, all doctors dictate into a recorder (often with a foot pedal) that the nurse transcribes, because typing would be distracting and also unsanitary when examining the patient. Some have started using machine transcription, often in the cloud. This is terrible for privacy and security, even when it's "GDPR certified", whatever that means. Having a local option is amazing for that.

Similarly, I've used dictation when working on something physical, like reverse engineering some hardware, where my table is full of disassembled electronics, I might be carefully holding a probe or something like that, and having to put everything down just to write "X volts on probe Y" would slow me down.

franga2000 commented on Show HN: NextDNS Adds "Bypass Age Verification"    · Posted by u/nextdns
notepad0x90 · 9 days ago
Even if this was a good idea, ID verification technology should not be outsourced to private parties. This is a service governments themselves must provide. I shouldn't need to upload an ID because the government already has it!

If they simply wanted age verification, the dumb and lazy way is to SSO through a government managed portal with OAUTH2 and you only share your age with the third party. You do a one time account setup (you already have to do this in the US for many government services at the federal level) with age verification, that's your gov portal login. This means the government will now which naughty sites you visit of course, but like I said, it is the lazy approach, and if you think about it, if they respect the laws then a law can be passed to prevent them from storing or using that association, if they didn't, they could still sniff your traffic and wiretap you.

A slightly smarter approach would be to directly auth against a government portal and be given a 24h expiring code for age verification, and the government will publish an updated list of codes to trusted businesses. Those codes could be leaked, but making it a felony should deter most cases, because who wants to go to prison to let some kids watch porn?

Smarter people than me can come up with smarter solution, that is really my point. Involving third-parties and requiring you to upload documents is done either out of extreme incompetence or opportunistic malice by elected officials (bribery).

franga2000 · 9 days ago
Every possible solution is terrible, many people have thought about this and nobody has found one that isn't.

The "24 hour code" one you suggest is something the EU is prototyping. Since there's nothing stopping an adult from sharing their code with a minor, or even code-sharing (or selling) websites to pop up, they want it to be bound to a particular device. So what they've done is added integrity checks to the app, so you can only run it on a locked down phone.

Want to run GrapheneOS for privacy and security? Or use an unofficial ROM to get updates on a phone the manufacturer stopped supporting? Just want to uninstall the bloatware and spyware the manufacturer installs? Want to use Linux? Have an old computer without a TPM? All of that and more - congrats, no "adult content" for you.

And no, it's not "porn", it's "adult content", which is a much broader and blurrier category. Is discussion of sexual orientation or gender issues adult content? Sex education? Medical information about "private parts"? News articles mentioning scary things like rape?

This is bad technology and it should never be developed. Do Not Create The Torment Nexus.

franga2000 commented on Show HN: OverType – A Markdown WYSIWYG editor that's just a textarea    · Posted by u/panphora
jagged-chisel · 9 days ago
The animated exploded demo definitely shows formatting differently from plain text (bold is bold, hyphens replaced with bullets.)
franga2000 · 9 days ago
Fair, but so do many syntax highlighters (at least bold, italic, titles...).

u/franga2000

KarmaCake day5626March 5, 2015
About
https://m.frangez.me

hn.miha@derp.si

[ my public key: https://keybase.io/franga2000; my proof: https://keybase.io/franga2000/sigs/I_z0wMMPACHc4nSoV62Smo8FVsZivU6eFqzKLLQfU8w ]

View Original