Code golf: Will someone post <=72 characters of Javascript code that I can use to resolve this market to YES, without fetching external code?
24
76
470
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.

Get Ṁ200 play money

🏅 Top traders

#NameTotal profit
1Ṁ817
2Ṁ417
3Ṁ112
4Ṁ68
5Ṁ44
Sort by:
predicted 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.

predicted NO

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

predicted NO

@IsaacKing def NO

predicted NO

@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.

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

predicted YES

@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)

predicted NO

@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.

predicted YES

@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.

predicted NO

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

predicted NO

@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.

predicted NO

Golfers in shambles

predicted YES

@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.

predicted NO

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

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

predicted NO

@turb Mine!

predicted YES

@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?

predicted NO

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

predicted YES

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.

bought Ṁ100 of YES

@A Just ran it.

predicted YES

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

predicted NO

@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.

sold Ṁ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.

doesn't his browser not have $$

predicted YES

@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)

ah ok