Skyler4856

For Questions That Don't Merit Their Own Thread

Recommended Posts

7 hours ago, kerbiloid said:

The item index is just an offset from the buffer beginning. So, it's by definition 0 for the very first item.

(Unless it's Pascal, and the language author wants to show off)

Or Lua, which indexes from 1 because of reasons. (Well, okay, actually it's because in Lua, all arrays (and all composite data types) are hash maps, which means the starting index is arbitrary since it's just the key component of a key-value pair located somewhere in the hash table. They chose 1, I think, to make it friendlier to non-programmers)

Share this post


Link to post
Share on other sites

@IncongruousGoat, do you know how floating point 0s are represented ?

Wikipedia fabulates sign as computed, exponent and mantissa 0. But at least in GCC/G++ this is not the case, when float 0.0 are cast to integer they have (big) values.

Share this post


Link to post
Share on other sites
Posted (edited)
5 minutes ago, Green Baron said:

@IncongruousGoat, do you know how floating point 0s are represented ?

Wikipedia fabulates sign as computed, exponent and mantissa 0. But at least in GCC/G++ this is not the case, when float 0.0 are cast to integer they have (big) values.

That's... odd. I just compiled (with gcc) and ran this tiny C program on my machine:

#include <stdio.h>

int main() {
    float f = 0;
    long a = *(long *) &f;

    printf("%ld\n", a);
    return 0;
}

And got '0' as output. Which is what it should be - Wikipedia is right on this one. Floating point is one of those things that is, miraculously, quite well standardized.

Edited by IncongruousGoat
  • Like 1

Share this post


Link to post
Share on other sites
37 minutes ago, IncongruousGoat said:

Well, okay, actually it's because in Lua, all arrays (and all composite data types) are hash maps

As I can see, the same in PHP

Share this post


Link to post
Share on other sites
1 minute ago, kerbiloid said:

As I can see, the same in PHP

And in many implementations of Python, although it isn't explicitly so in the language spec.

Share this post


Link to post
Share on other sites
42 minutes ago, IncongruousGoat said:

And got '0' as output. Which is what it should be - Wikipedia is right on this one. Floating point is one of those things that is, miraculously, quite well standardized.

I swear it didn't work yesterday, but it does today ... :blush:

Share this post


Link to post
Share on other sites
1 hour ago, Green Baron said:

I swear it didn't work yesterday, but it does today ... :blush:

I see the bit rot is setting in. I think you need to get your computer fumigated - once the little byters get in there's no other way to remove 'em.

:P

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)
20 hours ago, IncongruousGoat said:

Nope.*snip*

But the rest of my logic applies, yes?  I made a guess at the reason behind it, but the previous answers seemed way to specific for such a general question. 

 

 

Edited by Gargamel

Share this post


Link to post
Share on other sites
59 minutes ago, Gargamel said:

But the rest of my logic applies, yes?

Yeah, it does.

Share this post


Link to post
Share on other sites

We've had a couple questions here about computer programming, both theory and practice. Should we start a general programming help/discussion thread?

  • Like 2

Share this post


Link to post
Share on other sites

Let's see if I can formulate this as a question...

So, I stumbled upon a YT video and I just wanted to ask you if you also think that this is the nerdiest thing ever?

For all you sorting algorithm aficionados, I present you the Quick-sort, the not so quick way.

I can see a few redundant steps and a bit more shuffling than necessary, but all in all it's all sorted out.

Watch out for the end cards, there's more.

  • Like 5

Share this post


Link to post
Share on other sites

Cool, thanks:-)

Is there a towers of Hanoi dance too :-) ?

  • Like 1

Share this post


Link to post
Share on other sites

Not a question, just a gripe.

I wish news writers would stop using the phrase "dark side of the moon" in connection with the recent Chang-E landing.  Even when they call out in the article that the far side is not the same thing as "the dark side," the phrase still tends to crop up in the headline.

There's as much a "dark side of the moon" as there is a "dark side of the Earth," for Pete's sake!  It's called "night."

