glass_of_water's comments

glass_of_water | 11 months ago | 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 | 2 years ago | 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 | 3 years ago | 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 | 3 years ago | 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 | 4 years ago | 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 | 4 years ago | 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 | 4 years ago | 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 | 4 years ago | 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 | 5 years ago | 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 | 5 years ago | 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 | 5 years ago | 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 | 5 years ago | 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 | 5 years ago | 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.

page 1