Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 5y ago · link · parent

In my experience, Magit is slow even on Linux. On my small repos at home, subjectively magit-status seems to take around 0.2-0.3 seconds. And that's just status, the most basic information you ask of git. Committing is several times slower. On a large codebase at work, magit-status usually takes around 10 seconds, sometimes longer. Again, I'm usually running it to just check some basic metadata (what branch I'm on, do I have a dirty tree, if yes, then what files are changed), so it's frustrating to wait. Honestly, I'd expect stuff like that to update effortlessly in real time without me issuing any commands. This is what happens in some other editors. However, currently I'm glued to Emacs because of Tramp for working remotely in a nice GUI and org-mode for time-tracking (TaskWarrior/TimeWarrior isn't for me).

I prefer Fork on Windows and Mac (prefer the Windows version for aesthetic reasons). Unfortunately, it's not available for Linux.

comment 5y ago · link · parent

I didn't downvote, but it's a low-effort comment that doesn't really add anything to the discussion. There is no information, no argument, no widening of context, no additional perspective, nothing. It also isn't an acknowledgement-type reply like "I see" ending a discussion. In other words, it decreases signal-to-noise ratio. You can compare it to "congrats" email chains at corps.

EDIT: It would be ok in a live discussion. But on a forum, not so much.

comment 5y ago · link · parent

Streamers don't pay Twitch for the service. Twitch pays streamers in return for the ad revenue/subscriptions that they generate. They make Twitch money and get a tiny part of it in return. It sounds a lot more like being employed than being a customer. It's the subscribers who fit the picture of service customers.

comment 5y ago · link · parent

Thank you for the detailed reply. I'll try it out (in a VM first).

comment 5y ago · link · parent

I've read people admitting that Nix can give you a lot of work from time to time, when something isn't already available for Nix (which happens more often than, say, for Debian), and you want to add it to your system. Is that true in your experience? I may be phrasing it wrong.

What is the learning curve of Nix?

comment 5y ago · link · parent

And FBI won't break into it!

comment 5y ago · link · parent

Most compilers will warn about misleading indentation. This is misleading indexing. A program containing misleading indentation is also standards-compliant, but that's completely irrelevant when talking about what code should trigger warnings.

comment 5y ago · link · parent

> For some reasons it often works for Windows and MacOS, why wouldn't it work for Linux?

Does it work though? What evidence supports this claim? I use Windows with no AV and I've been having no problems. Mainly because I don't install software from shady sources. But I know people who install pirated software, because they can't afford it (a common situation for e.g. architecture students), or pirated games and use an AV and after some time their computers become universally unusable, because of course they got a load of malware. AVs do not protect them. Builtin security mechanisms in Windows (such as UAC) bring a lot more benefit to me than AVs bring to those who pirate software.

> Considering the number of breaches of NPM/Rubt repos and other projects hosted on github/gitlab, it surely looks like no one really does anything to tackle them.

People obviously are doing something. Effort is going into Wayland, we continue getting new Linux namespaces in new kernels, firejail is under continued development, some people rewrite their apps from C to Go and Rust (newsboat, coreutils for Debian recently), even more of them gets written in one of those languages, when started from scratch.

It may be that things are moving a bit slow, but such is life in FOSS. NPM doesn't have anything to do with Linux Desktop. If Linux Desktop relied on NPM for security, it would be obviously broken (since distributing software any other way would sidestep NPM mitigations).

> You cannot expect much from that while a basic AV could provide at least a modicum of additional protection and safety.

Again, I would like to hear what exactly a Linux AV would do. Just compare file checksums against a db? What system APIs would it use? How is an "antivirus" superior to a sandbox? How would it be able to prevent Xorg keyloggers? How would we audit it?

> Android solves it by not allowing the user to get root permissions and completely isolating apps. That's unlikely to ever happen to Linux on the desktop.

It is exactly what you can do with firejail. The issue with Xorg and firejail is that there is a socket to the outside world that needs to be available in the sandbox for any X apps to work, and then all Xorg issues are available. But that's a flaw of Xorg, not firejail.

> AV vendors have a reputation to keep.

Just like Apple has a privacy reputation to keep, yet doesn't provide end-to-end encryption for the data which is sent to iCloud. They still get to be "champions of privacy". Just like Zoom has a reputation to keep and had a major issue in that regard as well. If it is proprietary, then I have less of a reason to trust it, not more because of a "reputation".

> That's absolutely true but they work this way to fight off low level malware/rootkits. You can't have it any other way. The same applies to Linux unfortunately - in order to protect against malicious kernel modules you need to hook into the kernel.

The way to protect against malicious code in the kernel is to move as much code out of the kernel as possible. I certainly don't feel more secure by having more proprietary code run with elevated privileges.

Overall, if Linux security issues cannot be solved systematically, then I really doubt they could be solved with an antivirus. A better bet at that point would be ditching Linux for something else. (In the future maybe some operating systems will be built on seL4, which is promising.)

comment 5y ago · link · parent

The page outlines some security issues of Linux Desktop. It doesn't explain how an antivirus would mitigate them. It just ends with

> As you can see, having a decent antivirus in Linux is not that a crazy idea.

Well, actually, it is far from obvious. Antivirus software even on Windows is commonly the thing that makes the system more vulnerable, not less. This page however uses the word "antivirus" as "a magical piece of software that protects the computer against viruses". How does it do that?

The idea that to fix a security issue you should install an additional program which "increases" security is dubious.

The problems listed on the page are real and we should tackle them. However, I don't think that an "antivirus" is the right solution. Instead security should be treated in a systematic way, not something that you add to a system, after it's done. I think we should invest in, among others, sandboxing techniques, move away from Xorg, write system software in memory-safe languages.

Security is not an app to be installed. It's an architectural problem.

It's also ironic that most of the points listed on the page apply equally well to antivirus software. Namely, are distro maintainers qualified to verify antivirus code? What if an antivirus gets compromised? An open source antivirus could also get code submissions with cleverly hidden backdoors. And what if it's proprietary? (Most of them are.) They also commonly run with elevated privileges (the point about sudo).

comment 5y ago · link · parent

And... I got rickrolled. Well played.

comment 5y ago · link · parent

I chuckled, when I got to "FORMAT". It sounded familiar, like the C "printf" function often used in IOCCC.

comment 5y ago · link · parent

"n" is not a variable in your example. It's still just syntactic sugar for templates, where the n needs to be known statically. Even without the "resizable" bit, you still limit this function to operating on arrays of sizes known statically, which is a severe limitation, making the whole thing impractical.

comment 5y ago · link · parent

Are you saying you consider std::array<int, 5> in C++ to be a dependent type? I'm pretty sure it's not right. I'm pretty sure that the "value" in that quote is, implicitly, a "runtime value", or "value of a variable", similar to how we often say "type" without saying "type of a variable". This "5" isn't the value of a variable, it's just an expression. If you continue on to the next paragraph on this Wikipedia page, you will read, first:

> The return type of a dependent function may depend on the value (not just type) of one of its arguments. For instance, a function that takes a positive integer n may return an array of length n, where the array length is part of the type of the array.

second:

> A dependent pair may have a second value of which the type depends on the first value. Sticking with the array example, a dependent pair may be used to pair an array with its length in a type-safe way.

Generally, it's the same nomenclature as with the explanation of static vs dynamic type systems: in static type systems, types are attributes of variables, functions and expressions, whereas in dynamic type systems types are attributes of values. And in the static type system of C, 5 has type int, because it's an expression. It representing a value is secondary. A side effect of it is: you can write a compile-time constant in C that will overflow its type, because the type is assigned based on the lexical category, not on the value.

As far as I understand, in a dependent type system it should be possible to implement a resizable array "std::vector<int, n>", where n is the length of the array (a variable), then write a "concat" function which concatenates two such arrays, and whose return (static) type depends on the lengths of the arrays passed as arguments. This is different than parametric polymorphism, such as the one that C++ has, since we can't know at compile-time all the possible lengths of arrays that we're going to get at runtime. Idris example here: https://idris2.readthedocs.io/en/latest/tutorial/typesfuns.h...

If someone has a better understanding of the topic, I'd be delighted to be shown wrong.

comment 5y ago · link · parent

Try watching Netflix in Firefox or Chromium. Or enable smooth scrolling in Firefox and hit PageDown a couple times. The issue with scrolling can be resolved by enabling hardware acceleration, but this isn't the default in Firefox and the obscure config breaks from time to time. Until hardware acceleration becomes the default, not an opt-in, I consider this feature broken.

Aside from Netflix, I'll sometimes see tearing even on YouTube, when I put it on fullscreen. Luckily, there is mpv with builtin youtube-dl support, which solves this problem. But I haven't found a solution for Netflix, other than rebooting into Windows, or switching to my Mac.

comment 5y ago · link · parent

What can I say. That's a good blog. :)

comment 5y ago · link · parent

HN traffic isn't all that demanding[1]. Websites falling under the load are a testament to the poor quality of the software stack used to host them.

[1]: <https://xyrillian.de/thoughts/posts/latency-matters-aftermat...>

comment 5y ago · link · parent

The following uBlock Origin cosmetic filters seem to do the job:

  news.ycombinator.com##.athing:has([href="from?site=aeon.co"])
  news.ycombinator.com##.athing:has([href="from?site=aeon.co"]) + tr
  news.ycombinator.com##.athing:has([href="from?site=aeon.co"]) + tr + tr

comment 5y ago · link · parent

I've got an M1 Mac (mini) sometime ago. This is my first mac. What surprised me most is how buggy the OS is. I frequently see crashes of core system services (system settings, app store), night shift with "sunset to sunrise" doesn't work at all, on second boot spotlight search stopped finding any programs whatsoever without giving any error messages hinting what went wrong. And of course resizing windows, something that you don't really think about on Windows and Linux, is something that requires effort and focus. And of course the OS is ugly as hell.

What bugged me most though is the keyboard and the mouse (I got myself the official ones). Last week I gave up and decided I'm not using this computer until I get alternative keyboard and mouse, because my hands just can't stand the official ones.

I'm writing this, because Mac had a reputation for being polished. But what I'm seeing is a lot less polish than even desktop Linux in 2021 has. It really surprised (and disappointed) me.

Coupled with better developer tools, I think Windows is more pleasant to use these days, but we'll see, maybe after changing the keyboard and mouse I'll change my mind.

comment 5y ago · link · parent

Is there a browser extension for filtering out HN submissions from nonsense domains like aeon.co?

comment 5y ago · link · parent

Dupe of <https://news.ycombinator.com/item?id=26664361>

comment 5y ago · link · parent

Ok, maybe this you will judge as something constructive: when the underlying medium is case-insensitive, your application cannot behave in a case-sensitive way. But frequently I care about case-sensitivity in my searches. I gave an example in my top-most comment: "us" vs "US". On the other hand, when the underlying medium is case-sensitive, the application can implement case-insensitivity on its own. I do it all the time. Sometimes I want to run "find . -name", sometimes "find . -iname", and the first one not because I forgot about the second.

> Reading replies here convinces me even more that you just picked 'something something windows' and react like a bull does to a red rag.

Completely missed. I appreciate a lot of design choices behind Windows and use it with pleasure. However, I judge this one aspect of it negatively. It's also a source of recurring problems with Git on Windows.

Windows itself has case-insensitivity largely for backwards-compatibility reasons (from the times of MS-DOS). The underlying filesystem (NTFS) itself is case-sensitive, it is the OS API that normalizes filenames, and is itself case-preserving, rather than case-insensitive, when it comes to writing files.

UPDATE: another point: I may want to have a directory with an image for every character of my alphabet with files named accordingly. With a case-insensitive filesystem I can't have an "a.svg" and an "A.svg" in the same directory.

comment 5y ago · link · parent

I have bothered to read the link.

The point of those questions wasn't to see if there are answers to them. The point of those questions was to show that all answers to them are flawed.

Yes, the link provides one set of answers. (Except for the backwards-compatibility and changing language question.) But it doesn't solve the problem.

When you want case-insensitive search, it's the search tool's job to provide it. E.g. whenever you want to do a case-insensitive search inside a file, you pass "-i" to grep or click a checkbox in a GUI. You don't change the file system to normalize characters inside files.

From the link, it also seems like the main motivation for the change is compatibility with Windows software. In particular, it mentions that it isn't something that should be enabled globally in the file system. It really isn't a convenience for the user.

The article makes a good case for providing compatibility with Windows software. But not for much else.

Thank you gor being exhibit A

comment 5y ago · link · parent

Should that work different for different languages? Imagine the mess. Maybe the file names aren't even written in any human language. Should we use English rules for all languages? Why? What makes English so special that English characters would be normalized, but characters from the native language of the user won't? Wouldn't that trip people up?

Case-insensitive file systems are mostly advocated for by those who only or mainly speak English and aren't aware of how much variety there is in the languages across the globe.

And even in English "us" is a pronoun, whereas "US" is a country.

EDIT: another question: should the normalization rules be changed when the language changes? Break backwards-compatibility?

comment 5y ago · link · parent

Wow. That's a great idea! nslookup is available on more devices than curl/wget.

comment 5y ago · link · parent

It's very good that it doesn't redirect to HTTPS. I frequently work with little devices which have a curl/wget version that only supports very basic HTTP, but no HTTPS. It's always a pain to find a website which will work with that.

comment 5y ago · link · parent

Nobody cares, until the choice of language has practical consequences for the end user. E.g. I'm not touching anything written in Ruby because of my bad experiences with the mess Gems leave in the system.

Nobody cares as long as your choice of language doesn't make the program into its own special thing that needs to be handled differently than all other programs. When it does, I will not only care about your choice of language, but also about your choice of toolkit (e.g. Gtk3 being out of place outside of Linux/Gnome).

On the server it's less of an issue, because it's mostly the developer that needs to deal with the consequences of their choices, not the end user.

comment 5y ago · link · parent

> The issue tracker may quickly start to fill in. “Thank you, this is exactly what I needed” would be a heartwarming thing to read, but you will never see such a comment ever.

As a counterpoint, I'd never wish to see such comments made in GitHub issues for my projects. To me it's just spam. I also feel really awkward replying to such comments. A bug report (if it is an actual bug) is however welcome to me, because it lets me see that there is an issue in something I wrote. The first time someone filed a bug against my program (not a thank you, but an actual bug report), I was really happy that someone made the effort to let me know about a flaw in my insignificant creation.

That said, when the volume of tickets filed on the bug tracker is big enough, I'd consider having the bug tracker open only for paying users. Handling those tickets is real work and the author is entitled to payment for it when someone demands it. Doing it right from the start regardless of volume is also totally reasonable.

Alternatively, the author may decide that they just don't care about bug reports from others. In this case, GitHub doesn't seem to be the best platform for their project. A basic cgit instance should suffice or a tarball on a website - no place to file bugs.

From yet another perspective, when I want to contribute to a project, I outline on the bug tracker a potential contribution, ask whether that would be welcome, if I should start working on it or maybe there are some changes needed, and then I don't get any kind of response for months, it's off-putting. A "no", "I don't care" or "I don't have time for it" would suffice. It's comparable to ghosting in the world of dating. Just say "no" and everyone will be better for it.

comment 5y ago · link · parent

I sometimes browse r/EarthPorn[1]. One in 30-40 photos satisfies me enough to be a desktop background candidate.

[1]: <https://old.reddit.com/r/EarthPorn/>

comment 5y ago · link · parent

> Haskell has the C preprocessor

I'm not sure what you mean by that. Are you saying you can use #ifdef, #include etc. in Haskell code?

> No offense but this just sounds like bad design.

I agree. However that's just one way you get multiple definitions for the same struct. I think a language should detect such an error. It will detect it for functions. If linkers did not detect multiple function definitions, would you shrug it off by saying "having multiple function definitions is bad design"? (I'm asking in a non-accusatory way. I'm not sure how to word the question more gently.)

Many of us don't have the luxury of choosing the quality of code we're employed to debug. It would be nice if languages had some rudimentary sanity-checks to, well, preserve our sanity.

1
505152
55