Hacker Newsnew | past | comments | ask | show | jobs | submit | ikurei's commentslogin

Although I agree with other commenters that your command can't compare to all of bat's features, many of which I appreciate... thank you for sharing this tip, I didn't know about `highlight` and I can't install `bat` at work.

This will live in my .bashrc for a long time:

    cat() {
      if [[ -t 1 ]]; then
        command cat "$@" | highlight --force -O xterm256
      else
        # plain cat to pipe into other things
        command cat "$@"
      fi
    }


This... doesn't work? Everything just comes out green. It's not clear to me how 'highlight' could even possibly know what syntax it's supposed to be highlighting when processing stdin, unless it ingests the whole thing until EOF and then applies some kind of fuzzy logic. If you feed it a filename as an argument, it just checks the extension.


curious, how did you have highlight installed?

i'd change the third line so you can actually get syntax highlighting:

    command highlight --stdout --force -O xterm256 "$@"


Webapps are rewritten because a developer wanted to use the new shiny, or someone was convinced that everything will be better with the newer frameworks everyone is using. Also, it often goes hand in hand with giving it a more modern look-and-feel.

But the point is not whether webapps are rewritten, but whether they have to be rewritten. I know some old enterprise webapps made with PHP about 10 years ago that are still working fine.

You do have to worry about security issues, and the occasional deprecation of an API, but there is no reason why a web-based service should need to be rewritten just to keep working. Is that true for mobile and desktop apps?


If your webapp is simple a rewrite is no big deal and often cheaper than updating the old. As your project gets large that is no longer true. I work with embedded systems, when everything was small ( 8 bits isn't enough for anything else - new feature often means removing something else) we of rewrote large parts to get one new feature. it was easy to estimate a new project and we came in on time. As projects get bigger (32 and 64 bits are now available) we can't do that we can't afford a billion dollar project to rewrite every year.


>but there is no reason why a web-based service should need to be rewritten just to keep working

I mean most webapps of any size are built on underlying libraries, and sometimes those libraries disappear requiring a significant amount of effort to port to a new library.


It's not that you _need_ sympathy, or that football deserves or needs your sympathy like it's a good cause.

It's just generally good to try to understand others instead of distancing yourself from them. I find F1, jazz, finance, and so many other things to be really boring and uninteresting, but I try to get the people who like those and connect with them. F1 people and jazz people are often more interesting than their interests; I haven't gotten there with finance yet. The world is more interesting this way, but you're under no obligation.

> In a just world LaLiga would get sued into the ground for disabling a public utility on a level equivallent to an international cyberattack.

In a just world LaLiga and FIFA would've been sued into the ground like five scandals ago, but I don't think gtowey was suggesting you try to empathise with them, but with people who like football.


In many football stadiums throughout Spain, chants like "Vaya puta mierda de Liga" and "Corrupción en la Federación" are heard almost every game. It's not the whole of the football world that wants to censor the internet, it's the league and the interests of a few corporations (including, sadly, clubs).

Football piracy is on the rise, because watching football has become extremely expensive in the last few years, even if you just want to watch your teams games. I know many people who used to pay for it; now most of them, including law-abiding citizens who wouldn't normally pirate, are learning how to do it.


> Football piracy is on the rise, because watching football has become extremely expensive in the last few years, even if you just want to watch your teams games.

It's not only become expensive, but they've also been split up by multiple providers. You want to watch the league games? That's one subscription. Champions League? That's another subscription. Chamipions League on a Tuesday? Need Prime for that. So, much like movie/series streaming has been split up between services, so have the football broadcasts. No wonder people are pirating the streams, when the availability is much better a fraction of the price.


It's because the leagues (and therefore the teams) make significantly more money when the rights are shared vs. when they're owned by a single entity. For example, the National Hockey League is in the middle of a seven-year, $4.5B deal with ESPN/Disney and Turner/Warner; their prior deal with NBC/Universal was a ten-year, $2B deal. Even adjusting for inflation, it's a huge increase from $200M/year to $640M/year over that decade -- an increase that happened despite cord-cutting accelerating significantly over the decade of the prior deal.

On the other hand, the MLS went to basically a single provider (all matches air on Apple's streaming service, with select on terrestrial TV and/or cable), and the numbers on that are still reportedly somewhat soft if you ignore the skewing presence of Lionel Messi (but that's a whole other discussion, because Apple was also trying to do something different and overpaid for the rights to do so, and that overpay was a part of bringing in Messi).


The main thing keeping me from trying out Omarchy is the pain of setting up multiple displays. I haven't tried Hyprland, but whenever I've tried a non-mainstream desktop/wm in Linux that was the worst, especially if your setup changes often (as in, you have a laptop and move around and plug it in different places).

May be that just means I'm not enough of a tinkerer for these setups.

Is it a hard problem to remember more than one configuration and link them to the displays connected to your computer? Or is it just that Omarchy users really don't mind editing monitor.conf[1] often?

[1]: https://learn.omacom.io/books/2/pages/86


I use swaywm and kanshi [0]. It's write once, forget forever. I have one config for each of the display compositions I have (office, home, gaming, eDP...), and "it just works".

[0] https://gitlab.freedesktop.org/emersion/kanshi


The community has written a TUI for this: https://github.com/erans/hyprmon

I don't really need it, but maybe my setup is too simple. I set my laptop monitor to auto-right, external display to auto-left and that's it. Set it and forget it for me.


If your external display isn't connected, what happens? Does Hyprland ignore that line from the config without an error and everything works normally?


It's ignored. This setup wouldn't suffice if my external displays used different scaling though, currently they all work fine at scale 1 for me.

  # external display
  monitor = DP-3, preferred, auto-left, 1
  # internal display
  monitor = eDP-1, preferred, auto-right, 1.333333


Since Hyprland still supports wlr-output-management (AFAIK) you can use tools like wlr-randr and nwg-displays. I don't use Hyprland but I used Sway for many years and support for multiple outputs was top notch. You did have to edit your text-based Sway config file, since a major part of the draw for Sway was an i3-like mantra, but you could do declarative configuration for both output and input devices, and it worked well with hot plugging. Combined with handling mixed DPI setups better, the general situation feels a lot better for using multiple monitors with Linux these days.

Editing a text file to configure displays is definitely an acquired taste, though. Maybe Omarchy needs some utilities to provide a UI around those config files.


I just have a bash script that runs on startup which just greps the output of xrandr to determine if I am connected to home/office/no monitors and then runs the appropriate xrandr commands to config them.

On the occasion when I (dis)connect monitors without restarting the laptop, I just have some command line aliases (home/office/laptop) which run the appropriate config


Correct me if I'm wrong but Hyprland is Wayland so xrandr is no go.

There are some utilities for this though. nwg-displays comes to mind


Yes, but you can have a similar setup to what he is describing, just with different commands.

I'm using niri instead hyperland. I can either use `sed` on it's configuration file (on/off, resolution, position) or for some of its configurations I can use the cli (for output scale).


I was worried about that too but switching from one monitor to multiple ended up being plug and play for me. I installed hypermon before thinking I would need it, but I didn't as I got lucky that the monitors positioned themselves correctly and there was nothing else that needed to be changed otherwise.


When's the last time you tried this?

I used to have this issue too but was pleasantly surprised I don't have this issue with my new machine using EndeavourOS w/ wayland. I switch displays a couple times per day and it's been fine.


I simply have an NVIDIA card and I’m afraid of Hyprland because of that


Omarchy auto installs the nvidia drivers and fixes if it detects an nvidia card. https://github.com/basecamp/omarchy/pull/13


OP here. It's seamless whether you go the Omarchy route or CachyOS route. In fact, I have an RTX 4090 and have no issues whatsoever.


This changes, not only over time, but also from region to region.

A close friend of mine travels to China often, and they use Mullvad because of my recommendation. Last year it worked great for them, but earlier this year they went back to China, and it really didn't work.

What I found most interesting is that they had different results in different places. Apparently, in the business areas of Shanghai and Beijing, were they had meetings and events, they could get Whatsapp and Slack messages; when they went back to the hotel, in a residential area where there were almost no offices or tourists, it didn't. In Chongqing even less stuff worked.

I was very skeptical of this when they told me, but they could replicate this consistently over a couple of weeks. It wasn't related to hotel Wifi (that's a different can of worms), this was on mobile data.

Everything worked when they switched to using https://letsvpn.world, at the recommendation of some chinese colleagues of them.

This was with a basic Mullvad install on iOS and Mac, they're not technical enough to harden their VPN connection further; may be they could've easily obfuscated it more and it would've worked.


The GFW being more lenient for tourists (esp. their foreign mobile plan) checks out with the stories I hear too. I'm guessing the less touristy places don't have "support" for these "exceptions" so they get a degraded experience there.


Having to use a monospaced font is a pretty big drawback. To me, it means I wouldn't use this for a product that wasn't intended for a techie programmer audience.

