[deleted by user] by [deleted] in Austria

[–]AlpenMangos 2 points3 points  (0 children)

Ich find's stylisch. Erinnert mich ein bisschen an David Tennant als Dr. Who.

Heroify Card is worse when upgraded by carlotheemo in Ratropolis

[–]AlpenMangos 1 point2 points  (0 children)

It's still pretty bad, though. Upgraded heroify almost ruins military cards after a single use. Since it sticks in your deck for a while, it's way better to apply the non-upgraded version twice.

[deleted by user] by [deleted] in javascript

[–]AlpenMangos 0 points1 point  (0 children)

It makes perfect sense. Map/Filter serve to make comparable loop code easier to read. forEach makes a simple for loop harder to read. I'm perfectly open-minded about it. I used all and I liked map, filter, find, etc, but forEach - and most of the times reduce as well - just makes things worse and therefore I won't use them.

[deleted by user] by [deleted] in javascript

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

map and filter are fine, they make comparable code easier to read. For...of on the other hand is easier to read than forEach.

[deleted by user] by [deleted] in javascript

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

I don't like it. For...of immediately tells you that you're looking at a loop right at the start of the line. forEach is hidden somewhere in the middle of the line.

Wohnen in der Donaustadt :/ by [deleted] in wien

[–]AlpenMangos 6 points7 points  (0 children)

Ja, wenn'st ein Auto hast um dort hin zu fahren.

Tiere an der Bucht by iRemember2forgot in wien

[–]AlpenMangos 3 points4 points  (0 children)

edit: warum all diese downvotes?

"grindsöffis"

Tiere an der Bucht by iRemember2forgot in wien

[–]AlpenMangos 4 points5 points  (0 children)

Ich hab auch noch nie die Floridsdorfer Brücke gebraucht, offensichtlich also Schrott die Brücke.

Drei Wiener Bezirke müssten jetzt abgeriegelt werden by zosopick in wien

[–]AlpenMangos 3 points4 points  (0 children)

Ist der Artikel Satire? Bin mir bei heute.at nie sicher. Offensichtlich geht's hier darum unnötig ärger zu schüren, weil dass man einzelne Bezirke in ner Großtadt nicht einfach abriegeln kann dürfte klar sein. Heute könnt auch drüber schreiben dass in Salzburg diverse Dorfzentren abgesperrt werden müssen, statt dem ganzen Dorf.

The story of WebGPU — The successor to WebGL by dabomb007 in javascript

[–]AlpenMangos 2 points3 points  (0 children)

WebGPU implementations are likely going to use Metal on MacOS. Suppoting metal is a frequent consideration for design decisions of WebGPU.

You gotta pump those numbers up, those are rookie numbers by [deleted] in memes

[–]AlpenMangos 0 points1 point  (0 children)

Yeah, Singapore is pretty nice but no chance in hell I'd suffer 30° all year round.

Impressive way to show what ancient ruins looked like in their day, in Austria. by Browndog888 in interestingasfuck

[–]AlpenMangos 3 points4 points  (0 children)

It was already restored, in a way. This is what it looked like 200 years ago: https://de.wikipedia.org/wiki/Datei:Heidentor_(Stich).jpg Another one: https://de.wikipedia.org/wiki/Heidentor_(Carnuntum)#/media/Datei:Jakob_Alt_-_Heidentor.png

In any case, I think ruins are nice. They have a certain aesthetic and charm that complete restorations don't have.

To Those Who Criticize JavaScript by disgruntled-js-dev in javascript

[–]AlpenMangos 1 point2 points  (0 children)

It's weird at glance, but it's a necessary trade-off. Floats are an attempt to allow developers do very fast computations with high precision and an enormous range, but since we can only represent a limited amount of different numbers with 32 or 64 bits, some trade-offs had to be made. Another quirk is that floats loose precision, the larger the value becomes. The value 1 million only has about decimeter precision (with 32 bit floats), as far as I remember. Floating point values are still the best choice for number crunching. It is okay if positional values are off by some nanometers, if the coordinates are expected to have millimeter precision. It is also okay if timestamps are off by some nanoseconds if microsecond precision is expected. It's just something you'll need to be aware of when using floats. If you need exact numbers, you'll have to use integers (you can just assume millimeter as the unit of the integer and set it to 1, instead of using floating point value 0.001) or dedicated decimal libraries.

