Hi everyone,
In my Celestia intallation, I have a folder in the "extras" directory that contains a bunch of .stc files. However, they are not loaded alphabetically. Why is this?
By the way, this seems only true of macOS. SevenSpheres reports that on Windows, the .stc files are loaded alphabetically.
Luke
Order that Celestia loads files.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
- SevenSpheres
- Moderator
- Posts: 828
- Joined: 08.10.2019
- With us: 5 years 4 months
Found this on one of Selden's pages:
Doesn't say why though.
Edit: I'm above 300 posts already???
Celestia tries to load all of the STC, DSC and SSC files that it finds, in that order. The first part of a Catalog file's name also determines the order in which it is loaded. Catalog files of each type are loaded in alphabetical order under Windows. Under Linux and MacOS, however, you can't always depend on this. As a result, it's best to define all stellar objects in a single STC file and all planetary objects in a single SSC file.
Doesn't say why though.
Edit: I'm above 300 posts already???
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED
- Gurren Lagann
- Posts: 434
- Joined: 31.01.2018
- Age: 18
- With us: 7 years
- Location: State of Rio de Janeiro, Brazil
Congrats! I'm on the forums for over 2 years, and I only have 200+ posts...SevenSpheres wrote:Edit: I'm above 300 posts already???
But yeah, its kinda weird that selden wouldn't say why that's the case.
"The tomorrow we're trying to reach is not a tomorrow you had decided on!"
- Simon the Digger
"Nothing is impossible for me, as long I'm determinated to keep moving forward!"
"If other people aren't going to do it, I'm going to do it myself!"
- Me (Gurren)
Current major projects:
- Aur Cir
- Cel+
- Project Sisyphus
- Populating the Local Group
- An galaxy generator
- Simon the Digger
"Nothing is impossible for me, as long I'm determinated to keep moving forward!"
"If other people aren't going to do it, I'm going to do it myself!"
- Me (Gurren)
Current major projects:
- Aur Cir
- Cel+
- Project Sisyphus
- Populating the Local Group
- An galaxy generator
-
- Site Admin
- Posts: 706
- Joined: 22.09.2018
- With us: 6 years 4 months
- Lafuente_Astronomy
- Moderator
- Posts: 726
- Joined: 04.08.2018
- Age: 26
- With us: 6 years 6 months
- Location: Cebu City, Cebu Province, Philippines
- Contact:
SevenSpheres wrote:I'm above 300 posts already???
You have yet to beat my 600, not to mention many of the OG's have a thousand posts each
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.
Exact loading order defined by the combination of OS, Caching, & entries in file system.
Hence there is no method to control, influence or even effect the load order.
I fixed this in one of my mods, (At selden's request.), and I personally prefer it.
Selden if I remember correctly, noted that it is possible for child to load before parent this way.
By loading everything in alphabetical order, the way you name/order the files can be guaranteed to be how it is loaded.
The code I came up with was offered back then, to which I never received a reply, and the offer remains open.
Though it should be cleaned up by a real C/C++ programmer first.
Janus.
Hence there is no method to control, influence or even effect the load order.
I fixed this in one of my mods, (At selden's request.), and I personally prefer it.
Selden if I remember correctly, noted that it is possible for child to load before parent this way.
By loading everything in alphabetical order, the way you name/order the files can be guaranteed to be how it is loaded.
The code I came up with was offered back then, to which I never received a reply, and the offer remains open.
Though it should be cleaned up by a real C/C++ programmer first.
Janus.
Having add-on files load alphabetically seems to me the most intuitive. At least, I thought they loaded alphabetically when I was doing testing for one of my add-ons.
Cool! It might be useful for you to show us the code changes, so somebody can clean them up and commit to master at a later time.
Janus wrote:I fixed this in one of my mods, (At selden's request.), and I personally prefer it.
Cool! It might be useful for you to show us the code changes, so somebody can clean them up and commit to master at a later time.
Scratch that.
After getting a good look at what has been done, I am rewriting it for my own fork.
The loading routines now use fs::recursive_directory_iterator which makes a very effective random loading order function.
This is the sort of thing I normally remove when I find it, along with any other stateless stuff.
Random loading order is a source of chaos, which makes tracing/troubleshooting very hard.
To be fair though, most of my work is low level, where this sort of high level fluff is just wasted cycles.
It also guarantees you have no way of really knowing what is happening, as it is happening.
Mostly I work in the Mhz range, not Ghz, with KB or MB, not GB, 1 core, not ??? many.
So I am used to thinking in terms of how long is this going ot take, and what else is happening while it does.
I also freely admit to a dislike/mistrust of this sort of 'Trust in the compiler' thinking.
For me, the simpler you can make something, the better.
To me, this sort of abstraction just shoves the complications under the rug.
I have nothing against object oriented programming (OOP) at all.
I use it, more than I like admitting, but it has its place, and filesystem stuff is nominally one of those.
But stateless is never an efficient answer, and seldom traceable.
I will be writing my own alphabetical loading routine.
Once I have it, I will post a build in my forking thread, along with code.
If anyone wants to use it, they are welcome to.
I also renew my warning, I am not a real C/C++ programmer.
So whatever code I post will not be pretty, just functional.
Janus.
After getting a good look at what has been done, I am rewriting it for my own fork.
The loading routines now use fs::recursive_directory_iterator which makes a very effective random loading order function.
This is the sort of thing I normally remove when I find it, along with any other stateless stuff.
Random loading order is a source of chaos, which makes tracing/troubleshooting very hard.
To be fair though, most of my work is low level, where this sort of high level fluff is just wasted cycles.
It also guarantees you have no way of really knowing what is happening, as it is happening.
Mostly I work in the Mhz range, not Ghz, with KB or MB, not GB, 1 core, not ??? many.
So I am used to thinking in terms of how long is this going ot take, and what else is happening while it does.
I also freely admit to a dislike/mistrust of this sort of 'Trust in the compiler' thinking.
For me, the simpler you can make something, the better.
To me, this sort of abstraction just shoves the complications under the rug.
I have nothing against object oriented programming (OOP) at all.
I use it, more than I like admitting, but it has its place, and filesystem stuff is nominally one of those.
But stateless is never an efficient answer, and seldom traceable.
I will be writing my own alphabetical loading routine.
Once I have it, I will post a build in my forking thread, along with code.
If anyone wants to use it, they are welcome to.
I also renew my warning, I am not a real C/C++ programmer.
So whatever code I post will not be pretty, just functional.
Janus.