Live data from Hacker News

Ask HN: Language compiled to Excel spreadsheets?

news.ycombinator.com

31–40 of 50 posts

Re: Ask HN: Language compiled to Excel spreadsheets?

#31

I think that the advantage of Excel for non programmers is that it's less abstract and you can see all the intermediate results instead of having a mental model in your head. Also it makes some bugs show faster, because you see the immediate result. Perhaps an alternative is to make something between Excel and "text" programming. Usually a big spreadsheet has many almost independent blocks. Make some mini-spreadsheet…

> the main problem is that you cant's nest 3 for loops

I'm curious what you mean by this. Care to explain?

Re: Ask HN: Language compiled to Excel spreadsheets?

#32

How about company that will turn your spreadsheets into apps. Start with specialized consulting and start building product to cover common use cases. Like Gigster: http://techcrunch.com/2015/07/22/uber-for-developers/ Input: Send the existing spreadsheet and maybe some description. Output: Based on spreadsheets and their history you build and host a webapp to do that.

A friend wrote this: a project that converts Excel sheets to C or Ruby.

https://github.com/tamc/excel_to_code

Re: Ask HN: Language compiled to Excel spreadsheets?

#33

A programming language that is as easy to write as Excel formulas exists already: It's called BASIC. Lots of people fell in love with it since the late 70's. Sure it's often ridiculed, mostly by people who somehow manage to slide an ill-fitting and unwarranted Djikstra quote in their argument, but the language has evolved with the times and once enabled millions of programmers to earn a respectable and honest living.…

I've also noticed the trend with various dialects of Basic producing tightly-knit communities but I wonder if you can credit that to the language itself. Is a modern, object-oriented Basic really friendlier than (a subset of) Python or Lua (edit: with a similar standard library)? I find it at least as likely that today Basic's reputation as an informal, hobbyist- and beginner-friendly language shapes the communities…

> Is a modern, object-oriented Basic really friendlier than Python or Lua?

QuickBASIC had User Defined Types, FreeBASIC not only has Pointers (and therefore Function Pointers) but also adds methods to TYPES which are defined as Subroutines just like in C++. In Fact FreeBASIC can be thought of as a covert way to learn and understand C++ for QBasic programmers.

As for it being an informal or hobbyist language, if one begins by designing the proper data structures and adds the adequate functions to handle them, the resulting programs can be just as capable as those designed in any other language. Being able to think like a programmer makes all the difference, not the reputation of the language being used.

As for Blitz3D, it can access external DLLs. DLLs can be easily written and compiled with freeBASIC. No problem for any adventurous BASIC programmer.

As for your BASIC dialect you can take a look at [1] to learn how to write your own in FreeBASIC or QB64. This code can be easily understood and ported to any language.

[Edit] The standard library may not be as complete as Python's but FreeBASIC can work with most DLLs compiled with C and the documentation will mention ways to include C headers and work with various external libraries.

[1] http://www.qb64.net/forum/index.php?topic=6388.0

Re: Ask HN: Language compiled to Excel spreadsheets?

#35
post #31

I think that the advantage of Excel for non programmers is that it's less abstract and you can see all the intermediate results instead of having a mental model in your head. Also it makes some bugs show faster, because you see the immediate result. Perhaps an alternative is to make something between Excel and "text" programming. Usually a big spreadsheet has many almost independent blocks. Make some mini-spreadsheet…

> the main problem is that you cant's nest 3 for loops I'm curious what you mean by this. Care to explain?

I don't know what the limit for `for` loops is, but Excel has some limits to nesting of flow control structures like `if`. For example, you cannot nest `if` statements more than seven deep. I suspect the parent poster is referring to a limitation similar to this, but for nesting `for` loops.

Re: Ask HN: Language compiled to Excel spreadsheets?

#36

Earlier quoted context omitted.

Yeah, it was fantastic. After programming in QuickBASIC ~1998-99, I didn't really do any programming for about 8 years. When I got back into it (in college) I was frustrated by how difficult it seems to get off the ground. The world of c++, python, command line, vim, shared libraries, package repositories, etc..., is very powerful, but it takes a lot of knowledge to get to the point of creating something of value. At…

This is identical to my experience teaching non-programmers to write Python. We end up reverting to Excel so often.

You should both teach them FreeBASIC. After they've written their first Objects as Extended Types they will have no trouble at all moving on to C++ if they want to. They will have little trouble finding out how to create GUIs using GTK or how to compile for DOS, Windows and Linux and they won't lose time trying to figure out how to distribute their programs or wondering if the Python runtime is installed on their client's machines or not.

Re: Ask HN: Language compiled to Excel spreadsheets?

#38
Historical precedent indicates that this will not be a high value story for the product owner. Variant data types are a feature, not a bug. If they don't ship in the box, someone will union up their own to make life easier.

People use Excel to reason about their business. Reasoning about the code is a second order problem and SourceForge is paved with the rotting corpses of projects focused on making a better spreadsheet.

Re: Ask HN: Language compiled to Excel spreadsheets?

#39

Earlier quoted context omitted.

I've also noticed the trend with various dialects of Basic producing tightly-knit communities but I wonder if you can credit that to the language itself. Is a modern, object-oriented Basic really friendlier than (a subset of) Python or Lua (edit: with a similar standard library)? I find it at least as likely that today Basic's reputation as an informal, hobbyist- and beginner-friendly language shapes the communities…

> Is a modern, object-oriented Basic really friendlier than Python or Lua? QuickBASIC had User Defined Types, FreeBASIC not only has Pointers (and therefore Function Pointers) but also adds methods to TYPES which are defined as Subroutines just like in C++. In Fact FreeBASIC can be thought of as a covert way to learn and understand C++ for QBasic programmers. As for it being an informal or hobbyist language, if one b…

>As for it being an informal or hobbyist language, if one begins by designing the proper data structures and adds the adequate functions to handle them, the resulting programs can be just as capable as those designed in any other language.

Well, that is exactly my point. Basic has the reputation of being easy for beginners and hobbyists but properly written code in a recent OOP dialect of Basic doesn't look too different from code written in any object-oriented Algol-derived language. As such, it is probably about as easy/as hard to write. Which is what makes me suspect that Basic-the-language might not really be the secret sauce of environments like QB64 or Blitz3D. Other possible reasons they get the sort of following they do could be that

1. Those environments are easy to install and create your first project with.

2. They start you with an IDE, so compiling and running your first code is only a matter of pressing a single key or clicking a single button.

3. They ship a "fun-oriented" standard library. You don't have to install any addition packages or even import extra modules into your project to access subroutines for plotting, sprite graphics, sound, 3D, networking, etc.

4. They have high-quality, beginner-friendly documentation with plentiful examples.

5. They are fast, both the IDEs and the runtimes.

6. (A language-related one.) Somewhat surprisingly, they are more often that not statically typed and offer decent error messages. Perhaps compile-time errors are a better educational tool than runtime errors.

I am not sure how important it is to have all of the above points but 1-3 seem crucial.

Re: Ask HN: Language compiled to Excel spreadsheets?

#40
Sounds like a mixture of the sc file format and BASIC:

    let A0 = 123 
    let A1 = 234 
    let A2 = 345 
    rightstring B3 = "asd"
    leftstring B5 = "foo"
    label B11 = "bar"
    goto B11 A0
Just a textual description of what your spreadsheet should look like. Gosling had it right back in the 80s ;)
Post reply on HN