Overall I love TypeScript. But sometimes it’s so frustrating…
No overload matches this call. Overload 1 of 2, '(queryKey: QueryKey, updater: Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverSuccessResult<...> | undefined, InfiniteQueryObserverLoadingErrorResult<...> | ... 3 more ... | undefined>, options?: SetDataOptions | undefined): [...][]', gave the following error. Argument of type '(chatPages: UseInfiniteQueryResult<Chat>) => { pages: any[]; pageParams: unknown[]; } | undefined' is not assignable to parameter of type 'Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryO...'. Type '(chatPages: UseInfiniteQueryResult<Chat>) => { pages: any[]; pageParams: unknown[]; } | undefined' is not assignable to type 'DataUpdateFunction<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | Inf...'. Types of parameters 'chatPages' and 'input' are incompatible. Type 'InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverS...' is not assignable to type 'UseInfiniteQueryResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown>'. Type 'undefined' is not assignable to type 'UseInfiniteQueryResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown>'. Overload 2 of 2, '(filters: QueryFilters, updater: Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverSuccessResult<...> | undefined, InfiniteQueryObserverLoadingErrorResult<...> | ... 3 more ... | undefined>, options?: SetDataOptions | undefined): [...][]', gave the following error. Type 'string[]' has no properties in common with type 'QueryFilters'.ts(2769)Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 22-Sep-2022 06:47:04 JST
Alex Gleason
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 22-Sep-2022 11:38:18 JST
Alex Gleason
I expect a stack trace. I don't expect a query plan. It needs one of those websites where you can paste the TypeScript error in and it tells you in English what's going on.
Anyway I fixed it, the two objects were indeed different. But it's like I Spy in that message! -
Embed this notice
Josh Adams (josh@social.rebased.network)'s status on Thursday, 22-Sep-2022 11:38:19 JST
Josh Adams
It doesn't look inscrutable, just like it's telling you a couple things it could have been but how far off each was -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 12:14:56 JST
ew
@NEETzsche @alex @josh productivity is better due to the tooling Alex Gleason likes this. -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 12:14:57 JST
NEETzsche
@e @alex @josh As though JavaScript weren't soyware enough. -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 12:14:58 JST
ew
@NEETzsche @alex @josh bonk -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 12:14:59 JST
NEETzsche
@alex @josh typescript is a meme -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 12:15:00 JST
ew
@NEETzsche @alex @josh
auto-generating your own admin interface
https://adminjs.co/
auto-generating your own api calls
https://www.the-guild.dev/graphql/codegen
auto-generating your own api layer
https://www.graphile.org/postgraphile/
auto-generating your own validation layers
https://www.npmjs.com/package/typescript-json-schema
auto-generating typed sql calls
https://github.com/adelsz/pgtyped
I can keep going lolAlex Gleason likes this. -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 12:15:01 JST
NEETzsche
@e @alex @josh it really isn't lmfao In conversation permalink Alex Gleason repeated this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 22-Sep-2022 12:15:52 JST
Alex Gleason
I want to see your repo of what you're building. In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 12:18:48 JST
ew
@alex @NEETzsche @josh I'll get a repo up this weekend In conversation permalink Alex Gleason likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 22-Sep-2022 12:20:21 JST
Alex Gleason
Yeah that's after you're already running the code. TS tells you inside the text editor with hover tooltips. It really is pretty amazing. In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 12:20:22 JST
NEETzsche
@e @alex @josh You know what else will bitch at you if you try to select a column that doesn't exist? The database. In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 12:20:23 JST
NEETzsche
@e @alex @josh "my implementation of X uses/is built for typescript therefore typescript is a necessary productivity increaser"
Should I start listing my favorite Ruby gems to prove how much more productive I am for using itIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 12:20:23 JST
ew
@NEETzsche @alex @josh due to typescript and graphql, if I code a graphql query that's like `{ users { name }` which is effectively the same as the sql query `select name from users` and the name column doesn't exist on my database my linter will bitch at me that the field is invalid.
I basically get to write database calls on my frontend and get them validated like sql ones directly in a sql command lineIn conversation permalink -
Embed this notice
Josh Adams (josh@social.rebased.network)'s status on Thursday, 22-Sep-2022 12:28:59 JST
Josh Adams
Look dude I want people writing elm you're preaching to the choir In conversation permalink Alex Gleason likes this. -
Embed this notice
Caek Islove ? ❤️ (caekislove@gleasonator.com)'s status on Thursday, 22-Sep-2022 12:29:25 JST
Caek Islove ? ❤️
Exactly. Typescript is a way for Junior Developers to automatically elevate their bugs to Senior Developers who actually know JavaScript. In conversation permalink Alex Gleason likes this. -
Embed this notice
Caek Islove ? ❤️ (caekislove@gleasonator.com)'s status on Thursday, 22-Sep-2022 12:33:05 JST
Caek Islove ? ❤️
Real men code in pure JavaScript! ? In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 22-Sep-2022 12:33:05 JST
Alex Gleason
Real men prefer to console.log 40 times instead of the text editor just telling them what's in that variable. In conversation permalink Attachments
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 22-Sep-2022 13:58:46 JST
Alex Gleason
Yeah, but the developer experience is substantially better. You don't have to memorize so much anymore. That frees your brain to think about other things. In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:48 JST
ew
@NEETzsche @roboneko @alex @josh you're deliberating ignoring the question of scale. it's pretty easy to do "type shit in, other people can see it" when you're dealing with a few hundred network requests In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:58:48 JST
NEETzsche
@e It isn't a question of scale. You and Alex just got done justifying your bloat on things like a GraphQL linter and a better IDE experience. It's about having six gorillion times as much system resources, but lacking the vision to do something with it other than make the task of writing software already written easier.
It's bloat soyware. Straight up.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:58:49 JST
NEETzsche
@e Consider the following: the point that you're trying so desperately to dodge is that the entire program, all of it, the whole stack, the entire thing, needs to either do something a lot more significant than a variation on "type shit in, other people see it," or, and get this, it needs to confirm to 1990s standards of system resource consumption.
If it doesn't?
Anything in excess of that is definitionally bloat.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:52 JST
ew
@NEETzsche @alex @josh @roboneko err unused ram* my dyslexia kicking in In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:53 JST
ew
@NEETzsche @roboneko @alex @josh unwasted ram is unwasted ram that just sits there doing nothing costing money In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:53 JST
ew
@NEETzsche @alex @josh @roboneko wasted ram* In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:58:54 JST
NEETzsche
@e We... literally just covered this.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:55 JST
ew
@NEETzsche @roboneko @alex @josh all that ram usage on the server is taken up by the database indexes not the programming language In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:56 JST
ew
@NEETzsche @roboneko @alex @josh we are not using 16gb to run a web browser tab In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:58:56 JST
NEETzsche
@e We are using much more than that to run the servers that process those messages.
Something that's just as bad.
Considering
We
Had
Servers
With
Less
Resources
Than
Our
Phones
Today
By
Multiple
Orders
Of
Magnitude
And
They
Worked
Just
Fine
Are you... starting to comprehend the issue yet?
@roboneko @alex @joshIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:58:57 JST
NEETzsche
@e Exactly. And yet here we are.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:58 JST
ew
@NEETzsche @roboneko @alex @josh it doesn't take 16gb of ram to do that In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:58:59 JST
ew
@NEETzsche @roboneko @alex @josh phones have 16gb of ram these days In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:58:59 JST
NEETzsche
@e k
That's not an argument for using up 16 GB of RAM on a variation of "type shit in, other people see it."
@roboneko @alex @joshIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:00 JST
NEETzsche
@e Not really. The yardstick was actually set in the 1990s. All system resource usage in excess of past implementations that worked is by definition bloat. The use case is "type your shit in, other people see it." We had that in the 1990s.
We use up multiple orders of magnitude more system resources to accomplish this simple task today than we did then, and all we're doing is the same thing: typing shit in so others can see it.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:01 JST
ew
@NEETzsche @roboneko @alex @josh >So you're saying that we need to start getting rid of databases so that we can reduce the system resource requirements for running a server that handles "type shit in, other people see it" back to what they were in the 1990s?
ok you're just trolling meIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:02 JST
ew
@NEETzsche @roboneko @alex @josh dude you have to be trolling. javascript is fast enough to do api calls. what's not fast is doing a bunch of relational table joins that you wouldn't have to do otherwise In conversation permalink Attachments
-
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:02 JST
NEETzsche
@e "it's not the scripting language, it's the db" really is the weakest argument ever when it comes to this topic. So you're saying that we need to start getting rid of databases so that we can reduce the system resource requirements for running a server that handles "type shit in, other people see it" back to what they were in the 1990s? Is that your big contention? Because that's a really bad contention.
Okay so I'll give you -3% on my final grade for failing to explicitly mention databases in your soy bloatware stack. Final grade: 97% or A+.
In conclusion, these tools do not improve performance or productivity because the system requirements yardstick for "type shit in, other people see it" and variants was established in the 1990s and is significantly less than what you can get for a $5/mo VPS.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:04 JST
ew
@NEETzsche @roboneko @alex @josh if you want to talk about protocols, graphql is leaner and what I've been trying to tell you but you dismiss it even if it saves a ton of db calls In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:04 JST
NEETzsche
@e >my bloatware is using up a ton of system resources to do something that was done on a Pentium II no problem
>maybe if I add a little soyware to my bloatware it'll make it run slightly faster...
@roboneko @alex @joshIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:05 JST
NEETzsche
@e "or"
This got addressed before you responded.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:06 JST
NEETzsche
@e This... doesn't even approach refuting my point.
@roboneko @alex @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:06 JST
ew
@NEETzsche @roboneko @alex @josh you brought up 1kb payloads like they don't matter. they do matter, it has nothing to do with string parsing performance, it has to do with the db calls to generate that 1kb payload. In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:07 JST
ew
@NEETzsche @roboneko @alex @josh it's more than likely it's the db calls that prevent scaling In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:08 JST
ew
@NEETzsche @roboneko @alex @josh >under 1kb
that's not the issue. the issue is the unnecessary db calls to generate that response dataIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:08 JST
NEETzsche
@e "or the soyware scripting language your server runs requires a supercomputer to do string manipulation"
@roboneko @alex @joshIn conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:09 JST
NEETzsche
@roboneko Except unironically. This message content I'm sending you is under 1KB so if it takes more than 1s to transfer to you on my 14400 baud modern it's because your protocol is bloated or the soyware scripting language your server runs requires a supercomputer to do string manipulation.
@alex @e @joshIn conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:10 JST
ew
@NEETzsche @alex @josh ok well enjoy hunting down bugs. if I change a datatype in my code I don't have to go hunt down every changed instance my linter will just error In conversation permalink -
Embed this notice
Neko McCatface v2023 :verified::makemeneko: (roboneko@bae.st)'s status on Thursday, 22-Sep-2022 13:59:10 JST
Neko McCatface v2023 :verified::makemeneko:
@e @alex @NEETzsche @josh no man u don't get it should do everything in a combination of C89 and forth the way God intended. if you haven't rolled your own https implementation in assembler then you really need to git gud In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:11 JST
NEETzsche
@e Because I don’t need to. There are two ways to argue for “technologies” that actually matter:
- Show me something it can do that previous languages/frameworks can’t (rearranging “patterns” and data/object structures doesn’t count)
- Improve performance in terms of CPU usage and memory footprint
Basically everything else is bullshit
In conversation permalink -
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:12 JST
ew
@NEETzsche @alex @marine @josh >a problem that has been thoroughly solved for two decades at a minimum.
you have a lot of opinions but you're not even willing to look into this stuff
https://relay.dev/docs/principles-and-architecture/thinking-in-graphql/
https://relay.dev/docs/principles-and-architecture/thinking-in-relay/In conversation permalink Attachments
-
Embed this notice
ew (e@masochi.st)'s status on Thursday, 22-Sep-2022 13:59:13 JST
ew
@NEETzsche @alex @josh actually I linked to two of those that are typescript based but I thought we were also talking about javascript In conversation permalink Attachments
-
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:13 JST
NEETzsche
@e @alex @josh My point is that all of this soyware that purports to increase productivity has a rather flimsy argument for it actually being the case. Especially since you can make the same arguments with things that are no longer the new hotness and haven't been in years, like Rails. It's just a variation on the framework treadmill from a decade ago, except this time it's programmers trying to get ever more abstracted and removed from the metal without really implementing anything new.
I just got out of a conversation with @marine about an idea of hers that actually qualifies as new and none of these "technologies" are going to help her with it because all these "technologies" do is permute on CRUD, a problem that has been thoroughly solved for two decades at a minimum.In conversation permalink -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Thursday, 22-Sep-2022 13:59:14 JST
NEETzsche
@e @alex @josh none of that requires typescript lol In conversation permalink
-
Embed this notice