Hacker News new | past | comments | ask | show | jobs | submit | JayGuerette's comments login

Any TV that doesn't have your WiFi password is a dumb TV. No TV I've owned to dated has required network connectivity to work.

Nah, it can still connect through the smart TV of the neighbours.

They probably have cross-brand agreements in place to let any "offline" device access advertisement networks. Your data is a very profitable business for them.


Yeah this is something I feel like doesn't get talked about enough. I have a raspberry PI that acts as my streaming device connected to my Samsung "Smart" TV and since Samsung can't get on the WIFI it's effectively just a display terminal.

My pet peeve, grep unnecessarily followed by awk/sed.

Original: df -h | grep "$partition" | awk '{print $5}' | sed 's/%//'

Efficient: df -h | grep -Po "\d+(?=%\s+$partition)"


Original is pretty readable. Efficient looks like what I get when I accidentally get shifted over to the right by one column.


FWIW, on ubuntu 22.04, your "Efficient" doesn't work

    # df -h | grep "$partition" | awk '{print $5}' | sed 's/%//'
    24
    # df -h | grep -Po "\d+(?=%\s+$partition)"
    #


Easiest to read is what I usually try optimize for, especially in a shell script.

I think the first one is much easier to read.


To be fair, if I needed something optimal or it was used often enough to matter, I'd probably reach for the original data in a real language. For a one-off, I can tell what grep/awk/sed does immediately - but I need to stop and think for the efficient solution.


Shouldn't the first one be `grep -F/--fixed-strings "${partition}"? The second example will break in any case where $partition contains special characters.


Yes, it's an easy fix though:

    df -h | grep -Po "\d+(?=%\s+\Q$partition\E)"


Oh cool, this is the first time I've heard of `grep \Q..\E'

https://stackoverflow.com/questions/54405892/are-q-and-e-sup...

Thanks!

At some point I should probably write an article about the 20k lines of bash and a little python that power my homelab and various automations. Bash isn't perfect but often 99% good enough is fine.


I would say the first way allows you to learn more tools that you can write one line CLIs with without digging through grep’s man page.


"I'm not sure why it is that Windows 3.1 is the go-to when people name a Windows OS of this era."

It's because business was the primary market for PCs and Windows 3.11 added a network stack and changed everything. Networking was no longer an arcane science that required 3rd party software. Office networks became almost trivial to set up. The impact of this on the world is impossible to overstate. Everybody who used Windows in this era used Win 3.1(1).


Windows 3.1 also hit a sweet spot for OEMs; with RAM becoming larger and cheaper, and 486 PCs delivering speed. That was when PC games that targeted Windows started to arrive in reasonable numbers.


Microsoft also made a big push at this time for preinstalled Windows to be considered the baseline configuration instead of treating it as an optional upsell. It probably also didn't hurt that 3.1 was when Windows was seen as having properly matured (cf. Vista vs. 7). Basically, the 3.1 era was when Windows went from being a novelty/luxury to being everywhere practically overnight.


It's all coming back to me now.

1993 was also when Word 6 was released for Windows; moving from a DOS editor to the Windows editor brought a revolution in fonts.

Just have a look at the difference in experience and it's obvious why offices and such adopted windows so quickly:

https://winworldpc.com/product/microsoft-word/6x

Works 2 was released for Windows a year earlier, but I think the 3 release was what really shone. IIRC, that was the version I had bundled with our home PC:

https://winworldpc.com/product/microsoft-works/2x-win


I don't think any of the common suspects targeted Win 3.1 (or its beta version of Win32). Most of them shipped with a DPMI kernel (Dos4GW being common), which Win3.1 happened to also provide, but I can't recall if, say, DOOM even ran under Win3.1 at the time as 4GW did a lot more than DPMI.


Doom didn't run on Windows until Doom95 was released; but SimCity and others were on Win3.1.


> no longer an arcane science

No, it became what some of us called "plug and pray". You plug it in, and it's supposed to work. You install the driver, reboot, uninstall the driver, reboot, clear some temporary files, re-install the driver, try a slightly different driver on the same disk, uninstall the driver, reboot, re-install the driver, and it suddenly works! Then you reboot it and it stops working again.


that‘s how I remember it.


I remember it differently, as I rarely encountered office networks then, and when I did, they were still 3rd party (Netware mostly).

The reason I always remember 3.1 is that 3.0 was a "big" upgrade, but it was a dog, so they released a vastly-improved 3.1 pretty quickly, so many people got that as the default, and the upgrade was pretty widespread.

This was over maybe a 4-year period in the mid-90s. My memory may be hazy, and I was a university student, so my exposure may have been limited, but myself and my friends never really reference 3.11 because it wasn't used/needed, and indeed most of us used Trumpet Winsock as a TCP/IP stack (3rd party) until the release of Windows 95.


Apple isn't creating neural hashes for CSAM detection, as they'd have to be in possession of source material to create them, so they're getting them from someone else. Since it's indistinguishable in it's hash form, when the supplier becomes interested in looking for something else, nobody will ever know.


Do not let Apple off the hook. This must be removed.

This functionality will be used in other global jurisdictions to clamp down on freedom. In a world where we cede more control and increasingly subjugate ourselves, it's only a matter of time before it's used against us too.

Say no to monitoring.


So the thing the article concludes isn’t being done, must be removed?


Maybe that's the case. We should be vigilant and treat the concern with utmost seriousness.

Once upon a time, Apple announced they would do this. We can't ever let them.


The article concludes that there isn't evidence it's being done -- which is different.

Apple should not be trusted without evidence. We should be able to verify what our devices are sending to Apple, Google and others.


But they aren’t monitoring. And a hash doesn’t help you monitor unless you’ve got a hash of another image like CSAM. And you can turn this off if you want.

Honestly I know everyone thinks that everything is a slippery slope to death camps. But sometimes it’s just a cool helpful feature.


The suppliers are well documented and it takes two suppliers agreeing on the same neural hash.

So, when the US center for missing and exploited children decides to collide with the Japanese equivalent to detect IDK what, yea, you wouldn’t know. Assuming those agencies don’t operate with transparency.


Requiring two suppliers to agree is simply the current policy. I think the GPs concern is that Apple's policies can change without warning or notice. That seems like a pretty valid concern to me, which Apple has zero interesting in mollifying.


>so they're getting them from someone else

Is there any evidence they even do neural hash CSAM detection?


I've used XFCE seemingly forever, at least 20 years.

In recent years I've grown to dislike Thunar and a variety of other things that were mostly GTK issues and some XFCE issues. I was really frustrated with clicking on the system tray and having that click register as a click on the menu that popped up, that just so happened to be 'Quit', and closing the app.

Then I upgraded my computer in a huge jump. Sure, games were faster, but I wouldn't enjoy the results of my investment at any given moment. So I switched to KDE for the first time ever, with animations and sexiness everywhere. It's got it's issues, and it's multi-monitor support is really sub-par, but so many things suddenly work better.

Best example: The flow of clicking on a ZIP to download and ultimately looking at the extacted output in new folder is suddenly effortless and intuitive.

I love the polish of KDE and while I'm tempted to give XFCE another try, the thought of giving up on the effortless sanity of KDE for GTK funk makes me shudder.


> I love the polish of KDE

this is really funny, because to me, KDE starting from ~4 is the gaudiest thing I've seen.


Versions 4 and 5 look radically different.

Version 3 was fine. Very fine even for the time.

I didn't really like the default look of version 4. Oxygen had depressing colors, it lacked fineness. I always switched the theme to Fusion, or Cleanlooks, which imitated the Clearlooks GTK theme.

Version 5, with Breeze, is really good. Very elegant. By the way I also tend to find Gnome with the Breeze theme way nicer than with Adwaita (which is already fine).

The only DE I find almost as nice looking as Plasma with the default settings is macOS.

