Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Wiki-Style syntax for posting (DWIM)

by tye (Sage)
on Oct 15, 2008 at 03:54 UTC ( #717133=note: print w/replies, xml ) Need Help??


in reply to Wiki-Style syntax for posting

Yeah, I think this argues for making much more focused hints. Just note P tags and CODE tags (and that < and [ might need CODE tags), quite concisely, with examples, directly above the Title box (with a ?-style link to more detailed help). (Maybe also discourage BR tags; we hates them fat, stupid, nasty habitses.)

As for more DWIM, I wouldn't do any of the many "wiki" mark-up styles nor would I do POD (at least at first). But I would like to take a couple of good ideas that are common to many of those:

  1. Turn blank lines into <p> tags
  2. Enclose indented blocks in <code> tags

Another DWIM feature that I'm surprised has never occurred to me before nor do I recall ever having seen it suggested: Require a space (or open paren or quote) before and not after [ for it to be transformed into a link (for users who haven't chosen "expert" mode).

I think those three "simple" DWIM features would eliminate a sizable majority of the formatting mistakes here. There is a bit of a trick in how to decide whether to apply those features to a particular node.

I think the most likely way to get this is to add a "format type" field to all write-ups and as a user setting. The choices would need to include at least "traditional PM" formatting that does no DWIM (for existing write-ups and for users who don't want any "improvements") and a "DWIM" formatting that uses the above 3 DWIM features while allowing all of the traditional PM mark-up. I'd probably just have all users default to "DWIM" formatting for their future nodes. A per-node over-ride would also be nice, especially for persistently anonymous monks.

It might be worth-while to have other formatting choices but I've talked myself out of all of the other options I've considered recently. I even considered having a UTF-8 format option, but I think it would be better to just convert the database en masse to UTF-8 (which would also tempt me to restrict the character set for node titles, but then Perl 6 would just use some such restricted obnoxious character for some strange operator and then we wouldn't be able to talk about it properly).

Oh, I just did some spelunking via SQL and my nefarious plan for /(?![^\s(>"])\[(?!\s)/ being optionally required for links to be expanded appears to indeed be a very effective heuristic. :)

I will try to get around to trolling the recent previous suggestions for how to redo the "hints" and come up with my own exact recommendation for the new to-the-point and in-your-face hints.

- tye        

Replies are listed 'Best First'.
Re^2: Wiki-Style syntax for posting (DWIM)
by jethro (Monsignor) on Oct 30, 2008 at 17:44 UTC

    IMHO this would be by far the most important change (in a positive sense) to this website since I'm a perlmonk.

    I have used up many hours on perlmonks, learned a lot but also wasted quite a few hours. The wasted hours were on account of typing all that <p> markup and having to read all the unformatted and unreadable questions of anonmonks and posting something like "Please use p- and c-tags...".

    And yes, I don't believe it is the fault of lazy (anon)monks that so many don't use the markup. A big reason ist that the information comes after the input box. And gives a lot of information and links, but never directly talks about just the two tags needed for 99% of all nodes by new users (i.e. the code tag is only mentioned indirectly as something to use if you wanted pre-tags. My knowledge of HTML is from a time when I used <verbatim> for code, didn't even know pre-tags).

    Even if we subscripe to the 'lazy' argument, that lazyness also hurts the readers of a node, not only the writer.

    In other words, mighty ++ for these changes.

      When I first started at Perlmonks, my knowledge of HTML proved to be a hinderance. Because <code> is a valid HTML element.
Re^2: Wiki-Style syntax for posting (DWIM)
by ww (Archbishop) on Oct 16, 2008 at 12:27 UTC
    Just note P tags and CODE tags (and that < and [ might need CODE tags), quite concisely, with examples,
    Something on the order of the approach in <shameless promotion> [id://674668 </shame>?

    Update: corrected link: Markup in the Monastery

      <shameless promotion> [id://674668 </shame>
      Wow, you open a shameless promotion tag and then close the shame tag I guess it's a good thing to be shameless when you try to process markup like that (especially when linking to Markup in the Monastery!).
        Ah, point well taken! ++, Annonymonk!

        ... but this too -- like the markup rules here in the monastery -- is NOT congruent with either the usual .html or XHTML standards.

            :-)

        Far worse, from my perspective was the missing ] in the link, Markup in the Monastery.

Re^2: Wiki-Style syntax for posting (DWIM)
by blazar (Canon) on Oct 17, 2008 at 13:01 UTC
    As for more DWIM, I wouldn't do any of the many "wiki" mark-up styles nor would I do POD [...] I think those three "simple" DWIM features would eliminate a sizable majority of the formatting mistakes here. There is a bit of a trick in how to decide whether to apply those features to a particular node.

    I personally believe that (oh, ++, BTW!) one may reasonably argue that those three "simple" DWIM features could be considered a wiki-like markup language already. In fact they would make for a quick input method of formatted text.

    --
    If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2019-08-17 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (134 votes). Check out past polls.

    Notices?