RE: convert script awk in python

2021-03-24 Thread Avi Gross via Python-list
Just to be clear, Cameron, I retired very early and thus have had no reason to use AWK in a work situation and for a while was not using UNIX-based machines. I have no doubt I would have continued using WK as one part of my toolkit for years albeit less often as I found other tools better for some

Re: convert script awk in python

2021-03-24 Thread Cameron Simpson
On 24Mar2021 12:00, Avi Gross wrote: >But I wonder how much languages like AWK are still used to make new >programs >as compared to a time they were really useful. You mentioned in an adjacent post that you've not used AWK since 2000. By contrast, I still use it regularly. It's great for proo

Re: convert script awk in python

2021-03-24 Thread Alan Gauld via Python-list
On 24/03/2021 16:00, Avi Gross via Python-list wrote: > But I wonder how much languages like AWK are still used to make new programs > as compared to a time they were really useful. True. I first discovered awk from a Byte article around 1988/9 and it became my goto tool for text munching right u

Re: port to PDOS (especially mainframe)

2021-03-24 Thread Paul Edwards
On Wednesday, March 24, 2021 at 11:07:48 PM UTC+11, Christian Heimes wrote: > > "long long" is not C90. I don't have support for that. The > > "i370" target of GCC 3.2.3 doesn't have DI instructions > > working. Just 32 bits. Everything is 32 bits. > Which version of Python are you using as bas

RE: convert script awk in python

2021-03-24 Thread Avi Gross via Python-list
Alan, Back when various UNIX (later also included in other Operating environments like Linux and the Mac OS and even Microsoft) utilities came along, the paradigm was a bit different and some kinds of tasks were seen as being done with a pipeline of often small and focused utilities. You mentioned

Re: convert script awk in python

2021-03-24 Thread Alan Gauld via Python-list
On 23/03/2021 14:40, Avi Gross via Python-list wrote: > $1 == 113 { > if (x || y || z) > print "More than one type $8 atom."; > else { > x = $2; y = $3; z = $4; > istep++; > } > } > > I am a tod concerned as to where any of the variables x, y or z have been > d

RE: convert script awk in python

2021-03-24 Thread Avi Gross via Python-list
Cameron, I agree with you. I first encountered AWK in 1982 when I went to work for Bell Labs. I have not had any reason to use AWK since before the year 2000 so I was not sure that unused variables were initialized to zero. The code seemed to assume that. I have learned quite a few languages sinc

Re: port to PDOS (especially mainframe)

2021-03-24 Thread Christian Heimes
On 23/03/2021 22.22, Paul Edwards wrote: > "long long" is not C90. I don't have support for that. The > "i370" target of GCC 3.2.3 doesn't have DI instructions > working. Just 32 bits. Everything is 32 bits. Which version of Python are you using as baseline? CPython requires C99 since 3.6, https:/