Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

SOP6W

by rir (Vicar)
on Apr 24, 2003 at 19:54 UTC ( #252983=monkdiscuss: print w/ replies, xml ) Need Help??

As Perl6 questions begin to be intermingled with Perl5 questions SOPW is going to become a confusing place for the novice Perler. I suspect at some point the trickle of Perl6 questions will become a sudden flood.

I don't think the time has arrived yet, but I think there will be a period when a separate Perl6 Seekers section could be good to have.

Frontpaging is going to have an additional twist to it when Perl6 and Perl5 questions are both common and not easily differenciated.

Are these things the Monastery wants to address?

Comment on SOP6W
Re: SOP6W
by halley (Prior) on Apr 24, 2003 at 20:33 UTC

    Since Perl6 will treat any code as "old code" unless it starts with one of the new keywords, I'd suggest this site operate in that spirit. All code is Perl. Some is explicitly marked as being a new type of perl. Lack of such a mark indicates a compatibility with the old language.

    Two technical helpers I'd propose:

    • A checkbox above the "Your text:" could mark a node submission as relating to Perl6. Otherwise, let everyone assume (and comment) on Perl as they're familiar.
    • The searcher, and the Monk's viewing settings, can and should be able to filter on that Perl6 flag. You could then ignore anything Perl6-specific until it's released, or you could ignore anything not Perl6-specific if that's what you want to see.

    --
    [ e d @ h a l l e y . c c ]

      Since Perl6 will treat any code as "old code" unless it starts with one of the new keywords...
      That's not quite right. Perl 6 will treat code as Perl 5 code if (and only if) the first executable line in the program is a package statement.

      And, yes, we're going to need some way to distinguish Perl 6 code from Perl 5 code. Because there are a few simple cases that mean completely different things in Perl 5 and Perl 6. For example:

      print $hash{bang};

      In Perl 5 that means: print the value of the entry of %hash whose key is "bang".

      In Perl 6 that means: print the value of the entry of the hash referred to by $hash whose key is "bang".

      How could we distinguish Perl 5 and Perl 6 code? I'd suggest we add a <code6> flag and have the monastery render code marked as Perl 6 in a different font. For example, the submission:

          We're going to need some way to distinguish:
          
          <code>
              print $hash{bang};  # entry 'bang' of hash %hash
          </code>
          
          from:
          
          <code6>
              print $hash{bang};  # entry 'bang' of hash %{$hash}
          </code6>
      
      might be rendered:
      We're going to need some way to distinguish:
          print $hash{bang};  # entry 'bang' of hash %hash
      
      from:
          print $hash{bang};  # entry 'bang' of hash %{$hash}
      

      Note: I've used a red-shift/blue-shift visual pun here, but in reality we'd need to use distinct font faces -- perhaps serif for Perl 5 and sans-serif for Perl 6 -- so as not to disadvantage those with impaired colour vision.

      Using a separate mark-up tag would also support those monks who (through necessity or by choice) use a non-visual browser.

        Hmmm. This is a little OT, but how would you do the equivalent of print $hash{bang}; in Perl 6? print %hash{bang};?

        Maybe I should start reading the Apocolypses or something...

        How could we distinguish Perl 5 and Perl 6 code? I'd suggest we add a <code6> flag and have the monastery render code marked as Perl 6 in a different font.

        Personally I find such conventions easy to quickly forget with disuse because the association of font and language is arbitrary. I think this will not be of much help to occasional users or first-timers here. I see a lot of edits to add code tags and such now.

        I like this idea, the idea just doesn't address the problem as I was envisioning it.

        Something like halley's suggestion puts the issue explicitly in front of every seeker. Perhaps to the left of the Title entry widget something like a required selection widget:

        This post relates to: Perl5 Perl6 Both N/A Don't Know

        Whether the monastery would want to make someone who selects Dunno jump through more hoops before seeking wisdom is a tough question for me. I find such stealth dialogs unfriendly.

        I had to visit this page using IE to see what you meant. My Mozilla client displays everything sans formatting. However this happens, it needs to be visible within the text and not merely an applied style.

Re: SOP6W
by Mr. Muskrat (Abbot) on Apr 24, 2003 at 20:50 UTC

    Do I think that PerlMonks needs a Perl6 SOPW section? No. And why don't I? We still receive Perl4 questions. Have they caused problems differentiating them from the Perl5 questions? Not at all. I do not see how adding Perl6 questions to the mix will be any different.

    <frantic>Oh no! Now we have to deal Yet Another Perl Flavor! What ever will we do?</frantic>
    We will do what we do best! We will continue to provide a place for newbies and wizards alike to seek and/or provide help with Perl, no matter the version.

      I do not see how adding Perl6 questions to the mix will be any different.

      It will be different.

      Perl5 came out in 1994 so by the time PM came around (1999?) Perl4 was fairly obsolete. I have not noted many Perl4 questions. Hopefully Perl6 will be much more popular.

      Perl5 is a superset of Perl4, at least I can't remember any Perl4 that failed or changed meaning under perl5. Perl6 changes the meaning of very small chunks of code. The confusion factor will be much greater.

      I bring up the issue at this early date because I dislike the idea of splitting SOPW. Fancier solutions may require support in the site's code. I like the trend of halley's thoughts on this.

      <frantic>Oh no! Now we have to deal Yet Another Perl Flavor! What ever will we do?</frantic>

      This is just insulting and you are forgiven. In my post I stated that the problem has not arrived yet -- there is nothing frantic in my post. I suggested action -- there is no What ever will we do? tone. Like you I think PM is great. I am trying to keep it that way. I'm sorry that the quality of my thoughts are such that they inspire your ridicule.

      Consider: Help, I've read the doc's but I can't figure out what's wrong:

      blah(); yada(); $var{$field} |= $bool;
      Do we really want a bunch of Is it Perl6 or Perl5? responses to nodes like that?

        Looking over my post, I can see how you or anyone else might take that as an insult. It was not intended as such and I apologize to you and anyone else how took it as such.

        When someone mentions making major or even minor changes to PerlMonks or to Perl for that matter, some people do get frantic about it. Perhaps I should have used <sarcastic>, <unwashed masses> or <poor attempt at humor> instead.

        Perl5 will still work with Perl6. As for your example, if that were posted now, what would you say? I'd say something along the lines of "Where's the rest of the code? Is this 5.6.x, 5.8.x or some other version of Perl?"

Re: SOP6W
by hossman (Prior) on Apr 25, 2003 at 00:55 UTC

    I'd say No ... for the very reasons that have allready been expressed (and will likely be echoed by many more).

    I would probably agree however that having a "Parrot" Section might be usefull in the not too distant future. While Parrot will be a big part of the Perl 6 Implimentatin, people with questions about the "Perl Language" will not neccessarily (all) care about "Parrot Language" questions.

    (Part of me thinks that it shouldn't matter -- that PerlMonks doesn't need a Parrot section anymore then "C++Monks" needs a "MIPS" section. But the difference is that C++ can be compiled down to a wide variety of machine langauges, where as Perl6 will only ever be compiled down to Parrot, so the communities are going to be a little more tightly bound.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://252983]
Approved by ChemBoy
Front-paged by Tanalis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2014-12-21 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls