HNHacker News
TopNewBestAskShowJobs

nousermane

1,311 karma · joined December 19, 2020

submissionscomments
nousermane··on JMAP – a modern email open standard
Yep. If you go and register a new gmail account today, there will likely be no option to enable IMAP access for that account, altogether.
nousermane··on You can serve static data over HTTP
> glue together some massively bloated thing that they have absolutely no understanding of

Relevant: https://xkcd.com/1988/

nousermane··on Clever code considered harmful
> writing "return condition" instead of "if condition then return true else return false end"

> using the conditional-value ("ternary") operator in any capacity

Looks like author of some code I had to comb through recently, maybe had that among guidelines. Said code was replete with:

  if(function_that_returns_boolean()){
    return true;
  }else{
    return false;
  }
...and...

  if(foo()){
    return true;
  }else{
    if(bar()){
      return true;
    }else{
      return false;
    }
  }
nousermane··on Scrcpy: Display and control your Android devices connected over USB or TCP/IP
With newer android versions, you might want to check the "disable adb authorization timeout" option too. Otherwise, phone will "forget" your computer's adb key after a week.
nousermane··on Fascination of Awk
That is quite nifty implementation of reverse HTML escaping. But in python that could be done with much less work:

  import html
  print(html.unescape(foo))
And the best part - you don't need to debug/update the (g)sub list every time you stumble upon new weird &whatever; too. And there are a lot of those out there:

https://www.freeformatter.com/html-entities.html

nousermane··on Linux Intel WiFi driver broken with 5&6GHz bands for longer than three years
Hug of death from HN visitors.

For fellow website admins, this is your regular reminder to use static site generators, where possible, and server-side cache where not.

nousermane··on Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
Yep:

  $ cat foo.tsv

  name    foo     bar
  Alice   10      8888
  Bob     20      9999

  $ cat foo.tsv | sqlite3 -batch \
    -cmd ".mode tabs" \
    -cmd ".import /dev/stdin x" \
    -cmd "select foo from x where bar > 9000;"

  20
nousermane··on Codon: A Python compiler if you have a need for C/C++ speed
Talking about tricks to make python faster, there is an interesting one that is essentially exact polar opposite of what Nuitka does:

Micripython's "viper" just-in-time compiler. It can only be applied to one function at a time, restricts what you can do in such a JIT-ted function quite severely, but resulting speed is pretty much native:

https://docs.micropython.org/en/latest/reference/speed_pytho...

nousermane··on Box64 – Linux Userspace x86_64 Emulator Targeted at ARM64 Linux Devices
> tried qemu, and spent many days trying to figure out the correct set of parameters

It's really not that hard, once you get used to it. Or, if you rather not spend that precious time, there is a GUI tool that would configure those parameters for you:

https://virt-manager.org/

Bonus: once started with virt-manager, run "ps ax | grep qemu", et voila - you have your qemu parameters, ready to copy-paste, should you wish to run exact same VM later from a script, or something...

nousermane··on Today I discovered an xterm feature by mistake
To search very long texts by the "text shape". Same idea as some popular editors show on the right, next to the scrollbar:

https://www.ultraedit.com/wp-content/uploads/2023/01/ue-img-...

nousermane··on Shrinkflation, SanDisk Style
Unlike RAM, where you always get exact power-of-2 number of bits per chip, modern flash storage normally ships with defects, plus error-correction codes to deal with those.

Number of defects vary. Chips coming from the same factory, even same batch, are likely to have different number of defects, and will be binned accordingly.

Devices with larger (but manageable) number of defects will simply have larger ECC region reserved - leaving smaller space to show to host computer. OP's new USB stick is like that, that's it, I reckon.

nousermane··on What ChatGPT and AI-Based Program Generation Mean for Future of Software
Same kind of basic programming that was "threatened" by no-code/low-code solutions before that.
nousermane··on What ChatGPT and AI-Based Program Generation Mean for Future of Software
> given the right prompts and constraints

Yep, that seems to be the key, and some realized that already: https://news.ycombinator.com/item?id=34463061

nousermane··on Barracuda VPN on Linux permanently and silently changes resolv.conf
You'd probably want to first check that /etc/resolv.conf is a real file, first. SystemD has a nasty habit of replacing it with a symlink. That prevents "chattr" trick from working.
nousermane··on 50 years of C, the good, the bad and the ugly [video]
> Linux kernel is written in C

Not exclusively in C, not anymore: https://docs.kernel.org/rust/index.html

It might take another decade for a C-free build to be possible, though.

nousermane··on Cash must be king, Italy PM Giorgia Meloni tells shoppers
In addition to tax-dodging, or selling off-the-books, there is one other, small legitimate reason for a vendor, to avoid card payments:

Most banks/payment processors would charge a fixed amount per small transaction. Amount varies a fair bit, but as an order of magnitute, say - €0.15 or something like that. This means customer that bought cup of coffee for €1.50 and insists on paying with a card, will cost vendor whooping 10% extra (it is not allowed for vendor to pass on card transaction cost to customer).

For a larger purchase, €30, €60, and more - transaction charge is negligible, naturally.

nousermane··on The leap second’s time is up: world votes to stop pausing clocks
You're right, but I'd argue this problem is already here.

Thanks to glaciers melting, earth rotation is (temporarily) accelerating. Because of that, positive leap seconds, regular before, didn't happen since 2017 - so there could very well be (recent) software out there that has that code-path broken, and nobody noticed yet.

And due to exact same geophysical effect we might see a negative leap second - something that never ever happened before. What are the odds that every single piece of software gets that one right?

nousermane··on The leap second’s time is up: world votes to stop pausing clocks
TAI - atomic clock, ignores earth rotation.

UT1 - based on Earth's rotation only, strictly 86400 seconds per day; length of each second varies; takes a heck of a lot of effort (and time) to measure accurately.

UTC - has same length of a second as TAI, but (for now) tracks UT1 to a precision of +/- 1 second. To achieve that, can have days that are 86399, or 86400, or 86401 seconds long.

None of 3 is planned for scrapping. The only change discussed in TFA is to fix UTC day to 86400 seconds (at cost of letting it drift further away from UT1).

nousermane··on The leap second’s time is up: world votes to stop pausing clocks
...but UTC is still offset from TAI by 37 seconds. Any plans to do anything about that, I wonder?
nousermane··on GPS does not account for leap seconds (2002)
Ah, yes. The infamous 1024-week (19.5 years) GPS epoch. I take back my "two decades" claim.
nousermane··on GPS does not account for leap seconds (2002)
Very misleading article indeed.

I have to add that GPS messages include TAI-UTC offset. That means that user of even old, non-internet-connected GPS receiver that didn't have any software updates in a decade, will still read out exact UTC time with cumulative leap seconds correctly applied.

nousermane··on Solar panel waste may not be as bad as we thought
Also, typical lead-free solders oxidize in air at their soldering temperature much more readily than near-eutectic Pb-Sn at its respective soldering temp.

That oxide film tends to interfere pretty badly with wetting of surfaces being soldered. In other words - it's much easier to end up with a "dry" joint - even with adequately increased temperature - unless better and/or more flux is used.

nousermane··on The Perl Foundation will now be known as The Perl and Raku Foundation
Perl has some weird quirks - dollar-variables vs. percent-variables vs. at-variables (and sometimes you can "cast" one into other), round-brackets where most others have squiggly (and vice-versa)...

But once you get over that, it's a great language. First-class regex, -pine options. A lot to love about it.

nousermane··on Tell HN: Spectrum is blocking TCP/UDP 5060 at my home
Ah, yes. The classic "all our customers are morons" approach, with no opt-out for those 0.1% who, in fact, are not. Very typical among ISPs/Telcos.

Where I am, we used to have a different, "nerdy" ISP [0], where customer was allowed to bring their own modem; they also provided real IPv4/v6 dual-stack since forever, easy to request a /29, tech-support that's realistic to reach, and staffed with people who know what they are talking about, no bulk-firewalling port-25, etc... All for a modest 2x price increase over market average. Alas, they're out of business now.

[0] https://en.wikipedia.org/wiki/Xs4all

nousermane··on I use a Raspberry Pi as my daily computer
Is it actually in stock at this price? Where I am, local price tracker, tweakers.net, also shows some listings for ~100 euro, but if you click through to the seller's website, it says there "not in stock, delivery date unknown". If you limit to what you can actually buy, it's ~200 euros, and even that - often with a week or two of lead-time.
nousermane··on Signal says it won’t compromise on encryption
[OTR] would probably be a goto for encrypting instant messages. But both that & PGP require a 3rd-party client (pidgin/adium/etc...), if user wants to retain at least some usability.

And nowadays, every popular IM network wants 3rd-party clients off their net at all costs. Signal is on the better side of the spectrum here. While they explicitly say they don't support non-official clients connecting to the official network, this isn't rigorously enforced. WA, on the other hand, would permaban your whole account if you even so much as try to use 3rd-party client.

[] https://en.wikipedia.org/wiki/Off-the-Record_Messaging

nousermane··on Shell script best practices, from a decade of scripting things
> plenty of people run a modern Bash out of their home

Ah, got it. Another failure mode. There is a /bin/bash, but it's an ancient, crummy thing, that is difficult to upgrade. MacOSX does this, so users paper this over by installing a private copy as ~/bin/bash. Thank you.

nousermane··on Shell script best practices, from a decade of scripting things
About that "#!/usr/bin/env bash" business - are there any systems out there that have "/usr/bin/env", but do not have "/bin/bash"?
nousermane··on Rust in the Linux Kernel: Just the Beginning
Driver in question is cfg80211. Majority of popular wireless cards use it.

DoS is the only publicly known exploit, right now. There is understanding that RCE is possible with additional specialist work.

Local packet injection is an implementation detail of the first public PoC. There are other implementations of the same exploit, that deliver packets over the air instead. Including one that runs on ESP32, and attacks unmodified Linux nearby:

https://github.com/jo-m/linux-wifi-ota-crash

nousermane··on Rust in the Linux Kernel: Just the Beginning
I'm not a fan of rust either, not by a long mile. But current kernel approach to memory safety is a complete, utter, demonstrated failure. Look at last week's CVE-2022-41674:

https://seclists.org/oss-sec/2022/q4/23

This is a catastrophic bug, that (after some work on developing an actual RCE) lets anybody within wifi range to get root on your laptop (or phone, or access point). And all it took is this one line:

https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wir...

We've all been repeating the "1000 eyes - all bugs are shallow" mantra for far too long. This one was in the mainline for more than 3 years, and nobody noticed. How many more are lurking there?

Page 1 of 8Next →