LtU Forum

PL for interactive simulation

Seasonal greetings to everybody, I am back from my vacation, and have a new urge to program and probably learn some new language in the process :-)

I am looking for a PL for programming an interactive simulation - not really a game, but a simple world with moving agents which can be influenced by the user (ask your children about hatching norns to get an idea :-) ).

The PL should probably actively support concurrency, pickling/unpickling, have good libraries for graphics/mouse/sound, and be reasonably fashionable.

I am currently hesitating between Erlang and Alice, any ideas?

Thanks!

Non-English-Based Programming Languages

The recent discussion of the Chinese natural language included some speculation about what CS would look like had it not been dominated by English discourse.

The critique was raised that one could postulate any number of alternate histories. However, we can do better than pure speculation by looking at natural-language-inspired Programming Languages developed in non-english-based cultures.

To date I have only come acrosss a few such references to Japanse-based experiments in End User friendly programming tools. Unfortunately, they refered to non-english papers that weren't accessible to anyone unable to cross the natural language barrier.

This work was of particular interest because it went beyond the mere transliteration of keywords in Western programming languages. But alas, the references I encountered were little more than second-hand existence proofs of work we should know more about.

If anyone is familar with such efforts, any information and observations you could share would be most deeply appreciated.


Peter J. Wasilko, Esq.
Executive Director & Chief Technology Officer
The Institute for End User Computing, Inc.

These comments are not official IEUC positions unless otherwise noted.

ANN: YARD Parser

I just posted to SourceForge.net the YARD parser which is a public-domain generic recursive-descent parser for C++ which is available for dwonload at SourceForge.net, documentation is also available at http://yard-parser.sf.net. The YARD parser is intended primarily to be used as lexical analyzer and syntax parser, but it is a very general purpose library. The release includes a partial XML grammar and parser. The YARD parser is intended as a simpler alternative to the boost::spirit library. Any questions or comments are welcome.

ANN: Harmonia-Mode Program Analysis Plug-in for XEmacs

Professor Susan L. Graham and the members of the Harmonia Research
Group at the University of California, Berkeley, announce the second
release of Harmonia-Mode, an XEmacs plug-in that provides
language-based services to the programmer while editing code. These
services include semantic search-and-replace, structural navigation,
structural undo, hypertext annotations, syntax highlighting and
auto-indentation. Harmonia's analyses are based on incremental lexing
(flex-based) and incremental parsing (GLR-based) technologies developed
by Graham and her graduate students.

This second release of Harmonia improves our previous support for Java,
C, Scheme and Cool (a language used in UC Berkeley's CS164 compiler
course), and adds support for Titanium (a high-performance parallel
dialect of Java created by the Titanium research group here at
Berkeley: http://www.cs.berkeley.edu/Research/Projects/titanium ).
Improvements to the Java language support include support for Java
1.4.2, an updated constant-propagation algorithm to better discover
compile-time constants, and general bug fixes. Harmonia runs on Solaris
9, Linux (Debian distribution and all other Linux distros), and new to
this release, MacOS X 10.3.

This release represents the second publicly available demonstration of
our project. Our next release will make the source code publicly
available to enable members of the community to build language-aware
programming tools with the Harmonia framework.

If you are interested in trying it out, please go to
http://harmonia.cs.berkeley.edu/harmonia/projects/harmonia-mode/doc/index.html
to see what it's all about.

Please report any feedback you have to the Harmonia group at
harmonia-bugs@sequoia.cs.berkeley.edu .

Thanks!

-- The Harmonia Research Group

reading SICP for fun and profit

Adrian Colyer, the lead of the AspectJ project, discusses the beauty of Lisp and SICP in his latest blog post.

So at the end of the day, this is the thing that really impresses me about Lisp (and about the approach to teaching programming taken in the book). The language is so simple, and yet constructed in such an elegant way that it just doesn't get in your way - whatever abstraction you need to build, Lisp lets you do it in a very direct manner. Java just feels plain clunky when you put it alongside :- lacking in power, ease of expression, and beauty.

Modelica: Modeling of Complex Physical Systems

The object-oriented modeling language Modelica is designed to allow convenient, component-oriented modeling of complex physical systems, e.g., systems containing mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-oriented subcomponents. The free Modelica language, free Modelica libraries and Modelica simulation tools are available, ready-to-use and have been utilized in demanding industrial applications, including hardware-in-the-loop simulations. The development and promotion of Modelica is organized by the non-profit Modelica Association.

I stumbled upon this site a couple of days ago. It look pretty interesting, the overview offers a good introduction to its features.

HM-style type inference with non-unique selectors?

I figure this is the best place to squeeze my question in, so here goes.

A selector is either data constructor or a record field. In HM-style languages those are largely required to have unique names across entire program. Is there any way to lift this requirement and still have (partial) type inference? The hypothesis here is that unresolvable name clashes should be rare. When they do occur, the programmer should give an explicit type annotation.

Consider this:

data D1 = Foo Int | Bar Double
data D2 = Foo | Baz -- name clash, but not fatal yet

f1 (Foo x) = x
f1 (Bar y) = round y
f2 Foo = "Foo"
f2 Baz = "Baz" 
-- The inference algorithm should be able to figure out the type for f1 and f2
-- f1 :: D1 -> Int
-- f2 :: D2 -> [Char]

f3 (Foo x) = x
f3 _ = 42
f4 Foo = "Foo"
f4 _ = "Error"
-- Still should be possible to figure out types for f3 and f4, because 
-- Foo in D1 and Foo in D2 have different arities
-- f3 :: D1 -> Int
-- f4 :: D2 -> [Char]

f5 = Foo
-- ambiguity: Int->D1 or D2?
-- the compiler should signal an error
Is there an inference algorithm that does just that? If such questions are inappropriate for this forum, please feel free to delete my account and ban my IP :)

The Memory Pool System: Thirty person-years of memory management development goes Open Source

Not strictly language related, more language implementation related, but worth bringing to the attention of LtU. Quoting from the abstract to this paper:
The Memory Pool System (MPS) is a very general, adaptable, flexible, reliable, and efficient memory management system. It permits the flexible combination of memory management techniques, supporting manual and automatic memory management, in-line allocation, finalization, weakness, and multiple simultaneous co-operating incremental generational garbage collections. It also includes a library of memory pool classes implementing specialized memory management policies.

Between 1994 and 2001, Harlequin (now part of Global Graphics) invested about thirty person-years of effort developing the MPS. The system contained many innovative techniques and abstractions which were kept secret. In 1997 Richard Brooksby, the manager and chief architect of the project, and Nicholas Barnes, a senior developer, left Harlequin to form their own consultancy company, Ravenbrook, and in 2001, Ravenbrook acquired the MPS technology from Global Graphics. We are happy to announce that we are publishing the source code and documentation under an open source licence. This paper gives an overview of the system.

(emphases mine) Good news for language implementors! Richard Brooksby gave a talk on the system at last night's SchemeUK meeting, and it sounds like it has a few killer features that would make it worth considering over a roll-your-own solution or an embedding of, say, the Boehm-Demers-Weiser collector.

(One interesting nugget of information he mentioned was that during development of the MLWorks compiler and system, before they started development of the MPS, they measured the cost of object allocation at two-and-a-half instructions per allocation, on average - two instructions for the allocation, and half an instruction for the garbage collection overhead! I don't think MPS is quite that efficient, but it certainly has a lot of potential.)

Algebraic Semiotics

Seeing an interest to linguistics in general, this might be not a complete off-topic for LtU:
Algebraic Semiotics

Semiotics is the study of signs. Our research attempts to make this area more systematic, rigorous, and applicable, as well as to do justice to its social and cognitive foundations. Algebraic semiotics combines aspects of algebraic specification and social semiotics. It has been applied to information visualization, user interface design, the representation of mathematical proofs, multimedia narrative, virtual worlds, and metaphor generation, among other things.

...if you are still not interested, how about this:

Mathematical foundations can be provided by the rather recent and very abstract field called "category theory" (it is not related to the area of psychology of the same name), by noting that sign systems together with semiotic morphisms form a category.

[on edit: oh no, I forgot to check previous art... :( Frank already linked to this page in the past...]

LLVM 1.4 Released

LLVM 1.4 is now out in the wild. This release adds a large number of new features including JIT support for PowerPC machines, improved debugging information with the C/C++ front-end, better optimizers, new archive support, and a new compiler driver.

Get it now!

-Chris

XML feed