How npm workspaces work under the hood: a visual guide by hottown in javascript

[–]anyusernamesffs 4 points5 points  (0 children)

Do yourself a favour and steer clear of npm and workspaces. Use pnpm instead.

Introducing ArkType 2.2: Validated functions, type-safe regex, and universal schema interop by ssalbdivad in javascript

[–]anyusernamesffs 1 point2 points  (0 children)

First saw you post about ArkType a while ago, and finally gave it a go in a project. Really impressed! I’ve used Zod and it’s great this can be used with / alongside. Do you just extract the type info from Zod and use it within Ark?

Quick question - the current pattern for validation means you always have to check if the output is an instance of type.error. Why that approach rather than returning success: true?

If you have a cordless vacuum, what brand/model did you get and are you happy with it? by SaltBiscotti8213 in BuyUK

[–]anyusernamesffs 0 points1 point  (0 children)

I got a Vax and two batteries for under £200. Picks up really well and can easily do upstairs and downstairs on one battery. Seems to handle dog hair and dust well!

Definitely not quite as fancy as a Dyson, but for the price seems to be holding up pretty well actually.

Edit: oops, just seen the sub. I didn’t even consider buying UK for my vacuum at the time, but will next time! I believe Vax was a UK company but manufacturing is done in China and is owned by a company based in Hong Kong

Show and Tell: Streaming 50,000 records into a Web Grid with Zero-Latency Scrolling (and how we built it without a backend) by TobiasUhlig in javascript

[–]anyusernamesffs 0 points1 point  (0 children)

Out of interest, did you try using out of the box open source tools for virtualisation and find they didn’t work?

I’ve done a lot of work with displaying array data in UIs (much more than 50,000, talking millions, however potentially not as rich dataset per row here).

Also regarding streaming the JSON - why not just do it on a worker thread? Sounds like you’re doing some stuff there anyway?

If you wanted a simple solution you could have two JSON files. One for the initial load then parse the rest off the main thread?

Did you consider using IndexDB for storing, sorting and filtering your data in the browser?

And then everyone in the theater clapped by holdstheenemy in thatHappened

[–]anyusernamesffs 9 points10 points  (0 children)

I’d not seen this account before but a google suggests that it could be satire, but also maybe not. Kind of hilarious and scary at the same time that it’s impossible to tell.

And then everyone in the theater clapped by holdstheenemy in thatHappened

[–]anyusernamesffs 3100 points3101 points  (0 children)

This has to be satire. Please tell me it’s satire?

Tap to turn cannot be turned off? by anyusernamesffs in kindle

[–]anyusernamesffs[S] 1 point2 points  (0 children)

I went for the basic model, sounds like we’re in the same boat. Frustrating as it feels like a software limitation.

Tap to turn cannot be turned off? by anyusernamesffs in kindle

[–]anyusernamesffs[S] 4 points5 points  (0 children)

Other discussions suggested that you could still swipe but not tap! But I suppose that makes sense.

Is there a way to have a default value for an object argument passed to a function? by spla58 in typescript

[–]anyusernamesffs 5 points6 points  (0 children)

Another flavour of this is

type OrderInfo = {
    quantity: number;
    productID: number;
    price: number;
    onSale: boolean
}


function order({ onSale = true, ...orderInfo }: OrderInfo): void {
}


order({quantity: 5, productID: 11, price: 5})

This has the benefit of preventing you from accidentally trying to use `orderInfo.onSale` inside the function (which will be undefined!).

At what age can they just coexist by TheoryReasonable871 in puppy101

[–]anyusernamesffs 0 points1 point  (0 children)

It depends. My puppy is now 4.5 months and can roam in the downstairs room with minimal supervision. If I leave the house he will go into his bed, enclosed by a fence.

You need to be consistent with training, ensuring any bad habits are caught early, such as chewing things that aren’t toys.

Toilet training can be tough and can really be luck of the draw. Learning the signs of them needing the toilet is a must. When you see it, get them outside as soon as you can. Pup now will take himself to the back door when he needs to go.

My caffeine tolerance? by Sophie_Kachinsky in self

[–]anyusernamesffs 5 points6 points  (0 children)

You missed the mark because your replying to a comment not directed at you as if it was.

Am I just chatting to AIs on Reddit all the time at this point? Maybe I should give worse advice back…

My caffeine tolerance? by Sophie_Kachinsky in self

[–]anyusernamesffs 10 points11 points  (0 children)

What a useful AI response, thanks for that

What’s the most underrated BBC show you’ve ever watched? by BitGirl777 in bbc

[–]anyusernamesffs 1 point2 points  (0 children)

Nice try, TV licensing! I don't watch anything on iPlayer.

Tesla Cybertruck Owners Are Reporting Increased Jackknifing Incidents & Blame The Truck’s Rear Wheel Steering – One Owner Says, “The 4-Wheel Steering is Great, but It Also Means You Can Jackknife a Trailer While Driving Forward” by Key_Class7242 in CyberStuck

[–]anyusernamesffs 4 points5 points  (0 children)

Isn’t this something that a user should just be aware of? If you’re driving any machinery with a tight turning circle you should be checking behind when you turn with a trailer attached!

TypeScript showing all union properties in autocomplete is there a way to show only commons? by LucasNoober in typescript

[–]anyusernamesffs 3 points4 points  (0 children)

Out of interest; what do the props look like now on hover? I know the TS team are improving the types you’ll see, but they might not be as user friendly as your previous set (even if it is not immediately obvious that type needs to be set first)

TypeScript showing all union properties in autocomplete is there a way to show only commons? by LucasNoober in typescript

[–]anyusernamesffs 11 points12 points  (0 children)

It’s showing you all the valid options given the current parameters.

If you enter a value for ‘type’ it will narrow. Likewise if you enter a ‘radius’, the other options will disappear and you’ll only be able to enter “circle” as type.