HNHacker News
TopNewBestAskShowJobs

glass_of_water

273 karma · joined February 28, 2013

submissionscomments
glass_of_water··on Coding Isn't Programming
I could not agree more. When trying to understand the distinction between "declarative" and "non-declarative" code, I came to the same conclusion: it's all relative.
glass_of_water··on About Dolly Parton’s Imagination Library
If you find the right organization that uses the funds effectively, what's with donating your wealth as opposed to creating your own charitable organization? Also, I'm sure the tax deduction for donations is exploited when the receiving organization is non-profit in name only, but if the receiving organization really is an effective charity, what's wrong with the donor getting a tax break?

Or is the claim not that one approach is more effective than other in terms of positive impact, but that the wealthy, for their own sake, would be better off founding their own organizations?

glass_of_water··on Introduction to Locality-Sensitive Hashing (2018)
How do you deal with false negatives when using Hilbert curves for nearest neighbor searches? Based on my limited understanding, points close on space can be far from each other on the curve. Do you use multiple curves or something?
glass_of_water··on Not Mysticizing System Dynamics
A function f(x) whose growth rate at x is proportional to f(x). So anything where growth rate is proportional to the current value.
glass_of_water··on Clasp: A Common Lisp implementation using LLVM for compilation to native code
Could you compile to wasm, or is there extra work involved in making that possible? One reason I shied away from learning Common Lisp is that none of the popular implementations seem to run in the browser.
glass_of_water··on Programming breakthroughs we need
If that were true, text books wouldn't contain any diagrams. So I think it's fairly uncontroversial to say that there are cases when text is not the best way to incept ideas. So why should we be confined to just text when writing code? Should we not be free to choose the best tool for the job?
glass_of_water··on Making the whole web better, one canvas at a time
Canvas already uses double buffering. OffscreenCanvas lets you issue draw commands from a separate thread.
glass_of_water··on Making the whole web better, one canvas at a time
From my understanding, OffscreenCanvas and double buffering are unrelated. OffscreenCanvas just lets you execute draw calls in a separate thread (in a WebWorker). I believe the browser already uses double buffering under the hood for drawing to a canvas element.
glass_of_water··on Show HN: Time travel debugger for web development
Oh that's cool, using fork() to create checkpoints. Thank you again for taking the time to explain!
glass_of_water··on Show HN: Time travel debugger for web development
As bhackett confirmed, you're right about recording at the system library call level. I wasn't sure if it was more of an analogy or only referred to a version of Replay targeting backend servers written in other languages like Go, especially since the author mentioned hooking into the JS runtime in https://medium.com/replay-io/effective-determinism-54cc91f56.... But it looks like I misunderstood, and their browser product is their generic record/replay library integrated into Firefox, rather than a reimplementation of the same concepts.
glass_of_water··on Show HN: Time travel debugger for web development
Thanks for the explanation! Do you ever run into performance issues with replaying from the start on each backward step or is this not really in issue in practice? I imagine for most websites and short replays it's probably fine, but for something like a game with a physics engine it sounds like it would be too expensive and you'd need snapshots or something. I guess that's a super small percentage of the market though.

For question 3 on the ordering, I was imagining the following kind of scenario: one thread maybe calls a system library function to read a cursor position and another calls a system library function to write a cursor position. So even though they're separate functions, they interact with the same state. Do you require users to manually call to the recorder library to give the recorder runtime extra info in this kind of scenario? Sorry if this is a dumb question, I haven't really done any programming at this level.

glass_of_water··on Show HN: Time travel debugger for web development
I read the medium post (https://medium.com/replay-io/how-replay-works-5c9c29580c58), which gives an overview of how Replay works, but there are a few things I still don't understand.

1) How does the step backward functionality work? Do you take snapshots every so often of the Javascript environment? How do you handle destructive assignments?

2) Does Replay record actual syscalls made by the browser, or is it recording calls to the browser APIs by the javascript code (which I guess are effectively syscalls from the javascript code's perspective)?

3) The ordered lock technique described in https://medium.com/replay-io/recording-and-replaying-d6102af... makes sure that threads access a given resource in the same order, but what about threads accessing different resources in the same order? e.g. when recording, thread 1 accesses resource A before thread 2 accesses resource B. It seems like the ordered lock technique doesn't help you maintain that ordering in the replay. Is maintaining that kind of ordering across resources not actually necessary most of the time?

glass_of_water··on Show HN: Discover shared videos and live broadcasts from Reddit
I had the same issue; I think the error message is wrong. The reason it's not working is that tracking protection is blocking XHR requests to www.reddit.com. If you disable tracking protection or whitelist www.reddit.com it should work.
glass_of_water··on Google Is Not God of the Web
Would an animated SVG work? Might be the best of both worlds, faster user experience and probably a better score.
glass_of_water··on Perspective: Streaming Analytics via WebAssembly
Currently, WebAssembly doesn't can't directly call any of the browser APIs; it has to call back into javascript to make any network requests, make WebGL calls, read to/write from the DOM. Projects like wasm-bindgen make it look like you're directly calling browser APIs, but it's actually calling out to a Javascript shim.

