Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
"be consistent"
 
PerlMonks  

Re: Feature Request: Adding Colors to Source Code

by jeffa (Chancellor)
on Mar 07, 2004 at 00:33 UTC ( #334560=note: print w/ replies, xml ) Need Help??


in reply to Feature Request: Adding Colors to Source Code

There is also Perl::Tidy, which uses CSS ... but as usual, this is a feature request that we don't need.

Instead, the user can cut and copy the text into her/his editor of choice and read it from there. Or, something like:

lynx -dump http://perlmonks.org/index.pl?node_id=334560&displaytype=di +splaycode mv index.pl.htm index.pl gvim index.pl rm index.pl
YMMV

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)


Comment on Re: Feature Request: Adding Colors to Source Code
Download Code
Re: Re: Feature Request: Adding Colors to Source Code
by Vautrin (Hermit) on Mar 07, 2004 at 20:21 UTC
    Well, that's the thing, I don't think I should have to go through hoops to read the code someone has posted. Syntax highlighting is much more convinient. A good example is php.net. I don't code in PHP often (except when I have to), but when I do, any examples are much easier to read -- especially the verbose ones. Besides, I don't always have a lot of time when I'm on Perl Monks. The extra effort required to view noob code sometimes means I don't have the time to spend on it.

    Want to support the EFF and FSF by buying cool stuff? Click here.

      So you would rather someone else go through hoops instead, eh? I call that false lazyness. First of all, some of us don't even need syntax highlighting - i for one do use it, but i do not rely upon it. When i was cutting my teeth here at Perlmonks i didn't complain about not having enough time to review "noob" code ... i just ran their code through perltidy and rolled with it. It's up to me to find the time.

      It's really quite simple you see, this kind of feature is one that you yourself can implement. Just write a CGI script that accepts a number as it's single param and fetch that node from Perlmonks with displaytype=displaycode. Run through the code through one of the many CPAN modules mentioned and display. Personally, i think this should be a requirement before one can become a Friar. ;)

      UPDATE: One time only? Maybe if you are God ... but most of us mere mortals have to rely on testing and debugging before we get it right. And the more users you have to accomodate for, the more testing and debugging required. Not to mention the committee that must be assembled to agree upon what to implement and what to reject. Give your client an inch and they will want a mile.

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      

        So you would rather someone else go through hoops instead, eh? I call that false lazyness.

        One time only. After that, the machine goes through hoops for us. I'd add the feature myself if I could because IMHO this is the single most important feature missing here.

        some of us don't even need syntax highlighting

        Those who don't need it can still benefit from it. Those who don't want it aren't hurt in any way except a little bandwidth. This feature only adds something to the site. Code to implement it is freely available. I just hope someone will spend a few minutes to implement it.

        Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Re: Re: Feature Request: Adding Colors to Source Code
by Juerd (Abbot) on Mar 07, 2004 at 20:38 UTC

    Instead, the user can cut and copy the text into her/his editor of choice and read it from there.

    Of course we can copy and paste. But I'd rather have it in my browser, enabled for every Perl code block.

    It's a bit like having hyperlinks. Sure, you could copy and paste the address, but I have to admit that I kind of like being able to simply point and click.

    We don't NEED anything. It's just something that would be a very welcome addition. Even many PHP fora have syntax colouring. I know we can do BETTER than anything PHP.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://334560]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-04-20 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls