Live CEOing Ep 772: Language Design in the Wolfram Language [Engine Connectivity Engineering]

Stephen Wolfram leads a design review of the Wolfram Language with engineers Todd Gayley, Roman Maeder, and Suman. They demonstrate embedding the Wolfram engine in C programs at roughly 70 MB, an LSP server for VS Code that doesn't consume full licenses, and prototype IDE features like syntax coloring and go-to-definition. The team discusses parallel-kernel startup optimization and resolves engineering issues around packaging, licensing, and graphics output formats.
Chapters
Okay. Hi, everyone. Welcome to another Wolfram language design review. This is actually a different series from ones that we've been live streaming recently. This is part of our engine connectivity engineering effort and we have a variety of things to talk about. So let's start off. Looks like you've started there with standalone applications.
Yes. So we have our first standalone application, and so Todd is going to talk.
About it and do the demo.
All right, I'll do the demo. I'll just do some talking at the beginning. Right.
So just bring up your screen, please.
Yeah, Getting ahead of myself if I bring up my screen. So, as you know, and we have been working for a while. Chris Cooley has been working for a while on the standalone Applications project. And the idea here is to give people a way to run the kernel directly in. In process in a C language program and then bundle a Wolfram layout with their application. So that, in a sense, the fact, you know, that the use of Wolfram language is an implementation detail of this program. You have a.
So they're calling it through a C language interface.
They're calling it through a C language interface, which we call the Expression API, which is being used here on the screen. Talk about in a minute. And. And so you can have a program that relies on the Wolfram language sort of in the background in some way, and it's a single unit. It's a, you know, executable with a layout directory alongside of it. And you can distribute this to people and they can run it. Crucially, if you run, you know, you use code signing to restrict the bundled application to running just your program. So this is what you're not handing out ex, you know, standard copies of the mathematical layout that can be run by anyone. Your layout is locked to your program. And that's what allows us to let you distribute this thing and charge people for it. Relatively small amounts of money for this thing because it's just using, you know, a portion of the Wolfram engine.
Okay.
Now, I've always said that a classic application, but it's a perfect application for the standalone applications project, is our LSP server functionality. So LSP is language Server Protocol. It's something created by Microsoft as a means to. For things like IDEs to communicate with. To communicate with other programs that provide syntax information and other such things for.
For that application file signature. That's the secret, isn't it, that you'd have to send.
Right, hold on. You get way ahead of me. So I just want to introduce this. Right. So the thing about running LSP Server. And right now if you download our Wolfram extension for Visual Studio code and from the VS Code Marketplace, it already supports LSP Server. You just out of the box, LSP Server is actually bundled in the Wolfram layout. And so when you run, you know, you can just get the Visual Studio code extension and run it and it will use LSP Server. But the problem is it just launches a kernel and tells it to run LSP Server. So it consumes a license, consumes one of your Wolfram licenses. And that's silly, right? This is just a useful little program to assist you code editing in your ide. There's no reason it should run in a way that takes one of your licenses. So an obvious application is for us to create a standalone app that is code locked to, you know, to only run the code in the standalone app and have that standalone app be the LSP server program. I always thought this is going to be a simplest standalone app on earth. And it is. Okay, so this, so now I've written this, I finally wrote it. It involved writing about 20 lines of code between two different languages. And this is it. This is the main C program. So this the application file signature. This is the signature generated for my main file. This program does only one thing. I mean, you can see it's quite simple. It registers the signature of my main file and it evaluates, it just calls get on my main application file and the program spends its entire life running that main WL file. This is the main WL file. It's really, it does nothing more really than start LSP Server. So I wrote a three line main WL and a little boilerplate mostly main C file that loads that file. The signature here is the signature of the main WL file. So when running in code signing mode, when I tried to load that file in that get command, it's going to say that file had better be signed. You better have a registered signature for that file or I won't let it load. And this is the register, this is the signature of that file generated, which.
Is then compiled into the C program.
It's compiled into the C program, right? Just constant.
This is very cool. So how big is, how big is the bundle?
That's the really cool thing about it because the, the Bundle itself is 190 megabytes. It's, it's stripped down to 190 megabytes from, you know, the original layout was like five gigs something. So what I've done is I've hand pruned this and I also Used. Chris has both static and dynamic analysis tools for understanding what your dependencies of your program are. I've used the dynamic analysis tool and some hand pruning to get this down. I know it could probably get, you know, 10 or how does that dynamic analysis?
Is that something that's like a WFR function that you call? Or how does, how does that work? How do you do it?
Well, Chris has got some instrumentation in the kernel that can be turned on that just basically says every time you load a file in the kernel.
So this is not a, this is not a simple end user thing. This is a, you have to be running a special version of the kernel.
Well, you don't have to be running special. The whole thing requires a special version of the kernel which hopefully within a couple of weeks Chris has a big pull request out, a series of pull requests that are being looked at by all the right people right now. Had multiple meetings about this and I'm hoping within a week or two it will get this all merged into the next into master. So kernels built from then on will have this capability, but you have to use a command line, there's just a command line argument, you know, dash prune, in a sense that you've launched the kernel with that triggers this recording. So it is an end user thing to trigger the recording of files that are loaded.
Why is it called dash prune? Well, that's not what you're doing. It should be like dash file model.
Yeah, that's what they call it. Prune harness. Yeah, I, I, I think let's decide.
What it's called because it shouldn't be called Prune harness. That sounds like some kind of thing that's used by, I don't know what that sounds like.
Prune harness. Yeah. All right, let's come up with a name for that. Because it's really recording. It's really just sort of in recording mode.
What is it recording, Chris? Can you say what it's recording?
File accesses. So that's all it is?
Yeah, like everywhere. There's like one place in the current.
Well, why don't we say dash file recording? Is that the right part of speech for if that's what it's doing? And what's it going to do? Is it going to write out a file?
Yeah, yeah.
And where's that file going? I mean, isn't it dash file recording and then you give the name of the file there or something on the.
Command line that or if you don't, it'll make a file in the current.
Directory, if it can.
Well, so if you say dash file recording and then the name of the file, that seems like a reasonable way to do it. Does that seem reasonable to you?
Sure. All right, call it that. So anyway, but the thing is, is that the really nice thing about this is that the TAR GZ file is only 70 megabytes. This thing compressed down to 70 megabytes, which I think is astonishing.
Yeah, it's a great.
You literally can give someone a 70 megabyte download. They'll have a standalone app that just uncompressed somewhere. They have to point Visual Studio at the LSP server application, just like they have to do, you know, in the old way, and it just works.
I'm impressed.
But now, and you know, it was really easy, I course stumbled on this and that, and with the pruning, I had some difficulties because I was over pruning at times in my manual work. But honestly, the whole thing was about as easy as it could be.
Okay, but so let me understand, in the case of a typical, more serious application, there's stuff that you have there. Then what is this again?
Just getting ahead a little bit. This is Visual Studio code running now with our extension. We can see this LSP server at work in this. But that's the next part of the demo, so go on with your question.
No, I'm asking. Presumably, it does packlet downloads for library downloads and things when it needs. I mean, that original 70 megabyte image doesn't contain lots of stuff. What does it do if it ever runs into something? Well, what does it do if it runs into something?
It breaks. Okay, if it runs, it, it breaks. That is, it does not dynamically download anything. It's just you prune the thing down to what you need and ship it.
And so there's actual certain modes. So in that main file there's a Start kernel command. And there you can kind of have a configuration where you tell it to do things like not to download packlets and some stuff like that. But, you know, if you need a packet that you don't have, it's going to break.
There's an argument here that you could use to control various aspects of the behavior of the thing, which we're just using the default.
Okay, okay.
All right. So all I had to do is I, you know, open user settings, I just have to give the path to LSP Server, LSP Server executable, and I have to do this, you know, anyways, right? I have to go into my settings and tell Visual Studio code Where, where's the LSP server program? Okay, that's all I have to do.
Okay.
So here's just a. I thought I had. I'm gonna turn copilot off. I've got GitHub Copilot on what says reload required? I'm gonna reload the window because I turn copilot off because it's kind of. It's got some issues. I just want to show it without copilot. Right. So this junket that printed at the bottom of the screen is just debugging output from LSP server. So the LSP server program launched automatically because I've opened up a WL file. Right. And. And we get all sorts of things, features in here. Sit down to type here.
Yeah. I assume that, I assume that we have syntax coloring.
Right? We have syntax and it's kind of subtle here. That's. That's a different color. A built in symbol is a different color.
Well, I mean, why aren't we using our usual coloring?
We could. The thing is that. And trying to do that Suman is.
We spent a lot of effort figuring out that coloring over the course of many years. Let's use it.
Yeah, yeah, that's the thing. Unfortunately, Visual Studio, the theme is like a kind of a global thing. So you said it. You have to live in that theme for all of them.
So then C code gets. Oh, for goodness sake. But there must be a tagging of different. You know, there's some list of. These are the types of symbols or whatever types of, of identifiers. And you know, it's a such and such identifier and it gets this color, blah blah blah.
It's exactly that, but it's not language specific.
I understand, I understand what you're saying, but where's the list of all the, all the types of identifiers for different languages? Do you understand what I'm saying?
I. I don't. I don't know where to look at that.
Okay, well, so we need to find that. Right? And then once.
I know, I know, I know.
So show us what it is. And then we have to map whatever its theme is, like known keyword, non known keyword, etc. Etc. Etc. You have to map those things into the colors that we have in our, you know, color option inspector thing.
Yes, we understand that. Just haven't done that.
Was that already done or not?
It's. It's under development. I'm. I'm doing.
You need to give everybody a list, right? You need to give them a list. Yeah, this is what Visual Studio defines as the types of. Of things that can be differently colored. And let's decide what we're going to map those colors into because we may have. It may have distinct. You know, it may not have some distinctions that we have, if you understand what I'm saying.
Yeah.
Right.
Okay, so this is terrible code. What. What am I supposed to learn from.
This is just me typing random stuff. I mean, you know, you can hover over system functions or, you know, you get a usage message. Right. Go to the web documentation. If I write a function, you know.
Not as nice as notebooks, but it's. It's got something. It's, you know, it's functional at least to. Go ahead. Yeah.
So if I write a definition and then I later on in my code, I call it, yeah, I understand, or something you don't understand because you haven't seen what I'm going to do. I can say, go to definition.
I realize we can do that. Why do you have to say, Doesn't Visual Studio have some keystroke thing for go to definition?
Probably. I don't know. I don't use Visual Studio code. I'm not an ideal demonstrator of its feature. Is it possible to go F12?
Yeah.
Yeah. Okay, fine. Is it possible to get things evaluated here?
Yeah. Does this work in notebooks? Like jupyter notebooks? We'll show you notebooks. You're getting ahead here. We'll show you notebooks in a sec. Okay. This is just a text file, right? I get it.
I understand. Understood. What else is there to see here?
You asked about evaluating code, so I'm using this. You know, I can start a Wolfram script session, okay. Down here in this little window down here. Right. And so I can, you know, I can do computations in here, right?
Yep.
Wait a second. What's. But I can also select something.
Yeah. Okay, I get it.
And say run and run. And it will evaluate it down there.
Show it. Show me.
Okay, if I select this.
No, no, don't select that. Select something. Actually compute something. Just type range. Type in there. Like range 20 or something. Okay, now select that.
I just say run. Selected. Well, it says select. Maybe I have to select the whole thing, right? You have to select the text in active terminal.
Okay, I get it. That's nice.
Okay. Okay, now one. One thing I can do here is I can turn on. Now here's a lint warning, right? So the little red underscore, right? It says duplicate clauses in which I'm going to turn on the Copilot extension now. We didn't do anything to make this work.
Oh, yeah, show me.
GitHub profile.
Just write Copilot there. It will find it.
It's. It's down here. And I have to. Maybe I don't have to reload the window. So the thing about Copilot is that types, it's not. Yeah, you see, you see what it does here?
I know, I know, I know.
Yeah, it puts.
Yes.
Just invents crazy stuff.
Yes, yes, yes, I know, I know. Okay, so what are you doing to show?
Well, what I'm going to show is one thing it does is that with Copilot on, I get this. I hover over this stuff. I get a quick fix.
Okay.
And I can say fix using copilot or explain using Copilot. Explain using Copilot.
What the heck is all. Oh, that stuff at the top is about shortlist. Something different.
Okay, yeah, that's leftover stuff. This is the. This is the latest thing. It prints this nice little blurb. Yeah, it's nice on the left about, you know, and it can explain code as well. It can, yeah. It even gets it right sometimes.
If I say, I understand, I understand. What do you want me to show?
Well, I wanted to show you some more features of Copilot, but if you don't want to see them, that's fine, whatever.
Show them. I mean, are they generic features or are they features specific to the LSP mechanism?
They are features. This has nothing to do with lsd.
But it was not picking up that thing duplicate clauses in which is picking up what in that Copilot thing was it running the which. No, it was picking it up from that, isn't it? Yes, it was picking it up from that tooltip.
Yeah, right. I'm not exactly sure how.
No, that's what it's picking it up from because it's not actually running the code.
Yeah, no, it's definitely. It doesn't run anything picking it up.
From that just as. Just as we do in chat notebooks and so on.
Right. And if I say we don't have to run code here. If I say. And this is just. This is just LSP server. If I say give a usage message like F for F and then I just hover over F, it shows me the usage message without having to evaluate it.
So wait a minute, how was that done? How is that done? That's an LSP server feature.
Yes, LSP server is constantly. Every time I type a key, it's sort of reparsing this File and that's.
A feature of LSP Server, which, because that's sort of universal, the language is that there's some way of giving usage strings for functions. And so we've hooked into that mechanism. So somebody went through and looked at, and I assume that's you, Todd, in the end, looked at, here are all the things that LSP Server lets you do for languages that are quite alien to our language. How can we best map that into stuff in our language? Right.
Yes, yes. I mean, LSP Server, the LSP protocol has a long set of sort of commands, things.
So how many of them have we mapped.
Suman? Do you know that?
Yeah, I think 10, 15 features. I have a list.
No, but I want to know the other way around. Given the things that you can hook into, how many have we hooked into? There may be things that are irrelevant about, you know, object, method, something or others that are not relevant to us. Although we might be able to piggyback on something like that for something that has nothing to do with objects and methods. Am I making sense?
Yeah, yeah.
So, Roman, this is a good thing for you to look at and try and understand what. What aspects. See what I'm saying? Go ahead. Simone, you were going to say.
Yeah, we have already hooked up around 10 features. Okay. And few notebook features as well.
But also that's a lot of them, isn't it, Suman? Let's find out.
Find out.
Yeah.
All right, let's see the bootleg notebooks.
All right, here's their bootleg notebooks. They're quite awkward to use, frankly. I mean, I can't just click and type. I have to do like new cell and then I can start typing. Right.
Type two plus two or something.
Okay, I get typeset output.
Show me something more interesting. Can you do. Okay, just. Just type. I don't know what, you know, factor x to the 100 minus 1.
I just don't like this. Look at this. It's almost right. He's got. It was x to the 2 minus.
But does it do automatic brackets.
When you type?
Does it. Yeah, it did do auto open close, right?
Yeah, yeah, it does print you.
Okay, try, try plot 3D. Sine x times y comma x 0, 3 y 0, whatever you want to buy. Yes.
Yeah, I had these examples here.
It should auto fill this. Everybody does that, Right?
I know you would think it would.
Auto auto fill what the arguments x from 0 to 2 PI just as it did x squared minus 1 before.
We'll fix the graphic size. Yeah, we know. Might be Nice to do that command. I thing with natural language. Oh, yeah. All right. So make a 3D plot of, you know, or. Yeah, yeah, yeah. Okay, let's try that.
Yeah. Okay. I mean, I hope this works.
Yeah.
Please type in star. Don't type the star. Don't type the star. Type it with a no space.
No space, no space.
Let's see what it does. Just for fun.
You're trying to make it hard. All right.
Yeah, I am. Because I know what this can do, and it should be able to do that.
See, it even picked the right limits.
What was that factorial thing that it asked there?
What?
Well, when you. Before you demo, I think it was.
It was just putting garbage. Suggesting garbage code, I think, to the right of the cursor, which is. Which copilot wants to do all the time.
Yeah. All right. Okay, I understand, I understand. Well, it's nice, right?
So we got notebooks, we got. At the moment, Microsoft does not support LSP services in notebook windows. So we can't get, you know, syntax code highlighted. Yeah, well, we get syntax coloring that's. That's provided in a different way.
Yeah, we don't have the help information.
Right. We don't have good stuff. Cool, cool.
What happens? I mean, if I just type in a cell here? Just type input, open, close.
Or you can try to break it. Now, I know. I know what you're saying. I'm sure something terrible is going to happen.
It's just going to hang like it's at home. Okay, whatever.
We have to. We have to work on a couple things.
Well, I'm not sure that's for us. That may not be for us. That may be undoable.
Well, we would make it. We would make it. You know, there's a timeout, an error or something. No.
I don't know how it's hooked up. I mean, could you type? Okay.
Do you want to delete it? I do. It didn't help, but deleted it at least.
Okay, so to type manipulate, I think I have to.
So. So what do I have to do? The kernel's still running. What do I have?
How do I restart the kernel, recover from this?
Just reload the window.
I just have to reload it?
Yeah, Everything is set now. Now do a manipulate.
Oh, manipulates don't work.
Okay, just type slider, open, close. Oh, my. It did something. Yeah, it's just. Who knows? All right, okay, fine. But so the output is a raster, right? It's like an image. Yeah.
This one is.
Can you do a vector? Can you do like an svg. Well, what about the thing up there? The X plus? Go ahead.
This is formatted text. This is not a picture.
Yeah, because basically an SVG is much more scalable. When you resize it, it will be much better. Right. So why aren't we returning an SVG instead of a GIF here?
Yeah, I have some other things also to discuss. So if we have to decide what.
To do here, we should return an SVG.
Okay.
Not a GIF.
Okay.
I mean, check it for 3D graphics and make sure that we don't get some crazy thing going on. And maybe you need to have some calculation of how big it is, I don't know.
Well, what I have seen, like one year or two years ago I was doing some.
Basically plotting all the documentation, see what was the size. And only when you are doing something like a GEO mesh or something like this that there are some features that the SVG doesn't support, then it blows up in size, but for everything else is really fine. So that's the thing where we'll have to have some switch inside this code that decides whether to send an SVG or a gif.
Yeah, we have a settings. We were already editing the settings earlier. We could have a setting for this.
Well, I mean we should have a default. That does the right thing.
Yeah, right.
Okay, this is cool. All right.
All right. So. So, you know, there's the thing about the copilot is that it was all three. Right. We didn't have to do any.
I understand. I know. Yeah. So what's your point?
Just that it's kind of. Although I find it sort of annoying to have the code suggestion, whatever when you're using.
Yes, it works. Cool. I'm not surprised that it works. It should work that. I mean, I have a different question which is about people who want to get Wolom script to. This is running against Wolfram script, right?
No, this is. Well, this, this launches. Does this launch Wolfram script for these notebook evaluations or is this launch of Wolm kernel direct Wolram script.
Notebook evaluation?
Yeah, no, no, for this. The pictures we're seeing here, these are from a Wolfram script engine, correct?
Yeah. Yeah.
Okay, does anybody understand. And this is not for this meeting, but do we understand what the. How this works licensing wise for people?
It just runs a kernel, just like, you know, any desktop kernel.
I understand, but if you're getting this and you're not getting the standard desktop bundle, how do you do that? That's a. That's an issue for Yazabel. And so on. That's not really for this meeting.
Don't confuse. There's two issues here. LSP Server standalone app is a completely separate thing.
I'm aware.
This is just using my local copy of Wolfram Engine or Mathematics.
I understand. I understand. So this is a. This is a question of the. You know, this is a use case where getting Wolfram Engine on its own is already useful. You don't have to have the rest of the bundle.
Exactly.
So that's a thing for Yazabel, not for this meeting to figure out how that works. Because I don't think that's been adequately handled before.
Standalone app. LSP Server standalone app. We were doing the LSP servers. All the supports were by Wolfram Engine itself.
Yeah.
Did we have like a install Wolfram Engine?
Yes, we do.
Yeah.
In Wolfram 1 and so on. We have that. But that's what I'm saying is download.
Yeah.
We have an option to download the Wolfram Engine and install it if you don't have it here.
Okay, but. But that's Yazabel and other people who deal with product deployment need to look at that. Roman, that's something for you or Mirage. Please, please make sure that gets handled. If not for this meeting.
But what's the. What's the issue to resolve?
What's the question how the licensing works if you just get Wolm Engine for this? That's the issue. Please make. Okay, that's the issue.
Do we think that Wolram Engine shouldn't. Do we think it's just not the normal situation with Wolfram Engine?
Maybe it is. I don't know. Somebody should look at it.
But your concern being?
I don't think it's right. Why don't you ask those people to look at it? It's not for this meeting.
I understand it, but I'm not even sure what you want us to resolve with Yezubel. What's not good?
I don't think the flow for people who want to get Wolfram Engine for this is right. Okay. They already have our main technology stack. That's fine. It's the case where they don't have that. Not for this meeting. Let's move on to the next topic, please.
All right. So I have now come to the end of my demo. I just want to point out that I want to compliment the work of Suman and Chris that this was the easy thing to hook up, especially the standalone application.
It's very impressive. It's very impressive.
You got a 70 megabyte download.
It's very impressive.
It's a great advertisement for this functionality.
Yes, I agree. All right, who's sharing next? Are we going back to. Is it Roman who's sharing?
Yes, let me go back.
Okay.
We should change the meeting options so that two people can share and then we can switch more easily.
Okay, next.
Yes, Now. IDE support. I don't know, Suman, whether there's anything left for you to demo or. Probably we have already covered.
I. I have some feature list and which for a very short presentation, I probably it will be helpful.
We want it. You, you. You can show it now or not?
Yeah, yeah, yeah, I can share it. I can show it right now.
Yeah, go ahead.
Yeah, so. So these are the feature list which you support by LSP server. And. And earlier it was two different extensions, but now we have unified it and we have made a single extension, meaning.
That notebook support unified with text editing support.
Okay, but wait a minute. Are you showing. Do you have questions here or do you have something to demo? What are you showing?
Yeah, so, yeah, all these. I don't want to go to.
Okay, show the color picker. Show the color picker.
You can change the color to any color you want from here.
So that color picker works differently from the way it works in a notebook, right?
Yes, you can.
No, I understand, but what you're doing there, I don't know why you're doing it that way. You've got the swatch first and then you've got. Maybe it doesn't work to do this in. In other words, just the swatch would not be sufficient. The swatch is going to be ignored by the parser of VS code, right?
No, I think that's right, Stephen.
Yeah, that's right.
The swatch is just. It's just a decoration thing. We put a decoration. We put in. It doesn't know. It doesn't show.
What would be red for the actual piece of code is the RGB color thing. And that's why this is different from the way that we do it normally in a notebook where you just have the swatch. Right?
Yeah. This watch is not a representation of RGB color. It's just an ornament that we put in to. It's not right.
Let me ask a question here. If I were to put in a special character like an alpha, can I use our escape. A escape mechanism?
Yes. See here?
No, no. Type escape. A escape. I'm sure it doesn't work.
Yeah, I don't think that's going to work. Right.
Oh, no, no, not Escape.
Yeah, that's like a special thing in the front end.
Right? So. So, I mean, one thing we could imagine. I think it's hopeless. I mean, I think it's absolutely hopeless. I think you can only type it in in its full form. Right?
Yeah, it's like this. You have to type.
Yeah, yes, yes, yes, I understand. I understand.
So is this not possible at all or just very difficult?
Maybe, you know, like, for example, I know that in Intellij there is no way to make the multiple click that expands the scope thing because they've already. They already use a different keystroke combination. For that you have to use the keyboard. So maybe there is a way to do something like that, but probably ask is not the way to invoke it. So I just have to figure out which one it is.
But. Well, escape is our mechanism. But we could, if there is a way of, of sort of piping connecting something of theirs, you get what I'm saying, to our escape mechanism. That would be nice. It's not essential. It's just this is, you know, because I'm sure you can type an alpha, for example, using the built in, you know, way on your Windows keyboard or something, to type in alpha. Right?
Sure, I'm sure you can do that. It's just not obvious that it maps that every one of these characters maps exactly to what it maps to.
Well, no, it is obvious because we made it work that way. Everything that's not in private Unicode space will map correctly. Okay. Type X greater than Y.
Oh, we don't. We don't have anything like that.
But the rule character. Okay, fine. All right. If you type, type X, backslash brackets, rule Y, no backslash backslash. The special character bracket.
Then open square.
Bracket, open square bracket, rule with a capital R. Okay, now no, no, no, no. Open bracket, close bracket. It's a special character. No, no, open bracket. Get rid of the open bracket, close bracket. Just rule. Okay, like that.
Okay? Yeah.
Okay, what does this do? Is it confused? Close the bracket.
Using is that. Is the co pilot putting this copilot.
Okay, now see what that does.
It shows us it's an error, but.
It'S not an error, so that's wrong. Do you understand? That's not an error. But that character, the rule character, is in private Unicode space, so there's no way to type it as a piece of Unicode. Okay, Roman, you need to look at this. Okay? You understand the issue, Roman?
Yeah, I mean, we want to support our escape sequences and characters as much as possible.
Well, yes, but forget that this is broken. Right. This will just fail. If you have something in a notebook that says X backslash bracket rule, what, Y, which is completely valid input, it will not work here.
Yes, go ahead and, go ahead and, and evaluate.
We're running out of time and there's more stuff on the agenda, so we're not going to go on with this. Simone, did you have anything else you really want to show?
Just one thing. Let's. I. If we run it, we can, we can get some graphics like that, or I have. We can do it like CDF Play also where it gives us a CDF notebook where it. We can do much better things like this and which should be. We should be able to embed this in there. So finally the. Our project can handle WL files, then IPY notebooks, then our WL notebooks, Wolfram language notebooks, everything together. And also we can.
Wait, wait, wait, wait, wait. You're saying multiple things here. If I have a notebook file, a NB file there, what will happen?
Yeah, dot NB file, we can just open it in Mathematica. But currently. Yeah, no, no, no.
I'm asking about.
We can't. We can't do anything useful than NB file.
Yeah.
But yet you're showing a dot CDF there which you say you might be able to embed in. Do you understand what I'm saying? That was generated. Yes. What's that?
Yeah, that was generated. So instead of producing GIF or svg, you can generate cdf.
I don't know what suman meant when you said the word embed. Suman. I don't understand what you mean by that.
Like, we can, we can produce an GIF or other kinds.
I know we can produce a gif. You said we could produce cdf, which we could then embed. What did you mean by that?
We have discussed earlier that a cloud notebook and then probably the cloud notebooks that output will be showed. Will. Can. Can be showed here, just outside the evaluation cell.
Here, outside or inside. If this is capable of dealing with markdown. Is it. Is it capable of dealing with. For example, you have an iframe. Can you put an iframe in here?
Yes, iframe can. So that.
Okay, so if you put an iframe there, then so long as the security stuff works out, you can put something which is from our cloud in here, right?
Yeah, that's what I meant. Yeah.
Okay. And the JavaScript embedder mechanism might be usable here. Is that true?
I have not looked at it.
But Roman, that's Something for you.
You understand JavaScript Engine?
Yeah.
Right. Roman, you understand that, right? Roman, do you understand that?
No.
Okay. In. Okay. If you have a cloud notebook, there are two methods for embedding that cloud notebook on a website. One is with an iframe, the other is with our notebook embedder library.
Yes.
Okay. I'm saying you should be able to use the notebook embedder library here. Does that make sense? Ricardo or anybody else? Do you want to comment on that?
That seems likely. I think we have a, you know, we have a JavaScript engine in visual Studio code.
And so I think that will work. My guess is that will work. It will take a little bit of plumbing. Right. Okay. Yeah, that's cool.
Okay, so, yeah, that's what. So everything together, it makes a good project. So that's.
No, it's nice. It's very nice. Right. Unsure. Roman, please share.
Okay, let me go ahead. So the next topic was already discussed yesterday.
So we already talked about.
Yes, is all also done last week in that other meeting. So that's really the update so far. The rest is things that are ongoing and there's nothing new and fancy to show.
Okay. Is there anything we need to talk about about parallel tools?
No, there are. I mean, there is. These are the 14.1 roadmap there, which is all ongoing. I've already. I've already implemented this one and that one is on the to do list. And we are talking with sales and marketing about a way to notify users.
Different topic.
Okay.
Okay. Okay, great. Do we get. Yeah, okay, fine. The whole business about the speed of starting parallel kernels. Is there anything new to say about that? I mean, you. You are starting them in parallel, aren't you?
Well, as much as is possible. But really what I think is the best route forward is Colonel forking, because that seems to. I mean, Alpha. Alpha uses it. And so that's something I want to look at. And if we can get that. Because that the main bottleneck is sometimes the remote operating system. When you ask it to launch 64 copies of the same program, it just grinds to hold. And so if you can use kernel forking, that would.
How would that actually work in a. From within a kernel? Would we have a command that means for yes.
So, I mean, I haven't looked at detail, but yes, we do have a.
Command that means for cloud uses that.
And Wolfram Alpha use.
What is it?
So internal create fork kernel internal back to create port.
You know what's funny about this? I could show the SMP documentation from 1981, it had a fork command.
Well, I'm not surprised. No, I mean that, because, I mean, all these kernels are essentially. They have the same configuration, they talk to the same remote endpoint, and so you just launch one and then you just clone it as many times as needed and all the surrounding code.
What does that look like to it within Wolfram language? So let's say we had a function fork, as we did in SMP back in 1981.
Yes. Then it returns twice, once in the parent, and it returns in the forked copy. And in the forked copy, you will have to probably do some cleanup then. I mean, close, close open files that you have, because those would then be shown shared. But the kernel that is used for parallel computing doesn't have any.
Right. But the actual fork function would presumably return a link object of some kind to allow you to talk to that forked kernel. Is that true?
No, it returns. It returns whatever you want it to return. But you could use it to. Typically, if you want to use a link, you would just. The call to fork, kernel, create, fork, kernel takes arguments, you know, something to evaluate in the parent for forking and something to evaluate in the child after forking. And so typically you would. You could do something like dollar PARENT LINK equals, you know, link create or something in the, in the child kernel, and then you would hook up to that.
So how do you get return values into the parent kernel? Can you get return values from the child process into the parent process?
No, they're separate processes. You don't get.
Well, I mean, you could do that if you had some communication link, but.
You wouldn't want that.
Right?
You would. You don't know the child are going to be the same, are going to be. Have the equivalent relationship. In the end, they're all just.
But in the end, you want the parent process, if I understand correctly, to be sending data to the child process and getting data back.
Not in the case of parallel kernels, because they are all completely independent. They all only talk to their master kernel.
Yeah, the master kernel, the kernel is simply set.
It's the simplest case. It's the simplest case.
Right. You set the parent link to the master kernel. Is that correct?
Yes.
And that is the same link for each of these kernels, because it's a listening link and so it accepts.
That's beautiful. Yeah, yeah.
I mean, that is at the moment, I mean, I haven't played with it. I have plenty of things to do, but it's probably the most promising route to speeding it Up.
So, for example, in my case, I have many different machines and I'm starting parallel kernels on all of them.
Yeah.
And so it. Yeah, I mean, it has. I mean, the master kernel itself is sequential, so it has to do an SSH command to the first machine, but it immediately puts an ampersand behind that. Right. And then it does an SSH command to the second machine and so on.
And at the moment when I see them come back, it's first saying launching X number of kernels on machine one, then launching X number of kernels on machine two. Why are machine one and machine.
Yes, at the moment. At the moment. Because the master kernel needs to know which kernel is which, so it has to wait for the first set. And. Yes, I understand that. And that is there is code in place too. The idea is that I will give a command line argument to each kernel and so that it will send that command line argument back and so I can find out which one it is. Even though they will come back on the same link.
Right. Sounds reasonable to me. I look forward to that. That would be very useful.
Forking. Forking should be orders of magnitude faster than.
And rather easy to try to implement, right?
Yeah, I mean, probably easier than I thought so far, but yes, seems like worthwhile thing to do.
Definitely. Just try it. Maybe we can get it.
And Roman, if you want. You know, I know that I wrote that function, so.
Yes, you know more about this than.
Anybody, so I'm happy to show you how to use it. It's super simple to use.
Okay, very good. Let's do that.
Okay, thanks a lot, guys. And yeah, I don't think these. We. We traditionally have not live streamed these. This series of meetings because we have.
We started doing it in the fall. In the fall, we started doing this.
Okay, okay, okay, fine. But so it's not new. I'm sorry, I thought I was.
It's not new. We've had about seven or eight probably of these live streamed.
Okay.
Something like that.
Okay, fine. All right, thanks a lot, guys. Good stuff and very nice. The standalone kernels. Standalone. Well, standalone engine stuff is wonderful.
And look for an LSP server download coming soon.
Yes, yes. And hopefully many customers who will be able to make use of this. That's great. All right, thanks a lot, guys. See you all 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






