Re: [za-pm] file extension match to syntax highlighting in vim

2011-06-06 Thread Spike

Note: Beware! Default reply-to is to the list.


Hi Anne

I have an alias 'plt' which just runs perltidy -b. This copies my 
original.pl to original.pl.bak and gives original.pl as the tidy one. 
I've modified my perltidy_rc  to do what I want so providing the script 
passes a 'perl -cw' it is always what I want.
vi (or rather vim) displays the .bak just as it displays the .pl/ Maybe 
it has an 'understanding' .bak built in?


I can post my vimrc if you like.

On a similar note I once chased the lack of syntax highlighting and odd 
vi behavior for an hour only to realize that when logged in as myself vi 
was aliased to vim but as root it launched the original vi with no bells 
and whistles.


If anyone is not using perltidy I can strongly recommend it. It installs 
reliably from cpan with'cpan -i Perl::Tidy' on the CL.





On 2011-06-05 13:45, Anne Wainwright wrote:

Note: Beware! Default reply-to is to the list.


Hi,

when I have run perltidy I like to compare to the original file, but
the extension .pl.tdy does not pick up.

I have been looking this morning but cannot find what I need -
somewhere to add in '.tdy' so that it gets the perl syntax highlighting.

can someone give me a pointer please?

Anne
___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/

___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/


Re: [za-pm] MODERN PERL by Chromatic. a sort of review

2011-02-25 Thread Spike
Note: Beware! Default reply-to is to the list.


Sounds very interesting! Where can I gat a copy from? Is it in 'print' as well 
as PDF?

On 25 Feb 2011, at 23:53, Anne Wainwright  wrote:

> Note: Beware! Default reply-to is to the list.
> 
> 
> Hi,
> 
> I downloaded a copy of this some while back and have been reading
> through the chapters. Published in 2010 this is not another 'how
> to' starter book on Perl.
> 
> It is a resume of Perl syntax, useage, & programming in almost 'aide
> memoire' style, with small code snippets to illustrate the immediate
> points. Coverage ranges from Perl Philosophy onwards. The focus is on
> doing things using the best modern perl code elements rather than
> hangover code from years back - however well that code might still work.
> 
> Having read through LEARNING PERL, INTERMEDIATE PERL, and other related
> O'Reilly publications, this was perhaps a good moment to chance upon
> this. I find that it in a concise, structured, and ordered way it covers
> everything that I have sampled in the O'Reilly books (more perhaps
> since all of mine are old editions).
> 
> It does not replace PROGRAMMING PERL or THE PERL COOKBOOK, neither does
> it attempt to teach programming by way of worked examples or by
> developing small applications. Rather it puts together in one place the
> key points of current practice in a systematic way. It is not just a
> bare-bones reference though. Entries are linked to others where needed,
> it does not attempt to explain every option in full detail only those
> of major importance. It does set out to inculcate perl programming
> using modern idioms. 
> 
> The preface states: (I hope this wraps ok for you)
> 
>> Perl turns 23 years old later this year. The language has gone from a
>> simple tool for system administration somewhere between
>> shell scripting and C programming (Perl 1) to a powerful,
>> general-purpose language steeped in a rich heritage (Perl 5) and a
>> consistent, coherent, rethinking of programming in general intended
>> to last for another 25 years (Perl 6).
>> Even so, most Perl 5 programs in the world take far too little
>> advantage of the language. You can write Perl 5 programs as if
>> they were Perl 4 programs (or Perl 3 or 2 or 1), but programs written
>> to take advantage of everything amazing the worldwide
>> Perl 5 community has invented, polished, and discovered are shorter,
>> faster, more powerful, and easier to maintain than their alternatives.
>> Modern Perl is a loose description of how experienced and effective
>> Perl 5 programmers work. They use language idioms. They
>> take advantage of the CPAN. They’re recognizably Perlish, and they
>> show good taste and craftsmanship and a full understandin of Perl.
>> You can learn this too.
> 
> I haven't got Damian Conway's PERL BEST PRACTICE so I cannot compare it
> with that standard work which might be a comparable text.
> 
> Perhaps it would be a good reference for an experienced programmer
> wanting to fast-track their Perl skills. I like it because I find it a
> useful bridge between how I do things and how I should do things and I
> expect it to jerk my Perl up a few notches. It collects every thing
> together in one source that I might have to locate and synthesise from
> many different perl books.
> 
> I don't suppose that every one will like it, but for me it has a place
> in the scheme of things Perl.
> 
> One beef. I have it in .pdf format. The fonts are small and do not
> print out well. You cannot highlight or annotate it which would
> seem a must for me if electronic texts are to be really useful. I don't
> know what if any format supports those actions, none that I have seen
> so far. I'll likely get a print copy.
> 
> best regards
> Anne
> 
> 
> ___
> Za-pm mailing list
> Za-pm@pm.org
> http://mail.pm.org/mailman/listinfo/za-pm
> 
> posts also archived on Mail Archive
> http://www.mail-archive.com/za-pm@pm.org/
___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/

Re: [za-pm] Padre IDE

2011-01-24 Thread Spike

Note: Beware! Default reply-to is to the list.


Yep - that's why I have a shorcut to perl -cw that I run first. When I 
get time I want to make a simple shell script that will run perl -c and 
then only run perltidy if that is successful.


Vim is well worth persevering with - you will soon be putting little 
'wq' typos i all your M$ docs :-)
Best "beginig vi" tip I was given was to hit the Esc key more than once 
to be sure - it's quicker to hit it a few times than think about what 
mode you are in.

I installed perltidy utility (couldn't get it installed from cpan? so
downloaded the file and did the make stuff). Now playing with it. I
find that it doesn't pick up errors as claimed. I added an unmatched
'}' in the test file and no error noted, no .ERR file written, just
reformatted the code with the error included. ???



___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/


Re: [za-pm] Padre IDE

2011-01-24 Thread Spike

Note: Beware! Default reply-to is to the list.


I have tried one or two IDE's but they all mean using a non vi interface 
and find the other features of vi are just too good to loose.
So use vim and perltidy. Usual run perl -cw 

Re: [za-pm] is Perl on the decline?

2010-04-09 Thread Spike
Note: Beware! Default reply-to is to the list.I have had this data-cleaning experience often. "we don't have budget 
for the software","we are looking at blah product". I have usualy 
accomplished the task with a few carefully crafted Regex.
Hey thanks for the heads up on Lingua::EN::NameParse I will definitely 
haver a look at that!


Francois Marais wrote:

Note: Beware! Default reply-to is to the list.



Another example: At a major SA financal institution we are working a 
M$ developer was given the task to clean name and address lists on a 
DB2 database. You know the thing: Address line1, line2,... with 
potentially everything in each line. The task was to sort that as far 
as possible into title, forenames, surname,...


Anyway, a month later he came back proudly wielding a 12page SQL 
script. When asked how it worked he refused to explain, with a proud 
smile, saying the logic was too impenetrable.


I heard about this, had a look around on CPAN, downloaded 
Lingua::EN::NameParse, and after fiddling with the config file to 
introduce local titles like Mnr/Mev/..., I was cleaning the DB2 data 
no problem.  And I only had to write 10 lines of code, and importantly 
no parsing. And it took me one hour. And the parsing criteria are in a 
config file for all to see, easy to change.


From every possible angle, except the original programmers twisted 
sense of pride, the Perl solution was better.


On Thu, Apr 8, 2010 at 2:20 PM, Spike <mailto:sp...@mweb.co.za>> wrote:


Note: Beware! Default reply-to is to the list.

perl will never die for the simple reason it works. And works
fast. Ask a java programmer to do the equivalent of perl -p -i -e
on a hundred 500Mb files and see which app is ready first and
which runs the quickest.

We have complex systems built on .net. they work, not brilliantly
but they do work.  But simple things are often very time
consuming. A quick example springs to mind - we need to FTP a
600Mb text files from a remote site and total all the numbers in
the 4th, 9th and 17th columns depending on the value of the text
in the first column. It took about 15 mintis to write and hour to
polish in perl. The .net guys are still trying to get the FTP to work.

So what I'm saying is that no matter how advanced and expensive
your lazer concrete cutter is, a drill will always be faster and
more reliable if you want to make hole.

Winston Haybittle (by way of Anne Wainwright
 <mailto:anothera...@fables.co.za>) wrote:

Note: Beware! Default reply-to is to the list.
Hi Ann & Group
We need clear roadmap for PERL 6, maybe a standards cross platform compiler.
This is definitely not technical issue, maybe management/marketing
optimizations needed. And then there is training and support? I mean PERL
kills PHP hands down?! Modern day architecture with open standards means
that Programming Language/OS lock in is less relevant. People should be
packaging virtual appliances with Perl in the core? As is the norm with the
very best VM appliances.
Winston...

-Original Message-
From: za-pm-bounces+winstonh=mweb.co...@pm.org 
<mailto:za-pm-bounces+winstonh=mweb.co...@pm.org>
[mailto:za-pm-bounces+winstonh=mweb.co...@pm.org] On Behalf Of Anne
Wainwright
Sent: 06 April 2010 11:04 PM
To: za perlmongers
Subject: [za-pm] is Perl on the decline?

Note: Default reply-to is to the poster.
Hi,

Well, is it?

