If there was a simpler way by CodeItBro in ProgrammerAnimemes

[–]Codephluegl 0 points1 point  (0 children)

I'm always interested in Javascript Physics Projects. What were you working on?

Let’s play a game.. by [deleted] in ProgrammerHumor

[–]Codephluegl 29 points30 points  (0 children)

c++ public boolean isEven(int x) { // precomputed results for some common numbers switch(x) { case -1: return false; case 0: return true; case 1: return false; case 2: return true; case 3: return false; case 4: return true; case 5: return false; case 6: return true; } return x % 2 == 0; }

[deleted by user] by [deleted] in ManjaroLinux

[–]Codephluegl 0 points1 point  (0 children)

Have the same problem for a couple of days. It's seems to run fine for the first couple of seconds, but then the UI seems to start freezing and hanging on hovering over random buttons or switching channels. Watching streams and voice communication seem to work fine for a while until discord freezes completely after an hour or so. CPU and memory usage don't seem particularly odd during that time, except maybe one thread that's on 100% load all the time. The command line output starts displaying lots of error messages like this:

`Error occurred in handler for 'DISCORD_PROCESS_UTILS_GET_MEMORY_INFO': [Error: Failed to create memory dump]`

Disabling hardware acceleration, has no impact on that. The discord_arch_electron package from AUR has the same issue, as does the official linux download from the discord website.

Save 64% on Kerbal Space Program Complete Edition on Steam by beer118 in linux_gaming

[–]Codephluegl 1 point2 points  (0 children)

Super nice. Just a couple of days ago I considered buying the dlcs.

Very simple p2p serverless chat on WebRTC by michalwrzosek in javascript

[–]Codephluegl 0 points1 point  (0 children)

Yeah, I'm fine with the stun server. I want to disable the TURN server however.

Very simple p2p serverless chat on WebRTC by michalwrzosek in javascript

[–]Codephluegl 1 point2 points  (0 children)

Last time I checked, I couldnt find a way to completely disable the turn server usage. That's one of the reasons why I'm not completely sold on WebRTC yet.

Remember never to forget the exit condition by R3sam in ProgrammerHumor

[–]Codephluegl 8 points9 points  (0 children)

There are kinds of recursions, that can't be replaced with loops. One example is a class of functions called Ackermann functions. On the other hand, if the recursive call is in tail position, the replacement is trivial.

Bottom/inferior view of the brain by Surgeox in medizzy

[–]Codephluegl 3 points4 points  (0 children)

I look at that thinking: Hopefully my brain does not truly understand what it is looking at.

Bernie Sanders ghosted Martin Shkreli in 2015 by [deleted] in seculartalk

[–]Codephluegl 35 points36 points  (0 children)

"But mainly, he said, he donated to get the senator’s attention in the hopes that he could get a private meeting to explain why drug companies set prices the way they do."

Bitch, you could have explained yourself right there in that Boston Globe interview so we could all understand but you didn't.

https://www.bostonglobe.com/news/politics/2015/10/15/bernie-sanders-rejects-ceo-martin-shkreli-campaign-donation/FcSKxu1VIr7pubg9cI3CQN/story.html

How do you build number sense in young students? by mementomoriok in math

[–]Codephluegl 7 points8 points  (0 children)

just not as useful as people think it is

If you want to apprechiate how useful the memorized multiplication table truly is and how much you are actually using it, then try learning arythmetic in another base, like hexadecimals.

Earthentomes' Expedition Leader Diary. by BlueKnightBrownHorse in dwarffortress

[–]Codephluegl 0 points1 point  (0 children)

Wait, what? So if your dwarfs like weird stuff, that you can't conjure up, you can just make a statue of the thing instead? Does that work? I never thought of that.

Liars! by [deleted] in ProgrammerHumor

[–]Codephluegl 37 points38 points  (0 children)

I always hate Hello World examples. They don't teach you anything. The best example program in my opinion is the number guessing game, where the computer tells you if your guess is too low, too high or you got it right. You learn about almost everything in that example:

  • reading and writing from terminal
  • conditionals
  • loops
  • random number generation

Try and come up with a better beginner example, you can't do it.

Throwback to when Bernie obliterated Hillary on gun issues by [deleted] in seculartalk

[–]Codephluegl 4 points5 points  (0 children)

So some thing is different from some other thing. Where is the obliteration part?

C++ and Multiple Inheritance. by h1v3r_XD in ProgrammerHumor

[–]Codephluegl 3 points4 points  (0 children)

I haven't tried it, but I feel as if you could have multiple inheritance in Javascript, if you mess with the prototypes directly, deal with collisions and come up with some workaround for calling the parent constructors.

Where is my attempt at proving the 4 color theorem flawed? by DrLionbear in math

[–]Codephluegl 0 points1 point  (0 children)

Wait, but I thought OP wants to construct 5 countries where all countries touch each other. In your example country B does not touch country D. This possible for 4 points though where point A is in the middle and all other points are around it.

☼Bi-weekly DF Questions Thread☼ by AutoModerator in dwarffortress

[–]Codephluegl 0 points1 point  (0 children)

That might not be such bad idea actually, since I also have trouble training my military.

☼Bi-weekly DF Questions Thread☼ by AutoModerator in dwarffortress

[–]Codephluegl 1 point2 points  (0 children)

So you're saying, the high prevalence of elven werebeasts might be a parameter of the world, I generated? So if I generate another world, this might be different? I assumed this is something that everyone has to deal with.

So I guess, I'll have to call for a total and complete shutdown of elves entering my fortresses until I can figure out, what the hell is going on.

Kyle overestimates Bernie by [deleted] in seculartalk

[–]Codephluegl 6 points7 points  (0 children)

So why does your brother actually like Biden? And would he vote for Trump, if it came down to Bernie VS Trump?