[/gripe]

  • Like 2

Share this post


Link to post
Share on other sites
22 hours ago, MaxwellsDemon said:

Not a question, just a gripe.

I wish news writers would stop using the phrase "dark side of the moon" in connection with the recent Chang-E landing.  Even when they call out in the article that the far side is not the same thing as "the dark side," the phrase still tends to crop up in the headline.

There's as much a "dark side of the moon" as there is a "dark side of the Earth," for Pete's sake!  It's called "night."

[/gripe]

Preach!

Its all Pink Floyd's fault.

Share this post


Link to post
Share on other sites
2 hours ago, p1t1o said:

Its all Pink Floyd's fault.

“There is no dark side of the Moon really. As a matter of fact it’s all dark.”

Share this post


Link to post
Share on other sites
On 1/6/2019 at 10:02 AM, MaxwellsDemon said:

Not a question, just a gripe.

I wish news writers would stop using the phrase "dark side of the moon" in connection with the recent Chang-E landing.  Even when they call out in the article that the far side is not the same thing as "the dark side," the phrase still tends to crop up in the headline.

There's as much a "dark side of the moon" as there is a "dark side of the Earth," for Pete's sake!  It's called "night."

[/gripe]

You know, I have no issue with this, as long as the people using it understand what it actually means.   Yes, the world is loaded with the uninformed, but I like the phrase. 

10 hours ago, p1t1o said:

Its all Pink Floyd's fault.

Yup, but it's the dark side like Facial tissues are "Kleenex", adhesive bandages are "Band aids", and resealable plastic baggies are "ziplocks". 

Just like our sun is called The Sun, but another planet's sun is not our sun, yet to it, it is still The Sun. 

Share this post


Link to post
Share on other sites

Had an interesting thought in the shower the other day...

 

Are turbopumps designed for a particular absolute outlet pressure, or a particular gauge pressure? I.E. If you raise the inlet pressure from 1.2 atmospheres to, say, 5.2 atmospheres (for an engine on Eve, for example), would the turbopump output the same pressure as it would at 1.2 atmospheres, or would it output normal pressure plus 4 atmospheres?


I hope that makes sense to everyone else... I'm kinda tired and I JUST remembered this and wanted to ask.

Share this post


Link to post
Share on other sites
2 hours ago, MaverickSawyer said:

Had an interesting thought in the shower the other day...

 

Are turbopumps designed for a particular absolute outlet pressure, or a particular gauge pressure? I.E. If you raise the inlet pressure from 1.2 atmospheres to, say, 5.2 atmospheres (for an engine on Eve, for example), would the turbopump output the same pressure as it would at 1.2 atmospheres, or would it output normal pressure plus 4 atmospheres?


I hope that makes sense to everyone else... I'm kinda tired and I JUST remembered this and wanted to ask.

The issue is not the turbo pump as the pressure in the chamber will be in the 80-200 atmospheres who is far higher than the atmosphere. 
It has more to do with the engine bells, Scott Manley made an excelent video about this but can not find it

Share this post


Link to post
Share on other sites

But, if as in my example, you have a higher ambient pressure and you raise the chamber pressure to achieve the same pressure differential as you would on Earth, would that resolve the nozzle issues? And it'd be easy enough to handle the lower ambient pressure as you climb... You monitor ambient pressure and regulate chamber pressure to maintain a given pressure differential until a set point. It's kinda the reverse of an airliner cabin pressurization system.

Share this post


Link to post
Share on other sites
9 hours ago, MaverickSawyer said:

I.E. If you raise the inlet pressure from 1.2 atmospheres to, say, 5.2 atmospheres (for an engine on Eve, for example), would the turbopump output the same pressure as it would at 1.2 atmospheres, or would it output normal pressure plus 4 atmospheres?

Doesn't make too much sense, admittedly, because the tank is usually airtight and then artificially pressurized to a given pressure. The turbopump can be then added to further increase the pressure at the injector.

