
Learn Shen - dmmalam
http://www.shenlanguage.org/learn-shen/index.html#
======
fdr
It has an absolutely myopic and absurd license.

    
    
      http://www.shenlanguage.org/license.html
    

The strange part is "no derivatives that don't comply with the spec, even if
you rename it." It is not free software.

Unfortunately this is something I have to mention every time Shen is
mentioned, because I'm irate that, in spite of my interest in it, that both it
(and its predecessor Qi) insist on doing something so strange with no apparent
legitimate purpose (some kind of bogeyman of fragmentation killing the
project).

~~~
taotree
I think the license is worded rather poorly and that's unfortunate. I think it
would be better worded as this: if you create a port/version/mod of Shen, it
must be able to execute spec-compliant Shen code. That's it. You can do all
the changes, experimentation, etc. so long as it is somehow capable of
executing stock Shen code, it's allowed. I think that means that you can even
have a flag that toggles between "standard-compliant" and "everything-works-
different" because anyone with Shen code can set the flag to "standard-
compliant" and run their code. So that situation would be fully compliant with
that license.

~~~
kd0amg
_I think it would be better worded as this: if you create a port/version/mod
of Shen, it must be able to execute spec-compliant Shen code._

Who decides whether a language I come up with is a port/version/mod of Shen?
How much of Shen's features can I include without crossing that threshold?
Does that threshold move if I can point to other non-Shen languages as the
source of those ideas?

~~~
taotree
The license is for the software--the Shen implementation. If you don't use the
Shen implementation provided, then you're not subject to the license. If you
create a port/version/mod of Shen then you are using the software. The way
ports of Shen are created is by implementing Klambda. The provided Shen
implementation compiles Shen to Klambda, which your port then compiles to a
host language. So, unless you really want to clean-room reimplement the entire
Shen language (which is NOT how porting is intended to be done) then you're
using the software that is subject to the license.

------
ante_annum
I don't understand what Shen brings to the table that other functional
languages don't. Is there a concise imperative of why to learn Shen?

~~~
lmkg
It seems like Shen is a successor to Qi, which if I remember right, had a type
system that incorporated full-blown classical logic. If Shen follows in this
tradition, then its type system would be significantly more expressive than
standard functional type systems. It would allow not only arbitrary predicates
on input and output, but also relationships between them. Needless to say,
such a type system is Turing-complete, and therefore not guaranteed to
terminate.

Systems like this are usually used as theorem-proving systems, not actual
production languages. I think Qi was intended to be a practical language that
allowed arbitrary proofs about the properties of its programs.

I have not been able to find any reference to this in a quick perusal of
Shen's documentation.

~~~
pash
Standard type systems are Turing equivalent. This includes the type systems of
functional languages like ML and Haskell. In fact, there's a neat
correspondence [0] between algebraic data types and propositional logic
(examples in Haskell):

    
    
      union types (data T = mkTA A | mkTB B) <-> logical disjunction (A ∨ B)
    
            product types (data T = mkT A B) <-> logical conjunction (A ∧ B)
    
            function types (type T = A -> B) <-> logical implication (A → B)
    
                          the unit type (()) <-> true (⊤)
    
                                  bottom (⊥) <-> false (⊥)
    
    

(And, if you were wondering, that's where the symbol for "bottom" comes from!)

Inference on richer type systems, e.g., systems that support dependent types
(types built up from expressions about the values they represent) is in
general undecidable, which is why some dependently typed languages (e.g., Coq)
have type systems that are not Turing equivalent—the language designers have
consciously pared down parts of the type system in order to guarantee that
type-checking terminates.

0\. This is the Curry-Howard correspondence:
[http://en.wikipedia.org/wiki/Curry–Howard_correspondence#Cor...](http://en.wikipedia.org/wiki/Curry–Howard_correspondence#Correspondence_between_classical_logic_and_control_operators)

~~~
turnersr
Shen is an example of a language with a richer type system. Dependent types
can be implementated in Shen.

~~~
pash
Yes. My response was of course to clarify that "ordinary" type systems are
Turing equivalent and incorporate classical logic.

Dependent types correspond to first-order logic in the Curry-Howard
interpretation. I don't know much of anything about Shen, so I can't comment
further on it specifically.

By the way, limited dependent types can also be implemented in Haskell through
type-level programming. The paper that introduced this idea [0] is a good
read, and doing some type-level programming is a great way to get to grips
with the ins and outs of Haskell's type system. If you're interested in type-
level hackery, also be sure to read the HList paper [1].

0\.
[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.2...](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.2636)

1\. <http://homepages.cwi.nl/~ralf/HList/paper.pdf>

~~~
gtani
The argument is that agda is relatively straightforward for haskellers and
similarly, coq for ocaml devs to adopt. This is a good succinct example of
former. Coq has lots of tutorials

[http://www.cs.uu.nl/education/scripties/pdf.php?SID=INF/SCR-...](http://www.cs.uu.nl/education/scripties/pdf.php?SID=INF/SCR-2011-062)

There's also typed racket, which i don't know anything, it's been mentioned to
me as "theorems for free"

<http://docs.racket-lang.org/ts-guide/>

------
JacobGoodson
I think for macro enthusiasts, being able to program the reader directly(with
pattern matching) is a good selling point. It also has an inbuilt compiler
compiler.

------
d0m
I've bought the Qi book and have been enlighted by the language it describes.
I'm looking forward to play a bit with Shen and see how it compares to other
lisps.

------
coolg54321
Interesting logo! lol.

------
keithvan
Anyone else thought of Shen in League of Legends when this was posted? :)

~~~
jychang
Yep. Sharing a name with one of the most played characters in the most popular
multiplayer game in the world might not be very good for SEO, I assume.

A quick google for 'Shen' proves as much.

~~~
zokier
In my google search for 'shen', the language homepage is on 4. position.
That's pretty well for an obscure programming language imho. LoL character has
2 results and one video in the first page, so it's not really overpowering
other Shens.

~~~
hga
Errr, in the search I just did it's #3. But I guarantee you that has a lot
more to do with Google's knowledge of what I search for and am (potentially)
interested in than anything else.