I was surprised (perhaps I wasn't) when I logged onto the za-pm
list-server to find that of course it is the ubiquitous Mailman which
is written in Python, and although it is a very capable package I
thought we might be supporting home industries  ;) There are a number of
mailing list managers written in perl (sympa, dadamail). Can't comment
on whether we have the best one, but I'm happy with it anyway.

Looking on the ubuntu software centre app, entering 'perl' brings up 19
apps which is reduced to 13 if we omit editors, ide's, and perl-specific
tools.

entering 'python' brings up 99 apps reduced to 72 on the same basis.

OK, figures up or down one or two, but that's a big difference. There
are an awful lot more general applications written in Python than perl
available for a linux box.

Conversely, under IT & computer the local new book site loot.co.za 
<http://loot.co.za>
lists 338 books under 'perl' and 207 under 'python', but of course Perl
has been around a _lot_longer and many of the perl titles are of
long-standing.

I am (very slowly) developing an app in perl/Catalyst. Needing
something up and running faster than I was going I found a RAD front -
Kexi - to do the CRUD d

Re: [za-pm] is Perl on the decline?

2010-04-08 Thread Spike
Note: Beware! Default reply-to is to the list.perl will never die for the simple reason it works. And works fast. Ask 
a java programmer to do the equivalent of perl -p -i -e on a hundred 
500Mb files and see which app is ready first and which runs the quickest.


We have complex systems built on .net. they work, not brilliantly but 
they do work.  But simple things are often very time consuming. A quick 
example springs to mind - we need to FTP a 600Mb text files from a 
remote site and total all the numbers in the 4th, 9th and 17th columns 
depending on the value of the text in the first column. It took about 15 
mintis to write and hour to polish in perl. The .net guys are still 
trying to get the FTP to work.


So what I'm saying is that no matter how advanced and expensive your 
lazer concrete cutter is, a drill will always be faster and more 
reliable if you want to make hole.


Winston Haybittle (by way of Anne Wainwright ) 
wrote:

Note: Beware! Default reply-to is to the list.
Hi Ann & Group
We need clear roadmap for PERL 6, maybe a standards cross platform compiler.
This is definitely not technical issue, maybe management/marketing
optimizations needed. And then there is training and support? I mean PERL
kills PHP hands down?! Modern day architecture with open standards means
that Programming Language/OS lock in is less relevant. People should be
packaging virtual appliances with Perl in the core? As is the norm with the
very best VM appliances.
Winston...

-Original Message-
From: za-pm-bounces+winstonh=mweb.co...@pm.org
[mailto:za-pm-bounces+winstonh=mweb.co...@pm.org] On Behalf Of Anne
Wainwright
Sent: 06 April 2010 11:04 PM
To: za perlmongers
Subject: [za-pm] is Perl on the decline?

Note: Default reply-to is to the poster.
Hi,

Well, is it?

I was surprised (perhaps I wasn't) when I logged onto the za-pm
list-server to find that of course it is the ubiquitous Mailman which
is written in Python, and although it is a very capable package I
thought we might be supporting home industries  ;) There are a number of
mailing list managers written in perl (sympa, dadamail). Can't comment
on whether we have the best one, but I'm happy with it anyway.

Looking on the ubuntu software centre app, entering 'perl' brings up 19
apps which is reduced to 13 if we omit editors, ide's, and perl-specific
tools.

entering 'python' brings up 99 apps reduced to 72 on the same basis.

OK, figures up or down one or two, but that's a big difference. There
are an awful lot more general applications written in Python than perl
available for a linux box.

Conversely, under IT & computer the local new book site loot.co.za
lists 338 books under 'perl' and 207 under 'python', but of course Perl
has been around a _lot_longer and many of the perl titles are of
long-standing.

I am (very slowly) developing an app in perl/Catalyst. Needing
something up and running faster than I was going I found a RAD front -
Kexi - to do the CRUD dirtywork. No suprise, buttons & stuff can have
actions coded in Python or Ruby, but not perl! That's the KDE offering,
the Gnome offering - Glom - also allows coding in Python but not in perl
(or Ruby for that matter).

This result could of course be skewed by the sort of programming that
each language is typically used for. Perl is probably way ahead in the
administration stakes, but why has it lagged behind in general useage?
Is this a technical issue?

Do we have a new generation of programmers brought up on Python and not
perl? At the local university Python has been the starter package for
IT for some years. They are very M$ oriented and students are not
much exposed to linux and hence perl.

I could go on, but wondered what the views on this from the
professional world are.

bestest
Anne
___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/

___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/

  
___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/

[za-pm] test2

2010-04-06 Thread Spike
Note: Default reply-to is to the poster.
tst2
___
Za-pm mailing list
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/