Search found 430 matches

by Tub
Mon Mar 11, 2019 9:25 pm UTC
Forum: Science
Topic: Extracting energy from a black hole via gravitational blueshift
Replies: 20
Views: 802

Re: Extracting energy from a black hole via gravitational blueshift

The Ferris wheel was in response to ijun's "climbing out of the gravity well" wording. It's not a perfect analogy, but it shows that if you take a system that's stable due to inertia and use it to lift stuff against gravitation (i.e. do work), you will affect the system. If the analogy doe...
by Tub
Sun Mar 10, 2019 10:50 am UTC
Forum: Science
Topic: Extracting energy from a black hole via gravitational blueshift
Replies: 20
Views: 802

Re: Extracting energy from a black hole via gravitational blueshift

The mass of a satellite has no bearing on its orbit, right? That's true for a constant mass, but you're adding and removing mass mid-flight. It's true for a Ferris wheel that (ignoring friction) it will keep its rotational speed forever, regardless of mass. But if you start loading cinder blocks at...
by Tub
Thu Mar 07, 2019 3:41 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

frames are just windows. Isn't there something like myIframe.contentWindow.history.back() ?
by Tub
Tue Mar 05, 2019 10:10 am UTC
Forum: Science
Topic: Biggest Telescope
Replies: 2
Views: 327

Re: Biggest Telescope

What is your desired spatial and temporal resolution? Angular resolution is strictly limited by aperture size and wavelength. An internet search turns up the Dawes' limit. It's not perfect, but it seems to be good enough for an approximation, and the formula is simple enough that you can plot your o...
by Tub
Wed Feb 27, 2019 10:44 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

So the tl;dr is that let/const are not just scoping restrictions, but the runtime will actually create a new variable each time program flow encounters a let/const declaration for capturing purposes. Hence, implementing let/const requires more than resolving naming conflicts, enforcing temporal dead...
by Tub
Tue Feb 26, 2019 10:50 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

return ; //<- inserted here { a: 42 } ; //<-and here Yeah I came across that too when advocating my non-use of semicolons. Opening-bracket-on-the-same-line styles save the day once more. :lol: Interesting that you got it wrong, then. Hint: that's not an object literal there. I predict you're going ...
by Tub
Tue Feb 26, 2019 1:01 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

