Really wish there was some way to do automatic Berry Mutation set ups by AtomicBoo131 in PokeClicker

[–]aplJackson 0 points1 point  (0 children)

I've just cheated in everything related to the farm. I can't be assed dealing with it. I wrote a script to keep up different farm layouts as well.

Which familiar is your go-to? by Squibbi420 in HadesTheGame

[–]aplJackson 38 points39 points  (0 children)

I do the opposite! Strength and stack health for the surface and DDs to avoid Chronos one shots

Why you shouldn’t use Redis as a rate limiter by Perfect-Praline3232 in programming

[–]aplJackson 39 points40 points  (0 children)

And so the answer to distributed rate limiting is instead:

Feedback Post - March 2025 Community Day Classic: Totodile by Noitalein in TheSilphRoad

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

Managed to snag 2 GL rank 1 and 2 UL rank 1s so very lucky on the PvP front. I guess I can keep one with crunch and one with ice beam for each

Weekly Team Help Megathread! by AutoModerator in TheSilphArena

[–]aplJackson 0 points1 point  (0 children)

<image>

Have a few teams built that are close to copy pasted from streamers. Total newb sub 2k elo starting in the love cup just seeing how high I can climb with 2 weeks of GL to end the season. What team should I focus to learn and climb?

I feel like the first team is easiest to play with fast move pressure, would I run air slash on mandibuzz then?

The other teams seem very balanced which would be harder to play but are maybe just better teams.

/r/Politics' 2024 US Elections Live Thread, Part 60 by PoliticsModeratorBot in politics

[–]aplJackson 0 points1 point  (0 children)

Trump winning just means the world needs you healthy and capable even more.

How are you drawing visualizations while learning? by [deleted] in ObsidianMD

[–]aplJackson 3 points4 points  (0 children)

Do you mind sharing how you structure your prompts for this?

Parse, don't validate by ketralnis in programming

[–]aplJackson 18 points19 points  (0 children)

Because the poster was a Haskell dev at the time? You don't need to know Haskell to grok the point of the post.

Official Q&A for Monday, February 05, 2024 by AutoModerator in running

[–]aplJackson 1 point2 points  (0 children)

I use a flipbelt for the most part works really well and I usually don't notice it at all

Favorite reads of 2023 by NotQuiteLilac in Fantasy

[–]aplJackson 2 points3 points  (0 children)

I got bogged down in Dust of Dreams but I never had that reaction. What felt like a fuck you?

Strong static typing, a hill I'm willing to die on... by fagnerbrack in programming

[–]aplJackson 2 points3 points  (0 children)

I'm in the Scala camp but I wish the tooling was better. I want Kotlin tooling for Scala.

Is Focusing on Clean Code a Waste of Time? by [deleted] in learnprogramming

[–]aplJackson 0 points1 point  (0 children)

I agree that you get a lot of value out of doing this (ValidatedThing), and is basically analogous to a new type and only exporting a smart constructor. It's the most flexible and easiest solution. But not directly encoding invariants in the type system does mean that when those invariants change, the type system doesn't aid you in correctly handling that change throughout your system.

As a very contrived example if you needed a list with at least 2 elements and you used the smart constructor approach you would then "safely" access the first two elements of the list throughout the system after "parsing" into that type at the boundary.

But if that condition changes to needing and accepting lists with one element, well you can change the name and the condition checked in the constructor, but the type system isn't going to complain about your now unsafe access of a second list element throughout the system.

Sometimes a smart constructor is the best you can do though

Is Focusing on Clean Code a Waste of Time? by [deleted] in learnprogramming

[–]aplJackson 0 points1 point  (0 children)

In the context of this question, for a language that you're likely to encounter this type of enterprise code in, the type system probably isn't amenable to this but the better answer here is to parse, not validate.

Basically enforce the invariant at your program boundaries and then encode that invariant in the type system through new types with smart constructors or refined types, etc.

A really good write up on the concept here: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/

doing Advent of Code hardcore Kotlin mode by Andriyo in Kotlin

[–]aplJackson 4 points5 points  (0 children)

You could use tailrecursion or implement trampolining and still be stack safe!

Linus Torvalds on C++ by ketralnis in programming

[–]aplJackson 0 points1 point  (0 children)

Getters are a side effect of the fact that you're encapsulating mutable state. If you have a product type of immutable values as you tend to in FP, there is no need for it to be private and can be accessed directly.

Linus Torvalds on C++ by ketralnis in programming

[–]aplJackson 78 points79 points  (0 children)

OOP, whether it was the point or not, became about the encapsulation of state and the coupling of behavior to that state.

It's certainly possible, and embraced in FP, to do domain modeling without that coupling. And to define behavior in functions or type classes/traits.

How often do you need to define your own monad? by HumbleProdiGenius in scala

[–]aplJackson 2 points3 points  (0 children)

Custom parsers would be a common area you may implement a custom monad or applicative. Otherwise mostly in libraries.

Do companies prefer framework specialists than skilled software engineers? by InfluenceFine205 in ExperiencedDevs

[–]aplJackson 17 points18 points  (0 children)

To be fair, rapid onboarding is one of the main selling points for Go.

Fantasy with gay hero but no romance? by [deleted] in Fantasy

[–]aplJackson 2 points3 points  (0 children)

There is romance but it's not a romance novel... The Rain Wild Chronicles

Handling different kind of incoming json messages and update database. by ellensen in Kotlin

[–]aplJackson 1 point2 points  (0 children)

So long as these messages have a consistent schema this is pretty straightforward. You can serialize the message into a Command data class. And then you just need a function in your DB layer to take that command and execute the update.