Dashboard > Mantra > The Mantra Programming Language
  Mantra Log In | Sign Up   View a printable version of the current page.  
  The Mantra Programming Language
Added by Terence Parr, last edited by Terence Parr on Aug 30, 2008  (view change)
Labels: 
(None)

Welcome

Mantra (Hindi for "magical incantation") is a new dynamically-typed programming language that is syntactically similar to Java but with the flexibility and ease of programming of Ruby or Python. Mantra is not an interpreted language. Source code is translated to Java and so mantra programs integrate trivially with plain Java code.

Mantra is meant as a research platform and to teach language design and implementation. Nonetheless, it should prove a nice little language.

Downloads

Bugs

Previous versions


Last changed Aug 30, 2008 16:45 by Terence Parr

Prashant Deva built a Mantra plug-in for Eclipse that does syntax highlighting and such for Mantra. Portions of the code are Eclipse EPL licensed; rest written by Prashant.

Posted at 30 Aug @ 4:43 PM by Terence Parr | 0 comments
Last changed Jun 25, 2008 17:50 by Terence Parr

I realized that we need the notion of a tuple like Python. List [1,2] is fundamentally an ordered thing not an aggregate of two elements. A tuple (1,2) treats those as separate elements whereas I can think of the list as one thing if I pass it to a function. A tuple is not accessed like a list and really is used to only hold multiple values. I could use this for parallel assignment, but I don't have that and I'm not sure I want it....

Posted at 25 Jun @ 5:49 PM by Terence Parr | 0 comments

You can now refer to any regular Java object from within mantra simply by using a variant on the import statement:

import java java.util.Vector;

Vector v = Vector();
v.add("hi");
v.add(34);
println(v.toString());
println(v.get(0));
println(v.get(1));

Field access works as well for now, it translates only string and integer objects to mantra objects. For other objects, it leads them as Java objects wrapped in a JavaProxyObject.

Posted at 08 Feb @ 11:52 AM by Terence Parr | 0 comments

imports allowed with main programs / scripts now.

import a::b;
println("hi");
Posted at 31 Jan @ 2:10 PM by Terence Parr | 0 comments

added for-each construct.

Posted at 03 Nov @ 4:28 PM by Terence Parr | 0 comments

Getting enough downloads of Mantra now that I decided to create the wiki and use it as primary documentation etc...

Posted at 16 Oct @ 1:38 PM by Terence Parr | 0 comments


 
Recently Updated
by Terence Parr (30 Aug)
Mantra Eclipse plug-in (editor only)
by Terence Parr (30 Aug)
The Mantra Programming Language
by Anonymous (13 Aug)
Re: Mixins
by Terence Parr (25 Jun)
Added python-like list comprehensions and tuples
by Carmel Avnon (03 Apr)
How do I install this damn thing?
by Terence Parr (08 Feb)
Examples
by Terence Parr (08 Feb)
Added JavaProxyObject!
by Anonymous (06 Feb)
Re: Dynamic mixins and delegation
by Terence Parr (31 Jan)
Mantra 1.0a5 release
by Anonymous (30 Jan)
Re: What idiot thought we needed another language?

Wiki Contents

Documentation (Mantra)
Examples (Mantra)
Features (Mantra)
Frequently asked questions (Mantra)
License (Mantra)
Mantra Implementation (Mantra)
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators