LtU Forum

New OMeta-related material

Toward A More Scalable End-User Scripting Language. Alessandro Warth, Takashi Yamamiya, Yoshiki Ohshima, Scott Wallace.

OMeta an OO Language for Pattern Matching (slides). Alessandro Warth and Ian Piumarta.

Previously on LtU.

Thanks to Chris Neukirchen for the pointers.

time as a first class value?

Are there any languages or underlying algebra/calculi which make time a first class value?

In other words, instead of saying "send value X to object/actor Y," I'd like to say "send value X to object Y in 5 minutes." Or something like "do something starting at 1:00 am and every 5 minutes thereafter until 3:00 pm."

I realize that I can put a Java thread to sleep, until I need the action done or make time a signal (as done in FrTime) use the "dur" operator in JavaFx. However, I'm hoping to find some theoretical work rather than programming techniques. As far as I can tell, Lambda calculus, the Actor model and Pi-calculus don't deal with time directly.

Does anyone know of work done on co-data-types?

There has been a lot of work done on co-data and stream programming, but the assumption is usually of a very simple repetitive data stream. Has anyone done any work on highly structured co-data or co-data-types? A data structure passed into a function represents a limit on all of it's constituent types, that is, the structure must be fully constructed (AND logic) before the function can be called. But a co-data structure (co-type) passed into a function represents a co-limit and only needs to be partially constructed (OR logic), perhaps the function can even return partial (co-data) results based upon the co-data-type it receives. This seems to me a very relevant topic for advancing stream programming and the exploitation of multiple layers of data parallelism.

Jura, a OOMP language and potential DBMS

I am surprised to not find any results on LtU for Jura, which looks like a promising alternative to Java:

Jura is a data language and there is no difference between source code and data. However, Jura goes one step further - there is no difference between the jura text file that represents an object instance and the code required to create that object programmatically...Jura can be used to represent any structured data, not just classes. A Jura file can be created which corresponds to an instance of any Jura class...Jura allows such data files to be saved or loaded and validated at the language level. A Jura objectloader (corresponding to a Java classloader) is able to load and validate any structured data, not just classes.

Even though it's not persistence-inference, it is language-integrated persistence, which is a large leap ahead of manually coding persistence in LISP and Lua.

Jura also supports generic programming, abilities (somewhat like Smalltalk traits), restricted types, and transforms (similar to XSLT). In short, Jura seeks to abstract away OOP design patterns--it is object-oriented metaprogramming (OOMP).

Signals in an OOPL

In UML the boxes used to describe classes have three compartments: attributes, operations, and signals. This brings up an interesting question: should an OOPL deal with signals (and signal handlers) as primitive constructs that are independent from operations (i.e. methods). Of course we can implement signals as objects, and signal handlers as operations in a library, but perhaps it is so fundamentally useful that a language should support it natively. Especially given the trend towards concurrency in software. I only have vague ideas of how this could improve things, but I think that it could simplify writing concurrent programs by the programmer, since the compiler can identify the concurrency patterns, and verify the code.

I'd love to hear people's thoughts on the subject.

Latest usability for polymorphism?

Thinking about Scala recently (trying to grok now self types are used), I found it interesting to note that there are many features of a language's semantics which must play together well. E.g. there several types of polymorphism. I wonder how best a language design can make all the semantics usable (as in usability) in the three contexts of: writing code, compiling code, and running code? I think for me Scala might have gone too far, as others have said. Sounds like Fortress is considering self types as well. I guess I wonder if there will some day be a way to abstract the semantics somehow to keep the usefulness but lower the mental load on the developer.

I expect some people think this sounds like a weak developer looking for an easy way out; that isn't totally true in my case. :-) At the very least I think a devil's advocate could suggest that something complicated won't get far in industry.

[edit: hm, apologies if this sounds too much like already discussed thoughts. I guess I am (re) asking the question how far along the strict typing path to go before things collapse under their own weight, and people won't use it.]

Adding Concurrent Constructs to a Language with State

There is a lot of discussion on LtU, past and present, about the advantage that a pure functional language has w.r.t. concurrency, but for several reasons that I won't go into here, I am designing a non-pure multi-paradigm language called Virgil. Originally I focused on making the language usable for microcontroller programming, which is an interrupt model that I managed to accomodate without introducing any constructs for concurrency. Virgil had no synchronized { ... } blocks, no atomic { ... } regions, and no event system. Instead, the programmer could attach methods to what I called entrypoints which represented where control would transfer to in the event of an interrupt (or nested interrupt). Thus a one stack model would suffice. Managing mutual exclusion was done manually by manipulating hardware state.

But now I want to make Virgil into a larger, more complete language. I have been redesigning the syntax a bit and building a new compiler in the language itself, bootstrapping off the earlier compiler's interpreter which I wrote in Java.

I am faced with the question of what concurrency constructs to introduce, and how they can express these kinds of concurrency:

- Interrupts: e.g. in a one-stack interrupt-driven microcontroller
- Events: e.g. in a GUI framework
- Async IO: e.g. in a high-performance IO subsystem for a webserver
- Threading: e.g. multiple concurrent threads of computation for multicore
- (others)

It seems that other languages have made the leap from a single-thread, non-current model to a different model either through the introduction of monitors and thread (e.g. Java), a threading library (e.g. C), atomic regions (e.g. nesC), or other language mechanisms.

I'm curious if people have advice in this direction.

Languages and data conversions.

Hi,

This is my first post to these forums, so I'm not sure its exactly the best place. If anyone can suggest a better places for the topic then I'd be very interested in hearing them. Also, I'm not sure exactly on the latest terminology so I'll explain in a bit more detail to start of what I'm attempting to do. Ok, that's the disclaimers out of the way.

I am currently designing a new programming language that is based on a non-text based representation. That is, you will need a more complex editor than just a text editor to modify the code. The programmer will be editing the AST directly. The aim of this programming language will be that everything will be stored & communicated in the same format. That includes language, the byte code, the data, etc. The language will be Object oriented with a lisp feel (closures, etc).

I know the idea of developing a programming language that is non-text based is not original. Does anyone know of any university or other projects that have developed this type of system?

The real reason for this post is that I'm interested in how this type of programming will change the semantics and basic structure of the language. An important aspect of this language will be modifying objects to become data, making objects from data, transforming data and executing data (ie transforming data to a series of instructions).

I'll show a few examples to explain what I'm talking about.

Objects to/from data
--------------------

I'll explain using a simple made up class.

class Foo {
int x;
String str;
Bar b;

int getX()
{
return x;
}
....
}

The Foo class will need to be transfered in communications, written to file etc. However, a lot of the time what is transfered is different from the data format. Lets say I have two formats:

Data FooData: { u32["x"], u8ascii["str"], BarData["b"] };
Data BasicFooData:{ u32["x"], u8ascii["str"] };

The first data FooData has all three bits of data transfered and the second one doesn't include the bar data.

One idea I've had is to create a first class function called a "cast" which allows the programmer to write a function to perform any conversions to other data structures.

Cast FooData(Foo f)
{
return (FooData f.x, f.str, f.b);
}

Cast BasicFooData(Foo f)
{
return (BasicFooData f.x, f.str);
}

And from data to Foo:

Cast Foo(FooData fd)
{
return new Foo(fd.x, fd.str, fd.b);
}

Obviously, I'm not too worried about syntax at the moment. I'm just looking for some good constructs to help the programmer out. From a java point of view these type of conversions are
usually handled by the object or by static helper methods. The idea of cast being a construct separate from the class is that it allows new data conversations to happen later.

So, what do people think of this as an addition to a language? Is this handled in other ways in other languages?

I've got some other ideas I'd like to discuss, but I'll see how this goes down first. :)

Thanks,
David.

Announcement: Genyris Language

An implementation of this little language is now available. Genyris is a Lisp derivative with classes which allows an object to belong to multiple classes at once. (This is not multiple inheritance - each object has not just one class but a set of them.) Anything can be "tagged" as a member of a class (including cons cells, atoms). Once tagged, programmers can use OO-style methods, inheritance etc to play with the objects. The goal is to align the language with the world of RDF and OWL. This is a not an academic creation and makes no claims for originality - but it might amuse. If you like it please let me know.

FL programming language

Ive been trying for some time to find out more information about this language. If anyone has any documents on it, could they please send me a copy?

According to this there should be some papers in the library of congress somewhere, but since I live in australia I obviously have problems getting to them. If anyone can get me copies of almost any of the papers listed there (the last one, for example, doesnt look interesting), I am willing to pay money for them. Of particular interest are items 75, 188, 192-195, 198, 204, 208 and 209.

The holy grail in this search (from what I know at the moment) would be the compiler developed at the IBM Almaden Research Center around 1990, and the FL Language Manual.

XML feed