Permalink
Browse files

Requires constant reindentation when splitting a message chain in sev…

…eral lines. Update readme.
  • Loading branch information...
macournoyer committed Jul 4, 2009
1 parent ef40267 commit 8ae5b63f75d51fadd1c5a299e0849a8027321254
Showing with 32 additions and 20 deletions.
  1. +26 −15 README
  2. +3 −2 samples/simple.min
  3. +2 −2 src/min/lang/Scanner.java
  4. +1 −1 src/min/lang/Scanner.rl
View
41 README
@@ -1,25 +1,36 @@
THE MIN LANGUAGE
-Min is a Prototype-based language with syntax inspired by Io and Ruby topped
-with Python's indentation. It's aimed at being the most readable and powerful
-language ever, really. Oh, and fast too (but fast enough rather then fastest).
+Min is a Prototype-based language with syntax inspired by Io and Ruby, topped
+with Python's indentation (but only when you want to). It's aimed at being the
+most readable and powerful language ever, really!
+Oh, and not too slow (running on the JVM).
+
+ Min = Io clone do:
+ you_can indent to("create blocks")
+ you_can indent
+ to("split a message chain in several lines")
+
+ initialize = method:
+ @it = "rly looks like Ruby"
+ @but = "with lots of Io flavor"
+
+ if(indentation == confusing?("sometimes"),
+ use () like in(Io)
+ )
== Philosophies
* Everything is an object.
-* No special magic statements (if, def, while, +, &&), everything is a method
- call.
-* Open, extensible object model.
-* Only 4 core constructs: Closure, Object, VTable and Literals.
-* As close to English as possible.
+* Everything is a message, no special magic statements (if, def, while, +, &&).
* As little parenthesis as possible.
+* Most of the core is open.
+* As close to English as possible.
-== Credits
-The language constructs are derived from Io by Steve Dekorte
-<http://www.iolanguage.com>.
-Parts of the LOBBY design are taken from Potion by _why
-<http://github.com/why/potion>.
-khash.h and kvec.h are (c) Attractive Chaos <attractivechaos@aol.co.uk>
+== Features
+* Running on the JVM
+* Indentation is an option
+* Ruby-like syntax
+* More to come...
== License
-MIT License, (c) Marc-Andre Cournoyer <macournoyer@gmail.com>
+MIT License, (c) macournoyer
View
@@ -1,5 +1,6 @@
say = method(this,
this println
+ "great!"
)
# is the same as
say = method(this):
@@ -16,10 +17,10 @@ i_need = Need clone
i_need $ println
# indentation w/o the ':', allows you to continue
-# the message chain and allign stuff like you want
+# the message chain on different lines
i_need
a("muffin")
- println
+ println
method:
"a"
@@ -363,7 +363,7 @@ else if ( data[p] > _Scanner_trans_keys[_mid+1] )
debugIndent(lineno, "/", indent);
} else if (indent == currentIndent) { // same block
debugIndent(lineno, "=", indent);
- if (inBlock) pushTerminator();
+ pushTerminator();
} else if (inBlock && indent < currentIndent) { // dedent
debugIndent(lineno, "-", indent);
indentStack.pop();
@@ -437,7 +437,7 @@ else if ( data[p] > _Scanner_trans_keys[_mid+1] )
debugIndent(lineno, "/", indent);
} else if (indent == currentIndent) { // same block
debugIndent(lineno, "=", indent);
- if (inBlock) pushTerminator();
+ pushTerminator();
} else if (inBlock && indent < currentIndent) { // dedent
debugIndent(lineno, "-", indent);
indentStack.pop();
View
@@ -58,7 +58,7 @@ public class Scanner {
debugIndent(lineno, "/", indent);
} else if (indent == currentIndent) { // same block
debugIndent(lineno, "=", indent);
- if (inBlock) pushTerminator();
+ pushTerminator();
} else if (inBlock && indent < currentIndent) { // dedent
debugIndent(lineno, "-", indent);
indentStack.pop();

0 comments on commit 8ae5b63

Please sign in to comment.