An anecdote that might address your concern is that, for altitude start, several early Soviet launches used literally plugged nozzles to maintain ASL pressure at ignition - and the feature was eventually omitted with no consequences. Furthermore, high-altitude engines can be tested at ground level with reduced-length nozzles, with all components performing nominally.

4 minutes ago, MaverickSawyer said:

But, if as in my example, you have a higher ambient pressure and you raise the chamber pressure to achieve the same pressure differential as you would on Earth, would that resolve the nozzle issues? And it'd be easy enough to handle the lower ambient pressure as you climb... You monitor ambient pressure and regulate chamber pressure to maintain a given pressure differential until a set point. It's kinda the reverse of an airliner cabin pressurization system.

You should be able to get away with a lower expansion ratio.

After all, the pressure in the exhaust is already lower than ambient pressure.

Share this post


Link to post
Share on other sites

I'm not worried about altitude starts... that's easy enough and well understood. I'm talking about running an engine semi-efficiently at atmospheric pressures greater than sea level, such as on Venus IRL, or on Eve in KSP.

Share this post


Link to post
Share on other sites
10 minutes ago, MaverickSawyer said:

I'm talking about running an engine semi-efficiently at atmospheric pressures greater than sea level, such as on Venus IRL, or on Eve in KSP.

Venus may be trouble, but Eve is absolute peanuts compared to chamber pressures encountered in a typical motor (up to 273 atm in an RD-170-family, more in the Raptor). That said, since thrust is generated by expanding the exhaust to below ambient pressure, you'll lose a lot of it with a shortened nozzle.

Ultimately, it's my guess that it would be possible to overpressurize each part of the system, including the combustion chambers, to get Earthlike performance without added structural mass. This might be a problem if you carry dedicated pressurizing gas, as it's typically is with kerosene tankage, but not if you use autogenous vapour or a gas generator (or the R-36 style of putting some hypergolic propellant into the other tank).

Share this post


Link to post
Share on other sites

In media and pictures, the space elevator is always seen as singular, and alone. But wouldn't it make more sense to branch off the spaceport, or whatever is holding the space elevator up, and building multiple elevators/tethers down to the same area for larger capacity? In the space elevator episode from Isaac Arthur, he mentions having tethers reaching across continents, but I'm talking about tethers relatively close by to each other.

Share this post


Link to post
Share on other sites
1 hour ago, Spaceception said:

In media and pictures, the space elevator is always seen as singular, and alone. But wouldn't it make more sense to branch off the spaceport, or whatever is holding the space elevator up, and building multiple elevators/tethers down to the same area for larger capacity? In the space elevator episode from Isaac Arthur, he mentions having tethers reaching across continents, but I'm talking about tethers relatively close by to each other.

The tethers on space elevator is based on how stabilizing tethers holding the stability of large structural towers in real life. For the scale of the space elevator, it makes sense building a tethers that reach across continents, owing to it's massive size. However, if you build a tether relatively close to each other, the tension load would be far greater compared if the tethers are spaced far away from each other. A tall structure that's tethered in close proximity of it's base would be highly stable, but too stiff and very sensitive to damage, given the tethers are under far stronger constant load, and almost unable to compensate for wind (a structure that big is still need some safety margin about wind blowing around it). Another problem is, if I interpret what you said literally, branching off from whatever nailed on top of the elevator to build the tether there would be a bad idea (mainly because of instability and fragility). Isn't it more logical to anchor the tether from the ground to the top of the tower you're supposed to stabilize instead of anything that's branched off from the peak of the tower?

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, Spaceception said:

In media and pictures, the space elevator is always seen as singular, and alone.

Sometimes they draw a snowflake of space elevators connected with a ring.
(At least they did it in 1970s sci-fi magazines).

Found it. Sorry, in Russian.

Spoiler

4-42.jpg


https://testpilot.ru/espace/bibl/tm/1977/4-kos-oj.html

Edited by kerbiloid
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now