Better HN
topnewbestaskshowjobs
Log inSign up

cachehit

6,998 karma · joined Dec 14, 2008 (17y ago) · 1,808 submissions

(Account pending deletion)
Submissions

comment 3y ago · link · parent

There's a big discussion about this: https://github.com/microsoft/TypeScript/issues/1897. The benefit seems extremely limited to me. Valid JSON is obviously a subset of `any`, but I can't think of a situation where that particular specificity provides any value. Can you?

comment 3y ago · link · parent

You might like TS Reset: https://github.com/total-typescript/ts-reset, which fixes this particular problem. I don't personally find it to be a big issue though.

Regarding runtime type checking, if you were to write something that can handle the total space of possible TS types, you would end up with incredibly complex machinery. It would be hard to make it perform, both in terms of speed and bundle size, and it would be hard to predict. I think Zod or perhaps https://arktype.io/ which target a reasonable subset are the only way to go.

comment 3y ago · link · parent

This resembles my feelings towards Tom Cruise. I always thought of him as an action star and nothing more (well, a Scientology-kook as well, but that detracted further). But his performance in Magnolia was so convincing to me that I started seeing his acting skills in a different light.

comment 3y ago · link · parent

Good point.

comment 3y ago · link · parent

Well, the software that I generated it with says it's "brainwaves".

I remember reading up on it back in the day and I couldn't figure out if it was woo woo or something with proper scientific backing. I have since then tried a number of apps that claim to do the same but which don't work for me. This piece of audio works for me, so that's why I keep it around :-)

comment 3y ago · link · parent

I generated this 15 minutes audio file 20 years ago and it's still my go-to for quick meditation breaks. It never fails to put me into a trance.

[link redacted]

comment 3y ago · link · parent

Yeah.

Without being familiar with the Postgres source, this seems to be what I call a "somersault problem": hard to break down into sub-goals. I have heard that the Postgres codebase is solid which makes it easier but it's still mature and highly complex. It doesn't sound feasible to me.

[link redacted]

comment 3y ago · link · parent

Is "F2 for rename" patented?

comment 3y ago · link · parent

>Alt tab: press cmd-tab to cycle applications, then cmd-` to cycle windows of that application. This typically has better number-of-keypress to get the window you want compared to Windows alt-tab which requires iterating over all windows in the worst case.

In the case where you need to switch to a window that you haven't been using for a while, perhaps. But switching back and forth on the other hand, is infuriating because the z-order is polluted. And I also find it incredibly frustrating that all the other windows are brought to the top just because they happen to share a process.

comment 3y ago · link · parent

GP clearly shows why it is. I think SQL is great but their point is spot on.

comment 3y ago · link · parent

It looks neat but I am still not sure what the appeal is exactly. Is it cost reduction?

comment 3y ago · link · parent

SQLite seems to be gaining popularity with even larger projects which is surprising to me. As I see it, the big value prop of SQLite is that it runs in-process which, for a webapp, is almost nil?

Other than that, it's not like queries are any simpler and the "simple" type system is, in my opinion, not a feature. I get that some might disagree with that.

Is there some other reason why you would prefer it?

comment 3y ago · link · parent

I think the victims will mostly be the users of the software. The personal assistant that can handle your calendar and emails and all would be able to do real damage.

comment 3y ago · link · parent

>At that point, prompt injection is no-longer an issue [...]

As far as input goes, yes. But I am more worried about agents that can take actions that affect the outside world, like sending emails on your behalf.

comment 3y ago · link · parent

Would you then also force developers to stick with the very limited set of native components, or are they allowed to make custom ones?

comment 3y ago · link · parent

It's true that there can be gotcha's in code which should be documented, but I don't think forcing a template on people is the solution. In fact, I wouldn't expect people to be better at documenting them with that in place.

comment 3y ago · link · parent

I'm trying your extension out and it looks promising.

A tiny bit of feedback: the shortcut key is defined in settings, not keybindings which seems wrong? Also, the default is to override cmd+. which is an important shortcut already..

comment 3y ago · link · parent

Are you speaking on behalf of the user or the developer here? And, as a native English speaker or not?

I have definitely seen my fair share of quirky texts in Danish UI's. It's not the end of the world but something that can clearly be improved.

comment 3y ago · link · parent

The orange album has been my preferred morning music for almost 20 years by now. I can't thank her (them) enough for that piece of art.

comment 3y ago · link · parent

>every user is a racist transphobe nazi homophobe enemy.

Nobody on Reddit has called me any of those things.

comment 3y ago · link · parent

>80k USD a year is a ton by European standards

I can't speak to all of Europe but tech wages are significantly higher here in Denmark.

comment 3y ago · link · parent

I guess you and I disagree on what "make sense" entails.

comment 3y ago · link · parent

>These lawsuits make no sense

Do you mean legally? Because ethically, I think they make perfect sense. And I would think similar about going after fast food companies and possibly other industries.

comment 3y ago · link · parent

Indeed, but I can't delete it now. Oh well, thanks for the heads up!

comment 3y ago · link · parent

I'll just quickly plug Kanel ([link redacted]) which I use to generate Typescript types from a Postgres database. I agree with the author to think migrations-first, though I prefer to write them in SQL to ensure I can utilize all the powerful features that Postgres has to offer.

With it, I only get types for the tables and views etc., so any join will be untyped if done client-side. This is still a big win in my opinion, and I much prefer it to normal ORM's.

comment 3y ago · link · parent

Hah, my perspective is the exact opposite!

On Windows, there is a nicely and predictably maintained Z-order, whereas MacOS insists that if I want to switch focus, surely I want all the windows that the other app has to offer, which feels like a big "mishmash" to me.

comment 3y ago · link · parent

I've been using MacOS for over 10 years by now and I still consider it vastly inferior in this regard. I recently started using alt-tab which does a pretty good job at mimicking Windows but it's slightly buggy and introduces a tiny but noticeable delay which is a constant source of frustration to me.

comment 3y ago · link · parent

>It's so frustrating to yearn for basic features in VSCode only to be ignored for years

What is a "basic feature" to you is apparently not that to most people, certainly not to me. Just how important could it be to resize the tab height? And what would vertical tabs do that the open editors panel doesn't? I also don't follow regarding the menu bar -- that's the way all apps behave on MacOS? You can put it into fullscreen mode if you want.

comment 3y ago · link · parent

Here in Denmark we had negative electricity prices over the weekend. Its a surreal feeling: suddenly, turning on all the equipment is good, and not just financially -- the energy was coming mostly from wind and solar, so it wasn't even a bad thing from a carbon footprint perspective.

comment 3y ago · link · parent

There are popovers everywhere already, so it's not like this is going to introduce them, it will just make it more likely that they close they way you expect them to, handle focus correctly etc. I think it's great.

Also, this change will make it easier to make a popover-blocker than it was before.

1
121314
61