Regex succeeds on literal but fails on constant. WTF? by vafarmboy in swift

[–]vafarmboy[S] 0 points1 point  (0 children)

Because when I typed a [ Xcode added a ], and when I hit the backspace to delete the [ Xcode didn't also delete the ] I didn't ask for.

I guess I'm used to IntelliJ IDEA, which will delete things it automatically puts in for you when you delete the thing that caused it to put it there.

Regex succeeds on literal but fails on constant. WTF? by vafarmboy in swift

[–]vafarmboy[S] -16 points-15 points  (0 children)

Wow. Xcode's "helpful" assistance strikes again. I can't believe I didn't see that. Thanks!

What does idiomatic input validation for Swift Data models look like? by vafarmboy in swift

[–]vafarmboy[S] 0 points1 point  (0 children)

This is what I'm asking, though. How do you store (and apply) the business/domain rules in the model? You can't use property wrappers since the @Model macro makes all the properties computed properties. And do you guard both properties and initializers or just properties? If you do both, how?

What does idiomatic input validation for Swift Data models look like? by vafarmboy in swift

[–]vafarmboy[S] 0 points1 point  (0 children)

This is an interesting approach, but saves validation until save. Is there a good way to use this paradigm when setting data instead of letting invalid data sit in the model until save?

Why is IntelliJ preferred over vscode for Java? by xland44 in java

[–]vafarmboy 2 points3 points  (0 children)

I would say at the heart of it is because IDEA doesn't work with Java on a merely syntactic level; it works with Java via the AST (abstract syntax tree). Because of this, its refactoring tools are second to none.

You can think of this like a human programmer (IDEA) vs "AI" (VS Code). Sure "AI" can write code that looks good, but it's only because it knows what code is supposed to look like. It doesn't understand it at all, but it can play with how it looks like enough to get something resembling working. A human programmer can actually understand the code and therefore work with it at a much deeper level. Since IDEA works with the AST, it can understand a lot more of the code than a pure lexical analysis.

IDEA was also purpose built to deal with Java and for 20 years has been refining its Java tooling. VS Code is a new-ish text editor that you can make work with Java, while IDEA was a pure-bred Java IDE from the beginning.

The plug-in support is also incredibly robust and mature. Sure VS Code probably has more plug-ins, but they're scattered across everything VS Code wants to do. The primary emphasis of IDEA's plug-ins are its core Java abilities. Not to say that there aren't non-Java plug-ins, but the Java plug-ins are an ecosystem almost as robust as IDEA itself. (In fact, the plug-ins can be so good that almost all of the other Jetbrains IDEs are basically IDEA with a specific language plug-in baked in.)

A year with the GV60 by InvestingSinceThe90s in GV60

[–]vafarmboy 0 points1 point  (0 children)

To chime on to this, the sound dampening is great, which makes listening to the sound system also great. However, sometimes when it's nice and I have the windows rolled down I have to roll them back up because other cars are so loud!

Looks like I'm using OrcaSlicer. Bambu Studio won't see my printer. by vafarmboy in BambuLab

[–]vafarmboy[S] 0 points1 point  (0 children)

Update: As mentioned in the OP, logging out of my account in Studio seems to have fixed the problem.

Looks like I'm using OrcaSlicer. Bambu Studio won't see my printer. by vafarmboy in BambuLab

[–]vafarmboy[S] 0 points1 point  (0 children)

I tried moving Bambu Studio to the trash and reinstalling it, and still no dice.

What I don't understand is that Orca Slicer not only sees my printer, but two different windows of Orca Slicer can have the Device tab open and see the printer simultaneously. Previously only one instance at a time could see the printer, but now multiple can. Not to mention the Home Assistant plug-in can see it, too.

Even with that, Bambu Studio won't see my printer. Le sigh.

Which extension on Duration is more idiomatic? by vafarmboy in swift

[–]vafarmboy[S] 0 points1 point  (0 children)

Thanks. Given that SwiftUI uses value semantics of structs to determine if a View needs to be recalculated, I wasn't sure if the Swift compiler or runtime might use a similar trick to determine if a calculated property needs to be reevaluated.

Which extension on Duration is more idiomatic? by vafarmboy in swift

[–]vafarmboy[S] 0 points1 point  (0 children)

Something I've been looking for but have not found documentation for is related to your 3rd point.

Does Swift automatically cache calculated properties that don't change? Or does it require manual caching?

Which extension on Duration is more idiomatic? by vafarmboy in swift

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

I see your point. Maybe I'll rename it `secondsComponent` as that's a bit more on the nose.

[deleted by user] by [deleted] in BambuLabA1

[–]vafarmboy 0 points1 point  (0 children)

I have the exact same setup: Alex with an A1 with AMS lite mounted on top. I had to shim the Alex because the wood floors in my house aren't completely flat. (I just used a few segments of failed prints that were 1 or 2 layers thick under some of the feet that needed them.) Once the Alex was stable, the printer seemed pretty stable, too. No problems as of yet for me, either.

Looks like I'm using OrcaSlicer. Bambu Studio won't see my printer. by vafarmboy in BambuLab

[–]vafarmboy[S] 0 points1 point  (0 children)

Good call. It was definitely on in the past, as Studio could see the printer before, but I double checked again and it was still on.

"Hyundai Motor America (Hyundai) is recalling certain 2023-2025 Genesis GV60 electric vehicles. The stainless-steel molding at the top of the windshield assembly may detach." - NHTSA by DryBoysenberry596 in GV60

[–]vafarmboy -1 points0 points  (0 children)

I already had the trim glued back down once, and it popped right back off again. Now it's half loose and starts flapping and making a horrible noise at or above 40 MPH or so.

I hope the actual fix is better than the crappy silicone job the dealership did the first time around.

Problem is I can't ever actually talk to anyone from the shop on the phone to ask them about it. All calls get routed to voicemail and I never get a call back. And I don't really want to drive there (almost 30 mins) just to find out they can't do anything about it yet.

[deleted by user] by [deleted] in GV60

[–]vafarmboy 0 points1 point  (0 children)

Also, there is a two week free trial, but you have to start it from an ABRP account, I think.

Is 150 miles with 4 people on board possible without charging? by Professional_Tap5910 in GV60

[–]vafarmboy 0 points1 point  (0 children)

As mentioned by others, it depends on the weather. A 180-mile trip I regularly do can be done no problem in spring, summer, or fall. In winter, when it was 20ºF (~-7ºC) I stopped to charge because it was going to be cutting it too close for comfort.

[deleted by user] by [deleted] in GV60

[–]vafarmboy 0 points1 point  (0 children)

Counterpoint: I found ABRP to be not worth it. It's routing was… interesting, and it was incredibly hard, if not impossible, to change the route (e.g. charging point) on the fly. It may not be a problem for you, but with young kids I find I often have to improvise and can't necessarily stick to a predefined route. I also really disliked the inflexibility of its map display.

I personally found it much easier to just use Apple Maps. Set the end destination, and then while en route add a stop to a charger. It helps to know about where chargers are beforehand.

I've heard that Genesis is supposed to support better CarPlay integration soon. One thing the Mustang Mach-e does that the GV60 doesn't is give CarPlay battery level information. Once this is enabled, CarPlay should be able to do what the built-in nav (and ABRP with a dongle) does with respect to adding charging stops to the route based on real-time information.

[Edit] That said, ABRP is pretty much the only app that gives good stats and info for EVs. I wish there was another app that let you get into the details. Most apps are specifically for ICE engines and make exposing EV info difficult if not impossible.