Live CEOing Ep 717: Language Design in Wolfram Language [Highlighted and More]

Stephen Wolfram leads a design review on Wolfram Language features: repurposing the 'highlighted' function for visualization with new formatting rules, adopting 'Squiggled' for underline styling, fixing Dataset display and icon issues, and building a Notebook History replacement that returns structured cell metadata via CellData.
Chapters
Sam.
Okay. Hi, everyone. Welcome to what, for me is the third live stream of the day Wolfram Language Design Review, part of our Language Completeness and Consistency series. And our first topic is the highlighted function.
Right. So. Right. So highlighted was this nice little, you know, typeset generator to, you know, you know, highlight things. And then apparently you recently decided that you'll reuse it for the plot stuff.
Yep.
And I, you know, don't like it. Yes.
Okay.
You want to look at highlighted new.
Capital, any W. Yep. Capital, all caps, just the N. All right. Oh, boy.
Right.
So you. Right. So we have these sort of two. Right. So the one argument form, I guess, I suppose, could make sense in either. Although how it formats, you know, on its own would not be related to the. The effects it causes when it's used inside of a plotting function. And I don't know what, if anything, we should do with the two argument form when it's, you know, when it's outside of a VIZ function. I mean, I suppose we could do nothing with it and just sort of let it.
Okay. Be the. The issue is. And this is the 133 issue, right?
Yes.
We've got this whole giant system. I mean, you know, we've got. Labeled, for example, is also something which is a joint, you know, visualization and expression formatting type function.
Right.
Is it?
I mean, it is.
And we've never added the VIZ stuff to the docs for the label. It all lives on VIZ pages.
Oh, gosh, that's a terrible thing. That's really terrible. That's really embarrassingly bad. Yeah. Labeled is absolutely available in both places.
Okay. Yes. And is. Okay. I guess I didn't entirely grok that we already had this issue.
I think we already have it with two tooltip, don't we, as well?
Well, I guess, except that it's sort of. I mean, there. There's a much more direct relationship, I mean, with both labeled and tooltip. Right. There's a much more direct relationship between what's there and what's.
Well, I mean, here's one that probably should work and doesn't that should work.
What should that be? That should be.
I mean, if we say list plot, table, call out, That does that. Right.
Okay, I'll buy. So you're saying that callout on its own should create a graphics sparks. And.
And no, I think call out on its own should do, like, what label does. Or, you know, if I say labeled or framed of whatever. Right. Which I do all the time. You know, the idea of having a call out that is A little pointer to something and that has, you know, I can imagine in a mathematical expression, for example, wanting to point to something in that expression and say, you know, the big term or whatever.
Right. Except you can't really point a thing outside of a graphics box.
Well, but you can, in the same way that you can label it, you can have a little stalk that comes out of it that says four, for example.
I, Well, I, well, I mean, Right. As a practical matter, I don't think you can have that.
What do you mean?
How does, you're right. I mean, how do those, you know, how does that non rectangular shape get created? Right.
No, I'm, I'm saying the following. Just like with labeled here. Okay, let's say I put in labeled with this thing saying, you know, top right. I don't know why. Right. Didn't work. Why didn't write. Oh, maybe it's right.
Who says it didn't work?
What happens if I say scaled? Well, I don't even know. Right.
I mean, just make X bigger xxxxx okay.
Okay.
Yeah, that seems a little problematic.
Yeah. Okay.
All right.
So that's a potential bug. But, but my point is that to put a little stalk here and have it like a thought bubble call out does not seem out of the question. And that will be the analog of this. Right. And probably what we should do.
By the way, another thing which is maybe a little bit like this is button. So it doesn't really make a difference with buttons arguments. But like button has an appearance option. But if you use button in a graphic, the appearance option is basically ignored. It doesn't, you know, it's, it doesn't look like a system button. You can't make it look like a system button.
What does it look like?
Well, here, let me just.
Throw an.
Example in the chat.
If you install disk.
Yeah.
If you inset a button, it'll look like a button. But if you wrap a button around primitives, it'll look like the primitives.
Oh, I see what you're saying. Yeah, yeah. Right. You just have. It is a buttoned area.
Yeah. So for a standalone button, you would have expected the whole button to have a certain appearance. But in graphics that appearance option is just ignored.
Right. So to me, I mean this really is arguing that the, the combined use of highlighted is not that stupid. And now the question would be if there's an effect in, you know, if you say.
Right. So if you, if you do expert comma, you know, drop lines and it's not in a graphics, it's not in a vis function then I don't know what if anything should happen.
The appearance isn't going to do anything here. It's the other way around. I mean, in. And similarly I'm showing.
So are you saying it should look like the one argument form or are you saying it just shouldn't format? So if I, if I do. Right, so I have highlighted a foo there now underneath it. Right, Highlighted of foo comma, you know, drop lines.
Yeah.
What should the output look like? Should it look like the input two lines above it or should it look.
I think yes.
Okay.
I think yes. I mean, I think that, I mean this is a graphics question. I'm not sure. Maybe somebody has a better idea. Maybe. I mean this is a non coordinateized. Let's see, what's the point here? I mean, it's a little bit unfortunate that highlighted in the visualization case doesn't do anything until you're. Until you're mousing near it. Is that true or is that.
I mean it has the static ones with placed which are broken at the moment somehow.
But what static ones?
I presume they'll be listed on this ref page.
There's a basic example in the highlighted page that third example.
Right. Although again, six would be completely meaningless in.
Yeah.
In outside of a. Yeah, right, so. Right, so. So maybe the answer is these don't format outside of that. Maybe the 2arg form doesn't format outside of. Outside of this functions. Or at least we, we. We at least not for 13, three. And if we decide to tweak that in the future, we leave the door open to that. But.
Yes, that's right.
I could imagine, you know, at some point us, you know, coming up with some coordinate system for, you know, the expressions, whether it's part syntaxes or something else, you know, and that we do have, you know, things that become available.
Right, right. Yeah, so, right. So I mean, right, the. The other question that sort of the result of the meeting a couple weeks ago. Right. Because right now. And I don't think we've changed this yet. Right. If you, if right. If you take the, the formatted highlight and use it as input, the. The. The head goes away and. Right. The highlighted head goes away. Right. So if you take that output, that yellow foo and you know, use that as input, that'll just turn into a foo on output.
I think that's a mistake.
Right. And. Well, I guess there, there are. I mean, there are two questions, I think. I think one of them is basically answered by the fact that by the fact that we're giving it this new meaning, which it was, you know, how important was it that this round trip. Exactly. And, you know, preserve the head highlighted as opposed to becoming a style thing. And it sounds to me like the answer is we need this to perfectly. Round trip or.
Yeah, we're.
We're losing toast. Yeah, we're toast. The second question is, does strip on input mean anything in the vis case?
You know, strip on input is an interesting option for labeled, which we don't have right now.
Correct.
I hadn't even thought of that. It would be a good option to have that.
Where the stripping would take everything but the payload.
Payload. Or should we have a kind of a. An outer wrapper? Or does that not make sense? No, it doesn't make sense because you have to know what function you're in to know what to strip, I think. I mean, unless all it's doing is taking the first element on input. So what I'm saying, I mean, if you have. And that. That actually is interpreted as first of expert, for example, or even we could have something which says input stripped, F comma, exp, exper, input applied. It's kind of interesting. F comma, expa, which then you want the option. Well, can somebody comment on this idea of an input applied wrapper that applies a function? Or maybe we already have this.
I think we have this. I think this is dynamic setting.
My gosh. Ah. I thought we must have this. There are no new ideas, it turns out. And this. No. But I agree that this looks very similar. Yeah. This is the same thing. This is the same idea.
Mm.
But I think. Yeah, I think extending strip on input to more, you know, more of these sort of fancy generators would make sense.
Yes. The other thing that's coming is being able to have labeled inside graphics, which I'd really like to see happen. Okay. Any more to say about this particular issue? Look, look, by the way, that thing there, which for some reason I don't understand why there's an additional call out on that. On that thing beyond the call out that there already is. But anyway, that thing is the quintessential kind of static callout type thought bubble thing.
Right.
But I'm. I will. I mean, that. That I believe works because it's inside of a graphics box. I don't know.
Right.
And. And, and so, you know, I'm just not sure if we're in a purely texty world, even a 2D texty world. I don't know how we get something that looks like that. Unless we have just some sort of static icon that we stick in or something.
Yeah, that's what I think we should do. I mean, I think we should have a thing that looks like that, that is a call out that looks like that. It has a, you know, a thought bubble type thing, but it's just, you know, it's like it's always there. Like there it is, you know, except there's not a dot there, there's an X there or something. It's a perfectly nice form. I mean, it will be perfectly useful to say, you know, I've got this list of terms and one of them, you know, I've got list 1, 2, 3, 4. But you know, and just like I can say of this one framed, for example, it's useful to do that. So it'll be useful to have a call out on that one. I don't think it's very difficult to build. I think we just haven't. Haven't built it. All right, anything else on this topic?
Right, so I get we, we, we didn't actually answer the question of does strip on input in any way impact the how viz functions treat these things or do they just ignore it for now?
I think they mostly ignore it. I mean, you don't, you know, currently have the ability to go from the output of plot back to the original input of plots.
Right.
You know, so you don't have a round trip to start with. And so.
Okay. And, and, and so it'll just be an option that might be present and it will completely ignore it.
Yep.
Okay, that's fine. I mean, well, fine is maybe too strong a word, but it's a, it's, it's something I'm perfectly willing to live with.
You're not going to fight it today?
Exactly.
Okay. All right, are we on to the next topic?
Yep.
Emphasis, underline style.
Right. So at one point, squiggled, what's called emphasized, and you suggested the renaming underlight. Right. Which is the front end sub option as emphasis, underline style. But I don't think, given that we've gone away from emphasized, I don't think that this name still makes sense.
What are we calling this, this thing now?
Underlay. It's font variations.
What are we calling the wrapper?
Oh, Squiggle.
Squiggled.
It's called Squiggled. Yep. Well, it's fun at least.
Oh, I mean, we had a huge discussion about this. There were many alternatives and this was by far the best one.
Yeah, I think, I think we've spent A total of, you know, probably 90 minutes over at least two meetings.
Squiggling around about this.
So. So go back and view the archives.
Yeah. Okay. The. Okay, well, why isn't this just called Squiggled?
Because it takes. At least for the moment, it takes a color. And one could conceive that in the future it might take maybe some other styling things, like a thickness.
What is it again? Oh, sub option for font variation. Yeah, I'll call it squiggle style.
Okay. I mean, that. That was bullet point number, you know, option number one under the three options. But we just want it, you know, since we didn't want to have to rename it a second time, we wanted to. You. You to actually sign off on this.
Okay, fine by me. Okay. For data set.
Right. So. Right. You didn't like the fact that. Right. That it pushed. So we have this thing. Is that actually when is this prototype build from?
I don't know.
That. That doesn't look like. Yeah, you need a 13. 4 prototype.
Nobody's giving me a 134 prototype. You know, I only have what I'm given.
All right, well, then that.
I don't know what we do in this. In this. Okay, so listen, I have this set of icons. Okay. I'm running that icon there. If we are at a moment in time when I need five icons, I forget, you know, we do go through this.
With the prototype build. It just. We're not doing 13.3 prototype builds anymore. It just cut over to 13. 4. So you don't need to, like, keep a 13. 3 archive or something.
Okay, but then why is this wrong?
Because it cut over to 13. 4 and that happens seldom enough that the scripts probably have not been fixed to deal with that possibility.
Oh, okay. Well, so do I have to see somebody else's screen?
Yeah. Let me just join from. This is the. Oh, wow. We're in some completely new meeting. I. I'm not sure that the machine I'm currently sitting at is. This doesn't.
Okay, just tell me roughly what I'm.
Going to see or so. So here, you can. Let me share now.
Okay. You can grab the shell directly from me, I think.
Are you.
It says. It says. There you go. Okay.
And.
Okay. And. Right. So. Right. So he. Right. You didn't like the fact that it pushed down the stuff. So now you see, it doesn't push anything down now.
Sorry. Where is your mouse? I don't know where your mouse is.
Oh, you can't see the map. So. Right. So right now my mouse is to the right of the data set.
Okay.
And you can see from the cursor that the line height is exactly equal to the visible data set. Then when I bring it, when it's sort of just over the element, then you see this empty white box, which I don't like so much.
No, I don't like that either.
Right. I don't know if this is. Wasn't entirely clear to me if this is a missing. If this was something with. How so Ian told me that there was. It was difficult to get rid of this for some reason. It wasn't entirely clear to me if this was sort of how Chris Carlson structured the code or if it's something about the attached cell that we don't understand yet. The former, I think. Okay, right. So all right, so then. Right. But if. If you sort of generic. Right. When you see one I'm directly over an element, it gives sort of the index of that element. And so we should. So I guess we should be able to make it so that it doesn't appear until you're actually over the elements.
But doesn't the current functionality have different functionality from that?
No, it's the same functionality. So but what about if I want.
To copy something other than the.
Well, then you right click on it and you copy.
I see. You can see your mouse now.
Ah, Okay. I don't know what did that.
It just disappeared again.
Well, I'm here. I'm going to a different Mathematica here. Just right. So it's right. So we added the frame. I think I believe that was something you requested. And yeah, and the behavior is the same. So only this one. Only this one. Right. Is taller than Right. There's extra space underneath.
So the only difference here is the fact that it is being extruded below the thing, which I think is the right thing. Has somebody from design opined about that frame?
About which frame?
So we need that.
Okay, but which frame are we talking about?
The little ghost frame.
Oh, the ghost frame. Okay. Yeah. So no, we. Yeah, we were. Like I said, see how I highlight if I. How I put rough and bold.
Okay, okay.
Okay. You know. Right.
I mean it could be that actually having a reversed out color for that thing might. I don't know. I don't know what's better, but we need some design input.
Okay.
I think that can be. Given the constraint that we have to have the box. I bet that can be handled on the design. If it's true we have to have the box. I bet that the design can be such that that isn't too horrifying.
Okay.
It might even be good.
All right, so then the.
The.
One of the things we didn't consider last time is what to do in the case where we have the Store now button. So when we sort of naively just always attach the, you know, the. The little extruding thing at the bottom, then it would appear sort of down here in the white space. And that was really bad.
So obvious what to do. Right. I mean, you want it to appear in that space where your mouse is right now.
Right. Well, I. I was worried that it might. That they might crash into each other. Um, and.
Well, that's why you have a box around it. In the unlikely event of a. Of a. Of a crash, then let it overwrite and just be an inclusion on top of the other thing. Because I think it'll be very, very, very rare that they crash. And if they crash, it'll be very obvious why they're crashing. And that thing is ephemeral. And it's. You know, it's not. I don't think it's horrifying.
Okay. And. Right. I mean, we'll need to sort of.
I guess, because that's the reason when. When you tell design folk about it, you need to tell them that there is a possibility unlikely event of a crash. Okay. And that therefore, the bordering must work in that case, which I think is not problematic.
Okay. Okay.
And I kind of think in the case where if indeed you have to have that box when there's nothing in it, I kind of think having a little dash there or something might be good.
Okay. All right. So I guess that's. I guess I did have sort. Well, I. I can ask John offline. I think I have a couple of sort of technical questions about the implementation, but I don't think we need to have that discussion right here.
Okay. All right. Am I sharing again?
Yep.
Okay. What's next?
Next is another question about max. About data set, which is this max item settings. So if you. I. Right here I gave a list of, you know, three. Three. So at every level I see. Right. I see three planets, three moons, etc. Then. Or I can give it a list of one thing. So I get, you know, three. Three moons, but then, I mean, three planets, but then I get more than three moons.
Yep.
So the question is, what should max items? Goes to just a naked three.
Do I understand.
What's that?
I understand the question.
Okay. So according to the documentation, it does the second thing. And I'm just raising.
Yeah, right.
I'm not. I'm just sort of raising the question because when we first saw this, we were confused by this. And this does have the disadvantage of there's no way to just say max items goes to, you know, use the same with following this interpretation, there's no way to say use three items at every level. You'd have to manually construct a list of the correct number of threes. Maybe that's not worth changing the behavior.
Hold on. The fact that it shows that there is an elision makes this a much softer decision.
Okay.
But it's not like you're cutting it off for the take or something. I think there's a decent argument that if you say max items is three, that you're basically trying to restrict the size and that you'll be annoyed if somehow, you know, some bizarre planet has 700 moons and blows up your data set.
Yep.
So, I mean, I'm tentatively saying, I think the default where it's that number at all levels makes more sense to me. Anybody want to violently disagree with that?
I'll just add an interesting but not useful for today aside, that one might consider a specification, sort of like what we were talking about for Grid, where you have, you know, some notion of, you know, maybe a cyclic wrapper that you could. That you could put in there.
We should return to this when we look at grid.
Okay, so make no change for now and.
No, no, no, no, no, no, no. I say change it. Wait a minute. Which one does it do right now? Does it do right right now?
That. No, it does the second one.
I think it should do the first. Okay, next up.
So this is the John and Lu show. So I will let them know this.
Particular one is much more the lose show.
Right. So the Notebook History palette has been a thorn on our side for a while.
Audio is very odd. Talking of thorns, you sound. Yeah. Electronically challenged.
Lou, if you're talking now, we don't hear you at all.
Okay. Any better?
Yeah.
Yes.
Okay.
Much better.
So, right, the. So you have a prototype build and you can look and see what we've done as a possible replacement for Notebook History. So next, next to menu, in Cell menu, next to Notebook History, there is a new menu item, Notebook History Details, which opens a live notebook that lets you investigate. You know, it's sort of pre populated with some inputs that let you dig into the history and other aspects of the notebook that was foremost when you selected that menu item. And the new function that it calls Cell data is a thing that produces a data set of information about cells in the given notebook.
Okay.
So if you evaluate that first input, the result will be a data set that includes things like the change times, the byte count of every cell, you know, any options that literally is set in any cell, etc.
Let me ask this question before we, before we get too far into this. There's a cell ID nowadays, right?
Yeah.
I have this feeling that giving the literal content here is going to cause trouble because it might change. Well, maybe I'm wrong.
No, no, actually the cell UUIDs are stable.
Oh, these aren't the UUIDs.
They are.
Oh, really? Yeah. Then I'm good.
I mean, we don't show it because it would be kind of meaningless to display. But, but it is in the input form.
Okay.
And you can get the data, I mean, so what we're seeing now are the pieces of information that are chosen by default. But you can ask specifically for any option or any current value on the cells and that includes the expression uid. So you can get the expression UID as part of the visible data in this data set, if that's okay.
Right? Yes. And don't be confused by cell ID versus Expression uuid.
Okay, so once we have this data.
Which one is which? This is a cell id, right?
Yeah. So cell ID is the. Is is a non unique number that sort of has been assigned to a cell in a notebook. That's the old thing. The expression UUID is the unique.
But this, that's the expression UID.
Okay, great.
Yeah.
A cell ID is a thing we added like back in 2000 and I know, shows its age.
Right? Okay, this is a lovely thing. I mean this seems highly useful.
Right?
And then the question is, you know, do we, do we show people how, how to educate people about what they can do with this? So the next few inputs show some examples of what one can do. And the input you just evaluated is the thing that, that comes close with built in functions, comes closest to the old history view that, that we used to show in the dialogue.
Yeah, but I mean the, the history view from the dialogue has it had.
Some other features like linking back to the original cell that is, that would be missing here.
Well, which we could add, in fact.
We could add, we could build. I mean that's, that's part of the question is what, what are the interesting things that we want to provide? And maybe they're WFRs built on top of this data. Maybe they're built in things.
Yeah, I mean, I have to say I, I found the whole thing so finicky. I mean, I find it useful to see the most important thing is the windowing and I guess Brett is here. And the truth is that, you know, that's a feature that we should add to list plot. That's the next big thing that we should add in terms of interactive graphics features.
It's changing the plot range and zooming in and.
Yeah, yep, yeah. I mean that's the only thing we need to have this be as functional as the thing that was. You know, where's the.
There's the zooming and there was also the linking and linking is not implemented here. Linking, in other words.
I understand. Okay, you could do with a call out or something like that. You could do a linking if you really wanted to. I don't think that's. Right. I mean, these things here just seem to me like they're documentation of, you know, they're part of the documentation of. Well, this is a completely different thing there, but I mean in. They're part of the documentation of the cell data.
Right. This is, this is presented in this way just so that it's in the menu somewhere. Like the notebook history stuff was in the menu somewhere.
Yeah, I would say this is more, more like a. I think we make some picture. I mean, you're only suggesting that this be there as a matter of compatibility because otherwise you just tell people use the function.
I mean, we could also have cell data directly produce this. If this were thought to be an interesting visualization.
It's okay. I mean. Yes, it is. I mean we could have a nice visualization that is produced by. Look, I love cell data here. This is exactly the kind of thing we need. And so essentially what you're doing here is. This is the thing I've been wanting for millions of years. That's just a proper computable version of this. Now what does it do? For example, does this actually have the contents of the cell in this data set or not?
If we'd understood you've been wanting this for a million years, we would have given it to you a million years minus a week or two ago.
So, Stephen, it might be useful. I've written some draft documentation for cell data. It lives in the WIRES system. If. And there's a link to it in that.
In.
Yes, right there. So the answer to your question is the data is not there by default, but you can summon any data that you want in any call to.
That's good that it's not there by default because otherwise I'm worrying about, you know, gigabyte sized notebooks. Right.
So pop open the details and options section and you'll see the list of the. Of some of the optional things that one can include.
Okay, so if I say. Okay, so let me just.
And the cell objects should be clickable, right? They're still clickable to select the cell that it's referring to. So it's easy to get to the cell from the cell object.
So if I say something like, Comma.
So this doesn't return a data set, this returns a list because you've given a single thing. If that single thing were within a list, then you would have gotten a data set back instead.
I don't know what that error is, but. That's great. If that single thing. I'm sorry, if the single thing here. What?
So the second. If the second argument is a single token, you get a list. The second argument is a list of tokens. Even if it's a list of one token, you'll get back a data set. And you can specify multiple tokens. I mean, you can say, you can ask for the thumbnail and.
Is this what we do in entity lookups or not? We should do whatever we do in entity lookups.
Do entity lookups return data sets by default?
Not by default.
Well, so now you have to explicitly ask for a data set.
So that may be the wrong thing here. Okay, so let's just walk through this again a second. Okay, so the default thing. Is to return a data set with certain standard things in it.
Correct.
But you have various other things you can produce.
Correct.
And.
And you can specify lists of them. Yeah, so. So wind up with a data set including the thumbnail and the full cell expression. And other things.
Yeah, I mean, this is what we should have done a really long time ago, guys. I mean, this is. This is both very nice. And.
So the moment you have a data set, it. It gives you. It uses the cell object as a key.
Yes, by default you can. There are. There are ways to tweak that.
Why was this comparatively slow? This particular one?
I'm not sure. I think it's because first change time is actually a calculated thing that, that coerces the. The, the storage format for these is. For these change times are absolute time. And I'm coercing them to. To date objects. So that's, you know, that times 100.
That's no big deal. Look, it was a short time. I think it was just some initialization thing. These should be strings to go in line with other stuff we have, which has data set. So I'm saying I Think we should also support this? Probably.
Okay, so maybe the thing for me to do is to move this function if we're happy with the cell data name for now.
No, we're not. Hold on, we didn't talk about that yet.
Okay.
I'm very happy with the functionality, the basic functionality.
Can we call this cell information because. Or something like that? Because, I mean, cell data sounds like something on par with, you know, box data.
Yeah, right.
Which is not what we want to evoke.
What other information functions do we have?
Well, we do have a cell information function in the developer context.
We've also migrated most of the information functions into the function. Information.
Yeah, I mean, actually, in principle, what cell information is doing now probably ought to move.
Well, then we can't have both information about a cell and cell information. Right. All right, but the point is that this, even by default, your concept is. It's a bit of a bizarre default.
Well, the point is it can be self focused, not just notebook focus. You can give it a collection of cell objects and get the data for all of them.
Right.
Whether we want the zero argument form to point at a cell object or a notebook object. I don't, I don't feel strongly about.
I think it's more useful to point to the whole notebook. I think that single cell is kind of like.
Okay, and it's. And it's consistent with what cells does.
Open, close. Yes. All right, let me just see. What are we going to call this? So this is very cellular in the sense that it's keys are always cell objects. Is that a true statement?
It's the raw data for the keys is always cell objects. There is currently an option that lets one change the key. Its key function is the name of the option and it takes the cell object and produces whatever key you want from it.
Okay.
You can see examples of it in the draft docs Care too.
But it's still. But that computed key started life being computed from a cell object still correct.
In the options of the. Of the thing. It's always cells are the. What could we call it? Cell information is just too confusing because it's so similar to information.
Cell data set.
Cell query.
No, I assume this can't just be part of information.
Well, information doesn't return data sets.
Right.
It returns. Well, it returns decorated associations.
More or less.
Yeah. I mean it's, it's. It's a. What, what is it? Information data, which is a wrapper around an association, a reperent association, and gives.
So why can't return that? What's so different about this.
Well, I mean, the keys. The keys of. Of. Of an information data thing are. Are, you know, typically, you know, the properties.
Yeah. Not.
Not.
Well, this thing has keys that are properties too. They just. I mean, in the. Okay.
Right. I mean, I guess we could maybe play around with that, but it would.
Maybe have a notebook object to mean something different. I mean, it's not clear that we want this.
Mm.
Right. Information tends to be more summary ish than, you know, exhaustive.
Yes.
Or meta, which this is. Let's see.
Cell details.
No, I think it sounds like an option cell structure, but it's not the structure of the cells. Notebook structure makes more sense, but then we would expect something more like text structure, which is something. Do we have that from notebook import? Can we get a graph of the notebook of the tree structure of the notebook?
There's nothing baked in to notebook import.
Notebook tree. Seems like it's the kind of another kind of tree that would be worth having.
Yes. I believe expression tree has undocumented support for notebook.
Okay. I think it should be a separate thing. Okay, so what is this doing? This is saying. You've got a notebook object. I mean, a name like notebook cell data, which is very close to what you have with your context. Doesn't seem totally terrible because it's of a notebook. What do people think of that? I just don't like cell data. It's just too. Now what do you guys think about this?
Having notebook and cell feels a little.
Bit weird, but it's what it is.
I know, I'm just.
Well, it's not always what it is. I mean, you could have a list of cell objects which might not be in the same notebook. It's a weird use case, but it's technically possible.
They are notebook cells, however, not biological cells or other. Any other kind of cell. What do we call. Yeah, it's system process data. It's kind of the most analogous thing I can think of.
Yes. I mean, I suppose. I mean, I suppose the most accurate name would be cell objects data.
I think that's incomprehensible. I think people will think about it. Just like we had a notebook history thing. What about something in that notebook history?
I mean, it's way more than that.
But yeah, it is. It is. It's confusing.
Notebook contents data. I mean, this is specifically ignoring notebook options. There's no way to get notebook options out of this thing.
Yeah, and it's also kind of ignoring. I mean, it's grinding up the content into. I mean, notebook Content data might be much more like the summarize this notebook LLM.
I I. Should we be dismissing cell object data? That's really not obviously silly to me.
Object singular.
Yeah, well, I mean, I suppose I suggested the plural.
I suggested the plural, but.
I mean, because in fact it can only work on cell objects, either directly or derived from a notebook. Obviously.
I have to say I like notebook cell data because I think it connects with the most common use case, which is notebooks. It connects with the notebook history story. To go soon. But I favor notebook cell data. I think it's the right level of complexity of name for what the function is. Now, in terms of the design of the function itself, The formats are a third argument or something or what?
Correct.
Okay. I think it should just be a quoted thing. Except for automatic, obviously.
Now, and I'm a little unclear what we're moving towards. I mean, it should be said that, you know, just in terms of having this in a wfr, you know, with the, what we've talked about so far. I mean, that's, that could be done in very short order. If you're talking about actually creating a new system symbol, of course, that would.
Be.
Into the next release.
It should be in the next release. It should WFR in this release and system symbol in the next release.
Okay.
And those key function normalized dates, obviously we don't really like the string. Is there something we can reuse for both of those? There must be a date format function. Date format option.
Yeah, there is a date format option for date object.
Okay.
So to be clear, this doesn't just change the format, it changes the expression that gets stored.
Right.
And without normalizing, you get the raw data that this front end has stored, which I think is just the absolute time specific.
You know what, I really don't care about that. I think we should use our data objects and if they're not efficient enough, we should make them more efficient.
We've been doing a lot of work on that recently and there will be.
Even more in the next version. But yeah, going from absolute times to the data objects, it just doesn't seem useful to have absolute times. It just seems like a, you know, just a mess.
So you're suggesting removing the option and always doing the transformation?
That's what I'm suggesting, yes. Now, the keys, is there some function we could. Is there an option we can use from somewhere else for the keys? Well, I think that's a. By the way, it should surely say identity there, the key function rather than hash ampersand. What's this? Column headings will always be strings, even for elements specified as a symbol. What does that mean?
So the elements. The second argument contains a list of the things that you want. Those things might be option names, which can be symbols like font size, font color. Oh, but in the generated data set, those things are always. You know, as far as doing data.
Set hookups, that's sensible. I didn't understand the. The fact that you could ask for this. So if I, If I do that, if I say here, Wherever it. Can. I do style. Oh, it's called cell style. But what about the. The base style of the thing? What's that called?
I think that's cell style name. Is that right, John?
It's.
Yeah, looks like it. That's cool.
It's not something that I would have guaranteed would have worked, so. Right.
I tie into current values in this as well, John, just so you know. So current values that apply to cell objects can also be used as tokens in this second argument.
Okay, so look, these things like key function. I mean, I would.
We have. We. There's labeling function. I mean, it's a bit of a.
What is labeling function? What's it used?
No, you don't want that.
Right? That's. I mean, that's used by viz functions for.
I think there's something we've had that's like this. But you know what? You could pack these things if you want to systemize this. You could pack these into a method option. Both of these, you could include them. You could say method arrow and then key function arrow, blah, blah, blah.
I mean, groupby has a way of doing this, but it's not. It's a syntax, it's not an option name.
Right.
I think this is an obscure thing, honestly, Because many things you'll do will have collisions. You see what I'm saying?
Yeah.
Getting something unique. This is the unique thing, basically. Lou, do you have other. What else might you imagine for keys?
So there's a. There's a. There's examples down in the options section. I think I was gonna say the.
Obvious one would be, you know, using the actual uuid.
The uuid, or just me. So there's one that coerces to a uid, and then there's one that coerces to just index.
That's kind of funky.
I mean, I'm wondering whether, you know, it is something like, you know, nearest, where you give your list of properties that you want and then arrow.
You.
Know, I want the UUID or I want indexed or.
Well, it will be indexed. Arrow probably. Again, I don't think this is terribly important. Why don't we put in a method option for now and if it turns out to be significant. Yeah, I just don't think it's going to be terribly important because I think telling cells by number, you know, we finally, after 35 years, we added line numbers to package editing. So far, RAW cell numbers have not been a thing. Am I making sense? Yeah, probably. They won't become so. This is nice work, by the way, Lou. This is a good thing. Thanks. All right, the other stuff that we want to talk about here. That's cool. That is quite cool.
Well, so. So we've talked about the system symbol. The question remains what we do with the menus. If anything, we just remove the notebook history item entirely and educate people in some other way or we replace it with something that attempts to educate on this front.
I think.
Go ahead.
I think we've agreed previously that we would remove the menu item once we had a suitable kernel replacement. And that certainly would be my preference. The thing pointed to the bind menu item has become something of an albatross.
Yeah, we should do another review of the menus, particularly in the land of LLMs and things like that.
Oh, you always want to do reviews of menus.
That's every few years. It's every few years.
And then when we actually do the reviews, you focus on one thing and then you just get bored.
Okay, well, that's the strategy. Let me just think. Yeah, We could put it in. I mean, you know, notice that we could also do this in the cloud now. She haven't been able to do before.
Yeah, that's true.
What can we now do in the cloud? I'm sorry?
Run all this notebook history stuff.
Ah, it's the. The kinds of things that Lou is doing. I'm not sure if every last thing is supported by the cloud, but most of it is pretty elementary Stu, in terms of cloud support.
Right, okay. So. I don't know. I'd be curious to know whether people in our community and elsewhere have been using notebook History. I don't know. I mean, I use it occasionally, but I'd be perfectly happy with these functions.
I primarily use it to make sure I've successfully removed all cell change times from my notebook before I commit it to version control.
Oh, well, okay, that's a different issue and we should have a WFR to just do that.
As you say, I use the cell.
Statistics part of it more than the history part.
What cell statistics?
The part that's closed by default.
Number of. Number of cells. Size of cells.
Yeah.
Brett cares because he's, you know, composing documentation and doesn't want, you know, to accidentally have some gigantic thing make its way into the documentation.
Yeah, I mean, I wanted that. I didn't even know it was closed now. I remembered it from past years just to get a sense of, I mean, I don't know how big. Okay. An unsaved notebook. How do you know how big it.
The. I mean, the. Does this. Does the notebook history give that to you or does it give you the memory size? Might give you the. In memory.
Gives you the memory size.
Yeah.
Which is also useful.
Yeah.
By the way, we could have a notebook memory in use function.
So there, I mean, there are ways to get what you're asking for. It's not incredibly cheap, you know, I mean, it's not going to be updating every time you modify the notebook.
Yeah, I understand. Look, I just said. I just saying, I think a notebook memory and use function does seem quite useful.
Does memory and use work? I mean, it works on what dollar.
Front end, but does it?
Yes, but is that documented? I think so. I think so, yes.
But I had no idea.
But we don't. We're not keeping track of things on a notebook by notebook basis. And there is a lot of stuff that is. Right. You know, styles that are shared between notebooks. Yeah.
All right. Okay. So that's a hard thing to compute.
Yeah.
I mean, can you compute it on request or not?
Well, I mean, what we can compute easily is things that, you know, the, the raw data of the notebook and how much, how much is consuming. What we can't compute easily is the, the kind of metadata style type stuff, because that's the stuff that gets shared.
Right. Okay, well, all right, so look, why don't we have an explanatory notebook for now under notebook history. But I mean, this is all 13.4 anyway. Right. But the WFR is now and we just have it.
Okay. Yeah.
And in terms of this getting how much memory, I mean, the storage size of a notebook would be a useful thing to be able to easily get. That's what I mostly want. I don't want the number of graphic cells and this and that and the other. I just. Well, actually, what I would like probably is the storage.
I mean, it's, it's basically, you know, string length of export string, you know, to the notebook format.
I understand, but that might be huge. And I mean, I guess the two questions I would ask are how big is the notebook altogether if I save it on disk. And where are the big contributors to that? So I'm saying, is that just.
So I just answered your first question. The second question is.
Well, your first. The answer you gave might be undoable because the answer might be 50 gigabytes.
No, no string length of export string to notebook of, you know, of evaluation notebook.
I know, but I mean, I mean.
I mean, it's basically what it's going to do is it's going to call the front end and say, act like you're saving, but instead of saving to a file, save to a string which gets sent back to the kernel.
I know, but that's a lot of. I mean, that's a lot of footwork for something that is potentially.
Well, but that's the way. I mean, that's the only way that you can know how big it's going to be on disk is to at least pretend to save it.
As an export string or export byte count. Look at this. This is not exactly the speediest thing in the world, and this is not a complicated notebook.
Data sets are big data sets. Use a lot of boxes.
Yeah. And it's spinning. And I would say this is a flop. Ah, my God, there was a flashing I dialog box. It's spinning and dying.
If there were an efficient way to get the serialized length of a string expression, John, we could add that as an accessor in this new function so we can get a cell by cell.
I mean, I mean, we do have a mechanism in the front end to. To pretend to serialize without actually serializing anywhere. And the purpose of that is, back when storage media were smaller and you could run out of disk space on your. Your floppy disk or your, you know, zip drive or whatever, before we would overwrite an existing file, we would, you know, kind of run through the entire file, counting the bytes and see if we had enough bytes left on your.
Are we still doing that?
Yes.
Is that what the original. Saving, you know.
Checking.
Checking, yes. Is that what that's doing.
On. Sorry, I haven't been paying attention to the. To the messaging. I don't remember what correlates with what messaging.
But we're not doing something which is going to waste time in saving a big notebook, are we? Well.
It consumes a little time, but compared to the actual writing, it's quite small.
We better check this, because when I see checking it often takes a long time relative to saving.
That's so. But something to understand is that there is prep work that goes into saving and that Prep work needs to be done even before the byte counting.
Avery is saying that this notebook is 511 kilobytes on the file system, yet it's here. 1.5 megabytes.
According to this, you've been making changes to it?
Not many. I've been saving most of the time. I mean, let's see, if we say notebook file. What is it called? Notebook file. What is it called? Notebook file name.
Notebook file name.
Yeah. Okay. I'm. Yep. Okay.
I mean. I mean, Avery's probably looking at. Through Dropbox, and maybe it hasn't updated through Dropbox yet.
Yeah. Okay, fine. Okay. Anything else we need to cover here? Probably. Look at this. Okay, so. Okay, so, 13, four. The plan would be to have a notebook history thing that points, as Lou has it, more or less off to an explanatory notebook. That. Right. But we might. Let's. Let's revisit that decision when we actually have this thing in the system.
Okay. And notebook. Cell data was the name we agreed on.
I think so.
Or before. Varying definitions of agreed.
Yeah, I think that's right. Okay. Good stuff. Very nice. We got through the agenda. Well done. And talk to you all soon.
Okay.
Bye.
Bye.
More from Guy

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

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

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

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






