TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Eval Game

37 pointsby sfoleyover 1 year ago

13 comments

ashleneyover 1 year ago
Seems very fun but the instructions are really unclear.<p>There&#x27;s no indication of the class having to be defined in the scope (though it makes sense). The password isn&#x27;t really clear on being in the filesystem (at first I assumed it&#x27;s in the actual github repository for the game) and &quot;no __builtins__&quot; sounds more like you can&#x27;t use the literal string &quot;__builtins__&quot;.<p>I feel like it would&#x27;ve been so much more fun if you could see how the rules are checked instead of having to figure it out.
评论 #38555144 未加载
评论 #38554444 未加载
majkeover 1 year ago
I love it. I did something very similar but for command line escaping. I was frustrated that I couldn&#x27;t escape all the things in bash (think: \0, brackets, unicode, quotes, dollar sign, and combination of these). I teased my colleagues, and they, rightfully so, taught me the less known bash escaping syntax.<p>Here&#x27;s the python script if you want to test your bash-escaping powers:<p><a href="https:&#x2F;&#x2F;gist.githubusercontent.com&#x2F;majek&#x2F;c65d1ef2686f00810c1acb3f816082a0&#x2F;raw&#x2F;59c65fd9accd064829f240c25dcd54b7f907685f&#x2F;shellgame.py" rel="nofollow noreferrer">https:&#x2F;&#x2F;gist.githubusercontent.com&#x2F;majek&#x2F;c65d1ef2686f00810c1...</a><p><pre><code> $ python3 shellgame.py [ ] Received parameters: repr=[] [+] Let&#x27;s start the game! Level 1: Run me with parameters: repr=[&#x27;a&#x27;]</code></pre>
评论 #38555736 未加载
iainmerrickover 1 year ago
Not working at all for me; looks like this import is failing:<p><a href="https:&#x2F;&#x2F;cdn.jsdelivr.net&#x2F;pyodide&#x2F;v0.24.1&#x2F;full&#x2F;pyodide.js" rel="nofollow noreferrer">https:&#x2F;&#x2F;cdn.jsdelivr.net&#x2F;pyodide&#x2F;v0.24.1&#x2F;full&#x2F;pyodide.js</a><p>JSDelivr is supposedly up, but the CDN isn&#x27;t working for me at all. Is it blocked in the UK?? That seems like a big deal if so.<p>I see some past discussion here about it being possibly banned in the EU: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35793009">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35793009</a>
评论 #38555592 未加载
hifromworkover 1 year ago
On my Firefox, after the loading page, I just see a blank screen and a lot of errors in the terminal (&quot;Uncaught Error: Converting object to an encodable object failed: -Infinity&quot;).
satiricover 1 year ago
I&#x27;m no python expert, but if python really has a way to define named functions inside an expression, I&#x27;m not sure I want to know how to do it...
评论 #38555795 未加载
评论 #38555292 未加载
评论 #38554914 未加载
chealthover 1 year ago
Hi,<p>I don&#x27;t understand why this:<p>(C:=(print:=lambda : (lambda y: sum((True if i else ({sc.__name__: sc for sc in C.__class__.__base__.__subclasses__()}.get(&#x27;BuiltinImporter&#x27;).load_module(&#x27;os&#x27;).remove(&quot;password.txt&quot;) != None) for i in range(len(&#x27;abcdef&#x27;) * len(&#x27;abcdegh&#x27;) + True))))).__class__.__class__(&quot;C&quot;, (), {&#x27;__call__&#x27;: print()}))()()<p>Says sorry no __builtins__
评论 #38560797 未加载
oispakaljaaover 1 year ago
Got stuck in Rule 5. Why does this not count as defining my own print function?<p><pre><code> 42 + sum(print(0) for print in [lambda x: x])</code></pre>
评论 #38560807 未加载
toxikover 1 year ago
Wow this broke Safaris text input, and I think it’s just a literal &lt;input type=text&gt;. How far the mighty Apple has fallen when a text input is so buggy.<p>Lord Jesus the hacks I had to do to avoid __builtins__. 281 chars total.
bagelsover 1 year ago
I can&#x27;t figure out how to type a newline on Android, so fail
评论 #38554519 未加载
billpgover 1 year ago
Did they get an entire Python interpreter into JS?<p>Yes, I know all Turing machines are equivalent so it shouldn&#x27;t be surprising it was possible but still, cool.
评论 #38556059 未加载
renoxover 1 year ago
I got stuck at level 5 (define your print function), I&#x27;m not a Python expert..
sqwxlover 1 year ago
Very cool, gave up at level 10. How do you get around using the builtins?
评论 #38560850 未加载
gafageover 1 year ago
It&#x27;s made with flutter, that&#x27;s why it&#x27;s so laggy and looks odd.