Front page of Slashdot right now

62 views
Skip to first unread message

Ian (LastCalc author)

unread,
Mar 10, 2012, 3:09:29 PM3/10/12
to last...@googlegroups.com
A story about going Open Source was recently posted to the front page of Slashdot, so hopefully we'll be getting a lot of new interested users/developers soon!


Ian.

Hans Wobbe

unread,
Mar 10, 2012, 3:35:39 PM3/10/12
to last...@googlegroups.com
This is really quite an impressive idea.

I particularly like the way Functions are implemented.  It seems it should be possible to implement many of the APL functions that I found so powerful, in this environment.  Since the APL primitives are well defined, those definitions may well provide a bit of a head-start.  I also really like the idea of being able to read values from web pages since this is quite a bit easier and more general than parsing the underlying HTML.

I'm curious as to whether you think it might be possible to define a set of functions and then pass them the values as URL arguments.  If so, I could easily see using AJAX and JS to "submit" computation requests, perhaps even within an iFrame.  In effect this would create a form of embedded, programmable calculator.

In short, it's already an intriguing concept.  With luck and a bit of effort from other contributors, I think it has the potential to become a very useful service.

Cheers,
Hans Wobbe
Message has been deleted

Ian Clarke

unread,
Mar 10, 2012, 4:48:28 PM3/10/12
to last...@googlegroups.com
On Sat, Mar 10, 2012 at 2:35 PM, Hans Wobbe <hww...@gmail.com> wrote:
This is really quite an impressive idea.

Thank you - I'm glad you can see the same promise in it that I do :-)
 
I particularly like the way Functions are implemented.

Indeed.  Basically a function is just a transformation on a list of tokens, where tokens are initially just Strings or Numbers, but functions can convert them to other types of Java objects like Lists, Maps, Amounts (jscience), or UserDefinedFunctions (aka closures).  The general goal of the parser (BacktrackingParseEngine.java) is to find a way to apply functions to the list of tokens it is fed initially to get down to a minimal number of tokens, ideally just one - the result.  It does this using a "best first search with backtracking" (in the vernacular of symbolic AI).
 
  It seems it should be possible to implement many of the APL functions that I found so powerful, in this environment.  Since the APL primitives are well defined, those definitions may well provide a bit of a head-start.

I'm not that familiar with APL.. although I mostly had Haskell and ML in mind when defining the initial set of primitive functions.  Is APL functional?
 
  I also really like the idea of being able to read values from web pages since this is quite a bit easier and more general than parsing the underlying HTML.

Yes, right now it uses JQuery-style selectors for this (provided by the excellent JSoup library).  I also want to support REST-HTTP services.  JSON will convert very simply to LastCalc's Map and List representations.
 
I'm curious as to whether you think it might be possible to define a set of functions and then pass them the values as URL arguments.  If so, I could easily see using AJAX and JS to "submit" computation requests, perhaps even within an iFrame.  In effect this would create a form of embedded, programmable calculator.

I have pondered that too - could people write programs in LastCalc that would effectively become REST APIs?  It's definitely a possibility, although LastCalc's parser will probably never be as efficient as a normal programming language.  I have done a lot of optimization on it though, it's a lot faster than the initial version :-)
 
In short, it's already an intriguing concept.  With luck and a bit of effort from other contributors, I think it has the potential to become a very useful service.

Thank you!  I hope so too, and I will welcome any help you can provide.

Ian.

--
Ian Clarke

Reply all
Reply to author
Forward
0 new messages