Hacker Newsnew | comments | show | ask | jobs | submit | cthor's comments login

The majority of Twitch users follow only a few streamers. If the streamers migrate, a substantial portion of their viewers will follow.

Contrast with YouTube: most people view videos from a wide variety of uploaders. If one or two uploaders leave, the viewers will stay where they are.

-----


A lot of merchants (e.g. Amazon) don't use PayPal because is isn't a real bank, and so isn't beholden by laws associated with banks. The terms of service state that you cannot seek any legal recourse from them should your account be shut down.

How could this affect a VPS provider? Say a customer hosts a porn site, or a gun-selling site, or something else PayPal disagrees with. PayPal shuts the merchant's account down for it. Now the merchant's funds are frozen for an indeterminate amount of time till the issue can be resolved, if at all, and there's nothing they can do about it short of appealing to PayPal.

-----


Exactly

I am very sympathetic to anyone not wanting to use paypal for these reasons.

It is too big a risk, especially for something like a VPS provider that needs the recurring payments.

-----


yeah but when I couldn't use my credit card anymore paypal was the only option.

-----


I really don't understand why some people are so afraid of regex. Sure, it's not perfect, but these symbol-less solutions feel to me like one step forward and two steps back. A more interesting development would be something along the lines of what Perl 6 is trying to do (if only someone could implement it).[1]

We should start treating regex like a computer language in its own right, rather than some second-hand citizen that we stuff into a single line without any delimiting whitespace. Use the /x switch and comment your code as you would with any other programming language, and you'll find that regex really isn't that scary.

Take the example pattern. The regex written by a human might look something like so:

    m{^
        https? ://        # Protocol
        (?: \w+ \. )?     # Subdomain
        ([\w\-]+) \.      # Domain
        (?: com | org )   # TLD
        /?
    $}x
It's certainly easier to parse. Debugging it is also a lot easier. We can see that this won't match anything with more than one subdomain. We can also see that it won't match subdomains that have hyphens in them. It also looks at a glance much more like a URL and less like some arbitrary Ruby code.

[1]: http://www.perl6.org/archive/doc/design/apo/A05.html

-----


> something along the lines of what Perl 6 is trying to do (if only someone could implement it)

What, like, perl6?

    grammar URL {
	rule TOP { <proto> '://' <domain> '/' }

	token proto { 'http' 's'? }
	token subdom { \w+ }
	rule domain { <.subdom> [ '.' <.domain> ]? }
    }

    say URL.parse('http://lelf.lu/');



    Betty:hacks lelf$ perl6 gr.p6
    「http://lelf.lu/」
     proto => 「http」
     domain => 「lelf.lu」

-----


And for those interested a full RFC 3986 (URI) in Perl6 grammar can be found here - https://github.com/ihrd/uri

Here is direct link to grammar module - https://github.com/ihrd/uri/blob/master/lib/IETF/RFC_Grammar...

-----


i have no trouble writing regexes, even quite complicated ones. I probably end up writing a really complicated one once a month or so; but basic ones weekly or daily.

I have no trouble writing them. What I have trouble doing, when it comes to very complicated regexes, is _reading_ what I've already written a couple months ago (myself! I pity those who aren't me even more). And even more so, when it comes to complicated regexen, _modifying_ what I've already written to fix a bug or change it slightly for new requirements.

A complicated regex meets the requirements for the old joke about 'write-only languages.' Somewhat ameliorated if you use the Perl-originated conventions for insignificant whitespace in a regex, which I _think_ ruby does too now, but I am not sure, cause I never use it, cause I can never remember how it works and never bother to look it up (have you tried looking up docs on ruby regexes on the web? good luck! I have no idea _where_ the official docs, if any English exist, are.)

I have no trouble writing regexes. I think every programmer should be comfortable doing so. I think using this tool without understanding regex basics first is a mistake. And I _still_ think this is a kinda neat and potentially useful tool.

-----


I tend to write such code without comments (using some pseudo-language):

  Protocol  = 'https?://'
  Subdomain = '\w+'
  Domain    = '[-\w]+'
  TLD       = 'com|org'

  Re = WholeTextMatches(
         Protocol + Optional( Subdomain + '.')
         + Capture(Domain) + TLD)
Typically, I wouldn't go that far, but storing separate parts into well-named strings before assembling the entire regex, IMO, makes things much more readable.

-----


Library owner here, just want to point out that

    m{^
        https? ://        # Protocol
        (?: \w+ \. )?     # Subdomain
        ([\w\-]+) \.      # Domain
        (?: com | org )   # TLD
        /?
    $}x
Isn't really any different from

    hex {starts
       protocol
       subdomain
       domain
       tld
       maybe("?")
    ends}

-----


I think you mean 'maybe("/")'?

-----


I did!

-----


CoffeeScript's block regex (delimited by /// instead of /) does exactly this. It is a vast improvement over normal regular expressions, and I even prefer it to the syntax described in this post (which is unreasonably verbose).

-----


Is this true for most jurisdictions? That doesn't seem like the kind of law that lends itself to being universal.

-----


FocusWriter, listed in the parent as a native Mac application, is open source and works on and has compiled binaries for Windows, Mac, and most Linux distros.

-----


Looks really nice, and the HTML appears well formed at a glance. I might consider using it in an upcoming project. A few reservations, though:

- JavaScript dropdown menus. Is it not possible to get a pure CSS (get it?) solution? Without JavaScript the menu collapses into a bullet list. I understand that CSS dropdowns are slightly less responsive, but a graceful fallback would be nice.

- Buttons have no :active styling (really minor, I know). This sort of stood out to me as odd, since most default button styles have one.

-----


We didn't want to have a pure CSS menu just because Pure supports IE7+ and I wanted to keep it that way.

Buttons styling will be fixed in the next release. :)

Thanks!

-----


What about people on IE7+ who have javascript disabled?

-----


There are less people running javascript disabled than are on IE6 and anyone that's turned it off can turn it back on.

-----


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: