5 ms·
>>> from __future__ import braces File "<stdin>", line 1 SyntaxError: not a chance For those interested in how this (hilarious) error text came to be
by btown 2y ago
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
For those interested in how this (hilarious) error text came to be, it's been hardcoded in cpython since 2001!
https://github.com/python/cpython/commit/ad3d3f2f3f19833f59fd7e9ec59e1714e0986e08#diff-dd2b2c4b437189e677979328b2325d2c184b26d1e0c903be6d14458f5c02ee17R34-R36 https://github.com/python/cpython/commit/ad3d3f2f3f19833f59f...
The author, Jeremy Hylton, is now a Principal Engineer at Google working on AI search quality. It's quite remarkable that in 24 years, a single person's career has gone from a tongue-in-cheek memorialization of certain syntax being forbidden, to working on ubiquitous query systems that don't require dedicated syntax at all!
- SkiFire13 2y agoReminds me of `break rust;` causing the Rust compiler to emit an internal compiler error. I wonder which other languages have similar easter eggs.
- bch 2y agoTcl really became “Enterprise-ready”[0] at this time. [0] https://stackoverflow.com/a/1026619 https://stackoverflow.com/a/1026619
- shakna 2y ago> The Stardate time format had nothing to do with Sun. I added it to Tcl while working at Scriptics, as an easter egg for the then-upcoming Tcl2K Conference. One of the conference events was a competition to implement a standard-to-stardate conversion utility, using an arcane formula. Only one guy entered the event. He spent a couple hours agonizing over the implementation (as he was looking for a job at Scriptics, he was eager to impress) only to have the easter egg revealed afterwards. Of course he won the competition anyway. And he got the job, too. – Eric Melski
- hsfzxjy 2y ago> `break rust;` causing the Rust compiler to emit an internal compiler error Is this real?
- xcdzvyn 2y agohttps://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=043df02ff7f1a6486f6a2b150ec01f49 https://play.rust-lang.org/?version=stable&mode=debug&editio... > error: internal compiler error: It looks like you're trying to break rust; would you like some ICE? > --> src/main.rs:2:5 > | > 2 | break rust; > | ^^^^^^^^^^ > | > = note: the compiler expectedly panicked. this is a feature. > = note: we would appreciate a joke overview: https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675 https://github.com/rust-lang/rust/issues/43162#issuecomment-...
- SkiFire13 2y agoYes https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=08b203d2d011a7638a6ed0958e259604 https://play.rust-lang.org/?version=stable&mode=debug&editio...
- pjmlp 2y ago> error: internal compiler error: It looks like you're trying to break rust; would you like some ICE? Lovely, and the word game is just great.
- TheMatten 2y agoThis one in Haskell is coincidental, but used as a joke: ``` import Data.Function main = do let it = fix error print it ```
- notpushkin 2y agoOn HN, you can add code blocks by indenting with 2 spaces: import Data.Function main = do let it = fix error print it
- sans_souse 2y agoIf NLP counts, try xyzzy in gemini.google.com
- brcmthrowaway 2y ago20 years at google, now thats some F-U money!
- plhannb 2y agoInnocent times. Perhaps Hylton could join the "vote of no confidence" motion in order to get justice for Tim Peters: https://news.ycombinator.com/item?id=41314393 https://news.ycombinator.com/item?id=41314393
- JodieBenitez 2y agoAnd just like that, I'm down the drama rabbit hole.
- throw-the-towel 2y agoIt's always so cool to see this kind of Easter eggs. So sad that they're not as common as they used to be.
- lhmadk 2y agoThere are all sorts of easter eggs and jokes in Python, for example a joke about blind people that GvR prevented from being reverted: https://marc.info/?l=python-dev&m=130991276326041&w=2 https://marc.info/?l=python-dev&m=130991276326041&w=2 In 2024 suddenly everyone is grown up and corporate and has never done anything wrong.
- jszymborski 2y ago> In 2024 suddenly everyone is grown up and corporate and has never done anything wrong. Trying to be considerate of others, even when they are different from ourselves, is indeed kind and good and does come with maturity. You needn't be corporate or have never done wrong to be considerate.
- 0x12343276 2y ago[flagged]
- aklsk 2y ago[flagged]
- bonoboTP 2y agoHow is it remarkable? Random people didn't get to add stuff to Python in 2001. It was a niche thing and someone who was contributing to it was likely to be a smart and dedicated person who would naturally have an impactful career ahead of them. It's a misconception that the informal playful hobby hacking things are their separate world from real professional development.
- dylanfw 2y agoI think OP is commenting more so on the reversal of the developer’s relationship with rules of syntax than their personal capabilities.