Conversation

Notices

  1. The Cabal has arrived.

    Monday, 04-Apr-11 23:23:56 UTC from web
    1. @minti Markdown's nice. I'd prefer reStructured Text personally just because I have to use it more.

      Sunday, 13-May-12 18:53:21 UTC from web
      1. @toksyuryel I'll look into that too. Thanks for pointing it out. :p

        Sunday, 13-May-12 18:55:01 UTC from web
        1. @minti For basic formatting it's nearly identical to Markdown; both rely on whitespace for most of their other features, which on this particular site is stripped out of posts entirely, so really whichever you choose is largely a matter of what you want to call it as opposed to what you're supporting. There are a couple edge cases though.

          Sunday, 13-May-12 18:59:42 UTC from web
          1. @toksyuryel Ooh. Well I was just going to add support for stuff like *emphasis*, **bolding**, `code blocks` and such. xD

            Sunday, 13-May-12 19:01:20 UTC from web
            1. @minti Yeah those are identical between Markdown and reST. But links that aren't simply raw urls have a different syntax.

              Sunday, 13-May-12 19:03:56 UTC from web
      2. @toksyuryel @minti Just don't pick Textile, whatever you do. There's some nasty surprises in its syntax that, for example, make it impossible, given the behaviour of the reference parser at least, to type == (because that's the "display this text raw" code, but it accepts both "==RAW TEXT" or the block-based "==RAW TEXT== FORMATTED TEXT"-style syntax, making an attempt to type raw == by using ==== look identical to an empty block-based one).

        Sunday, 13-May-12 19:08:21 UTC from web
        1. @bitshift Haha. After seeing all these I may just roll my own. Assuming it's even worth it at all considering I'd still have to parse bbcode to stay compatible with RDNRefresh..

          Sunday, 13-May-12 19:09:34 UTC from web
          1. @minti I've been needing a little JS project, I should see how easily I can whip up a BBcode parser. Plus, I kinda want to see how painful it would get if I tried to make my own modular refresh-only and format-only scripts. :P

            Sunday, 13-May-12 19:11:31 UTC from web
            1. @bitshift BBCode parsing is easy as heck. I wrote my own tokenizer and parser when I was like 12. XD (Everyone yelled at me and said I should have used Regex, which is 100% true. I love regex. >_>)

              Sunday, 13-May-12 19:14:16 UTC from web
              1. @minti >you have a problem >you use a regex >you have 2 problems

                Sunday, 13-May-12 19:15:14 UTC from web
              2. @minti (I am, of course, being facetious. I also have a fetish for solving things with regexes where possible.)

                Sunday, 13-May-12 19:15:53 UTC from web
                1. @bitshift /highfive

                  Sunday, 13-May-12 19:17:04 UTC from web
                2. @bitshift Just make sure they're actually faster than solving it without them, and that you write them in a way that makes them maintainable. Python actually provides a nice facility for doing this.

                  Sunday, 13-May-12 19:17:52 UTC from web
                  1. @toksyuryel re.compile("(?:ht|f)tp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+") is the most beautiful thing.

                    Sunday, 13-May-12 19:21:22 UTC from web
                    1. @bitshift rdnrefresh totally mangled that, ha XD

                      Sunday, 13-May-12 19:22:47 UTC from web
                      1. @toksyuryel !mintrefresh didn't. :P

                        Sunday, 13-May-12 19:23:37 UTC from web
                        1. @bitshift I really should switch to that until Firefox 13 is properly released.

                          Sunday, 13-May-12 19:24:55 UTC from web
                      2. @toksyuryel Yeah RDNRefresh parses the start and end tags as two separate regexes..

                        Sunday, 13-May-12 19:24:13 UTC from web
                    2. @bitshift I find it sad that such a regex would explode in my script most likely xD Tempted to try it anyway.

                      Sunday, 13-May-12 19:23:40 UTC from web
                      1. @minti I'm not quite sure what purpose it would solve in !mintrefresh, given it matches valid URLs, and the posts returned by SN already have a neatly tokenized (including URLs as links) version in the form of the HTML output.

                        Sunday, 13-May-12 19:26:21 UTC from web
                        1. @bitshift Well in order to not have this hacky iteneration over the entire dom tree of each notice trying to figure out which one should be spoilerized or not I basically decided to reparse the entire notice from scratch myself, then cache the spoilered and non spoilered one. Still not sure if it's a good idea but, it's ran into a few bumps so I may just discard this edit. xD

                          Sunday, 13-May-12 19:28:05 UTC from web
                          1. @minti Oh, okay. Then yeah, it'd be neat to have IdentiCurse (that's where I grabbed that line from, though I've also used it elsewhere since) and !mintrefresh agree on what constitutes a link. :)

                            Sunday, 13-May-12 19:30:47 UTC from web
                            1. @bitshift Problem with mine is that it tries to parse links even if they don't have the http:// prefix, which StatusNet does correctly. xD

                              Sunday, 13-May-12 19:31:51 UTC from web
                              1. @minti Eh, StatusNet goes.too.far the other way and identifies.too.many.things.as.links, in my opinion.

                                Sunday, 13-May-12 19:33:31 UTC from web
                                1. @bitshift everything.is.a.link

                                  Sunday, 13-May-12 19:34:01 UTC from web
                                2. @bitshift It is my opinion that links should never be detected without an explicit http:// or https://

                                  Sunday, 13-May-12 19:34:14 UTC from web
                                3. @bitshift http://i.imgur.com/R5LVS.png And this is what my script does. XD

                                  Sunday, 13-May-12 19:34:38 UTC from web
                                  1. @minti #

                                    Sunday, 13-May-12 19:35:53 UTC from web
                                    1. @toksyuryel Yeah that's on my list of "OH GOD FIX IT FIX IT FIX IT FIX IT FIX IT" bigs. http://ur1.ca/98fjo

                                      Sunday, 13-May-12 19:37:09 UTC from web
          2. @minti The only reason I'm partial to reST is because it's the standard for Python documentation so I need to practice using it more. I'd probably prefer Markdown if not for that.

            Sunday, 13-May-12 19:16:54 UTC from web
            1. @toksyuryel Markdown is nice, but has some glaring issues (mostly with nested lists/separate sequential lists), at least in an old version of the standard parser and the most common Python port thereof. I believe reddit's (Python) implementation sidesteps said problems, and is open source, though.

              Sunday, 13-May-12 19:29:28 UTC from web
              1. @bitshift I actually got the initial idea from Reddit. xD

                Sunday, 13-May-12 19:30:04 UTC from web