Live data from Hacker News

GNU Nano 4.0

nano-editor.org

121–130 of 154 posts

Re: GNU Nano 4.0

#121

Earlier quoted context omitted.

Where did you get that expectation? Every editor I've used up until Visual Studio Code did that by default. (I was actually very surprised when vscode _didn't_ do this!)

I mean, it ought to be possible to use a text editor to specify exactly what I want in a text file. If a newline is silently added at the end, then, well, that isn't happening. Edit: Which is to say, I don't think l24ztj is using "expect" in the sense of "anticipate" but rather, y'know, the other sense. (Using Wiktionary's definitions: "To consider obligatory or required" or "To consider reasonably due".)

What do you mean by "exactly" though? What is the "exact" value of "e"? 0x65? How about "é"? You expect your editor to take what you've written and provide a valid text file with that information in it, which can then be read by something else. Applying the correct text encoding (UTF-8?) and adding a 0x0A as the last byte are part of making it valid.

If you want to specify the exact bytes on disk, you should use a hex/bin editor.

Re: GNU Nano 4.0

#122
post #64

Earlier quoted context omitted.

sane is what the user expects, not what POSIX demands.

One could reasonably expect that a user expects a POSIX system to behave according to the POSIX standards?

A sysadmin maybe. A user hardly.

Especially a 2019 user, 20+ years removed from the systems, decisions, and rationales, behind POSIX.

Just try to get someone (even a seasoned Linux user) to use a POSIX-only userland (as opposed to GNU), as see how fast they'll be pulling their hair out...

Re: GNU Nano 4.0

#123

Earlier quoted context omitted.

Not really, most users (even tech people) don't know that it is a POSIX standard, or what's a POSIX standard, or what's POSIX really

Are you thinking about most people who use a computer or most people who use a CLI based editor that's presumably on a remote machine they just sshed into?

I'd say both sets.

Hardly any of my colleagues knows what POSIX is (and surely not in any depth, even those that do), but they still SSH and use editors that include Vim all the time...

I'd say in a company of 50+ SSHing people, around 5-6 know POSIX and its history, and usually the older ones (35+).

Re: GNU Nano 4.0

#124
post #87
post #47

Earlier quoted context omitted.

I like the idea of hard wrap, line of code shouldn't be longer than 80 characters... sure it's confusing for beginners + sometimes data shouldn't be hard-wrapped, but in general (imho) it's better than worse

Nano is a text editor, not an IDE. There's no reason why every text (not just code) should contain less than 80 characters in every line.

Good point! I guess I didn't think it through ;)

Re: GNU Nano 4.0

#125
post #67

Serious question: how often do you log into a box where it would be impossible or considered rude for you to install a proper editor? I feel like I must have been blessed by the sysadmins in my life (them often being me) but it's never happened in 25 years of logging into *nix boxes.

In any large-ish organization, you probably don't do this on a production machine. You absolutely do not do it if you aren't the person (or on the team) who will get called/paged if it breaks, or you're probably risking your job if the package manager goes sideways or you flub it up and let the package manager throw in a couple of extra upgrades or whatever.

So you ask that team to install Emacs (because you're less likely to mess up config with a proper/familiar editor) and they just say no, forever?

Re: GNU Nano 4.0

#126
post #99
post #67

Serious question: how often do you log into a box where it would be impossible or considered rude for you to install a proper editor? I feel like I must have been blessed by the sysadmins in my life (them often being me) but it's never happened in 25 years of logging into *nix boxes.

Embedded devices running some flavor of *nix, mostly. My main vi nemesis for years was Edgewater Edgemarc hardware. Fortunately these days I've mostly replaced those with pfSense boxes where I can install nano with a single command.

Yup, hadn't thought of embedded devices, that seems entirely valid.

Re: GNU Nano 4.0

#127
post #67

Serious question: how often do you log into a box where it would be impossible or considered rude for you to install a proper editor? I feel like I must have been blessed by the sysadmins in my life (them often being me) but it's never happened in 25 years of logging into *nix boxes.

A lot of my side work involves fixing things for companies and individuals who use a cheap shared hosting plan from a bottom-barrel reseller. Often this is a virtual host in cPanel/WHM or Plesk and is very limited on what you can install outside of Fantastico, Softaculous, or similar web app stores. In those situations I normally have to deal with extremely restricted SSH access (if any at all) and can't install unap…

Gotcha, never been in that position, but I feel your pain.

Re: GNU Nano 4.0

#128
post #64

Earlier quoted context omitted.

The old behaviour is the sane default, at least for editing text files. POSIX defines a text file as a file consisting of a number of lines, each terminated by an LF character.

sane is what the user expects, not what POSIX demands.

I would say it's not just a POSIX demand. Most unix tools are POSIX-complaint, and the user should expect just it and nothing more. Non-proper text files without LF at the end may not be processed properly, so to be assured that everything works fine that LF is mandatory.

Re: GNU Nano 4.0

#129

Earlier quoted context omitted.

Where did you get that expectation? Every editor I've used up until Visual Studio Code did that by default. (I was actually very surprised when vscode _didn't_ do this!)

I mean, it ought to be possible to use a text editor to specify exactly what I want in a text file. If a newline is silently added at the end, then, well, that isn't happening. Edit: Which is to say, I don't think l24ztj is using "expect" in the sense of "anticipate" but rather, y'know, the other sense. (Using Wiktionary's definitions: "To consider obligatory or required" or "To consider reasonably due".)

It should be possible, sure, just like it should be possible to forgo utf-8 and save your file with the iso-8859-1 encoding. But it's the less useful case. Many (most) programs do not care whether there is a final newline or not, but among those that do care, missing endlines will run you into more problems than the opposite (e.g.: Git, GCC, wc and cron will either complain or not work as expected).

Re: GNU Nano 4.0

#130

Earlier quoted context omitted.

Are you thinking about most people who use a computer or most people who use a CLI based editor that's presumably on a remote machine they just sshed into?

I'd say both sets. Hardly any of my colleagues knows what POSIX is (and surely not in any depth, even those that do), but they still SSH and use editors that include Vim all the time... I'd say in a company of 50+ SSHing people, around 5-6 know POSIX and its history, and usually the older ones (35+).

I think it's better to expect more from a specialist than less. ;)
Post reply on HN