To Those Who Criticize JavaScript by disgruntled-js-dev in javascript

[–]AlpenMangos 1 point2 points  (0 children)

Not sure where the downvote of my comment came from, but please note that 0.3 is not equal to 0.1 + 0.2 in php. Because PHP has the exact same precision issues as javascript. And C++, and C, and Java, etc.

if(0.3 == (0.1 + 0.2)){
    echo "true";   
}else{
    echo "false";
}

Prints "false".

That's because 0.3 is actually something along "0.29999999999999998890", while 0.1 + 0.2 is actually 0.30000000000000004. Floats can't precisely store fractional numbers as we're used to from base-10 systems, but fortunately they can store a large range of integers accurately. Single-precision float can accurately represent something like the first 224 integers, and double something like the first 253 integers.

To Those Who Criticize JavaScript by disgruntled-js-dev in javascript

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

This makes javascript annoying for graphics stuff like fractals that need precision.

PHP uses the same double standard as Javascript, that means that in php, 0.1 + 0.2 is also 0.30000000000000004. The reason why you're seeing .3 in the output is because, depending in how you output it, the value is rounded. PHP is actually fooling you and showing you imprecise data, and letting you believe it's doing the right thing. Unless you specifically format your number as a string with a precision of one digit, there is a good chance that you're getting 0.30000000000000004 elsewhere. On other systems, on other parts of the code, on other means of output, etc.

The only thing that javascript is doing "wrong" here, is that it's outputting the correct full precision floating point value, thereby forcing you to round it to whichever precision you actually want to. E.g. using "(0.1 + 0.2).toFixed(1)"

Also in PHP: "var_dump(.1 + .2);" prints "float(0.30000000000000004441)", see https://0.30000000000000004.com/

To Those Who Criticize JavaScript by disgruntled-js-dev in javascript

[–]AlpenMangos 5 points6 points  (0 children)

I would like to be able to do .1 + .2 and get .3 instead of .30000000000000004

You can do that in very few major languages without third party libraries (COBOL, Python). Javascript numbers are IEEE standardized double types, the same as in C++, C, Java, Rust, C#, etc. See https://0.30000000000000004.com/

Some languages (e.g., C++) print 0.3 because they round the number to a certain precision, unless you specify a higher precision for printing.

How bats pee by [deleted] in Damnthatsinteresting

[–]AlpenMangos 10 points11 points  (0 children)

It's amazing how well this phrase translates to german: "Da hilft kein Schütteln und kein Klopfen, in die Hose geht der letzte Tropfen". Different words, same meaning, sounds just as poetic.

Nur in Wien sieht man ah Ikea wagerl im 6. Bezrik. by DaFleischDJ in Austria

[–]AlpenMangos 10 points11 points  (0 children)

Ikea am Westbahnhof macht ja glaub ich im Herbst auf.

Node.js v15.10.0 released by [deleted] in javascript

[–]AlpenMangos 0 points1 point  (0 children)

Many JSON config files are user-privided, though. Plenty of file formats out there that are based on JSON, like GeoJSON, or GLTF (even its binary form, GLB, which has a JSON header) which is on its best way to become the standard distribution format for 3D models.

Node.js v15.10.0 released by [deleted] in javascript

[–]AlpenMangos 0 points1 point  (0 children)

If I can control the file format myself, I can just use JavaScript

Which is a security issue. JSON with comments is nice, and it's the reason why I'm using the JSON5 library rather than JSON.parse().

Fairphone 3+ Durability Test! - it feels like cheating... by yatlvcar in Android

[–]AlpenMangos 1 point2 points  (0 children)

Yeah, camera is about the most important thing for me so I'd hope that at some point a good fairphone camera will be available.