Written on Sun, 17 Jan 2010 22:07:24 +0000 - Last updated on Mon, 08 Feb 2010 17:19:22 +0000 Conceptual programming language intended to blur the distinction between files and variables. N9I allows local and remote file accesses through a variety of protocols, as well as a simple namespace, module, and class system. Objects may be strictly typed or typeless. Functions and methods are first-class objects.
N9I Principles and Goal
Abstraction of I/O
The foremost principle of N9I is to abstract away what needs abstraction. Current mechanisms for I/O require specialized in...
read more
Written on Fri, 29 Jan 2010 21:26:15 +0000 - Last updated on Sat, 30 Jan 2010 05:59:31 +0000 Basic class
public class MyClass {
private boolean flag;
public MyClass() {
flag = true;
}
public GetFlag() {
return flag;
}
public SetFlag(boolean newFlag) {
flag = newFlag;
}
}
Main method using that class
public void main(string[] args) {
MyClass myC = new MyClass();
myC.Flag = true;
}
At operator usage
@"someObject" = myObject;
Written on Wed, 03 Feb 2010 07:10:15 +0000 - Last updated on Sun, 11 Apr 2010 17:57:14 +0000 A journal entry in the development of the N9I programming language, dated February 2, 2010.
At operator changes
The at operator (@) will be expanded to deal with
2 identifiable sources of data: "resources" and "providers".
Also, strings marked with the at operator cannot contain escape sequences (such as \n) and unescaped backslashes are allowed.
Resource
A
resource is an item, located locally or remotely, that can be accessed with a name,...
read more
Written on Thu, 04 Feb 2010 07:34:43 +0000 - Last updated on Fri, 05 Feb 2010 07:25:50 +0000 A journal entry in the development of the N9I programming language, dated February 3, 2010.
Syntax for creating a server socket with the at operator
The at operator (@) accepts a string in the format
host:port. This creates a Provider object representing a connection to the specified
host on port
port. To do the reverse, that is, create a server socket with the at operator, simply leave the
host part blank:
ProviderAlias clien...
read more
Written on Fri, 05 Feb 2010 07:06:50 +0000 - Last updated on Tue, 09 Feb 2010 08:01:50 +0000 A journal entry in the development of the N9I programming language, dated February 4, 2010.
Annotations for Object Properties
N9I supports the following annotations that can be placed above object methods:
#@get Foo
public Object getFoo() ...
#@set Foo
public void setFoo(Object foo) ...The @get and @set annotations indicate which methods N9I should use when client code tries to read from or write to a property:
read more
Written on Fri, 05 Feb 2010 19:46:58 +0000 - Last updated on Fri, 12 Feb 2010 20:22:24 +0000 A journal entry in the development of the N9I programming language, dated February 5, 2010
Annotations for Casting Methods
Many object-oriented languages include methods such as a "to string" method to conveniently "convert" an object to another type. N9I extends this by including a method annotation, @to, which indicates methods that can "automatically" convert objects to another type.
For example, the way to declare a to string method in N9I is the following:
read more
Written on Tue, 09 Feb 2010 07:45:24 +0000 - Last updated on Tue, 09 Feb 2010 08:15:21 +0000 A journal entry in the development of the N9I programming language, dated February 8, 2010
Annotations for Validation
In N9I, functions and methods may be marked with an annotation @validate that instructs N9I to perform some sort of check on a parameter. Validation may either "test" or "adjust" a parameter. Test means that the validation is expected to return true or false, and a value of false during "test" validation causes N9I to raise an error and refuse to enter the ...
read more
Written on Fri, 12 Feb 2010 20:11:50 +0000 - Last updated on Fri, 12 Feb 2010 20:29:22 +0000 A journal entry in the development of the N9I programming language, dated February 12, 2010
Annotations for creating objects out of other objects
As discussed in N9I - 2/5/2010, the language supports "casting" methods - i.e. methods that "cast" an object into another one. For example,
#@to String
public String toString() ...creates a method that automatically "converts" the object into a string whenever a string is needed:
// a...
read more
Written on Fri, 26 Feb 2010 06:45:06 +0000 - Last updated on Fri, 26 Feb 2010 07:01:28 +0000 A journal entry in the development of the N9I programming language, dated February 25, 2010
Revision to annotation syntax
In the following notes:
- N9I - 2/4/2010
- N9I - 2/5/2010
- N9I - 2/8/2010
- N9I - 2/12/2010
a language feature called "annotations" is discussed. Annotations provide a way for programmers to attach metadata to logical code units, such as methods and classes. In N9I, annotations are used primarily for three functions:
...
read more
Written on Sun, 11 Apr 2010 17:39:36 +0000 - Last updated on Sun, 11 Apr 2010 17:47:36 +0000 A journal entry in the development of the N9I programming language, dated March 16, 2010
N9I Compiler
Phase I: Intermediate XML format
The first stage of N9I compilation is translation to the N9I Intermediate XML (NIX) format. NIX describes functions, objects, and namespaces in XML language. XML is used because XML parsers are ubiquitious. NIX may be plaintext or gzipped. Using a standard language such as XML also make it easier to target other languages to the N...
read more
Written on Sun, 11 Apr 2010 17:41:05 +0000 - Last updated on Sun, 11 Apr 2010 17:47:24 +0000 A journal entry in the development of the N9I programming language, dated March 17, 2010
Casting via Assignment to Existing Objects
In the entry N9I - 2/12/2010 casting annotations "to" and "from" were discussed, which allow the programmer to transparently juggle objects between types. However, the from annotation in that example was applied to a static method. That example described creating a new object "from" an existing one.
This note explains how to add the "...
read more
Written on Sun, 11 Apr 2010 17:42:40 +0000 - Last updated on Sun, 11 Apr 2010 17:47:11 +0000 A journal entry in the development of the N9I programming language, dated April 1, 2010
Panthalassa
This note describes a language for building portable user interfaces. Panthalassa (abbreviated pants or P) is the codename for this language.
Goals
Panthalassa aims to be usable with any framework or platform. Where possible, Panthalassa will use the platform's existing widget toolkit to render controls, to minimize dependencies.
Panthalassa will have the ability ...
read more
Written on Mon, 19 Apr 2010 01:00:57 +0000 - Last updated on Mon, 19 Apr 2010 01:19:56 +0000 A journal entry in the development of the N9I programming language, dated April 18, 2010.
Named parameters
A feature I'm considering is allowing parameter names to be specified in a function call. For example, for function
public void foo(int bar, string baz, Object qux) ...
an appropriate call to this function might be
foo(10, "an argument", new Object());
However, this might also be possible:
foo...
read more
Written on Wed, 12 May 2010 06:57:52 +0000 - Last updated on Wed, 12 May 2010 06:59:12 +0000 A journal entry in the development of the N9I programming language, dated May 7, 2010
Tools
The first version of the Naitekiakki toolchain will be written in Python for cross-platformity, although certain build targets may require specialized environments.
Phase 1 Compiler
The phase 1 compiles Naitekiakki source code to intermediate object code. There is a Python C parser called pycparser, this can be extended since the language is based on C.
Phase 2 compi...
read more
Written on Wed, 12 May 2010 23:14:50 +0000 - Last updated on Sat, 12 Jun 2010 03:48:07 +0000 A journal entry in the development of the N9I programming language, dated May 12, 2010
An attempt to describe syntax
This is an attempt, using code examples, to describe as much Naitekiakki ("N9I") language syntax as possible.
Each main-level (largest) heading represents one project, while each secondary-level (smaller) heading represents a complete file, with location relative to some hypothetical project root. These hypothetical projects have no relationship to each oth...
read more
Written on Sun, 20 Jun 2010 20:07:07 +0000 - Last updated on Sun, 20 Jun 2010 20:15:37 +0000 Main Function Examples
Traditional
public void main(string[] args) {
...
}Example invocation: example arg1 arg2 "arg3 with spaces"
Named arguments
public void main(string[string] args) {
...
}
Example invocation: example --arg1:foo --arg2:bar "--arg3:arg with spaces"
Specific arguments
public void main(string name, int age) {
...
}Example invo...
read more