They are also constantly cleaning up the UI and making it simpler, bit by bit.


everything after kde2 is absurd. KDE literally twenty years ago was great.


"... a terminate-and-stay-resident program (or TSR) was a computer program running under DOS that uses a system call to return control to DOS as though it has finished, but remains in computer memory so it can be reactivated later. Needless to say, this was extremely unreliable."

There were very likely some hacky TSRs that caused problems, but in my experience most were extremely reliable. We used an off-the-shelf TSR to enhance a motion control system that laser scribed ceramic vacuum checks for silicon wafer fabrication. Those things cost $5k in 1990, and took ~20h of processing, increasing their value to $15k; we wouldn't screw around with something that was inherently "extremely unreliable".


I loved TSRs - I wrote two of special note:

stop_clock: All it did was stop the real time clock of the system from counting up when you pressed the alt key and started it again on a 2nd press. However, this was enough to stop the timer of a typing speed program we used in high school. Magically, I was a VERY fast typist. :-)

stay_on: When you pressed a certain key sequence it would start the floppy drive motor and a 2nd press would turn it off. The goal was to speed up floppy accesses by not needing to spin up the motor all the time. Unfortunately, I got up one day to find my floppy drive motor dead. I suspect I forgot to turn off the motor (there was no idle timeout...I was a kid, never even crossed my mind!)


I had one TSR that let you allocate RAM and switch between up to 3 programs. Of course, they had to be small programs due to the 640KB limit. But it was still quite useful in the days before hard drives, to be able to have a couple of utilities (like a text editor) loaded without having to keep swapping floppy disks.

Also wrote a couple of TSRs of my own as a kid learning to program. Sure you could crash the system, as you could with any program, but they were as reliable as anything else.

The only thing special was that you generally didn't want to run two TSRs that naively hooked the same interrupt without chaining properly. But back then we didn't have thousands of mysterious background processes always running in the background. You knew what few programs you had run, so it wasn't really a problem.


Yes. DOS itself came with several TSRs, for example keyboard drivers. They were absolutelt commonplace and, if written properly, nowhere as unreliable as claimed.


Interestingly, the author updated the post, which now says "this was not 100% reliable".

There isn't anything inherently unreliable with TSRs; DOS even provided interrupts for this specific operation (although some malware would not use them).

I think (although not entirely sure) that some mouse drivers were, for example, TSRs.

The problem is that there was a wide range of purposes and implementations, including malware, so the argument is similar to "BTC is mostly used for dirty money, so BTC is inherently criminal".


All DOS mouse drivers were TSRs. The driver would hook INT 33h (which is the mouse driver "API" entrypoint) and whatever IRQ (ie. 4 or 12) that the actual hardware used. The IRQ handler would then update the driver's internal state according to data received from the mouse and if enabled draw the mouse cursor into frame buffer and/or call registered user event function (which runs in the interrupt context).


TSRs were unreliable when they interacted with games and other graphical applications.

Eg, things like a calendar tool trying to pop up a reminder mid-game would often not end well.


My 486 had boot sector protection in the BIOS. It would pop up a Y/N confirmation in text mode during boot sector overwrite.

This froze the windows 95 setup in graphical mode. Although the text prompt appeared for whatever reason the Y/N didn’t work and we could never continue.

So was never able to upgrade that machine.


Yes, I remember that! But at least on my board it could be disabled.


> There were very likely some hacky TSRs that caused problems, but in my experience most were extremely reliable.

Programming TSR's as a teen was where I learned to hit ctrl+s every line, at most!

Was kinda hard to debug given the "terminate" part and the tools at the time.


I used a TSR to run protected mode software under early Microsoft Windows back in the day. Effectively it was letting me have the big allocations I needed while using Windows as a portable display driver.


Just because the one you used worked doesn't mean the concept was safe. Viruses also loved the concept.


The concept was safe enough that DOS officially supported it, and development tools like Borland Pascal and C++ had special support to implement TSRs.


No more than third party drivers.


I've used pushover for years as well. I wish they would charge me $5/y instead of a $5/lifetime. I've asked them to do that. I want this service to last.

I set up Tasker on my phone such that when a specific low-priority (no visible/audible alert) message from pushover, containing only a hash key, is received it picks it up and does an HTTPS request to my self-hosted server to retrieve the actual notification text.

I have a bash/websocat client connected 24/7 to wss://client.pushover.net/ as well that I should probably put up on git for other people.


Pushover requires a monthly subscription for teams. I guess that’s what most of their revenue comes from anyway.


That is correct. Pushover has been around for 10 years now and I get most of its financial support from Team subscriptions.

https://blog.pushover.net/posts/2022/3/ten

Any individual users wanting to support Pushover are welcome to join as a personal Team with 1 member :)


pv is a great tool. One of it's lesser known features is throttling; transfer a file without dominating your bandwidth:

pv -L 200K < bigfile.iso | ssh somehost 'cat > bigfile.iso'

Complete with a progress bar, speed, and ETA.


Oh damn that's neat I never thought to use `ssh` directly when transferring a file, I always used `scp bigfile.iso name@server.org:path/in/destination`


Also see `scp -l 200 bigfile.iso name@server.org:path/in/destination`

from man page:

-l limit

Limits the used bandwidth, specified in Kbit/s.


Also you probably shouldn't use scp. rsync and sftp have mostly the same semantics.

    rsync --bwlimit=2OOK bigfile.iso name@server.org:path/in/destination
    sftp -l 200 bigfile.iso name@server.org:path/in/destination
Although it seems that scp is becoming a wrapper around sftp these days:

https://www.redhat.com/en/blog/openssh-scp-deprecation-rhel-...

https://news.ycombinator.com/item?id=25005567


A similar trick that's nice is piping tar through ssh. Handy if you don't have rsync or something better around. Even handy for one file, since it preserves permissions, etc.

tar -cf - some/dir | ssh remote 'cd /place/to/go && tar -xvf -'


I love this trick. I was dealing with some old solaris boxes something like 15 years ago when I learned you could do this. I couldn't rsync, and had started off SCP'ing hundreds of thousands of files across but it was going to take an insane length of time. Asked one of the other sysadmins if they knew a better way and they pointed out you can pipe stuff in to ssh for the other side too. Every now and then this technique proves useful in unexpected ways :)


Similarly, though useful less often these days, using -B/--buffer-size to increase the amount that it can buffer. If reading data from traditional hard drives, piping that data through some process, and writing the result back to the same drives, this option can increase throughput significantly by reducing head movements. It can help on other storage systems too, but usually not so much so.


1. Disguise payload as space junk 2. Design to "fall" on populated area 3. Say "oops" 4. ...


What payload would possibly be worth this, that wouldn't be more effectively served by a different delivery mechanism?


a plausibly deniable payload purpose


Any 'useful' payload would erase any plausible deniability. If the idea is to merely drop a piece of scrap metal on some politicians house or something, with no warhead involved, I don't think they can do that. Reentry is too chaotic for a piece of unguided rocket debris to hit a target that exactly.


How is "Chinese space junk falls on important target" plausibly deniable? Especially compared to alternatives that conceal source?

It sounds good, but I'm struggling to think of a use case for (1) an important enough target to be impactful, (2) that could be effected by space debris, (3) for which there's a distinction between "we accidentally hit it" vs "we deliberately hit it"


I don't think China cares. At all.


But in this case there are plenty of other, better delivery mechanisms than disguising the payload as space junk.


Make it land on a valuable target and not make it looks suspicious?


You're forgetting about what happens when something "falls" from the atmosphere uncontrolled


But what if it only appears uncontrolled?


People who know how to track this stuff knows if it's uncontrolled or not


For static content and cgi-bin, busybox is much faster.


Busybox lacks a chroot, which might improve security.

On the other hand, everything in busybox will itself run in a chroot, which might nullify this benefit.


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

Search: