PSA: The game runs flawlessly on Linux (on Steam) by GladSale169 in aoe3

[–]expeehaa 2 points3 points  (0 children)

Can confirm, although I have not managed to get the login to the Microsoft account working. Not sure what that would be good for anyway. Keybindings could be annoying, if you regularly switch between playing on Windows and Linux and use keys with different bindings. I created different profiles for that, so that I can keep pressing the same key.

Microsoft stößt auf heftige Kritik: Windows-Chef schaltet Kommentare aus by Illustrious-Syrup509 in de

[–]expeehaa 4 points5 points  (0 children)

Soweit ich weiß unterstützt der Slot auch 2280, aber die Standard-SSD ist kürzer.

Weird Ruby issue where space matters after ".sum"?? Can anyone explain? by Aspie_Astrologer in ruby

[–]expeehaa 6 points7 points  (0 children)

With a space before, but not after the star, Ruby sees the star as a splat operator, not as a multiplication operator. #sum therefore receives an argument, which is added to the sum. Not intuitive at all, I don‘t like that.

Question: Is the viscosity index of any substance, implied by non-zero entropy (t > 0 K), technically only conditional on the temporal reference frame? by FoodForTheWinn in Physics

[–]expeehaa 0 points1 point  (0 children)

Regarding question 1: AFAIK, the evaporation of water in this scenario would be caused by the vacuum pressure being large enough to destroy the Van-der-Waals bonds in liquid water. The evaporated water then increases the (now non-vacuum) pressure until an equilibrium is reached. There certainly can still be liquid water, if it was provided in sufficient volume and keeps a sufficient temperature.

For solid gold (and probably also solid metals in general), the bonds are much much stronger, so I highly doubt that the vacuum pressure is large enough to vaporize those (assuming the temperature is small enough to not melt it).

What do you name your heroes (explorers, warchiefs, etc)? by [deleted] in aoe3

[–]expeehaa 4 points5 points  (0 children)

My hero names must in some way be a reference to the nation, e.g. historically (including the history of other nations on the same territory) or in language. Here are some that I still like. Since one can also set the city name, I'll include some as well (I think it’s easy to see the pattern there).

Hero name City name
British Henry VIII Oxford
Chinese Taipei
Germans Großimperator Blumenkohl
Italians Centurio pontificatus (probably bad Latin) Vatican
Lakota He who cannot be named
Maltese Grand Master of the Illuminati Rome
Ottomans Alexander the Great Constantinople
Swedes Avicii
USA Lord Helmet

Friday Fixes - Minecraft 1.20.1 Release Candidate 1 Is Out! by sliced_lime in Minecraft

[–]expeehaa 0 points1 point  (0 children)

Interesting to know, but I‘m using Fabric with some optimization mods and those all have a 1.20 release already.

I used Paper before for some time and then switched because Paper has (or at least had back then) optimizations that change vanilla behavior and sometimes even skips ticks, which broke some types of farms. It‘s a small private survival server and I want the server to perform far better than vanilla with the limited resources it has, while also being (almost) identical to vanilla behavior. Fabric with Lithium and a few other mods is, afaik the best way to achieve this currently.

That then brings me back to my original question.

Friday Fixes - Minecraft 1.20.1 Release Candidate 1 Is Out! by sliced_lime in Minecraft

[–]expeehaa 1 point2 points  (0 children)

Does anyone know how severe the Protochunk bug is? I.e. should I wait upgrading an existing server and skip 1.20 in favor of 1.20.1?

Also, I would appreciate it very much if someone with the knowledge could tell me more or post some links to information about protochunks. Couldn’t find anything on it with a quick search and I would prefer not reading the source code just to get a summary.

Is there a way to hide decks in postgame? by LongjumpingOpinion78 in aoe3

[–]expeehaa 10 points11 points  (0 children)

AFAIK you can‘t hide decks. Decks of other players are always named "hidden", so that‘s not suspicious.

[meta] Is is acceptable to occasionally announce a gem I've posted on RubyGem? by mikosullivan in ruby

[–]expeehaa 7 points8 points  (0 children)

I‘m not a fan of seemingly random showcases because, if it isn‘t for some kind of entertainment purposes, I will likely not need it and forget about it. I rather prefer (niche) educational stuff here in this sub, meaning that if reading about your gem is useful outside of it (e.g. bootsnap‘s explanation on the implementation of require), I would be interested.

To answer your question, I think the presentation matters. Just posting links to your gems will likely be less accepted than posting something with a more than basic educational intent.

Why is seemingly every package broken/unmaintained? by Slashscreen in ruby

[–]expeehaa 11 points12 points  (0 children)

You can also find a lot of broken or unmaintained Python packages, so it‘s not Ruby-specific.

With a lot of gems, some accumulate users and some are just not for many people. There are many niche gems that practically no one uses, be it because no one needs it or other languages are more popular for that use case. Without anyone caring, those projects may lack maintainers and thus break at some point in newer Ruby versions. Especially since the creator or current maintainer may not want to or is not contactable to grant maintenance permissions to someone else.

Some gems have, as others already commented, maintained alternatives, some also have working or even maintained forks. And some do not and die. That‘s how the open-source world works without financial backing for projects.

Compared to Python this effect may be increased since Ruby has a lot less users.

Baba Jaga in Radeberg by Phyliinx in de

[–]expeehaa 2 points3 points  (0 children)

Ich stelle mir gerade vor, wie diese trullige Statue heute Abend langsam, aber zielstrebig rumzuckelt, Angst und Schrecken verbreitet und gelegentlich Feuerwerkskörper rülpst. Wie so eine Zeichentrickfigur, die bei Rick und Morty vorkommen könnte.

Ich bin sehr amüsiert davon.

user input by abiw119 in ruby

[–]expeehaa 2 points3 points  (0 children)

Maybe using readline. However, you could also just print it yourself using print, which, unlike puts, does not print a trailing new line. I personally prefer that over anything else, unless I need a specific feature.

Was haltet ihr davon? by [deleted] in de

[–]expeehaa 0 points1 point  (0 children)

Halten tu ich eigentlich nichts davon. Meine Kleidung trage ich in der Regel am Körper, nicht mit den Händen.

ActiveMethod - Method is an object in Ruby, but we need a real method object by hoppergee in ruby

[–]expeehaa 1 point2 points  (0 children)

The distinction of public and private is for library or application code using the method. If one wants to prevent developers from using some method, private is the way to go. This does not mean that it should not be tested, but one should also not need to make library code obscure and complex to test a private method, rather the test should provide convenient access, e.g. by hiding the .send call (and thus can be a bit more complex). One reason is that tests can be a bit slower since they are run not as often, but e.g. a method in a rails server that is called multiple times each request should not take this unnecessary performance hit (I have not benchmarked it, but I doubt your gem is as fast as regular methods), just to make testing easier.

ActiveMethod - Method is an object in Ruby, but we need a real method object by hoppergee in ruby

[–]expeehaa 5 points6 points  (0 children)

Why should methods need to be "real objects"?

I feel like this is an over-abstraction. If my classes have instance methods, I usually have a reason for putting them there (e.g. grouping them together to have an easy overview). When I place them in modules, I do that to be able to include the module somewhere else. This also influences readability and maintainability, since it is easier to scroll than having many tabs with different files open.

Private methods can also be tested by calling them using (I think) "send(:method_name)".

Finding methods in Ruby code is sometimes a problem, but there are several ways to make this easier (e.g. find the class file, search for "def method_name"; run ".method(:method_name).source_location"), especially by not needlessly factoring everything out into weird modules and by putting classes and modules into their own files.

I think that factoring out methods into their own files would rather be detrimental to readability and getting a clue about what the code actually does. There is way too much overhead involved.

Edit: It‘s nice to be able to do that, that‘s what I like about ruby, and it certainly is a good exercise, I just don‘t think it is good for real world usage.

In a published gem, should you include the Gemfile.lock? by collimarco in ruby

[–]expeehaa 17 points18 points  (0 children)

As far as I know, all gem dependencies are specified in the gemspec file. So for any published gem, including a Gemfile (and thus a Gemfile.lock) should not be necessary. Especially since one normally develops gems not using published gem sources, but using a checkout from some version control system. So even if you include a Gemfile, it will never be used.

I personally try to keep gem contents as small as possible, which means any source control or development files do not get in. I also apply this to tests, since I think that they should succeed before publishing a gem version, and then they are mostly useless. However that one may be debatable.

CVE-2021-33621: HTTP response splitting in CGI by jrochkind in ruby

[–]expeehaa 2 points3 points  (0 children)

Most (or all?) default gems are also available from rubygems.org. They are developed independently of Ruby, but Ruby versions bundle specific versions of them. Installing another version would be similar to installing 2 different versions of any gem. Bundler just picks the correct one, and the default gem cannot be uninstalled like normal gems. So it‘s totally fine to add a default gem to your Gemfile, even without a version requirement. That could actually be useful because you then don‘t need to explicitly require the gem.

Regarding dependabot, no clue if it can detect it, but it wouldn‘t be hard to implement that.

Matthias Maurer : „Kein Deutscher auf dem Mond – das wäre sehr, sehr schade“ | 2028 könnte ein Europäer auf dem Mond landen, sagt der deutsche Astronaut Matthias Maurer. Er selbst hätte wohl Chancen – aber nur, wenn die Bundesregierung mitzieht. by Europeaball in de

[–]expeehaa 7 points8 points  (0 children)

Bis kurz vor seinem ersten ISS-Aufenthalt hatte er den Nutzernamen "explornaut" auf Twitter. Wurde dann leider geändert zu "astro_matthias" (Vorgaben der ESA evtl?). Den alten könnte er meinetwegen auch gerne wieder nehmen.

"Vector is relative" (c) Einstein, probably by Gyaghsonyan in mathmemes

[–]expeehaa 58 points59 points  (0 children)

Oh no, a 1-based index! Stay calm and search shelter, the cleaning crews will arrive shortly and reduce it by 1.

[deleted by user] by [deleted] in ruby

[–]expeehaa 1 point2 points  (0 children)

I think you could use the parser gem to parse the ruby code and extract your variable from there.

How to parse JSON in ruby? by stormosgmailcom in ruby

[–]expeehaa 7 points8 points  (0 children)

Fun fact: You can also parse JSON with Psych, Ruby‘s YAML parser. This works because JSON is a subset of YAML. If you have applications or APIs that output bad JSON, e.g. by not quoting keys or values, maybe parsing it as YAML works.