Readit News logoReadit News
ikurei commented on Bat: Cat with syntax highlighting   github.com/sharkdp/bat... · Posted by u/Olshansky
iefbr14 · 3 months ago
cat <whatever> | highlight --force -O xterm256 | less -SRNI

works fine for me.

ikurei · 3 months ago
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
    }

ikurei commented on You Want Technology with Warts   entropicthoughts.com/you-... · Posted by u/tartoran
behnamoh · 3 months ago
> There’s a chart in the presentation that shows how environmental churn and api deprecation leads desktop applications to have an expected lifetime of maybe a decade, and phone apps closer to a couple of years. On the other hand, simple web pages have worked unmodified for over 40 years! That’s a good reason to default to the web as a technology.

isn't it the opposite? Just take a look at any web app and tell me if it wasn't rewritten at some point due to the rapid shift in web frameworks and hype cycles. heck, even HN was rewritten afaik.

meanwhile i have Matlab that has remained literally the same for over a decade.

ikurei · 3 months ago
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?

ikurei commented on LaLiga's Anti-Piracy Crackdown Triggers Widespread Internet Disruptions in Spain   reclaimthenet.org/laligas... · Posted by u/akyuu
moffkalast · 3 months ago
What are you even on about, why would I need sympathy for an optional interest that is by all accounts pretty mainstream and well established worldwide? It's not a disability, it's not an endangered species, it's a billion dollar commercial industry. I just don't see the appeal.

In a just world LaLiga would get sued into the ground for disabling a public utility on a level equivallent to an international cyberattack. Oh but how will the poor millionaires break even with their overpriced streaming services if they can't destroy the internet to block some pirates? Jesus Christ, the audacity.

ikurei · 3 months ago
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.

ikurei commented on LaLiga's Anti-Piracy Crackdown Triggers Widespread Internet Disruptions in Spain   reclaimthenet.org/laligas... · Posted by u/akyuu
Al-Khwarizmi · 3 months ago
I'm from Spain, never watch football or pay any attention to it at all, and this year I noticed the day that the Liga started due to the internet suddenly working like crap. After various websites failing to respond I thought "I bet the football season has started again", I googled it and indeed, it started that day. I resubscribed to my VPN right there and then.

This situation (which has already been going on for a year or so) has made my attitude towards football change from "I don't like it, but live and let live" to outright hate.

ikurei · 3 months ago
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.

ikurei commented on Show HN: Omarchy on CachyOS   github.com/mroboff/omarch... · Posted by u/theYipster
ikurei · 3 months ago
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

ikurei commented on Ask HN: The government of my country blocked VPN access. What should I use?    · Posted by u/rickybule
rglynn · 4 months ago
So there's a disconnect between what you're saying and what others and myself have experienced in China even recently. You appear to be saying that it's not possible to use a VPN to bypass the GFW, but I apologise if I have misunderstood.

The comments have multiple examples of people successfully bypassing the firewall. I personally just used Mullvad with wireguard + obfuscation (possibly also DAITA) and it just worked. No issues whatsoever.

ikurei · 4 months ago
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.

Deleted Comment

ikurei commented on Show HN: OverType – A Markdown WYSIWYG editor that's just a textarea    · Posted by u/panphora
janwilmake · 4 months ago
Really cool! I just love the simplicity of it: has no drawbacks compared to regular textarea, but has lots of benefits. you basically improved textarea, by a lot!

I also made a similar thing a while ago called contextarea.com, maybe, I should add overtype!

ikurei · 4 months ago
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.

ikurei commented on Five companies now control over 90% of the restaurant food delivery market   marketsaintefficient.subs... · Posted by u/goinggetthem
efitz · 5 months ago
If there are 5 companies, doesn’t that count as “competition”?

If not, how many companies does there have to be to have “competition”?

If there were only 1 or 2 companies, that would seem much more of a problem.

ikurei · 5 months ago
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.

ikurei commented on That XOR Trick (2020)   florian.github.io//xor-tr... · Posted by u/hundredwatt
repiret · 6 months ago
There is no overflow risk. The trick works on any Abelian group. N-bit values form an Albanian group with xor where 0 is the identity and every element is its own inverse. But N-bit values also form an Abelian group under addition with overflow, where 0 is the identity and 2s-compliment is the inverse.

If you’re working on an architecture where a single multiplication and a bit shift is cheaper than N xor’s, and where xor, add, and sub are all the same cost, then you can get a performance win by computing the sum as N(N+1)/2; and you don’t need a blog post to understand why it works.

ikurei · 6 months ago
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.

u/ikurei

KarmaCake day788April 9, 2013View Original