Not that it isn't a really cool project! I'm only saying it has clear drawbacks.


5 companies in a city is probably great, but this is 5 companies globally.

Where I live there's only 2 companies really, and I'm guessing in almost every market it'll be 1 to 3.


I think they meant that XOR avoids the overflow risk, whereas doing the sum of the array to figure out which number could cause an overflow.


(wrapping) overflow doesn't affect the final result.


> Please consider the level of retardation this comment requires, it's impressive.

This is not how we have civilized discussions. To say this just because you disagree with someone about the security of an OS...

Hope the mods see this.


You're conveniently ignoring everything that came before that, where they deconstructed why the idea does not make sense.


[flagged]


> Has nothing to do with rudeness. And "deconstruction" was rather narrow mindedness, that is locking GrapheneOS to corporation made phones.

Corporation made phones as opposed to organically grown phones?

Again, no one is locking down GrapheneOS you can literally download the source and try to get it to run on any device you like. You just want someone else to do the work for you because you lack the skills and it's not available for the particular phone you want.


> Again, this is a fallacy.

Okay, maybe you are not a native speaker, so you might mean a different thing with fallacy.

Here's the dictionary definition of fallacy

> an idea that a lot of people think is true but is in fact false [0] > a false belief [0]

My comment was

> Again, no one is locking down GrapheneOS you can literally download the source and try to get it to run on any device you like. You just want someone else to do the work for you because you lack the skills and it's not available for the particular phone you want.

Here is the link to the GrapheneOS Source: https://grapheneos.org/source

Here's the GrapheneOS FAQ regarding other Devices [1]

> Many other devices are supported by GrapheneOS at a source level, and it can be built for them without modifications to the existing GrapheneOS source tree. Device support repositories for the Android Open Source Project can simply be dropped into the source tree, with at most minor modifications within them to support GrapheneOS. In most cases, substantial work beyond that will be needed to bring the support up to the same standards. For most devices, the hardware and firmware will prevent providing a reasonably secure device, regardless of the work put into device support.

[0] https://dictionary.cambridge.org/de/worterbuch/englisch/fall... [1] https://grapheneos.org/faq#supported-devices

Where's the fallacy?

---

Now after editing he makes this argument instead:

> And while I am searching for a way for GrapheneOS to grow, you are searching for a way to keep it limited to corporation made phones. And it is corporations that have the most interest to make it insecure trough hardware, SOC is just one day to do it. So you are failing even on security perspective.

There are no not-corporation made phones on this planet. Every conceivable part of a phone is made by a corporations from parts extracted from this planet by corporations, shipped and assembled by corporations. Do you think that the Fairphone, made by the fairphone corporation is not made by a corporation? From There Wikipage [2]

> Fairphone B.V. > Company type Privately held company

> And it is corporations that have the most interest to make it insecure trough hardware, SOC is just one day to do it. So you are failing even on security perspective.

So google, spending literally billions [3] on cybersecurity with a direct interest and industry leading track record in keeping pixel devices secure has an interest to make it insecure?

I stand by judgment: The required retardation for this kind of argument is amazing.

[2] https://en.wikipedia.org/wiki/Fairphone [3] https://blog.google/technology/safety-security/why-were-comm...

---

So, i'm dealing with a first grade tech student that learned some cybersecurity words. Here's how you can prove me wrong, answer the following simple questions:

1. Why should the GrapheneOS Developers do the work you want them to do? They seem uninterested and I don't see you paying them the 100s of thousands of dollars to hire someone to do the work for them.

2. Name a Phone that's not made by a corporation.


[flagged]


Okay, i have to admit you got me. 10/10 Ragebait until that last edit I was thinking you were serious, but you cannot be. Thank you gave me a good laugh and I haven't been this triggered in a while. Before he edit's let me copy his last edit for posterity, it's amazing.

---

> 1. Why should the GrapheneOS Developers do the work you want them to do? They seem uninterested and I don't see you paying them the 100s of thousands of dollars to hire someone to do the work for them.

They dont do any work regarding security that would matter. As hardly anyone is using GrapheneOS. Most people use it for privacy, I don't know a one single person that would use it for security, I have bootloader unlocked as I don't care, its not something that would be a reasonable threat to me, while government actors are not something, I can defend against as they will break my legs and I will beg them to allow me to enter pin.

> 2. Name a Phone that's not made by a corporation.

So they can immediately stop doing it. It is futile, insecure and worthless even from perspective of privacy unless they give people a chance to use it. And currently they dont with excuse of security.

---

Something about gay fish.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: