Working with Shen in the cloud

132 views
Skip to first unread message

Willi Riha

unread,
Jul 21, 2016, 8:27:31 AM7/21/16
to Shen
I have just beta-tested a version of Shen in the cloud - SP 10.   It was fascinating to phone Mark, and then find that without having to do anything myself or reinstall the software, the bugs disappeared the next day.   Altogether I have to say that Shen is rather fun at the moment.

SP 10 is inherently concurrent; a background process relays to the graphics and SP 10 depends on earlier versions of SP.  My work continues on the maths library.  I'm hoping to add rationals, complex numbers and random number generation to SP.     The maths lib will come with its own graphical skin in due course and I hope to have some input into that design.

Willi

Neal Alexander

unread,
Jul 21, 2016, 12:58:19 PM7/21/16
to Shen
Have you looked into having some abstract algebraic structures in Shen like monoids/groupoids etc? Then shen->kl transformation should be able to flag pure functions.

Willi Riha

unread,
Jul 21, 2016, 1:45:39 PM7/21/16
to Shen

Willi Riha

unread,
Jul 21, 2016, 1:47:50 PM7/21/16
to Shen


On Thursday, July 21, 2016 at 1:27:31 PM UTC+1, Willi Riha wrote:

Willi Riha

unread,
Jul 21, 2016, 1:57:15 PM7/21/16
to Shen


On Thursday, July 21, 2016 at 1:27:31 PM UTC+1, Willi Riha wrote:
Sorry, something must have gone wrong with my reply!

 "Have you looked into having some abstract algebraic structures in Shen like monoids/groupoids etc? "

Not really, but abstract algebra has always fascinated me! I have resisted the temptation to play with groupoids, and other simple algebraic structures in Shen, as I have always assumed that nobody would be interested in them. I have amused myself though, a couple of years ago, to do vector arithmetic over small finite fields.


"Then shen->kl transformation should be able to flag pure functions." This remark is thoroughly cryptic and would need further elaboration!

Neal Alexander

unread,
Jul 21, 2016, 4:48:06 PM7/21/16
to Shen
Sorry, I meant that the Shen code generator should be able to determine which procedures are pure mathematical functions - e.g. with no side effects, like system I/O, that would break certain laws like associativity. Pure functions can be called by the system less (maybe via sub expression elimination), or more than specified, without causing strange behavior. It's a useful property if you want to do "algebraic computing" and also gives extra optimization information for code generating back-ends (see https://lwn.net/Articles/285332/).  

Monoids appear frequently, and are quite useful and easy to understand (see http://apfelmus.nfshost.com/articles/monoid-fingertree.html)

On a separate topic, Its also interesting to consider how different data structures act when used as the fundamental control structure for a programming language. List worship gives you lisp. Stacks yield concatenative languages / Forth. What strange language would lattices produce? Maybe it could be interesting for parallel computing or combinatorial problems.

Mark Tarver

unread,
Jul 24, 2016, 3:52:09 AM7/24/16
to Shen
There's an old thread on this - https://groups.google.com/forum/?hl=en#!searchin/qilang/gruppoid/qilang/D3tmhQvfnOE/fKgddlbhWxwJ - which deals with representing structures in abstract algebra in typed Shen.

Mark

Robert Herman

unread,
Jul 30, 2016, 10:13:59 AM7/30/16
to Shen
Would APL/J fit the 'lattices' programming category you posited? They are based upon array manipulation at the core. K is an array language too, but list-based, and is closer to Lisp in that aspect.

I am very interested in PLs as 'Tools for Thought', especially mathematical thought, so Shen shines bright in potential here.

I personally look to Shen to replace my affairs with Idris, J and Lisp ;) Time to settle down with one PL at this point in my life!

Rob
Reply all
Reply to author
Forward
0 new messages