
Avail Programming Language - wuschel
http://www.availlang.org/
======
markvangulik
I'm one of the authors. If you're concerned that what we built is a mere
natural language parsing engine, have a look here:

[https://www.availlang.org/about-
avail/documentation/faq.html...](https://www.availlang.org/about-
avail/documentation/faq.html#q3)

~~~
omaranto
That's a funny use of the word "mere"!

~~~
markvangulik
It was intended with humor, of course, but really creating a natural language
syntax is a tiny capability of Avail. We're working on the details at the
moment, but we're fairly certain that every programming language ever written
can become a mere dialect of Avail. Except running on the same jitted VM. And
trivially able to intermix with code in other languages, even in the same
module. Even within a _statement_. The RPN calculator example might give you
an idea of what we can do today. Also, "Quiz DSL.avail" might be of interest,
since it's not just traditional programming languages that Avail is going to
eat for breakfast. Brace yourself for what's coming.

~~~
kd0amg
I'm still a little unclear on what language extension looks like when you want
to do things other than adding new procedures. Do you have any examples of
manipulating evaluation order (like choosing to evaluate arguments right to
left or left to right, or handling certain arguments lazily) or adding new
binding forms or a custom type system?

~~~
markvangulik
At this exact moment, Avail can only evaluate expressions left-to-right,
except of course for functions (block expressions, using [] notation
resembling Smalltalk).

However, I'm close to completing the macro mechanism that will allow the same
flexibility of syntax present in method names (keywords/operator tokens,
argument positions, guillemet-enclosed repeated argument groups, etc), but for
constructs that run at compile time with parse trees instead of values. The
actual macro mechanisms have been working for some time, but were disabled
until we were able to represent the ~dozen syntactic constructs of Avail
purely as macros. Then any new syntax wouldn't be in conflict with existing
syntax. When that's working we'll toss the existing compiler (the one that
knows anything about Avail's current syntax, like statements and functions and
variable declarations), and use the compiler that knows nothing about Avail –
just how to parse methods and macros. Then we'll be able to support arbitrary
evaluation orders, declaration syntax, treating some expressions as lazy,
alternative scoping models, etc.

As for custom types, we're investigating ideas about carrying purity
annotations through user-defined control structures. Kind of hard to describe
in this forum, though.

------
sebastianconcpt
_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._

I like what's being tried here. Many people like to be expressive and think
while they talk. Is not unreasonable that they might want to program a system
using the same social trait. Specially to get things done evading the hard
dependency with programmers that have awful communication skills (close to
toxic some times).

~~~
ekidd
You can find plenty of programmers with excellent communication skills; you
might just need to look in other places or offer more money. People who
possess multiple valuable skills often demand a higher wage than people who
possess only one.

As for the language, the general idea of English-like programming is far from
new. Here are a few arbitrary historical examples, the most impressive of
which is Inform, a language for writing interactive fiction:

[http://inform7.com/learn/eg/bronze/source.html](http://inform7.com/learn/eg/bronze/source.html)

[https://cukes.info/](https://cukes.info/)

[http://en.wikipedia.org/wiki/HyperTalk](http://en.wikipedia.org/wiki/HyperTalk)

[http://www.csis.ul.ie/cobol/examples/Conditn/IterIf.htm](http://www.csis.ul.ie/cobol/examples/Conditn/IterIf.htm)

None of these revolutionized programming. The hard part of programming isn't
learning to read a specialized notation. The first hard part of programming is
learning how to think in a logical, step-by-step fashion without omitting even
the most intuitively obvious details. The second hard part of programming is
learning how to maintain a large, complex program as requirements change.
Neither of these is made much easier by writing in a rigid, artificial dialect
of English.

~~~
PMan74
> the general idea of English-like programming is far from new

Indeed
[http://en.wikipedia.org/wiki/COBOL](http://en.wikipedia.org/wiki/COBOL)

------
breckinloggins
I feel like many of us are searching and probing around the same space. It
definitely seems to be the case that existing programming languages are way
too rigid, but that the current popular example of "just make the language
whatever you desire" (Lisp) is not quite right, either. It's close, but just
far enough away that it seems alien.

I'll definitely be paying closer attention to this as it agrees with a lot of
hunches that I have about what's wrong with programming as we currently
practice it.

Thanks so much for the link. I'm taking notes :)

EDIT: Anyone who likes Avail, and particularly the points made in the History
section, should probably read CTM. [1]

[1] [http://www.amazon.com/Concepts-Techniques-Models-Computer-
Pr...](http://www.amazon.com/Concepts-Techniques-Models-Computer-
Programming/dp/0262220695)

~~~
smt88
In the web space, we're all actually looking for languages that are _more_
rigid (rebelling against PHP, JavaScript, Ruby, etc.)

~~~
breckinloggins
True, but in a language that's designed to quickly make other languages, the
rigidity can be controlled by the system architects.

An example of a current language with this philosophy is actually Typescript.
The gradual typing means that you, as a module designer, can choose to make
rigid exactly what you wish (and choose how much rigidity you require). If the
consumer of that module also uses Typescript, your rigidity requirements will
be respected.

The reason we don't think of programming languages as being per-project, per-
module, per-domain, etc, but rather as large global things is because we don't
currently have a clue how to do that (and if we did, we don't have a clue how
to make the tooling work). If and when we do, these types of conversations
will seem quaint.

One can hope, anyway...

------
untothebreach
Ha, I saw this mentioned in the post from yesterday about creating your own
language[1] and also went to check it out. It looks facinating, but I haven't
had time to really dive into it yet.

Anyone have more experience with it and care to weigh in?

1:
[https://news.ycombinator.com/item?id=9040029](https://news.ycombinator.com/item?id=9040029)

------
markvangulik
Just to whet your appetite, consider this:

Method "_plus_" is [ a : number, b : number | a + b ]:number;

Print: 5 plus 6;

The entire language is built this way.

------
al2o3cr
Looks like a static-typed version of AppleScript at first glance. It's hard to
say who this is targeted at - people who really want the English-like syntax
are going to squirm at things like "writer : [string]→⊤".

------
CUViper
Total tangent, but could someone start a .lang tld? We have so many that are
naming themselves this way, could be avail.lang, go.lang, rust.lang, nim.lang,
...

~~~
titanomachy
Awesome idea! Better ask these guys:
[http://www.iana.org/](http://www.iana.org/)

------
protomyth
Is there a language reference document? I didn't see one under the
documentation link.

~~~
markvangulik
Unfortunately there's no guide to walk you through the library. However, we
have code level documentation in a live searchable form here:

[https://www.availlang.org/about-
avail/documentation/stacks/l...](https://www.availlang.org/about-
avail/documentation/stacks/library-documentation/index.html)

There is also a strong beginning of a "cookbook" of expressions here:

[https://www.availlang.org/about-
avail/documentation/expressi...](https://www.availlang.org/about-
avail/documentation/expression-cookbook.html)

There's also coverage of a sizable chunk of Avail's type system here:

[https://www.availlang.org/about-avail/documentation/type-
sys...](https://www.availlang.org/about-avail/documentation/type-
system/index.html)

------
orkj
I was listening to Avail, the band, today. Great band.

(wonder if anyone from the HN crowd has ever heard of them).

Other than that, interesting project!

~~~
corysama
Please note that the HN community takes a rather strict approach when
moderating comments that contribute noise to the conversation. "Nice article!"
comments are routinely downvoted. As is sarcasm, witticisms, memes, references
and other styles of comments that occur frequently but do not contribute to
the discussion. It's a knowingly doomed attempt to hold back the flood of
noise that covers Reddit.

~~~
orkj
I agree with this approach.

Sorry about that

