6 ms·
On the world's most wonderful programming language - SETL
- stralep 16y agoDoes anyone work on GNU SETL? Does 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...
- mkramlich 16y agoI propose a minimum standard for all programming languages: 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.
- stralep 16y agoI agree... But it is not my web site :) For example, the set-valued expression {1..n} is the set of integers 1 through n, and {p in {2..n} | forall i in {2..p-1} | p mod i /= 0} 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 http://setl.org/doc/setl.html#Overview
- gmartres 16y agoThat made me think of Haskell, so to compare here is the equivalent(and of course totally inefficient) Haskell version: [p| p <- [2..n], all (\i -> p `mod` i /= 0) [2..p-1]] So, has this language more to offer than list comprehensions?
- stralep 16y agoI 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.
- kapuzineralex 16y agoSo all the fuzz is about the fact that SETL has builtin support for sets? Really, I don't mean to be a troll, but is that it?
- alan-crowe 16y agoI 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.
- makmanalp 16y agoDefinitely 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.
- fisadev 16y agodo you know Python? :)
- jlcgull 16y agogotta agree, that code does look very pythonish...
- stralep 16y agoWell... SETL influenced ABC, which influenced Python. [1][2] [1] http://en.wikipedia.org/wiki/ABC_%28programming_language%29 http://en.wikipedia.org/wiki/ABC_%28programming_language%29 [2] http://en.wikipedia.org/wiki/Setl#History http://en.wikipedia.org/wiki/Setl#History [edit] There's list comprehension in Python... Are there set operations? [edit2] [2]
- deleted 16y ago[deleted]