Live CEOing Ep 766: Language Design in the Wolfram Language [Binomial, 1-Arg Monitor, and More]

Transcript of a Wolfram Language design review (Live CEOing Ep 766) led by Stephen Wolfram. Major items: - One-argument Monitor: discussion of behavior (tight wrapping around the direct function), failure handling (return unevaluated expression vs. failure object), tagging failures (e.g., MonitorFailure), display text choices, performance concerns when mapping over large lists, granularity of progress reporting (percentage vs. per-element), scoping (lexical vs. dynamic), and a helper to register additional functions for one-arg Monitor. - Binomial function: debate over behavior for negative integer arguments. Historical change caused user complaints; options discussed include restoring the older behavior (zeros in certain negative-integer cases), introducing a symmetric Binomial function, preserving Pascal's identity, and maintaining a system option for legacy behavior. Q-Binomial consistency and related functions (Pochhammer/falling/rising factorials) should be checked. - Other items: letter/character counts for lists of strings (proposed listable behavior returning list of associations and merge/total semantics), and naming discussion for a function that supplies held arguments (held-applied as a candidate name). Speakers include Stephen Wolfram, Giulio, and several other contributors (labelled in transcript as Speaker B, C, E, etc.).
Chapters
Okay. Hi, everyone. Welcome to another Wolfram Language design review, part of our Language Completeness and Consistency series. And we're going to start on item two here because we're still waiting for some people for item one. Okay, one argument form of monitor. A really useful thing. So this is basically monitor of map and things like that, right?
Correct.
Let's take a look here. Oh, that's really useful. Super, super duper useful. I'm not sure I totally like the display there, but. But this is super useful. Okay, so now what's the issue with this?
So, so, I mean, there's one real issue and one just review of the, you know, of the design.
So I have. I have a question. How deep does it go? So I assume that the monitor only looks at the function it is directly wrapped around. Is that correct?
Correct.
That's tight wrapping point.
That's the typewriter wrapping section. And that was the original spec you gave us, and that's what we've implemented. So.
But I think it makes sense. Yeah, I think this is fine. This is absolutely.
Double check.
Yeah, I think that's a. Okay. I think that's the only reasonable way. In other words, monitor is kind of like an adverb of the. Of the action. It's kind of like, do it. I mean, you know, the alternative, which I don't like as much, is a wrapper monitored. In other words, something like this where we say, you know, monitored table, blah, blah, blah. But I mean. And conceivably that's an alternative form that we could have. But I like the. Putting the monitor around there just like we put an echo around there. I like it much better.
Okay.
I mean, like, in other words, if we put an echo around this whole thing. Well, no, it's a different thing because it's. Because that. Because the, the return value is sort of the global thing for all of it. Okay, next up. What. What are the issues here?
So the, the main issue is what to do.
So I'm sorry, you cut out for a second. The main issue is what.
What to do in the failure case. So normally monitor just evaporates away. But if we did that in the error case, then we would evaluate the input twice and, you know, get all the side effects twice and doubled messages. So.
Not right away.
And their possibility is.
I'm sorry, I didn't hear that. You kept cutting out here. So it says it again.
So one possibility.
Evaluated completely with, you know, monitor still stuck there, or to return a failure object, and we've implemented both for you to sort of okay.
What is the cause of the failure? What's the cause of a failure?
So in this, in this case, you gave invalid. Right. You gave invalid limits.
Right.
You gave list times G as the iterator and. Right. Table would not.
I see, so table barfed.
Right.
Gave an invalid table.
Well, what does the table itself return? It returns unevaluated, right?
Correct.
So I think the monitor should just return around it and it's still unevaluated.
Yeah, I think that. Sorry, you were cutting out a bit. The thing is that typically monitor adds something on the side and then just runs the code as you give it. So in this case you would just give the unevaluated table. But in this case we need to do some code transformation to actually do the monitoring. So this is a different return. If you monitor with two arguments, you would get an evaluated table, not an evaluated monitor, but with the automatic one, we cannot return an evaluated table because we have modified that and returning table.
I don't understand. I don't understand. I understand. You've modified the code, but the code fails. You determine that the table didn't manage to tabulate itself, so to speak.
Exactly.
Okay. You've presumably stored what the code was before you started doing it.
Yes.
And you see.
Yeah. Is there. Is that table?
Right.
But if we did that, then it would evaluate then a second time outside the monitor. So you'd get doubled messages, doubled side effects.
And, and I'm sorry, why? Why? Why?
Because we didn't really evaluate table. We evaluate the modified version with the progress monitoring. So that expression was never flagged as evaluated.
Well, it's not just that. Right?
It's that the.
We, we, we. We tried to evaluate the thing and then we're like, oh, we're in trouble, we can't do this. And if we then return the table. Right. Then the function has returned. Right. Has evaluated non trivially. So infinite evaluation takes over and.
Well, okay, so the statement Giulio made, namely the table that is returned here, is not flagged as having been evaluated because it has been reconstituted. Therefore it will be evaluated again. Right. I mean, if monitor in this situation didn't evaluate its argument for some reason. Yes. Yeah, that's a mess. Okay, hold on, let me think about this for a second. I mean, the situation is something has gone very wrong and most of the time this is going to be code where you're just going to rerun the code. The return value of the code is largely irrelevant. See, I'm worried about, about. Okay, I mean, I think if people are using the confirming close framework and things like that. Properly, then the generation of a failure object is not so terrible. In other words. Do you understand what I'm saying? What I'm saying is this isn't a thing which is going to evaluate to itself and treat it as an object. This is very much a piece of code. And the piece of code, you don't usually look at the return value of the code. Am I making sense?
I'm sorry? At least for me, you cut in and out a bit. So I didn't quite get.
Can you maybe. Could you maybe dial in your audio some. Some other way so that we can.
I can try. Okay.
And I assume somebody communicated with sysadmin that there's some problem, right? Did somebody do that, please? Hello? I can do that because I can complain for myself too. Okay. Do we have a project manager here? Who is it? Yes, Addison. Okay, so why doesn't Jeremy go and do make the complaint just so we make sure somebody knows this is a problem. Okay. All right. So did you understand what I said? Do I have to repeat what I said?
Welcome, Zoom. Enter your meeting.
What are you doing? Followed by £ hey, hey, hey, hey. Mute that. Okay.
No, man. I see your point, Stephen. Like, we. I mean, we have been pushing failure a lot with the. The whole confirm and closed system. Yes, People are now more comfortable with failure.
But the point that I'm making, if this is going to be used, if monitor is going to be used primarily in code, right?
Yeah. I mean, you could also interactively thinking about it, do monitor or like around something like you do input form or something like that in some interactive way.
I don't like this very much.
So I. You know, I was switching to phone audio to hopefully improve my situation, but obviously I didn't hear some segment of.
Sounds terrible. You might want to use some microphone configuration that's different, but at least we can hear you.
Okay, so you sound like you're in a cave. Okay. I will try to find a different headset, but in a minute.
I don't think your headset is connected. I think you're not going through. Your headset sounds like the speakerphone. Just make sure the headset is actually being used.
Okay.
The.
Come on.
I'm just saying that this is where we got stuck. We don't like that.
Could you try to get your audio so that we can actually hear you properly?
How's this? No.
Yeah. At least low noise. It's. It's very quiet, but it's low noise. Okay.
Is there some.
No, no, now we can hear you. I mean, you speak loudly, so it's okay.
Okay.
Okay. So, yes, you got stuck here because. So what would we like it to do? Okay, so let's imagine what other examples are there? Let's try something here. So let's say it's table wz. Okay, that's going to give an error, right? So now we say slash, slash, input form. Well, slash, slash. I don't know what we. Some other form, slash, slash, framed. Okay. I mean, that's the best thing is that it just returns unevaluated with the monitor wrapped around it. So, and the issue is that because this is code, I mean, this may need internal code that just, you know, tags it somehow so that this doesn't fail again. You see what I'm saying? I think this is the desirable outcome. And in terms of testing this out, we could test it out with double error messages and things like that, if necessary. But I mean, the other possibility.
I.
Mean, there is a case, isn't there, where we wrap a hold when something went horribly wrong?
I think the only example I can think of is the recursion limit, iteration limit.
Oh, yeah, yeah, right.
Which we've now stopped doing. Right?
Right. Well, we now do terminated valuation.
Right.
I don't like this so much because I think this is. Let's see. Let me argue this again. Let me argue against myself for a second. The point is that like echo monitor will evaporate if it did its job. Correct?
Correct.
So the argument is if it didn't do its job, you might as well feed a failure object in because it's. Because it's blown up anyway. I mean, even if what you returned was monitor of table, you'd still have something that your outer code was going to choke on. Am I making sense? Did you understand what I said?
Yes. Right. I mean, basically this is, you know, basically this is the case where you gave something where the thing you gave it can't actually evaluate. So, you know, we could try to return that unevaluated thing, but again, you know, we'd have to solve the timestamp problem. Or we could just return a failure object saying, well, you did something we don't know.
I think that's the right thing to do. I think this is ridiculously wordy, I think, because I think we should just say, I mean, do we know it's just unmonitorable or do we know that it's a.
Well, we know.
Okay, why don't we say monitored? Look, why don't we say monitored? Evaluation failed for Blah, blah, blah. See the word? I think that would be monitored evaluation failed for blah. I don't really like that tag. Why do we need that tag? Do we have to have that tag? Can we have a custom failure object or do we not want to do that?
No, we can. We can put whatever we want there.
All failure objects have a tag, right?
Oh, yeah. But do they display it? Do they always display it like this?
I.
Let me. I think so. I think so. That's kind of like the message name, basically.
Okay.
Well, yeah, so sometimes they're, you know, more.
What is in like, you know, what does inv.
Yeah. Invalid this. This process. I'm looking. The interpreter says interpretation failure. I could like camel case. I could say monitor failure.
Where? Up here as a tag.
If you look at the page for failure, the first example you see is interpreter and is interpretation failure.
For interpreter.
You said normally the tags are more camel cased. I didn't notice this or I would have commented on it. But yeah, if, you know.
You see failure, interpretation failure, I could say monitoring failure.
Right. You know, right. It can. For interpreter, it can be like interpretation failure, restriction failure.
Then why don't we do this? Why don't we just say message and then just give. See, I'm worried that these expressions are going to be long and things like that.
Makes sense. Yep.
So we could just say message and then table blah, blah, blah, tag, monitor failure. Now, do we have to give the function name here because interpreter isn't giving the function name there.
No, no, we don't. I typically add the function name when I produce custom failures for like.
So let's not do it here tracking it.
But if you say monitor failure, it's clear.
Right? Right. I mean the only. Right. The only other thing we could do is if we had both the function and then we could have the expression wrapped in hold as another thing and then it would be beneath the plus sign. Right. He added exactly one thing beyond the tag, which is why it's showing all three. If he added two or more things, then there would be. Right. Would only show the message and the tag and everything else would be.
So I assume that this gets shortened if this thing is mega long. Right?
Yeah. There are ways to shorten it. Yes.
We can shallow it. Yes.
I reckon we should just put the expression here and then say tag monitor failure.
And that's the message is just the expression no text.
That's what I'm saying. Just like enter a valid number is not a message that. You see what I'm saying? That That's a. Just the message is just the expression.
Okay.
I don't understand that at all. I mean. Right, well, and there. A valid number is. Is. Right. So. Right. That has. Now it's telling you something about the input, but it's not the.
All right, okay, listen. We could say evaluation failed. 4. See what I'm saying? Because that's what. That's what really happened. Right. Evaluation failed for. And then monitor failure. Okay. Place. Okay. All right. Okay. So this is wonderful. Let's look at which functions it covers so far.
And we know that there are a few more that we can easily add.
I think I forgot about cool map. But yeah, there's.
Wow. We gotta do better than this.
Well, right. I mean, normally. Right. Map itself is, you know, is not the slow thing. It's the evaluation after the map that's slow. Right. Because map just the function. And so if you have a fast, quickly evaluating function, then, you know, adding all these extra evaluations to create pretty boxes.
Okay, I got a question. I got a question. Monitor, presumably. Map. Presumably knows how big the thing it's mapping over is, correct?
Not really.
Well, yes, it does. By the time MAP is running, it knows this thing is a length 2 million list.
Well, in the case where it's. And you know. Well, if it's big, no list. Sure. In the K. In the case where it's a flat list. Sure. But, you know, you're mapping, you know.
Over a complicated expression at level infinity, then it doesn't know. Right, Right. Okay. In the flat list case, let me make a comment. You're wrapping things around those elements to, you know, record monitors, right? That's how you're doing it. Presumably you're sowing something or something like that from different elements to, say, update the monitor. Correct?
Yeah, I'm just injecting an expression that grows at every step.
Well, I understand, but. So what I'm going to suggest is this. If you see you've got a list of length 2 million, don't spray it at every point. You don't need to. Nobody cares about whether it's the 100,200, you know, whatever it is, you go.
But this, I'm not sure that this will help you because the thing is, the auto compilation will still be broken because I have to put like, I don't know if the auto completion. Can it deal with an if? For example, I have to do some.
Let's find out. Let's find out. Ask the people involved in autocompilation. Right. Because what I'm suggesting is if in fact the evaluation of the monitor thrower is slow by the time you've got 2 million elements in the list you're mapping over. You don't need to put, you know, you don't need to wrap the monitor thrower around every element. You don't need.
No, exactly. You don't need that level of granularity. If you're mapping over two medium elements, ideally the function is going to be quite fast.
Well, yeah, but I mean, in particular, I think 1%, you know, if you know completion levels to 1%, you're in good shape. See what I'm saying? Now that means that if you do that, if you spray like that, you do not want to report element 100 out of 2 million, element 200 out of 2 million. You want to report 1%, 2%, whatever, so nobody can look. Because if it turned out one of those elements was a killer. You see what I'm saying? We're not going to know. Do you understand what I'm saying? So if it says 3% and it freezes at 3%, you have some idea what happened, but you don't want to fake it and freeze at 200 or so, 300 or whatever it is. Make sense? Yeah, yep.
And I have to check because I'm not actually using map to do this. I'm using mapindex set because Map mapindex that tracks the.
All right. Okay, okay, okay. You've got.
I hope that MapIndex has the same level of optimization as.
You know what, you got to go check that. You got to go work with people who are involved in that, Tom, whoever it is, and make sure it works. But let's get this one argument monitor into the system because I think it's super useful.
Okay.
Okay. So one consideration, I refactored the code recently to basically have a helper and implement the addition of every function using this helper. Can I put.
Are you asking me an implementation detail?
No, wait a second, let me finish. So this helper basically allows you to add more functions that will basically work with one argument monitor. Can I release to the function repository?
Yes. Okay, good idea.
This way you can, you know, extend the framework as. As you please.
Yeah, I mean, I think we should do. I don't think anybody should need to use it.
Right. Well, obviously internal people will just do it directly with the low level stuff that.
Yeah, this is useful.
And also users might want to.
I like that. That's a really good point. That's a really good point. Yes. Now the tight wrapping business, one Day. We should not need that one day. What should happen is you say monitor for the whole thing and then it should sort of flash up monitoring this, monitoring that, monitoring the other thing. You see what I'm saying?
So you'd get like a sequence of. Yes, and I mean a sequence in time of panels for each expression.
Yes.
This is a nested problem in general. Yeah. I could have a table with inside the nest and this would fire to monitoring things at the same time.
This is wrong. Where the hell did you get those words from? Where's the word iterating coming from?
Wait a second. Can you evaluate? I thought I fixed most of those. Now it should. Can you do with map? I had custom words, but now I think I replace them with like just monitoring this or that. What is map saying? The other example.
Oh, yeah. Okay.
But directly below, it's asking you to evaluate the input. Directly below.
Yeah, I don't like that. I don't like that. That's not what it said. It not. Didn't say map space, paren, pause.
Okay, let's decide on something.
Yeah, I know, I know, I know, I know, I know. I think it should just say evaluating and then brackets, map of this comma, probably. Do you understand what I'm saying? Do I need to write it out right?
No, no.
And obviously the function will need to be shortened in case somebody decides to write a five paragraph pure function in the first argument.
Yeah, that's what I would do there. And then I would say this is wrong. That's not right. That doesn't make sense. Processing 8. What do we do for other cases? Because this is. It's not processing 8 of 20 elements because that suggests it's doing all of those. It's done eight. It's got more to go. Right. Or it's doing the eighth one.
No, it says processing 1, 2, 3, 4 up to 20.
No, no, no, no, no, no. I understand, but it should say processing element 8 of 20, if that's what it means.
Okay.
Am I making sense? Yeah, see, processing 8 of 20 means it's doing 8 altogether out of 20, which is wrong.
You're dealing with a non native English speaker. Be kind.
Sorry. Julio is so good in his English that I figure he knows it perfectly.
Thank you, Stephen. No, but no rereading this. It makes sense. Yeah. Should be processing element 8 out of 20.
Yeah, yeah. I just wasn't reading these carefully enough because I was so wowed by the panels themselves. I forgot to actually read the text carefully. So I'll take some ownership Too.
Okay. All right. Okay.
This, by the way, this looks at the whole expression. So if you have like a nested in like a random real 3, 4, 5, 6, and you map at the final level, it will tell you the product of all those dimensions.
Fine.
I assume that's fine. Yeah. Because it's counting the exact amount of. And depends on it takes into account the level. So if you map at every level is the sum of all the products at every level. Yeah.
This thing is so wonderful that the fact that it isn't perfect yet is okay. I mean, I think we just have to start using it, but make sure the speed problem is solved. And I do think going to something that isn't tight wrapping in the end is important.
Okay, then I have a question for that that I have here. Like literal or dynamic scoping for the monitoring. Like, do we. Do you know, if you have table of nest literally in the monitor, we. We monitor both. But if you have monitor. Monitor of like function and function inside is calling other things. Do we still propagate it or.
No, I understand you're asking is it dynamic or lexical? Exactly.
Modular block.
I think block will be the best case. I think.
No, then I have to study.
Well, I mean, we could start off with the first one. I don't know. I don't know what it's going to feel like. See what I'm saying?
Yeah.
I kind of feel like what we want is you say, I've got this operation. The one issue there is, let's say you monitor something and it goes into internal code of hours and it's monitoring some totally random weird thing inside. And it's incomprehensible to people. Right. Because it says, you know, evaluating, fold, pair, list of whatever. And it's like, I don't have a full pair list. What the heck is talking about?
I could respect the reproducted.
Yes, I. You should. But I mean, I think that's. You should anyway. But I think that may not be enough. And I think it may be less confusing to do it lexically.
Okay. It's also easier. So I'll start with the lexical implementation.
Let's start with that.
Take a look and see if we like it or not. Maybe we don't like it. Maybe we do. Let's see.
Okay. All right.
That's everything in this section. So. So we can talk about.
Okay. All right. Are you. Are you. You're staying in this form of audio? That's fine. Right. Let's tackle binomial. You know what Is that chap name Moriarty or something, who was the person with the treatise on the binomial theorem? Professor Moriarty, Is that right? In the Sherlock Holmes books?
I believe so, yes.
Okay, well, we've been sent many treatises on the binomial theorem here, so.
Right. So basically, so if you want the history of sort of why things changed, then.
Well, let's just talk about what the main issue is. The main issue is binomials of negative numbers. Negative integers changed at some point and we've got users who are up in arms about it.
Right?
Yes, yes. Why did it change?
Right.
Was it just a mistake or is it.
No, not really.
Well, it's, it's sort. Well, I think it was a wrong decision, but I agree. Just a simple mistake.
It was a wrong decision. We should just fix it.
Yeah, it was a wrong decision, but.
Well, can we, can Steven, you know, I, I, I actually put some thoughts, so can I actually present. Yes, please tell you what the issues are?
It's I speech. Yes.
So, right, so basically this started with so you know, binomial of N, N auto evaluates to one, which is sort of, you know, you know, combinatorics or if you just look at the natural definition over the complexes, you know, it's one everywhere except where we have poles, that is negative integers.
Yes.
And so we used to give zero, which was probably the correct decision, but zero for what? So I'm sorry, for binomial of minus, you know, minus k, minus minus N, minus N, where n is a positive integer. So binomial of minus 1 minus 1 would give 0, binomial of minus 2, minus 2 would give 0, etc.
And then we tried to do some as a continuation and that was a stupid idea.
No, okay, that is not what happened. So, okay, binomial. So then Bill Gosper complained. Well, binomial of nn is 1, but binomial of minus 1 minus 1 is 0. So you're inconsistent. And, and you know, I think what he was saying was that, you know, binomial of N comma N shouldn't auto evaluate. And you know, Sasha. Well, I mean, I think the Sasha did try this. It broke all sorts of things. And so Sasha came up with this symmetric definition which preserves that identity there sort of in the middle of the screen.
Which identity? This identity here?
No, so if you scroll down to the full simplify, then that identity is preserved everywhere in the complex plane.
So I'm not seeing a full simplified which, which full simplify.
Like after the third bullet point in that Section that might in traditional form. Yeah. So next.
Oh, there, I see.
So that identity is preserved everywhere in the complex place plane, which means we can auto evaluate and.
Yeah, but does that give the correct answer for binomial? Minus 1, minus 1.
So you could argue what the correct answer is.
Right.
So really we made up some way of avoiding the problem of having binomial of NN evaluate. So this is again the standard problem of generic versus, you know, if I say n divided by n, we say it's one, even though. Exactly, exactly.
Right. Which is sort of, sort of my position. It's like, yeah, the binomial. This inconsistency is like saying, well, X over X shouldn't auto evaluate to one. Well, and that does cause the occasional problem, but, you know, you gain so much from that that the people who need to worry about that case just need to be made to worry about that case. And so. Right. And basically the. And bank Knuth's biggest complaint, which I think is correct, is the. If you scroll down to the asymmetric definition, then, you know, defining it to be one instead of zero, which, you know, is consistent with various other ways of looking at the problem. But it violates the Pascal identity. That's the second equation in the asymmetric question. Right. If you plug in n equals 0 and k equals 0 into Pascal's identity, then you get that binomial of minus.
1 minus 10 isn't the obvious suggestion binomial of nn is 1, but binomial of specific integer minus 1 minus 1 is 0.
Yes, correct. And that's basically at the end of the treaties that, that was going to be my end of vendor's recommendation. Possibly we preserve a system option for Bill Gosper so that he can turn off the auto evaluation and be happy. So the way, the way it's currently implemented in the prototype build, all that auto evaluation is turned off. So when we turn it back on, we can leave a system option for, you know, Bill Gosper to turn on if he really cares. But basically we think the most useful thing is we want the generic evaluation. But specific guys give the thing that preserves. I will point out that what Sasha did does preserve Pascal's identity everywhere except 00. So it's not like he did something completely crazy, but it does obviously rankle certain people and, you know, given, given seems unnecessary. Yes.
It seems useful that Pascal's triangle, if you continue Pascal's triangle outside of the region where the triangle is, you know, the coordinates of the triangle that it gives zero, which is what this.
Would mean, it gives. It gives 0 to the top left. It does not give 0 to the top right, which is what you want, if you want. I actually have that in my little section about a note on Pascal's triangle. So what Sasha's definition did is give an alternating binomial theorem to the top left, whereas the old definition gives zeros to the top left, but the top right continues to extend, which is what you want for binomial series. You know, I think that Don, Don is overstating the case a little bit. I, I mean, I agree that it's wrong, but it's. He's overstating the case a bit about how wrong it is because, you know, what people really care about is the top right, where you go to binomial series. And very few people care about the top left where nobody really does anything.
But does anybody know whether. Did Don's books assume this? Do we know? Has he made this assumption for like, you know, 50 years or something of what. What happens for native binomials? And if so, why did he make that assumption? Anybody know?
I. I believe.
Or has it never shown up in his books?
I think we could look in concrete mathematics.
Yes.
Yeah, that's most likely. Yes.
The textbook.
Yeah.
I mean, really, the primary definition only defines it for the triangle, so to speak.
Yeah, I know everything else, but everything. But I don't know what kind of combinatorial identities are. Nicely. This is what I'm a little bit concerned about, that we should just check that, you know, the zero definition sort of. If it beautifully sort of aligns with combinatorial definitions, great. If it's like, oh, well, whoops, whatever. It's a little bit more questionable, but I agree. Look, Sasha's custom definition does not seem like something. It doesn't seem like the right idea. I mean, he was trying to extend it, you know, had a clever solution for extending it.
Right. He was trying to find perfect consistency between generic evaluation and numerical evaluation, which.
I don't think is going to work. I mean, here's a question that I have. How many other cases do we have where a generic simplification is violated by specific cases? Do we have any idea in the special function or in the discrete math domain, how many other situations we have like that?
We don't know. But here's an example of something. So when we did the discrete calculus project, one reason to do that was that Victor returned these hypergeometrics that were completely undefined at the integer points where you actually wanted to evaluate it. They all blew up. I mean, they typically blew up to what I'm saying. It wasn't generically wrong.
It was just wrong at every point you cared about.
Yes, yes, exactly.
That's funny.
That is kind of funny.
Okay, well, how many more of those? I mean, so that's a gamma function type thing.
And yes, he is assuming this. And in right. He says explicitly that symmetry fails for negative integers, and we want zeros in on pages 156 and 157 of Concrete Mathematics.
So. So there is a certain argument that we should have a function symmetric binomial that does the symmetric definition.
So I, you know, one of the ideas. I don't know, I think I presented it last time or. Or we talked about it, is to have like a Knuth binomial.
Well, wait a minute, wait a minute. That's the case that. That's the generic case. The case that Don doesn't want is the symmetric binomial. Right, right, right, right. But.
But since we don't have that now. Right, so we want to reintroduce the Knuth binomial.
No, we don't want to do that. Don't want to do that. We want to change our generic binomial. But I think in the general principle that things are named after people they shouldn't be named after, maybe we should name the definition that Don says Knuth.
Also has an opinion. So Knuth changed the sign of, I think sterling s1, you know, because he has a different combinatorial definition, whereas the Sterling numbers are, you know, these alternating. And he has a different definition.
Which we don't have. Is that correct?
Which we don't have.
Okay, well, maybe it's the Knuth Sterling, but that's a battle for another day.
Okay.
I think symmetric binomial makes sense as.
A system level function.
Yeah, I think it's a little bit pedantic, but I think it's useful. Okay, anybody else want to comment on that?
Yeah, but. So we are.
So we just need a plan for 14.1. The plan for 14.1 is we're changing binomial. Yes, exactly. Once we agree on that, the symmetric binomial is definitely a good idea. Yes. Okay, fine. So there's a bunch of stuff.
Cleanup work for us to do because our.
Yeah.
Discrete calculus stuff will return. It relies on this definition.
Well, if we don't touch the generic case. And we are fine. If we touch the generic case. Yes. There'll be a lot of breakage. So question. Do we not touch it? I told you binomial of N comma n returns 1.
Great.
Then we are fine. That's it. But binomial of minus 1 minus 1, like x x doesn't do the same thing as the generic case. Perfect. That's all I want. Yeah. Okay. But then symmetric binomial is the thing that Correctly, you know, that, that, that has the definition where it will return. What is it returning for? For the. For the negative integers, it would return.
One rather than zero.
Yes. Okay. And let me just check one other thing. Q binomial, I think, is consistent with the new definition of binomial. Is that correct? When Q binomial degenerates to binomial, it's now agreeing with binomial, which it wasn't before.
That is correct.
I didn't even think of that. I should have thought of that. Yeah, that's important, right?
That is something Ian and I checked.
Okay, good, good.
So what about things like Poc Hammer and so on? I don't know what other things there are in the constellation around binomial and whether they're consistent.
Well, there's factorial power and pockhammer.
Right. Well, we should just check whether those in that, in some generic case, should they simplify to binomial or symmetric binomial? I don't know. Or maybe they don't simplify to binomial.
They don't auto simplify. I mean, maybe we can think about the function expand rules.
Okay. Yes. Okay. Well, we should check. Yeah. Right.
Okay.
Okay, let's make this change. I mean, that, that was. We should have done this a bit earlier. I mean, I, I thanks to our vocal users for having vociferously complained because.
So apparently Chat GPT told KN that binomial is not defined outside of the triangle, which I think is sort of correct.
Right. And it also said that Mathematica gives zero, which used to be true, but does. What was it? And will be true again, but wasn't at the time that Chat GPT made the assertion.
Well, okay, but that's, you know, if you. What was it? It was. I mean, these people who, who quote things to me when saying Chat GPT says xyz like this is true. It's just. Yeah, yeah.
No, no, no, no.
But people do that. Seriously.
I know.
That's the shocking thing. Yeah, it's. Well, okay.
You did hear the case about those lawyers who.
I did.
Oh, yeah.
I did, yes. All right. Okay. So are we, we done with this item?
Yep.
Okay, good stuff. Send out a message when. When it's. When it's handled. Okay, let's. Let's try and quickly get through the other items in this agenda. People who are here only for binomial can drop, as I believe, what happened to whatever happened to Professor Moriarty in the end?
I don't know. I mean, right, he pushed, he pushed Holmes off the cliff, but then magically came back. So at some later point, and I don't know whatever happened to Moriarty after that point.
Okay, okay. Does anybody know if there's any particular content assigned to his treatise on the binomial theorem? It would be interesting if he had a discussion of negative binomials. Anyway, no matter. Thank you, Steven. Okay, Seal. Okay, let's come to this. Letter counts, right?
You sent an email saying, why doesn't this work? And I pointed out, well, I can think of at least two obvious definitions for what this works means. And so I'm not entirely convinced we should adopt either one. But if we do, we should adopt.
Okay, so, so the issue is letter counts not of a single string, but of a list of strings, correct? What did I think it should do? Or did I not even say?
You just had a screenshot of it not working and the subject line, why doesn't this work? And I was like, well, which of these do you mean? And you didn't reply.
I admit that it's not obvious and that the translation between these is messy because I don't think I can just take this. If I say here, you know, apply plus to this, It's going to fail, right? How do I do that? In fact, is there a way to do that where it assumes. Makes an assumption of zero for the things that don't correspond? We should have that. It's a useful function.
I think you might need to use query or something with, you know, join, something like that.
I'm sorry, might do something like that. But it's not like simple usage. This seems useful to me.
Okay, well, we can think about it.
It's kind of like an association apply, Right? It's probably going to be plus is probably going to be the most common thing there. But it's an association apply where probably by default the. This thing, that function of no arguments, maybe, maybe that's silly, is the default case. Because the thing being omitted. If, well, the function isn't flat, all bets are off. But if the function is flat.
Right? And certainly if it's one identity, then, you know, there's, there's, you know, some, there's some default value, right? For times it would be one, etc.
Exactly right. Maybe I'm misunderstanding what you're trying to do, but if you do a merge of that list of association and the.
Second argument is plus, does that work?
Oh, let's find out. And am I misunderstanding what you want to do? No, I want to add this up, assuming 0 for the. No, that didn't work. I want to do this where maybe there's an additional plus argument.
You want total, not plus.
Yeah.
Oh, right. Because it'll feed it as a list. All the elements as a list.
Well, that's reasonable. What that did. I think that's reasonable. Let's put it as an example in the lettercounts documentation and be done with it for the time being.
Okay.
And make sure that. I mean, see whether we can make sure that the keywords for merge say things like adding associations and things. Making sense. That is nice. I'm sorry, say that again. Operator of that. So you can do merge of total and apply that to the list of.
Associations, which I think looks even nicer.
That's beautiful. I mean, if it works. Let's take a look. Magnificent. Couldn't be better. Right, Fine. Document and move on.
All right, I'm going to suggest we postpone. This is a naming. This is a naming discussion. So it won't be.
Well, let's just see if it's okay. What was. Somebody said, do you want. Do you want letter counts of a list of strings to give a list of associations? Did we actually answer that? I think that would be desirable.
Is that what character counts Currently does. So one of these functions, it's not documented, but it actually does this, at least for class. Yeah. So we could make. It's not documented, but apparently it does this. So we could make word counts and letter counts consistent with this behavior. And then actually document meant.
It seems reasonable to me, make them essentially listable.
Okay.
And should they.
Should they be truly listable, like arbitrarily nested or. I don't see why we don't just make them listable. Yep.
Are they. If they're.
They may have multiple arguments and things, but they should be listable on their first argument, I think.
Okay.
Okay.
Right. This is a function we've discussed before, and we didn't come up with a name. And.
Well, let's just give it one second here to come up with a name. And, you know, sometimes there's brilliant strikes quickly and sometimes it's okay, so.
Right. So this is the thing that basically is a head wrapper to feed the arguments. Unevaluated.
I mean, I think that makes more sense than held arguments. Arguments held as a kind of a passive thing, like.
Well, yeah, I, I guess. Well, I mean, I, I, I, I agree that held is better than hold, but I personally would prefer held arguments of.
I don't think that's the right thing. I think it's, I think it's passive voice. It's like, you know, reversed of something. Right. I mean, it's, it's like. Sorry, reverse applied. That will be a, you know, reverse applied fyx. Right. So this is.
I see. Right. But it, but there the, the thing. Yeah, right. Held applied might would work or applied held. Right, but the re, the thing that the, the active thing comes first in the reverse applied. Right, so the, it should be held applied because that's the, the.
I see. Held applied is not the worst thing in the world because it goes along with reverse supplied.
Okay, I, I'm, I'm certainly, I mean, like I said, this is not quite ready to be evaluated because we're, we're.
And especially not because it holds its arguments when it evaluates anyway, never mind evaluated in multiple sense senses.
Yes, but yes, I'm certainly okay with held applied as a name until, you know, we review it for real and.
Then to hold a space for the function. But okay, yes, we're punning too badly today. Seems good to me. All right. Did we get through the agenda?
We did get through the agenda. Very surprisingly excellent.
Good work, everybody.
And just about an hour, so.
Yeah, right.
Good timing.
Okay. 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






