Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^11: Making Perl Monks a better place for newbies (and others)

by jdporter (Canon)
on Feb 05, 2020 at 20:08 UTC ( #11112449=note: print w/replies, xml ) Need Help??


in reply to Re^10: Making Perl Monks a better place for newbies (and others)
in thread Making Perl Monks a better place for newbies (and others)

If no transformations are done ...

I'm not talking about what's done by the web protocol. These fields are POSTed. What the PM engine receives is what the user typed into the box. What is stored in the db is what the user typed into the box. The transformation which the PM engine applies — converting our special markup into real HTML — is done during page rendering. Is that clear enough?

which would explain why it is not fixable

Why do you believe it's not fixable? Because no one has "fixed" it in the few days since you've started complaining about it?

I suspect the newline is being stripped before the post goes into the database.

100% incorrect. The newline is going all the way to the browser. It's the browser which renders newlines as simple spaces.

I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
  • Comment on Re^11: Making Perl Monks a better place for newbies (and others)

Replies are listed 'Best First'.
Re^12: Making Perl Monks a better place for newbies (and others)
by PerlGuy(Tom) (Acolyte) on Feb 05, 2020 at 20:36 UTC
    I see now that this is true, the Newline is passed through unchanged. I just never would have suspected that. I don't know of any other forum software ever used anywhere on the internet, that does not either strip or replace the newline.

    "Why do you believe it's not fixable? Because no one has "fixed" it in the few days since you've started complaining about it?"

    I didn't start this thread. As I said earlier, I was annoyed slightly, about having to manually insert paragraph breaks, so I searched the forum, and came across this very old thread. (from about 10 YEARS ago).

    Numerous other people have brought up the issue. It has been an issue for at least a decade. I could have chosen any of half a dozen or more old threads to post a continuation, or to reopen the discussion.

    That is why, I assume, there must be something un-fixable, otherwise, why is it still an issue?

    Tom

      In a nutshell, it's because there is no consensus that it is an issue. Many folks get along with the way things are just fine.

        The newline is rendered within the code tag.

        On other threads debating the same issue, I've seen some going as far as to suggest wrapping their entire post in code so as to resolve the problem. Better than having to insert HTML after every paragraph, but not a real solution.

        If there is any purpose whatsoever for maintaining the necessity for manually inserting paragraph breaks, I'd sure be interested in knowing what that might be. Is there really anyone that considers this to be a necessary feature, rather than an annoyance?

        Could we have an actual vote on that?

        Though I suspect people who have actually found it to be intolerable over the years, are no longer around to cast a ballot.

        Tom
          A reply falls below the community's threshold of quality. You may see it by logging in.
Re^12: Making Perl Monks a better place for newbies (and others)
by PerlGuy(Tom) (Acolyte) on Feb 07, 2020 at 01:09 UTC
    "I'm not talking about what's done by the web protocol. These fields are POSTed. What the PM engine receives is what the user typed into the box"

    I'm not entirely sure what you mean. When I type into the box, I'm doing so on my local machine/device/browser. What I type is URL encoded by my browser before being sent out over the internet. Regardless if it is GET or POST.

    Tom
      I'm not entirely sure what you mean.

      So I guess it wasn't clear enough. What I meant was what I said. All those things you're talking about are transparent at the application level. What you type in the box is what the PM engine gets. And it's not unique in this regard; all web apps (except maybe stupid ones which try to meddle in the lower layers) are like this.

      We could replace the newlines with <p> tags. But most users don't want this. It would violate the "principle of least surprise". More importantly, given that input can consist of a mixture of html and <pre>-formatted blocks and <code>-formatted blocks (etc.), the problem of determining which newlines to replace and which to leave alone becomes Very Hard Indeed. It's not worth the effort. The result would never be more than 90% right, and that's not good enough. Just suck it up and write your post in html.

      I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
        > More importantly, given that input can consist of a mixture of html and <pre>-formatted blocks and <code>-formatted blocks (etc.), the problem of determining which newlines to replace and which to leave alone becomes Very Hard Indeed.

        Hard but not impossible.

        But thanks for mentioning, I didn't think about also excluding <pre> -blocks in my nodelet hack.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        I guess we have different programming philosophy. I like Perl, and open source programming in general, because there are no "lower levels". I don't like "black box" programming where modules are used without really knowing what exactly is going on inside. If something doesn't work the way I want, I like to be able to open the lid and see why. I don't like having to format text for no good reason and have posts look like some uni-brow without any returns when there is a return key. I would not like wasting my own and everyone else's time for perpetuity by writing code that forces everybody to waste time inserting paragraph breaks. I calculated if it takes an extra 10 minutes a day for n users, in ten years that would be, well calculate it your own way but that's a whole lot of wasted time that could be spent more productively. If nobody wants to be bothered than I won't be bothered wasting my own time to manually input what should be automatic. If that makes this difficult to read, tough cookies. It will be less time consuming to fix it than to have to mark up any more html unnecessarily. The surprise here is that "RETURN" on the keyboard is disabled when it works fine in every other app or any other website or forum. Having a working return key would not deter anyone who doesn't want to use it from not using it. -- Tom
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2020-05-27 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (153 votes). Check out past polls.

    Notices?