Live data from Hacker News

Man who thought opening a TXT file is fine thought wrong

paulosyibelo.com

281–290 of 316 posts

Re: Man who thought opening a TXT file is fine thought wrong

#281

Earlier quoted context omitted.

Except permissions aren't granular enough / are too confusing, it's a giant footgun with the current Linux architecture, which doesn't have all the nice things Plan9 does

I mean, unless you're host is extremely locked down you'll probably also have telnet,netcat, etc installed, so no great difference.

I'm no specialist but I'm inclined to disagree, for me it's the difference between the ability to run an arbitrary binary and the ability to read/write an arbitrary filepath

Re: Man who thought opening a TXT file is fine thought wrong

#282

Earlier quoted context omitted.

>but was horrible for interoperability This makes me sad - it was dropped because of problems with other operating systems , not because it was necessarily a bad architecture. I understand why they would do it, but it makes you wonder how much better our systems could be if it weren't for concerns about legacy.

>I understand why they would do it, but it makes you wonder how much better our systems could be if it weren't for concerns about legacy. Concern for legacy is the only thing keeping the field of computing sane these days. If every operating system worked with radically different standards for basic things like filesystems, a significant amount of bespoke work would need to go into each build of every piece of softwa…

They still kind of do : WSL is kind of useless because of incompatible file systems between Windows and Linux...

Re: Man who thought opening a TXT file is fine thought wrong

#283
post #216

File extensions are a kludge anyway. (And Windows 10 still hides them by default, because hey, backwards compatibility, and you wouldn't want to confuse Grandma who's seen the file be called "grandkids" since Windows 95..). Why should the filetype be dependent on the name? People even think renaming a .BMP to .JPG means now it's a compressed file! Old school Macs stored the filetype outside of a file, so you can rena…

It would be kind of neat if changing the extension of a file caused it to be converted automatically. It would save a bunch of typing and browsing around. Just rename a directory to foo.tar.gz and it gets compressed and tarred. I'm not saying that the kernel should be doing that, but it feels like a nice abstraction for some UI.

Amazing idea !

Re: Man who thought opening a TXT file is fine thought wrong

#284

Meta comment: The custom scroll behaviour on that site is awful. I hate sites that try to "improve" the behaviour of scrolling by making it faster/slower than normal.

Imagine if a site made the user downpress on a link for a longer time before the click would register? It's actually insane.

The spreading plague of JavaScript has resulted on plenty of situations of middle click on a link not correctly opening it in a new tab.

Re: Man who thought opening a TXT file is fine thought wrong

#285
post #78

Earlier quoted context omitted.

preview's basic annotation functions cover most of what paint can do, or am i missing something?

Preview annotations don't begin to scratch the surface of what paint can do. Look what some people can do in MS paint: https://www.techeblog.com/amazing-spider-man-ms-paint-drawin... Most of us can't, but paint has all the tools, which is very helpful in many situations.

It's IMHO either too simple or too complicated. On Windows I prefer either ShareX or Paint.Net

Re: Man who thought opening a TXT file is fine thought wrong

#286

Oh, man. The idea that TextEdit automatically parsed .txt files as HTML if they started with a certain file signature is problematic... ...but the fact that file:// schemes can access remote files by appending /net/ followed by a domain name is pretty shocking. I mean, the entire purpose of "file://" would seem to be to provide access to local/mounted files and only those. The fact that a Mac engineer thought it woul…

Most likely nobody decided to have file:// access the network. Most likely, someone decided to make file:// the scheme for accessing files, and someone else decided to mount the network as a file.

My memory is hazy, but I think this was a “feature” of Plan9

Re: Man who thought opening a TXT file is fine thought wrong

#287

File extensions are a kludge anyway. (And Windows 10 still hides them by default, because hey, backwards compatibility, and you wouldn't want to confuse Grandma who's seen the file be called "grandkids" since Windows 95..). Why should the filetype be dependent on the name? People even think renaming a .BMP to .JPG means now it's a compressed file! Old school Macs stored the filetype outside of a file, so you can rena…

They’re also dangerous too! I remember seeing malware as an attachment to an email with the file name “somefile.exe.bmp”, which looks safe, but when saved on Windows, it saved it to disk as “somefile.bmp.exe” because there was some Hebrew character that flipped the last two extensions around!

Re: Man who thought opening a TXT file is fine thought wrong

#288
post #248
post #231

Earlier quoted context omitted.

File extensions are simple and, crucially, visible and understandable to the user. They're far better than any proposed alternative.

Optimizing for "simple" for the sake of robustness is exactly backward. > visible and understandable False. Something is neither visible nor understandable if it's misleading - which file extensions are. There are absolutely no guarantees that a file extension will match file contents, and that assumption can cause security risks - like in this article. An actually good alternative is to encode file type as metadata,…

> There are absolutely no guarantees that a file extension will match file contents, and that assumption can cause security risks

Only in software that ignores the extension.

> An actually good alternative is to encode file type as metadata, instead of inside the file contents or file-name, and then configure viewers to display it. That, while not "simple", is also visible and understandable to the user, while simultaneously being safe.

Metadata can be just as wrong as a file extension, and is generally far less visible.

Re: Man who thought opening a TXT file is fine thought wrong

#289
post #216

File extensions are a kludge anyway. (And Windows 10 still hides them by default, because hey, backwards compatibility, and you wouldn't want to confuse Grandma who's seen the file be called "grandkids" since Windows 95..). Why should the filetype be dependent on the name? People even think renaming a .BMP to .JPG means now it's a compressed file! Old school Macs stored the filetype outside of a file, so you can rena…

It would be kind of neat if changing the extension of a file caused it to be converted automatically. It would save a bunch of typing and browsing around. Just rename a directory to foo.tar.gz and it gets compressed and tarred. I'm not saying that the kernel should be doing that, but it feels like a nice abstraction for some UI.

This is one of those ideas that seems nice in theory but in practice would just lead to so many subtle problems especially if it happened automatically.

Lots of programs create temporary files by changing the extension temporarily but if the kernel were attempting to intercept and change the internal data you could never guarantee the state of your file data. Not to mention potentially renaming an extension to an automatically handled extension and having that data irrevocably altered without you even realizing it.

Then of course there's the fact that there are usually lots of options associated with converting a file. Jpg needs visual compression levels, mp3 needs bitrates, etc.

Re: Man who thought opening a TXT file is fine thought wrong

#290

Earlier quoted context omitted.

You don't need a password to be echoed to exfiltrate it. You just need the key codes. Not sure about NeXTStep, but regular old X let you sniff keys really easily. Some systems (specifically, earlier versions of SGI IRIX) shipped with X authorization disabled by default. This is the equivalent of "xhost +". You could sniff a box as soon as it was plugged into the network, including capturing login session credentials,…

These days too, IPv6 tends to be firewall-free. In theory there are protections though, like regularly changing suffixes. Do MacOS and Ubuntu ship with firewalls?

Most consumer routers should at least be doing basic inbound connection filtering for IPv6. Are they not?

MacOS and Ubuntu ship with firewalls, though not sure if they're enabled by default.

Post reply on HN