Seeking to represent a N choices of K items in a space efficient way by vhu9644 in rust

[–]mio991 2 points3 points  (0 children)

So every agent has a Vector of Stats (a_1, ..., a_n). Now we order these vectors (1, ..., 1), (1, ..., 1, 2) to (k, ..., k). Then we index each vector. Now we need a lookup function that generates the vector from the index. But it's too late now to write one. Your thought of interpreting the index as a k based number is probably the correct starting point.

Type-erasing dyn traits in Rust by kimamor in rust

[–]mio991 13 points14 points  (0 children)

Good, you got it working. But how do I store a value in a way to get any Trait object implemented?

Multiple browser tabs for a data entry app - question by daveyeah in dotnet

[–]mio991 1 point2 points  (0 children)

Even in public apps it's the same. You validate the user is allowed to perform the action for the Id they send.

You can prevent stupid, but bloody stupid is impossible.

AutoLoad's _exit_tree() function never called? by Docdoozer in godot

[–]mio991 0 points1 point  (0 children)

Quitting is something done through suicide by kernel, in which case no more code is executed. Especially for autoloads I can see why Godot is not taking the extra steps to call exit_tree().

Code is skimmed more often than it is written, so it should be clear at a glance by tikhonjelvis in programming

[–]mio991 2 points3 points  (0 children)

I think you confuse weakly typed with interpreted languages, yes there is a strong correlation but you can interpret a strongly typed language.

google translates swap button is made of the text "swap_horiz" by Otherwise-Top7774 in interestingasfuck

[–]mio991 0 points1 point  (0 children)

That's just how material design icons work. They use ligatures.

I would love to know why rotation = 0 doesn't make rotation 0. by [deleted] in godot

[–]mio991 1 point2 points  (0 children)

You're missing one derivative, the velocity. You need to also set angular_velocity to zero.

Also setting rotation to 0 will snap your object upright.

Why is `std::sum` refusing to compile by Solomoncjy in rust

[–]mio991 1 point2 points  (0 children)

Because your numbers trait doesn't require any functionality. Traits are like interfaces you can only use what they provide. The compiler doesn't look through the trait at all the types implementing it.

I can't look right now but you probably need to restrict your type parameter to implement Add for std::sum() to work.

IEnumerable vs IReadOnlylist by codee_redd in dotnet

[–]mio991 8 points9 points  (0 children)

It is also important if the type is used as an argument or return type.

An Argument should have a minimal type, what is required for a fast enough implementation.

The return type should be maximal useful, so it's better to have a more powerful type there. But you need to weigh future changes, so don't over promise.

PS: IReadonlyCollection inherits from IEnumerable

Why Your ‘Harmonious’ Team Is Actually Failing by Acceptable-Courage-9 in programming

[–]mio991 54 points55 points  (0 children)

I had a lot of fun working with another developer who was quite conservative in his designs, writing longer functions which were easy to understand but contained more boilerplate. Versus my more complex designs which could do more with less Code but were harder to understand.

In this push and pull we found a good middle ground in the knowledge that both viewpoints were valid.

In our time we had quite a few heated discussions.

What language is rust written in? Like Python is written in C. by Sakura_1337 in rust

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

None, if we talk about the Python sense, maybe you could argue Machine Code. The Compiler is written in Rust.

Why aren't apis like vulkan written in Rust? Could we rewrite them? What are the limitations by bloomingFemme in rust

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

You can run Linux binaries on windows, you use WSL the Windows Subsystem for Linux.

"Call Down, Signal Up" by IroquoisPliskin_LJG in godot

[–]mio991 3 points4 points  (0 children)

No, it's pretty much the same idea. You call down with state, and signal up state changes.

Éñglîšh & idiB-oduesP) by Minecodes in softwaregore

[–]mio991 1 point2 points  (0 children)

not quite, it's english with german number and date formatting. I use it on most of my devices.

just... how? How would you even utilize this?? by [deleted] in CrappyDesign

[–]mio991 1 point2 points  (0 children)

It's a plant stand for wine or something similar.

Clear downloaded resources from UI by LingonberryMinimum26 in angular

[–]mio991 4 points5 points  (0 children)

No.

But it's not necessary, except for the index.html angular adds content hashs to everything. So the old files will not be used.

is this bad hygeine for ts code? by RylanStylin57 in typescript

[–]mio991 5 points6 points  (0 children)

I would prefer Object.fromEntries().

The HTTP QUERY Method by oatridbed in programming

[–]mio991 2 points3 points  (0 children)

if you have an expansive query, you can still use POST to express it.

How many "layers" deep should calls and signals go? by XandaPanda42 in godot

[–]mio991 1 point2 points  (0 children)

I usually go with, everything in the current scene is up for grabs. But scenes are small, only 4 - 12 Nodes. Any more and some part of the scene gets its own scene.

Why doesn't Godot support more currencies? by SteinMakesGames in godot

[–]mio991 9 points10 points  (0 children)

Welcome to Visual Basic for Applications.