Hacker News new | past | comments | ask | show | jobs | submit | thmorriss's comments login

the clojure loop construct is often cleaner than code written to be tail recursive


And often faster: https://medium.com/hackernoon/faster-clojure-reduce-57a10444...

Yet it’s always noted as code smell associated with “inexperienced candidates” in interviews.

For that matter, first and last too: https://medium.com/hackernoon/faster-clojure-reduce-57a10444...

The amount of paired programmers suggesting changing nths to firsts and lasts is demoralizing.


I the analogy that GPT is improvising/speaking, like you would in a normal conversation. When I talk out loud (quickly), I only have ~1 word of lookahead just like GPT. But if I want good answers to hard questions, I need to slow down and actually write[1] something down. So the wrapper script that iterates/recursive on responses that OP describes is analogous to the slowing down process of writing.

I'm also curious what sort of results the iterative process can lead to. The movie script example in OP is impressive, but does it reach a stable state? Does it work for other types of prompts (coding related/other) that i've seen on twitter? All very interesting.

[1] http://www.paulgraham.com/words.html


that is a cool story, thanks for sharing


I like this mindset, thanks for sharing.


I like this a lot. I set it to open every morning at 8am using an extension :)


Monaco. Top down heist simulator that’s very silly with amazing music.

Minecraft with buddies online is amazing.

Towerfall ascension campaign. Made by developers of Celeste (so it has A++ feeling controls). Single screen single hit kill defend against waves of enemies in several worlds. Good difficulty progression. And 4 player VS is a blast.

Not coop but vs: Duck game. Works best with 4 ppl, high skill based, super silly single screen instant hill tournament. Playing this with buddies is consistently the most fun I have had in 10 years of playing games.

Gang beasts. Very very silly, not skill based last man standing brawler on interactive maps.

Party games like jackbox can be super fun, including gartic phone, skribbl.io, cards against humanity.


+200 to duck game!!


blue bubble fomo is very real. It is the main reason ~5 of my friends have switched to iphones in my age group (~21) in the last two years


Would you rather delegate your child’s attention to YouTube/Reddit/Instagram, which will inevitably happen the moment they get their own devices?


This was fun


If you enjoyed this, you might also like the (much more technical) writeup of the Ethereum pinball machine - https://medium.com/@kanewallmann_71759/an-untrustworthy-pinb...

It may assume some knowledge of things like etherscan and the EVM though.


This is very interesting, thanks! It reminds me of a friend's adventure, he found a contract containing some ETH that could be called with some more ETH and would send the entire sum back to the caller. He analyzed it a bunch of ways to make sure it wasn't a scam, and then sent some ETH to it.

It was a scam.

I wonder how it was done, Etherscan didn't show anything and compiling it led to a few bytes of difference between what was compiled and what was deployed.


There are so many clever ways to code honeypots using obscure peculiarities of Solidity and/or Etherscan that there's little hope of being sure that it isn't a scam just by looking at the code and transaction history.

Fortunately, there are tools like Ganache, which you can run with `ganache-cli --fork` to reliably emulate locally what will happen when transactions are sent to mainnet. I would accept no substitute approach when dealing with suspect contracts.


Oh huh, I didn't know Ganache could do that, thank you!


Interesting, it might use a flaw in the Etherescan contract verification[1]. But in any case, when you expect a honeypot you can and should execute the contract off-chain[2] and examine the resulting state (specifically your account balances) before committing a real transaction. Wallets should really do this by default, but unfortunately there doesn't seem to be a lot of resources available for common goods projects like wallets, so we are stuck with primitive tools.

[1]: Like this Unicode RLO exploit for instance: https://krebsonsecurity.com/2021/11/trojan-source-bug-threat...

[2]: https://tenderly.co or mainnet forking using hardhat are convenient ways to achieve this.


That's a great tip, thanks! I will relay it, as I don't know much about Ethereum. Can you download and redeploy the compiled contract?


This might be the same bug reported and fixed in the Ethereum pinball article I shared


Yeah, definitely sounds very similar, at least.


Yes, you can always clone and redeploy any contract with its raw EVM code.


Thank you for this tip, which is very concretely worth 1 ETH.


Agree. Laughed when I saw that


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: