Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-23 Thread songbird
David Wright wrote: ... > One of the most pleasurable times in my career was when our Research > Computing Advisor thrust a copy of the Green Book into my hands. > http://www.math.bas.bg/bantchev/place/snobol/gpp-2ed.pdf > After years of Fortran, this was my first experience of a designed > compute

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-22 Thread David Wright
On Sun 19 Jul 2020 at 11:35:31 (+), Ajith R wrote: > > > First, there is a somewhat specific question about unspecified > > substitutions. For all I know about these substitutions, you might > > actually need XSLT to do them properly. > > The substitution that I had in mind requires referring

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-20 Thread mick crane
On 2020-07-19 09:32, to...@tuxteam.de wrote: On Sat, Jul 18, 2020 at 10:20:00PM +0100, mick crane wrote: [...] >Of course, hacking oneliners (with some measure) can be fun and >help in the language's mastery [...] they do work tho' and can be astonishingly quick ? Quick in typing? In thi

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-19 Thread David Christensen
One last point I missed in my previous post -- big files. Many Perl functions and/or libraries expect to do everything in RAM. This becomes a problem when I want to compress, encrypt, save, and checksum 14 GiB system drive images using a live drive and a Perl program in computers without larg

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-19 Thread William Michels
Hello Ajith, Tom Browder suggests taking a look at Raku (née Perl6), and I concur. While I don't know Malayalam at all, I can write the regex code below with ease: > #all code below using the Raku REPL: > say '0123456789'.chars; 10 > say $/ if '0123456789' ~~ / \d+ /; 「0123456789」 > #now with B

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-19 Thread Ajith R
Hi, > First, there is a somewhat specific question about unspecified > substitutions. For all I know about these substitutions, you might > actually need XSLT to do them properly. The substitution that I had in mind requires referring to characters based on their unicode properties like script,

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-19 Thread Ajith R
Hi, > I seem to recall that he puts Perl at the top of the  > heap, and notes that Perl compatible regular expressions (PCRE) are > available via libraries in other programming languages. Thanks for confirming that I didn't make a wrong choice. Programs that claim to use PCRE don't support ever

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-19 Thread tomas
On Sat, Jul 18, 2020 at 10:20:00PM +0100, mick crane wrote: [...] > >Of course, hacking oneliners (with some measure) can be fun and > >help in the language's mastery [...] > they do work tho' and can be astonishingly quick ? Quick in typing? In thinking? In compile time? In run time? There's

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread David Christensen
On 2020-07-18 02:59, davidson wrote: On Thu, 16 Jul 2020 Ajith R wrote: On Thursday 16 July 2020 4:54:09 AM IST davidson wrote: [snip]    $ sed 'y/\xc2\xa0/%/' somefile An off topic question: of sed, awk and perl, if I am to chose one to learn, which would you suggest. I wanted to do some s

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread mick crane
On 2020-07-18 22:08, to...@tuxteam.de wrote: On Sat, Jul 18, 2020 at 09:31:29PM +0100, mick crane wrote: [...] You see perl one liners and sed mentioned loads more than awk on the interweb. Don't know why that is. ISTR Perl had a bout of onelineritis back in its youth. This tends to be somew

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread tomas
On Sat, Jul 18, 2020 at 09:31:29PM +0100, mick crane wrote: [...] > You see perl one liners and sed mentioned loads more than awk on the > interweb. > Don't know why that is. ISTR Perl had a bout of onelineritis back in its youth. This tends to be somewhat detrimental to a language, because peop

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread mick crane
On 2020-07-18 14:56, to...@tuxteam.de wrote: On Sat, Jul 18, 2020 at 09:59:46AM +, davidson wrote: On Thu, 16 Jul 2020 Ajith R wrote: >On Thursday 16 July 2020 4:54:09 AM IST davidson wrote: [snip] >>   $ sed 'y/\xc2\xa0/%/' somefile > >An off topic question: of sed, awk and perl, if I am t

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread William Michels
On Sat, Jul 18, 2020 at 3:40 AM Zenaan Harkness wrote: > # simple version: > perl -p -i[.bak] -e 's/xxx/yyy/[g];' $(readlink somefile) # readlink is > necessary do not clobber symlinks Speaking as not-an-expert on Raku (née Perl6), you'd write the above something like: user@mbook:~$ # One-liner

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread songbird
Andrei POPESCU wrote: > On Sb, 18 iul 20, 09:59:46, davidson wrote: >>=20 >> But first of all, I should reiterate that I lack expertise. >>=20 >> I lack expertise. >>=20 >> Second, I have no useful knowledge about real programming languages >> (such as perl) to declare. > > Same disclaimers apply t

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread tomas
On Sat, Jul 18, 2020 at 09:59:46AM +, davidson wrote: > On Thu, 16 Jul 2020 Ajith R wrote: > >On Thursday 16 July 2020 4:54:09 AM IST davidson wrote: > > [snip] > >>   $ sed 'y/\xc2\xa0/%/' somefile > > > >An off topic question: of sed, awk and perl, if I am to chose one to > >learn, which wou

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread Andrei POPESCU
On Sb, 18 iul 20, 09:59:46, davidson wrote: > > But first of all, I should reiterate that I lack expertise. > > I lack expertise. > > Second, I have no useful knowledge about real programming languages > (such as perl) to declare. Same disclaimers apply to me. > But as a peer, albeit a thick

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread Zenaan Harkness
I use perl as a "slightly better sed", in particular the following commands I just cut and paste and modify for use, for many years now, to do (multi-)file search and replace: ``` # simple version: perl -p -i[.bak] -e 's/xxx/yyy/[g];' $(readlink somefile) # readlink is necessary do not clobber

sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

2020-07-18 Thread davidson
On Thu, 16 Jul 2020 Ajith R wrote: On Thursday 16 July 2020 4:54:09 AM IST davidson wrote: [snip]    $ sed 'y/\xc2\xa0/%/' somefile An off topic question: of sed, awk and perl, if I am to chose one to learn, which would you suggest. I wanted to do some substitutions. I read about them and de