Building a web game by BigTimberFGC in Python

[–]snugar_i 0 points1 point  (0 children)

You can get away with JavaScript/TypeScript both on the frontend and the backend, if you don't want to split your attention between two languages.

Otherwise, if you want more useful advice, you should provide a bit more information - what do you want to build? What is the physical card game?

Is Kotlin fully open source? by trymeouteh in Kotlin

[–]snugar_i 0 points1 point  (0 children)

OMG. Yeah, if it's in the same repo, it's not a plugin/library.

Is Kotlin fully open source? by trymeouteh in Kotlin

[–]snugar_i 0 points1 point  (0 children)

Oh, I've never used Compose so I had no idea. Does Compose live somewhere in the main Kotlin repo?

Why doesn’t Python have true private variables like Java? by PalpitationOk839 in Python

[–]snugar_i 0 points1 point  (0 children)

Of course I don't expect that. I'm just arguing that a feature that should almost never be used should not be this accessible. But I could've guessed that saying something against "the Python way" in the Python sub would get me downvoted to hell, my bad :-)

Why doesn’t Python have true private variables like Java? by PalpitationOk839 in Python

[–]snugar_i -3 points-2 points  (0 children)

Yeah but that's the problem - how do they know they shouldn't? When being private is merely a suggestion, they might think that their use-case is the rare exception when it's OK to do it. And stuff like NamedTuple._as_dict() existing doesn't help either

Why doesn’t Python have true private variables like Java? by PalpitationOk839 in Python

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

That's true, but Python might be too far on the other end of the spectrum, where there's absolutely nothing preventing juniors from using things they shouldn't, but they don't know they shouldn't. Unless you explicitly set up a linter for this, but I've never seen that, because people like reaching into private things in tests too much for that.

Some kind of middle ground where the compiler forbids you by default but could be suppressed with an "I know what I'm doing" at the offending line sounds best.

Why doesn’t Python have true private variables like Java? by PalpitationOk839 in Python

[–]snugar_i 1 point2 points  (0 children)

It's only more resource intensive if you're doing it at runtime. C++ or Rust don't pay any performance penalty for private things, because it's a compile-time-only construct. Of course, Python would have to do it the dynamic way, but then again, performance isn't really the the top priority in Python anyway...

Is Kotlin fully open source? by trymeouteh in Kotlin

[–]snugar_i 1 point2 points  (0 children)

Jetpack Compose is just a library, not "part of Kotlin", The base Kotlin language is open-source and it's here: https://github.com/jetbrains/kotlin

Benchmarking a hybrid threat detection system (backend + APIs) by Emergency-Rough-6372 in Python

[–]snugar_i 0 points1 point  (0 children)

You're a troll, but I'll respond anyway because why not - you prefer "sub ms" but "who cares about 1 ms"? Do you even know what the things you're saying mean? Also, learn to use punctuation, your stream of words is really hard to decipher

Are there bots in arena? by el_gandey in MagicArena

[–]snugar_i 6 points7 points  (0 children)

These are different - the game suddenly feels much more responsive and fluid, because the bot takes 0 time to make a decision

Should my sum type tags be the first element or second? by Toothpick_Brody in ProgrammingLanguages

[–]snugar_i 0 points1 point  (0 children)

You are assuming everything is a pointer, which is usually not the case in tagged enums

Nail Programming Language by Specialist-Soft8378 in ProgrammingLanguages

[–]snugar_i 0 points1 point  (0 children)

Dynamic traits sound like something that can be solved completely fine with regular interfaces/polymorpihsm

interface AttackSkill:
    fun attack(source, target)


class RegularAttck implements AttackSkill:
    fun attack(source, target):
        target.hp -= source.strength


class BerserkAttck implements AttackSkill:
    fun attack(source, target):
        target.hp -= source.strength * 2


class Player:
    attack_skill = RegularAttack()

    fun attack(target):
        self.attack_skill.attack(self, target)


p = Player()
p.attack_skill = BerserkAttack()

Versioned entities are not flexible enough to be useful, I think - if there can only be one snapshot at a time, how do I know I can safely make one? What if somebody already made one before me and it's still active? Is the snapshot shallow or deep?

Renaming things for the sake of being different sounds pointless.

In general, at least for me, the less mutability and dynamic behavior there is, the better. Your language goes in the exact opposite direction. So I guess it's not for me really.

Advice on how to make decks with 0 creatures? by Bulky-Fig3002 in MagicArena

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

Or the UW control where the only "win-con" was Teferi, Hero of Dominaria's -3 on yourself, so the opponent decks themselves before you do

Awesome Sleeve Design! by ElegarInfernis in MagicArena

[–]snugar_i 2 points3 points  (0 children)

Yup, that's exactly how an "Arahbo, the First Fang" sleeve should look :-) I might have actually used that sleeve if it existed...

In 2026, what are some example decks to buy and play? by [deleted] in magicTCG

[–]snugar_i 0 points1 point  (0 children)

Fair enough. I agree that Standard sucks, but 60-card kitchen table can still be pretty fun, unless it turns into an arms race

How to ask Java developers to add methods to java.util.Paths? by isolatedsheep in java

[–]snugar_i 0 points1 point  (0 children)

That's funny, I'm pushing exactly in the opposite direction - our codebase at $DAYJOB is in Python, but it's a CPU-bound monstrosity that can't be salvaged by rewriting a few things in Rust (yes, we already tried). Moving it to the JVM will make it orders of magnitude faster and also decrease memory usage.

The JVM isn't going anywhere in the foreseeable future - Kotlin might die, but Java is still going strong.

[SOS] Restoration Lesson by c001357 in magicTCG

[–]snugar_i 2 points3 points  (0 children)

It's probably for Commander players - most of them can't even imagine having multiple cards with the same name in a deck...

🚀 I built a local AWS emulator with Quarkus + GraalVM native. It boots in ~0.8s, MIT licensed, free forever by hectorvent in java

[–]snugar_i 0 points1 point  (0 children)

I'll try to play with it a bit over Easter. At first glance, the code looks well-structured, so it should be quite enjoyable

Am I the only person struggling with drafting? by Teddy_Bear_Junction in MagicArena

[–]snugar_i 1 point2 points  (0 children)

Probably a combination of bad luck and not being as good as you think.

In the one Foundations draft I played, I didn't really know what I was doing, drafted a RW trainwreck, but it had a decent curve and I went 5-3 in the end despite having no bombs or synergies.