I think this project's use case is that you have a fixed query, but the dataset over which you're running that query is changing over time (getting streaming updates). The wasm part is doing the work of running the query over the dataset and updating the query results as new data streams in. So the assumption is that rendering isn't the bottleneck, but running the query is.

glass_of_water··on Joe Rogan got ripped off
They didn't ignore that fact, they explicitly mentioned it in the article.

> Stern and Rogan are already super rich. The difference between $50mm/year of profit and $100mm means zero to their day-to-day lifestyle. What I imagine does matter to them is the size of their audience and their impact, and both made choices that will limit that forever.

glass_of_water··on Ask HN: How do I overcome mental laziness?
I wouldn't recommend playing games in an attempt to build mental endurance. I used to play a lot of Starcraft 2 and Dota 2, and it mostly just sapped my motivation for other things.
glass_of_water··on Rust Survey 2019 Results
If your requirement is compiling to native binaries, then perhaps dlang with GC enabled? Admittedly it would be a really poor choice in 2020 though given the lack of adoption. Golang is GCd and native, but of course the language is lacking in many ways compared to Rust.

So I guess you're right, nothing I can think of quite fills the niche that Rust does, if compiling to a native binary is a hard requirement. Also I'm not aware of any widely-adopted language with borrow checking, if that's a feature that's valuable for your use case.

glass_of_water··on Rust Survey 2019 Results
I also don't quite understand the appeal of Rust for applications that can tolerate a GC. Other than perhaps borrow checking, I don't see the benefits over statically-typed, GC languages.

I used to code a lot in C++, but I've come to the conclusion that manual memory management is a cost that has to be considered seriously. e.g. one burden is that when you're declaring a field on a struct in Rust, you have to consider whether it needs to be a reference, value, automatic reference counted, boxed, if its a reference, what the lifetime is, etc. The only thing I miss about manual memory management is the RAII pattern.

Rust moves down a level of abstraction that IMO is not useful for most applications.

glass_of_water··on Rust Survey 2019 Results
I agree that with the rapid change in the language, it's probably premature to standardize on one API for networking. But as a newcomer to Rust, it's really overwhelming when there are like 5 different async websocket libraries, none of which is a clear standard in the community, each with relatively sparse documentation (other than the method signatures/impls).

Also, I haven't been following the Go ecosystem lately, so I could be wrong, but they seem to have done a good job at creating standard libraries for common stuff like http serving, and those libraries seem to have aged just fine.

glass_of_water··on America's bailed-out airlines are not 'playing fair' with customers
But if a rare, global event like this happens and companies' emergency funds are mostly investments, isn't everyone going to try to liquidate their investments, crashing prices to a level where those investments aren't worth enough to keep them funded through the event?
glass_of_water··on Kubernetes 1.18
Could you elaborate on your what your stack looks like and what tools you use other than Guix? What made you choose Guix over Nix?
glass_of_water··on Federal Reserve pledges asset purchases with no limit to support markets
How does the fed determine which corporate bonds to buy and how much it's willing to pay for those bonds?
glass_of_water··on Effect of economic crisis on America’s small businesses [slides]
This appears to be an appeal by Womply to direct a ton of stimulus money toward them, so that they can make loans to small businesses (instead of the Small Business Administration), and then they can take a cut of that.
glass_of_water··on Google pushed to take action against Android bloatware
I think this is an issue with both iPhone and Android. I had an iPhone 6 that was bricked by an update, but was out of warranty, so I ended up getting a Pixel phone and have been pretty happy with it.
glass_of_water··on Hacking GitHub's Auth with Unicode's Turkish Dotless 'I'
Nit: did you mean opacity: 0?
glass_of_water··on Dr Sarah E. Hill: ‘A blind spot about how the pill influences women’s brains’
I think a 116F tub is above what most anyone could tolerate for 45 minutes.
glass_of_water··on Compensation in 2019 – new grad tech offers
Just to add a data point, I joined a FAANG company at one of their east coast offices and didn't get a signing bonus.
glass_of_water··on Compensation in 2019 – new grad tech offers
These numbers aren't exaggerated at all. If you're making $82k in NYC with almost 10 years of experience, you got massively lowballed by your current company. Have you interviewed around lately?
glass_of_water··on “Why was Rust chosen for Libra?” in congressional hearing [video]
Also, it's not just an issue of an intentionally backdoored compiler. The nightly could have some experimental optimization enabled, and if there's a bug in the optimization, it could introduce a vulnerability into the compiled Libra binaries.
Page 1 of 4Next →