Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Windows Notepad fixed after 33 years: Now it finally handles Unix, Mac OS line endings
The Register ^ | May 8, 2018 | Thomas Claburn

Posted on 05/09/2018 9:43:07 AM PDT by dayglored

click here to read article


Navigation: use the links below to view more comments.
first previous 1-2021-37 last
To: Dr. Sivana

I was cranking out the FORTRAN on PCP-11.

In 1983, I used an RS-2732 (modem) board to send a data file to a sister location in Salt Lake over the phone. Ekthelthior!


21 posted on 05/09/2018 10:52:19 AM PDT by Cletus.D.Yokel (Catastrophic, Anthropogenic Climate Alterations: The acronym explains the science.)
[ Post Reply | Private Reply | To 18 | View Replies]

To: dayglored

Bah, people should just use VI like a real many pro ... what?

Then again, for the truly manly, Ed is the standard!

https://www.gnu.org/fun/jokes/ed-msg.html


22 posted on 05/09/2018 11:17:22 AM PDT by Kommodor (Terrorist, Journalist or Democrat? I can't tell the difference.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Kommodor; Cletus.D.Yokel; CatQuilt; Dr. Sivana

23 posted on 05/09/2018 11:36:44 AM PDT by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 22 | View Replies]

To: dayglored

hahaha


24 posted on 05/09/2018 12:19:58 PM PDT by CatQuilt (Lover of cats =^..^= and quilts)
[ Post Reply | Private Reply | To 23 | View Replies]

To: dayglored
Re: "We fixed notepad"

Uh, no. Notepad is not 'fixed'. One particular obnoxious issue with notepad is fixed. Try bring a 20+MB text file into notepad. It wants to load the entire file in memory, rather than what it actually needs.

The compatibility fix is welcome, but notepad is still the worst editor on the planet short of 'edlin'.

Note: Zeugma is a 'vi' fan.

25 posted on 05/09/2018 12:55:33 PM PDT by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Karliner
> Oh drat I just shot my computer over the weekend. Now what....

Depends on whether you hit a vital component.

For example, if your hard disk setup is RAID1, and you hit one disk, no big deal, the other is still working for you.

OTOH, if you hit the CPU fan, the next time you powered it up, your CPU probably converted itself into a little pile of slag.

26 posted on 05/09/2018 12:55:54 PM PDT by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 9 | View Replies]

To: dayglored
I saw an article on slashdot earlier. Some of the comments were actually interesting. It seems that when you go waaaaaaay back, there is an actual reason for windoze to expect a CR/LF. In the old teletype days, you could send control codes to the printer. A CR (Carriage Return) would cause the printhead to go to the beginning of the line, and the LF (Line Feed) would advance one line. Just a CR would cause you to overstrike what was already printed. A LF by itself would advance to the next line, but in the same character position.

So, a CRLF did exactly what you'd think.

Of course, these days, nothing actually works like that. A LF advances to the beginning of the next line as opposed to just scrolling down one line.

27 posted on 05/09/2018 1:03:39 PM PDT by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: zeugma
> Try bring a 20+MB text file into notepad. It wants to load the entire file in memory, rather than what it actually needs.

Ummm, these days 20MB is nothing. I just now created a 24MB text file on my Win7 VM, loaded it into Notepad, which took about 3 seconds, and wrote it back out successfully (under 1 sec). When you have multiple GB of core, assuming the app's working set can handle the size, what's the problem with editing in-core?

> Zeugma is a 'vi' fan.

At present that's my favorite general purpose editor too, at least for system stuff and light programming. Mainly because every system has it (on Windows via Cygwin) so I can depend on it. I haven't used emacs on a regular basis in years. For other stuff on Windows I use TextPad, and Gedit on everything else.

And I still require my sysadmins to learn /bin/ed for those times when you're on a 80x24 console with a system that's got a failed data disk, and you're in a single-user shell trying to edit /etc/fstab to disable mounting the failed disk and make the system bootable, and even vi isn't working:

# mount -o remount,rw /
# cd /etc
# /bin/ed fstab
64
P
*1
/dev/sda1 / ext4 defaults 0 1
*
/dev/sdb1 /data ext4 defaults 0 1
*s@/@#/
#/dev/sdb1 /data ext4 defaults 0 1
*w
65
*q
I know, I know, call me a wuss because of the 'P'. So I like a prompt, okay???
28 posted on 05/09/2018 1:24:15 PM PDT by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 25 | View Replies]

To: zeugma
> ...In the old teletype days, you could send control codes to the printer. A CR (Carriage Return) would cause the printhead to go to the beginning of the line, and the LF (Line Feed) would advance one line. Just a CR would cause you to overstrike what was already printed. A LF by itself would advance to the next line, but in the same character position...

I go back to those old days, and wrote I/O routines for ASR33 TTYs that did exactly that. In PDP-8 assembler.

Came in handy a few years later when I was writing routines for a Diablo daisy-wheel printer that did underscoring by doing an explicit CR and then over-striking the line with the underscore character as needed.

Explicit LF wasn't nearly as common, which is why it made more sense for Unix to use it as the EOL/newline, leaving CR available for the over-strike capability.

29 posted on 05/09/2018 1:34:00 PM PDT by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 27 | View Replies]

To: Karliner
Now what....

Get Notepad ++

30 posted on 05/09/2018 1:37:56 PM PDT by Bloody Sam Roberts (Perhaps we should care less about who we may offend and care more about who we may inspire.)
[ Post Reply | Private Reply | To 9 | View Replies]

To: dayglored

Hahaha ... XKCD, it figures :P


31 posted on 05/09/2018 1:43:07 PM PDT by Kommodor (Terrorist, Journalist or Democrat? I can't tell the difference.)
[ Post Reply | Private Reply | To 23 | View Replies]

To: dayglored
ed is for serious masochists.

One of the greatest and often overlooked features of vi(m) is the macro facility. I use that almost every single day to do iterative changes over files where using sed would be unwise because the data isn't structured well enough.

As for the 20MB file, yeah you're right. That isn't really anything. bump that up be a couple of orders of magnitude and it will definitely cause issues. Of course, most normal people don't edit hundred meg text files. I'm apparently not normal. At all. Thankfully, I've automated all of the tasks that regularly require parsing of multi-GB logfiles.

32 posted on 05/09/2018 1:52:26 PM PDT by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 28 | View Replies]

To: zeugma
> ...Of course, most normal people don't edit hundred meg text files. I'm apparently not normal. At all. Thankfully, I've automated all of the tasks that regularly require parsing of multi-GB logfiles.

Had a hunch that was what you were talking about. #MeToo, my bash history is littered with lines like:

cat foo.log | grep -vE '^foo|bar|woof$' | grep 'yes' | sed 's/^.*blah//; s/abc.*def/tweet/g' | sort -k2 | uniq >foo1.txt
vi foo1.txt
because
vi foo.log
is insane on a 4GB logfile.

But then, that's why the wizards at Bell Labs in the '70s gave us grep and sed and sort... and I haven't even mentioned awk...

33 posted on 05/09/2018 3:03:56 PM PDT by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 32 | View Replies]

To: dayglored

Neh I just shot the screen not the computer but I was thinking about just killing the computer but I work and play on the thing so it’s safe...for now!


34 posted on 05/09/2018 4:10:25 PM PDT by Karliner (Jeremiah29:11,Romans8:28 Isa 17, Damascus has fallen)
[ Post Reply | Private Reply | To 26 | View Replies]

To: Bloody Sam Roberts

Sounds interesting. I’m not computer savvy but sure do need this because I like writing so much.


35 posted on 05/09/2018 4:14:48 PM PDT by Karliner (Jeremiah29:11,Romans8:28 Isa 17, Damascus has fallen)
[ Post Reply | Private Reply | To 30 | View Replies]

To: dirtboy; i_robot73; Yo-Yo; dayglored
I am not a programmer, but i have used the old Win32Pad for years for my purposes, since it will highlight and make links clickable if you want (like http://peacebyjesus.witnesstoday.org).

But trying to find a free word pro which offers autopaste of every thing you copy, and auto save has been hard to find. Only the old but nifty Text Shield (replacement for Word Pad) does so, besides a few limited clipboard manages

36 posted on 05/09/2018 4:25:20 PM PDT by daniel1212 (Trust the risen Lord Jesus to save you as a damned and destitute sinner + be baptized + follow Him)
[ Post Reply | Private Reply | To 3 | View Replies]

To: dayglored
Here's the heart of one of my daily log processors... sed 's/#/ /g' $FILE | awk '{print $6}' | sort | uniq -ic | sort -nr | sed 's/://g' > $FILE.hosts

The above is used to process 5GB of logs daily. It takes that 5GB and turns it into something easily digestable in a few minutes. It is dirty, but it does the job. The input is a a bind log file. I take the top 20 lines off that file and I know the top 20 domains requested on the DNS server. I'll sometimes get a request from a business unit like "can you tell me how often 'foo.bar.com' has been requested? I'll run a quick for loop with an 'awk' against the .hosts files that adds columns from the various DNS servers, and can give them a daily count for the last month. The client is often surprised at how fast I can get the information put together. Gotta love that.

One of the nice changes I've seen in recent years is that even windows admins who used to sneer at shell scripts are waxing eloquent about the flexibility given them by powershell, but many still don't understand the power of what can really be accomplished with text files if you know what you're doing. I've asked for similar information to the type of request I mentioned above to our AD/DNS guys, and they just give you dumb looks. I end up having them zip up a few logs to send to me so I can dig it out myself.

37 posted on 05/09/2018 7:07:49 PM PDT by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 33 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-37 last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson