The Avail Programming Language
availlang.org
availlang.org
Most software systems have become needlessly complex. We rebel against that complexity, fighting it with the most powerful tool available, language itself.
Take a look at http://www.rebol.com/oneliners.html for some very impressive one-liners like the one below (downloads and prints a web page source):
print read http://www.rebol.comBut for a little story time: I've started my first major project in Haskell while sick the past week, and it had me asking lots of questions:
Why do I have to add so many parentheses to get it to compile? Why can't I just pass monads into my functions? Why is every function not polymorphic? Why do I get so many pattern matching errors even with -Wall? :( The last one stings the most, believing my program would never crash. But every function being polymorphic really got me thinking, since instancing type classes with Monads was my first instinct. It felt so natural.
instance (Monad m, Num a) => Num (m a) where
(+) = liftM2 (+) -- ((return 123) + (return 321)) -- yipee!
...
I realize that type classes are global, and could have cascading problems. Even still, this made me want to prototype a language where all functions are polymorphic, but after looking over Avail, it seems to answer all my questions. It feels like a Lispy haskell; static type checking, with context sensitive polymorphism.With this kind of polymorphism, one of my first thoughts was what the code compiles in an unintended way due to the way I specified. The metaphor I thought of to reason about this was: a copilot in the car tells you "Turn right here". Are they saying to turn right at the next intersection, or that this is the intersection that you should be turning at? This example shows succinctly shows that it's a problem with the language being define (i.e. the code), that "right" is overloaded to mean a direction, or immediately.
Anyways, I would love for anyone to weigh in, since I've been thinking about this a lot recently!
[1] http://en.wikipedia.org/wiki/Shakespeare_(programming_langua...
I hope your programs never crash, and in the meantime could you explain what
> Why do I get so many pattern matching errors even with -Wall?
means? Perhaps you meant:
> Why do I get so many pattern matching errors because of -Wall?
These are incomplete-pattern-match warnings, yes?
One thing that makes this a more difficult language for me to really get behind is the (required?) use of Unicode characters. That will take a bit of getting used to, as I am not in the habit of using ANY Unicode for anything.
I will still give this a chance, though. I'm always open to trying new ideas in the programming head-space.
Is there a reason why you have something like:
newGame ::= a game of Wump the Wumpus;
as opposed to: newGame is a game of Wump the Wumpus.Anyway, Avail looks very, very interesting, like it's a combination of Smalltalk, REBOL and Coq (although it's just an uneducated impression for now).
"In the articulate programming paradigm, a programmer undertakes a project by developing a domain-appropriate lexicon and phraseology which are leveraged directly to implement a solution that is readily accessible to domain experts and software experts alike. Articulate programming is nothing more, and nothing less, than using the right language and conceptual framework for the job."
That's very similar to the common approach in Lisp of building the language up to reflect the problem domain.
Lisp, however, has the advantage of a minimal syntax that allows the programmer to extend the core language transparently. I'm not sure how possible that is in this language.
Dialecting is the more common term I've come across - http://en.wikipedia.org/wiki/Dialecting
tell application "Terminal" to get the name of current settings of the selected tab of the front windowAnd typing unicode isn't annoying at all after you are used to it. I'm using XCompose all the time, so typing ½ or «» or λ is completely natural to me.