Code golf: Will someone post <=72 characters of Javascript code that I can use to resolve this market to YES, without fetching external code?
resolved Mar 28
Resolved
NO

Sequel to /IsaacKing/code-golf-will-someone-post-80-char

Post Javascript code in the market comments. I will run each piece of code that's 72 characters or less and doesn't use fetch() or another way of bringing in external code in my JS console on this page. If this results in this market resolving to YES, so be it. If the market is still unresolved by the close date, it resolves to NO.

If I suspect that your code will do something that I do not want it to do, such as resolve this market to NO or send you all of my mana, I will not run it. (And if that fails, I reserve the right to resolve this market N/A.)

Each person gets one attempt.

🏅 Top traders

#NameTotal profit
1Ṁ817
2Ṁ417
3Ṁ112
4Ṁ68
5Ṁ44
Sort by:
IsaacKing avatar
Isaac Kingpredicted NO

As a change from previous markets, I am now in full cooperation with the golfers in attempting to resolve this market YES. I will provide any relevant information they ask for, such as my browser environment and any error messages or other results of running a certain code snippet. And I will no longer try to foil their plans, such as by resizing the window to change the page layout.

IsaacKing avatar
Isaac Kingpredicted NO at 11%

Should I resolve NO or should I try @A's snippet once more just in case it was a bug?

GarrettBaker avatar
Garrett Bakerpredicted NO at 11%

@IsaacKing def NO

IsaacKing avatar
Isaac Kingpredicted NO at 11%

@GarrettBaker I did say I'd re-run it if it only didn't work due to a website bug.

I'm skeptical that the site bug was the reason, but I want to make sure I'm being fair.

Imuli avatar
Imuli

@IsaacKing I thought you already reran it! (So I sold.) But yes, I vote for rerunning.

A avatar
Apredicted YES at 11%

@IsaacKing Might as well rerun I guess, if it failed for a different reason then rerunning it won't do anything anyways, right?

(also yeah I kind of thought that you had already done this, or else you had already determined based on the output when you ran it that rerunning wouldn't help)

Thekla avatar
Theklapredicted NO at 11%

@IsaacKing I only bought in at the last minute since the description indicates that if the market is unresolved by close, it resolves to no. So I vote for no rerunning.

A avatar
Apredicted YES at 11%

@Thekla Maybe @IsaacKing could test the code on a different market and report back the result? If it doesn't work then this is moot and we can just resolve NO, if it does work then it gets trickier.

IsaacKing avatar
Isaac Kingpredicted NO at 11%

@A Should preregister the plan if it resolves YES, to avoid arguments at the time.

IsaacKing avatar
Isaac Kingpredicted NO at 11%

@Thekla Yeah that's fair. Per the description this resolves NO, and I don't have any reason to think a Manifold bug caused the issue last time.

IsaacKing avatar
Isaac Kingpredicted NO at 11%

Golfers in shambles

A avatar
Apredicted YES at 11%

@IsaacKing This is for sure doable, but when it changed from a code-golfing challenge to a "guess how Isaac's browser settings are different than mine" challenge it got kind of boring IMO.

IsaacKing avatar
Isaac Kingpredicted NO at 11%

@A That's fair. For future challenges I think I'll start answering debugging questions, and maybe give people more than one chance.

turb avatar
turb

could you say which browser you'll run this in?

IsaacKing avatar
Isaac Kingpredicted NO at 88%

@turb Mine!

turb avatar
turbpredicted YES at 88%

@IsaacKing 🙃

Hmmm the gears are turning... Would evaluating a comment on this page be considered bringing in external code? What if the comment only holds data used by the code and isn't executed? I assume it's okay to call into a js module already present in the pages source?

IsaacKing avatar
Isaac Kingpredicted NO at 88%

@turb I'll allow it if it seems like fun. See the comments here.

A avatar
Apredicted YES at 76%

Okay this one should be robust regardless of whether you hold shares, and even less chaotic than the previous one even!

i=0;setInterval(b=>i<4&&b("button").at(-[11,13,9,2][i++]).click(),9,$$)

No known side effects, but I'd still refresh your page afterwards just to be safe.

IsaacKing avatar
Isaac Kingbought Ṁ100 of YES

@A Just ran it.

A avatar
Apredicted YES at 76%

@IsaacKing Hmm, Manifold seems to be locked up, none of my sells are going through... hopefully that's not related to why it failed :(

IsaacKing avatar
Isaac Kingpredicted NO at 88%

@A Yeah I've been having some issues too. Just tagged some people in the Discord to take a look at it.

If that bug seems likely to be the reason for the failure, I'll rerun it after it's fixed.

A avatar
Asold Ṁ459 of YES

@IsaacKing Just tested the same code again here (https://manifold.markets/A/test-market-14) after manifold eventually unlocked enough for me to create a new market, and it still worked, so I'm befuddled. Oh well.

jacksonpolack avatar
jackson polack

doesn't his browser not have $$

A avatar
Apredicted YES at 90%

@jacksonpolack It does, just not inside lambdas unless you pass it through explicitly (which is the behavior of chrome, and not the behavior of firefox)

jacksonpolack avatar
jackson polack

ah ok

A avatar
Apredicted YES at 76%

@IsaacKing Would you perhaps be willing to commit as to whether or not you will hold shares in this market? (or at least not to buy/sell shares in between receiving a submission and executing it?)

IsaacKing avatar
Isaac King

@A Not at the present time, but perhaps if someone offered me a large enough manalink, I would. :)

A avatar
Abought Ṁ1,500 of YES

Hmm tempting, but unfortunately your greed spurred me to find a more robust solution :)

IsaacKing avatar
Isaac King

Hmm. Are our golfers finally encountering some difficulties?

GarrettBaker avatar
Garrett Bakerbought Ṁ20 of NO

@IsaacKing (be warned: this is exaggerated in tone due to me wanting fake money) I tried this a few days ago, and found it really hard. People generally shouldn't bet on markets like these if they haven't tried it themself.

miscatulated avatar
miscatulated

@GarrettBaker I was surprised the last one worked, it was getting really cursed.