I believe, what Haskell is generating is list. What SETL is making, is set.
Could this syntax be used over any monad?
[edit] Of course, there are things like */[1..n] for finding factorial, but that is fold in Haskell. It's neat for scripting, and for me, for circuit complexity explorations.
I find that example rather discouraging. Generating a list of prime numbers is an interesting toy problem because it comes with certain expections. The trial divisors are 2,3,5,7,9,... that is two and then odd numbers. One is supposed to stop early, when one reaches the square root of p, and one is supposed to detect this efficiently by looking at the quotinent and spotting that it is less than the trial divisor.
This makes for messy code in any language. Which is very much the point. Will the language help you with the messiness of real applications? If the example ducks the challenge, that is a strike against the language.
Definitely agreed, that's one reason the jquery website wins. I don't want to dig through your documentation to get through to something tangible. Sometimes it's in "tutorials" sometimes it's in docs, sometimes it's plain not there or you need to download the whole package to get to samples. Shameful.
12 comments
[ 3.5 ms ] story [ 34.9 ms ] threadDoes anyone here have source of GNU SETL?
I find it really interesting and useful, and for ages there has been no source available or news...
show example code on the home page
You will save the audience a lot of time, and be able to convey a lot about your language in a much more concise way. Great for that first taste.
For example, the set-valued expression
is the set of integers 1 through n, and is the set of primes through n. (The first vertical bar here is best read as such that, and the second as a pause.)http://setl.org/doc/setl.html#Overview
Could this syntax be used over any monad?
[edit] Of course, there are things like */[1..n] for finding factorial, but that is fold in Haskell. It's neat for scripting, and for me, for circuit complexity explorations.
This makes for messy code in any language. Which is very much the point. Will the language help you with the messiness of real applications? If the example ducks the challenge, that is a strike against the language.
[1] http://en.wikipedia.org/wiki/ABC_%28programming_language%29
[2] http://en.wikipedia.org/wiki/Setl#History
[edit] There's list comprehension in Python... Are there set operations?
[edit2] [2]