HackerTrans
TopNewTrendsCommentsPastAskShowJobs

joshhug

no profile record

comments

joshhug
·9 เดือนที่ผ่านมา·discuss
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); } }
joshhug
·9 เดือนที่ผ่านมา·discuss
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.
joshhug
·ปีที่แล้ว·discuss
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.
joshhug
·ปีที่แล้ว·discuss
Also the African humid period isn't visually apparent (https://en.wikipedia.org/wiki/African_humid_period).

But very cool!
joshhug
·ปีที่แล้ว·discuss
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/
joshhug
·2 ปีที่แล้ว·discuss
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.
joshhug
·2 ปีที่แล้ว·discuss
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...
joshhug
·2 ปีที่แล้ว·discuss
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.