Live data from Hacker News

Text Processing in the Shell

blog.balthazar-rouberol.com

41–50 of 109 posts

Re: Text Processing in the Shell

#41
post #40

Just Don't. Unix-style text stream processing was super cool in 80s-90s but is born tech-debt today.

I love to cook 5-course meals for friends and family. But sometimes when I'm all alone by myself, I slice up a bun and slap meat on it. It's as fast and tastes just as good as in the 80ies.

Sandwhiches don't need to be maintained

Re: Text Processing in the Shell

#42

Earlier quoted context omitted.

Use any modern programming language.

The gnu tools are super fast and do the job. Ive seen people spinning their own solutions which end up being super slow and arguable take more time to develop. With any gnu tools it is great that they will stay there for your life and are usually by default installed on every system

Yeah, except anything that is not trivial ends up being write-only

Re: Text Processing in the Shell

#43
post #16

Earlier quoted context omitted.

https://tldr.sh/

Even better: https://github.com/chubin/cheat.sh This includes man pages from tldr, and more! The command line utility had been a great help for me over the past few months.

Thank you, did not know about this one!

Re: Text Processing in the Shell

#44

Sometimes I find it strange - in both good and bad way - that we are, in 2020, learning tools and languages designed and build in the 80s, with models and constraints of the time, with 40 years of layers of backwards compatibility, and actually going sometimes back to the 70s I am still learning tools designed around the constraints of teleprinters Sure, it’s the same on Windows side (and macOS side with their classi…

I find these posts annoying that say we're anchored in past tech and we must be able to do better, but never suggest how. Please make a suggestion or two. (NB ultimately our character handling is based on 'writing' which goes back thousands of years, not 50, and it survives well).

I suggest learning from history. The doing better has already happened. The 1960s terminal I/O model evolved into the console I/O model during the 1980s; from firmware-mediated access to CGA, through the VIO+KBD+MOU subsystems of OS/2, to Windows NT console objects.

* http://jdebp.uk./FGA/tui-console-and-terminal-paradigms.html

* https://news.ycombinator.com/item?id=17238350

Re: Text Processing in the Shell

#45
post #38

Sometimes I find it strange - in both good and bad way - that we are, in 2020, learning tools and languages designed and build in the 80s, with models and constraints of the time, with 40 years of layers of backwards compatibility, and actually going sometimes back to the 70s I am still learning tools designed around the constraints of teleprinters Sure, it’s the same on Windows side (and macOS side with their classi…

> I am still learning tools designed around the constraints of teleprinters We are still reading books using a 2k year old alphabet to represent ideas. Not sure why it would be surprising that text manipulation is still the norm pretty much in everything we do, including computing.

If we're going to update, I think we should stop using C for /s/ and /k/ noises (we already have characters for those). It can exclusively represent /tʃ/, as in "China" would become "Cina". We don't need X either for much the same reason, which is all the better because we'll need a character for /ʃ/. "Delicious" will become "delixious", "shadow" will become "xadow", "nation" will become "naxion".

I know this sounds diffikult but migraxion to a new system is always diffikult. We're talking about a pretty serious rewrite here so everyone's kooperation will be nesessary. It's not an easy desixion but if you cek into it we can use other languages as a model. Spelling reforms are not a new konsept.

Re: Text Processing in the Shell

#46
post #34

Earlier quoted context omitted.

The English language is several hundreds of years old, and the ADN is several hundreds of millions years old. Everything we are based on is legacy; I do not see why it should be different in computing.

In fairness to the OP, there's a lot of cruft in the way terminal work that really isn't necessary any more but need to be there because of backwards compatibility. Such as - formatting being in-lined via ANSI escape sequences, - and there's a massive disparity between what escape sequences terminal emulators support, - control codes being part of the same character set as printable characters, - changing the behavio…

... and pretty much all of those were addressed, outwith Unix, by the evolution of the 1960s terminal I/O model into the console I/O model during the 1980s.

You even forgot to mention one of the things that was addressed: input. Terminal I/O input, done properly, requires a full ECMA-48 decoder state machine, with bodges to accommodate non-conformant warts from the Linux KVT, SCO Console, and RXVT. This is all too often not done properly, because people do not realize that there is ECMA-48 in both directions; and is a mess, just looking at function keys alone and not even accounting for keypad application/normal modes and a mouse/locator. Console I/O evolved into uniform input event records for HIDs that did not require state machines to decode.

Note that the lack of a layout system is only applicable to character-mode terminals. Block-mode terminals are a quite different kettle of fish.

Re: Text Processing in the Shell

#48
post #45
post #38

Earlier quoted context omitted.

> I am still learning tools designed around the constraints of teleprinters We are still reading books using a 2k year old alphabet to represent ideas. Not sure why it would be surprising that text manipulation is still the norm pretty much in everything we do, including computing.

If we're going to update, I think we should stop using C for /s/ and /k/ noises (we already have characters for those). It can exclusively represent /tʃ/, as in "China" would become "Cina". We don't need X either for much the same reason, which is all the better because we'll need a character for /ʃ/. "Delicious" will become "delixious", "shadow" will become "xadow", "nation" will become "naxion". I know this sounds…

If anything, c should be /ʃ/ and tc should be /tʃ/. Looks funny but it's very phoenetic.

But people have tried this (spelling reforms/re-phoenetification of English). A lot.

Language drifts, that's just what it does.

Re: Text Processing in the Shell

#50
post #6

A little suggestion for the authors, they mentioned xargs, I think [GNU parallel]( https://www.gnu.org/software/parallel/ ) might work a mention too, since it is a kind of modern successor that can use many computers to run tasks.

Given the article is about text processing and nothing like "big data", I don't think using multiple computers is really an important feature.
Post reply on HN