Live CEOing Ep 806: Language Design in the Wolfram Language [Binomial, Freeform, and More]

Stephen Wolfram leads a design discussion on Wolfram Language updates for version 14.1, covering naming decisions for new features like FreeformEvaluate, refinements to Binomial functions, and API consistency for ordering and notebook operations.
Chapters
Okay. Hi, guys. Welcome to another OR from Language Design Review, part of our Language Complete Consistency and Completeness series. We have a variety of things to discuss today, but actually, first of all, I am told that we have some new functionality that's ready in version 14.1, which supposedly I'm running here, and I would like to try and see it. So I'm going to try. So let's say I type percentage.
What's happening?
Can you just see what dollar version is? Yeah, I said it was in builds from the last two days. This looks like it might be right on the edge. You might have the oldest build that doesn't have it.
Okay.
Or, sorry, the newest build that doesn't have it.
That's. What. Maybe somebody could load that on my machine while we're talking and I could try and play with it towards the end of this meeting. Time to make that happen, please.
Yeah.
Thank you. Okay. The famous binomial.
Yep. All right, so we now have Binomial and Pascal Binomial. And so Binomial continues to have simple symbolic evaluations by Pascal. Binomial doesn't have those symbolic simplifications by default because, you know, while they're true in the complex plane, they're not true on the integers. And what's that?
I said, okay.
And yeah, there, there's a system option to turn, you know, binomial into Pascal Binomial, because some people might complain.
I'm sorry, I don't understand. This is. Binomial has not changed its functionality. Correct.
Shouldn't have.
Yes.
I mean, we are.
No, we do not.
Yeah.
And we'll make sure that we've tested everything also.
Yes, there's no change. Okay.
Right. So, you know, so basically we need to review the usage and notes on. On the two pages.
But if I say here, if I do this for our friend Pascal, That's cool. Is that right?
Yes.
Okay. Is roger here, by the way? Roger.
Roger dudley or.
No.
Know Roger.
Well, I don't know. It's. Did I assume he wrote a bunch of this or was it. Was it has reviewed it.
We have been in touch with him. He knows what's happened. I don't know that he's looked at.
He hasn't reviewed the. The specific changes. So the. The notes marked 8 plus are basically the new edition, and the tentative note are the new additions.
Why is it called 8 plus? But it was a long time ago. What, this one here?
Those are new notes because. But that behavior dates to version 8.
You added these notes indicating that it was version 8?
Yes.
What was different in version 8?
That's when we switched from something that looked approximately like Pascal binomial to our current binomial. Or was I wrong? Was I was. I'm pretty sure it was V8. Maybe it was V7 and I marked it incorrectly.
I thought it was V7. Yeah, I don't know.
I'll double check and make sure that tagging is correct and right. And so the way I distinguish them in the usage is. Right. I added the word symmetric to the binomial usage line and I. You can see how I can. How I phrase Pascal binomial. You know, if you want to edit that text, I will not be offended.
I don't think we should say this here. I think we should just say gives the. Gives the standard binomial coefficient or something. Let me just say binomial coefficient.
I mean, I think that's what most.
People would call binomial. Okay, so let's just say gives the binomial coefficient.
I think so, because for most people.
And then. Then why don't we say binomial is the. Gives the symmetric binomial coefficient as the very first line. Or, you know, the. Here maybe binomial gives the symmetric binomial coefficient. Pascal binomial gives a version of the binomial coefficient that respects Pascal's identity.
Okay, so as the second note.
Well, I was thinking right after.
Oh, right after. As the third note. Okay.
Yeah, yeah.
Okay. I can make that change if you don't want to edit these right now.
I don't want to edit them because I think it's going to mess up.
Okay.
Is that right? That's not right anymore. You should clarify what. What is and is not right there.
Oh, I think your documentation is not up to date.
Oh, gosh. Well, whatever. Okay. For goodness sake. Well, I mean, basic examples you should include.
Right. So I haven't filled out all of the examples on the Pascal binomial. I only put in.
This is a bit of an extreme set of things to include in the basic examples for binomial.
Yeah, I had that same thought, but that was already there. I didn't.
Yeah, okay, but what you should do is you should show some symbolic stuff here, which is much more useful. Binomial of n comma 2, which is not obvious that that would work. And this is all just irrelevant. Just get rid of that from the basic examples. Just not appropriate for this. It's just completely, utterly not appropriate. We should also find out how that got put there.
Yeah, well, that's a Noosh.
Yeah, I think that it was part of systematic thing.
And people around here seem to think that binomial complex value or whatever. Complex argument.
So you need to take it out because it's obviously wrong. Okay. Things like this that just conf. People. Shouldn't be there.
Yes, yes. It's basically discreet.
Shouldn't be there. Yeah, I agree. All right, that's enough for that item, I think.
Okay, so there's a new page for you to review and.
I thought it was. Did we agree on free form? That was not the name. I.
Yes, that is absolutely what we agreed on. And you even wanted it to not camel cased. So. So there are two questions.
I'm not loving this name. Seeing it again.
Okay.
Okay. But go ahead, let's.
All right, so the right one is. I think there should be a just like to expression has a head argument. I think this. The thing should have a head argument. Yes. And then there are a couple of options from Wolfram Alpha and most importantly, input assumptions that seem like they would make sense that we should.
Yes, they absolutely do.
Okay, so those are very simple extensions we. I'm sure Luke can do.
Yeah, but. But now let's talk about the name. Okay. It doesn't need to be short because nobody's going to type it in.
Well, unless they need to specify the assumptions.
What would be. Would it be from Freeform? Because if it was interpret. Okay, what are some possible names here?
Right, so interpret. Sure. I mean, I, you know, I think from Freeform is fine, other than the fact that we don't. Right. We don't use that elsewhere. Right. We have to expression and make expression or two boxes and make boxes. So it's a little weird.
And there's no version of. From. To expression that where a second argument would give it this functionality.
There is.
In other words, you know, I assume that we don't just want equal bracket to turn into two expression. Blah, blah, blah, comma. Well, no, that doesn't make sense, does it? No, because we still have a. See, there's another piece of functionality we might one day want which is, You know, output something in a. In free form output. Do you see what I'm saying? Just like we have traditional form, we might want a linguistic summary of something.
Is. Isn't that. Well, but I don't think that's a single function other. Unless it's spoken string.
Yeah.
I'm reminded of the AI summarizers.
Yes. That we might want. We might want something which. Which given a. Some complicated output, you get the Summary of that kind. I mean, we, we've had attempts to summarize before which have been rather unsuccessful. Now maybe we can get something better.
I've been using the COGI summarizer for just my own personal use and it's. Yeah, it's, it's, it's nice having, you know, that kind of facility just floating around that you can use whenever you want.
Yeah.
At least for, at least, at least for web stuff. So.
Yeah, no, I understand. I mean, I have to say I've only used it as a sort of. I, I never remember to try to use it. The. I mean, I've only used it to try it out, so to speak. Okay, let's come back to this. So what. Would freeform interpret be a correct usage? I mean in terms of, you know, we've got an interpreter, but that's a function that's applied to things.
Yeah, yeah, we don't want interpreter.
And there's also semantic interpretation. And I keep, I keep wondering why it's not just that and then realizing that that's because I think this returns the unevaluated result. Right. So then, then I'm wondering if there's, if it's just a particular second argument with semantic interpretation.
Yeah. What the heck? Why isn't it just.
I thought, Okay, so how does semantic interpretation work?
It calls WolframAlpha and does the parse.
What's this? How does this work?
This works exactly as control equal does.
Yeah.
Which as Jeremy knows, is the parse plus some additional stuff.
Right.
So.
Right. So that, that's a good point is one difference between semantic interpretation and equals bracket is that if the alpha, if no alpha parse will directly translate into something that, into a Wolfram language expression, it's not going to dig into the result pods in order to find something what's not going to semantic interpretation but equals bracket does.
Well, why doesn't semantic interpretation.
Because it shouldn't.
So, so the. What's the difference between semantic interpretation and Wolframa Alpha blah comma Wolfram parse.
The, the, the fact that if it, that if, if the input interpretation doesn't contain the information then. So one difference. Excuse me, is whether or not it goes past the input interpretation. Another difference is how it handles assumptions because semantic interpretation takes the ambiguity function argument.
No, no, no. Doesn't go past.
I'm sorry, then. Then there's probably no difference between them except for two things. One is. The one is what I was starting to say about ambiguity function and another being that semantic interpretation will evaluate the parse by default. But you can provide it with a second argument that will.
Okay, this is obviously not the same.
Yeah, well, yeah, well, it's not the same as equal bracket, but I presume that semantic interpretation will also give dollar failed or some such.
Yeah, I would expect it to go.
Okay, all right, so. So what is this thing doing that.
So this control equals the. This behaves exactly like control equals, which is why freeform is why it's. I think it's important that we have freeform as part of the name so we can connect it with inline freeform input.
Maybe we should call it freeform Evaluate, which is not unlike LLM Evaluate, which we don't have. We have LLM evaluate tor.
Well, yeah, freeform evaluate is fine, I think. And it's especially nice because it does, you know.
Right.
Indicate that it's going to do more than just the parse.
Right. Because. Right. So if you did freeform evaluate of, you know, the word two in words two plus two, you would actually get four unless you add the head holding argument. Sorry, you'd get four as opposed to Control equals, where you would see a literal two plus two two. Right. Now if you did control equals of 2 plus 2, you'd see a 2 plus 2 underneath that, which would then evaluate to 4.
Right? Yeah. All right. I think Free form value. It works for me. Other people got comments on this now. I mean the second argument here is ahead. Okay. Yep. Okay, I'm good. Anybody else?
There's a new. There. There are two new lines on the Wolram alpha page that I, I'm not entirely pleased with, but. So you see the two futurized lines there which I guess we would now change to freeform evaluate and Freeform Evaluate held.
Think so.
And are you okay with the description?
Yeah.
Okay.
Well, yes, yes, I'm okay. Except this isn't Free Form Evaluate held. There's no evaluate. I mean this is.
Yeah, that is sort of the problem. Okay, well I suppose we could just call it Freeform held and then.
Well, what's the difference in Wolfram result and Freeform Evaluate.
Wolfram result. Well, I think.
Personally I don't understand why we're documenting these things here. We've got a function that does this. Why are we double covering this?
Well, now that Freeform evaluate takes options, we don't have to.
Okay, fine, then let's not. Let's leave this as a pure WolframAlpha API call. Basically.
Well, they're all.
I know, but I mean, as visibly as that's what it is, it's branded as that and that's, you know, that's its story. Whereas the Freeform evaluate happens. We know technologically to use Wolfram Alpha. Well, actually it's not going to do that for much longer. Some, some parts of that are going to be local. Right Jeremy?
Yes.
Once what Once that's ready which hopefully is 14:1. Right.
We've discussed this elsewhere. That, that, that timetable has become unrealistic.
Well, we need to hear about that later.
Which p. Which pieces are going to become local.
I, I can talk to you about that later.
Itai. We need to talk about that. Okay, To make myself a note.
We have talked about it at the last two Wolf Malpha meetings.
All right, let's move on. Okay. Notebook cell. What is this?
It's a function you were very adamant about.
This is the history. Notebook history.
Oh. Oh wow. I was adamant. But my, you know, it was a long time ago. Okay, so if I say notebook cell data. Fancy, Should that have units? Probably not.
The only piece of data that's read out that gets processed are times to convert them to time objects and date intervals. Everything else is sort of the raw stuff that the, that's actually in the, the option settings.
I'd say if we were going to leave it just as numbers, we could call it, you know, cell memory byte count.
Yeah, that would make sense. Cell byte count since we know what the, you know, cell label Cell byte count. Does that make sense?
Well, I mean, I'm not going to argue strenuously, but there is a difference between the size and memory and the size on disk.
Or what is it? I'm happy with byte count because the byte count, I mean how much different is.
Could be dramatically different. Entirely possible. I mean, you know, imagine a dynamic box. A dynamic box serialized might just call large function results bracket brackets for like, you know, 20 bytes. But then to instantiate it could require megabytes.
So that's the. In memory it is megabytes. Yes, yes. And so what's this telling us? This is telling us in memory, correct?
Itay, you were breaking up just a bit there.
I think we can just document that fact. I think it's better to have it be byte count. Okay, my next question is cell object. Why don't we have a nicer print form for cell object?
Never been requested.
I know, I know, I know but I mean maybe that's a. Maybe this is the wake up call to do that.
What's, I mean, what's your objection?
Just that, you know, the more we actually show about what's in the cell object. And maybe with the percent modernization, we have technology to. To show iconized cells, do we not?
We ain't doing that for 14.1. Not even close.
Okay, but if we had that technology in the future, we could use it for this too.
Yeah, I mean, you know, you're talking about kind of a more robust thumbnailing technology, which we're. Yeah. Even for percent modernization, what we're doing isn't thumbnailing. What we're doing is elision.
Okay, well, maybe there's something to that. I don't know. I mean, look, this is. This is clearly useful as it is. I'm just saying it would be even more beautiful if this was a little bit more obvious. What it is, and the fact that it says is very helpful. Otherwise, I'm dead in the water.
Yeah, well, and I'm not, frankly, even if it even assuming we had the technology and it was infinitely fast and used negative memory, the. I would be a bit concerned about showing the previews in line just because it could get very visually clunky. It might be something that's better for a hover effect.
Fine. Okay. Well, in any case. But this is. Okay, so for example, if I want to say, Huh. Oh, Magnificent. Okay. Really, a method option for this. Pretty obscure.
For.
A pretty obscure way to do it.
Is there a precedent? I didn't know of one.
I'm thinking.
And there might.
Might be one. In the world of tabular, I'm not. I mean, this is basically. Does it produce an association or a list?
No, this is definitely not that. It's. It's whether there is a label column or not in the association, what the label is. So that is the function. That is the function to apply to that column, which could be none, in which case the magic value none, in which case that column is entirely absent.
But that's not a label. That's. That's the name of. This is an association. This whole thing is an association where the first association element is the. Is the. Is that cell is the cell object of that cell.
It's a data set. It's not an association. Right.
No, no. Okay, fair enough, Fair enough. I'm sorry. What I meant to say was in the data set, the data set is an association of associations inside. If I do normal on this, I will get an association of associations. I could get a list of associations instead.
I see.
Right. And the list of associations could just be a list of cells. And one of the elements in the cell could be cell content or something, or cell Object. Yes.
Right.
So the choice is between using the cell object and as the key for that cell object, or just giving a list of associations for successive cells. And simply putting the cell content as an element of each sub association, so to speak. So how does a notebook import do anything like this? Does notebook import have any get built to give data sets?
No, and it doesn't even return cell objects. I believe that's purely just content. It imports the content and produces, you know, text or cell expressions or such without any sort of labeling or, or metadata tracking.
But. So if I wanted to generate, if I want to just get a, a list of cell objects for this notebook, what would I do for a notebook? I'm not sure why I want to do that.
Cell objects, you just say cells open, close.
I see.
I mean the benefit of having the cell object in the data somewhere is, you know, it's a clickable thing that takes you straight to that cell. So if you have some, you know, you see some cell is taking up, you know, four megabytes or something, you might want to go see what that cell is. Maybe you haven't stored that in your data, but you want to go see it. So you click the cell object style name and it takes you there.
Wait a minute, what do you mean?
So the link each of these cell objects with title, section, item, click on title, it'll scroll to or item, click on the thing that says select this cell.
Okay, how do I get back?
Well, there is no go back.
There used to be, but.
Yeah.
Can we raise that question in. There's a lot of wiggling there. Hello, Wiggler. Look at that. Wiggler. Oops, Wiggle. Okay, okay. On the question of going back, I think we should talk about this in end user assistance and I would argue that, that there might be some metaphor for some hovering, you know, ghostly back button here until you make a further move. John, am I crazy?
Sorry, sorry. I was distracted with another thing you asked at the beginning of the meeting. The did we follow hyperlink? Is that what happened?
Yeah, we followed a hyperlink, but we can't go back.
Okay, so actually in progress at this very moment is the ability for macOS to support gesture based back in the same way that it would in any web browser.
Now this actually, what is gesture based back?
It's typically two finger slide left on your, you know, on your trackpad or.
Trackpad that I don't have on my desktop computer.
Well, do you have an apple mouse? No, because Apple mice, it's the same thing.
No, I got rid of it because.
So on Windows there is actually a standardized back button on most mice. And that works. I don't remember if that button works on with a more traditional mouse on Mac OS or not.
Well, at the very least we could. Maybe it should be in the right click menu.
Right click menu is always a little weird because right click is a context and you know, if you say it should be in the context menu. Well, how many context menus? Well, I'm thinking, I mean, because there are, you know, like a couple dozen of them depending on what you. Right click.
Different topic. But I think we should address it. Yeah, but. Okay, but you've got.
But, but in any case, because percent modernization raises, you know, a similar sort of issue. And so that's why I jumped ahead to make gesture based back work. It's something I've wanted for a while anyway, and we now have more motivation to do it.
Fine. I don't remember why I got rid of my. Oh yeah, that's right. I wanted to scroll wheel. That's why I got rid of my Apple.
Oh, well, so you don't have. You didn't use the gesture based scrolling.
I didn't like it for some reason I can't now remember.
Maybe because they kept trying to convince you that natural was the right way to do it. That if you flip it upside down, it's quote, quote, natural or you have.
To invert it to charge it.
Oh, yes, that's a yes.
What?
The charging port is on the bottom of Apple's mice.
Yeah, the. The mice that come with imacs, they have the charging port on the bottom where you literally can't use the mouse while you're charging it. It is the most bonkers thing you've ever seen.
It's kind of like it's a dead mouse upside down.
Okay, exactly.
Yeah. Okay. All right. Okay, so wait a second. So I think. Did we have more to discuss with this? I. I think the.
Well, this is the question one is do we even need an option for this? So we just pick one and stay with it. And if we want to allow this to be toggled, then yeah, we'll need a name.
Well, the alternative is rowname function.
This was originally called key function.
And yeah, this doesn't work in the build that you have, Stephen.
Oh, okay. But what will it look like? It will be just. It will be effectively. If I did a normal on the result of this, it would be a list where there's an additional column or what?
No, so it's a row name. Function goes to none will make that thing disappear. Did this key function work in his build?
I think what will work in your build to just remove this, Stephen, is include keys arrow false Method include keys arrow false. But I don't have an older build with which to test that.
Yeah, right.
And then we decided to make it more general where you could apply any function and.
Okay, why do you think it's a good idea to have those things as keys as opposed to like this?
Well, as long as you're using the zero argument or the one argument forms, you'll get the cell object and the data if you specify a different second argument. In other words, you can ask for specific pieces of data that might not be here to begin with, like the font size, even though it's not set for cells. If you're asking for your own elements, cell object is not added automatically to your columns as one of those elements.
Yeah, okay, fine. But then. And can you select particular rows? Can you select particular cells or not?
Not sure what you mean by select.
Well, I mean, if I wanted just a subsection of the notebook.
You can.
Specify cell, a list of cell objects. How one gets those cell objects is.
Which can be selected using cells, and cells has all kinds of methods for selecting things.
But then I think you're right that you should have these as keys, because I think otherwise it will get very obscure.
And we don't need to document the method option for.
Let's not document the method option. Okay. For now. Okay. Oh, boy. Consistency in order functions.
Yep.
Why do I think this is going to be kind of horrifying? Okay.
Right, so. So we have alphabetic order and it really insists that its arguments are strings.
Yep.
On the other hand, we have numerical order, which doesn't insist that its things are numerical things. So if it. Right. If you're given sort of two comparable things, it'll compare them numerically. If you give it two non numerical things, it'll just do order. And then if you mix types, then it'll sort of sort them to. Well, it will try to sort them so that similar types are together. So you see the dates are together and the bottom thing and the pure numbers or the things that are pretty close to the dimensionless numbers are there at the beginning.
So just so I understand, I mean, one boundary condition, it seems to me, is that whatever sort does order should also do that. Order should simply be a descriptor of what sort will do. Is that correct? I mean, so in the case of alphabetical order, do we have an alphabetic Sort. Yes. Okay, so alphabetic sort. I mean, if I just say.
Alphabetic sort is sort with alphabetic order a second argument.
I see. So what we. What you're saying is, should this change as well?
Yes.
Okay. I mean, my feeling is maybe I'm wrong, but my feeling is that it should just be permissive. It should do what sort does and just do the best it can in sorting it.
Okay. I mean, I. I don't.
I don't think. Does anybody think that's obviously wrong? I. I don't think that.
No, no, that's actually what we are proposing, that we follow what numerical order does. And. And whenever we cannot sort, something will fall back to order.
I think that's the right thing to do. Well, I don't see any reason to. To be persnickety about this.
Right. Yeah. I mean, well, I guess strings tend to come first, but. Right. I mean, it'll not be literally just falling back to order. Right. Because we'll want to sort any non strings after all the strings, which will usually be the case, but not always.
Yes, I think that's the right thing to do. So, I mean, do we want a warning message or do we not care?
I think not even that. That would be my suggestion.
All right, fine.
Okay.
Well, so we're not interspersing things by two stringing them, we're just putting them at the end.
Yes.
Okay. It seems okay to me. Any other functions affected? It's just numerical sort and alphabetic sort, right?
I think so.
Well, this discussion appeared because of things like take largest, Take largest are also rather picky about only wanting numbers. And so the idea would be that all these ordering functions should just try to do what they are supposed to do, and then if they cannot, they fall back to order and do something too.
Yes, well, that's part of the next item.
Okay. Okay. Sorry, sorry, sorry.
There was. So, yeah, let's. So let's just scroll down and if you open that first subsection, then I think you'll see exactly the point Jose was just making.
Okay. Sorry. Here.
Yep.
So what's the question? Here is the question. What does largest mean? Right.
Okay. So there are two different things. One is that take largest right now insists it wants numerical sortable things. That was the previous discussion. The second thing is that we don't have ways of passing ordering functions to take largest by. So what if we want to sort other things and we want to specify an ordering function?
So tricky.
Largest right now assumes numerical order. But what if we want some other ordering function?
Right so, Right, Right. So in fact, there are at least three or four different things here, but yes, one of them is. Right, so. So take largest right now is sort of very insistent that you have a single set of, you know, predefined numerical things that it understands rather than just sort of using numerical order. And so, you know, if you, you know, if you try to take largest of a data object and, and the number, it'll yell at you. Which, granted, you know, I wouldn't know off the top of my head. Well, I know now having prepared this agenda item, but I wouldn't know which one numerical order would consider largest. But, you know, of what?
Sorry?
Of a date object and two.
Yeah, okay, I wouldn't know either.
Right, but you know, numerical order, so.
Right, exactly, exactly. But given that it has a definite opinion on that, you know.
Okay, let's look at take largest and where would it naturally get. Do we have an option for ordering functions elsewhere? I think we do. We have some functions that have an ordering function option, do we not?
I don't think we have any have an ordering option. Some have an optional.
I know that. Yeah. I mean, it seems to me that that's a reasonable option to try to introduce.
So the, the last extension we did in this regard was sort by, which now takes both an an F function and a P ordering function.
Right. And I think we should follow that rather than.
Remember sort, Sort by. In addition, you know, this is. This is part of the tabular thing is going to have these. The functions can be rules which we have to review in the tabular stuff that could be in reverse or not.
Yes, but so wait a second. So I mean, you're saying that the third argument here, if we have a third argument which is an ordering function, then Rob is saying that there are new shorthand forms of ordering functions that are what, for example?
Well, no, that's really only for Sortby, where you. Where you want. You remember. But Sortby takes several functions.
So once we have an ordering function, we may want to reverse it. And so that's the notation that Rob is talking about.
Yeah.
May we want to reverse what? The ordering function.
The ordering function, yes. Effectively returning the negative.
Right. Because I guess we don't have reverse numerical order, say.
Okay, so what are you guys proposing?
All right, I don't think we're proposing anything with that right now. So let's walk through this a bit more carefully now that we have the lay of the land. Right. So we have take largest by, which only support those specific things and everything has to be homogeneous and it gives exactly N results. If you specify N. Including multiplicities requires specifying number of results and can give the value index or both. You know, position largest takes an order function.
Sorry, sorry, sorry. Wait a minute. Can give the value index or both. What?
Yeah, take a look at take largest.
He's referring to the arrow notation in the first argument.
Oh, I, I'm. I should be using that.
Yeah, that's very powerful.
I should have been using that for some things. Okay, Yes. Okay, so now. Okay, keep going.
Right, so then we have position largest, which takes an order function which. But it's, you know, it's not telling us which one it is. But you know, probably it should be using numerical order.
Oh, it does take an ordering function.
Yes.
Why did we put an ordering function into that but not into takelogist?
I think it's a historical thing. That's right.
I think, yeah, I think it's probably because there's a take largest buy and so we thought we didn't need it, but I mean there's no reason not to do it. It's nice.
Yeah.
You know.
Well, take largest first and then in following released numerical order, where are our solutions to sorting numerical things? That was our focus at the time.
Yes. Okay. Maximal by.
And this is perhaps the most. This is getting into most naughty thing.
That's an earlier version. And the focus there is to sort by canonical order and get the maximum.
Of the buys of the, of the. The, the buy. The bought, you know, the bide things. The question is how do you sort the by things?
Correct.
Right. Isn't that an issue for take largest buy as well?
Well, it, it would use whatever sorting.
It is, but it fails now. Unless, unless everything. The buy gives numbers and it can sort using.
Okay, but so does maximal buy require numbers?
No, no.
Oh gosh.
Because it's using canonical order and so in fact you might get unexpected results if you're expecting it to sort by the numbers.
Right, okay, okay. All right, I understand the issue. Okay.
So and, and there, there's one last issue before we go in there, which is. Which is Rob's little pet peeve, which is that there's no easy way to get a list of the n largest values, including ignoring multiplicities. And so I have here a little functions. I named Maximilian after the evil robot.
And you know, this cultural non awareness on my part. What evil robot?
In the movie the Black Hole, which is a pretty terrible movie, but is significant for. Yes, but it's significant for being the last Major motion picture release to have a purely symphonic overture before the title sequence appears.
What?
Yes, like the first two or three minutes. The first time I watched it on Disney I was like, is there something wrong with my video? But no, it actually has an orchestral overture.
Oh, you mean it's a black screen and it's just playing music?
Yes.
Oh, because it's a black hole.
I get. Well, I mean that used to be a thing with movies because, you know.
It was like somebody was playing an organ at the front of the right silent movie theater.
Yes.
Yeah.
Or you get your performance during While the intermission card is up.
Yeah.
Yes. So okay, anyway, we're trying to modernize past some of that.
Yeah, right. So. So here you see. So what Maximilian does when you ask for the two largest things rather than it giving you. Oh, well, that was probably a silly example.
Yeah, it doesn't matter. But anyway, we get the point. That's an interesting idea. So I mean, it's kind of a delete duplicates interwoven. It's delete duplicates being interwoven somehow it's counting after deleting duplicates in some way.
Correct.
And in general, you know, that could get quite hairy because you could imagine the same test. You can imagine your know, you could imagine an iterative thing where you sort and you say I just want to get three unique ones based on, you know what I'm saying? B based on unique after having stain tested them, so to speak. Does that make sense? So I mean in general, if we had a same test option, Does that make any sense? No, not really. I mean, well, it sort of does. If we have a same test option and the default is essentially none or false ampersand. It's never the same. That would give the current behavior where every sorted thing is unique. Am I making sense? But as soon as we same test it, I mean, it's a little bit weird. Same test arrow same Q. It's a little bit weird that that's the way that you get the unique unique elements. But it's not completely crazy. Especially not if you want to have the freedom to have non same queue same testing.
Yeah, in some sense, you know, I mean, maybe we should just. I mean the, the behavior, the behavior that bothers me. In maximal buys, if you don't give the end it gives a list of all the maximal elements.
What's that mean?
And well, change, change one of those 100-00 to 200 in Etai's list and then just try maximal buy of that identity.
Comma, identity or Common, Yeah.
Comma, identity.
I mean, why didn't that give a carrot? Oh, because it has an. It has a.
It has a operator form.
Operator form. Okay.
And it's not clearly documented. That's so. So if I give a two, it gives that same thing, but if I give a. A one, it just gives 1 200. And I think there's. I think that it just needs to be made super clear in the documentation that that's what. It's. It's sort of a special case.
What I don't understand what's the special case here?
The. The two argument form is giving you an automatic. An arbitrary length thing of all the maxima. Whereas if you did one, you would get exactly one, and if you did two, you'd get.
I see. So it's like kind of. Kind of an all for the maximal elements.
Yeah, so. So maximal buy is a special case. Every other case of maximal buy when you give the number is the same as take largest buy. I mean, there's no difference except.
Okay, I got it.
The ordering function. I think that just needs to be documented. Super.
It's a little weird. It's a little weird. Yeah.
It is. It is weird.
Yeah. But I mean, take maximal by. Actually, it's not so weird because. Because it's quite useful if you've got. Because those things could all be very different. See what I'm saying? And.
So I mean, which things could be very different?
Well, I mean, if I say here, you know, mod, hash, comma, three.
Yeah, I see.
That's useful.
Yeah. But now if you put a. If you put a two there afterwards, gives you the two hundreds only.
I don't know why it's giving me the two hundreds. Is it sorting afterwards?
No, it's. It's what that is when you put a number in.
Oh, it's just got. It's the order in the list.
It's literally taking the first two elements of the ordering of getting that list.
Right. It's basically adding an up to, you know, a take of up to.
So it's sort of a. There's a huge switch in behavior. And I think. I think with position largest five, we don't need the. You know, we can repeat take largest by and maximal by. That's fine. But it just needs to be documented very clearly that. That the case without a number is. And it's not clear from. At least it was not clear to me from the current documentation.
All right, so the same test. If there was the same test, we can imagine pruning the Specified number of things down, equivalencing by the same test. In other words, that the description would be. It produces results which are unique under same testing. Do you see what I'm saying? And if we did that, then the default case is same test arrow. Well, something that gives. I don't know what. What, what function always gives false, other than false ampersand. But that could be the thing. Yeah. And as soon as you save same test arrow, same queue, you're going to get the unique things only. Am I making sense? And potentially these functions, if you ask for three and there's the same test, which is, you know, concertina ing the things together, you might have to go further to get to something where you get three actual distinct under same test elements out. Does that make sense?
Yes, yes.
I think the same testing is a, is a not. I mean, it's a little bit. It gives you the functionality for sure. And that's independent of the ordering function thing, which is an additional argument to take largest, which given position, largest. Is presumably what we need to have, because we already have that argument there. Does that make sense to people?
Something I don't know is the relation between same test and the ordering function, because the ordinary function can return zero, which is a same test in a sense. And so there might be some sort of collision of.
I see.
But I think Stephen's talking about the same test on the actual. The actual list values versus the same test on the buy.
But this idea should work in cases in which we have, I don't know, imagine identity or take largest without the buy.
So I would claim take largest comma, five, same test arrow, same Q will compress that. If there were, you know, four identical hundreds, and then, you know, 150 another, blah, blah, blah, blah, blah. It will keep trying to pick things out until it has. I forget what I said. Five, whatever it is, distinct results. You see what I'm saying? So in other words, what I'm claiming is if we say take largest of 5, 2, 4, 1, 2. Well, 5, whatever it is, 5, 5, whatever. Yeah. Okay, if we say this comma 2, we'll just get 5, 5. But now what I'm claiming is if we say this comma, same test arrow, same queue, it'll say, no, that's not good enough. I, I want to get something which is no longer same test, no longer same Q. So I should return here 5 comma 4.
Yeah, that makes sense. And, and in that case, actually up to. Of the. The number to take is very useful because if you only have two unique elements and you ask for three. The upto would work and the other case would fail.
Yep. I think this is fairly elegant as a way to do this. Equivalency. I mean, what function. So that will be equivalent to union. Except it isn't. Okay, if I say delete duplicates.
Sorry, what's the value that represents the current behavior of take largest false, ampersand false. Okay.
And I guess the question Jose is bringing up too is whether that applies to the. To the buy thing or the original values in the list.
Why did that not work? I would have expected.
I believe it's the same test argument. I think. I think you wanted same queue there.
But isn't that the defi.
I mean, that is the default.
The default. Right. So perhaps you're right.
It should fail because if it's not an option, but it shouldn't get the wrong result.
Yes, that's the point. And perhaps we should also, as a courtesy, support the option. But that's. But this is. It's the equivalent of delete duplicates with the same test option. Except it's the same test argument in that case.
Yeah, I mean. Well, I mean. Right. I mean, this is something that there have been arguments about before. Right. But the delete duplicates doesn't take any options. And so when you gave it same test goes to same queue, it used the function that never evaluated to true, therefore they were all distinct.
Yeah. So that's an interesting question. Whether things. That's a user assistance question. Whether things that have no options should redden up options.
There are so many cases where, you know, it's rules.
Yeah, rules.
Rules being processed by code.
What I would have expected here is a message saying these should have evaluated to true and false. And it didn't. Some other functions evaluate.
Right. But suppose you did equal. Right. There will be cases where it evaluates to neither true nor false. And I think that people don't in general want to see all those messages.
Well, I actually think. I think that would be useful. People use equal instead of same Q to know that it's not actually being evaluated. Like somebody delete duplicates of things with sub lists and they use equal. Well, they're in trouble. Right?
Yes. Yeah. So that message is probably worth having.
All right.
But I think we should think it through a little bit more. But I'm proposing the same test thing for take largest and so on. Makes sense to people. Yeah.
Wow.
So this is for the rank discussion. So there's still the ordering function discussion.
No, I know But I'm saying we put in the ordering function as an argument and then we have the same test function. Okay. So I'm thinking. I mean, think it through a little bit because, I mean, unless. Unless we think the ordering function is obscure. But this is. But I think it's obscure to say same Q as a way to get, you know, I think this is a. An idiom, basically, to get to the unique. Unique elements.
Yeah, the same Q thing is way more obscure than the ordering.
Yes, but I mean, if we think we want unique, you know, then we may still need, you know, take largest, unique or something. If we think that that is going to end up being a common thing, we could consider it. I have to say, I haven't particularly needed it. I use take largest all the time.
Yeah, well, you can get it. You can get it by position. Largest.
Yeah. All right, we should wrap up here. We managed to make it through the agenda. Thanks very much, everybody. I didn't. I didn't get a version, did I? That. That can use percent monetization.
So apparently the reason you didn't have one already was because some mount name changed somewhere and Rogers fixed that, but he didn't want to kick off a process while you were in the. While you were using the machine. So.
Okay, all right. Okay, fine. All right. Okay. But.
Okay, gonna do that right now.
Okay, terrific. I will look forward to playing with it real soon. Okay, thanks a lot, everybody. See.
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






