With New User-Defined Functions, Microsoft Excel is Now Turing Complete (visualstudiomagazine.com) 109
Visual Studio Magazine reports:
Microsoft, which calls its Excel spreadsheet a programming language, reports that an effort called LAMBDA to make it even more of a programming language is paying off, recently being deemed Turing complete. Being Turing complete is the litmus test of a full-fledged programming language, marking the ability to imitate a Turing machine. According to one definition, that means, "A programming language is Turing complete if you can implement any possible algorithm with it."
And that's exactly what LAMBDA can now do. "You can now, in principle, write any computation in the Excel formula language," said Microsoft researchers in a Jan. 25 blog post.
To get there, researchers at the Calc Intelligence project addressed two shortcomings to the LAMBDA project, which is conducted in coordination with the Excel team and which was first announced early last month. They are:
- The Excel formula language supported only scalar values like numbers, strings and Booleans
- It didn't let users define new functions....
"Moreover, even if it takes greater skill and knowledge to author a lambda, it takes no extra skill to call it," researchers said. "LAMBDA allows skilled authors to extend Excel with application-domain-specific functions that appear seamlessly part of Excel to their colleagues, who simply call them.
"It will be interesting to see how users continue to experiment with and apply not only LAMBDA but also data types and dynamic arrays. We believe these new functional programming features will transform how people make decisions with Excel."
And there is certainly a large audience of both programmers and coders, as Microsoft claims "Excel formulas are written by an order of magnitude more users than all the C, C++, C#, Java, and Python programmers in the world combined."
Towards the end the article points out that right now to actually use the new feature, "you have to be a member of the Insiders: Beta program."
And that's exactly what LAMBDA can now do. "You can now, in principle, write any computation in the Excel formula language," said Microsoft researchers in a Jan. 25 blog post.
To get there, researchers at the Calc Intelligence project addressed two shortcomings to the LAMBDA project, which is conducted in coordination with the Excel team and which was first announced early last month. They are:
- The Excel formula language supported only scalar values like numbers, strings and Booleans
- It didn't let users define new functions....
"Moreover, even if it takes greater skill and knowledge to author a lambda, it takes no extra skill to call it," researchers said. "LAMBDA allows skilled authors to extend Excel with application-domain-specific functions that appear seamlessly part of Excel to their colleagues, who simply call them.
"It will be interesting to see how users continue to experiment with and apply not only LAMBDA but also data types and dynamic arrays. We believe these new functional programming features will transform how people make decisions with Excel."
And there is certainly a large audience of both programmers and coders, as Microsoft claims "Excel formulas are written by an order of magnitude more users than all the C, C++, C#, Java, and Python programmers in the world combined."
Towards the end the article points out that right now to actually use the new feature, "you have to be a member of the Insiders: Beta program."
Excel is a platform. Basically. Sort of. (Score:5, Interesting)
As a developer I certainly make fun of my PO and PMs even doing their laundry in excel, but I am also quite amazed at what people build with it. Entire medium sized corporations have self - made excel based ERP systems going, with email /outlook being something of a manually run enterprise message bus going with it.
I somewhat get that if handled well this can be a very viable way of doing things. And it also can be quite fault tolerant. You can pass a new piece of software built in an excel sheet around via an internal email list (quite safe) and even the front desk can run it with their basic office training. It forces departments to communicate and programming in excel is a premium training in functional programming for regular non - devs.
AFAICT excel has been Turing complete for decades now, at least when combined with VBA. But what do I know?... I'll continue to make quibs about it and stick to the only thing that's even more platform independant: textfiles, SED, awk and scripting. :-).
Re:Excel is a platform. Basically. Sort of. (Score:4, Funny)
And it also can be quite fault tolerant.
If you count "slow as fuck" as not a fault, or running out of columns for your makeshift COVID-19 tracking database, not a fault :)
Re: Excel is a platform. Basically. Sort of. (Score:1)
Then there was the time it automagically turned gene labels into calendar dates ruining something like a quarter of the dataset used for some very high profile Nature or Cell papers.
Re: (Score:2)
Re: (Score:2)
Then there was a time nobody double checked.
Re:Excel is a platform. Basically. Sort of. (Score:4, Insightful)
or running out of columns for your makeshift COVID-19 tracking database, not a fault :)
The reason it ran out of rows in because some genius saved the file in the older Excel 97-2003 .XLS format which had a row limit. Guess what? Saving the spreadsheet as a .CSV file will loose all the formulas too.
Fault tolerant does not mean idiot proof.
---
Re: (Score:2)
Fault tolerant does not mean idiot proof.
Except it should. It should have warned about the limitation of the format.
One could argue Excel shouldn't be marketed as a general purpose programming tool for all situations, but of course, part of the blame goes to "IT courses" that teach it that way.
Re: Excel is a platform. Basically. Sort of. (Score:2)
Re: (Score:2)
Fault tolerant does not mean idiot proof.
As I always say, you can only make a system idiot-proof for a given subset of idiots.
Re: (Score:2)
Excel 2019 still has a row limit. 1048576 is bigger than 65536, but when you have 3,796,088 positive cases, and 68,606,924 total tests conducted, it still isn't suitable for excel.
Hint: Super hidden Excel function found! (Score:2)
Super hidden excel function
Excel has the ability to add another sheet to the workbook
- 2^20 rows (times) 2^14 columns
- 2^15 characters per cell
But: "Sheets in a workbook: Limited by available memory"
Also true for Excel as real world implementation -> know your specs/limits (signed vs. unsigned int .. is a long standing security issue)
https://support.microsoft.com/... [microsoft.com]
Re: (Score:3)
So to improve this situation, my modest proposal would be that when reporting COVID data with hundreds of thousands of patients, they should use one worksheet per patient. Right?
Re: (Score:3)
Your answer suggests that you are experiencing a form of digital dementia.
Doing it in Excel efficiently is almost like in the old days with pen, paper and registers. What we did in the Old Days:
Sort entries by the first letter of their names and separating to different folders and assign ranges of those letters and extend to the second or third letter, to address the fact that certain combinations would be present more than others.
We were also able to create an ID and when the ID reached a certain limit we
Re: (Score:2)
For your entertainment you need to look up the phrase "modest proposal".
Re: (Score:2)
And *thats* why excel will become skynet in the end.
Re: Excel is a platform. Basically. Sort of. (Score:2)
The user error here was not saving it's on the wrong format. The error was using an excel spreadsheet instead of RDMS.
Re: (Score:2)
Slow as fuck?
- that is to debate and as in any platform depends hugely on the skill of the programmer, it cannot compete to the highest degree with "real" programs but then the question starts to be asked: do you need a lambo for city travel with your wife+2 x kids or does a C-Max style van do the same job - especially when a third one is arriving?
Also have you seen real programmed applications perform worse and slower than Excel-Solutions -> I have.
You also need to look at the implementation speed and t
Re: Excel is a platform. Basically. Sort of. (Score:3)
Re: (Score:2)
Sed,awk, and shell scripting, you say? Youâ(TM)re gonna love this new language an uber-geek named $LarryWall &created()
Right, it's the superset of sed,awk,bash, but perhaps only a few diehards will refuse to adopt it.
Re: (Score:2)
It's great all right, I use it pretty much for anything that's not doable with shell script alone (or too complicated for it).
Re:Excel is a platform. Basically. Sort of. (Score:4, Insightful)
There was a study (I saved the paper somewhere) that looked at the excel spreadsheets a good fraction of the fortune 500 used for financial decision making. The conclusion was that the spreadsheets had so many errors that the resulting decisions were essentially random.
Implementing complex logic in a spreadsheet is not a good idea because they're difficult to debug. They're good for entering and displaying tabular data, and some simple, easily verified calculations, but that's it.
I've noticed that - so many bugs (Score:2)
If you happen to find that paper, I'd be curious to see it.
I've noticed Excel spreadsheets, or rather formulas someone wrote in Excel, tend to have a very high ratio of bugs that were unknown to the users.
I suppose that would tend to be true of any tool that non-programmers use for programming. The intended audience is people who aren't trained programmers, so of course they will make a lot of mistakes when they write programs. It seems, though, that Excel encourages undetected errors. It makes it easier
Re: (Score:2)
Re: (Score:2)
A parens balancing tool! A parens balancing tool! My kingdom for a parens balancing tool!
Having to jam in complex formula that are gigantic, because you have to repeat chunks of code over and over rather than have a little function, yields impenetrable problems when adding such a formula and it's a whisker off to the syntax acceptor.
Re: (Score:2)
And how exactly do you format/type a multi line formula into a one line text area? Especially when hitting RETURN quits the edit mode? Just curious ... and how do you "read it for correctness" ?? Mouse hovering over the cell, to see pop it up in a formatted tool tip?
Re: I've noticed that - so many bugs (Score:2)
It's either CTRL-Enter or Shift-Enter
Re: (Score:1)
And how exactly do you format/type a multi line formula into a one line text area? Especially when hitting RETURN quits the edit mode? Just curious ... and how do you "read it for correctness" ?? Mouse hovering over the cell, to see pop it up in a formatted tool tip?
At the very right hand end of the forumla bar is a little downward pointing chevron. When you click it, you can multiple lines in your formula area!
Re: (Score:2)
Oh, :D
that is a nice hint
(Lucky I do not need to use Excel)
I wonder how many ppl know this and/or noticed this. Thanx for the info!!
Re: (Score:2)
This is not the paper I was thinking of, but a quick Google turns up this one that seems to be more of a review:
https://arxiv.org/pdf/1602.026... [arxiv.org]
I just scanned the abstract, so not saying it is or isn't a great paper but:
Re: (Score:2)
If you ever went to one of several open sheets and hit undo, and had it jumo to another sheet and undo the more recent thing there, you can see a problem.
Presumably they think all open sheets are part of an interlocking whole to keep in sync. Or maybe the programmers are lazy. Either way, undo should undo what's on that sheet, not some other sheet (and especially not in another open workbook) that has a more recent undoable.
Re: (Score:2)
The undo stack interlocking issue is because excel formula can reference cells in ANOTHER FILE. So multiple spreadsheets opened at the same time are treated together like multiple components of the same project. In Excel, XSS is not a bug. It is a feature.
So there comes another bug as feature: one can't open multiple excel files that have the same file name. By this one can do dynamic linking by keeping multiple versions of the "library" spreadsheets each in their own folder. Then the main "application"
Re: (Score:2)
Presumably they think all open sheets are part of an interlocking whole to keep in sync. Or maybe the programmers are lazy.
Yes to both. Here's a really neat trick to annoy someone. Have them open a blank spreadsheet, as if they're starting new. Now open an existing spreadsheet. Congratulations, you now have one spreadsheet because the blank, new one was overwritten by the existing one. If you wanted to use the blank one to copy data into it, you now have to open a second, blank spreadsheet.
Re: (Score:2)
Extending Excel beyond ..
Actually you can extend Excel into the SED, AWKward domain also.
Just install Cygwin and putty, run the ssh-server in Cygwin
Run putty's pLink and scp from Excel/shell + wscript.shell interface.
You can use Excel worksheet-magic to create complex commands and then just send them to your cygwin instance and get the result back via scp.
You can also automagically let scripts be created, some years ago I have started to use the excel shapes to not just draw flow charts but - with some glue
Because .. (Score:2)
0. basically I can do this efficiently and produce efficient and correct results.
1.) .. I can!
2.) .. why not?
3.) .. Excel is a very good platform to do data processing and I can do it in Excel faster than on any other platform, however in some instances having the Linux/FreeBSD command line and tools at your service will help you to dig through huge piles of data, .. also you can process very easily the zipping, unzipping and checksumming of files containing the data ..
4.) .. I do extend my Excel skill and
Re: (Score:3)
Excel is one of the major barriers to adoption of open formats like ODF. VBA scripting is proprietary and doesn't work in any other application, and formulas don't always translate properly either.
ODF needs to support a standardized scripting language, and all the formulas and graphics can be built out of it so that apps can add any feature they want but the resulting spreadsheet will still work in any other app.
Re: (Score:2)
Can the language itself be "proprietary", so that if someone wrote a clean room implementation of VBScript, would it really break some copyright or patent laws? How does that work specifically? Not saying it doesn't, just want to understand....
Re: (Score:2)
Rather than re-implementing VBScript it would probably be better to translate it to some other language. I don't know how bad VBScript is in terms of odd behaviours that are difficult to replicate.
Re: (Score:2)
Laundry in Excel? I'd like to know how!
Re: (Score:2)
You use the win-api to connect to a virtual or real serial port or a HID-USB-Device (ÂC HID-Implementation etc..) and start the washing machine using EXCEL.
Re: (Score:2)
"but I am also quite amazed at what people build with it."
Yes, losing thousands of Covid records because people insist on misusing it as a database is amazing.
Re: (Score:2)
AFAICT excel has been Turing complete for decades now, at least when combined with VBA. But what do I know?
VBA is Turing complete, always has been. The point here is that excel functions and formulas themselves are not Turing complete without ever having to come across an embedded scripting language.
Re: (Score:2)
Try coding a simple game in vba vs. cells to see the difference.
Re: (Score:2)
The point here is that excel functions and formulas themselves are not Turing complete
And this is most certainly wrong.
Re: (Score:2)
Hey don't look at me. Take it up with MS's researchers if you think you know better.
Re: (Score:2)
I doubt it has anything to do with. MS research, the article is simply bollocks, that's all.
What Language? (Score:3)
With a name like LAMBDA, I'm hoping the programing language for Excel will be Lisp! Coming from a company like Microsoft, I fear it will turn out to be visual basic.
Re:What Language? (Score:4, Interesting)
As a historical note, Turing himself proved that lambda calculus is Turing complete. That may have something to do with the naming.
Re: What Language? (Score:2)
Obligatory mention of Unlambda:
http://www.madore.org/~david/p... [madore.org]
Re: (Score:2)
This is Microsoft Lambda(tm). I don't know wtf you're talking about.
Re: (Score:3)
It's Lambda(), an Excel function which defines an anonymous function that can name its argument and itself become named. It means VBA for Excel and administrator permissions are no longer required to create a user-defined function.
One of the problems with spreadsheets is an algorithm must be repeated for every data point: That is, no re-useable code. The provision of user-defined functions, ends that.
This data type exists only in Office 365: All those old-timers using Excel 2007-2019 and maybe, Office
Re: What Language? (Score:2)
Uuum, WTF... Spreadsheets ARE arrays!
Re: (Score:2)
Uuum, WTF... Spreadsheets ARE arrays!
The fact that you BAReFO0t do not understand the difference is completely unsurprising.
Re: (Score:3)
Re: (Score:2)
With a name like LAMBDA, I'm hoping the programing language for Excel will be Lisp! Coming from a company like Microsoft, I fear it will turn out to be visual basic.
Yes, coming from the company who created C# and TypeScript. It's surely to be absolute garbage. /s
PowerPoint beat Excel to the punch (Score:2)
It's an opening for new kinds of Excel viruses (Score:1)
We're likely to see viruses far beyond the "excel macros" we've seen in the past.
Does it run . . . (Score:2)
. . . NetBSD?
Excel users - real intelligence or faking it? (Score:2)
Oh, yeah? Can Excel run a X server? (Score:2)
It is at the same time mind boggling and insanely stupid. A full X Server written in lisp that runs under EMACS!
Re: Oh, yeah? Can Excel run a X server? (Score:2)
That's nothing! I've got a browser here!
Err, I mean Chrome"OS"!
Re: (Score:2)
Do you have a link to the Emacs X server? I was intrigued, but am unable to find it.
The horror. (Score:2)
Funturn it ctional programming (Score:2)
Excel's formulas have always been a simple example of functional programming. Events (changed cell values) trigger computations within cells that "subscribe to" those events, by referencing the cells. Maybe this lambda (appropriately named) language will turn it into something more robust. And we hope it doesn't result in yet another honey pot for virus writers!
Re: (Score:2)
You can't do while loops in Excel formulae (as of Excel 2019), though you can sometimes approximate it using tables, and you can of course do them in VBA.
Re: (Score:1)
You can't do while loops in Excel formulae (as of Excel 2019), though you can sometimes approximate it using tables, and you can of course do them in VBA.
Just watch out for Danny. He ran over our lambda a very long time ago because of a drop table attached to his stupid VB scripts and network data base hooks. Mary who owned the Lambda was in tears when she tried to order more wool.
Seriously though, we still have the difficulties with old VB code from back before Windows was capable of being a secure multiuser environment whether on the intranet or the internet. Things have gotten better over time but the chaos created by having to run interfaces built by ind
But I thought it already was? (Score:2)
Last summer, I joked with some colleagues that I was glad Excel wasn't Turing-complete. Then I googled and found out that actually it was. [felienne.com]
So what's new? And what, if anything, did the fellows back in 2013 do wrong?
Re: (Score:2)
/.: 8-year old news for nerds!
Emacs? (Score:2)
Emacs beat Excel by 45 years in the Turing complete department. But it's still cool that Microsoft is striving to make software more complicated and harder to use.
Re: (Score:2)
you can set the tab positions as a different width for each column if you want.
Re: Emacs? (Score:2)
No, it's an OS! Like Chrome! :D
Re: (Score:1)
It's a wonderful OS! It's just the built-in text editor that sucks
I didn't know Excel was touring ... (Score:2)
... I'll let myself out.
New attack vector (Score:1)
Re: (Score:2)
Re: (Score:2)
You do not need functions to be turing complete, as the turing machine shows ...
Re: (Score:2)
Re: (Score:2)
Excel always was Turing complete. That article is bollocks.
Re: (Score:2)
Re: (Score:2)
Yes, most likely. :P (yes, I simplified a bit).
Did not use it at that time.
But it is hard to imagine it was not.
Turing Completeness is a very low barrier for a programming language.
You have a conditional jump, and you are touring complete. That is basically it
Lambda brilliant name (Score:4, Insightful)
Why are there so few closed and open spreadsheets (Score:3)
Re: (Score:2)
I noticed that too. It's a mature technology with little variation, so I guess it's not interesting to the open-sourceware crowd.
Plus, spreadsheet use tends to evolve into database use (mostly data) or CAS/programming use (mostly math).
Re: (Score:2)
Re: (Score:3)
We have Libre Office.
Is there anything you think Libre Office does wrong that you would want to change? I don't mean missing features which you could contribute to the project.
Generally where Libre Office is wrong for your use case, rather than lacking sufficient features; the answer is "don't use a spreadsheet".
Ease of use and frequency of use - and .. (Score:2)
It just fits and works the purpose.
Guys you really need to understand how evolution works.
Survival of the fittest doesn't mean best, it means the most fitting with an adequate effort.
Re: (Score:2)
Re: (Score:2)
Because the early spread cheat companies either got bought up, or driven into bancrupsy, or both.
Re: (Score:2)
Hackers salivate (Score:1)
Hackers salivate
It already was. (Score:1)
VBA? (Score:1)
I thought excel supported writing your own functions in VBA since almost forever!
How was it not turing complete all this time?
oblig. (Score:2)
Well I for one welcome our Turing Complete corporate overlords!
Wait, it wasn't before?? (Score:2)
HTML+CSS3 is Turing complete!
So, surely, Excel was too!
MS announcement is irrelevant noise (Score:1)
A better metric (Score:2)
A better metric is if the EFF calls it Free as in speech.
Hello Dr. Frankenstein (Score:1)
Excel, like many MS products, is a Frankenstein monster which aims to reinvent the wheel hundreds of times.
and still no regex support (Score:1)
Re: It was always (Score:1)
Good for you, until you retire, decide to move, or get hit by a bus. Then it sucks for pretty much everyone else you've ever worked with.
Re: It was always (Score:3)
After years and years of dealing with people's bullshit and disloyalty, if I left a company hanging because I get hit by a bus or retire, the exact amount of fucks I could possibly give would amount to 0.
And if I did die, how could I possibly care anyway?
Re: (Score:2)