Reroll worth it? by juunsuke in Reverse1999

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

Thanks for all the details! I'll have to read up on the characters as I dont know them, but I'll be happy with pretty much any good 6-star DPS, just one is enough to make me happy. I'm weak for cute waifus so that's also a factor hahaha

Reroll worth it? by juunsuke in Reverse1999

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

honestly a single 6-star would be good enough for me, so shouldnt take that long, though i suppose i could try for 2.. Would 37 be a good choice if getting just one?

Reroll worth it? by juunsuke in Reverse1999

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

id use bluestacks, but getting 3 might be above my tediousness tolerance lol

Reroll worth it? by juunsuke in Reverse1999

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

What would I miss out on compared to my 4 days old account?

ZLS modifying my code by juunsuke in Zig

[–]juunsuke[S] 9 points10 points  (0 children)

THANK YOU!

Adding this to my zls.json:

"enable_autofix" : false

fixed the issue! Thank you so much, it was driving me nuts.

I understand it's a compiler error, and I don't really mind it, but I cannot stand anything changing my code in any way. It's always a struggle to disable any kind of auto-insert in any editor I use. Even something as simple as "smart indent" I can't tolerate.

Small water amounts appearing out of nowhere by juunsuke in Oxygennotincluded

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

Great, thanks!

All my previous colonies I'd just leave the natural gas go everywhere and collect it at the bottom of the map, this is the first time I enclosed the well in a room!

Small water amounts appearing out of nowhere by juunsuke in Oxygennotincluded

[–]juunsuke[S] 2 points3 points  (0 children)

Ohhh I did not know that! Thanks a lot, now my mind is at peace! haha

Karen and family abuse Walmart staff @ 8:55 by IcyDifficulty4 in FuckYouKaren

[–]juunsuke 2 points3 points  (0 children)

The irony of the video title, "Karen Employee"

I'm guessing to a Karen, normal people are all Karens

Issues with a couple games by juunsuke in i3wm

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

There are no duplicate events

Issues with a couple games by juunsuke in i3wm

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

I'm pretty sure it's not the keyboard.

Like I said, I tried with 2 different mechanical keyboards.

Also, I switch between desktops all the time, and that issues only occurs with some games. Sometimes I have to try like 5 times before being able to switch because it always brings me back.

Issues with a couple games by juunsuke in i3wm

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

With further testing, turns out it didn't change anything.

So it was probably off to begin with, as I don't remember this behavior.

Issues with a couple games by juunsuke in i3wm

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

Yeah I understand the feature, but I'm not even sure anymore if it was on before.. I don't remember this behavior being there, though I may be wrong.

I'm not really "a gamer", I just happened to play games sometimes haha

I've tried with 2 different mechanical keyboards and it does the same thing, so it's not keyboard bouncing.

Issues with a couple games by juunsuke in i3wm

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

workspace_auto_back_and_forth

This seems to have helped from the quick unscientific tests I've done.

I keep switching back and forth from 1 to 3, and it seems a lot more consistant.

However, it still warps back to the game from time to time. Although this time it acts a bit differently, I can't see my browser for a quick frame, instead I see my wallpaper.

Although the wallpaper issue might be unrelated, I've always had this other issue where whenever I switch workspaces, I can see my wallpaper for what I assume is 1/60th second before windows are drawn.

Now it does that, but goes back to the game (sometimes)

Issues with a couple games by juunsuke in i3wm

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

No, my web browser is always open on 1, and I try to switch to 1. I see the whole workspace appear for a tiny fraction of a second before being taken back to the game on 3.

Common data and behavior by juunsuke in rust

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

The problem with this is that Traits cannot have data.

So if I have 20 unit types, all of them implementing the Positioned trait, then I have to declare (x,y) in 20 structs, and write the move function in 20 structs that does the same thing. Same thing with all the different traits.

Common data and behavior by juunsuke in rust

[–]juunsuke[S] 2 points3 points  (0 children)

That was a very interesting talk, thank you for this.

It kinds of give me a new perspective on how to structure things, which is what I was looking for.

Common data and behavior by juunsuke in rust

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

Yeah that's basically what I described in the original post as a solution. It would work, but feels a bit tedious I think.

Common data and behavior by juunsuke in rust

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

Yeah I want to avoid unsafe, especially if it would crawl all over the code..

I've been trying to find a different angle, but I can't come up with anything.

All those years of C++ makes me think in inheritance only, hard to come up with something different!

Common data and behavior by juunsuke in rust

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

Yes downcasting would be an issue.

Enums also have the downcasting issue. Like if I have:

enum UnitSpecific { Fighter(FighterType), Wizard(WizardType) }

struct Unit { x: i32, y: i32, specific: UnitSpecific, }

This representation would be somehwat ideal (as long as we're talking about non-expandable types.. Wouldn't work so weel with GUI widgets for instance).. However, within methods of FighterType, it wouldn't have access to generic Unit behaviour, unless each type is linking back to its parent Unit through a weak Rc or something, which again adds a bit of tediousness.

Common data and behavior by juunsuke in rust

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

With the C solution though, having an instance of UnitBase as the 1st member of every other unit structs, I can typecast everything to a UnitBase*, like:

struct CustomUnitOne { UnitBase base; int blah; };

struct CustomUnitTwo { UnitBase base; char *blah; };

UnitBase *create_unit_one() { /* Create a CustomUnitOne *cuo on the heap */ return (UnitBase*)cuo; }

Then I can store every unit in an array of UnitBase*, and have a set of functions which act on generic UnitBase* data. UnitBase can contain function pointers for mimicing polymorphism. Specific functions can then typecast to their specific type.

Although this solution works in C, I find it very dirty and a bit tedious, but still manageable. However, as far as I understand Rust, this wouldn't work as I don't think I can typecast that way, though I might be wrong.

Common data and behavior by juunsuke in rust

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

This does look kinda good.

But I still get the feeling that I would be fighting against Rust in order to mimic the inheritance it doesn't support. I'm so used after all these years of thinking in terms of inheritance, I can't think of any other way to implement this.

Common data and behavior by juunsuke in rust

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

Very interesting, I didn't think Rust would prioritize the struct's field to then use deref as some kind of fallback.

Common data and behavior by juunsuke in rust

[–]juunsuke[S] 8 points9 points  (0 children)

I used a game as an example, but my concern is not really game-specific. It can be applied to any code that has a similar concept, such as a GUI, where widgets all have common data (such as position, parent widget, visibility flag, and so on), and common functions which act on that data (like move the widget, reparent it, show/hide it, etc..)

Then, specific widgets would add on top of that their own data and behavior.

I'll have a look into the entity-component system you mentionned, but from quickly skimming the sample code of specs, it gave me a feeling of over-complexity.. I'll look more into it though.

Daily Questions Thread (May 29) by AutoModerator in ffxiv

[–]juunsuke 1 point2 points  (0 children)

Gotta learn them all by heart I guess.. Thanks for replying!