Category:Wart

From Rosetta Code
Revision as of 22:57, 26 September 2013 by Kartik Agaram (talk | contribs)
Language
Wart
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Wart.

Wart is an experimental, dynamic, batshit-liberal language designed for small teams of intrinsically-motivated programmers. Wart is based on lisp, but with a cleaner syntax and more powerful primitives to help non-lispers appreciate the power of lisp. Wart was designed with several questions in mind:

  • How far can we simplify the syntax of lisp without compromising the power of lisp macros? Wart has several features to help make codebases more pleasurable to read and easier to ramp up on.
    1. While lispers can continue to write fully-parenthesized lisp, wart provides a whitespace-sensitive syntax that is easy to get used to and eliminates most parentheses for the convenience of non-lisp readers.
      if (odd 3) "odd"
    2. Wart provides infix operators in an elegant way without compromising homoiconicity or macros. Infix operations provide only one precedence rule: operators without whitespace are evaluated before operators with whitespace.
      (n * n-1)  # does what you think
      The catch: infix characters like dashes can't be used in names, unlike traditional lisps.
    3. All functions can be called with keyword arguments as needed, using aliases so both caller and callee can use the right name for them.
def (subtract a|from b)
  a-b

 subtract 4 3
 => 1

 subtract 3 :from 4
 => 1
  • What would a language ecosystem be like without any backwards-compatibility guarantees, super easy to change and fork promiscuously? Wart has no version numbers, and new versions and forks are free to change all semantics to their hearts' desire. Instead of a spec or semantics, we rely on automated tests. Wart is thoroughly tested, and wart programs are expected to be thoroughly tested as well, and to buy in to the investment of needing to make changes during upgrades. The hope is that upgrade effort might be higher than the best-case scenario in other languages, but the worst-case time will remain tightly bounded.
  • What would a language look like with an emphasis on a parsimonious and harmonious system of names? This is only possible if the language has no reserved words, and even primitives can be overloaded in arbitrary ways. So you never end up with constructions like 'my_if' or 'append2' or 'queue_length'. (More info: http://akkartik.name/blog/readable-bad)
  • Can a language implementation remain intelligible to outsiders over time, especially under pressure to run fast? Wart is exploring experimental primitives in the core interpreter that will make partial evaluation as easy as passing code through eval multiple times.

These are all hard open questions, not expected to be definitively answered anytime soon. Wart is an experiment, and looking for feedback from people unafraid to bounce between language and implementation. If that's you, check it out: http://github.com/akkartik/wart#readme