HNHacker News
TopNewBestAskShowJobs

gibybo

1,366 karma · joined June 5, 2009

submissionscomments
gibybo··on Show HN: Logarithmic Flappy 2048
I was thinking the same thing after I failed the first time. Most people might not think of this sort of thing because 'hey, the interstitial shows you important information and it only takes a second', but the ability to just continue immediately after messing up makes the game tremendously more enjoyable.
gibybo··on Gravity waves from Big Bang detected
> this particle here is watching that particle there recede at >> C

Technically speaking, the particle can't really observe the other particle moving away from it faster than C since the light (or any other signal from the particle) will never be able to reach the observing particle. It would just see it disappear.

gibybo··on Gravity waves from Big Bang detected
Gravity can pretty clearly be measured. I'll assume you meant gravity waves in particular, but even then we have no reason to believe they can't be measured (only that we haven't done it yet).
gibybo··on Mt. Gox knowingly traded non-existent Bitcoins for two weeks, filing shows
What are some of the nasty game-theoretic incentives it provides to participants?
gibybo··on Popcorn Time Is So Good at Movie Piracy, It’s Scary
They are often faster (higher ratio of seeders to leechers), and are much less likely to have swarms of bots connecting to their torrents recording all the connected IPs so they can send threatening letters to ISPs/users.
gibybo··on VsMe Gaming – Mobile Gaming with Bitcoin
Why are you purposely trying to prevent non-mobile users from using your app? Do you think that will prevent cheating?
gibybo··on Show HN: Add forms to your static site – no iFrames required
Alternatively, formspree could publish a public key which you could use to encrypt your email address. To make it easy, they would just have a form on their website which does the encryption for you, giving you the opaque string to use in your form.

The UX for the user is the same if Formspree were to just generate a random token and store in their DB mapping it to an email, but this way Formspree doesn't need to store anything in their DB.

gibybo··on Salted Password Hashing – Doing it Right
How about a registration page instead? Are you going to not tell the user whether the registration worked or not? I've never seen a site that does that.

I've seen tons of sites that tell you "invalid username or password" but will happily tell you if the username is registered if you try to register it. It adds no security and just inconveniences users.

gibybo··on First programming job – a 4 month reflection
All work environments are absolutely not like that. I've worked in places exactly like that and places nothing like that.

I'm pretty sure it depends largely on the type of business. Businesses where software makes them money tend to have high code quality and developers that care about that sort of thing. Businesses where software (or IT as they'll call it) is a cost center tend to be like you described.

I'm also pretty sure there is a strong correlation between PHP and that type of environment. It's much less common with places that use Ruby/Python/etc. Probably for the reasons Paul Graham wrote about with Python vs Java: http://www.paulgraham.com/pypar.html

gibybo··on Christine: The World's Most Modular PC Design
I don't think it's actually self contained in the sense that the pump, fans, and radiator are also duplicated in every module. The would be a terrible waste of resources and the modules don't look like they have any room for the radiator (which would need to be exposed to the outside air to work).
gibybo··on Linksys E-series Unauthenticated Remote Code Execution Exploit
It wouldn't be remote login, it would be local login from the network, which routers tend to have enabled by default (how else would you manage them?).
gibybo··on When You Fall in Love, This Is What Facebook Sees
I suspect the statistical confidence is very low for any given individual and only strong when you look at large groups.
gibybo··on Do you trust the Bitcoin Foundation?
They don't write code? Gavin Andresen is a founding member of the Bitcoin Foundation and the lead developer for the reference Bitcoin client. I'm pretty sure he also owns and operates Bitcoin.org, which has been the unofficial official homepage of Bitcoin for years.
gibybo··on How does Facebook disable Developer Tools?
Ah, very clever, thanks :)
gibybo··on How does Facebook disable Developer Tools?
tshadwell did not post a code snippet he wrote. He posted a link to a site that demonstrates the sandbox that Facebook uses (I believe the Facebook engineer that wrote the Facebook implementation also owns escape.alf.nu). This code does not break out of the sandbox, it creates it.
gibybo··on How does Facebook disable Developer Tools?
Eh? Who is "he"? What do you mean routing calls?
gibybo··on How does Facebook disable Developer Tools?
So how do you get around it? Or, I suppose more importantly, what else do you have to do to prevent people from getting around it?
gibybo··on How does Facebook disable Developer Tools?
The accepted answer teases that this is not enough:

  Object.defineProperty(console, '_commandLineAPI',
   { get : function() { throw 'Nooo!' } })
