Hacker Newsnew | past | comments | ask | show | jobs | submit | yuchi's commentslogin

Claude Design was/is absolutely brilliant. The embedded skill in work and code is capable but the experience of Claude design was so much cleaner.


Sorry, curious non-native speaker here. Which accent? And which telling patterns made you think of it?


Not the person you're responding to, but as soon as I read stuff like "I trained tiny network" I tend to imagine Russian. It's the missing "a". Same thing happens in "I'm speaking with heavy accent".


I'm not a native speaker but my inner voice also switched to Russian accent very quickly!


Missing articles in English is the usual give away for someone with a slavic native language such as Russian.


I'm native Hungarian speaker, and the giveaway is the exact opposite: more definitive articles than it should be. We use that way more often in Hungarian than in English, and we are really bad with it.


Missed opportunity of intentionally introducing a few extra in this comment


I loved them and I placed them a lot in my designs — if you also include my love for em dashes you can well understand that I feel my own character has become a clanker…


Em dashes got taken from me as a result of Chat. I used them all the time now I can't without it making people pause to think I'm a bot. Still a bit annoyed or sad about that tbh.


I pivoted to using -- or --- instead, shows I'm not a bot and has the same effect.


I still remember when ngrok came out. The experience was more or less the same.

It’s interesting that 10 (more?) years later the product has not evolved and, apparently, hasn’t found a way to finance itself without removing the pure free tunneling option.


I’ve been tinkering with a game engine where magic is made of first principles for a very long time. Cannot wait to see the gameplay and mechanics here!


i've been doing something similar and decided to stick with godot.

have you found yourself constrained with engine boilerplate or do you feel like you are making good progress on the magic system?


Only working on the magic system itself, unfortunately making the game around the mechanics is not something I enjoy, so I have been implementing different approaches with some minimal debugging UI. Did not reach the need for an actual game engine


Those are parasitic memes, that bring no value to the host. There are many such memes in apes world too.


I just lost the game.


OOT, but this website design is fabulous, the only thing is the font size just a bit too small. That header sticky effect on mobile is chef’s kiss


Got goose bumps, exactly as the first time reading this. Thanks for sharing


While the reasoning holds generally, that specific example is wrong. The type the author presents is not the “User Profile” but a “User Profile Load Resource” (or something in those terms).

When you actually design interfaces you discover that there are way more states to keep in mind when implementing asynchronous loading.

1. There’s an initial state, where fetching has not happened yet

2. There may be initial cached (stale or not) data

3. Once loaded the data could be revalidated / refreshed

So the assumption that you either are loading XOR have data XOR have an error does not hold. You could have data, an error from the last revalidation, and be loading (revalidating).


Yup, it's quite rare that ADTs (or Rust enums) are so clear cut and obvious.

The idea that the data model looks like

   enum XYZ {
      case A(B, C, D, E);
      case F(G, H, I, J, K);
      case L();
      case M(N, O);
   }
is just not true in practice.

I think messaging is one case where it can happen, but even there it's often good to combine fields and share them (and common code) over multiple types of messages. If Messages A and B both have a field "creationTime" or whatever (with identical semantics), it's probably a bad idea to model them as separate fields, because that leads to code duplication, which is unmaintainable.

Maybe I can be more precise by proclaiming that ADTs can be good to be clear what's "there", so they can be used to "send" information. But to write any useful usage code, typically a different representation that folds common things into common places is needed. And it might just happen that field F is valid in cases A and B but not C. That's life! Reality is not a tree but a graph.

That's why it's a bad idea to try and model the exact set of possible states and rule out everything else completely in the type system. Even the most complicated type systems can only deal with the simple cases, and will fail and make a horrible mess at the more complicated ones.

So I'm saying, there is value to preventing some misuse and preventing invalid states, but it comes at a cost that one has to understand. As so often, it's all about moderation. One should avoid fancy type system things in general because those create dependency chains throughout the codebase. Data, and consequently data types (including function signatures) is visible at the intersection of modules, so that's why it's so easy to create unmaintainable messes by relying on type systems too much. When it's possible to make a usable API with simple types (almost always), that's what you should do.


> that specific example is wrong

This will be discovered at compile time if you use immutability & types like the article suggests.

> So the assumption that you either are loading XOR have data XOR have an error does not hold.

If you design render() to take actual Userdata, not LoadingUserdata, then you simply cannot call render if it's not loaded.

The way to produce unspecified behaviour is to enable nulls and mutability. Userdata{..} changing from unloaded to loaded means your render() is now dynamically typed and does indeed hit way more states than anticipated.


As good as a script element with type application/json.


I wonder if the browser would attempt to validate the contents of a script tag with type json, versus treating it as a blob that would only be validated when parsed/used. And any performance overhead at load time for doing so. Not at a machine at the moment so I can't verify.


well one difference is that application/json scripts are still subject to CSP policies


How so? I don't remember ever having seen issues with this. If anything CSP steers you towards this (instead of inline scripts directly assigning to JS variables)


I thought I knew but it seems that the CSP story is unclear. I couldn't find an authoritative source for either position


CSP blocks execution/inclusion, but since json does not execute and any json mimetype will not do execution there is no problem.

Any CSP-allowed other script can read that application/json script tag and decode it, but it is no different than reading any other data it has access to like any other html element or attribute.


That makes sense, thank you


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: