Live CEOing Ep 682: Language Design in Wolfram Language [Dated, WFR, and More]

Stephen Wolfram leads a design review of Wolfram Language features. The team decides to allow fractional years in Dated for astronomy, add optional output-unit control to Duration, and integrate several WFR proposals including duplicates-filtering variants, permutation utilities, and lazy generators.
Chapters
All right. Hello everyone. Welcome to another Wolfram language design review, part of our incremental language development series. And we seem to have some time related topics at the beginning. All right, first up, dated a property comma year. Yeah.
So this is based on a discussion Jose and I were having about Astro distance. It updating support for the dated argument to take a second argument that is a year. Because currently this doesn't work in astrodistance and it does work some other places. Dated works fine in astrodistance, but it needs a fully qualified date object. And part of the question there is recording in progress. Do we want it to only take integer values of years, such as many of the entity functions do, or. Or do we want its behavior to be a little more closely tailored to what we would expect in Astro, where we could have a continuous year value that's potentially.
This is like a Julian year continuous value, Is that correct?
Or a Gregorian year was specifically what we're looking at. So there's a couple of examples showing why that might be useful. You know, currently you can do something like plot of dated.
No, this is not going to work. That's. That's not going to work to say that.
Right. So that's example in entity value, which in order for make it to work right now we need the round. So if we accepted reals, because plot is going to be feeding reals, it will work.
I mean, if we interpolate with reals, then it will also work. But I don't know whether we're doing that if this thing returned a time series. And then I'm confused by this. Do we imagine that we're going to. Okay, the astronomical case, we happen to have computation that can be done with fractional years, right?
Yes.
Right.
And. What am I trying to say?
It is not the case that all functions are going to be happy with real valued years, I think. And so part of the question here is do we want functions that can handle real valued years to handle them? And if so, are we okay with that difference in behavior, or do we want to say astrodistance and anything else that's going to handle dated needs to kind of operate on the lowest common denominator that some functions aren't going to understand.
What I'm concerned about is there are functions that could reasonably interpolate for fractional years. I mean, I have to say most people aren't going to try fractional years for. I mean, I would never have thought this plot thing would work. It's lovely that it does.
It works because we Add round.
I see.
So the thing is that it might not occur to people to use it without the round, and then it wouldn't work. Now the need in ASTRO is bigger. And when we were writing the block, you didn't like the notation that is in the plot just before the one about France, because that one's using data object with Gregorian year.
That's horrible.
Yeah, it's pretty horrible. So the idea is that if we could use a year there as a real. Because in Astro we need continuous dates, it would be nice.
Well, okay, so the compromise position right now is we allow it with. And conceptually we allow it with fractional years. In the case where you try and feed that into an entity property thing, we just get an error message. Possibly we get an error message and it rounds. You see what I'm saying?
Yeah.
We could give a warning to say that it's rounding 2010.5 is not a year value rounding to 2011.
Right, right. And if.
If in the future the stated only take years because dated.
Dated takes any date specification with the caveat that when it was designed, it intentionally has an inconsistency with other date functions and that just a numeric value is treated as a year rather than as an absolute time.
Right, but why not convert the. I mean, right, you can convert a fractional year into write a six element data object, can you not? Why not do that rather than just rounding?
We could conceivably do that. You could do that. Yeah. And I mean, then it. Does it work if you ask for the population of France on August 5, 1623 or something, does that work? I should try it. Okay. Huh. What does it think the population was on January 9? Huh? Well, I mean, it looks like it.
May actually be rounding itself or flooring, depending. I'm not sure what the actual implementation alpha side is. If there's just an interpolation order goes to zero for some of these.
So this seems to me kind of establishes what we should do. I mean, the fractional dates should work and we either round with a message we produce or we convert to, you know, date object and then we let that flow. However it's going to flow.
There is. Sorry, there is one slight issue here, which is that in natural it's convenient if we have a continuous time rather than different length years. So if you take for example, data object 2023 as a Gregorian year, it does not convert exactly as 1st of January 000. It's a few hours shifted. So the convenient thing in ASTRO would be to have discontinuous homogeneous axis. But of course, then it means that year 2023 and 2023 dot do not coincide by a few hours. Is that too bad?
Okay, you're saying if we have a real number there, have it be the astronomical interpretation.
That's what would be more convenient for us.
Fine. I think it's the right thing to do because I don't think people are going to do that for they're only going to do it as an el cheapo thing and a plot to have a fractional year. In the case of a standard entity property thing, that makes sense. So I'm not too worried about the fact that. So, okay, let's walk through this. In my view, the right thing to do is leave it in fractional form and let these functions deal with it and let them deal with it by either giving a message saying we got around, sorry. Or do the astronomical thing or maybe do something yet different that I see involves conversion to this form, but have it be something that is the responsibility of the thing that's going to use the date.
I see. I like that. Because Astro has a decision and other functions will make other decision.
Yeah, right.
Which is actually what I was suggesting, even if I hadn't suggested it super clearly.
Okay, fair enough. Okay, Any objections to this approach?
I think it's the most flexible being function context dependent.
Fine. Right. Okay, let's consider this done. Okay, good. Moving right along.
All right, so we have Shadi and Carlo here also. But one of the questions that was posited a couple of weeks ago was I have a date object.
I want to know. That is ugly formatting. Why is that doing that crazy thing with spacing out the days like you're multiplying the letters?
Do you mean you think the D is too far from the A?
Yeah, I think that this thing looks unreadable. I think it's M times I times N or something.
Kind of looks like the normal letter spacing.
Well, then maybe it doesn't have enough space, but I don't know, it looks wrong.
Well, what's the. What's the input form of the thing? Is that actually a quantity or is.
That like it's a mixed radix quantity? Mixed units. Yeah.
Okay. I claim that just tweaks the formatting on right there. Okay, separate issue. We can ask design for that input. I think it's just not right. Okay. Yeah.
So currently duration has a one size fits all output form, which is it gives a mixed unit at value from. I believe the highest order is Years, all the way down to seconds.
Yes.
So let me point comment that this is absolutely crazy, right? Yeah.
So that is the original idea was entities and date objects should work in duration. But if they work in duration, as it currently is, somebody that's.
There was somebody with a timer there for the Holy Roman Empire, like the gang, like Hong Kong or something, where, you know, its lease ran out.
Well, although it does have four weeks also, which I don't know is because it, if that might be of, you know, calendar problems.
Oh, that's probably because the calendar switched. No, it didn't. Yes, it did. It switched. Oh God, that's just horrible.
So I think the second proposal, which I talked briefly with Carlo and Shadi about, is to add a second argument to duration where we can specify the output units we want. Because, for example, if you say, how long is February? It's a month long. It's also 28 or 29 days long. And you might want a different value depending on that. Or you might just want a numeric value.
Okay, so there are many cases where we generate output in a unit. That's just completely stupid. And that's another thing we should be looking at here. In other words, are we assuming, just like when we generate an algebraic expression as output, there are many equivalent forms of that algebraic expression. We attempt to generate the most useful one similarly.
So we have, we have things like file size, which tries to give a reasonable unit, and we have other functions that give us specific unit regardless.
Yeah, but don't. Michael might. Michael, but go ahead.
I was gonna say this is actually something that I've wanted a function, like a top level function for this for like, you know, say I have some quantity and it's in seconds, but it really should be in years. And I just want it to sort of automatically turn it ideally into like a mixed unit that would look all nice and so on.
And durations are particularly difficult because there are units that have relative length. You know, how long is February? It's a month, or 28 days or 29 days. But once you have one of those, you can't cleanly convert to the other ones. Necessarily within data arithmetic, we have fuzzy units, but once we have a unit output, it has a fixed value in seconds.
Okay, let me, let me make a comment. This, this particular thing where I get out a million seconds. Okay. It's extremely rare that a million seconds is really useful. I would like, as Christopher is saying, I would like. Wait, wait, wait.
Unit convert is documented to convert things to SI base units.
I know Try unit simplify.
Yep.
Or unit convert comma conventional was what we added.
Well, that's also kind of. Well, that's kind of stupid. It's kind of stupid.
I mean, I think ideally there. It would do a. It would do a mixed. Well, or mixed unit. But I like the mixed units. I think that they're clearer than a lot of these because it's not, you know, you don't really know what, you know, 1.3 days is.
And we do have an internal utility that is what outputs that abomination that you saw. That is a bug that can be fixed, like eliminate all of the mixed units that you know are equivalent to zero. But we do have an internal utility that ties to output a sensible next unit.
Okay.
In case that is something that we.
Would like to expose. Okay. So If I do 1.64 weeks in Wolfram Alpha, we get back very sensibly that number of days. So if we say 1 million seconds.
Yeah. The default's a mixed unit form, which.
By the way, in this case, look at those spaces there. Those are mega spaces. So, you know, the point is not.
The space in between the letters. The point is just that there is enough spacing between the mixed between the units.
That's right. I think that's the problem. Yeah. I mean, this, what this did, this is Christopher's preferred case is the number one is the top thing in unit conversions. And the question is, how do you get that in the language?
Well, it sounds like unit simplify. Maybe I linked a resource function in the.
No, no, no, that doesn't count. That does something similar. Yeah, I think.
Yeah, it's not.
Well, I'm asking, do we have a thing right now that does this?
Not in product.
Okay, so the claim is we should have.
I mean, you can specify two best unit function.
See, this is another piece of. Absolutely.
Never finished this.
Let me just comment. This is useless. Okay. Giving unit quantities that are rational numbers is essentially never useful and happens way too often.
Well, it's useful for the internally to be represented as a rational unit. And I think it makes sense to show it, you know, make it clear that it is rational. You could say that for like. I mean, it's also true when you're running solve. You know, half the time you don't care about the rational. You just want to run N on it. But so it goes.
Isn't it remarkable? This is way too close and that's way too far apart. Can Avery, could you please screen capture these? Give these to design. Let's try and Get. Yep, I've been grabbing them.
I'll pass it over.
Okay, so.
So there is a notation in Unit Convert that Nick added to the chat in which you have to specify the. The actual units.
That's not useful. I mean, it's fine, but it's, it's. Look, the issue is we need some way, and maybe it's Unit Simplify, maybe it's a better, slightly improved Unit Simplify, which I had forgotten existed.
So now Unit Simplify tries to get the unit in which the magnitude is closer to one, which I think is a good thing.
Yeah, it's good.
So we could have a second argument saying I want mixed units. Figure out the best mixed units.
That would be reasonable. Interesting. Why did that not turn it into parsecs?
Because we had a similar discussion. We decided that parsecs were too weird for you for general users.
But that doesn't.
Unless they get very large.
Yeah, yeah. There's a lot of heuristics that go into it and it. It's tricky to get right in all cases. But.
Yeah, okay.
And so the only problem is, and let me just. In response to your objection to rational units, I can think of at least. Or magnitudes, I can think of at least one context in which that's exactly what you want, which is cooking.
Right.
You want half a cup, three quarters of a cup.
Right. Fair enough. Okay. Okay, so look, first point is a little bit of investigation of units simplify. The possibility of a second argument that gives mixed units. That seems highly useful. Second point here is. So what's the question here about duration? What was the basic idea here?
So the original request that had come up briefly in a couple of meetings was duration should work on date objects. It should also work on entities. And the question is, while we're at it, it would probably be nice to specify what kind of units you want the duration in. And do we want to examine the default output?
What does duration of date object mean? It's like the duration of the implicit interval of the granular. Of the granularity.
Yeah, yeah. So duration already.
So it could be zero.
Yep. Yeah, yeah.
If it was an instant.
And it.
Already works on date interval for explicit intervals.
No, I tell you what it should really return is the elementary time. Go ahead. I mean, okay, so this here, which is not actually a built in thing anyway yet, just needs to be cleaned.
Yeah, yeah. I mean we can.
Basically something that I can take care of, I think, eliminating all of those zero days, zero hour things.
Yeah, I know, but we shouldn't even have mixed units. 845 years, four weeks is just wrong. Okay. So some of these things we should know the granularity and not generate things beyond the granularity. I'm sure that in this case, if I ask for the start date of the Holy Roman Empire, it better be the case that it does not have. Unless, you know, I suppose there's some empires where it start a particular day, but what is it? Start date?
Yes, start date.
Really?
There might have been a treaty.
Right?
Yeah.
Probably put a crown onto somebody into the throne.
Right. That's when the Pope crowned somebody.
Well. Or something that's about the. Right.
Although actually Wikipedia says There was on 25-12-800, but maybe this is a different. Oh wait, no, no, there was a tight. There was also a. No, never mind. There's another thing that happened in 962, so. Yeah.
Do you think it's actually right?
Yeah, it looks like definitions of right.
Right.
You know. Yeah. Right.
Don't think I'd ever heard of it being 800 plus years.
What?
The Holy Roman Empire Hre.
It is.
It is, yes.
Yeah.
800 years.
Charlemagne is 800 until Napoleon.
Yeah.
Okay.
All right.
And the one before that's a little something great.
Just remember it's neither holy nor Roman nor much of an empire.
I have heard that. Yes.
And they didn't. And they didn't have computers with the Internet.
The Holy Roman Empire is none is what the saying has been.
Yeah.
So this is a case where we do have granularity and we just got it wrong.
This is just wrong.
It's the difference between how duration is currently handling extracting the exact values from a data interval.
So it's just wrong. It's just wrong. If you subtract two things with a granularity of a year, you should get an answer that has a granularity of a year, not a thing that has a granularity that has. It's an instant.
Right. Yeah. If you do end date minus start date for the hundred years war, you get 100 years.
Right. I mean one thing though that's a little subtle is just the fact that with dates we can explicitly say the granularity is year as opposed to when you get the quantity out, when presumably it's just going to be a rounded number.
You're right. But at least we shouldn't try and mix radix it and put crazy stuff. I mean look, if it's year minus year, we should have an integer year come out in my view. And certainly no mixed Radix nonsense.
Right. This may be even an argument this. Well, there's maybe an argument that a mixed radix unit, if it's a zero, it should just ignore that. Yeah, that place. But, you know, it might be a bit bad in terms of just. It's hiding how it's internally represented in a way that might cause confusion.
And I can certainly think of contexts where you actually do want to see those zeros.
Fine.
Right. Hours, minutes, seconds.
Right. I think it should honestly present it. I think this was just a bug in the way that this lowercase duration function works for this quantity for this entity here.
Yeah, yeah. So that was basically one of the points is if we want to extend this to work on other things, do we want the output unit form to be different or do we at the same time want to look at extending duration to allow an explicit second argument that says what you want, potentially, I.
Would say the second argument is the units, and mixed would be the generic units. Okay. Will be mixed. Radix. I mean, you know, we might want to say you want hours and minutes, but you don't want seconds, which is a more subtle thing. But I think that's a different issue. I mean, that. Look, duration rounded to hours seems quite reasonable. And duration in which the thing in there is something which only has a certain granularity. We know what to do. Okay, makes sense, everybody. Yeah.
Do you have any concerns on the audio side, Carlo, or does that also make sense? Oh, really?
No, that sounds useful for the audio side as well. And again, the one case that we've found duration wanting many times is for it to return just a number representing a number of seconds and the duration of something, comma, none. In this proposal, that would be very convenient. I would say just ditch the units, return something as seconds as a real number.
I think then the question is that for other types of inputs, what is the default unit? Is there any way we can say seconds but no unit?
No, that's what Carlo just said. If you put none in there, it'll return with no units.
But then we say for. What I'm saying is that for audio, we think seconds would be useful. For entities, seconds may not be really the most useful.
I know. So none is not the default. The default is automatic. And the automatic default would return. In the case of the, you know, some historical thing, it's probably granular to a year, in which case it just returns in years. In the case.
You mean it's just an integer or a real.
In years with units of years. Right.
As a quant. I'm just saying. Right. If we're talking about the case where you get it to. Not where you get to return a naked number without a quantity. Is that what you mean?
Or. I'm saying that the only case that does that is base SI base units, ie seconds.
Okay.
SI base units common none as a second argument.
That's what I was making. Sure. Makes sense.
And yeah, the amendment to this proposal would be the last thing. As you were saying, duration of income, automatic. The default is not the mixed unit. The default depends on what the input is.
Exactly.
As you said, if the input is something that has years, then it will be years.
Yep. Okay, everybody agree here?
I think so, yes.
Okay, let us move on. Nothing else for this. Okay, next item.
So these are a handful of WFR functions we were looking at reviewing. They happen to all be proposed by Sander, who's a regular viewer of our live streams. This is not. So this is related to delete duplicates, but obviously has different results. You know, we're. We're selecting the elements where they're that are duplicated within the list and dropping all the singletons.
Well, I mean, how would you do. What is the most obvious thing if you want to drop. If you want to include only things that occur more than end times. Is there an easy way to do that?
Dude, tally or whatever and just take the ones that have more than two.
Right.
I mean, if you wanted, you could.
Do delete cases of alternatives at. At. You know, delete duplicates.
We're not delete duplicates, but. But like selective counts, comma, you know, greater than one. Yeah, right, but, but right. Or buying them. There are two versions of this. One is the version that Sander has here, which is that it keeps them in order with duplication and so on. The other is the just sort of set operation which I think, you know, complement of list, commonly duplicates of list. I mean, I think.
Yeah, right.
It's not. I don't. I don't really see where you would use this. It does seem like something where, you know, if you wrote it yourself, it would be less efficient than if it were built in. But I'm not sure when you would use this.
Oh, that's only because it isn't being compiled. One day it will be compiled.
I think once in a while you. You do want to know, okay, which ones have multiplicity here? That doesn't necessarily mean you want more information.
Well, counts tells you which ones have what.
Yeah, yeah, yeah.
True. I'm not. I'm not seeing this. I. I think this is one where it's going to be more effort to remember that the thing exists than it is to rewrite it. Okay, what is this? This is.
Is that. Is it hair wise or is it. Is it going to just compare all of them to the first one or something like that?
I believe it compares all of them to the first one.
Yeah.
If you don't have a transitive comparison.
Yeah. Then there's an issue.
Unclear what it should do.
Yeah, but. But if you don't have a transitive comparison, I mean, or like if you have to do all the pairs, you might be in trouble. So.
Yeah, yeah, I agree with you.
I think the by functions we kind of make assumptions like that.
Right.
Like sort by kind of assumes that the function is deterministic. For instance.
True.
Is it not just mapping the function over the whole list and doing like the var arg same queue?
It's effectively doing that, but it's more efficient.
Okay, but that's not ambiguous.
Yeah. I guess that's equivalent to comparing them all to first. Right. It's just. Yeah, they're all the same.
This seems somewhat useful.
Yeah, it's.
It's along the same lines as all true where you know, I have a collection of things and I want to make sure.
Right.
And the way you do it yourself is same queue, add AT F/AT list.
Right. Yeah.
Right.
Imagine all the elements are associations and you want to see if a specific key is the same in all of them. It's really useful.
Then I like this function. This is a good idea.
Do we have an all same as well.
Same queue.
Same queue.
It's at.
At. Yeah, we just take the list instead.
Of rgs but same as. As a operator for.
Well, I just mean like. Well, okay, sure.
Right.
I mean I. You might think that there's a. In this sort sort by distinction. There might be another version. That's the version that. That you give it a. Like a comparison operator. It takes two arguments. But that. That would probably have to do the N squared thing and it would be really slow.
Yeah. And I think this really same qatat seems like. I think this is useful and the name seems reasonable. So I'm good with this.
Okay, excellent.
Thank you, Sandra.
Look at promoting that. So Gosha is just joining in to potentially talk about this as well.
Apropos of this, I used a similar phrase in talking to somebody not too long ago and was told that the term is falling out as fashion. Not making that up. I know, I know.
You know in the end, the only language that's going to be perfectly acceptable is a language that has just one grunt in it. And then people are going to be surprised that nobody can communicate. Okay, Sandra is commenting. It can test easily whether all are prime or all are composite. Important. But it's not that you can write it easily, but rather shortcut. Yes, yes, we understand the. Okay. Okay, let's look at this. What is this? It's covariance matrix. What is this doing? Variance matrix.
So the Wikipedia says it's a. What can be called a whitening transform or a spherical transform.
But.
Rescaling things.
How does it relate to standardize?
Standardize wouldn't change the shape, only shift and rescale. So the ellipse would still be there. This is kind of rounding. This is like eliminating the shear.
Should it return a transformation matrix as well?
No.
Well, it could give you the. Maybe there'd be a way of getting the matrix that it's using.
Yeah, yeah, that would be useful for some purposes.
But this is similar in terms of objective to standardized. Is that a true statement?
Similar, yes. So try vector around of X.
Convert it into white noise. That's where the name whitening comes from.
Try vector around of X. Evaluate the X that Sander gave.
This X.
It's the compressed data.
Yeah, I have to remember my session as an X. Oh, and try a vector around.
So you see, this is in the first argument you get this the center, and in the second, the covariance matrix. So standardize will change the center to be 0, 0 and the covariance matrix to be diagonals 1, but it will still be a full matrix. While this is going to convert the second argument into the identity matrix.
Right. So in a sense it might be a little bit more. I mean, to call it sphericalize or something might be more in line with standardize and normalize.
Correct.
And let's see, where would you use this? Oh, look, sphere transformation. Okay. I mean, it seems like. I mean, it would seem like standardized normalize. It seems more like spherize or something. Because when we say transform, usually, that is, don't we usually mean something rather different when we say transform? Yeah, they usually give a transformation function, I think. Well, do they? I mean, is that.
There are both.
That's not the case for like z transform. Right, right. Like the. Or Fourier transform. Right. Those are, you know, the things. Integral transforms are just called transform.
Is it a simplectomorphism?
The hell is that?
Well, first of all, it's got to do a shear, I guess but then if it shears and it's still an oval, you're trying to turn the oval into a circle. So you can ask the question whether or not that final transformation preserves a interior area.
Okay, where does one use this.
Removing.
Right.
When you're trying to find, when you're trying to find independent variables. Right. You're trying to decorrelate. Right. You have some data and some variables and you're trying to find new variables that are independent.
Yeah.
Honestly, it seems like this would also be useful in like, you know, machine learning things. It's just a similar function to what you might use standardized for just one dimensional data.
Yes.
Yeah, I see this as a way of understanding your data better.
You can also, if I remember correctly, remove components of a signal.
To.
In order to try to analyze other components that might not show up as well with the main ones still there.
I mean, in this case, this case is kind of a bad case because actually it is white noise in the end. Whereas if this had more structure to it, this thing would show structure even in the, you know, sort of reduced case. Right. Yep. Can we get an example of that? Maybe something with primes. Let's see, what's, what's a good thing that's like correlated like this, I don't know, difference between primes or something. If we take, take something like. Am I going to get this wrong? Hold on, What am I thinking about here? What am I trying to do?
Prime of X and log of X.
We could do. Yeah. Except X we need to get rid of because we're about to blow ourselves up here.
This is going to be a line more than a cloud, Right.
It'll be close to a line.
Well, so maybe we want log minus. I don't know. I mean, but maybe just. Yeah.
You could take successive differences.
What. What happened here? Oh, whoops. I put that in braces for some crazy reason.
Take differences of both of those lists, prime X and log X.
Can you just say differences of the whole table?
Yeah.
It'll be the same.
Yeah, yeah, yeah, yeah, yeah.
Oh, whatever. That's not quite what I. But let's take a look at what happens if we apply this transformation here to that. Okay.
I think this is not really the right input data for this.
No, it's not right.
Probably not.
Okay, well, I can't tell exactly. It would be nice to know from the machine learning group what they think about this. And you know, the spherize thing would be probably the least incomprehensible version of this.
Comments from people I Mean, this fair. The term spherical transform, whatever it was called, I think sounds too much like a transform of a sphere.
Right. But spheres and sphering transformation spheres would give some sense of it's going to try and turn it into something which is, you know.
Okay, yeah, maybe. Maybe spheres. Yeah.
That would be my tentative suggestion.
It. Yes, it is similar to. I mean, it's a flavor of I guess the geometric transforms, isn't it? I guess not. Because we have to account for this point by point.
It's not just a much more like standardized. I think it's a version of standardized, isn't it?
Yeah, it's a fair analogy.
This is what I think. I think this is a good thing. A little bit more study. I would not consider this particularly high priority, but I think it's nice. Yeah.
We'll take it to the ML group and see if they have any immediate comments.
Okay.
It's going to be more spherized than diamond eyes, I think, based on the norm in question.
Yeah, yeah, right. That's a special case that it diamond pies. Your point, Brad, is that.
Try running it a couple times though.
Yeah, maybe you should do. Oh, you'd also do aspect ratio automatic.
Why is aspect ratio automatic so low down in the ranking for the aspect ratios there? Why is that? But what the hell does aspect ratio full even? Do anybody know here? Somebody should fix that autocomplete to make aspiration to automatic. Be in place of aspiration full. Well, I don't even know what that does. Anybody want to offer an idea of what aspect ratio full does?
It's definitely a Brett question.
Fixed enclosing region. That's actually very rare. We should change that autocomplete. Avery, can you take care of that?
Yeah, I got that.
Okay. So is your point, Brad, that we don't like the name spherize because these aren't spherical?
Well, no, I was making a joke, kind of. But the point of these plots here, I think is that it answers the question about preservation of internal area because it's mapping a unit square. And what we see here does not look like a unit square to me.
I have no opinion about this. This seems like more of a. I mean, we can. We could try and recover. I don't know. Can we take the region here? How do we do that? How do we do the region reconstruct?
Like convex hull or something?
No, no, no, not convex hull. I mean, we could do convex hull in this case because it is more or less a convex hull. What's the new function that we Introduced that tries to approximate a region.
Non convex hull mesh.
Yeah, but there's a better name. We have a more generic name for that now.
Regen Fair.
Yes.
About region fit was like finding, you know, the bounding, you know, ellipsoid or something.
Why does it say zero arguments? It's got one argument there. Somebody fix that, please. Make sense.
Yep, we'll pass it along.
I'm confused by this. What I was looking for was a thing which was going to return to me, you know, you know what I'm talking about. I just want that. Whatever. We could just say convex hull. Okay. Now I could say area of that and that's.
It is. It's concave hull mesh is I think what you're.
What you're looking for. Okay. But in any case, this is if I say graphics of percent 31. So I'm a little bit confused now by what this is. I thought this was a unit. Okay, there they are.
So this is trying to bring covariance to one. It's a bit like a normal distribution, right. It, it's extended, but it has Sigma 1.
Yeah, okay.
Right.
But that.
So can I ask the question? Does the area, like let's say that you have roughly a convex hole is an ellipsoid or it's a square. If you do this transformation, is it going to change the area of your distribution of points?
Yes.
Yes.
It will rescale so that the sigma corresponding to this is one. So some points will be inside, some points will be outside.
Ask machine learning what they think about it. Let's move on and just have a quick look at some of these permutation things. We can handle some of these quickly. We should. Well, yeah, this should be. What permutations does on an association is to permute the values for fixed keys. Right.
This one is permuting the key value pairs, which I think is more useful.
So B is always associated with two.
Yeah, it's just changing the order. You can make the argument that should, you know, just permute the values. It kind of follows the fundamental.
What it should do associations.
But it seems less useful.
Well, I, I would argue it's more useful to permute the values because I mean, most of the time you don't care about the order of the association anyway.
Right, right. And if you want the other case, turn the association into a list, permute the list and turn it back to an association.
And then, for example, manipulate both the original and the permuted association. Then you need the keys to remain in the same order.
Right. I think, as you say, permutation should be extended. It should permute the values.
That's.
Yeah, it should do something one of those two. I think that's fine.
Yeah.
So the work order there is extend permutations to association.
Yes.
Okay, yes, but just on the values. So not like.
Yeah, understood.
Yeah. Select permutations. So this is part of the whole family of lazy operations, is it not? This is like permutations generator, and this is a lazy. And that's where this should be, not its own separate function.
Do we have a general section of permutation related things in lazy evaluation?
Well, we're trying to. I mean, we need to move forward with lazy evaluation. I haven't seen a meeting about that recently. And we should have one.
We'll pass this along.
It's not necessarily even lazy so much as conserving of memory. If you only if you ask for just like, you know, the first n of them, then sure, it's lazy. But if you want them all, what you're really doing is saving on memory.
Yeah, but you could do that as a lazy thing by saying, here's this thing, okay? It's also part of like the infinite lists project. Here's this huge collection of permutations. Now just give me this one slice of it.
Yeah, if that slice is finite.
Well, I mean, the permutations, we're not dealing with actually infinite lists, if you say permutation of 20 elements or something. We're just saying we don't actually want to generate that list of 20 elements. We want to lazily be able to find those cases where there's some, you know, ascending sequence of whatever.
Yeah, no, my, my point is simply that for practical purposes, we are generating all of them just one at a time. We're not generating the whole shebang, you know, and putting it in memory.
I see what you're saying. I see what you're saying. But in a perfect world, we would have a more efficient strategy for essentially compiling the function that you are trying to select permutations that satisfy. So we're not. You see what I'm saying? You could just do it by a generator that, you know, internally makes a permutation does not first make a list of all permutations and then select from it, but just goes sequentially doing a next permutation type thing.
Yeah, no, that's what I'm saying. So you're still generating all of them, but just not all at once.
I know, I know that. What I'm saying is there should be a way to be smarter than that and to say we can essentially compile the criterion so we don't even have to look at every single one and just take whole.
In some. In some cases, depending on what your criterion is, you can do that, you know, for instance, you want the alternating ones or something like that.
I know, but I'm saying that design have a function. Yeah, go ahead.
We're just. I'm just. I was going to say, a lot of the time, I don't think you can analyze the criterion that much.
Right.
Like, if you're just looking at permutations of integers and you're doing some, you know, nice classic combinatorics thing, maybe you can. But if you're, you know, I don't know, you're looking at permutations of layers of a neural network or something, it's like, this is. It's doomed.
I think that when people are in the first situation, if they're good at what they're doing, they will actually already just generate the ones they need on the fly and not go through the whole.
Listen, I think this function should be part of the story of lazy evaluation and infinite lists and not its own separate function for permutations. Does anybody disagree with that idea?
Yeah, I think I kind of agree. Partly because. I mean. Right. Partly just because you'd also want to have permutation map and permutation scan. Actually, permutation map is not that useful. Permutation scan would be useful.
Yes.
Yeah, yeah.
And we want this for subsets and tuples.
Yeah, Right.
Yeah.
Okay. I have no opinion about derangement Q. Seems mildly useful. Doesn't seem profound. Seems mildly useful. I'm just not clear whether there are cases where. I mean, it's a thing with a very clear name.
It has been requested sometimes.
Okay, well, then we should just have it. Okay, next permutation is related to next subsets and all the other next functions. Is that not also something that is part of the lazy story?
Yes.
Yep.
So that's where it should go. It's very useful functionality and we should have it. I have no opinion about this. Is this useful? Because, I mean, I know that there are formulas. I don't know. There's one with gamma matrices, I think, where you take only odd permutations of the indices. I mean, you can multiply both.
Is this thing any more efficient than just, you know, select permutation signature equals one?
I'm guessing yes, but I don't know for sure. I mean, it is. However, even permutations are permutations. My question is this. In like physics formulas, is it the case that you often say, you know, product over even permutations, for example? If the answer is yes, it would be nice to have an encapsulated function. You just say even permutations.
I don't think you have many formulas like that. I mean, I think most formulas are, you know, whatever. Over permutations with minus one to the.
Power multiplied by the signature of signature.
We have the general group elements function that can take. That can create the elements of any group. And these even permutations are the elements of the alternating groups. So we have a way of generating them. It's just that they can as cycles. So we have to do a final step of converting into permutation lists.
It doesn't strike me as that important. I mean, the fraction of permutations that are even is quite large and so are select with the signature. Makes some sense.
Okay.
I think that's a fine wfr function.
I think both of these last two were a little more tenuous, but they were related.
I don't know what an Eulerian number is. Probably trying to be separate from our Euler number. This doesn't seem necessary. This seems like a fine WFR function again.
Okay.
All right, good stuff. Nothing else. Okay, I think that's all for today. Thanks to people in Live Stream. See you all soon. Bye.
Thanks everyone.
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






