Hacker Newsnew | past | comments | ask | show | jobs | submit | maxjus's commentslogin

When was this published?


Originally on 2015-06-29, updated frequently and as recently as three days ago.

Commits: https://github.com/CTurt/cturt.github.io/commits/master/ps4....

Blame: https://github.com/CTurt/cturt.github.io/blame/master/ps4.ht...


I updated the copy on the site to clear up a couple of things.


You would be right -- if the use case for this was transmitting encrypted information. The reason I made this was mostly for email. Sometimes I want to send someone a message and not have it exist forever. In that case, you could send a link to the message along with the key. Then, after n hours, the message would cease to exist anywhere (assuming the server fulfills its contract). This works better than having the server just store the whole message, since now the server gets to be ignorant of the message's content. Mostly this was a fun little project I wanted to share :)


Escape them inputs, dawg!

www.listnerd.com/lists?letter=</script><script>alert(document.cookie);</script>


After seeing this, talking about id selectors in the css seems...


It's 2014, isn't it? Damned!


That was a joke, haha, fat chance.


Interestingly, modern WebKit browsers include an "XSS auditor" that will refuse to run javascript sent in the request that loaded the page. It's pretty good (and open-source), so figuring out a way to have XSS without hitting the auditor is a big win for the attacker.


Y'all might want to limit the number of characters in a user's name...

https://www.npmjs.org/~maxj



It makes slightly more sense when you understand the context: https://www.youtube.com/watch?v=pfa3MHLLSWI


Carol Vordaman is just brilliant.

To tie back full circle [1], if anyone hasn't seen it there's a great UK show called Only Connect. It may appeal to people on here as it's a fiendishly difficult pattern matching game.

https://www.youtube.com/watch?v=0AB31ymF8zA

[1] The hostess (Victoria Coren) recently married David Mitchell - the co-creator of the numberwang sketch


Flash-based online game version of Only Connect:

http://www.bbc.co.uk/programmes/b00lskhg/features/quiz

edit: which they've massively expanded since I last looked, I think they only had about 14 boards, now they have hundreds and seem to allow you to submit your own.


Victoria Coren Mitchell now. She's amazing and Only Connect is brilliant.


Now someone make 2048 where in addition to numbers you get math operations and should achieve some number. Game could even get more complicated during gameplay as new operations appear.


I'm really interested to know what his process was, since he didn't seem to actually know the product he was subtracting 50 from.


Well it seems that he was always going for 4 from the top row, which reliably gives him 25, 50, 75 and 100 (I think). He then uses the ability to divide by 25 to treat these as an additional 2, 3 and 4. So once he has 318, he does (318 * 3) - 2 to get his 952, except via the 25s; ((318 * 75) - 50)/25. It's a hack; increasing the set of available numbers by guaranteeing the presence of a common divisor.


And that's Numberwang!


Well, obviously.


I'd think of the thought process a bit differently than lclarkmichalek, though of course with the same result.

To get close to 952, you can quickly think of 106x9. 106 is easy to obtain and you have a 3. You can get another 3 from 75/25. You're now at 954 with only a 50 left. If you could divide by 25, that would give you the 2 you're missing but you already used the 25, unless you were to divide later. So instead of doing 106x3x(75/25), you do (106x3x75-50)/25.

He could have certainly thought of it another way but based on how players typically play that game, that would be a somewhat logical progression.


Another way to think about it:

He had the numbers 100, 3, 6, 25, 50, 75. 25, 50 and 75 are big and difficult to work with, but 50/25=2 and 75/25=3 are far easier. He could either do it right away, but that gives him either (2 and 75) or (3 and 25) and there's still a large number. (75x ± 50y)/25 on the other hand equals (3x ± 2y) and he's down to nice small numbers.


I was wondering how he thought of that. Even though we don't know, this explanation is beautiful and makes a lot of sense. Thanks!


There's two answers already that seem correct, but perhaps overcomplex, so here's my go.

He always chooses 4 from the top row, so he always gets 25, 50, 75, 100 and the rest are chosen randomly.

Using them in combination he can always trade 25/50 for a "2", 75/25 for a "3" and 100/25 for a "4" if he needs them to get the answer. Rather than work that out on the fly he just remembers it.

Taking it once step further he can do (75x ± 100)/25 and get 3x ± 4, or (75x ± 50) / 25 and get 3x ± 2 if that would be helpful.

One of the other answers points out that he can go further and multiply that 50 or 100 by any of the random numbers he's given, which would be equivalent to multiplying the ± constant by the same amount though he doesn't use that level of complexity in his answer.

So he's basically building a toolbox of potential moves based on knowing that he'll always get those 4 numbers. He doesn't need to do the full calculation each time.


Is there a general name for the kind of problem the contestants try to solve in that round of the show? I've encountered variants of it "in the wild" in a game we played at university. People would challenge each other to place arithmetic operators and parentheses between the digits of the serial number printed on bus tickets to get the number 100, with some variations. Despite playing this game for quite a bit I never learned any name for it or the problem it used; I asked other people who played it and nobody knew one, either.

Googling around finds the exact question on Programmers SE (https://programmers.stackexchange.com/questions/213924/name-...) but no answer.


Any problem with the Countdown Numbers Game as a name? Any variations on it could simply be called Modified Countdown Numbers Game.


I'm glad there's an established name to attach to this problem but when I searched for them I didn't find variations of "Countdown numbers round problem/game" mentioned in books on mathematics/theoretical CS or in research articles. The idea behind the basic problem seems obvious and must have occurred to many people, so the lack of such mentions makes me suspect it may have a different canonical name as a specific type of combinatorial optimization problem. If there isn't one then "Countdown numbers (round) problem" will do just fine (I'd say "problem" is better than "game" because looked at like this it is not a game with players in a game-theoretical sense).


Here's the playlist. Mitchell and Webb. Good stuff. https://www.youtube.com/watch?v=zJDu5D_IXbc&list=RDqjOZtWZ56...


>direct DMA access

Direct direct memory access access?


Financed with a withdrawal from the ATM machine, of course.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: