-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swe_gauquelin_sector() crashes the program #65
Comments
Do you think this is a bug in this library or the Swiss Ephemeris itself? |
It should be a bug in this library, possibly also related to NAN. This is not the only function that has issues when trying to use NULL or empty strings as parameters. I have since moved to a different library ( |
Is that |
yes it is, its fairly recent so it might not have been on npm yet at that time |
May I ask why you created another package? |
different direction, different philosophy, different goals, different API (the latter requiring a full rewrite from scratch anyway) and i dont want force my ideas onto someone else's library, especially when they require basically deleting everything the other person did. |
My goal is to use the Swiss Ephemeris functions efficiently. In what way is your library different than this one? |
Not sure if this is the appropriate place to discuss this, but here: From a user perspective, the main difference is that the sweph api is as close as possible to the original C api, while swisseph makes some adaptations. For example sweph returns everything to the user, including flags and error messages, while swisseph handles flags internally and gives only the relevant data to the user. Most sweph functions return data as indexed arrays like the C api does, swisseph converts them to key-value objects with custom keys. Internally, sweph uses N-API (node addon api), swisseph uses NAN (native abstractions for node). N-API has many advantages over NAN but most importantly its a standard that guarantees that the C code will work in all future versions of node.js, while NAN cannot guarantee this and requires testing every time a new node.js version comes out. You cannot convert swisseph from NAN to N-API without rewriting it from scratch. Swisseph is an older project, has been around for a while, and maintaining old projects is a big pain for developers, so its understandable the owner and original maintainers are not very active anymore. I was the one who updated swisseph the last few times instead because i needed it, but maintaining someone else's project is also not easy due to differences in ideas, style, waiting for approval, etc... Therefore the best course of action was to make a separate project my own way. The end result is that sweph is easier for me to use, maintain and update, which i plan to for the foreseeable future. If you would like to discuss further, feel free to contact me or open an issue in the sweph repo. |
Thanks a lot for taking the time and writing this summary. I'll really have to take a close look at your library and try it out. Nevertheless I'm going to finish the work I started in improving this library as I don't like leaving things undone. |
just a heads up:
Using swe_gauquelin_sector() with methods 0 or 1 crashes the program. Methods 2, 3, 4 and 5 are not affected, however using stars does not work.
tests (using node v12):
The function should prioritize stars if a star string is present and it should fallback to planets if an empty star string is given. I have attempted to fix this problem without success.
This issue is not important as swe_house_pos() can be used as a replacement, and in most cases, using swe_houses_pos() should be more appropriate anyway.
The text was updated successfully, but these errors were encountered: