Astronomical Calculations for Hard SF in Common Lisp
borretti.me
borretti.me
I also showed where these positions are on the board of the game "StarForce: Alpha Centauri". This game uses a map based on the real world positions of stars. See: "Project Hail Mary and StarForce: Alpha Centauri" https://dwheeler.com/essays/project-hail-mary-starforce.html
Code and data are posted as well.
It's my hope that doing these kinds of this will increase interest in both science and hard science fiction. I think those interests should be in a self-reinforcing loop.
>Plotting is always tedious, but happily I was able to use ChatGPT to write most of the plotting code. I asked it to generate a simple example of a scatterplot with labeled points—that is, stars. Then I modified the presentation a bit, changing colours and font sizes, but the static plots have the problem that the perspective makes it hard to know where places really are.
>So I showed ChatGPT my plotting code, and asked it to rewrite it to create an animation where the entire plot is rotated about the vertical axis. It rewrote the script, preserving bit-for-bit identical output, and added animation support. I got an inscrutable error, showed it to ChatGPT, and it suggested a fix. I’m really happy with this approach.
Forget the turing test, conquering matplotlib is the real feat of machine intelligence.
And I really enjoyed the story, and the other one in the same universe:
https://borretti.me/fiction/maker-of-rivers
>This is the noocene: 10^30 immortal souls scattered over a billion stars, across a disk eight thousand light years in diameter. And a pantheon of some seven hundred gods, who have changed the face of nature. Most leave them a wide berth: the stars around Sadalmelik are not settled.
>And when gods die, grave-robbers flock to them and dig a quarry out of their bodies. This is the crew of the Epiphany: explorers who sift through the middens of collapsed civilizations and rob the graves of the gods, searching for beautiful things. This is the Epiphany: a treasure ship, laden to the gunwales with precious things from every world and every age, and the burial hoards of the gods.
I truly actually laughed out loud here.
Another resource is the star/exoplanet catalogs at (https://exoplanetarchive.ipac.caltech.edu/docs/MissionStella...), see also (https://exoplanetarchive.ipac.caltech.edu/).
Disclaimer: I am the primary unyt maintainer.
The one thing I really like about the Astropy system is that it's built on PEP-593 annotations and Numpy, The former being effectively free and transparent at runtime, and the latter being a nearly universal standard for numerical and scientific computing.
The docs also reminded me of the existence of Pint, which is yet another standalone unit system that I keep forgetting to try. Do you have some kind of comparison document among Astropy, Pint, and Unyt? It would be helpful to have a sense of how Unyt differs from the others, otherwise my default behavior is to go with whatever is the most popular.
If there is no problem I am not sure lisp give that much (for our mortal).
Obviously when problem occur in unexpected place and suddenly the availability of the stack is great. And that is lisp winning.
Not sure for general understanding as usually you have a case in mind and want to trace the state. In that case still think JavaScript, Python with code, iPython for document still ok.
also python is fine when all you are after is the end result. however if you try to understand what is going on at a deeper level in your program you will quickly discover that python is just a front end to some "black box" (how black it is will depend on your understanding of python's ffi, c, c++, fortran)
Also understanding for one is great and as a libertarian and conservative, yes. But real life not just individual. If one wor n in a group, understanding in a widely use langauage like Python may be important.
Key is not pure OR but and-and-sometimes-and-not.
It has a cool backstory: travelling between stars at the speed of light using laers... it shows practical use of CLOS which is something I've always wanted to get into but never found the time... and it shows how ChatGPT can be very helpful to write tedious code (as someone who's written really tedious parsing, bit manipulation code, I will definitely look into using it for those cases).
Really recommended reading the whole thing for anyone just checking comments.
Also, the hops presumably are between stars because that’s what the lasers take their energy from. If so, star brightness should be taken into account.
I vaguely recall some telescopes simply block out sunlight by having a black disk in the center of the aperture, and orienting the telescope so the sun is behind the disk, but I can't find the search term.
And I think you mean a coronagraph (https://en.wikipedia.org/wiki/Coronagraph: “a telescopic attachment designed to block out the direct light from a star so that nearby objects – which otherwise would be hidden in the star's bright glare – can be resolved.“).
I’m not sure using these to block out the sun is common with very sensitive instruments. Some parts of Hubble can’t look at the sun as doing so would damage them (https://en.wikipedia.org/wiki/Fine_guidance_sensor#Hubble_Sp...: “Due to the sensitivity of the FGS they can not be used whilst the HST is pointed within 50 degrees of the Sun.”)
Also, of course, blocking out the sun’s light won’t make you see the stars behind the sun.
In short (kiloyear) timescales, relative motion doesn't matter, because the stars move so slowly. For Beta Pictoris the velocity vectors are:
$ cat hygdata_v3.csv | grep "Bet Pic" | cut -d "," -f21,22,23
0.00000061,0.00001886,-0.00001106
0.00001886 parsecs/yr is ~20km/s. At this speed, it would take 10,000 years to travel a mere 0.6 light years. A rounding error.On longer timescales, the velocity vectors are useless, because it's an n-body problem, and the initial conditions (position and velocity vectors) have massive error bars. Calculating accurate stellar positions in the far future is a task for a group of astronomy PhD's and is beyond my limited skills.
The story timeline is never stated, but it doesn't take place far enough into the future for stellar motion to matter---if you follow the clues you can bound it.
$ awk -F, '/Bet Pic/{print $21","$22","$23}' hygdata_v3.csv
0.00000061,0.00001886,-0.00001106CLOS is an abstraction layer to enable OOP. It has long been a workhorse in industry. If a programmer wants something in lisp, he can make it.
The textbook sicp (not common lisp, but another dialect) involves building different interpreters to enable differing behavior. A lot of these are configurable or availible through libraries in common lisp. You have near infinite power with it! (Making a unique dsl for your specific problem case, e.g. with macros, is common with racket (my favorite lisp dialect.))
In the 80s and 90s when OOP was gestating and emerging, a lot of experiments and projects in thst direction were made in lisp (in production etc.) just as a lot of quantum computing research is done in lisp today. Indeed, in 1994 lisp became the first standardized OOP language. In the 60s, object modeling was first done - with lisp. The 70s already saw significant research in the area, before being used in industry in the 80s.
For functional only, you have to go to haskell.