I don't know, if you use this hack to get through life, you end up dying after a bitter, troubled life, having never created anything - you are always hitting 'buy more stuff' instead.
Also, I noticed that something compounded to solve if you had more of them, notably stress. When you only had 1, it was instantaneous to solve. If you had more than one, the percent counter took time
I wasn't aware that clicking different things in different orders affected the outcome. I have just been clicking solve every time it comes up and not reading the captions.
Kinda. I use jQuery when it makes sense, and when I'm working on someone else's dime and time. Use vanilla JS for stuff like this, because why lose an opportunity to learn?
Quick to call someone stupid, aren't we? Did you even try his code? Go try it. Just because a site doesn't have jQuery, doesn't mean $ isn't assigned to anything.
Pretty sure cturhan did try jffry's code and that's why he wrote this code. The $ var on the page only returns the first instance that it matches so his code doesn't work.
A less efficient but shorter way is:
var interval = setInterval(function(){
var links = document.querySelectorAll('#problems a');
for(var z =0; z< links.length; z++) {
$('#'+links[z].id).click();
}
}, 1000);
Also he never called him stupid he simply informed him that it didn't work.
You're right, sorry - it was the supercilious tone I objected to. In fact $() returns the first element and clicks it. Because it's in a setInterval, it continues to click the first <a> it finds every 100ms. Did you try it?
i am also thinking about writing some ifs into it that allow you to focus on "friends", "happy buddha", "people person", "wisdom", "early death" and maybe some other criteria, but that needs user interface and more time, which i dont have today ;)
I would like to see a cat version of the game. There could be specific outcomes, e.g. if you don't want to end up de-balled/hysterectomied then you can be an alley cat and live a shorter life that may be harsher. Alternatively you could go for the cosy life by purring lots.
Depressing, but interesting. I find it interesting that even before you have a life, you start out with hope. What does that mean, I wonder? Hope of your parents? Society (for that "someone" who will make a difference)?
In JavaScript every object is basically a hashtable. In order to get acceptable performance JS engines build type descriptions ("hidden classes" or sometimes just "maps") behind your back. That is, if you create a JS object (hashtable) with fields `x` and `y` it will create a hidden class with those two fields. This way it can access the fields efficiently. See http://mrale.ph for much more information on JS engines.
These hidden classes are built on the fly: say you add `x` to a instance to get an object with a configuration that was never seen before. In that case, the engine creates a new description with that new field and remembers the transition (so that further objects with similar configurations can reuse the same hidden class).
Keeping track of these hidden classes takes time and space. If you actually use the JS object as a hashtable, then there will be lots of unnecessary hidden classes, that will never be used again. However, there is a trick to tell the engine that an object is actually a hashtable (and shouldn't be optimized as if it was an instance of a class): when deleting a field from an object v8 (and probably all other engines) assume that the object is used as a hashtable and don't create these hidden classes anymore.
Dart2js uses this trick to avoid this cost some important big hashtables (`B`, `C`, ...).
Same here. I just replayed it and realized I didn't notice when exactly I got it. I had to play it for a third time to see the exact point. It made me go: "oh".
I think it's more the fact that this one is "hidden" in the beginning than anything else, but there are possible rationalizations one might conjecture as to why at that age.
It has potential, but I had a hard time relating to my character. I need a lover as a teenager? And 2 broken hearts to stop being a teenager? And the only way to get experience is by losing friends.
I guess it means that moving on usually requires leaving friends behind, and not that experience requires some kind of drama or even explicit un-friending. But the presentation makes it seem like losing friends causes gaining experience instead of the other way around.
I remember that story and it kind of remained with me. As soon as I saw the title of the "game" I recalled this part of this story:
> ... turn around, see my dad being really close to the dog when all of the sudden a big chunk of ice around him breaks loose, tips over, and my dad falls in. I freak out. Then he stands up, the water only reaching about hip height.
Wow. This really struck me - what an incredible piece of art. Thank you notch, for helping me to spend some time this morning reflecting on how I want to live my life.
After about 5 minutes, this just reminded me too much of real life and I couldn't take it anymore. As in no matter what you do, it doesn't work out... very profound.
No, that script looks for scripts of type "application/dart" in the page and then tries to find a compiled-to-JavaScript version of any scripts it finds by appending ".js" to them.
It looks like the actual Dart file hasn't been uploaded - which is sensible, in a way, since browsers don't natively supports Dart right now, with the exception of Dartium (?).
Given that 'You are forgotten.' takes a long time to 'solve,' it could be a reflection that even the greatest will eventually be forgotten. (Say, if the human race manages to survive millions of years, and colonizes different planets light-years away.)
144 comments
[ 3.2 ms ] story [ 276 ms ] threadHmm...
Also, I noticed that something compounded to solve if you had more of them, notably stress. When you only had 1, it was instantaneous to solve. If you had more than one, the percent counter took time
I don't think it does.
Here's the relevant part of the (dart2js'd but slightly cleaned-up) code:
https://gist.github.com/CyberShadow/11329584
Edit: I made a full graph of the entire game: https://news.ycombinator.com/item?id=7652770
[0] https://developers.google.com/chrome-developer-tools/docs/co...
A less efficient but shorter way is:
Also he never called him stupid he simply informed him that it didn't work.A quick fix would be setInterval(function(){ $("a") && $("a").click() }, 100)
setInterval(function({[].slice.call(document.querySelectorAll("a")).forEach(function(a){a.click()})},100)
It feels great to know there are some more people who think of automating first, a better life second =)
i am also thinking about writing some ifs into it that allow you to focus on "friends", "happy buddha", "people person", "wisdom", "early death" and maybe some other criteria, but that needs user interface and more time, which i dont have today ;)
Since "You need to learn." is at the bottom of task list, with 1s delay it never gets attention, so you don't learn, so you don't age.
Here's what I've got:
Can anyone familiar with Dart to JS explain what is going on with:
These hidden classes are built on the fly: say you add `x` to a instance to get an object with a configuration that was never seen before. In that case, the engine creates a new description with that new field and remembers the transition (so that further objects with similar configurations can reuse the same hidden class).
Keeping track of these hidden classes takes time and space. If you actually use the JS object as a hashtable, then there will be lots of unnecessary hidden classes, that will never be used again. However, there is a trick to tell the engine that an object is actually a hashtable (and shouldn't be optimized as if it was an instance of a class): when deleting a field from an object v8 (and probably all other engines) assume that the object is used as a hashtable and don't create these hidden classes anymore.
Dart2js uses this trick to avoid this cost some important big hashtables (`B`, `C`, ...).
I hope Notch is feeling ok.
That was my first thought, and I suspect that's not the case at the moment :-\",
https://twitter.com/mxech/status/460058856216072192
Brilliant.
But it reminds me of A Dark Room, which was excellent. http://adarkroom.doublespeakgames.com/
"And 2 broken hearts to stop being a teenager? And the only way to get experience is by losing friends."
i'm not sure i directly relate to this either, but it really doesn't sound too crazy or unfamiliar.
Are there any harder to reach options, like having children or reaching old age?
edit: I looked in source, there are no hidden options, you will get everything on the first playthrough.
http://notch.tumblr.com/post/37823268132/i-love-you-dad
I remember that story and it kind of remained with me. As soon as I saw the title of the "game" I recalled this part of this story:
> ... turn around, see my dad being really close to the dog when all of the sudden a big chunk of ice around him breaks loose, tips over, and my dad falls in. I freak out. Then he stands up, the water only reaching about hip height.
I urge you to read the whole story.
It looks like the actual Dart file hasn't been uploaded - which is sensible, in a way, since browsers don't natively supports Dart right now, with the exception of Dartium (?).
Thats the message I got from it. Beautiful.