Re: DSLs in perl and python (Was sobering observation)

2016-03-19 Thread Peter Otten
Rustom Mody wrote: > On Friday, March 18, 2016 at 4:17:06 AM UTC+5:30, MRAB wrote: >> Stick an "x" on the end of the regex: /something/x or s/old/new/x. > > Thanks! > > Is there somewhere a regexp 'introspection' API/capability available? > > ie if the re looks like > rexp = r""" > # DSL (insta

DSLs in perl and python (Was sobering observation)

2016-03-19 Thread Rustom Mody
On Thursday, March 17, 2016 at 10:09:27 PM UTC+5:30, Charles T. Smith wrote: > or something else ... you're in a "defend python at all costs!" mode. Interesting that I see this now. I was showing some finance-friends how to to convert one of the tables in https://www.nyse.com/publicdocs/nyse/mark

Re: DSLs in perl and python (Was sobering observation)

2016-03-19 Thread Jussi Piitulainen
Rustom Mody writes: > On Friday, March 18, 2016 at 4:17:06 AM UTC+5:30, MRAB wrote: >> Stick an "x" on the end of the regex: /something/x or s/old/new/x. > > Thanks! > > Is there somewhere a regexp 'introspection' API/capability available? > > ie if the re looks like > rexp = r""" > # DSL (instant

Re: DSLs in perl and python (Was sobering observation)

2016-03-19 Thread Mark Lawrence
On 17/03/2016 17:47, Rustom Mody wrote: On Thursday, March 17, 2016 at 10:09:27 PM UTC+5:30, Charles T. Smith wrote: or something else ... you're in a "defend python at all costs!" mode. So now my questions: How do you in perl make regexps readable like python's VERBOSE? Can you do better in p

Re: DSLs in perl and python (Was sobering observation)

2016-03-19 Thread Rustom Mody
On Friday, March 18, 2016 at 4:17:06 AM UTC+5:30, MRAB wrote: > Stick an "x" on the end of the regex: /something/x or s/old/new/x. Thanks! Is there somewhere a regexp 'introspection' API/capability available? ie if the re looks like rexp = r""" # DSL (instantiation) for describing NYSE symbology

Re: DSLs in perl and python (Was sobering observation)

2016-03-18 Thread MRAB
On 2016-03-17 22:22, Mark Lawrence wrote: On 17/03/2016 17:47, Rustom Mody wrote: On Thursday, March 17, 2016 at 10:09:27 PM UTC+5:30, Charles T. Smith wrote: or something else ... you're in a "defend python at all costs!" mode. So now my questions: How do you in perl make regexps readable li

Re: DSLs in perl and python (Was sobering observation)

2016-03-18 Thread Rustom Mody
On Friday, March 18, 2016 at 6:52:53 PM UTC+5:30, Peter Otten wrote: > Rustom Mody wrote: > > > On Friday, March 18, 2016 at 4:17:06 AM UTC+5:30, MRAB wrote: > >> Stick an "x" on the end of the regex: /something/x or s/old/new/x. > > > > Thanks! > > > > Is there somewhere a regexp 'introspection