Live CEOing Ep 771: Language Design in the Wolfram Language [NAND reduction, and More]

Stephen Wolfram leads a design review on Wolfram Language improvements. Topics include NAND representation and minimization challenges, making file handling more intuitive with sequence arguments and drag-and-drop placeholders, and making cloud storage more efficient by supporting MX format for better fidelity.
Chapters
Our thing is really brief.
Okay. Hi guys. Welcome to another Wolfram Language Design review. Part of our Language Completeness and Consistency series. And our first item is the NAND reduction thing.
Right, so you were unhappy with that and we were unclear.
Well, I want to see nands. And you're saying they are nands. But the not came about because it was a simplification of nans.
No, it's more than. What we have right now is a representation in two level, nonce and literals, which are variables and negations of variables. And we have two levels, but we have arbitrary number of arguments in a nonce. So there is another thing which would be two arguments, nonce, no negations, and arbitrary number of levels necessarily.
Well, arbitrary number of levels is really hard to do. We can't realistically do that.
I mean, we can convert it to that. We cannot minimize that.
I understand, but I think if we say nand, you know, we probably should have a nand, only that is really. I mean this isn't really nand. I mean, what you've got here is not really nand. It's a misstatement of it. Well, right.
It is exactly as it is documented and literals are. So, you know, the DNF for instance, is supposed to be and. And, or it's and or, and not. Yeah, so it's not. Is a part of a literal negation. So it's a negation, but negation only of the variable. You cannot have negation of an expression.
Look, DNF is a definite concept thing, right?
Right.
We know what it is. Anf. Similarly, right, when we say nand, that's not a standard name for a format of Boolean function. Right? BFF is a, is a. Well, no. What. Where's BDD isn't bdd? What is that?
BDD is the same as bff. Because we named Boolean function, we change the abbreviation to bff, not BDD Also. BDD also works.
Yeah, I think it still works, but. But we just prefer to document BFF because of, you know, our naming convention.
Okay, so wait a second. So if we say this. Okay, dandy. Now I assume that if I say boolean function, Humph, that should probably work, shouldn't it?
Let me see, what is. Should we supposed to. No, that's just not what it does. It's a pure function. Should it throw out the variables somehow or what?
No, I don't know. I don't know what it should do with the variables. But let's say, let's say this for Example you give it a pure function. Doesn't seem like there's a good reason why that shouldn't work. I don't know.
Well, number of variables.
Variables. I know. It's a minor thing, but I think that probably should work actually the first.
One that you typed, if you type the variables as well, then the fourth, I think the fourth listed format would work. So if you do XOR of XY and comma xy.
Nope, nope, nope.
Okay, so what, what's the specializer anyway?
This is not the point we're dealing with right here. What we're dealing with right here is a Boolean convert functionality. I think this should work so. Or something, you know, it requires a little bit of thought to see exactly what works. Okay, the problem here is when you say nand, you want nand, you don't want something other than nand. This is not useful to me at least I don't think it's useful to anybody.
Well, actually I think that if you look for NAND representation, that's what you will get that it's a two level arbitrary number of arguments, nons and literals, meaning variables and negation of the variables.
Well then maybe we want something that says something like NAND only. Am I making sense?
So you would like to get arbitrary number of arguments NAND still two level. Just. Just not expressed as NAND of AA or. Or multi level NAND that has just two argument nands which is actually problem that people consider. It's not an easy problem, but it's something that is.
Yeah, so maybe we have a thing called binary NAND that does that.
Yeah, we could have that. So at least we could have the conversion. The minimization is hard.
Yeah, I understand, I understand. I know that minimization is hard. I've done it multiple times. I don't know any way to do it other than essentially exhaustive search.
I've seen just search today. So I found a 2009 PhD test is supposed to give something better than exhaustive search.
Oh, send me a link to it. I'd like to see it.
Okay.
I last worked on this problem in about 1998.
Okay, so we just want the binary nand, binary nuts which is sort of really emphasizing the home. The, the point that NAND is universal.
Yeah, really just make NANs and this would be a binary nor as well now the other things is not useful like and it's not going to work because just like, you know, see what I'm saying? Or we could also say pure NAND or something what do you. I mean, it's just, I. We just want nands out.
Actually, I think binary is better because it's. It's also that. That you take the multi argument nans out.
Okay.
Yeah.
All right. Any more to say on this topic?
I don't think so.
Okay. All right, let's go to the next. So that's it for Adam, I think, huh?
Yep. Right. So I was told. So I'm coming late to this discussion. I was told you wanted to have this conversation. I'm not sure that this is a great idea and there are various practical issues, so.
Okay, so the issue is this, the practical. I mean, the thing we're trying to achieve is you've got. You say less than. Less than file. You're in a notebook. The file is in the directory that the notebook is in, but it can't find it.
Well, I mean, the original idea was coming mostly a little bit of background. So the, the first question is whether, you know, you have a notebook and you have some Python code next to the notebook. Should we add notebook directory to the external evaluate Python path? That is the first question. And then. And then we move to. Okay, maybe we should do it in general.
I think that that's a bad idea on both counts.
We have.
The packlet system can handle making Python code available when needed, where needed, but the idea of dynamically adding the current notebook to the path, I think it's just a bad idea. And I totally do not support any of this. I literally type a cell in one notebook and it runs, and then I copy a cell into my other notebook and run and it doesn't work.
Yeah.
Or alternatively, you do file save as and save it to a different directory and then suddenly it doesn't work.
It suddenly doesn't work anymore.
Well, but I mean, isn't that true if you change the path at all? I mean, if anything's coming from the.
Path and you move different, but I manually make changes to $path, then I know what I'm doing. This is just sort of magical path shifting underneath me without me even understanding what's going on.
One of the issues is, I mean, if get had one of the things. That's annoying and you know, this is very, very old version one functionality there. Is that, you know, if you want to get from a remote directory, you end up with this craziness that you have to explicitly construct the file. Do you see what I'm saying?
No.
Well, if I say, I want to say, you know, get from foo, slash, whatever, I have got to explicitly join slash, you know, whatever.wl. right. I've got to do that join like that. See what I'm saying? It seems to me one thing that would help is if I could say something like this. That would be nice or something like that.
File name join.
Yeah, that's just.
I know, I know. It's just file name join. I know, it's just that. But it's kind of ugly to have to do that all the time, you know, it's. It's like, it's like hand constructing your file name. See what I'm saying?
But isn't guess getting multiple files already or not?
Does it get multiple files? I don't know, does it. What does it do with the list?
I think it does nothing with the list.
Oh, Christ. What's this?
Join requires a list.
Okay.
I don't think anything with a list. So, I mean, it would be weird, I mean, given that we have like file and file name join, it would be weird to sort of go backwards.
And just what does file do with respect to. It's just a path. So file doesn't allow the possibility. File could allow multiple arguments that were a directory, I mean, which is just a symbolic representation of a file in a directory. So that, for example, if I wanted to, I could have something in my notebook that says file of notebook directory comma, you know, food, whatever. Right. See what I'm saying? So it sits there and then dynamically at the time of the get. You are doing what I wanted it to do.
Yeah, I, I, well, I, I'm not so keen on extending file.
But why?
Well, for one thing, because that means then every single Right. If. If file automatically evaluates, you lose the value of this being notebook directory. And if it doesn't evaluate. Now every single downstream function has to learn various.
You know, more, more file syntaxes.
Yeah, so that's an implementation issue, but I understand that, but I'm just asking the question, you know, I consider this to be like machine code, What I'm saying. I mean, I'm like worrying about file separators and, you know, path.
They're not.
You're not worrying about file separators. That's the whole point.
Right, Well, I know that, but I'm only, I'm only, you know, I'm only just faintly.
Right.
I mean, avoiding it.
There is some precedent in Cloud object that supports specifying directories as a separate argument, but that also evaluates the full thing.
What do you mean, Cloud object?
You could do Cloud object of obj comma Directory, which is kind of reminiscent of what you're proposing, also evaluates. That's the basic must usage.
What do you mean it evaluates? What does it evaluate?
It evaluates to cloud object with a single argument and a full explicit absolute path.
Really?
Yeah.
It doesn't stay symbolic as far as I remember.
Maybe I am mistaken, but I, I think that.
Ouch, that's bad. Okay, Well, okay, so what's the issue here? Sando, by the way, on our livestream, is commenting that he usually does set directory of notebook directory as the first line in his notebooks and I often do similar things.
Now of course, that's not quite the same thing as a dollar path extension either. Why? Well, because, I mean, the side effects of set directory includes being able to assemble rel have passed. That might, you know, that might not work in dollar path scenarios.
Yeah. Okay.
You know, if you think about there, you know, dollar path isn't used for every file access.
Right.
Dollar path isn't used in. I don't think it's used in Notebook Open, for example. Not used for creating files, obviously.
Okay. Yep. All right, what are we doing with this? I mean, people's general opinion is this is pointless. Don't worry about it. That's my, my point of view is it's a little bit annoying that you have to do sort of explicit textual construction of a file name and that will be nice to avoid.
Right. Although, I mean, I will. You know, conceptually, I mean, the, the difference between the file name join that you object to and the file that you, you thought. I mean. Right. The difference is 10 characters. Right. It's, it's, it's the name join. And, and.
I know in code, in code it's actually, you know, when, when you look at it, it makes a lot of difference, especially if you're doing a lot of manipulation that's, you know, having to add file name join is. I'm writing code with file name join all the time and unfortunately it adds complexity.
But, but. Yeah.
Well, what do you suggest? I mean, I, I'm. Okay, point one, 25 years ago, we thought files were going the way of the dodo. They haven't. Am I making sense? So we didn't pay as much attention to kind of sprucing up our things like symbolic handling of files because we thought files were just not, you know, everybody's going to object stores and God knows what else. Of course, the hype was overrated. And files are still here.
Yes, and, and, yes. And the promised object oriented windows with no files Never materialized.
Yeah, right.
What was that? That was Cairo, I think.
Yeah, okay.
Yeah.
So I. I mean, so sorry, I just wanted to say, right, the front end has this notion of a symbolic file thing. Right? What's that? FE file. What's that thing?
I'm a little unclear exactly what you're referring to. The front end, backtech file name. Yes. Yeah, but I mean, that's, you know, while I disagree with Stephen on file name join looking like machine code, the front end backtick file name actually does even, in my opinion, look a bit like machine code.
Well, what does it do?
Well, it's.
If you go to the options inspector, say.
Yeah, I was just. Yeah, if you do. If you just like here, I'll throw something in chat that you can also evaluate and just see kind of the dog's breakfast that comes out.
In the meantime, why not having a.
Nice infix notation for find name join. I use the infix notation of string join a lot.
For example.
Well, isn't it the. I mean, the issue there is we. We would have. I see. I mean, God knows what. We've used up most of our infix notations. I mean, the only thing I can imagine is some kind of thing that is, you know, something like this. I don't think that works. Is that. Is that still allowed?
Can we put a slash in the middle?
Something that reminds me.
I mean, we'd need to update the parsers, but I. Why?
Why?
We don't see an obvious.
Wait, sorry, what?
We're.
We're proposing what, less slash greater as a new infix notation for file name join.
But you cannot really do that.
Right.
Because the first argument of file name join is a list.
Yeah, this is what I was gonna say.
Yeah.
And we also have get rid of that requirement and support both list and sequence.
No, no, no, we don't need to. We can make the parser be such that this thing turns into file name join of list first thing, comma, second thing.
Yeah, yeah. I'm not arguing that, but I'm saying just in source code often, like the whole list is kind of annoying and having fun and join support sequence as well would be convenient.
Well, I'm not sure that that's possible.
For other reasons, so I don't see any problem from our language for that as an operator. It does have the. Kind of. An unfortunate coincidence with HTML.
I know.
Well, it's true that.
Just triple slash. Oh, sorry, what's that? I was gonna say, if you're gonna, you know, type three Characters to get the operator. Why not just make all of them slashes? You mean triple slash?
Yeah.
Is that. Is that. It's way easier to type than it is and it's kind of amazing.
I think it's unreadable. It doesn't suggest anything to me as if I'm looking at code and I see either those operators. It is not at all clear what the hell's going on.
Well, it would be in context, I think.
Well, once you know what it is, it's obvious, but.
Right, but I mean, if you say notebook directory, slash, slash, slash, file. I mean, it's a pity we have to put the quotes there. I don't know whether we absolutely do.
We do. Right, because then if we auto stringified, you couldn't do things like.
But it's true that one small improvement would be to just do what, you know, what string join is doing. With filename Join, basically you allow any kind of RPD readiness at least and all kind of positional and non positional argument.
Yeah, that's a good idea. That's a good and simple idea to just make, make it not require a list. I'm sure we've documented string join and we can document this so it has an option operating system. But that's okay.
I think string join is documented to support both.
Yeah, yeah, yeah. And I admit that probably about a third of the time that I use file name join, I. I do it the wrong way.
So yeah, I get annoyed every time I use it because of that list.
Me too.
All right, so look, first step is just that, the second step, it's an amusing idea to use the triple slash operator. I don't know. I mean that, that's, you know, giving more credit to files than perhaps we should. Maybe what we do. Maybe, maybe the conclusion is let's just make filename join work like string join and start from that.
Okay.
All right. We may yet use triple slash for something else and but by the way, we, we should maintain this list of operators we haven't yet used. I have this feeling that in our future of arrays stuff that we may end up needing to have some additional operators.
Well, I think we're out of two letter, two character ones. If we're not, we're pretty darn close.
Well, let's find out whether we actually are. I think it'd be useful to know.
Okay.
Okay, can we get on to the next topic? Dragging a wlnet file?
Yep. So there was an example wlnet file I gave you to drag in. Happens.
There. It Goes, okay, I'm not seeing anything. And now it suddenly pops in, right?
And you'll notice you get this thing that you can't evaluate because the data is not saved. And then when you try to click on data not saved, it fails because there's no in out associated with that.
Okay, send a comments file name joins like string riffle. Yes, it is like string riffle, but it's a little bit more subtle because it knows the operating system and so on. Go ahead. So we're talking about this. Yeah.
Okay, so, right, and so basically, and I mean I can tell, right, and every. And so what's happening is completely useless, but 100% as designed, right? Because the, the default behavior when.
I love that. That's, that's, that's one of these. Okay, go ahead, go ahead, go on. Yes, right.
So what we do when you drag something to try to be nice is right? You send something in. So we call import on it and then that import evaluates and typesets. And well, since this is using a summary box and it's reasonably large, that's the result. And of course, if I don't know, certainly, I guess I don't know exactly how this important, you know, this auto import mechanism works. If there's some way we could do it, you know, make it behave differently, make the typesetting behave differently. Although it's not so obvious that we could do it.
And even if we can, I make a simple suggestion.
Yes.
If we're dragging like this, okay. If we don't have the data dragged into the notebook, the data is dead meat. Therefore, in this situation we need an option to. You know, I'm not quite sure where the option goes. If it's to import or something else that says save the frigging data in the notebook.
That can't work.
Why not?
Because import evaluates and it's the typesetting that decides whether or not to embed it in the notebook. Import is long gone by the time top type type setting occurs.
Okay, well, John, and somebody here from import Export. Yes, Carlo is here, right, Carlo, not.
Exactly from import expert.
I understand.
I know something.
So, so the re. I mean the more realistic suggestion that's been made is that rather than actually importing it, at least for wlnet is we just put in the literal import statement and then when the user evaluates that as part of their in out evaluation, things will just work however they want them to.
That seems useful to me, John, can you comment on that?
I mean, that is straightforward enough to implement. I'M just working through my head to see if there's some way that we could make the typesetting actually work.
Let's just walk through this. If you can get the raw import. What is the raw import in this case? It's something that is going to some weird backing file that might be in some downloads directory. Is that correct?
I'm not sure what you're asking.
Okay, I'm dragging it out of email, for example. I'm dragging it. Okay. I'm dragging it from the file system, the import. Here, let me do it. Okay, you just do what you would get. Okay, so.
Right, so the front end is calling import.
Did I just move this when I did the drag?
I didn't actually see a drag.
Oh, no, I was doing it from a different, different. Oh, hold on one second.
Yeah, you shouldn't have.
No, okay, okay, there it is. Okay, so fine, so I do the drag and I press option before I, before it lands and I get that.
Oh, I had totally forgotten about that option. Right.
Oh, I learned about. It took me a decade to learn. I never figured out what caused it to actually drop the file name. The answer is after you drag, you press the option key before you release.
Yes.
Okay, so anyway, so then, then this is what you would be trying to. This is what you would get from that, from the drag that, the, the, the drag that. In the proposal you're making, this is what would come back. Right, right. Okay, so now if this was from a piece of email, what would come back here is, is some weird temporary file. Is that true.
I presume.
Do we want to try it?
John, do you have more insight that statement?
I. It depends on the mailer, I think.
Okay, well, I mean, but, but it. I'm going to just try it for Apple Mail or something here.
I mean, it might be a temporary. Excuse me, it might be a temporary file or it might be a file that actually exists somewhere in the, you know, in, in your kind of, you know, in the mail management files.
There it is. Okay. Yeah. So what we would get is this. I mean, that's not the worst thing in the world. It would at least work. Am I making sense?
Yeah.
Right.
Okay, so now if I say save.
Now, that'll work just fine. Assuming it's not so. Right. I mean, there's a hard limit that.
No, no, I understand that, but that's not the point here. By the time you can do this, honestly, this seems like a good solution to just come back with the raw import because if the thing is big, you Want all the equipment for dealing with a big import anyway.
Mm.
Right.
And so this is. So this import is always a one argument import. So we would just want to find those formats that, whose one argument import will produce a summary box or at least a potential large summary box that we would want to change.
So in regards to wlnet, the proposal is to always do this for all WLNET files?
I think so. I mean, but let's see if we can do better. But this is a fallback that is perfectly. I think this is an acceptable fallback. I think this is highly useful to people. Nobody's going to be deeply confused about seeing this now. There are cases that I've seen where I, where I drag a big file and it just sort of eventually says dollar failed. What's going on there, John?
It deeply depends.
Okay. The.
Yeah, I mean, there are some cases where you're trying to deal with an image format and it may be that you've run into a limitation with. That often happens when the front end tries to take a very large bitmap and map it to an operating system level bitmap object. And, and the operating system's like, no, can't. Can't deal with it.
I would love to get an error message of some kind somewhere rather than just $failed. See what I'm saying?
Well, I mean, so, I mean, this is, this is the sort of thing where error handling is fundamentally different for shift enter evaluation versus non shift enter evaluation. You know, just put it in the.
Console if you have to.
Yeah, well, that's pretty much all we can do.
I think that will be useful. I mean, just seeing $failed is not useful. I mean, the best thing would be to put it there. I mean, the question would be in a situation like that where it is going to fail or even where it has failed, could you not just bring in the importance. In other words, let's say it fails interactively. You know, it failed interactively. See what I'm saying?
Yeah.
Just do this and I'd be a very, very happy camper.
Yeah.
Doing that and producing a message that says, you know, some kind of.
Well, I, I mean, I mean, even better maybe might be because, you know, these imports can take potentially a long time. And perhaps even better would be if we drop, you know, immediately an object that basically says that it's resolving your drag and drop and then replaces itself when it's done.
That would be wonderful. That would be terrific.
I actually don't think that would be crazy hard to implement.
That would be really good. Really, really nice.
And then if, if the import fails, the object, instead of replacing itself with dollar failed, could just update its status to say that the operation failed. And here's some information about why.
And return the import. Yeah, return the RAW import.
Yeah, yeah, sorry. Yes. Yeah, it could go that way too.
Yes, that would be great. This would be wonderful. This will solve these problems. Right. So let's just walk through this. Okay. After timer, it comes up with a blue box that just says, you know, this is where your import is going to go.
I would say virtually anything that isn't almost instantaneous. I mean, when you say timer, you know, the, the timer, in my opinion would be. Yeah, like 200 milliseconds sort of thing.
Absolutely fine. Yep. I agree. Okay, so then it does that and it's grinding. It's grinding. It's grinding. I really like the fact that I can see it grinding because right now I can't. Right now it's just like I have to trust, so to speak, that something is happening.
Yeah.
And then, you know, if it succeeds, great. If it fails, it just puts up a message saying automated import failed or something. Or I don't know what we want to call that. Something or other import failed. And then it returns the RAW import line.
Yeah.
What, what do we want to call that? That import? That is interactive import, drag and drop import failed.
I mean, actually, if we're just going to replace it with the import line, then, you know, then I think, yeah, we can just take the standard messaging and send it to the console. If there were messages, we'll send them there right now. If there are any messages, we're probably just eating them and not finding them at all.
Fine. That's bad. That's bad. So why is it going to the console if you can put the output in an import?
Well, because if you wanted to succeed, you know, quote, quote, succeed by putting in the import line, then there's no longer a place to put it in, in line because the import statement is there.
No, I understand that. But as soon as you can emit the import statement, you can also call message to emit messages before it, can't you?
But that would go to the console window because there's no other safe place to put a message.
But the import is going to the notebook.
Yeah. Where are you going to put the message in the notebook? You, you.
I mean, I see what you're saying.
This is like the dynamic of print, you know, you cannot just assume that below the current cell is a sensible location. I get It.
I get it, I get it, I get it. Okay. I think this is a great solution. Really improve my quality of life for doing these imports. I'm good with this. Anything further to say about this topic?
Yeah. Okay, Lou, you and I should coordinate. I think there's just a tiny change for me to make in the C code, and then you can follow up with a decent bit of Wolfram language coding to implement this.
Yep, sounds good.
Okay. WXF faithfulness. So what this is about is things like I'm pushing something to the cloud, like that thing where it says, you know, save it to a cloud object. Okay. And I'm, you know, first of all, I'm objecting that cloud put doesn't have any kind of, you know, progress monitor. But the second thing is, what is cloud put putting?
Well, it puts what puts always, what put always does, which is input form.
Ouch.
Which. I mean, you say that, but it's not at all clear. I mean, for certain kinds of things, yes, WXF is going to be more compact, but it is not at all clear. It's not obvious that WXF is in general going to be smaller or more efficient. Really? Yeah, because, you know, you need all these extra tokens and.
Okay, here's my question. We're saving things to the cloud and they might be big.
Yep.
How do we make them as small as possible? You're saying if we had an MX file format of some kind, that would be an example of a way to make them small? Is that. Is that right?
That would be as small as possible and as fast as possible.
So why couldn't we use Dump Save? Why couldn't we just make an MX file?
Right. So we would need. Well, right now there's no cloud cloud Dump Save. So we would need to, I guess, manually create. Create a local one and copying copy it, which, you know, would not be hard. It's just work and. Or maybe we should figure out a way to have sort of. Or either have a cloud dump save or just teach Dump save to understand local objects. I mean, cloud objects. Also local objects.
So. Hold on, hold on. I'm confused here. The issue is, I mean, cloud Save is now machine independent. True or not true? I'm sorry? Dump save is now machine independent. True or not true?
Well, it's machine independent up to dollar word size. And since at the present time we're.
Only everybody's 64 at this point.
Right.
Yeah. The last holdout was Raspberry PI, and that's finally migrated, but it's not Version.
Independent, which I can believe doesn't matter in this case where it's for you. And so you expect to bring it back into same or maybe even a later version. But it is a problem if you expect to be able to bring it back into an earlier version.
I understand.
Right. Although of course, that, you know, input form could be just as problematic.
Yeah, I agree.
No.
So let me understand this says Dump Save works with local objects here.
Okay.
So then why aren't we just. I mean, if, if I just take, you know, if I say range of, of, you know, 10,000 and I say Dump Save, that. Now, one point is that Dump save is going to a file. There's no reason for Dump Save to go to a file. Why don't we allow Dump Save to go to a byte array?
Because, well, for one thing, byte arrays didn't exist and you know, we, we haven't put in the effort to do that. I don't know how much effort it would be.
Put it to a file.
Can't you export byte array to with format mx.
Right. I was going to point out that you can't actually Dump save range of a thousand. Right. Because, yeah, dump save wants to save symbols, but you can do export byte array range of a thousand, which will create a temporary symbol Dump save that and give you the byte array.
So hold on. Export byte array range of 10,000. Then what do I say?
MX.
Oh, so that is a, that's an MX format thing. That's cool.
Yeah. Now you can just import byte array that and it'll, you know, give you back your range of 10,000.
Well, so why isn't this the solution to what we want for pushing stuff into the cloud? Why isn't this what we do with Cloud Put?
Well, because Cloud Put behaves like put as you.
All right, but maybe the thing we do. Okay, all right, fine.
Also, Cloud Put as an MX would suffer from the problem of you make it public and then someone using an earlier version tries to get it and has problems.
Well, we can, we can protect that. We can say it's, sorry, it's not available in the earlier version. We should do that. But, but my suggestion is when you say, you know, when you do one of these things that says cache this object in the cloud. Why on earth aren't we doing this?
Well, at the time, well, at the time when we first did this, we had both 32 bit and 64 bit platforms.
So we don't.
Yes, I mean, we can make that change now. It was not possible when we first did this.
I guess I get it.
So what I'm suggesting, and frankly, we haven't had any complaints about the speed of saving the cloud until your email last week. So we weren't motivated to, you know, put in effort.
Right, I understand, but I think it's going to be an increasing thing as we go to this future of arrays stuff and as we try and save neural nets. You know, this. I hadn't tried doing this of saving a substantial, you know, a neural net to the cloud like that, but it seems like a highly useful thing to do and we want to make it efficient. And this is going to be dramatically more efficient, isn't it?
Yes, because. And more faithful. Right. Because an MX file is basically a dump of the kernel data structures from memory to file, and so it reproduces things with 100% fidelity. Even things like where if you have a hold of minus of X, you might get a slightly different expression than you put. Right. Because of.
Right.
Unary minus. So this is the right thing with an MX file.
Okay, so that's interesting. That that was. That is the same size. That's a little weird, isn't it, that the MX file is exactly the same size as the byte count. Oh, no, it's not. I'm sorry, it's not weird. What, what I should be comparing that with is the put size, the input form size, which I don't know how to compute, but I guess I do.
Two string of expert comma input form and then do string length of that.
Yeah, that was what it was, basically. Okay, that's a big factor. Yep, we really care about that. Well, so it seems like we have the technology. Let's just make it work. The only issue is a little bit of protection. You know, we might want to invent a generalized MX format that has the protection for versions in it. Or does MX already have that?
Well, you know, I'm not sure exactly what Jeremy. I mean, there was a point where it was really obnoxious and refused to get an MX file from a future version, but I thought we fixed that. And so it gives you a warning that you might run into trouble, but it sort of does its best. And obviously if there's an incompatible. Right. If we introduce some new incompatible data structure that makes it impossible for older versions to read in, then there's like a format version thing we increment that says you can't do this.
Yeah, right. By the way, we should link to export byte array in this page.
Okay, and that's what I was referring to. And I Thought. And I thought that incrementing that number made it obnoxious. Again, I could be misremembering.
Right. If. Yes. I mean, if we actually. I mean, there are times where. Right. Because, you know, if we actually change the data structures in such a way that reading them back in will, you know, will have undefined behavior as opposed to just creating symbols that don't do anything, you know, that. Then we increment that to prevent, you know, crashing your earlier kernel or something.
Look, fundamental point here. We've got a great solution to this thing about minimizing the size of pushed cloud. Cloud objects. Let's implement it.
Do we want to limit that solution to just the cloud cases or when you're storing it in a local object.
Yeah.
And you're storing it in the notebook.
I think any of those cases. All of those cases.
Not in the notebook. Right. In the notebook, I think you stick the expression in there.
Why?
Why?
This seems like a much better idea.
Because then it's actually equivalent to what's there as opposed to being. So with the other guys, we need to change the expression so it's import, because there's no other way. But in the notebook case, it's an interpretation box. We can stick the expression right there.
But still, we don't want it if it's nine megabytes instead of one megabyte. We want the one megabyte version, but.
It'S not going to be nine megabytes. Right. Do. Do. Right. Do you know, Notebook. I know I may need help from John, but. Right. If you. If you.
Well, what is actually. Is it in the notebook file? If I looked at the RAW notebook file, is it binary or is it something else?
It's. It's going to be. Well, I mean, it's. It's going to be the expression, but with.
All the arrays packed.
Yeah.
Which will be.
Which will be sort of the biggest.
I think this requires thought. It seems to me that having a byte array sit right inside as essentially compressed data right inside the notebook seems like a much better idea to me. Nobody's ever going to look at it. I mean, so long as it's. It. You know, these things are all opaque. You're just pulling them back.
I mean, people.
Right.
People will see it when they do input. And if they're. If, if they're, you know. Right.
What input.
When they copy that thing and use it in an input cell, they'll get a different expression than what they had there, which is unavoidable in the cloud case, but is avoidable in this case, and so we should avoid it in this case.
Okay. All right, fine. So long as it doesn't blow up the notebook size, I'm good with it. Do you believe it doesn't blow up the notebook size?
I believe it doesn't blow up the notebook size.
John, do you agree?
I would want to confirm, but I think that's probably the case.
Okay, if that's confirmed, then we have a great solution here. All right. Anything else? Okay, great. Thanks a lot. See you guys soon.
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






