HN user

fizbin

50 karma
Posts1
Comments27
View on HN

As an aside, it's possible to modify Laurikari's algorithm slightly and obtain PCRE semantics w.r.t. capturing groups, and those correctly. (POSIX capturing semantics are designed for standards specs. I've never met an actual practicing programmer who wanted those semantics instead of the PCRE ones)

Well, first off you make this (USE UNIQUE PASSWORDS) part of orientation, and maybe have part of orientation involve rolling dice and using the diceware list.

Then, you reinforce that by using some sort of SSO setup/service (you can outsource this to someone like okta.com if necessary), so that all internal systems never have a place to set a password. (e.g., don't make people set up separate accounts with passwords on the corporate jira or bitbucket server)

Basically, not training people to reuse passwords internally can help them to not reuse their one internal password externally.

Another possibility is to simply buy a password manager subscription for every employee and have it as a perk. That's a per-employee overhead of $20-30/year.

We can certainly do without passwords for every stupid little website. Unless you're rightfully a central force in the user's life - say, their main bank - you really should have users log in through Google, or Facebook, or Twitter, or someone else who almost certainly can guard their passwords better than you can.

It's shameful that it's so much easier to find tutorials on how to store passwords "securely" (including several tutorials that tell you crazy insecure things, like storing with unsalted commodity hashes) than it is to find tutorials on how to integrate your brand new battling-fairies website game with OAuth for authentication.

Don't store passwords at all if you can avoid it. Then, bend over backwards to avoid it.

Do all login through OAuth or the related proprietary "login with" mechanisms Facebook and Twitter have. Offer your users a choice of mechanism, in the signup flow, and don't require that they first set up a password that they then replace with login-with-(whatever).

If you can't imagine what this looks like, open an incognito browser and go through the signup-for-an-account flow at stackoverflow.com. That should be what you're aiming for.

My experience with writing real production Haskell code is this: your first large Haskell project will be a failure, largely from missed deadlines and being unable to properly judge what is going to be easy and what hard. (Unless you deliberately aim low and spend much more time than is really justifiable on something you could have done in some language you know better in a few days)

Your second one will take longer than it would have in PHP or J2EE or whatever else you're used to building web stuff in. It will, like the first, also be ugly but unlike the first project will eventually work. It'll also fall over catastrophically early on, but will be salvageable. Once past its initial deployment/perf issues, it'll sit and hum away quietly in a corner with much less care and feeding than traditional web technologies. (Though you'll keep wanting to go back to it, because it's more fun to work in that than whatever else you're working on)

The third production Haskell project will come together much more quickly. Unfortunately, by this time you'll probably be bringing other people on and this will be their first big Haskell project. (See above about what happens to first big Haskell projects) So the parts delegated to other programmers will fail to work, and there will need to be lots of hand-holding and discussion of type design at first.

Selling management on this is indeed difficult. I'll admit that I'm still not clear on how we sold the first (failed) project to management or how I convinced my boss to let me use Haskell a second time. I mean, I was there, but I don't know how I did it.

Note that the 12,701 character regex is WRONG. It doesn't even match "70". Even the binary regex is wrong.

The original 32K regex pointed to in the stackexchange problem statement however is perfectly correct.

Test code:

    open(F, '< /tmp/q.in');
    $myre = <F>;
    chomp($myre);
    $myrecomp = qr/^(?:$myre)$/;
    while (<>) {
      chomp();
      if (m/$myrecomp/) {
        print "$_\n";
      }
    }
Examples of multiples of 7 not matched by the given regex: 70, 707, 7007, 11095

(I spent all morning trying to find the bug in my regex compiler based on the assumption that the answer there was correct)

This - that it's extremely rare to even be able to think the right things to produce maintainable code at that age - is why I've long thought that 12-15 is the right age to teach assembly language.

At that age, your code is going to be a mess no matter what tools you use, so you might as well have an excuse.

(Seriously: there's some brain development that doesn't happen until the close of puberty, and I believe that some of that is necessary for most people to plan and write maintainable code)

It's specific to programming, but not exclusively to programming; there are a few other areas where "you haven't been doing this since you could walk? Too late to be truly good":

- Mathematics (at the extreme high levels)

- Musical composition

- Classical music performance

- Painting/Visual arts

- Speaking most languages

- Jedi Knight

Why on earth would they do that? Making bitcoin illegal would be the biggest action the US Government could take to get bitcoin to flourish.

Right now, bitcoin is like a country with a minuscule GDP ( * ) and absolutely no currency controls (and no possibility of such, ever). As many small countries have learned the hard way, the worst thing for your economy's and currency's stability is US and Euro-based foreign currency traders deciding that your currency is a "hot" one to trade in.

When history looks back on why bitcoin failed, I suspect a big part of it will be the SEC's decision to allow large Wall Street firms to speculate in BTC as much as they wanted to.

Now, a robustly anonymous exchange network with value pegged to something external - say, a cryptocurrency backed by EUR, USD, or actual grams of gold - that would be something different. That would likely be made illegal, either explicitly or by having nearly every transaction run the risk of a federal money laundering charge.

( * ) The GDP of bitcoin-land would be the sum total of all goods and services bought and sold with bitcoins in the course of a year.

And looking at something already settled by the courts, it's also interesting to compare the article's chart on the legal status of interracial marriage with public opinion data:

http://en.wikipedia.org/wiki/Interracial_marriage_in_the_Uni...

Note that the "Approve" line doesn't cross the "Disapprove" line until the mid-1980s, long after the USSC had spoken. With same-sex marriage on the other hand, the "Approve"/"Disapprove" cross-over happened a bit over three years ago and the USSC has yet to speak as definitively as it did in Loving v. Virginia.

(One could argue that in invalidating most of DOMA, the USSC has already spoken strongly - if not definitively - in favor of same-sex marriage, and therefore that we should use that decision when making analogies to Loving. I'm not sure about that.)

Yes, it is a really weird property of 2-spheres that that holds.

One consequence is that yet another way to pick a point uniformly on the sphere is to choose z ∈ [-1, 1] uniformly, then choose λ ∈ [-180°, 180°) uniformly and use the point

  (cos(λ)*sqrt(1-z*z), sin(λ)*sqrt(1-z*z), z)

Nor for 3-spheres (i.e. the 3-dimensional surface defined as all the points in 4-d space at distance 1 from the origin). Nor for higher dimensions than that.

It's peculiar to the 2-sphere ("ordinary" spheres).

If you're going to use the (->) Monad instance, why not:

  {-# LANGUAGE MonadComprehensions #-}

  import Data.Maybe (fromMaybe)
  import Data.Monoid (mconcat)
  import Control.Applicative ((<*>))

  pam = flip map
  fizzbuzz i trigs = pam [i..] $ fromMaybe . show <*> mconcat . trigs
  
  ans = fizzbuzz 1 $ \i -> [["Fizz" | i `rem` 3 == 0]
                           ,["Buzz" | i `rem` 5 == 0]
                           ]
  
  main = mapM_ putStrLn $ take 100 ans

Specifically, people should note that many code generators are not carefully designed for strict reproducibility, and will stick time stamps in generated output.

Even if you undo that, code generation tools are liable to at some point traverse a dictionary without caring about whether the result is deterministic. I spent some time at Google fighting with antlr to try to get it to have deterministic output and I still think that I left some corner case uncovered.

I think if you want to use the appropriate analogy, you have to include that it was fundamentally a public thing to do, even though she believed her audience tiny. Your analogy as presented gets confused because of the social conventions against eavesdropping, even in a public place. A tweet is fundamentally meant to be a broadcast to the world, not just your immediate followers.

Rather, imagine her shouting it out at a mall on a day when the mall is relatively empty. (So that she had reason to believe the audience tiny, but still broadcast it) Unfortunately for analogy-world Justine, a news crew was downstairs shooting B roll for background and she's there clearly visible and audible in the corner of the screen, and the clip got leaked. That's the analogous real-life situation.

I don't think HN is a bunch of MRA losers, but it's certainly closely connected to places that are. (as in, lots of people participate in HN who also participate in places that could be characterized as such)

So I'd say it's MRA-loserville-adjacent.

Its usually (in my opinion) the subject of the photograph that makes it interesting, not the style that a photographer has put on it.

Have you seen this guy's shots? I've tried taking pictures of ants and other insects and it takes lots of luck or lots of shots that you throw out to get something even vaguely decent. Even then, nothing I've ever done looks anywhere near as good as the stuff this guy was pointing to as stolen. (And some of those shots likely required getting up close to insects in uncomfortable positions, all while trying to not interfere with the light or scare the buggers off)

The part of reading rent-a-coder that always depresses me is the rampant contract cheating. It makes me wish that by facilitating that activity and taking a piece of the action, sites like rent-a-coder incurred civil liability to the colleges and universities whose assignments are being bartered.

I'm not quite sure how to work that - maybe sue them as some sort of accessory to fraud, though that would probably first require the university charging cheating students with fraud.

Rentacoder used to have a disclaimer (they may still, I haven't looked in years) that the site could not be used for any thesis or "final senior project"-type project that would determine whether or not someone received a degree.

I always found that oddly specific - they clearly acknowledge that people will use the site to pay someone to do class projects, and get better grades by doing so, and they very much don't care so long as it doesn't determine whether the buyer graduates.