HNHacker News
TopNewBestAskShowJobs

lennoff

139 karma · joined July 19, 2014

submissionscomments
lennoff··on NP-overrated
Sometimes you don't need an _exact_ solution. approximation of the traveling salesman problem exists for the metric version, it's O(n^3), and produces a result that's not worse than 50% of the optimal result, and for the general case O(n^2) algorithm exists that produces a result that costs at most twice the optimal result.
lennoff··on The startup's Postgres survival guide
wow, i checked the documentation, and you're right. the type is indeed poorly named!
lennoff··on The startup's Postgres survival guide
I disagree with the timestamptz advice. I tend to use timestamp (without the timezone), this forces me to use UTC everywhere, so I'm not even tempted to use anything else. I work in fintech, and so far whenever i saw someone storing datetimes with an associated time zone, it always ended with a disaster.
lennoff··on Emily Bender Sets the Record Straight on "Stochastic Parrots"
afaik before the final sampling, every "next" token has a probability, so theoretically it could select the 10 most likely tokens (based on some kind of sampling algorithm), but you'd end up with exponentially many output-sequences, so nobody does that.
lennoff··on What Emily Bender meant by "stochastic parrots"
i think it actually makes sense, an LLM just imitates human communication, which happens to be useful from time to time.
lennoff··on The Agent2Agent Protocol (A2A)
keep in mind that we have "vibe coding" now, where the goal is exactly to _not_ have a human in the loop (at least not constantly).
lennoff··on React for Two Computers
It's fun to theorize about an alternate universe where JavaScript has a LISP-like syntax (Brendan Eich originally wanted "Scheme in the browser"[1], so this isn't so far-fetched!). Indeed, `interpret` sounds like a LISP macro that can "partially evaluate" code (so someone else, ie. the browser can continue to evaluate it).

[1]: https://brendaneich.com/2008/04/popularity/

lennoff··on React for Two Computers
It seems like that the author by using JSX to express code directly as an AST re-invented LISP? See Greenspun's tenth rule[1].

[1]: https://wiki.c2.com/?GreenspunsTenthRuleOfProgramming

lennoff··on Lawyers blame ChatGPT for tricking them into citing bogus case law
How can you ban AI? It's literally designed to produce text that's indistinguishable from text that was produced by a living human being.
lennoff··on Cryptographic Best Practices
It's sad to see that Web Crypto[1] does not support Ed25519 (yet), only RSA and ECDSA for asymmetric signatures.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypt...

lennoff··on Why does Google use location for language rather than browser settings?
Because of the company VPN, I usually teleport to Israel, and I have absolutely no idea how to change the language on a right-to-left layout with a Hebrew alphabet...
lennoff··on React Source Code as Image
I guess I'll mint an NFT that's going to be a screenshot of this HN thread...
lennoff··on Making bracket pair colorization faster
Slightly related question: is there a plug-in that can color my code based in scope instead of syntax?
lennoff··on Nuitka: An extremely compatible Python compiler
Tangentially related question: could Nuitka target WebAssembly, given that according to their overview page, they translate Python into C? Usually when it comes to Python -> WebAssembly, the biggest problem is the lack of GC in the WebAssembly spec (as far as I understand), and I'm wondering if this would be an issue for Nuitka as well...
lennoff··on The Seniority Roller Coaster and Down-Leveling in Tech
I think the key takeaway is to never believe when someone says "Don't worry, you'll get promoted in no time".
lennoff··on OSSU: Path to a free, self-taught education in computer science
Is a CS degree important nowadays? I do have one, but literally no one mentioned or asked about my education during an interview, ever.
lennoff··on GitHub Copilot regurgitates valid secrets
Oh, it does... It generates code that's vulnerable to SQL injections, XSS, etc. It was trained on such code! (hopefully this will improve)
lennoff··on Concepts for JavaScript developers to know
Iteration protocols[1] are also nice (`Symbol.iterator`[2] and `Symbol.asyncIterator`[3])

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

lennoff··on REPL vs CLI: IDE wars
When you evaluate a form deep in a function, how do you handle variables that are defined "outside"? How can you evaluate such expressions?
lennoff··on Don't encode POST bodies like GitHub Copilot, use URLSearchParams
Well, how can we teach copilot to avoid raw string interpolation in such cases? Sure, some people will correct it, and the AI might improve, but I suspect that the majority of the developers will never notice it, and that'll just reinforce the AI's bad habits.
lennoff··on Physicists observationally confirm Hawking’s black hole theorem for first time
So black holes can't evaporate? How does Hawking radiation works if the back hole are has to stay the same?
lennoff··on XXY Oscilloscope
try it with https://github.com/m1el/woscope-music/blob/master/oscillofun...
lennoff··on Minecase – A distributed Minecraft server in .NET Core
How exactly is this distributed? The readme isn't really useful...