But why isn't it enough?
gibybo··on Microsoft Adds Bitcoin Currency Conversion to Bing
Mt.Gox has been an unreliable source for the exchange rate for quite awhile now. Bitstamp is pretty much the current gold standard for USD<->BTC rates (Coinbase and BitPay are based on the Bitstamp rate).
gibybo··on Coinpunk's Response to Apple for Removal of Blockchain App
I know, which is why I said one of the first rather than the first. Prior to iOS though, the vast majority of phones did not allow you to install apps. Palm and Windows Mobile had a very thin slice of the market.
gibybo··on Coinpunk's Response to Apple for Removal of Blockchain App
Apple isn't an OS, so I assume you're talking about iOS. iOS is pretty far from the first OS to control what you can install on it. In fact it was one of the first phone OS's that let you install anything at all.
gibybo··on CTF3 architecture
This was already the bottleneck for all of the top solutions. Reducing the start up time was the primary goal and the top solutions were heavily optimizing for it, including compiler configurations. One of the primary reason to compile in a bloom filter instead of a hash set was that it made your binary ~2 MB smaller which was a significant advantage in start up time.
gibybo··on CTF3 architecture
That was a lot more sophisticated than I expected! By the way, I think I was responsible for about 10k of those 640k pushes :)

I was really hoping for an overview of the solutions people found for each level though. Going through individual write ups to find them all is a little tedious.

Here's the rough list of what I was aware of:

level0 (take input of words from stdin, output to stdout whether they exist in the dictionary):

a) Read file into a hash set, test each word as it comes in.

b) Read file into a bloom filter

c) Realize that it is always the same dictionary and pre-compile it into a hash set/bloom filter. The fastest solutions were generally of this type, written in highly optimized C with a ~600kB bloom filter compiled into the binary.

level1 (gitcoin mining):

Not very familiar with this one, but I believe near the end several people had written custom GPU miners with openCL and were running them in small clusters of EC2 GPU instances.

level2 (ddod prevention):

I am also unfortunately not very familiar with the high scoring solutions to this level, since I never really figured out how idle time was calculated. However, the one common and easy solution was:

a) Keep a list of requests per IP and ban any IP after it made more than n requests (4 was a good number).

level3 (text search):

a) Shell out to 'grep -r -n query path', parse out the relevant part of the path/line number and submit (surprisingly, this worked to get a score just above passing if you tried a few times).

b) The intended solution was probably to build text search with a trigram index/suffix array/etc. I know a few people did this with reasonable success.

c) A faster solution was to realize that the tester only ever queried words that were in the dictionary. You still had to return results for words in which the query was a substring, but this is a finite set that could be pre-computed during indexing (or even before uploading your solution, since the dictionary is known in advance). The fastest (legitimate) solutions were of this type. Single node, single threaded (because requests were sequential) TCP servers written in C in which the answer to every possible query (only 250k possibilities) was pre-computed and stored in memory during indexing. It was just a matter of running this until you got a sufficiently optimal run, since the bottleneck was always the ~1.68ms of latency the test framework added to the request.

level4 (distributed consensus):

a) Just proxy all requests to a hardcoded master node which ran a single sqlite instance in memory. You would lose a connection to it, but as long as your queries were fast you would score enough points early in the round to pass even after the single-point-of-failure tester was added.

b) Implement Raft. Conveniently, the example code was laid out suspiciously similar to the open source goraft implementation, which served as a drop-in solution. Minor tweaks were necessary to account for the test framework pinging non-leader nodes (which meant you just had to proxy to the leader).

c) The most clever solution I was aware of, which I believe was discovered by the highest scoring player (xthexder), was to abuse the underlying http library in the octopus test framework. To understand how it worked, you must first understand that the test framework used a stripe developed system called 'Octopus' which would run your nodes in isolated containers that could only communicate with each other over specifically designated Unix sockets. Octopus would do nasty things to these sockets such as adding latency, severing connections between certain nodes, or partitioning whole sets of nodes from each other. However, the nodes were always running and they always had a connection to Octopus. So if you could convince Octopus to carry your message to the other nodes for you, you wouldn't have to worry about any of this silly distributed consensus logic.

The way xthexder discovered to do this, was to send 302 redirects back to Octopus with the query and the location of the hard-coded leader node (which was running a custom in-memory SQL database that was optimized for the very few queries that octopus ever used). I don't remember the exact details (read his write up for more info!), but it required some trickery to get Octopus to respect the redirects, but once it did you were able to get a perfect connection to a master node with 0 intra-node traffic (which would normally reduce your score).

I also discovered a couple really dirty tricks for level0 and level3:

a) The test framework actually used predetermined test cases so that if you failed the test, you could rerun the exact same test locally and see where your code went wrong. The test cases were randomly selected after you pushed your code, so you couldn't hard-code the solutions into your code (that would be cheating!). Except there was a weakness: The build phase ran on a container that allowed external network connections so that you could download packages from common package repositories like npm. The test framework would also output the test case it selected to you (but not to your code) prior to running the build phase. This meant you could write a request in your build script to your own server which would hold open the request until you read the test case from the test framework output, ran it locally, packaged up the answers, and gave them to your server for it to return back to your running solution on the test container. This allowed your solution, running on the test container, to have the answers to level0 and level3 loaded in memory before the test framework even sent its queries.

b) Method 'a' was patched over the weekend by moving the test case disclosure after the build phase, so I went looking for a workaround. What I found was just about as good. It turns out there was a fixed number of test cases for each level (I believe it was 1000 for all levels). All of them were publicly available on AWS S3, you just needed their names which I got from continually running a git push, parsing the test case, aborting, then running git push again. I ran at about 30 cases per minute, which meant running through all 1000 only took ~30 minutes on average. I downloaded every test case, found the ones that had the highest scoring potential (generally the ones with the worst benchmark score) and hard-coded the answers to those in my solution. I then had a script to run 'git push', parse out the test case it would run, abort, and rerun until it got one of the test cases that I had hard-coded. It's important to note that the remote server still reported the chosen test case prior to finishing the test run, so it only took a couple seconds to decide whether to let the run finish rather than waiting a minute or two for it to fully run. With 10 hard-coded test cases (out of 1000 possible) and checking one possibility every 2 seconds, it only took an average of ~3 minutes to get a run where the code running on the test server would once again have the answers loaded in memory before the test framework sent a query.

gibybo··on KeePass: OpenSource Password Manager
The chrome extensions requires putting '@@' at the start of the password field. This turns it yellow to indicate it is now active for that field.

>Sure, but as long as the site actually sets the password length limit on the field it shouldn't matter.

Yes, but in my experience sites rarely implement this. If they do, it's probably inconsistent (i.e. different limits on the login field, create account, and reset password fields).

gibybo··on Independently Poor: A Twist on FU Money. Or: "FU, Money" (2012)
It doesn't get rid of the substantial opportunity cost of the money used to pay for that house. It's not at all fair to ignore that when stating his yearly expenses.

They are more like $40-50k when you include it.

gibybo··on KeePass: OpenSource Password Manager
I think the reason they did it is because a lot of sites have maximum password lengths that would prevent the full output. Those are exactly the type of sites that you want to be using something like this on.
gibybo··on KeePass: OpenSource Password Manager
For those looking for something ultra lightweight, I highly recommend pwdhash (http://pwdhash.com). It's not a password manager, it's just an open source hashing algorithm that protects you from sites storing your password poorly. Instead of depending on them to store your password in a one-way hash, it does it on your end before sending the password to the site.

The algorithm is very roughly base64encode(hash(password + domain)), and then truncated to match your original password length.

The form on the site is just a demo (and backup if you need to use it outside of your own browser). What you really want is the extension (for most major browsers). You can type in the same strong password to every site and the extension will always hash it to the site specific password so you don't have to worry about them storing it poorly. You can also use unique master passwords for certain sites, if you so choose.

gibybo··on Warren Buffett offers $1 billion for perfect March Madness bracket
The article decided the odds were: 32 teams, each with a 50% chance of winning, so the odds must be 1 in 2^32!

It's obviously wrong, of course, but journalists aren't typically known for their statistical math backgrounds. Interestingly, this article claims you can actually get the odds even lower, to about 1 in 1 billion: http://www.latimes.com/business/la-fi-buffett-basketball-bet... using some more sophisticated team/player data.

gibybo··on Warren Buffett offers $1 billion for perfect March Madness bracket
>This introduces an extraordinarily massive risk factor - to real assets - to the equation, that you're not accounting for.

No it doesn't. It's identical, except that rolling your bets gives you the additional option which can only be considered more valuable.

And interestingly in this case, Buffet will actually provide the same opportunity if it comes to it. If you get the first couple rounds of the bracket correct, Buffet will be right there with a check offering to buy you out of your position.

gibybo··on Warren Buffett offers $1 billion for perfect March Madness bracket
Sorry, I did miss that. It is an excellent point.
← PreviousPage 7 of 15Next →