Custom klambda files

47 views
Skip to first unread message

Artella Coding

unread,
Jun 16, 2013, 5:23:31 AM6/16/13
to qil...@googlegroups.com
Case under examination : One adds the remainder function (%) to the compiler, and then adds an ADDITIONAL klambda file with "(declare % (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))" in order to ensure that the "%" operator still works when the typechecker is turned on. 

Question : Does this conform to the license? If not then how does one make this conform to the license?



Key quotes from standard : 


Quote 1 : "However you are not free to modify Shen or produce a derivative versions of this work and distribute it unless what you produce conforms to the language standard."

Quote 2 : "There may be packages which offer a richer range of types for numbers (fixnum and bignum etc.) with much greater scope for optimisation within the compiler and which are platform specific. However these will be plugins, not in the language standard or in the standard maths library."

Quote 3 : "However anybody who implements Kl, and wants to write directly in this notation, can add extra features to their implementation to Kl. This does not affect the standard; just as a CL which includes (e.g.) threads does not cease to be a CL even though it incorporates a non-standard feature. However the systems code for Shen will not rely on extra features outside the standard. It is intentionally minimal."



Key quotes from license :

Quote 4 : "It is permitted to distribute versions of Shen which incorporate libraries, graphics or other facilities which are not part of the Shen standard"



Other quasi-relevant quotes : 

Quote 5 : "The speed gains of running on top of native code and using system equivalents are really little to do with the native type system and are best dealt with by macros which inline according to the platform. This can be done for standard lib maths but really cannot be done by one person given the range of platforms supported."

Quote 6 : "There is a facility for native code generation in Shen called 'dump' which takes a Shen file and dumps the corresponding file containing native code.  The spec for it is here 


The spec requires Shen be capable of generating KLambda code; but other platforms are optional.  It is probably useful for people to be able to get the JS code from Shen.  However it might not run outside Shen unless auxiliary functions are taken from the port."

Mark Tarver

unread,
Jun 16, 2013, 6:30:41 AM6/16/13
to Qilang
You are allowed to add facilities to Shen which are not part of the
language standard as long as the spec is not not broken.  If you are
writing code changes to Shen or KL source this would be derivative and
bound by the Shen license.  If you are writing something on top of
Shen e.g. a concurrency package then this is your work and the spec
and license are your choice.

Generally you would place this in a separate file because to place it
in a Shen system file would be to place it under the Shen license -
which would be meaningless if your work lay outside the standard.
Hence this sort of work is usefully part of a library.

What you are doing does not break the license as far as I can see; you
are simply adding a function with a new type.  This is done in
standard lib a lot.   Anybody can contribute to the library with the
only condition that some documentation is provided.

Regarding your addition, I'm sure that something like this is already
in the standard maths library.

Mark

On Jun 16, 10:23 am, Artella Coding <artella.cod...@googlemail.com>
wrote:
> *Case under examination* : One adds the remainder function (%) to the
> compiler, and then adds an ADDITIONAL klambda file with "(declare % (cons
> number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))" in
> order to ensure that the "%" operator still works when the typechecker is
> turned on.
>
> *Question* : Does this conform to the license? If not then how does one
> make this conform to the license?
>
> *Key quotes from standard :*
>
> http://www.shenlanguage.org/Documentation/shendoc.htm
>
> *Quote 1* : "However you are not free to modify Shen or produce a
> derivative versions of this work and distribute it unless what you produce
> conforms to the language standard."
>
> *Quote 2* : "There may be packages which offer a richer range of types for
> numbers (fixnum and bignum etc.) with much greater scope for optimisation
> within the compiler and which are platform specific. However these will be
> plugins, not in the language standard or in the standard maths library."
>
> *Quote 3* : "However anybody who implements Kl, and wants to write directly
> in this notation, can add extra features to their implementation to Kl.
> This does not affect the standard; just as a CL which includes (e.g.)
> threads does not cease to be a CL even though it incorporates a
> non-standard feature. However the systems code for Shen will not rely on
> extra features outside the standard. It is intentionally minimal."
>
> *Key quotes from license :*
> *
> *http://shenlanguage.org/license.html
> *Quote 4* : "It is permitted to distribute versions of Shen which
> incorporate libraries, graphics or other facilities which are not part of
> the Shen standard"
>
> *Other quasi-relevant quotes :*
>
> https://groups.google.com/forum/#!msg/qilang/fmJ7Fowd13Q/jiUlOjx2cFMJ
> *Quote 5* : "The speed gains of running on top of native code and using
> system equivalents are really little to do with the native type system and
> are best dealt with by macros which inline according to the platform. This
> can be done for standard lib maths but really cannot be done by one person
> given the range of platforms supported."
>
> https://groups.google.com/forum/#!msg/qilang/d0HtkbymiSM/u6mKPltH_8gJ
> *Quote 6* : "There is a facility for native code generation in Shen called

Mark Tarver

unread,
Jun 16, 2013, 8:39:11 AM6/16/13
to Qilang

I want to add something parenthetically about the Shen sources and how
they are distributed.

Shen is bound by a strict standard of functionality embodied in a
license which says effectively that 'this has to work'.  We've got 126
tests in the test suite to back it up and Greg has devised more.  The
Shen sources freely available on shenlanguage.org are the best
physical instantiation of this standard to date and they are
constantly revised to eliminate bugs and improve the spec.  This
summer an improved TBoS comes out with 490 pages of text describing
exactly what Shen should do.

The situation with these sources is rather like the standard kilo kept
at the International Bureau of Weights and Measures in Paris (http://
www.bipm.org/en/scientific/mass/prototype.html).  Other kilo weights
are derived from the standard which is the canonical arbiter of
weight.  If we had a situation where say, there were 20-30 standard
kilos then any conflict would be scientifically and economically
disastrous.  Just as much as it would be damaging to multiple
conflicting Shens or Shens that had been hacked, possibly with best
intentions.  This adherence to standards is what has allowed us, on
slender resources, to be successful in moving Shen to 9 platforms and
3 operating systems.  Hence the absence of github for the standard
sources - even though for library work, github is fine and has been
used as such since Shen appeared.

This is just to say that if you want to hack Shen sources for your own
learning within the frame of the license do so.  It is legal. But if
you want to use this space to advertise your sources as forming the
standard, then I'd be obliged to investigate that.  I really don't
have the resources to manage other people's experiments here, or
police two standard sources and keep them in harmony with all the
potential for complexity and I'm very reluctant to be drawn into that.

Mark
Reply all
Reply to author
Forward
0 new messages