Live CEOing Ep 749: Language Design Review of Special Project Features for 14.0

Stephen Wolfram leads a design review of Wolfram Language 14.0 features with his team. They discuss a complete overhaul of unit conversion with real-time currency lookup, and new astronomy tools including eclipse computation, moon phase calculations, and improved spherical geometry for astrographics.
Chapters
Okay, here we are for another design review, our fourth one of the day today as we get ready for version 14 and we are looking at a variety of general special projects.
Yes.
Okay. Units first.
Yeah. So Nick.
Yeah.
So spectacularly faster.
Yes, we are. Unit conversion is basically down to evaluator time. So we're around a microsecond or two for most unit.
Like what you call speed of light.
Yeah, basically as fast as.
You mean in that thing I just wrote? No. I don't know. We call it speed of light for the evaluator. Like we can't touch the system. Yeah. Okay. This is cool. What's a good example where I can. Where I can try a big unit conversion of a whole array of things? Let's say. Well, I don't know. I mean, it's just like. That's great. I don't know what else to say. What about things like currency conversions, temperature conversions, things like this?
Yep. So currency conversions are as fast as they can be. So the, the behind the scenes part is basically we've re implemented unit convert entirely within the kernel, where we don't need to make top level calls for anything. There's a data storage system that we.
Wasn'T done with the compiler. How was it done with the compiler?
It wasn't done specifically with the compiler.
No, I mean.
Yeah, there. There are reasons for it because of the data structures we're working with. It was more expedient and more efficient to do it within the C code itself. But basically we can do all the conversions we need to do with the exception of currency conversion, without needing to make any top level calls. Currency conversion, we still have to call out to.
Right. And presumably you're caching. Once you did the dollar pound con in that ex. In that evaluation, you cache it.
Yes, it's done for that evaluation, but we do still do real time lookup. So if you re. If there's a new call to the evaluator, if you.
What is that window for real time lookup? I mean, in other words, if it's. I don't know how fast the real time lookup is. In other words, how can it change in a second?
I don't think it changes in a second. I don't. I mean we. We're on a mild delay and it varies time of day. You know, the currency exchanges don't update constantly.
Why is this offset? You know, I've reported the 700 times. When it's magnified, it's offset. Do you see what I'm saying?
Yeah. Some baseline Issue there.
Yeah. So, I mean, can we please get this fixed, please? Eli, I think you're project managing, so could you please take this to the front end team and try and get it fixed?
Sure thing.
I thought currency convert. Why does it have that thing? Okay. I'm not fast. Boy, that's not so bad. That was. It was really cruddy a while back.
Yeah, it was. We've done a couple of rounds, but this is kind of the.
Oh, I was looking. I was talking about the dollar pound conversion.
Conversion. I see.
Yeah. But. Yeah, go ahead. What were you going to say?
Yeah, I was going to say there have been a couple of passes in improving things, but basically what we've done is that there are. Each unit basically has rules about what its fundamental unit value is, which for basically everything that is at a temperature is zero, and what its fundamental conversion to its SI base unit is. And so we have that data available in the kernel. Whenever we do conversions, we look that up and then cache it in the kernel. And if we're doing something like an evaluation where we have a bunch of, you know, if you had an array of values in pounds and then you converted it to dollars, we would look up the currency exchange once and then be able to do that conversion all the way through.
I understand. So you're doing the same. Yeah. Okay, I understand that. I. I think you should talk to the data people to find out how. How quickly this actually changes.
If we can put a time to live of, even if it's, you know, five minutes or something, then.
Exactly. Okay. Would help. All right. Great stuff. That's really cool. I'm really excited about that. All right, let's go to Astronomy.
Okay. So. So the. The big thing for us this time is eclipses. So preparing for the sun doesn't wait.
Or the moon doesn't wait. So whatever I released is our. We got to get it in this release. Yes. No, I'm sorry, I'm just making a silly comment. Isn't there an infinite set of them? Isn't it like primes? There's just an infinite set of solar eclipses.
Yes.
Well, actually, there weren't. No, there is not an infinite set. The moon is getting further away from the Earth. Well, I mean, also, we probably only have 4 billion years, so. Left, right, right.
So. So what we can handle here is 30,000 years of eclipses, which amounts about 72,000 of them. And so. Yes. So the next one is going to be in a few weeks, it's going to be an annular eclipse, and Actually, French champagne with glasses. We will be able to see the sun half covered, more or less.
Oh, cool.
Yep. But the. The big one is next year in. In April. And.
Yeah, let me see where it's visible from. How do I compute where it's visible from?
Sorry, what did you say?
How do I compute where the. Where the. April. How do I get the next eclipse, first of all.
Yeah, so look for solar eclipse. Eclipse type goes to total. So that will look for the next one that is total. So this is a function that existed. So we are keeping the.
Why is it taking so long? Can't you just generally set the dates? Jose, why is this taking so long? For goodness sake, Cash, the next few.
Years of eclipses, it shouldn't be taking so long. It's super fast for me. Something is not right. That's unfortunate.
But generally you set the date right and then it looks forward.
Yeah. So the syntax is you specify a date and then it looks for the next one of the given type. Oh, no, that's unfortunate.
What's dollar version? Yes, it does.
Okay.
Can you send me in a notebook the results from this? Do you have examples for any of the results?
What we should do is to look at the page. I mean, either I show the evaluations in my machine or we look at the ref page which has all the evaluations of this sort. The page is called Solar Eclipse New because we are completely rewriting the page.
Is it new with all caps or just one cap?
Just one cap. Reinfortunate. So if you go to basic examples further down, there should be something like this.
That's an ugly picture, if I might say so.
Yes. So this requires redesign. It's a map showing all the elements we can discuss now. All the elements of. Of the map.
Right. That's the totality path. Wow, this one is really going across a lot of the US does it go through Champagne?
Very close.
We will still need goes through southeast Indianapolis and it goes through Carbondale again. So if you're in Carbondale last time for the 2017, it's going to go through there. That was X marks the spot.
I remember that blog post you wrote about that. Where is there up here? How close does it go to the. To Massachusetts, for example? How do I find out what the closest place to Concord, Massachusetts in eclipse path is?
Well, we have a polygon for the totality path. It would be a matter of finding the closest place in that polygon. We also have now the ability to compute, for example, what's the magnitude that I will see from this place. So yes, one of the things that has. Now this function is that it has the ability to compute everything from. For a given date and for a given location or both. So it allows real time monitoring of the eclipse from anywhere. And these are all important lines. For example, the green lines are lines of magnitude of the observation. Magnitude means the fraction of the diameter of the sun covered by the moon. So this increases in steps of 0.2.
Okay. This is the initial eclipse. This is maximum point of maximum eclipse, and so on.
Exactly. So the green line is where the umbra is. So the white line is where the umbra is. And then the penalty are levels of penumbra.
What are the red lines?
The red lines are what is called the racing and setting curves of the. And this is the. In all those places you will see the, the eclipse happening at sunrise. And in the yellow lines which go to the middle is the places where you see the maximum of the eclipse precisely at sunrise.
I see.
And then those lines have a very interesting geometry for partial eclipses. They can join above. So they are not always separate lines. There are examples, there are multiple geometric configurations.
We need graphic design for this. This looks terrible right now. I mean the functionality is fantastic, but the design is terrible.
That's. That's bare, that's brand new. As of today, that property didn't even exist yet. So.
I see. Okay. Okay.
So there are, for example, now we can. This is the saddles in X panorama. So every eclipse can be identified by two numbers. The shadow cycle, which is the horizontal, the X coordinate and the up, the vertical number. That's the index number.
And so as opposed to index. It's the index.
It's the index. Yes. The saddest number was known by the Greeks.
I know. Yeah, right.
Long ago. It's in the Antikythera device. The index number was discovered in 1950, more or less. So that's very interesting. So every eclipse is in one of those lines. So the, the lower picture is what we can compute. All these blue are the eclipses we can compute. The black ones are those that NASA had computed until now.
Oh, that's cool.
Yeah. So we can confirm that and compute many more.
Which one did Thales see?
Sorry?
Thales saw an eclipse during a battle between the Persians and something or other. Right, right. So by the way, your audio Jose keeps on semi breaking up.
Sounds like you're talking through a reverberator or talking through a fan.
I'm sorry about that. I'm using the same configuration of every other day. I'm at the office.
That's really weird.
Sorry about that.
Okay, so the claim is the eclipse occurred on 28th of May, 585 BC.
Well, I'm not sure how much does it work in your computer. So if you add just the date to solar eclipse, does it work without the option?
I mean, I don't even know what the date means, but let's say 585 BC.
No coming. This. Oh, yes.
What's that Dash. Dash doing? That doesn't seem right.
Minus 1500 to minus.
Oh, gosh. I. Arguably. That's not perfect.
Okay. It should have been immediate. Absolutely immediate after. After it finished the. Yeah, so something is not right there. Okay, so something is not working with the timestamp.
Okay, so now if I now say solar eclipse of this, do I get the next solar eclipse?
No, it should be the same one. We have a tolerance of a day so that you can keep asking for properties of that state. If you ask for solar eclipse of that plus a month, then it will jump to the next one.
How many solar capsules were there in the springing year?
Well, no, again, that's. Sorry, that's it. They are apart. They should be apart like six months or something.
Not necessarily. They can be five. In a year.
Yes, yes, in general, but it happens very rarely.
Well, okay, so this one says. I mean, like the wikipedia page says 28th of May, but it might be complete nonsense. We're saying there was one on 22 May.
This may be the same bug I was saying, Jose, where I think what it's doing is it's jumping to the next new moon, not necessarily the next eclipse.
Yep.
So something's going wrong and resolving. What it's doing is it's looking at the next lunation number, but that's not necessarily the part that says. Okay, is that an eclipse and that's failing and it's just stopping at the lunation number.
Yeah. So this. This is something that I. I have not been able to reproduce. My machine or other machines. We have tried, but you have had seen it. We thought it was a windows problem that we were looking into this week, but we have. Seems to be affecting you as well.
So essentially the calendar switchover problem of if we're a few days off, it might be Gregorian versus Julian.
Well, I was thinking about that. Yeah.
No, but this is different. This is different. It's something that we. We had seen in. In. In Jeff's machine. So. So, yeah, so as I said, I. We can check these things in my. In My machine or.
Yeah, I. I think we should look at this again in a few days when you have this unscrambled.
Yeah, so. So there are two things that we should do today. One is look at the very many new properties that we have. And the second thing is to look at some other functions because in order to work with eclipses, it's very important to have very good information about the moon. So we are proposing new functions to handle the moon. They are at the. At the end of that.
Okay, let's look at these. Okay. Astrographics.
So yes, that part is not ready yet. So ignore this part and let's look at the six new functions.
By the way, do you see the stuff Christopher made recently using Astrographics?
We have been talking about it yet, but I'm not sure I know what you mean.
There's this post he did.
Oh yes.
Oh yes. He had me add Ptolemy's catalog of stars to star data. So we now have an entity class of all those stars.
Ah, very good. I thought it was kind of cool. I think he has a picture.
At.
The end of the stars in order in Ptolemy's catalog.
Yeah, this is very nice.
Right, but so this is. Yeah, I mean, this is just directly using Astro graphics, presumably with Ptolemy's star catalog, which apparently is now in the system.
Well, it will be. It will be. It's on current, but it's not on production yet.
Okay, But so what's. Well, okay, this is just. I mean, to what extent. And we're going to look at this another time, but to what extent do you now think you've reached the final state for Astrographics?
So the treatment of spherical geometries is going to be now a lot more solid. And this is something that I was doing also for Geographics, but it's not ready for Geographics yet. So it's going to be first released in Astrographics and then in the next round we will do it for Geographics.
Okay.
And.
Yes, well, it's respective of spherical geometry was not already.
This is so fundamentally the manipulation of the vector primitives so not making errors when we have very large primitives in the projections and the rotations.
So those primitives then need to be like if you have a really long line, you need to split, you know, to segment it more. Yeah, right, sure. I'm saying. Yep. Yeah. No, I mean the coordinate chart, adaptive subdivision, basically.
Exactly.
And what's happened to sphere position and all those. Or spherical. Spherical position, spherical distance, all those kinds of things.
So we are working on Another of those functions to compute angles. You will see that in the IND meeting next week. But we don't have yet a full set of spherical primitives or anything like that.
What about spherical graphics?
Well, astrographics and in the future geographics are going to be called internally something called sphere graphics. But I think eventually we could look at it.
Well, I think we should expose that because I mean that's, that's a thing that is useful, you know. Yeah. Okay.
I think it's a separate project and when it's battle tested with Astrographics and geographics, we will be more sure that it's the solid.
Okay. Moon phase date.
Yes. So this is a function to handle everything related to the phase of the moon. We have moon phase.
Right. Which tells you the current phase, but this is telling you the date when a certain phase will be achieved.
Exactly. And it has two particular cases which I think are important enough to deserve separate functions which are. New Moon powerful. Yeah, I mean they are just particular cases.
I understand. I mean people have been observing the New Moon and full moon throughout human history. So I guess we should give them functions.
Yep. They feel like sunrise and sunset.
Yeah, I agree.
Too important to not be there. But moon phase state is the one doing any type of, of moon phase. And even it's controlled by a number that goes from zero to one. So zero is.
Yeah, I get it.
Yep.
Right. And then I'm going to ask for, you know, given that everybody's interested in Mars, we could ask for the same thing. I mean, are we going to support non terrestrial moon computations like this?
We could, but it's not done yet. Could be done.
Okay. I, I don't think it's urgent, but it would certainly be. I mean we can presumably.
We know it becomes ambiguous when you talk about Mars or any planet with multiple moons, which moon you're talking about.
I know you have to say, you have to say the planet and the moon. I mean, if you specify the name of the moon there, then it's. It specifies both the planet and the moon. We got only a few years and then they'll start to be moons of exoplanets discovered. But that's a while, you know, that's some distance away.
Yes. There are rough pages for those functions if you want to look at them. And then lunation number and from lunation number are a pair like Julian date and from Julian date and they are counting of lunar months. So.
Including fractional.
Including fractional, indeed. Yeah. So this is a count. This is a telling of Time by lunar, by new moons.
Why on Earth is that the first new moon of 2000? What's that?
This is a convention. And below you see that there are several conventions that have been suggested. So again, it's like Julian date has several types. I call them here schemes. They could be called types like Julian date types.
What?
Julian date has a first argument called time, and it can be a modified Julian date, et cetera. So here there are also different counting schemes.
Okay, I don't understand this. I mean, the moon went round a certain number of times, so I don't understand what these different counting schemes correspond to.
It's the choice of, of the first one. They all. They all differ by a shift.
I see, I see, I see, I see, I see. It's just where the, where the, the zero of lunation is, so to speak.
Exile. For example, there is an Islamic counting because the day of the year happened very close to one of them. So they count moons from there.
Why? Oh, Brown was one of the guys who worked on some ephemeris, right?
Yes.
And was that his birthday or something? No, he would have been that. That's, that's too. That's too late for his birthday, for his birth date.
Yeah, perhaps.
Why the heck did he pick that date?
That I don't know.
Okay.
So this is also related to calendars.
For example, astro subpoint.
Yes, that's one of the new functions as well. So that's, that's the point in. On the Earth that has it.
So, for example, astro sub. Point of this. Correct. I mean, that must be correct.
Sorry, can you repeat that again?
I said astro subpoint of the sun will be the point on the Earth where.
Yes, the.
Where the sun is directly overhead.
Exactly. Yes.
And.
And this is called a subsolar point.
Okay?
Yes. So the, the maximum latitude of the subsolar point and the minimum define the tropics.
Yes. I'm gonna have to leave, Stephen, you guys continue. And we have another one scheduled tomorrow to continue this for tomorrow. Okay.
Okay.
See you, Roger. Bye.
So in all the maps about eclipses, it's very typical to give this the sub points of the. Of the sun and the moon. But this can be computed for any object.
I see, I see.
So in fact, not just objects, but also astrop positions, I'm assuming.
Jose?
Like, does it work?
Yeah, presumably. I'm sure. I'm sure it does. Does it not work?
For.
Right now it's. It's not. But it could. I guess it could. But right now, why not right now? It Wants an object, but I think.
It should allow an astroposition because it must just compute it the same way. So is that obvious? That's the north pole. Close to the north pole. Is that correct or am I confused?
Exactly. It has to be close to the north pole, but it's not exactly. Because the Polaris is close, but not exactly.
I know, I know, I know, I know. That's pretty close, actually. That's cool. By the way, you could use that as an example. Presumably Polaris.
I think it is already something.
Okay, fine. All right. Do you want to look at the. The eclipse thing and then we wrap up for today? I think.
Yes. I would suggest also a nice example in from donation number page, because I think.
What's that?
Yes, from donation number. It's one of the reasons why this function is also important. If you go to the. I think it's an application example or perhaps a property organization. This one with the. With the historians. So if you take the. The days of new moons in the Gregorian calendar, you take the day of the month, they happen to fall everywhere, all over the month. But if you change those same dates to the Jewish calendar, you see how they always fall at the end of month, because the Jewish calendar is lunisolar, so it follows the new moons.
That's very cute.
So the same thing happens with the Chinese calendar and other Lunisolar calendars. Okay. Yeah.
No, it's nice. Okay. So is there anything particularly. I mean, by the way, I mean, in terms of these. Computing the eclipses and your plot of these timescales and so on. I mean, we ran the ephemerides, presumably over. What's that?
Yes, we do use ephemerides. Yes.
But so then what we were using then, I suppose. And then we're looking for syzygies based on the ephemerides. Is that right?
No, the technique is the following. We know that every solar eclipse is going to be very, very close to a new moon. We have very fast methods to find the new moons. And so what we do is to analyze whether in a given new moon there is an eclipse or not.
What do you mean in a given new moon? You mean in the day of a given new moon?
Yes, near the next one. Every. Every. Every solar eclipse, if it happens, it happens within 15 minutes of animal.
Oh, I see.
So it's very easy to know whether a given new moon is going to be an eclipse or not. And so to do that, we use the vesselian elements which are there. So we compute the Besselian elements which are These functions. And from those functions, which are polynomials of the third degree, we compute everything else with high precision.
Right.
And. Yeah, so that's the technique. So first find whether a given new moon is an eclipse, and if it is, then compute Besselian elements and compute everything else from there.
And so these Bessalian elements are cubic polynomials, basically coefficients of cubic polynomials. Is that correct?
Yes, that is. That is a tradition. Because it's good enough. Everything is going to happen within two hours of the center or three hours. I'm just thinking.
I don't know why we're not keeping the Besselian elements as interpolating functions.
We could, we could. And that's one of the things we could do. I mean, the tradition is to report these tables of numbers. If you want to compare with tables from NASA.
Yeah, I understand, but maybe we could call it Besselion and what the. What. What is the thing you're computing here?
Those coefficients. We could come. I mean, what we do is that we call the FMRI this and then do a fit of the polynomial. So we could do an interpolating function which is just these polynomials.
Yeah, I understand, but I mean, there are a bunch of polynomials and each different polynomial is representing a different thing.
Yes, right.
X and Y, for example, are the positions in X and Y. And basically orthographic projection coordinates of where the moon's shadow falls on a plane that cuts through the earth.
Yeah.
Declination is what? Declination of the sun. Is that right?
Yes. The moon and the sun. The axis. The shadow axis.
Yeah, I don't remember what mu is.
It's our angle. It's the rotation of things.
But I mean, so do we have. If we made an association where we had names for these different elements and we had the right hand side being an interpolating function, do we have names for those elements that fit in with things that are up here?
We could, we could. I mean, there are properties right now that evaluate the individual baseline elements.
But evaluate what?
So there could be properties that evaluate individual vessel elements. Or we could have a besselion element functions.
No, that's what I'm saying. Element rules or something. Or Bessel and element functions. Sounds like a good thing to have. What I'm asking is, in the besselion element functions, are there obvious names for those elements? You call them X and Y and things like this. Are there obvious names for that based on what you have, Based on the names that you have here that you can compute for an eclipse?
So we could call them shadow axis X, for example. So there are standard names that are used in all books. I mean, this was done by BESSEL In. In 1824, interestingly. So next year is going to be 200 years.
So.
So all books use the same name. So. So it's very standard.
Okay, well, so fine, so we can have an association which has those names. Arrow and interpolating function.
Or the polynomials.
Well, I think an interpolating function is nicer because it means that we don't have to give a variable. Yes, we can directly use it because I think most of the time, once. And we should have the cellular elements table as well. Have we already had the cell in elements as a. As a property before?
No.
Well, we should probably call it the cell in elements. Give the table and then we should say Bacella function functions.
So something new as well is that now we have these properties that depend on time and location. And so what we do is that we use list, name of the property, comma, date, comma, location, or vice versa. Doesn't matter. For example. Yes. They are at the end. Exactly. Rather than having a separate argument, because that. That date would not be a problem.
To most of the things here.
Exactly.
Seems reasonable to me. Okay. Any other things we should look at right now?
No, no, I think we have the.
I will say we've had some pretty interesting manipulates. When things are working, they work very nice. You can have real time manipulates and show the shadow moving across the face of the earth and even see the distortion of the shape of the umber as it moves across. As it goes glancing across the surface.
Wow.
And it's really fast.
Wow.
Very nice.
That's cool. All right. I look forward tomorrow to seeing it. Let's make sure we check that I have the right version on my machine for tomorrow.
Okay. Not sure one day is enough.
Yeah. Okay, well. But maybe.
Yeah.
Whatever the problems are, we have to make sure they're fixed. And we don't know what the problems are yet.
So.
Yeah, okay, fine, fine. Or we can expect that you'll share.
Okay.
Okay. Good work. Thanks a lot. See you tomorrow.
See you. Bye.
Bye.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






