Hacker Newsnew | past | comments | ask | show | jobs | submit | joshhug's commentslogin

This was cool: https://codepen.io/ChetasLua/pen/yyezLjN

Somewhat amusing 4th wall breaking if you open Python from the terminal in the fake Windows. Examples: 1. If you try to print something using the "Python" print keyword, it opens a print dialog in your browser. 2. If you try to open a file using the "Python" open keyword, it opens a new browser tab trying to access that file.

That is, it's forwarding the print and open calls to your browser.


Ah, that's because the "python" is actually just using javascript evals.

} else if (mode === 'python') { if (cmd === 'exit()') { mode = 'sh'; } else { try { // Safe(ish) eval for demo purposes. // In production, never use eval. Use a JS parser library. // Mapping JS math to appear somewhat pythonesque let result = eval(cmd); if (result !== undefined) output(String(result)); } catch (e) { output(`Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n${e.name}: ${e.message}`, true); } }


The part about dad joke square theory got me thinking about this classic scarecrow joke, which feels like an example from some higher order version of square theory:

"Why was the scarecrow given an award?"

"He was out standing in his field."

The fact that a scarecrow's job is to be "out standing in his field", and that excelling at one's job can be phrased as being "outstanding in his field" is an incredible linguistic coincidence.


The classic, "why did the chicken cross the road" also fits into this genre, but nobody seems to understand that "get to the other side" means "to cross over from life to death." Every time I explain this to someone they are shocked that they never knew this meaning.


My understanding is that that interpretation is an urban legend.

Wikipedia attributes the joke to an 1847 article, which is phrased in a way that clearly isn't intended to have some deeper meaning: https://en.wikipedia.org/wiki/Why_did_the_chicken_cross_the_...


TIL, thanks!


You should keep smugly explaining it to people as if you didn't know about or otherwise have access to google before May 27, 2025.


That's a failure of the joke not to set it up -- one of the "top corners" of the square is missing. Chickens normally don't make an effort to get to the "other side" (as far as we're aware anyway).

To make the square you'd have to do something where the context of "the other side" means past life into death. e.g., "Why did the spiritualist put his ear towards the road? To hear from the other side."


If you cross the wrong person, they just might send you to the other side.

I don’t know how to make the chicken crossing the road use this meaning, but … well, there it is.


> Every time I explain this to someone they are shocked that they never knew this meaning.

You might have taken this as a hint?


That is funny. We finally figured out this double meaning a few years ago and I have been on the same quest since.


Seems arbitrary. Why does “get to the other side” mean to cross over from life to death. You’re saying it like it’s obvious.


It is easy to find references [1]. I always thought it referred to the Greek mythological river Styx, where crossing the river meant going to the underworld.

[1]: https://en.wiktionary.org/wiki/other_side


Sure, but it could also be humorous due to how obvious/deadpan the response “to get to the other side” is.


Also, My friend accidentally drank a bottle of invisible ink... she's at the hospital now, waiting to be seen.

"Waiting to be seen" having slightly different meaning with respect to hospitals and invisible ink.


In 1903 there was a proposal to inter corpses into crystal caskets.

The success of that initiative remains to be seen.

Is what you reminded me of. Technically first it was "fuckin' Mitch!" Because Hedburg sprayed reappearing disappearing ink on someone's shirt.


For some reason this old saying popped into my head reading that. I know it's not related but:

Time flies like an arrow. Fruit flies like a banana.


"Fruit flies like a banana" is arguably the quintessential example of ambiguity in English grammar. It shows that the grammatical structure of a sentence (which words are nouns, which are verbs, etc.) cannot be reliably recovered even if we know the meaning and possible grammatical categories of every word.

Both ways to parse it are grammatically sound:

(Fruit) (flies) (like a banana)

(Fruit flies) (like) (a banana)

To decide which meaning was likely intended, the listener needs to make a value judgement about the speaker, based on detailed knowledge of the everyday world.


Even spoken aloud, there's a natural-sounding stress pattern that is ambiguous. Love it.


Would marking compound words resolve this? As in germanic togetherwriting of things that form one whole, as in English' noun-that-they-modify-preceding adjectives, or as in some other language: some way of signaling this?


It would definitely help with written English, but I can't see it helping with spoken. (Is there some rule in German that disambiguates togetherwritten nouns when spoken?)


I actually wrote about speech but thought it distracted from the question and removed it again

No, in speech we seem to get by without spaces, and that's in every language that I'm aware of, but then we also don't have commas, parentheses, apostrophes, or capital letters. Somehow, intonation and emphasis must replace these (or rather, writing encodes our speech somehow) but I'm not sure how they map exactly. Question marks indicate a rising tone for example, that's about the extent of what I know

As a child learning to write, I had a phase where I put whole sentences together because that made sense to me as the next step after we learned to write letters together to form words. It took quite some convincing before I believed that adults don't secretly do this and they're only telling us to add space because they think we're not ready for the next step. I guess I innately thought words belong together and we only add a pause between sentences

There is one speech pattern where spaces can be heard though. Like in English, when you enunciate very clearly because the person isn't understanding (for example, if their English is very poor, or when you're shouting across a long distance), similarly in germanic languages I'd add time between each word, and nearly none if it's a compound word. Like how you'd pause between "get" and "out" if you want to make yourself extremely well understood, but afaik not/barely between "handy" and "man" or "quag" and "mire" because the parts haven't the same meaning, or aren't understood at all anymore, in isolation

Now I'm curious actually, might English native speakers also add less time between compound nouns/adjectives in this speech mode? So not like "quag" and "mire" but something that's commonly written apart, like "bottle cap". Do they (you?) identify and indicate things that form one concept also by separating them less, and only the written encoding is different between the languages, or do they feel like the words are fundamentally separate things in the same way that "go" and "home" are separate parts of speech?


The only pattern I know for sure is that compound words in English tend to begin their lives in hyphenated form (news-paper, life-style, e-mail) and then the hyphen gradually disappears over time. Old enough newspapers still show these words with hyphens in.

I think the hyphen removal follows the typical speech pattern in which the syllables are rushed together just like the syllables of other words, but I'm not sure.


I assume stuff like this is why some languages or script can never be deciphered


My favorite part about that quote is the broken symmetry between the double meaning of the second sentence and the single meaning of the first.

It begs one to consider the possibility of little “time flies” snacking on arrows. Which I guess completes the square?


Gosh, after all those years I've only just realized the double meaning of "fruit flies". Thanks!

Before that, I just thought it was more of a non sequitur, but still amusing. There was just something inherently funny about imagining a banana hurling through the air in an awkward tumbling motion, right after the sagely abstract concept of time and its elegant arrow metaphor.


This is hilarious. I never thought of a flying banana and now I can't un-see it.


I think this is an example of a Garden Path Sentence[0]

0. https://en.wikipedia.org/wiki/Garden-path_sentence?wprov=sfl...


Is it a coincidence though? You could have started with the phrase "outstanding in his field", recognize the double entendre, and simply consider whether it's anyone's actual job to "stand in a field". Scarecrow is one of many possibilities.


I think the meanings are pretty close though? Not coincidental: to be prominent in an area.


It's pretty straightforward, top left "outstanding", bottom left "out, standing" connected as homonym, and then field on the right also homonyms. Both horizontals are phrases.


If you use TikTok, search up “to the untrained ear”. You’d love those. Maybe they’re on YouTube too


Square theory might call it a diagonal overlay


did you read about the new corduroy pillow? it's been making head lines!


Also the African humid period isn't visually apparent (https://en.wikipedia.org/wiki/African_humid_period).

But very cool!


if we're nitpicking, glaciers push down the crust they are on (https://en.wikipedia.org/wiki/Isostatic_depression) so when glaciers melt the land underneath is at first underwater before emerging


Hardly nitpicking. The size of the two glacial lakes was phenomenal, bigger than current great lakes. Glacial lake Missoula emptying into the Pacific dug out the Channeled Scablands in Washington State.


I am told that an interesting alternative is the Structured State Space for Sequence Modeling (S4). I don't personally know much about this technique, but didn't see anybody else mention this in this thread.

https://srush.github.io/annotated-s4/


I had him as a teaching assistant when I was teaching data structures at Princeton back in Fall 2013. Princeton CS has their professors rotate through as TAs every so often through their courses.

That semester, I made a slight mistake on the final exam where I asked students to create an algorithm that could find the second shortest path from s to every other vertex in a graph. I forgot to specify that the second shortest path should be simple (i.e. should not reuse any vertex twice). Having to deal with non-simple paths makes the problem much much harder.

None of the students figured it out in the time available, and I'm sure I would also have been stumped if I had tried to solve the problem. Bob figured it out though. And then I remember he graded all 150 solutions to the problem himself, having as a blast as he went through students attempts at an effectively impossible problem.


Being that damn smart must feel amazing, almost like having a superpower.


I just tried o1, and it did pretty well with understanding this minor issue with subtitles on a Dutch TV show we were watching.

I asked it "I was watching a show and in the subtitles an umlaut u was rendered as 1/4, i.e. a single character that said 1/4. Why would this happen?"

and it gave a pretty thorough explanation of exactly which encoding issue was to blame.

https://chatgpt.com/share/66e37145-72bc-800a-be7b-f7c76471a1...


4o’s answer seems sufficient, though it provides less detail than o1.

https://chatgpt.com/share/66e373d7-7814-8009-86c3-1ce549ca2e...


A common problem, no doubt, with a lot of training context. But man. What a time to be alive.


Damn, the model really goes to length to those trivial but hard problems. Impressive


That was interesting. I asked it to try to say something in another language, and she read it in a thick American accent. No surprise. Then I asked her to sing, and she said something like "asterisk in a robotic singing voice asterisk...", and then later explained that she's just text to speech. Ah, ok, that's about what I expected.

But then I asked her to integrate sin(x) * e^x and got this bizarre answer that started out as speech sounds but then degenerated into chaos. Out of curiosity, why and how did she end up generating samples that sounded rather unlike speech?

Here's a recording: https://youtu.be/wWhxF7ybiAc

FWIW, I can get this behavior pretty consistently if I chat with her a while about her voice capabilities and then go into a math question.


I'm curious to hear feedback, especially:

1. Given the limited amount of scarce student time I want to spend on this, do pull requests / GitHub actions tests (provided for them) / code reviews seem like the right team processes to introduce?

2. Each student's work is independent of every other student's. Is there some way to have them working on different pieces of the same problem, or having the students solutions interact in some deeper way than random selection in a lottery? On my first post of this idea, a user named taftster imagined taking inspiration from Factorio in some way, with students each contributing some piece of a large system.

3. Is there a way we could naturally allow pull requests for the contest code or maybe even the README that establishes how to review pull requests? I'm thinking a bit about Fluxx or Nomic here.


On 2, you could recreate Axelrod's classic prisoner's dilemma tournament from 1980. Here's a short writeup about it: https://cs.stanford.edu/people/eroberts/courses/soco/project...

Another game you could try is the "guess 2/3 of the average" game.

You could make the assignment one game like these, or put a few together.


I'm curious to hear feedback, especially:

1. Given the limited amount of scarce student time I want to spend on this, do pull requests / GitHub actions tests (provided for them) / code reviews seem like the right team processes to introduce?

2. Each student's work is independent of every other student. Is there some way to have them working on different pieces of the same problem, or having the students solutions interact in some deeper way than random selection in a lottery? A user named taftster imagined taking inspiration from Factorio in some way, with students each contributing some piece of a system. I've so far lacked the creativity to imagine what the API for this might look like for this assessment.

3. Is there a way we could have students make pull requests for the contest code itself? I'm thinking a bit about Fluxx here.


Like a lot of schools, our Data Structures course doubles as a soft intro to software engineering. I want them to know how to solve real problems efficiently and manage complexity.

Student time is incredibly precious. The hope here is that students will spend less than an hour on this, and in the process get a taste of how code reviews / automation can help teams function better. I'm hoping I can thread the needle and give them tools that will help them more efficiently complete their capstone project at the end of the semester, without spending too much of their time teaching them these tools.

FWIW, we have discussed the idea of a lower division software engineering class, and I was really hoping Pamela Fox would do this before she headed back to industry (interesting story there: https://blog.pamelafox.org/2022/05/my-experience-as-unit-18-...). We do have an upper div software engineering course as well, though it's not taken by most of our students.


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

Search: