13 ms·
Array languages vs. the curse of the spreadsheet
- 83457 3y agoI understand using symbols when helpful, but... they've gone too far. The way to type the symbols in doesn't even correlate to the symbol. To insert division you enter `=
- abrudz 3y agoThat's actually a historical quirk, because modern keyboards have = where old APL keyboards had × and - where old APL keyboards had +. You'd press Shift+ for - and Shift× for ÷ meaning that Shift gives the inverse function. Similarly, they Shift/ for \ (which is the inverse of / in APL). See https://en.wikipedia.org/wiki/APL_(programming_language)#/media/File:APL-keybd2.svg https://en.wikipedia.org/wiki/APL_(programming_language)#/me...
- Bostonian 3y agoI wonder if someone has worked on automatic translation of Excel spreadsheets with formulas to a proper programming language. Using the Python openpyxl package, you can read an Excel spreadsheet and get the contents of each cell, either a value or a formula. Having stored this data, it should be possible to (1) look for changes in formulas, which could indicate an error. Why is the formula for cell A99 different from that in A100? (2) write formulas in Python/NumPy or another language that replicates the formulas.
- azhenley 3y agoIt is a proper programming language. For #1, there has been research on linting and automated semantic error or smell detection in Excel (e.g., https://github.com/ExceLint/ExceLint https://github.com/ExceLint/ExceLint). Some features are live in Excel today! For #2, Excel now supports Python. I don't think you need to do any conversions, all of the necessary information exists in the spreadsheet.
- paulddraper 3y ago> It is a proper programming language. How do you define a reusable function? --- (I know the answer....it's a proper programming language.)
- azhenley 3y agoExcel supports reusable lambdas: https://support.microsoft.com/en-us/office/lambda-function-bd212d27-1cd1-4321-a34a-ccbf254b8b67 https://support.microsoft.com/en-us/office/lambda-function-b...
- skissane 3y agoLambda support in Excel is quite new though, isn’t it? If the argument is “Excel is a proper programming language because it now supports lambdas”, that implies that for most of its existence it hasn’t been one
- wizzwizz4 3y agoWe've had VLOOKUP for a while.
- paulddraper 3y agoThat's a dictionary, not a general function.
- baq 3y agoit works well enough in discrete domains... it's literally the definition of a function - map something to something else.
- paulddraper 3y agoYes, a function is an injection [1]. Abstractly. Listing all possible inputs with their outputs, and then doing a lookup....that's only sometimes useful. [1] https://en.wikipedia.org/wiki/Injective_function https://en.wikipedia.org/wiki/Injective_function
- kevingadd 3y agoDefinitely has me wondering: there are lots of regex compilers out there, so where are the spreadsheet compilers? I should be able to convert a spreadsheet wholesale to Java or c# that clearly expresses the cell relationships, then go in and add names (if they aren't already there)
- KMag 3y ago20 years ago, I was told there was such a beast for turning an Excel spreadsheet into a C# application, targeted at accelerating/productionizing financial models. I never used it, though.
- _dain_ 3y agoI know of some Python libraries that do this: https://github.com/bradbase/xlcalculator https://github.com/dgorissen/pycel https://github.com/vinci1it2000/formulas You give it an .xlsx file and it compiles to a Python representation where you can mutate "cells" and observe calculated results in other "cells", according to the formula DAG. Not sure about other languages but I'd be surprised if Python were the only one to have libraries like this. Funfact: it's more complicated than you think to implement these engines. There's no spec for the formulae, so you have to reverse-engineer based on observed behaviour. You run into a lot of strange edge cases in seemingly mundane arithmetic formulae, and type conversions are a constant source of surprise.
- abdullahkhalids 3y agoI am not sure if there exists a convertor, but.. Emacs org-mode has tables, which you can use as spreadsheets [1]. The formulas are not written in the cells, but after the table, with one formula per line. You have to update the table every time you update the data or the formulas. I once tried to use it, but it was way too difficult, and I went back to Libreoffice. [1] https://orgmode.org/manual/The-Spreadsheet.html https://orgmode.org/manual/The-Spreadsheet.html
- lukasb 3y agoThe example of "why spreadsheets bad" made me wonder - why don't spreadsheets have a visual indicator for cells with a formula rather than a static value?
- galaxyLogic 3y agoThat would be the most obvious improvement and makes we wonder why it's not there after all these years. A 2nd improvement I would go for would be to allow the cell-formula to be written in JavaScript.
- threePointFive 3y agoYou've been able to write custom formulas in VBA in Excel for a while now. The same functionality exists in Google Sheets with the much nicer macro language of JavaScript. https://developers.google.com/apps-script/guides/sheets/functions https://developers.google.com/apps-script/guides/sheets/func...
- kevingadd 3y agoIirc Excel has a dependency visualizer that will highlight formulas. It's called Trace dependents
- wslh 3y agoI think the spreadsheet metaphor is right but the spreadsheet UX/UIs has not aged well. Why Microsoft would do important changes into one of its cash cows and suffer a new wave of bugs and incompatibilities?
- wrs 3y agoI recently discovered that Excel gained “array formulas” a few years ago. [0] It’s a little hard to grasp for me because arrays are still flattened out as individual values in the sheet, but it has been useful to write a single formula to process a group of values rather than filling across/down and perhaps losing sync when the formula is changed. [0] https://support.microsoft.com/en-us/office/guidelines-and-examples-of-array-formulas-7d94a64e-3ff3-4686-9372-ecfd5caa57c7 https://support.microsoft.com/en-us/office/guidelines-and-ex...
- zvrba 3y agoWait until you discover PowerQuery in Excel.
- 1980phipsi 3y agoExcel has had array formulas since at least 2003.
- blowski 3y agoI believe the OP is referring to array formulas which effectively explode the results into multiple cells, which was introduced in 2018.
- wrs 3y agoExactly. I’m not sure what to call the new feature, “array spillage”? I didn’t know the original was called “array formulas”. Anyway, the change to make the output go into cells automatically is indeed what I meant.
- jd3 3y agoI'm surprised that there was no mention of Chris Pearson's Shakti (k9 by Arthur Whitney) powered mesh spreadsheet. https://www.youtube.com/watch?v=CEG9pFNYBCI https://www.youtube.com/watch?v=CEG9pFNYBCI https://mesh-spreadsheet.com/ https://mesh-spreadsheet.com/
- chrispsn 3y agoGlad to hear it’s memorable!
- karmakaze 3y agoThis discussion wouldn't be complete without covering Lotus Improv on NeXT. It did two things differently: data, formulaz, and presentation were separate layers and the formulas weren't applied per cell but rather as a relational invariant between all sets of cells in a direction for the full range. One last thing it used was naming everything with natural names for columns and tables much like a database schema. The Windows version of Improv wasn't nearly as good, possibly because it seemed too advanced for PC users familiar with 1-2-3, or because it might disrupt an already very profitable revenue stream. I believe there's a spiritual successor in Quantrix.
- GMoromisato 3y agoAt the time, Improv was hailed as the future of spreadsheets. What happened? I think Improv could only satisfy a subset of Excel use cases. In particular, any non-tabular sheet was hard to do. If you have one tool that does it all, even if imperfectly, why bother learning a second, special tool just for a subset? Note also that it was easier for Excel to superset Improv (e.g., by adding Pivot Tables) than the reverse.
- wslh 3y agoWhat was the conceptual difference with Lotus Notes? That Lotus Improv was based on spreadsheets? I remember Lotus Notes was a very successful product, closer to the low code paradigm. Remember seeing really fast development cycles in old organizations.
- karmakaze 3y agoI just discovered the existence of Javalin[0], a precursor to Improv, that was even more fundamental treating each axis as named 'variable'. [0] https://en.wikipedia.org/wiki/Javelin_Software https://en.wikipedia.org/wiki/Javelin_Software
- alephaleph 3y agoI have to say that I was a little disappointed by this article. It doesn’t really demonstrate Kap as solving any of the issues that spreadsheets have, and it doesn’t really address many of the reasons people like spreadsheets. Spreadsheets are reactive and stateless and allow you to move seamlessly from data storage to computation on that data. This is really just a calculator REPL that can ingest tabular data easily. I’d be more interested if they’d innovated more with the interface — maybe something node-based?
- amluto 3y ago> { ⊃ ⍵ ⊇⍨ ↑⍒≢¨ ⍵ /⍨ 2≥ (⊂"aeiou") (+/∊⍨)¨ ⍵ } io:read "dict.txt" > At this point, comments suggesting the code is “unreadable” are bound to be thrown around I was actually thinking it was unpronounceable, un-searchable, and almost impossible to type. I would love to see more work on array languages that map onto human languages, larynxes, and keyboards better. (Obviously most programming languages are rather English-centric. But they also use a character set that is, for better or for worse, accessible to most of the world. More objectively, it’s also a small character set as such things go, and it’s a simple script in the sense that the characters look the same regardless of context, especially in the fonts used for programming. [0] Character sets like CJK are simple but not small. Arabic and Hebrew are small but not simple (Arabic more so than Hebrew). Even French is mildly complex. I admit that “{ ⊃ ⍵ ⊇⍨ ↑⍒≢¨ ⍵ /⍨ 2≥ (⊂"aeiou") (+/∊⍨)¨ ⍵ }” is at least approximately equally foreign to everyone. But it’s hard for me to ask a coworker “hey, remind me what ⍒ does again?” [0] I have never seen anyone suggest programming in English cursive. And ligatures for programming are exotic and rarely affect anyone who doesn’t opt in to them.
- deleted 3y ago[deleted]
- MathMonkeyMan 3y agoI guess we need terse, distinct pronunciations for each of the symbols. I heard a Physics youtuber say "nabla" the other day -- I didn't know that symbol had a name. On the other hand, conventions for reading formulae out loud are difficult and prone to ambiguity. One more idea. Even in ASCII, there are programming language notations that are hard to say. What is Go's "<-" symbol called? "Arrow"? "Send or receive"? What about C++'s "::"? "Colon colon"? It is a neat linguistic puzzle to assign sounds to “{ ⊃ ⍵ ⊇⍨ ↑⍒≢¨ ⍵ /⍨ 2≥ (⊂"aeiou") (+/∊⍨)¨ ⍵ }”.
- ihumanable 3y agoPHP provided an answer to the "::" https://stackoverflow.com/questions/592322/php-expects-t-paamayim-nekudotayim https://stackoverflow.com/questions/592322/php-expects-t-paa... T_PAAMAYIM_NEKUDOTAYIM which of course is Hebrew for "Double Colon"
- samatman 3y agoIs there a reason why APL languages all fold right? I mean other than genealogical, as in they fold right because APL does. Does it offer compelling advantages? As an outsider it looks like wasted novelty budget. There's already a lot of new things to learn and get used to in an APL school array language, and then on top of that you have to learn to read them right to left.
- zuser567 3y agoI imagine it’s because reverse Polish notation is commonly accepted to be superior.
- amluto 3y agoOn that note, why do array languages use terse notation and avoid newlines? Regexes do this too, but at least Perl 6 / Raku is pushing for a multi-line form. There are even initiatives to give lisps friendlier syntax.
- lokedhs 3y agoI'd argue it's partly because of tradition. If you look at early APL code, including Iverson's earliest papers, it's written with pretty much zero spaces (well, except for where spaces are required). A lot of APL programmers continue this tradition, and it works for them. Not everybody does it though. I'm one of those people that adds spaces and newlines to try to make the code more clear for myself. As an example of the kind of code I tend to write, here's the code for the Kap output formatter: https://codeberg.org/loke/array/src/branch/master/array/standard-lib/output3.kap https://codeberg.org/loke/array/src/branch/master/array/stan... Of course, if you don't know what the symbols mean, a lot of it is probably still impenetrable, but I think this code is less dense than your typical APL code.
- t-3 3y agoIt's about simple and consistent order of operations. There are no precedence rules to remember other than that, so it reduces errors and improves readability compared to a complex formula written in standard notation, where you would have to read the entire thing to know which parts are calculated first.
- mschaef 3y agoWhatever trouble Lisp had from its parenthesis heavy prefix syntax will be dwarfed by the comprehensibility issues presented by this: { ⊃ ⍵ ⊇⍨ ↑⍒≢¨ ⍵ /⍨ 2≥ (⊂"aeiou") (+/∊⍨)¨ ⍵ } io:read "dict.txt" I get that there's a very coherent intellectual framework to this, and it's possible to get used to it... but most people don't do that. This is particularly true when the alternative is Excel, which was widely accessible before it was taught in schools, and is now taught in schools too. (This language comes from a history where it used to be necessary to by special typewriter balls to print the text. https://www.computerhistory.org/collections/catalog/102696478 https://www.computerhistory.org/collections/catalog/10269647... )
- deleted 3y ago[deleted]
- cardanome 3y agoAPL notation makes more sense once you get that it was developed as an better notation for expressing math. [1] Classical Math notation is full of weird Greek symbols and absolutely incomprehensible without any training. APL is way more regular and easier to grok as well as to type on computers. With it's small set of special symbols, regular syntax and human-friendly infix notation APL is designed be very easy to learn. It looks utterly alien to programmers that are used to the C-style syntax based languages, yes. but your JS or C# code looks as alien if not more alien to an non-programmer as does APL to you. I am not convinced that APL is harder to learn that JS for non-programmers. I think existing programmer struggle way more with learning APL because it requires them to unlearn certain ideas. [1] https://dl.acm.org/doi/pdf/10.1145/358896.358899 https://dl.acm.org/doi/pdf/10.1145/358896.358899
- int_19h 3y agoNon-programmers can understand IF A = 42 THEN PRINT "WTF" just fine.
- GrumpySloth 3y agoOnly if they already speak English. When I first learned C, I didn’t know English well enough to understand what “if” or “else” meant. I learned these words in the context of programming first, and natural language second. This experience is probably the same for most of the world’s programmers. When I was learning programming back then, those keywords could just as well have been single letters. It wouldn’t have made a difference. Also, I went up to my printer and there is no “WTF” there. Surely, this program doesn’t work! More seriously, this just illustrates that convention and idioms are much more powerful carriers of meaning than dictionary words. Array languages rely heavily on conventions/idioms.
- deleted 3y ago[deleted]
- llmzero 3y agoJust for fun, a solution in language j to the problem of selecting the longest word with less than 3 vowels. solution =: >@:{.@:(\: #&>)@:(((+/@:(e.&'aeiou') <: 2:) # ])&.>)@:;: Example solution 'yes, today you are reading something that is not so easy to grasp' the result is: today Ruby : frase.split.select{|x| x.count("aeiou")<3}.sort_by(&:length).last => "today" Edited: Added a comparison with Ruby. It seems Ruby here is easier to read and to compose.
- mr_toad 3y ago:(
- elcaro 3y agoFWIW, I solved this in J as follows F =: >@{.@(\: #@>)@(#~ (2 >: +/@e.&'aeoiu')@>) which I think maybe composes a little better This doesn't include the splitting. I would imagine I would be feeding this function from a boxed list from a word list, like: F 'b' fread 'dict.txt' Also `;:` is unreliable on hyphenated words, etc. Better to use `cut`.
- llmzero 3y agoShorter ruby version: phrase.split.select{|x| x.count("aeiou")<=2}.max_by(&:length) The enumerable module of Ruby provides many methods that can be easily implemented in J. Just to show one of them max_by =: 1 : '{~ (i. >./)@:(u&>)' For example the list.max_by(&:length) is (# max_by)
- antonvs 3y agoHaskell: maximumBy (on compare length) . filter ((< 3) . length . filter (`elem` "aeiou")) $ words phrase That returns "grasp", though, because it doesn't sort the list.
- antonvs 3y agoPlus, defining a few aliases for the punctuation-happy terseness-lovers among us, we can reduce the above to: maxBy(on cmp (#)).(((<3).(#).(el"aeiou"|=))|=)$words phrase
- James_K 3y agoThe fundamental issue here is discoverability. There is no benefit to having these symbols, since you could easily have some kind of button the UI to switch between symbols and words. It would be far better if you tab completed the actual name of a function rather than typing some arbitrary sequence of characters to get a symbol of questionable function. You won't ever replace Excel if the first step to using your product is memorising a huge dictionary of strange runes. I think a good language for replacing spreadsheets would be Scheme, or something similar. You can teach it to someone very quickly as the syntax is quite minimal. Provided functions are given human readable names, I think it could be very intuitive. You would also need to offer some kind of graphical editor for the code. Lisp has wins here as well since you could likely translate the code into a graph without much issue. However it would also be good to allow the inverse of such transformations.
- deleted 3y ago[deleted]
- xelxebar 3y ago> There is no benefit to having these symbols Hard disagree. Which do you find more readable? -b/(2a) + 1/(2a) √(b²-4ac) or (plus (minus (div b (times 2 a)) (times (div 1 (times 2 a)) (sqrt (minus (pow b 2) (times 4 a c)))))) or plus(minus(div(b, times(2,a)), times(div(1, times(2,a)), sqrt(minus(pow(b,2), times(4, a, c)))))) APL just has a small handful of symbols with really simple definitions and, heck, you already know what +, -, ×, and ÷ mean. Scheme actually has a ginormous dictionary by comparison, and in practice you do need to read the manual anyway, so discovery is a moot point. APL is actually simpler in that regard in practice, and the gains you get in readability from the symbols are just like above. Better yet, though, which of the above do you immediately think, "that 1/(2a) can be factored out"? Oh, and here's APL for the above: (-b÷2×a) + (1÷2×a)×((b*2)-4×a×c)*1÷2 Quickly empowering your brain to spot high-level patterns across your codebase like that is a huge strength of APL.
- duped 3y agoThis is more readable than both fn quadratic_roots (a: real, b: real, c: real) -> (cmpx, cmpx) { let root1 = (-b + sqrt(b^2 - 4 * a * c)) / (2 * a); let root2 = (-b - sqrt(b^2 - 4 * a * c)) / (2 * a); return (root1, root2) } Converting math into code is extremely easy. Converting code back into math is the thing to optimize for. The compiler can figure out how to optimize the machine code for you, but the reader needs to be able to work backwards. The thing that array languages get wrong is that code is read more often than it is written, and repeating yourself is worthwhile in order to make it easier to understand for the next person who looks at it. Compilers are extremely good at recognizing patterns and optimizing it for numerical code. Humans are really bad at recognizing patterns from unique sequences of characters.
- NooneAtAll3 3y ago> This is how I solved the third problem, by the way: [insert unreadable scribbles of a madman] when will array enthusiasts understand that having first letter A does not mean the language should be aimed at Aliens? get over your "code golf" tendencies and start thinking about *readability* - give us long names, give us brackets, give us ASCII and stop pulling everything into a single line in examples - _THEN_ you'll have your first tiny chance of being heard and taken seriously aim design at common people, not gurus
- haolez 3y agoWhy? Just use TypeScript at that point. The whole point of those languages is the notation as a tool for better thought.
- dsabanin 3y agoNotation doesn't have to be obscure symbols, the power of the array languages goes well beyond their syntax.
- TeMPOraL 3y agoYes, and it gets multiplied by the power of the notation, once you get familiar with it.
- xelxebar 3y agoHave you ever read Euclid's The Elements? It's all prose and relatively obtuse. Compare that against the modern notation equivalent and you'll see how empowering the algebraic formulation is. The semantics are the same, but the presentation absolutely makes a difference. APL is not 100% about the symbols, but a huge part of being a tool of thought comes from the suggestivity that symbolic notation offers.
- HelloNurse 3y agoOverloading operators by position (left, right, infix) for related meanings and effectively modifying operators by concatenating them with other operators in sufficiently orthogonal ways are major and unusual achievements of APL, and they run much deeper than syntax.
- RcouF1uZ4gsC 3y agoThis article completely misunderstands the users of spreadsheets: >users of spreadsheets are already thinking in terms of matrices of values I am pretty sure most users of Excel are not thinking about matrices. They are thinking of rows and columns. Programmers and mathematicians might generalize this to matrices and values, but the users themselves are not thinking about it. This is akin to viewing Tinder as a "human interaction app" and lumping it in with Slack under that abstraction, and not realizing that those are two very different use cases and mindsets of the user. > The spreadsheet paradigm hides what's important (the formulas) in favor of the superficial (the data) To most users, the data is what is important in a spreadsheet and the formulas are implementation details.
- Fluorescence 3y ago> To most users, the data is what is important in a spreadsheet and the formulas are implementation details. In my experience of erm... hardcore-spreadsheeting (engineering, finance)... the cells whose value matters and become a final report that motivates design/decision-making are a tiny percentage of the total cells. Most of the cells in a spreadsheet are either raw data or intermediate values. Their values have no real meaning to the author, just steps in a long calculation. They might look at them for sanity checking but if they need to verify their values then that is better as another calculation not by repeated manual inspection. Of course there are many types of spreadsheet user. Every cell value matters for your Vinyl collection or whatever :)
- lokedhs 3y agoThat was not the point of the statement. The argument (possibly poorly phrased) was the there are people people out there that are comfortable with manipulating arrays of numbers than there are programmers who are capable of writing a Java program. So, if the goal is to make it easier for someone to take the leap from a spreadsheet to a programming language, array languages are likely an easier hill to climb (people already familiar with, say, Python, might struggle, but they are not likely to be interested in learning a new programming paradigm anyway).
- deleted 3y ago[deleted]
- dragonwriter 3y agoAt this point, comments suggesting the code is “unreadable” are bound to be thrown around, but once you learn a handful of symbols, this is in fact significantly more readable than the kinds of formulas I see on a regular basis in Excel. This is proof that one is not more difficult to learn than the other, and that the problem is one of marketing rather than technological. That logic is broken. Even accepting it as true, "X is easier to read than Y once you learn a specialized symbolic language" is not "proof that one is not more difficult to learn than the other". It is, at best, proof that there is value that may make it worth learning the one even if it is harder to learn, which is very different from proof that it is not harder to learn.
- TacticalCoder 3y agoThe explanation as to why spreadsheets can be so bad is spot on. It's because of these reasons that porting a spreadsheet to a proper app is a thing. I've been tasked of doing just that and it's horrible. We're supposed to rejoice and hail the spreadsheets gods because a spreadsheet can take unstructured data and create a map of (key,value) where key is a value appearing in one column and where value is the sum (for example) of the values appearing in another column for that key. We literally have a simple mapping like that, call it a "pivot table", and it's supposed to be some achievement of mankind. I beg to differ. From what I've seen I'm pretty sure the world runs on broken spreadsheets, with bogus numbers being presented during meetings, used for decisions (including political decisions), etc. At some point management realizes the company (or institution) has been taking nonsensical decisions since years and it's not only a minefield of bugs and near impossible to debug "code" (that'd be the "I've certainly spent more time than I want to admit trying to untangle one of those bowls of spaghetti trying to find out why a certain number is computed the way it is." from TFA, which any of us ever having been tasked to port a spreadhseet to an app know all too well)... But it's also a minefield politically: you cannot ask too many questions or point out too many bugs because it exposes the brokenness everything has been running on since years. Even though somewhere, at some level, people knew everything was FUBARed (otherwise the decision to rewrite the spreadsheet to a dedicated app would not have been taken), it's a minefield. You have to walk on eggs to not piss anyone. My epitath may be: "The world runs on broken spreadsheets".
- wruza 3y agoSpreadsheets play a huge role at early stages of any complex business. Almost no early stage business has a budget and competence for maintaining a dev team capable of producing working code at its rate of change. When it does, we call it “a software startup”. Success rate is still questionable, so people call these investments “venture”. People create spreadsheet messes not because they are stupid or lazy. They do what everyone else itt would deem impossible: create and evolve a mostly working system as needed while doing their regular job. I’ve helped to migrate both excel-based and software-based enterprises. Few factories on foxpro/clipper, a couple of realties and one leasing on excel. There’s no real difference in how much gray hair you get in the process. Pretty sure if some company came to ours with what we see in TFA and asked us to help with migration, we’d laugh for a week straight.
- hn92726819 3y agoIs the author here? Most of this article is about how ubiquitous spreadsheets are and how this language can replace them, but I want to hear the author's honest opinion on if through reasonable spreadsheet user will switch to this. If you think they will, I also ask, what language that looks like this has ever been used mainstream? Or even in a hacker community? Brainfuck and golf languages are used by a very, very small niche. Regex is probably the most similar, but you only need to learn like 4 symbols to be useful (. * + \). And that hasn't caught on in the average excel user's repertoire. I really wish something like this would exist and be useful because I share the exact same gripes as the author.
- lokedhs 3y agoOriginal author here. Kap is inspired by APL which was very popular back in the day (70's and 80's), and has remained popular within certain segments. There is still enough interest in it to support at least one conference. There is also J, which is used in real businesses. And K and Q are array languages that is popular in finance. Kap takes the good ideas of APL, as well as its basic syntax, and attempts to combine that with good ideas from other languages, mainly Lisp. I personally use it as the go-to language to solve problems that most people would use Excel to solve, so clearly it's working for one person. While Kap can be used as an Excel alternative for some subset of of problems, I have no expectation that the average Excel user will switch to it. Instead, I'm trying to adapt some of the nice user interface ideas of a spreadsheet (editing and formatting) while keeping the rest as a regular language. I also want to ensure it's easy to integrate with spreadsheets (copy&paste between Kap and Excel for example, there is also initial work done to have a realtime link with a running spreadsheet).
- keithnz 3y agothe critique of spreadsheets was lacking in my opinion. Not being able to see the of formulas is just a mode switch away or you can even implement your own checks like highlighting cells that aren't formulas but should be. It's kind of the same as code that is syntactically correct but wrong. I actually think spreadsheets are fantastic programming environment, total immersion in the results and instant feedback. The alternative proposed (by introducing another layer) seemed..... unconvincing and cumbersome. There's almost no common types of computations that would be better done outside the spreadsheet itself, and for uncommon ones where you want to do something fancy, nearly all spreadsheets can be accessed by a vast array of tools and languages. Spreadsheets have survived all challengers including those that try to create extra layers on top
- Fluorescence 3y ago> Not being able to see the of formulas is just a mode switch away "Show formulas" is fine if it's "=A1-B1" but for real work, formulas get long with lots of filters and look-ups etc. I break them across multiple lines just to read them. If I toggle visible formulas, I only see the first few characters of such formulas that fit in the data cells. Even if it did work, reading every cell when you have 1000s of rows just sucks for spotting errors caused by a fill down error or a cat on keyboard or something. The only way I can be confident with a spreadsheet is to have a validation sheet that performs a bunch of error-checking. For serious stuff, I think you almost need to keep an entire duplicate of the data and recreate the results with a different process because it's just so hard to catch everything e.g. heartbreaking to open an old important spreadsheet and see a line of data got duplicated somehow. Spreadsheets are just so damn mutable. A keyboard shortcut with the wrong application in focus and who knows what damage you might have just done to a spreadsheet.
- 29athrowaway 3y agoKap: APL for the JVM, with incomplete tutorials. { ∪ ⍵ ∪ }
- lokedhs 3y agoWell, it's for the JVM, JS or Linux native. :-) Point taken about the tutorials. It's still a work in progress.
- blackoil 3y agoOne simple thing I think missing from Excel is 1st class table/data sheets. A datasheet can have only well-defined manual/computed columns. They are independent of worksheets so won't hurt existing use-cases / backward compatibility. I am not sure of forward compatibility. We can add validations and type to sheet so that the data consistency is not an issue. A good UI of scratch sheet/worksheet will allow for adhoc work on it. Also, we can label formulas in a worksheet (aka variable) that should simplify the code.
- orthoxerox 3y agoAye, Excel tables are good (not great) for solving the "every field in this column must use the same formula" problem, but they don't do anything for "every field in this column must have the same type" problem.
- bvrmn 3y agoHm. Solution could be expressed semantically like this (python): max((w for w in words if len(set('aioue').intersection(w)) <= 2), key=len) But author's solution clearly contains more semantic elements.
- gitonthescene 3y agoI think I speak for everybody when I say that if a language isn't immediately intelligible to me within two seconds of barely glancing at it then it isn't worth anyone's time. Programmers are lazy. That's not a criticism. It's something to aspire to. [end sarcasm]
- wruza 3y agoThe author has to do a sort of a hallway testing, cause it’s a rare opportunity for an eye opening experience.
- pavlov 3y agoThe project seems interesting, but IMO it undermines the author’s case that the only example presented is completely artificial and unrelatable. After explaining how spreadsheets enabled ordinary users to solve real-world problems better than traditional programming, the author proposes to take it to the next level with APL-style expressions, and gives a code example for the following task: You're given a dictionary and asked to find the longest word which contains no more than 2 vowels. I don’t believe there is a single Excel user in 40 years who ever needed to perform this operation. It’s the kind of abstracted “l33tcode” exercise that only appears in computer science classes and a certain type of programming job interview. A practical example of how an array language IDE works better than a spreadsheet for some useful task would go a long way here.
- Joker_vD 3y agoAh, the classic "Two Stories" [0] from Joel Spolsky: I pretty rapidly realized that the App Architecture group knew even less than I did about macros. At least, I had talked to a handful of macro developers and some Excel old-timers to get a grip on what people actually did with Excel macros: things like recalculating a spreadsheet every day, or rearranging some data according to a certain pattern. But the App Architecture group had merely *thought* about macros as an academic exercise, and they couldn’t actually come up with any examples of the kind of macros people would want to write. Pressured, one of them came up with the idea that since Excel already had underlining and double-underlining, perhaps someone would want to write a macro to triple underline. Yep. REAL common. So I proceeded to ignore them as diplomatically as possible. [0] https://www.joelonsoftware.com/2000/03/19/two-stories/ https://www.joelonsoftware.com/2000/03/19/two-stories/
- miga 3y agoPart of modern university training is making exercises as unrelatable as unpractical as possible, so that students are relieved to find their commercial work simply boring and repetitive afterwards.