HNHacker News
TopNewBestAskShowJobs

gr__or

434 karma · joined May 11, 2017

https://bsky.app/profile/watwa.re
submissionscomments
gr__or··on Meta Horizon OS
Yeah it's kind of mind-boggling to me that the creators of React (which SwiftUI is ofc heavily inspired by) and the most successful cross-platform quasi-native library (React Native), have not managed to bring those powers to their biggest investment.

I truly don't get it.

gr__or··on Go's Error Handling Is Perfect
Just as a point of fair comparison, here is their prompt for CSV parsing in Rust (brought to you by Gemini):

  use std::error::Error;
  use csv::Reader;
  use reqwest::Client;
  use serde_json::Value;
  
  #[tokio::main]
  async fn main() -> Result<(), Box<dyn Error>> {
      // Define the CSV file path
      let file_path = "data.csv";
  
      // Open the CSV reader
      let mut reader = Reader::from_path(file_path)?;

      // Create a new HTTP client
      let client = Client::new();

      // Iterate over each record in the CSV
      for record in reader.records() {
          let record = record?;

          // Get the value from the first column
          let url = record[0].to_string();

          // Perform GET request
          let response = client.get(&url).send().await?;

          // Check for successful response
          if response.status().is_success() {
              // Read response body
              let body = response.text().await?;

              // Parse JSON
              let json: Value = serde_json::from_str(&body)?;

              // Process the parsed JSON (e.g., print it)
              println!("JSON for URL {}: {}", url, json);
          } else {
              eprintln!("Error fetching URL: {}", url);
          }
      }

      Ok(())
  }

The thing that makes it perfect in Rust, that you can keep the above for a simple script, but if you want to solidify it you just think about how you want to handle the `?`-annotated spots (retries, error-repacking, panics, etc.)
gr__or··on Ask HN: What non-AI products are you working on?
After[0] several[1] experiments[2] in structured code editing[3] (to list a few) I'm now ready to take a bigger stab at it and am working on coding environment/lang where UI is also a primitive of the language. Early days, but happy to chat if someone is curious.

[0]: https://dflate.io/shady-phoney

[1]: https://dflate.io/vscode-soy

[2]: https://dflate.io/state-of-tofu

[3]: https://dflate.io/code-is-not-just-text

gr__or··on Apple Vision Pro review: magic, until it's not
The battery is external, i.e. already next to you anyway, so plugging in power is rather simple. You could also have multiple batteries with you, though I don't know the price of an additional battery.
gr__or··on The Intellectual We Deserve (2018)
Joscha Bach came to my mind, as a sort of anti-Peterson. Deeply materialistic, systematic though also not easy to grok. I think he's making sense, but at times he alludes me.
gr__or··on Chrome experimental AI features
Kind of amazing how unable to deliver Google seems to be here. Looking at Arc, a new player, and the kind of AI features they came up with, this here looks more like features developed by McKinsey rather than by someone with domain knowledge.
gr__or··on Spotube: Open-source Spotify-Youtube client
It should probably be said that the cuts artists get from the streamers are seen as insufficient and that platforms where you give more directly to artists, like BandCamp, are a better way to support artists you like.
gr__or··on Changes we're making to Google Assistant
I think there's a line worth drawing here: Pre-LLM voice interfaces required you to guess the command(s) the designer of the thinking were having in mind for the action you want to perform. With LLMs you can be 10ft into human-level vaguery and metaphorism and your intent might still survive.

So the difference wrt discovery is that you only have to gesture at what you wanna do and, if a matching action exists, there is a chance it will be understood.

I'd wager we'll see a renaissance of voice assistants with LLMs, especially once the good-enough ones can run on device.

gr__or··on Continue will generate, refactor, and explain entire sections of code
That doc-string generation part in their video is a hilarious example how to write bad comments
gr__or··on Ask HN: What apps have you created for your own use?
I started building my own code editor, but cut scope and kept it limited to sth like a total key action conversion mod for JS programming:

https://dflate.io/state-of-tofu

I then further cut scope and extracted a few useful actions into a less revolutionary but more well rounded vscode extension

https://dflate.io/vscode-soy

It also inspired me to take the learnings and build a mobile code editor for shaders

https://dflate.io/shady-phoney

gr__or··on 15 years ago, I helped design Google Maps
It's not missing it, it's called "Layers" and they can highlight transit, traffic and biking.
gr__or··on Italy to seize $835M from Airbnb in tax evasion inquiry
There is a funny circularity here. Blaming them is part of, or the beginning of, the consequences.
gr__or··on Use YouTube to improve your English pronunciation
While I strive to hide my German accent, and regularly attempt making my various english accents more specific, I simultaneously hold that there is glory to European English, or, probably more importantly, for example Indian English. The site would feel more progressive if it included those.
gr__or··on Detroit wants to be the first big American city to tax land value
Implementation is also the only aspect that makes me question LVT, otherwise I'm pretty much sold (not an unimportant aspect it is).

Wrt "even ones in which the tenants built the house": For me the baseline of implementing LVT is that ppl don't have to pay it for their primary housing (or a much lowered version of it). Is that controversial?