... kmlReq.addEventListener('load', () => { const routes = toGeoJSON.kml(kmlReq.responseXML) const features = routes.features.map(({'geometry': g, 'properties': { 'name': n='' }}) => ({'name': n, 'geom': g})) //flatten the structure a bunch const [points,paths] = features.partition(({'geom': {'type...
by Tub
Mon Feb 25, 2019 9:27 am UTC
Forum: Computer Science
Topic: CSS Sins
Replies: 4
Views: 638

Re: CSS Sins

Can you please make that css crash the browser? I feel like it should crash the browser.
by Tub
Thu Feb 21, 2019 12:03 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 2113: "Physics Suppression"
Replies: 23
Views: 2521

Re: 2113: "Physics Suppression"

Ignore hydrogen for a moment, because nucleosynthesis didn't happen until after inflation ended. What's important is that you can take one empty volume of space and stretch it into two empty volumes of space. As space is never "empty", you've now created both new space and new energy, for ...
by Tub
Wed Feb 06, 2019 10:44 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

I really don't know where my computer is getting its language settings from. I know that some websites will stupidly use geoip databases to determine my language instead of just looking at the HTTP header that I specifically configured to request english. But local software? I install and configure ...
by Tub
Tue Feb 05, 2019 9:26 pm UTC
Forum: Mathematics
Topic: The frog riddle
Replies: 23
Views: 2871

Re: The frog riddle

But then by your account conditional probability is never usable[...] So the idea that I cannot account for every small factor means that I get to ignore the big factors without having to care about confidence or error bars? The point the video shows, correctly, is that the knowledge that at least ...
by Tub
Tue Feb 05, 2019 5:20 pm UTC
Forum: Mathematics
Topic: The frog riddle
Replies: 23
Views: 2871

Re: The frog riddle

*sigh* that's not how conditional probability works. Just like the endless misunderstandings of the monty hall problem, this one depends on a hidden question: What's making the frog croak? You gained some information, but how did you gain it, and how likely were you to gain exactly this information ...
by Tub
Wed Jan 30, 2019 11:05 am UTC
Forum: Individual XKCD Comic Threads
Topic: 2105: "Modern OSI Model"
Replies: 21
Views: 3323

Re: 2105: "Modern OSI Model"

As for an explanation, Wikipedia explains the OSI model.

The comic is missing the cloudflare layer though.
by Tub
Sun Jan 13, 2019 10:24 am UTC
Forum: Mathematics
Topic: Math: Fleeting Thoughts
Replies: 427
Views: 139830

Re: Math: Fleeting Thoughts

1 degree is about -25.56 dB. The units check out.
by Tub
Fri Jan 11, 2019 7:03 pm UTC
Forum: Mathematics
Topic: Math: Fleeting Thoughts
Replies: 427
Views: 139830

Re: Math: Fleeting Thoughts

by Tub
Mon Jan 07, 2019 6:03 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

Collins Scrabble Words 2015 (276,643 words) (not linking it here, apparently word lists can be copyrighted..) The largest component has 85,526 words. Everything else is in components with 100 or less. 44692 words have no neighbour at all; making it very tempting to sneak one of them into the word ga...
by Tub
Fri Jan 04, 2019 12:25 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

The longest path problem is NP-hard. No good approximations are known. I wouldn't advise trying to solve this exactly on >100k nodes. Memory is not going to be a problem, but there's just too many possible paths to check them all. The good news is that we can place an upper bound k on the amount of ...
by Tub
Tue Jan 01, 2019 2:03 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

To me that reads "initialize no members to a particular value" i.e. don't initialize anything. Why did the C people decide that all unlisted members in an initializer list should be zeroed? I wasn't part of that decision, but I can take a guess. An initializer list is not a shorthand for ...
by Tub
Mon Dec 31, 2018 12:27 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

It would have performance impact on some code bases. You'd have to add a way to create uninitialized data for those that care. But there already is a compatible and standardized way to specify whether you want initialized or uninitialized memory for your struct. To create uninitialized data you wri...
by Tub
Wed Dec 19, 2018 12:23 pm UTC
Forum: Science
Topic: What is my Exact Mailing Address?
Replies: 11
Views: 1843

Re: What is my Exact Mailing Address?

Your exact mailing address depends on the address format expected by your postal service. Name, Street, City, State, Country seems popular for classic parcel delivery, but I'm sure there are some delivery methods that prefer lat/lon coordinates. To satisfy your curiosity, the hierarchy beyond that i...
by Tub
Wed Dec 12, 2018 3:01 pm UTC
Forum: Science
Topic: Building a chair out of glue
Replies: 6
Views: 1312

Re: Building a chair out of glue

The premise is a bit simplified. Wood is likely to split along the grain, and its strength depends a lot on the orientation of the wood and the type of force you apply. If you apply forces that the wood is weak against, then it'll often break along the grain instead of along a glued seam. For differ...
by Tub
Wed Dec 05, 2018 5:13 pm UTC
Forum: Science
Topic: disproof of boltzman brain?
Replies: 55
Views: 7207

Re: disproof of boltzman brain?

That then raises the question of refining our definition of “creates more”—do we consider the creation of a small number N minds which then reproduce P offspring as being the same probability as the de novo creation of N+P minds? You don't calculate the chance of an organic brain appearing. You cal...
by Tub
Tue Dec 04, 2018 12:47 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

This could be perfectly harmless, if your total average throughput matches what the disk supports. In a perfect world, network speed would adjust to disk speed, but several layers of buffers and queues may prevent that. IIRC there are a few procfs/sysctl knobs you can try to influence dirty page han...
by Tub
Mon Dec 03, 2018 11:53 pm UTC
Forum: Gaming
Topic: I need a Game Recommendation
Replies: 1559
Views: 372445

Re: I need a Game Recommendation

I have a few more recommendations that I have enjoyed with my partner. * Stardew Valley. It recently got a multiplayer update. * Heroes of Hammerwatch. Very fun roguelike dungeon crawler. * Victor Vran. Action RPG with an approachable combat system. Has a rather clicheed story but excellent storytel...
by Tub
Mon Dec 03, 2018 11:08 am UTC
Forum: Science
Topic: How does calibrating hygrometers with salt work?
Replies: 4
Views: 1199

Re: How does calibrating hygrometers with salt work?

Story time. I once bought a bunch of cheap DHT22 sensors to measure temperature and humidity at home. They're digital, "no calibration needed", yet no two sensors would agree on a value. IIRC the largest span was a difference of 10% humidity, which can be the difference between "you n...
by Tub
Sat Dec 01, 2018 12:29 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

EDIT: completely unrelated, but in modern C++, what is the consensus on defining inline functions in header files: good practise or bad? .cpp file: "Eh, I guess a really smart compiler could still inline it" .h file: as inline "I trust the compiler to make a good choice. The linker w...
by Tub
Wed Nov 21, 2018 8:53 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

The ABI's consistent If that is the case, then you'd expect v1 to be a symlink to v2, and you wouldn't have this trouble. If you wish to override a vendor-supplied binary, you can use LD_PRELOAD to make app use your system's v2. "foo" and "bar" are C (and we can compile both). H...
by Tub
Wed Nov 21, 2018 6:34 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

my intuition tells me that "bad things" could happen. That is a reasonable default assumption. If you wish to dive into the inner workings of symbol resolution, read this: https://akkadia.org/drepper/dsohowto.pdf >> Are there two instances of "foo" loaded? Yes. Unless they're th...
by Tub
Tue Nov 20, 2018 5:53 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

There are a bunch of nice css transforms, powerful enough to create a full animated 3d layout, if you like. When clicking somewhere, the browser will reverse those transforms, accurately determining which element was under the mouse pointer at the time of the event. At the same time, the browser wil...
by Tub
Wed Nov 14, 2018 5:51 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

More can be added as needed, of course (-pthread always works with my preferred configuration, and I'm not going out of my way to test vastly different configurations until someone else hits a snag). That seems reasonable. If you take a closer look at that SO thread you linked, you'll notice that t...
by Tub
Wed Nov 14, 2018 9:59 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9943
Views: 1907606

Re: Coding: Fleeting Thoughts

clang generally does not require -stdlib=libstdc++. That SO link is quite old, and the runtime error suggests that the then-recent version of libc++ simply lacked support. I think the autotools way would be to attempt different configurations until one compiles and works (starting with no parameters...
by Tub
Mon Oct 29, 2018 10:45 am UTC
Forum: Coding
Topic: avoiding coding "representation errors"
Replies: 20
Views: 10264

Re: avoiding coding "representation errors"

Jose, if you really wish to make the point that string concatenation is fine for html creation, please start by implementing that clean() function that you keep using, such that it produces correct and safe html in any case. Multiple people have explained to you why that's problematic, but you've ig...
by Tub
Fri Oct 26, 2018 10:40 pm UTC
Forum: Coding
Topic: avoiding coding "representation errors"
Replies: 20
Views: 10264

Re: avoiding coding "representation errors"

Because $start+$middle+$end could contain a $middle that accidentally closes a tag in $start? Creating html via string concatenation is bad for the same reason that creating database queries with string concatenation is bad . One leads to XSS attacks, the other to sql injection. The same problem ex...
by Tub
Fri Oct 26, 2018 3:02 pm UTC
Forum: Coding
Topic: avoiding coding "representation errors"
Replies: 20
Views: 10264

Re: avoiding coding "representation errors"

On the topic of "making wrong code look wrong", the two things that look wrong when I read the article are: * using string concatenation to generate html * cleanup code outside of a destructor or finally block Clean code is a rather subjective and debatable thing, but in this case I'd rath...
by Tub
Wed Oct 24, 2018 12:29 pm UTC
Forum: Fictional Science
Topic: Asimov's 3 laws
Replies: 17
Views: 4896

Re: Asimov's 3 laws

For reference: https://en.wikipedia.org/wiki/Three_Laws_of_Robotics As you'd expect, if you try to boil down a legal system into three simple statements, there will be loopholes. The three laws don't deal with conflicting human commands, they don't resolve all the moral dilemmas involving train trac...
by Tub
Sat Oct 20, 2018 9:42 am UTC
Forum: Science
Topic: disproof of boltzman brain?
Replies: 55
Views: 7207

Re: disproof of boltzman brain?

But if you looked at another planet and saw it was in a low entropy state, wouldn't your conclusion be that most likely life was on there? You snuck in a claim here, implying that earth has the lowest entropy of the planets in the solar system, because there's life on it. As far as I can see, our a...
by Tub
Fri Oct 19, 2018 9:18 pm UTC
Forum: Science
Topic: disproof of boltzman brain?
Replies: 55
Views: 7207

Re: disproof of boltzman brain?

I'll ignore all the unrelated and unscientific drivel about gods for now.. I'm a bit burnt out right now so these are not the clearest thoughts, but it seems intuitively wrong to me that specifically a fully-formed brain having (illusory) experiences or memories of a universe like ours is more likel...
by Tub
Fri Oct 19, 2018 8:15 pm UTC
Forum: Coding
Topic: Tree diagrams
Replies: 2
Views: 3597

Re: Tree diagrams

If you want to draw it yourself, recursively printing each node and its children with indentation is easy, like sin / + * alpha 2 5 57.29577951308232 For some actual graphical output, use a library. My favorite tool for graph drawing is graphviz; it does have a javascript port. d3 is also popular. A...
by Tub
Fri Oct 19, 2018 5:12 am UTC
Forum: Science
Topic: disproof of boltzman brain?
Replies: 55
Views: 7207

Re: disproof of boltzman brain?

So i read the wikipedia page on boltzman brains, saying that self-aware observers are probably spontaneous fluctuations. If our universe is in thermal equilibrium, with any low-entropy structures arising as the result of random fluctuations, then most observers would be bolzmann brains. That's a bi...
by Tub
Mon Oct 15, 2018 10:18 pm UTC
Forum: Coding
Topic: write a C++ please
Replies: 18
Views: 6283

Re: write a C++ please

Did I do good? You're mixing std::endl with "\n". The standard does not guarantee those to be equal. It's not going to be portable to my upcoming operating system, which uses utf8 emojis instead of ASCII control characters or ANSI escape sequences. Otherwise, I see no portability issues. ...

Go to advanced search