The author of the install instruction, because "sudo chown -R $(whoami) /usr/local" first gained popularity in how to install Homebrew in macOS.
Homebrew assumed it was being installed on a single-user-at-a-time system, and it didn't want the risk of a bug in its ruby scripting being exploited somehow by insisting on running as root, and it chose /usr/local to install to as it was already in the path... all of these are anathema to Linux users.
* A package manager should leave /usr/local alone as its purpose is to host the user's own software, not distributed software (that's /usr) or vendor software (that's /opt)
* A package manager should run as root, or run its install-the-files portion as root, because it should require the user's admin authority _at that time_ to be permitted to install software that will be in the path of _other users of the system_. If the user takes ownership of the system directory instead, then all their other processes can mess with it too, not just the package manager.
The right thing to do is to install to e.g. /opt/homebrew, and then require users to add /opt/homebrew/bin to their own PATH, which is what Homebrew now does. It only did it after Apple fought against them by using System Integrity Protection to prevent users changing the ownership of /usr/local -- for a while Homebrew told users to write "sudo chown ... /usr/local/*" rather than "sudo chown ... /usr/local" to get around that, and that's what we see here.
The right place for this software on Linux is under /opt or /srv, and it should have the equivalent of "sudo make install", where root is required to install the software to the right place (and after installed there, it can't be modified by regular users), and root is _only_ required for that install step, nothing else.
EDIT: I'm unable to reply to the person whose question I answered, but I'd commend the GP for spotting the macOSism, and recommend everybody be alert to these sorts of tells and impedence-mismatches. You can often spot experienced Windows users doing "Windowsisms" in Linux... and vice-versa! You can see people writing Rubyisms in Python, Cisms in Java, and so on. There's a risk that if they don't adopt the appropriate native idioms for the language/environment/OS, they will introduce subtle bugs, sometimes security bugs. Be on the lookout for this.
> first gained popularity in how to install Homebrew in macOS
That doesn't really make the argument that it's a macOS user who wrote it though does it? It just makes the argument that it was potentially inspired by Homebrew, which has existed on Linux for half a decade.
I didn't really read the rest of your spiel in detail. I asked why you have an opinion about a person I didn't ask for a breakdown of package management and software installation best practices for the last few decades.
Org mode seems to be missing right now. It looks like its aimed more at only programming right now but I can totally see it getting a proper orgmode in the future. It's far more hackable than emacs is!
httpd with some critical files; I'm taking a diversified approach of offline storage and various OS hosts to store the keychains and other things I'd need to bootstrap connectivity to the remaining online services, and maybe I'll host some personal pages as well.
I got annoyed with the openssh bugs this summer and figured I should have some hosts I can mostly not worry about.
In general, I think I want OpenBSD to be the Internet-facing hosts as much as possible, so looking into proxy options for TLS+QUIC.
Sorry, but I hate server-side "helper" functions that generate HTML. For one thing it's never the same as what eventually gets shown on the page. 99.9% of the time you're missing attributes when needs to be hacked around. Debugging is a nightmare. Refactoring is hell. And css programmers have no clue what to do with this.
Maybe I'm missing something here. Why not a templating engine?
In this case, it's a 1:1 mapping to what's on the page, so your concern doesn't apply here. Debugging and refactoring is far easier with Python functions than templates, and CSS programmers just use CSS the usual way.
Templates were originally created for web development in the 1990s, back when web design required complex browser-specific HTML. By using templates, designers were able to work in a familiar language, and programmers could “fill in the blanks” with the data they needed. Today this is not needed, since we can create simple semantic HTML, and use CSS to style it.
Templates have a number of disadvantages, for instance:
- They require a separate language to write the templates, which is an additional learning curve
- Template languages are generally less concise and powerful than Python
- Refactoring a template into sub-components is harder than refactoring Python code
- Templates generally require separate files
- Templates generally do not support the Python debugger.
By using Python as the HTML-generation language, we can avoid these disadvantages. More importantly, we can create a rich ecosystem of tools and frameworks available as pip-installable Python modules, which can be used to build web applications.
> - They require a separate language to write the templates, which is an additional learning curve
Sure, but that's an advantage, not the learning curve obviously. You can't use FastHTML without knowing HTML anyway, at least not from the examples. In fact it's a really complicated way to do HTML. Jinja2 or Django templates are closer to HTML and much easier to reason about.
> - Templates generally require separate files
Again, that's an advantage. Someone who are not familiar with Python could easily update the HTML, and someone who knows Python most likely also know at least some basic HTML.
I don't like this, at all, but I'm also not required to use it.
What do you have trouble reasoning about regarding FastHTML python compared to Jinja2 or Django templates?
To me, it seems like a direct translation, and that's what makes it easy to reason about. I'm curious about what situations you find more intuitive to use Jinja2 over Python.
For example, in FastHTML:
P() -> <p></p>
Div(P()) -> <div><p></p></div>
The lack of a big transformation layer and things being 1:1 is what makes me think it's just as easy to reason about, but it comes with the advantage of a more powerful Python over a templating language.
I agree that this wouldn't be a great solution if you want people who don't know Python to make HTML edits.
> You can't use FastHTML without knowing HTML anyway
We are not talking about the learning curve for HTML but of Django or Jinja or Mustache or whatever templating engines and their special syntax for loops, conditionals, etc.
I think you are missing how htmx (https://htmx.org/) is intended to be used. You still have your regular HTML page and by interacting with that HTML, you trigger server-side functions that return HTML. That HTML is used to update only a small part of your page. htmx works with HTML fragments while HTML templates work with entire pages.
They are awkward to use, usually have a foreign syntax of its own and scale poor with dynamic languages (in terms of ability, not speed). But I also think this solution here is not that good either. It's ok for small stuff or purely tag-based output, but if you have many parameters, it becomes ugly really fast.
We've used those HTML-generators 20 years ago, and they were not really popular. I still use this still for bland XML today. But I can't see this scaling well for a complex website. Maybe there are some more features I've not seen in the documentation, but otherwise I think they should step up some more gears for this. But on the other side, I guess you are not forced to use the helper-functions. At the end they are probably just strings shoved around, so you can use whatever template-engine or string-generator you prefer.
Everything search is the most befuddling one. The delta between Everything and the built-in Windows search can only be described as monumental. A vast gulf. They do not even deserve to be mentioned in the same sentence. Just fucking buy the thing and integrate it, what could they possibly be thinking?
It's because Microsoft isn't really serious with C#. For years it has advertised other languages (e.g. JS on WinRT) or runtime (wasm), support in VS Code is still rather interesting, UI frameworks were never made truly multiplatform and the one which supposedly is is still buggy as hell (maui). C# 12 is a pile of crap (C# 13 looks interesting tho).
So in the end it's good all those tools stay independent and focused.
I don't think it's true that C# isn't taken seriously at Microsoft - some of the frameworks on top of C# come and go, but I worked on JS on WinRT briefly and can say it was never, ever "taken seriously" in the way the core C# language and runtime is. If you want to work with azure or windows, C# will be the obvious best choice for the foreseeable future, and if you want to work with C# outside of those verticals I don't think it's a bad or dead end choice either.
Best at what exactly? I can’t think of a single thing you would pick C# for instead of Java/Go, C/C++/Rust/Zig, Python or JavaScript/Typescript.
Not because C# is a bad language but because it’s not particularly good at anything. It’s a jack-of-all trades which isn’t even the best jack-of-all trades. So unless you have a lot of years put into it, either in your software stack or in your employees there is very little reason to use it in 2024.
But maybe you know of reasons to use that I’m not aware of?
> Best at what exactly? I can’t think of a single thing you would pick C# for instead of Java/Go, C/C++/Rust/Zig, Python or JavaScript/Typescript.
C# was the first to get async/await, generics, LINQ, PLINQ etc - the path-breaking features that shoot up not only productivity but the ability to do certain things in a much better way.
Just because kids have caught up, it doesn't mean we are going to abandon the daddy.
That’s sort of what I said though. You use C# because you used to use it. It’s like that for a lot of languages. I think it’s largely why Java is still around, and the wait paid off considering Java has overtaken C# on many aspects.
but if you were going to pick a tech for a new project without a history of using C#, why would you pick it in 2024? If you’ve got a large .Net stack and a lot of experience with it, it’s still a great choice. I was a c# developer for a decade mind you, and I’m not sure I’ll ever use it again because it sort of lost its foothold despite being in a really great place.
I think you're just in a bubble. dotnet is widely used, and keeps getting better. I can program in many languages and yet csharp will very often be my go to for backend stuff because it's just the best.
Java and Go are both almost unusable at, for example, writing games unlike C# which has rich ecosystem for this, and it has been gaining performance oriented features in every recent version that make it able to compete with C and C++, be it compiler improvements or SIMD API. Meanwhile Java: https://x.com/lemire/status/1803101802700664955?s=46&t=QDsm5...
I’m not sure I agree with C# being the only first class citizen in Azure. A lot of the Azure stuff like the whole automation is done with Powershell (or Python, but what Microsoft ops people does that?). On the development side of things Microsoft is pushing their container apps platform over their app/function platforms and it integrates with virtually everything.
Even on something like their MSGraph SDKs we’re often getting better performance out of the JavaScript SDKs.
I think it’s a little silly to say that Microsoft isn’t taking C# serious. If you look at Azure DevOps, which has not been taken very serious by Microsoft since they acquired GitHub and then compare it to C# there is just a world of difference. I do think it risks going that way. I’m not sure I think Visual Studio is taken fully serious anymore, but it’s still getting much more attention than Azure DevOps and C# is just… miles ahead of every product in terms of seriousness. I do think they are making it more and more like Typescript, I’m sure we’ll eventually see classes replaced by Types and functions being capable of living on their own, but that’s not really a bad thing.
I agree that MS is not completely serious about C#. They spend too much time on adding new language features but not enough on the essentials:
There are big holes and missing bits in the Windows API wrapper that have been there for two decades. Most new MS apps like Teams of VS Code are not written in C#. I suspect it will limp along with hot and cold support from MS.
The Windows API is no longer the focus for .Net. They are very clearly pushing large scale web apps.
I’d be curious to know what percentage of people are still writing windows clients. I suspect there’s a lot of legacy code still out there, but it’s clearly not the future
You can use CsWin32[0] and CsWinRT[1] both of which provide rich generated bindings for their respective APIs. A colleague of mine recently got rid of C++ component thanks to the former, simplifying the solution build.
Yes I saw the REPL in VS 2022 and Jetbrains Rider, but I still prefer having this utility at hand with a collection of scripts ready whenever I need to script up something, or experiment with a service or database, or learn something new in .NET.
LINQPad is probably the most useful mini-IDE that I've ever used and I employ it every single day for .NET prototyping, scripting and experimenting. Joe Albahari's done a great thing with this utility!
There is value in going back in time to revisit old hardware. It helps you gain insight into technology today and who knows inspire someone to take a path that was missed back then. This may lead to original ideas.