gr__or··on Pixel 8 Pro
500€ for my iPhone 13 Pro 128gb from Apple's trade-in partner here in Germany.
gr__or··on They studied dishonesty – Was their work a lie?
https://smallpotatoes.paulbloom.net/p/psychology-is-ok
gr__or··on Text editing on mobile: the invisible problem
Ima use this opportunity to advertise that I'm working on a mobile shader editor, an area even less adopted to the form factor and am using my structured code editing research[1] to smoothen the experience.

The post echoed many of my frustrations and inspired me to consider adopting the fisheye-zoom to my editor.

I'm looking for people interested in doing shader programming on the go to try this early version, hit me up if you are interested shade@dflate.io

[1]: https://dflate.io/state-of-tofu

gr__or··on TypeScript is surprisingly ok for compilers
Very much apropos:

Going between Rust and TS it is painfully obvious how much sth like tagged enums are missing, which can also be seen in this post.

I know of this [1] proposal for ADT enums which looks like it has stalled. Anyone know of other efforts?

[1] https://github.com/Jack-Works/proposal-enum/discussions/19

gr__or··on Things you forgot (or never knew) because of React
Neat, thanks for the link!

I vaguely remember my colleague having a reason for why his abstraction did not fit in the computed box. Probably something related to async, so it might very well have been because of that

gr__or··on Things you forgot (or never knew) because of React
Huh interesting, do you happen to have a link that goes into cycle detection? If it comes with MobX out-of-the-box, I can say that it did not seem to have kicked in for our use cases (but maybe it's an opt-in?)
gr__or··on Things you forgot (or never knew) because of React
> The problem with React is that behaves very differently from all of your code. With most functions that contain closures with them, the function when called runs once and the closures run zero or more times.

I don't think I agree with that generalization. I probably could not even make a generalization about what normal closur-ing does or should look like.

> In a mutable framework that really pays attention to all these details (like MobX) there is a consistent model to how things work. So not only is state management way easier, its also on average less prone to these kind of issues.

My experience with MobX and the greater observable-industrial-signal-complex is that accidental loopiness very much can and does still happen. I have seen codebases with complex MobX computed-changes-graphs that senior engineers were clever enough to write but not to debug. And I was not aware of tooling which helped keep these graphs in line.

That said, I agree React's hooks have friction to them. I just tend to be in the camp of "I prefer my computational change graphs to be gated by a bit more boilerplate".

gr__or··on Things you forgot (or never knew) because of React
I'm right now only finding this one, not sure if some older tweets are gone. I remember him as someone who does more anti-marketing than furthering discussions.

https://twitter.com/slightlylate/status/1595328476956876800

gr__or··on Things you forgot (or never knew) because of React
I found this a frustrating and misleading post:

1. Starts talking about empiricism, does not actually deliver on it

2. Talks a lot about how React-things are old-actually, and then talks about signals and two-way data-binding as if there wasn't a time before React where these things were also pushed. React's non-adoption is not an accident I think, and these kind of posts would be more interesting if they would leave the surface-attacks and actually engage with the philosophy behind React's approach[1].

3. Quoting Alex Russel suggests you are more interested in heat than light (which is what he is known for where I'm from)

4. Distorted guitars are good actually.

[1]: https://gist.github.com/sebmarkbage/a5ef436427437a9840867210...

gr__or··on Expo – Open-source platform for making universal apps for Android, iOS, and web
Don't confuse HN bleeding edge hipser tech with the real world. The world of react-alternatives is fragmented and lib-incomplete, React still gets more installed than its most popular rivals combined[1].

I have worked across these frameworks and React is the only one where I find the lib ecosystem satisfiyingly large (and still growing most steadily).

[1] https://npmtrends.com/@angular/core-vs-react-vs-solid-js-vs-...

gr__or··on Over the past 21 months I’ve written a code editor from the ground up
I'ma use this as an opportunity to plug my own AST mode project: https://twitter.com/watware/status/1607026712755458055
gr__or··on Twitter's anti-Mastodon filter evasion
You can follow hashtags on Mastodon, it's been added ~3 weeks ago:

https://nerdschalk.com/how-to-follow-a-hashtag-on-mastodon/

gr__or··on Tailwind is a leaky abstraction
I recall there being Stylelint rules for linting against hardcoded values. I can't seem to find the link rn though.
gr__or··on SwiftUI Is Convenient, but Slow
Wondering if this is related: In MacOS Ventura navigating around settings has become VISIBLY slow. Seconds can pass between clicking a settings option and its contents being rendered. Kind of fascinating that it got released like this at Apple.

That said it's only slow to load, it does not freeze or stutter. I guess that's still an upside to what it would've looked like under Windows or Linux.

gr__or··on I/O is no longer the bottleneck
As a dev who operates fairly far away from hardware usually, is that similar to what the PS5 is doing?
gr__or··on Is Turbopack really 10x faster than Vite?
I think you're underestimating the effort needed for parallelization here. Deno is written in a language that was built for "fearless concurrency" (Rust), whereas Bun is written in a language that barely has a concurrency story (Zig)
← PreviousPage 3 of 6Next →