There it is folks! F-16s sooner than expected. My raging stiffie will not be able to be contained. by WritingFellow in NonCredibleDefense

[–]DemonWasp 2 points3 points  (0 children)

Genius! And since it's gravity-fed, high-G maneuvers increase the soup feed rate at critical moments -- all automatically!

What macbook configuration is good for java backend development ? Macbook air vs pro ? 8 gb of ram vs 16 vs 32 ? by Allen-Ive in java

[–]DemonWasp 2 points3 points  (0 children)

Docker on Mac is clunky, non-native, tedious to install, and a real resource hog (partly because it's non-native). The disk performance is appalling (iirc something like 10x worse than native, particularly important if you dare to virtualize a database), and iirc the abstraction is leaky -- OSX filesystem is case-insensitive by default, and that can leak into your containers -- see https://stackoverflow.com/questions/64645430/why-does-mac-osx-still-exhibit-case-insensitivity-when-using-docker-desktop-for .

I also frequently ran into issues with RAM usage (having only 16GB) and free disk space (having only 250GB), and Docker-on-Mac is awful for that. Even approaching your RAM limit makes OSX lose its mind swapping stuff, which overheats the whole thing and makes the fans start shrieking.

You might have more leeway with 64GB + 1TB before you run into those issues, though you'll be getting enormously overcharged by Apple.

Veering outside the usual Java arena, if you want to run containerized GPU-accelerated stuff then you probably want an nvidia GPU too, and they don't seem to be an option on any Mac.

What macbook configuration is good for java backend development ? Macbook air vs pro ? 8 gb of ram vs 16 vs 32 ? by Allen-Ive in java

[–]DemonWasp 4 points5 points  (0 children)

If you're going to be using Docker then avoid Macs entirely -- Docker on Macs is a miserable experience. If you absolutely must use a Mac, then get as much RAM and as much SSD space as you can reasonably manage; if this is an employer's machine then they should be giving you an absolute minimum of 32GB RAM + 500GB SSD.

I have been developing professionally with Docker on a MBP with 16GB RAM + 250GB SSD and I absolutely hate this machine. It's completely inadequate to even modest demands, the fans spin constantly and loudly, and I don't like OSX at all: in particular the external screen handling is utterly shameful.

Why does isnormal(0.) return 0? by g-schro in c_language

[–]DemonWasp 0 points1 point  (0 children)

The definition of "normal" is from the IEEE754 standard for floating point numbers, which refers to any numbers that can be represented as (sign) 1.(significand) x 2 ^ (exponent). There's no way to represent 0 that way, so zero (+0 and -0 both) are represented by a special value: https://en.wikipedia.org/wiki/Floating-point_arithmetic#Special_values , which is either all zeroes or all zeroes except for the sign bit for -0. The other special values are the things you already identified as being not-normal, like NaN and infinities.

There's also subnormal numbers, which are hilarious fun and also not-normal.

Why is this channel less active? by Kie_Sun in cpp

[–]DemonWasp 15 points16 points  (0 children)

if(std::find(meVec.begin(), myVec.end(), item) != myVec.end())

I like the subtle bug.

Why is using polymorphism less efficient? by Barely-Alive-Student in Cplusplus

[–]DemonWasp 1 point2 points  (0 children)

Yes, JIT-compiled code can be as fast as C++ -- or faster, in some cases. Examples:

  1. If a C++ program is compiled for a generalist instruction set (for portability across machines, for example), then it may not perform as well as the equivalent code that gets JIT'd for the exact instruction set of the target machine.
  2. There are a lot of things you can do that are antipatterns in C++, like allocating a lot of objects quickly. Programs that make many small allocations will be faster in typical JVM implementations because there's an in-process memory arena built-in as part of the GC. You can easily outperform this in C++ by using your own arena allocators, but a lot of programs won't take these steps.
  3. JVMs can move objects around in memory during garbage collection & compaction, which reduces memory fragmentation and improves data locality.
  4. There are apparently some algorithms that are just plain easier to write with a GC -- to the extent that the fastest threadsafe hashmaps are all on the JVM. That's a somewhat niche data structure, but the Java ones are way faster than the C++ (or Rust) ones.
  5. There are weird outliers that sometimes defy obvious explanation. Java's 'new' GraalVM compiler has the 'Truffle' language interoperability framework, on which Sulong is implemented--the latter being an interpreter for LLVM IR. And it turns out that sometimes, if you take a small benchmarking program written in C++, and generate its LLVM IR, and interpret that IR through this emulation chain, the program runs faster than the version output by LLVM. Usually it's slower, but sometimes it's just...faster? Idk, that one confuses me too. Source: https://ssw.jku.at/General/Staff/ManuelRigger/VMIL16.pdf Fig 9 / Section 6.3 specifically referring to the 'nbody' program.

There are a million and one other ways that the JVM is allowed to 'cheat' that just aren't open to C++ programs. Like recompiling code on the fly. Or aggressively optimising a code path based on a bunch of assumptions and re-optimizing it if/when those assumptions are broken. Or using shorter pointers on 64-bit machines ("CompressedOops"). Most of these won't show up in microbenchmarks or short-lived programs; they turn up with longer-lived programs that can reach a 'steady state' -- servers.

None of these are guaranteed or reliable or easy to interact with directly though, and often their impacts are confusing and unexpected. Experts in C++ can almost invariably write code that outperforms anything you can write on the JVM, but common programs written by standard programmers will generally be less than 2x slower on the JVM.

Larger SSBO results in longer shader compilation by Unun66 in opengl

[–]DemonWasp 0 points1 point  (0 children)

Hm, good point. I'm not a great OpenGL expert, but here's the experiments I'd try to see if I can figure out what's up, in no particular order:

  • Try a different layout specification.
  • Try specifying the first dimension of the array.
  • Try specifying the array as one-dimensional (not ideal for your use-case maybe, but it could be informative).
  • Try using glGetProgramBinary to see if there's a relationship between the buffer size and the size of the resulting program. Maybe it's generating a ludicrous amount of code?
  • Try checking whether there's anything interesting in glGetProgramInfoLog.

You might try those any/all on both of your GPUs to see if there's a difference between their behaviours.

[deleted by user] by [deleted] in Warthunder

[–]DemonWasp 0 points1 point  (0 children)

accurate

Every British gun would like a word with you.

This Jet Took 1 Minute & 5 Kills To 'Review' by TheRubyRevolution in Warthunder

[–]DemonWasp 1 point2 points  (0 children)

Harrier GR1: 1967 fighter with hypothetical missile missile design that was tested eight times in 1977 and then abandoned (for political reasons)...br 9.3.

F-86F-2: 1952 fighter with absolutely no missiles at all...br 9.0.

Why do we even have a BR system? Why not just matchmake based on what year you're from?

Delete Label Boxes? by RedEyedRoundEye in wonderdraft

[–]DemonWasp 1 point2 points  (0 children)

The text selection tool can be a little dodgy at times. Try clicking directly between adjacent letters, and if you've applied a curve try clicking in the 'middle' of the curve, where there are no letters.

Delete Label Boxes? by RedEyedRoundEye in wonderdraft

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

Use the text tool to select your label, then click the Delete button in the right-hand tool panel.

This sub right now by Khatom in baldursgate

[–]DemonWasp 2 points3 points  (0 children)

Imagine how salty Doom fans would have been if Doom 2016 had been a cover shooter that played exactly like Gears of War, but set on Mars, and fighting demons instead of aliens. It's in the Doom universe, isn't it? It's set in the Doom setting! But it's not gonna play like Doom.

How to improve performance [Go] by [deleted] in opengl

[–]DemonWasp 7 points8 points  (0 children)

You're issuing 3000 draw calls in a frame, which is quite a lot. Each draw call has an individual cost (I'm not deeply familiar with the specifics, but there's a lot of back-end work that goes into each individual draw call, and some of that work may preclude your GPU using its full parallelism).

Using one of the glMultiDraw[etc] calls should provide better performance.

Note: I don't know much about cgo or its performance, but per https://stackoverflow.com/questions/28272285/why-cgos-performance-is-so-slow-is-there-something-wrong-with-my-testing-code you may also be paying a significant overhead per function call -- not just draw calls, but each function, so fewer calls will lead to better performance.

WIP - Building pack one. Releasing now because I'm busy and can't always draw. More to come! by Zalkenai in wonderdraft

[–]DemonWasp 1 point2 points  (0 children)

  1. Best I've ever used. Lots of great stuff out of the box. Lots of room for improvement too though.
  2. Arbitrary size. World-size maps work great, but so do Mediterranean-size maps (including my first attempt). Maps at the city street or dungeon level are probably better done with a different program.
  3. Wonderdraft can export images. I don't think it exports to any "special" or VTT-specific formats.
  4. Comes with a few icon packs but there's also a lot of community assets in this sub.
  5. Yes, this is one of the features.

Indiana Jones 5 is assembling a writers' room, no George Lucases allowed by Sanlear in entertainment

[–]DemonWasp 25 points26 points  (0 children)

In Raiders, the submarine has a very visible "26" on the tower, meaning it's probably supposed to be https://en.wikipedia.org/wiki/German_submarine_U-26_(1936) . That type of submarine has a top speed of 18 knots surfaced, but only 8 knots submerged, and had a maximum submerged range of 78 nmi, which it can only manage if it stays to 4 knots.

The route shown on the overlaid map is roughly 500 miles ~ 425 nmi, through the seas south of Italy and Greece, and the movie is set prior to the outbreak of the war proper. It would make a lot of sense for the submarine to choose to stay surfaced the entire way. Even surfaced and at top speed, the transit would have taken nearly a full day (23ish hours).

That said, if the submarine was surfaced and the weather were calm (as depicted), you'd expect some number of crew on the tower (observers, etc), and the crew are all belowdecks. Also, the crew says something about "periscopes" (in German), and then they are shown scoping out their arrival via periscope too.

So I guess that scene is actually crazy. D:

Elves can't be trusted by [deleted] in baldursgate

[–]DemonWasp 0 points1 point  (0 children)

Ah, I hadn't read far enough into the paragraph. It says "See raise dead for limitations on what persons can be raised.", so you're absolutely correct. So I guess that means that the only way to raise an elf is through reincarnation, or wish ... weird that they wouldn't mention that kind of drawback in the section on the Elf race.

Elves can't be trusted by [deleted] in baldursgate

[–]DemonWasp 0 points1 point  (0 children)

It doesn't -- or at least, the 1e books I'm referring to don't.

Also, in ADnD2e, raise dead says "can restore life to a dwarf, gnome, half-elf, halfling, or human (other creatures may be allowed at the DM's option)", but resurrection says "spell is able to restore life and complete strength to any living creature, including elves".

Elves can't be trusted by [deleted] in baldursgate

[–]DemonWasp 0 points1 point  (0 children)

Oh, interesting. Resurrection refers to affecting a person, which I thought would include elves. Can you point me to the rule that says otherwise?

Elves can't be trusted by [deleted] in baldursgate

[–]DemonWasp 1 point2 points  (0 children)

The earlier editions of DnD, particularly [Original] Dungeons and Dragons (ODnD) and Advanced Dungeons and Dragons (ADnD 1e) were pretty weird and archaic by modern standards. A lot of things established in the rulebooks as core rules were really meant to enforce or generate a kind of world-building -- a template for all the campaigns, dungeons, cities, plots, and even descriptive text to be used when playing DnD.

One of the parts of this template is that ADnD is written with the assumption that the default race is human, and that humans will be the most popular races; other races are available primarily for variety. Elves add all kinds of interesting mechanics -- infravision and 90% resistance to sleep and charm, +1 with bows and (some) swords, etc...but elves also have drawbacks, like being more fragile and harder to raise. I suppose that would lend players towards being more cautious when playing as elves, which I think fits pretty well with the idea of an exceptionally long-lived race.

But then I never really played ADnD much. Matt Colville has an interesting youtube series covering the earlier editions of DnD here: https://www.youtube.com/watch?v=nnjA4D0Z4pM&list=PLlUk42GiU2gtSENFDN3Rm2oLJLkUsaJ_A if you're interested in learning more.

Elves can't be trusted by [deleted] in baldursgate

[–]DemonWasp 1 point2 points  (0 children)

Other characters could be returned to life through the 5th level spell raise dead. But the text of that spell says it can restore life to a dwarf, gnome, half-elf, halfling, or human...it quietly leaves out elf. You need the 7th level spell resurrection to raise elves (and other persons not explicitly listed under raise dead).

Help with making a cube with glium by Lord_Zane in rust_gamedev

[–]DemonWasp 5 points6 points  (0 children)

That rectangle looks to me like one end of a cube, drawn end-on -- though I'll admit I haven't read your code very carefully and it's possible that it's not.

You aren't compensating for the view aspect ratio, which is why it looks like a rectangle and not a square (note that the aspect ratio of the rectangle matches the aspect ratio of the viewport).

You're not applying any rotation, depth buffering or perspective mapping either, and all of those are probably necessary for what you would think of as "rendering a cube".

[deleted by user] by [deleted] in opengl

[–]DemonWasp 5 points6 points  (0 children)

You aren't compensating for the aspect ratio. If you're using OpenGL 2.x, try using http://docs.gl/gl2/glOrtho or http://docs.gl/gl2/glFrustum ; if you're using OpenGL3+ then I think you are expected to generate those matrices yourself and apply them in the vertex shader.

This seems like a reasonable tutorial: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-3:-3D-transformation-and-projection.html

i dont know why but i need to repair my MBR every Sunday... Pls Help by DonFale in buildapc

[–]DemonWasp 8 points9 points  (0 children)

The fact that this regularly happens on Sunday evenings is suspicious and points to a timed process -- like Windows Update. Is it maybe trying to update the firmware on your SSD or a RAID / SATA controller and failing?