Live CEOing Ep 759: Language Design in the Wolfram Language [Association, $HistoryLength, and More]

Transcript of a Wolfram Language Design Review (Live CEOing Ep 759) led by Stephen Wolfram with Jeremy, John, Tom and others. Main topics in this chunk: whether Association should return evaluated arguments on construction vs. return unevaluated input in failure cases (tradeoffs: clarity vs. extra re-evaluation), and an extended discussion about history/output storage: memory concerns when large outputs are stored in Out, proposals for per-notebook or size-based history limits (a circular buffer, output-size limiter, and UI to indicate unstored/ephemeral outputs), plus smaller items (rounding-radius option syntax, nine-patch image handling, and sequence-alignment API ambiguity).
Chapters
Sam.
Okay. Hello, everyone. Welcome to another Wolfram Language Design Review, part of our Language Completeness and Consistency series. I see we have a few topics here.
Yeah.
Association constructors should return the result of the evaluation.
So right now, association, if you give it something that's, you know, not actually a bunch of rules, then it'll evaluate all of the arguments to see if they become rules. And if it fails, then it returns the original input expression.
Okay. Right.
So, you know, Ricardo thinks that it should return the evaluated argument. So it should. So his argument is that it's. And I'm. He was invited. I'm not sure if he. He joined us. Doesn't look like he's joined us, but basically he thinks that, you know, it's sort of easier for error checking and.
Well, this case doesn't look very compelling to me with echo, but maybe there are cases that are more compelling.
Right.
I mean, I do tend to think if it. If it evaluated them, it might as well show it evaluated. Though it's very obscure. If it, if it evaluates them, it doesn't show that it evaluated them.
There is one downside with that, that it's going to go and evaluate it again and fail again.
So that's.
If.
What if.
If it doesn't.
If. If you return association with the evaluated expression is going to go through the evaluator again, see a different expression, and go and evaluate and go back to the association.
Yeah, I get it. Well, I don't know. I mean, and I mean, we, we.
Don'T have a mechanism to tack it.
I mean, it's an association of raw objects.
No, if it constructs an association, if it succeeds. We're talking about the case when it fails to construct an associate where it gets input that's not able to construct.
Yeah, I understand. So this is the invalid flag.
Yeah, exactly. It's an invalid thing. So I'm against it from the fact that it's just going to go through and evaluate everything again and fail again. And that just seems like a lot of work. We're adding work to show the evaluated expression, and then we're. And then we're going and evaluating again and failing again.
Well, I think that's an implementation issue. I think from the user point of view, it will be better if the thing. If it evaluated. Show it evaluated, because otherwise people will be confused because that thing might have had a big complicated thing in. It has a bunch of side effects. The side effects happen. It's like, really?
They.
Did they happen? No, it. It looks like they didn't happen. But I, I take your point about implementation and I guess Ricardo is not here to make his case. But if that's what we're talking about in, I mean you're saying these other cases like and don't have this issue that they are, you know, item potent in some sense.
Right.
They change.
Right. So. Right. And will attempt to get to true or false and you know, well, once it knows it's false, it knows it can stop. Right.
Well, I take Ricardo's point. I think it might be slightly better. But there's this implementation issue and I think that that probably blocks it for the time being.
Sorry, that implementation issue was just a.
Performance issue that it would go through the evaluator again and if it's invalid.
You know, then does it matter?
That's a good point.
Say that again.
If it's an error case, if it's an error branch anyway, does it matter? That's a fair point. I mean this is not a success branch.
Right. Although it's also not necessarily a failure branch because, you know, consider the case of, you know, association of blank.
Pretty weird.
It's not that weird. Association of blank is not a weird.
Useful. Yeah.
Yeah.
I just don't see a compelling case for having it evaluated.
Well, I'm, I'm telling you the case. The point is it's obscure to people, but it does evaluate. But it doesn't show you. It evaluates. We don't have other examples of that. We don't have other examples of things that I, at least I'm not thinking of one that reach in evaluate and then don't admit it.
Well, we, we have, we have those three examples in the gray bullet points and I don't know if that's deliberate.
Which one? These ones here?
Yes. You know, I don't know if that's deliberate or an accident of implementation.
No, wait, so those do do the thing that, that Ricardo is proposing the association does?
No, these do the thing of. Evaluating their arguments. But then if it's a failure case, you know, returning unevaluated.
Oh boy. Well, I mean, clearly we need some consistency here.
Let me. See if I can't.
Hey, I have a question for you design oriented folk here. There was a function that we invented. I think it's our. You might have been involved. It's about a year ago. That allows you to store a collection of bytes and tag it as being. Oh, these collection of bytes represents a jpeg. We invented that for some kind of import situation, maybe XML related. I'm not sure. Do you Remember what it is.
Boy. It was more than a year ago, but I do know what you're talking about. And can I reconstruct the name?
And. You know this. It was a year ago.
I think it was imported object.
Oh, that's right.
And it was in 2020. So.
Well, you know, with the whole pandemic thing. Yes. Just seems like no time has passed. Why is this so slow? Why is that? Why was that so slow? Is our node here? Was. Why was that so slow?
Our node is not here.
Okay, so record that moment in this. In this video. Show it to him, please. It's a problem for 14. Am I making sense? I typed the name. I want to see the output immediately. Not. Not in seven years. Okay? This is the thing. Okay. Can you. Julio needs to know about this. It's come up for a machine learning application. Could somebody communicate that to him? Should I do it?
I. I can take care of that.
Okay. This is an interesting construct. In my opinion, It's a useful construct for various. Various purposes. I think he needed it for some communication to multimodal LLMs. Okay.
Right. So basically, Ricardo's argument is that, you know, if. If you know, if you have some blob that you expect will be, you know, have some side effects and produce. And, You know, and produce an association if something goes wrong, and then you might. And some piece of code processes that result, then you might run those side effects a second time.
I just. I mean, the argu. Another argument is I don't want something that walks and talks like an association, but clearly isn't one. I mean, it's sort of interesting that that doesn't give a message. Why doesn't it?
Probably the pattern case. You. You could use whole pattern, of course, but.
Right.
I mean, the association of blank should not give a message.
No, it shouldn't give a message. But that doesn't mean association of 1, comma, 3. Then given that it's now we've now admitted that we are looking at these things. It's not. Not like it's just passing and saying it's not a rule. Go away. See what I'm saying?
I don't know the message based on number of arguments.
All right, well, we could just give a red, red carrot based on that number of arguments. And I think. I think we could give a message saying this isn't a valid association.
So what about association of one?
That's not a valid association.
An association of blank is.
Okay, I can't justify that very well, I can, because, you know, if the Thing couldn't have a rule. It's not a valid association.
I can't do look up on that last thing. It's not, it's not very associated.
No, no, no, I, I understand, but it could be a rule in the co substitution world of that thing, which we still haven't really developed and that that's a future thing to do. The whole theory of, you know, substitution and co substitution and so on. Of what could be, you know, that that thing could be a rule, it could stand for a rule, whereas association of one could not stand for a rule.
I'm sorry, did you claim that there is some argument counting reason that there should be a red carrot or something there? Because I, I didn't follow that at all.
Wait a minute, it's not. Oh no association. I, I, I, I never.
Association does not take a list. Association takes a sequence of rules.
I mean it will also accept a list.
But yeah, well, yeah, okay, I use it in the list form always. Okay, fine. Forget my argument counting argument.
Yeah.
I, look, without Ricardo here, I don't think we can make this case any further. I don't think this is a very important corner case. I think I, I, I do take the point I think Jeremy made here that this is an error case. And so if it does have to redo the evaluation in this case, it's not disastrous. But I don't have a strong feeling about this. But we need consistency with these other things and I don't understand that. Okay, so let's see. Evaluation, object. What the heck is the end there? What is n?
I think that's probably like the kernel number or something. I'm not sure.
Does it, what is this piece of incredibly bad documentation?
Well, it's something written by Roman, so what do you expect?
I'm sorry, but this has to be better. This is just inadequate, just totally inadequate. Okay, so, so somebody needs to deal with that, please. How could this be? Have been there since version 7 with something as pathetic as that in there.
As you don't take a close look at what Roman is doing?
Well.
Apparently not adequately. So yeah. Can't believe this is that old.
Yeah, I mean, I think the formatting changed a few versions ago. Although.
Okay, can, can somebody please push this and get something less sloppy? But let's go on with our agenda. Okay.
Right, so you had this sort of two part suggestion of being able to set history length at a notebook level, which, you know, I think the implementation might require a bit of thought, but you know, that's, you know, just like you, you can sell set the context and context path to be notebook specific or cell group specific, you know.
Would this mean that the history length is notebook specific? I don't understand it. Because the history is a single thread in the kernel.
It's, it's not technically a single thread in some cases. I don't know anything about this proposal, but it is already the case that we track history separately in different cell conte. So if you have two context isolated notebooks, they will not share history with one another.
Do you mean out will be different in each of them?
That's exactly what I mean, yes.
Right.
I mean, the docs work this way, right?
Like go into that documentation notebook and you know, evaluate one cell in one example and then refer to percent one in the other example.
The way this is done, it's fairly naive because I don't think anything more is really required, which is just that as we're switching context, we take the current value of in instring out, and there might be something else I'm forgetting. We just shove them off someplace where they can be gotten back again later and then replace them with the values of the incoming cell context.
All right, so let's talk about what that means for history length. So that means in this notebook, what would it look like here? Wait a minute. Addition to percent. By the way, what has happened to percent modernization didn't make it into 14.
Oh, hyper architecture.
What does that mean?
But you, you, you can't drop a project on my group that consumes 50% of the time and then expect all the other projects to perform proceed smoothly.
Is it proceeding percent modernization?
It requires a lot of my direct attention. My direct attention has been focused in other places which are considered important.
I mean, it's, I think percent monetization is pretty important.
Is it more important than hyper architecture?
I don't know. No, probably not. I mean, depending on assuming we can get it to.
Look, that's what it comes down to. You know, we have lots of things that we consider very important and it's, you know, decisions have to be made.
I wish I'd known that was being paused. We really need a better mechanism for that. I mean, that's the thing that's on the global project list. It went from being in progress to paused. Is that correct?
Well, I didn't officially hit the pause button, but I did, did, you know, produce a roadmap which had a pretty optimistic notion of our ability to make progress by, you know, I didn't take it off the roadmap, but frankly, you know, other things on the roadmap really.
Need to get on with it. We really need to get on with it. We really can't have it just languish.
You know, I actually have to make decisions on the ground about how time is spent.
I understand, I understand. But I, I would like to hear about.
And, and, and, and, you know, I, I mean, I mean, I can't just torpedo other parts of the company that are depending on my group to do stuff.
I understand, I understand. Well, okay. Separate discussion. We should talk about. I mean, I would like to hear about this because it was something I thought was going to happen and I didn't pay attention. All right. In any case, This question here, I mean, the, the issue here is do we store the out? Because there are plenty of cases where we just don't care. Doesn't matter whether the out, you know, whether the stuff in the output is stored. If it isn't stored, like what? By the kernel.
Sorry, we don't care. Sorry.
Okay. A giant piece of graphics was produced. We will never refer to the graphics with percent. We produce that graphics only for the sake of displaying it on the screen.
Is. Can you really say that, though? I mean, no, I.
You can't possibly mean that.
Oh, you're right. You're right.
Right.
And so, okay, but I mean. Okay, so what is the issue here? Right, so. Well, go ahead.
So. Right, so. All right, so the starting point of all this was, you know, when, when you're doing really memory intensive things like fem, then you know, it's, it's quite common to, you know, set dollar history length to zero. And.
Okay, this was because Oliver, who may or may not be here, was doing that in his documentation, which really upset me.
Yes.
And, and so why was he doing it again? Can you explain that to me?
There's two reasons. One is to make sure that the reference count of object that's produced is uniquely owned by the symbol to which it's referenced. So the out doesn't add a second reference. Because then you can work. If you do things incrementally then on the object. You're working on a unique object.
That's a total hack.
You don't need to make a copy of it.
Yeah, okay, that's a total.
Yeah, hack. It may be, but we don't have an alternative.
It's a total hack. Okay, so we need to talk about.
Wait, wait, wait. You're saying that the automatic memory management of the kernel is a total hack?
No, I'm saying that that way of Avoiding it is a total hack. If, if the issue is okay, if the issue is that you want to modify, you have X equals giant expression. Right. And then you want to say X equals a new expression and you don't want the old value of X hanging around. Well, I understand that it might be hanging around because it was connected to out 17. Exactly right. And you don't want that. So this is exactly the case that I was describing where you want the output of X equals BLE up big giant thing and you don't want that big giant thing attached to the out symbol. Yeah, that's the case we were describing. Somebody just said was a stupid case. But that's.
We said that the graphic that. Just saying you would.
That particular example wasn't wise. But there might be other ones.
I mean, here you've assigned it to X. In the example previously, you said it was only referenced by in and out or whatever. So that if you remove the in and out, there's no way to reference it. I think that it's slightly different.
Yes, that's what I was understanding you to say.
I see, I see, I see, I see, I see. So, so, so, I mean, one case here would be the thing has been attached to something. Yeah. And so. And we know that because we can know that. And then the question is, do you also attach it to the out thing? And there's the possibility then of saying, I mean, I, I think both cases are of some interest. Right. Where, you know, even if you can't refer to it programmatically, it might just be. I've certainly done things where I'm spewing out giant collections of things where all I want is their appearance in the notebook. I will never ever refer to them. They are. It's like print output, basically. See what I'm saying? I'm not going to refer to print output and I can't, in fact. So in other words, I'm using my outlines like print output.
Yep.
Should there be a, A wrapper? You know, slash, slash, don't attach to out.
Yeah, that's an interesting idea.
That's, that's a bit cleaner, you know, don't store on out.
Yeah, it's. It's kind of like a quiet, except it isn't quiet.
That's.
That's implementable and sort of one issue. What? One issue that's clean. Right. And you know, one issue that people run into, at least naive users, is that, you know, they think that adding a semicolon is equivalent to that, but that merely suppresses output it doesn't remove the, you know, doesn't actually remove the association.
Okay, but, but look, the case we care about is the thing's a gigabyte, right? Which is a case we can detect. I mean, we just don't care if the thing is, you know, 100 kilobytes or something. We just don't care that it's being stored. We do care if the thing's a gigabyte.
Well, so that opens up another possibility. We have, you know, for front end output, we have an output size limiter.
We have the output limiter, which is very successful.
Yeah, one can imagine a similar approach to limiting whether or not something gets assigned to the down values of output.
Why not? And then, and then have the output there. If you looked at the down value of out, it would be an output limiter. Basically it will be a size limiter.
But you wouldn't be able to, you know, retrieve the real thing.
Yeah, it would have to be a size limiter that is, you know, that can't be fully expanded.
Well, but, but the way to do it would be if it's on an outline, there was an inline. You could, you could have snarfed in the inline or at least you know that. No, look, no, here's the point, here's the point. You know, it was, it came from out 17. If you really want to know what's going on, re evaluate in 17.
Assuming that there's. That's assuming no state change.
Yeah, I understand there might be state change, but, but I mean, I don't think that's the. I think that's, you know, nothing's going to be perfect here, but at least you don't blow yourself up with multi gigabyte objects. Okay, so we got two, two ideas on the table. One is a slash, slash don't store. What the heck should that be called?
Suppress.
I, I would call it no. Out.
Yeah. Out. I would hate to suggest without out.
Yes.
As opposed to without, so to speak, which is just totally confusing. Let me see, What's the don't include type word?
Exclude.
What's that? Exclude? Out. That's too weird.
Skip. Out.
Avoid Skip out is better. But no, that suggests like a kangaroo or something.
Suppress. Out.
But we're not really suppressing it. We're suppressing this. We're not. We're not.
We're not.
We're not. No, it's. It would still display. It just wouldn't have. It wouldn't attach the output.
Well then it's history. Suppressed history. Well, that suggests that's global. That's scary.
How about that?
Or history avoid. Ahistoric.
Paleolithic.
Yeah. Block, block out. Block history.
Amnesia, counterfactual. No, It's a different meaning from block in our.
Yeah, it is.
Construct. Yeah.
Ephemeral.
No, no, no, because none of that. That stuff. We don't want to. We just want to make it clear that it's just. I mean, given that we have dollar history length. No history seems so.
You would still see the thing.
You'd still see it.
Right. So you could do semicolon, slash, slash, avoid history. That sounds like you chose French instead.
So what's the difference between, you know, slash, slash, you know, name we haven't come up with yet and slash, slash, print. Other than the type of the cell is different.
Well, you, you. The print doesn't get the output size limiter, so that's.
Doesn't it?
No, no.
Actually if you did print, it would still store the history, I think.
No, it doesn't.
No, because it'll.
I think it would. I think it would still. Sorry, this is getting into real hackery. I think you'll find it does.
Where? No, I'm pretty sure percent is null in that case.
Yeah.
I think so.
But I thought it was only compound.
Expression, which means that I think do print semicolon.
Put.
Put a semicolon in there in the print foo. Put a semicolon in there after the print foo in no, inside the print.
But that's not going to print anything but that.
But then it will.
Now put bar inside the print. Oh yeah, put bar there now. And now look at percent. Yeah, there you go.
Whoa.
Yeah, this is how. This is the last value hackery we have.
Wow, that's really Paleolithic.
Sure.
I mean that came from version one. That came from teleprinter type stuff.
Sort of.
That's wild.
That is. Yeah, I guess I. I just assumed that, you know, so. So why doesn't the print foo case?
Because.
Because last value. If you did a semi bug hackery do a semicolon print foo. Then percent would be a. Right now, percent should be. Yeah.
That's really weird.
Yeah, it is.
I'm probably.
Well, I mean that, that, that I understand that. Right. That's the. That's the last value thing. It's the fact that the compounded expression is inside of the print. So I would have thought that, you know, it would. The print.
Maybe we should.
Maybe compound expression at the top level should be treated differently. But I. I don't know if I thought that through.
Oh, that's just weird. That's just weird.
Yeah, is weird.
I think it's. This is a bug which had been there for 35 years.
I was gonna say the number of people that that behavior surprised and the set of that people is impressive.
It didn't surprise me.
No, but you were the exception, Tom. Everybody else, you know, ETI surprised Mark.
But it surprised everybody else on the planet.
Well, I think that that suggests that I me think we should look at changing this. Okay, but let, let's go back to this question about. Okay, first point. What about the possibility. Let's say you generate a huge output, okay? Huge out. This thing is going to be huge. Okay, what if there was a ux? Let's see. Let's imagine generate an out there two things. One, you might generate an output size limiter in the front end which could then have some extra, you know, blobs on it. And two, you might not generate an output limiter because the thing might just be a summary blob of some kind, but it's a gigabyte in size. And then we could extrude some kind of. You know what I'm thinking is some kind of UX that says where huge evaluates to some kind of summary box, for example. But then underneath the summary box, this little blue thing that says this, you know, same thing that we do elsewhere. This wasn't stored, you know. Do you want to store it? See what I'm saying? This is actually not a stupid idea.
Oh yeah, but. Well, what.
I don't understand it.
Okay, so let me explain. So let, let's say we do a. Let's say we do one of these.
You, you don't want to have to use a UI every time you do a finite element operation.
No, you don't touch the ui. Okay, here's what would happen. Okay, so you see this? Okay. Full storeful expression in notebook. Okay, so now let's imagine in this case here, right. That it said in addition that not stored in out 14.
Well, I can't say that because the only reason the storefull expression or even the show more and show less buttons work is precisely because it was stored in out of.
I understand that, but. So then let's imagine that you blew out of both the output size limiter and the storage size limiter. Okay, Then what I'm suggesting is that this footer here would then say something different.
And if you put a semicolon there, you suddenly start seeing a ui. That's pretty weird.
Well, I don't think it's that weird. I don't think it's that weird. I understand, I understand what you're saying. I understand what you're saying. We're dealing with, okay, we're dealing with multiple. Okay, I don't think it's a bad solution. So can we walk through this, please, for a second? Okay, so let's imagine that you hit the out size limiter, okay? Then what this would say is you wouldn't have these options. You would just see the visual here, Which is pretty inadequate. Like, what's the point? Well, okay, so the more common case is that you would see something which is a blob here. You wouldn't hit the output size limiter. You would just see a blob. Let's. Let's import a blob of some kind here, okay? And then underneath the blob, it would say, you know, this blob was, is. Is not connected to the out. So the way to do that, I think would be to. To change what the out looks like, perhaps. Yes, that's the obvious thing to do. And then if you don't like that, you press. You know, the out looks. Looks different. And it says, and maybe there's a plus underneath the out, which you can go to. To try and to ask to reevaluate and store it. Another possibility, guys, in fact, this might be the best possibility, is you do store it right when it's generated, okay? But you put it into a. Essentially a circular buffer where it goes away. If you didn't say store it now, you lost your chance. And when out 15 is generated, it's gone. See what I'm saying?
Based on size.
Yeah, yeah, yeah, yeah, yeah, yeah. This only happens if it's huge, right?
So let's do a history length of 5 or something based on size. So if you exceed that, you delete the last five, you know, the last one that.
Yes, yes, that's fine. Yeah, I agree. I agree that that is what that's like. Or dollar history length of one or something for this.
Something like that.
Yeah, it's. It's a dollar history length.
So you can use.
Okay, I understand what you're saying that that's not a bad idea.
So listen, what we've got is this UI thing.
No, no, wait a second, wait a second. They're both sensible, okay? So the idea would be there's two dollar history lengths, okay? One is that applies to all expressions and the other is one that applies either only to expressions above some size or there's a history length that is based on the total size of the out expressions rather than a length, as in the number of out expressions. It's based on the total size of the out expressions. Am I making sense?
Well, that. That means you would have to compute the by count of every single out. Which.
Which we're not doing right now.
Yes. And is potentially expensive.
Okay, well, but I mean, wait a minute. Wait, wait a second. The one thing that isn't expensive is, is it bigger than X? Because you go and you start recursing and by the time it's bigger than X you say it's bigger than X. The thing had turned out to be a five. Are we already measuring the size of every output with the size limiter?
Yeah, but there might be a semicolon here, so. No.
We'Re measuring the output size in boxes, not in.
Yes, yes, my bad.
But we don't, we don't apply the output limiter if it's null or it's like a default thing.
Oh, sure, we don't.
I mean this, the output limiter has other sorts of rules. Like graphics don't count.
Yeah, yeah.
Okay, so let's talk about this case. Ok, so what I like quite a bit is something. Either it's a. If it was implementable, it would be this. If it gets bigger than. I mean, maybe there's a single expression size limit. Okay. At which the thing is stored only temporarily.
I think that's okay, that's not crazy.
Yeah, okay, but fine, but. And whether that's stored in a buffer of a circular buffer of size 5 or what, I don't know. But my suggestion is when that happened, when it isn't actually attached to out 14. The out 14 fuzzes out in some way visually.
Yeah, fine.
And, and it gives you the chance. It has a UI element that gives you the chance to say no, no, no, no, no. I really want this.
Store it before it's gone.
Before it's gone? Yes. Once it's gone, it's gone. Right. Once it, Once it, you know, exited the circular buffer, it's gone. I like this solution. Okay.
I think.
I guess so. I have two questions. One, so the, the history length and the, and the size, the size limiter, whatever it is, we want to call it. Are those global? Are those per notebook? Possibly both.
I'm not sure. But, but hold on, let me ask a question. The output size limiter, how is that controllable? Is there a dollar variable that controls.
The output size limit?
Okay.
By the way, can also be set via the preferences.
There's a front end option. But the front end option basically just works by setting that kernel global.
Okay, all right, so this then. Okay, so we would have a similar.
Thing.
To that for a storage limit, for expressions. And when the storage limit is exceeded, we need a design here. This thing, you know, like. Like what happens when it goes, you know, out of blank, out of dot, when the thing is no longer stored, when you reopen the notebook. It's something a bit like that. It's something where the thing looks. I don't know, maybe it goes a gray color and it falls over in italics like it died type thing. And then it has a little plus underneath it. See what I'm saying? And then you press the plus, it gives you a ui. The UI says store this expression permanently. And it also gives you the possibility of going to settings to change that setting overall. Okay, now the question is the setting, do you want that on a per notebook basis? And I don't think we care terribly. I mean.
Well, that's easy.
Okay.
I mean, do we care? Walk me through that. I mean, is it, you know, is it because.
Well, I guess the question is, do, do you know, are, are you going to freak out when, you know, Oliver, you know, sets this at the beginning of his documentation.
Sets what?
The. This, this.
You should need to.
Because whatever it's set to, you won't need to. I don't.
Yeah, I mean, what are we going to set it to?
What.
What value are we going to set this to? 50 megabytes. What value are we going to set it to?
Well.
Megabyte.
I. I think it show should be relatively large and.
Well, okay, let's say. Okay, let's look at this. Okay, I've got 56 gigabytes in principle. Go ahead. Do you believe that number?
I'm not sure how much I believe that number. I mean, the problem is what does memory available even mean in modern operating systems?
I know, I know, I know. But I mean, it gives some rough order magnitude. This isn't a tiny machine, you know. I know it's not a tiny machine. Given that amount of memory available, maybe saying half a gigabyte is not unreasonable. Well, I don't know. What do you guys think? What do you think? What would you want it set to?
Well, I would. I would want to keep this at infinity because, you know, I don't want to lose things and, you know.
Yeah, I mean, frankly, I was thinking not for myself, but for you. Steven, if I don't know how much you rely on percent when you're doing like your huge multi way graph experiments.
Yeah, I do rely on percent, so I probably want the set to infinity. Okay. So that means we probably have to do it on a notebook by notebook basis. That it's settable in the style sheet.
Okay.
So how would that work? What would. John, how would that work?
Well, we could certainly set it uniformly for all documentation notebooks and that might be a very reasonable thing to do.
Right, fine.
The only, the only thing that could possibly break would be examples that relied on percents. And you know, we can, we can, we can check for that.
Yeah.
To see if there are any outliers we should be aware of.
All right.
The other, the other question is if you are in a standalone kernel, then A, is this applicable and B, is there, you know, is there a way to say expose facto? Oh, I actually do want to save that in app.
I don't think it's terribly applicable. I think this is a notebook story, I think. Well, let me think about this for a second.
Well, you could still have the.
No, you still have the variable. It just says don't store this, you know, $, whatever. And you wouldn't set it by default, you know, by default, just like dollar history length. It will be set to infinity.
Yeah, exactly.
Yeah.
And if, if we're. And then we don't have any mechanism for adding it to out. If you, if you want to say if the last out is bigger than you expected, then you need to say X equals percent in order to correct.
Correct going away.
Yeah.
Okay, but X equals the thing originally, not percent because percent doesn't store anything because it got.
Ah, I see. So, so it's not actually in percent, right? It's.
No, no, no, you, you could do X equals percent, so long as percent's still there.
Well, in other words, we, we'd allow the circular buffer mechanism.
Yeah.
In the, in the pure kernel.
Yeah, it, it, it'll work similar.
Okay, what are we going to call the variable that is the size limiter here? What is the variable called?
I think dollar history size limit.
Yeah, why not?
I mean we have history element size limits. History.
Either history element or history entry.
Size limit as opposed to out size limit, which is probably too obscure.
Well, it's called history length, so it should be parallel to.
Entry. Sounds like it's, you know, an exit entryway type thing.
Okay. Yeah, I would be okay with the history element.
All right.
Yeah.
And then we'll have a corresponding front end option which is just that without the dollar sign. Same way as we do for Output size limit.
The other question is, what happens if you have percent? Sorry, not percent. You end with a semicolon. So there's no out in. In another.
I see. So you don't see it. Right. I think we need some kind of indicator that's a UX thing. That's part of the UX design.
Okay.
Yeah. Because that case is even a bit more insidious because you don't even see it. And then it goes. And you thought it was there, but then it goes away. So let's just see. John. What? What? Let's say. I say.
Hmm, Well, we already obscure the out label in the case where the kernel session is gone.
Well, we obscure. But look, there is no out label here. So the question is, where is the handle?
And the end labels too? We also do the end labels with a dot.
Yeah, yeah. Well, so we need to decorate that.
And in the output size limiter we also do that. Which you can see if you just want to, you know, quit and then start a fresh kernel. And you'll see some things update in the notebook. And there you can see the output size limiter changed.
Yep.
And of course, all the in and outs.
Okay. This needs some design. I don't know what it is.
Okay.
I mean, it probably needs some kind of. Some kind of little X or something below the in label that indicates that the out disappeared or. I don't know what. We'll have to. We'll have to figure that out.
Yeah. And it should be said that right now the front end doesn't have a good way of being notified by the kernel that these sorts of changes happen. The. I mean, it might be nice, for example, if we could establish, oh say, a dependency on out 2. And in the same way that we, you know, in dynamic, you know, we can establish a dependency on X and the kernel lets us know if X changes. But that same trick does not work for checking a specific down value. It's a thing that people have asked for, but I assume it's probably hard on the kernel side.
Tom would know. Tom.
Sorry, I missed that.
The idea of. In the same way that we can have the kernel notify the front end if X changes. But what about X with a, you know, what about a specific down value? What if. Can we imagine a world where the front end could, say, kernel notify me if out of two changes?
Well, if it was specifically just for out, then, I mean, obviously this. This is the. The kernel would have a mechanism for, you know, clearing things, so it would notify the front end when it does that.
Okay, well, I mean, you know, that's.
I mean, it's not a general mechanism for any down value, but it would work for this, right?
Okay, well, yes. I mean, there are two sorts of ways. Yes. If you're suggesting to provide a specialized thing, that would be great. I was sort of, you know, needling in for the possibility of a down value specific notification because lots of people have requested that sort of thing.
I don't really understand what that means in general other than just.
It means. Other than just not the symbol, but it means the symbol with its, you know, argument.
Yeah, I'm still still a bit hazy about that.
Okay, can we dispatch. Okay, this rounding radius thing, seems to me the obvious thing to do is to allow an association syntax, which is. Okay, what's that?
This syntax is, with one minor exception that I realized earlier today, this syntax is copying syntax that is used in many places for front end options. And we have talked about using association syntax, but we don't have a place to even begin. There is no precedent for doing this sort of thing.
Well, there is plenty of precedent in the kernel. I mean, this would be rounding radius arrow, right?
But associations mean something different in the front end. They change the inheritance.
Well, let's set that aside for the moment.
No, I'm saying rounding radius goes to this. That would be how I would expect this to look in a kernel situation.
The.
Well, that makes no sense, right?
I mean, what is the default value for unspecified corners?
Zero.
Look, what if you want to specify a default value, I suppose it could have a default.
I assume that we can do this. Let me just try it. I assume I can say left arrow 15, left arrow 15, top arrow 50.
Well, I think that'll work.
Yeah. No, why is it different from this?
Oh, Stephen, think about it denotes the.
The top left corner and that's saying make the left.
Oh, oh, oh, oh, oh, oh, oh, oh, oh. Silly me. Okay, now I understand what the syntax is.
Right? I mean, I think a more. Right. And see, I don't know what, what, what, what you did is supposed to mean. Well, I guess you, you use the same. But if you make.
No, no, no. I was different. I was confused. Don't worry about it. I was confused. This syntax is perfectly reasonable and kind of cute, right?
I mean, I think the one interesting question is do you have to specify the. The 5 and if you leave it out, does it default to zero or does it default to something from the environment?
I think here it's defaulting to zero, which seems reasonable. To me.
John, I asked you to email.
Yes. I mean, the fact that this, the fact that this works is probably a bit accidental, but cool. But yes, we can make sure that it officially supports end documents, that it supports defaulting to zero. I'm not fundamentally opposed to that. I didn't write it in my first draft of documentation because it's not how other similar options have worked. But I agree that it's a sensible sort of thing to want.
I think this is very cool. I think it's useful. I think that.
Well, I mean, it's definitely useful because this is the only way, without using like nine patches or something like that, that you can assemble pieces of a together that have. That has a rounded rectangle around the element as a whole.
We have nine patch, right? What is it called?
We have nine patch, but it's not documented really. Yeah, we use it all over the place. Well, because in order for it to make sense, we would also need functions that can construct nine patches for you or interpret nine patches for you. I mean, there's like an ecosystem that would be required. I just haven't had the energy to.
Put together that ecosystem. Just give the patches in the nine patch. Or do you have to give a.
Bunch of other stuff a 9 patch has inside the bitmap? It has basically the edges of the bitmap encode what the patches are.
Yeah.
And that has to be done in a particular way. If it's not done right, then it's not a nine patch anymore, it's just a bitmap.
I see.
And I mean, it's not insane. You know, I don't understand why this would be totally the sort of thing like we could, could be a, you know, an intern project or a summer school project or something. But it's just as we talked about earlier with priorities. I can't justify.
Why isn't that going to the image processing team? Isn't it for them to generate a bitmap that is appropriate to be a nine patch? Like, for example, could we not import an image and make it a nine pack?
Well, I think it's entirely reasonable for the image processing team to do. Yeah, most of this, I mean, let me be clear, it's, you know, the functionality is not exotic. Most of this is just about designing the functions themselves. Not implementation is easy. It's the design.
I understand. So can we ask the image processing team to take a look at it? Because my prediction is that this is really something that ends up being something where you take an image and you want to nine patchify it.
That's exactly right. Or on the other hand, you might want to take an existing 9 patch and understand what it means, how it splits up, and maybe modify it in some way.
Yeah, I get it, I get it. I think we should give that to the image processing team.
Yeah, that's fine. But my earlier point being that if you're trying to throw a rounded rectangle around, composite things that fit together side by side, that doing something like this may be your only option.
Right.
And it's nice. Okay, let's just move on to the last item here. Sequence alignment.
This is a pretty simple issue, I think, right? So basically, right, you can sequence alignment lists and you can sequence alignment strings, and you can sequence alignment lists of lists. But once you do that, the output becomes ambiguous because you'll notice that in the first one I'm aligning a thing with itself so there's perfect alignment. And in the second input, I'm aligning two different things and I'm producing identical output. So you can't sort of distinguish between a list denoting a difference pair and the list that's simply a common argument to the two lists. So the solution would be to add a second argument or I guess a third argument to sequence alignment. That's the head to use for the differences. So then that second output.
So you could say rule or something like that. And if you said rule, then it would show those things not with pairs of lists, but with a.
With a rule. Yep.
Okay. My only concern here is, and I don't know if anybody from the biology team has been contacted about this. I, I don't know how much tentacle, you know, how many octopodal, you know, how many more tentacles are needed for sequence alignment. See what I'm saying? I, I don't know whether there are other things that aren't options. For example, why on earth is merge differences not a link that seems like a bug in documentation?
Well, either there are no examples or.
Well, it seems like a bug, so we should get it fixed, combine adjacent differences. My only question here is whether the head should come as a first argument, as an actual first argument. That's two questions. One, multiple sequence alignment, which I don't understand very well, and whether this might need to be verogs and therefore this would need to be an option. And two, whether this should be a pre head rather than a post head. Okay, probably it can be a post head, just like distribute and things like that of post heads. But can we please talk to the biology team and make sure they are not OE are about to enhance sequence alignment to have 17 new arguments.
Okay, so that would be Michael.
Start with Michael.
Okay.
It's not specifically him who's dealing with this function, but he will know.
Okay. Yeah. And right. This came precisely because Lou was looking at 3 way diff. And that's when he realized this ambiguity and therefore could not use sequence alignment for 3 way diff. Ouch. So.
Ouch. Well, okay, fine. I mean, is there an option that we could use that would represent this head thing? I mean, it seems more natural as an argument if this thing really is a firmly two argument object. I mean, we have functions which sort of wrap a hold in certain cases and so on.
Right. And. And in those cases, it's. I think it's almost always an argument. An argument. The. The one.
Is there any case where it isn't.
There in arguments Options. It's a element of an association. So. So there's a string key, but not a symbol.
Okay. All right, well, then let's assume.
Okay, I'll check with Michael. And if. Assuming we don't anticipate another argument, then we can.
All right, Sounds good. Okay. Anything else, guys?
Nope.
Okay, Thanks a lot. See you later.
Thanks.
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






