LtU Forum

Embedded Languages in Java

ok, this may be one of those stupid questions that makes no sense, but can anyone give me any references, ideas, pointers, examples, etc to embedded languages in java. i don't mean compiling non-java to class files, but taking the idea of embedded or domain-specific languages and somehow making them work in java. for c++, for example, you might think of the recursive decent parser that uses template expansion (spirit?). but java doesn't have templates. so perhaps the question is more about whether there's anything useful to carry across from using dsls into "plain old" oo design. comments? have i missed something really obvious? thanks.

Transducer Composition and CPS

I am really intrigued by the short abstract of Olin Shivers. Transducer Composition and CPS, but for some reason it seems to be the only reference to it on the web. Can anyone suggest a replacement reading (using continuations for describing push/pull composition of separately defined components)? Ideally it would allow components with more than one input and output, but that's too much to ask :-)

Off Topic Humour: New Programming Language C+-

There's finally a replacement for the commonly used programming language, C++ -- yes, it's C+- (pronounced "C More or Less").

Unlike C++, C+- is a subject-oriented language. Each C+- class instance, known as a subject, holds hidden members, known as prejudices or undeclared preferences, which are impervious to outside messages, as well as public members known as boasts or claims. The following C operators are overridden as shown:

> better than
< worse than >> way better than
<< forget it
! not on your life
== comparable, other things being equal

C+- is a strongly typed language based on stereotyping and self-righteous logic. The Boolean variables TRUE and FALSE (known as constants in less realistic languages) are supplemented with CREDIBLE and DUBIOUS, which are fuzzier than Zadeh's traditional fuzzy categories. All Booleans can be declared with the modifiers strong and weak. Weak implication is said to "preserve deniability" and was added at the request of the Department of Defense to ensure compatibility with future versions of ADA. Well-formed falsehoods (WFFs) are assignment-compatible with all booleans. What-if and why-not interactions are aided by the special conditional evenifnot X then Y.

C+- supports information hiding and, among friend classes only, rumor sharing. Borrowing from the Eiffel lexicon, non-friend classes can be killed by arranging contracts. Note that friendships are intransitive, volatile, and non-Abelian.

Operator precedence rules can be suspended with the directive #pragma dwim, known as the "Do what I mean" pragma.

ANSIfication will be firmly resisted. C+-'s slogan is "Be Your Own Standard."

Sudoku

Sudoku is all the rage around here these days. I assumed Sudoku would be a standard example of constraint satisfaction by now, but it seems this isn't the case by the number of hits I get on google. I wonder why.

For your enjoyment: a Sicstus prolog solution, and an ECLiPSe solution.

Multilinguals learning computer languages faster than monol.

Did anyone find an answer to the question asked in the 2/22/04 discussion, about whether there was any research on whether multilinguals learned programming language faster/more intuitively than monolinguals?

New C++-like language for Windows

Oko is a development and data-management tool for creating Windows-based applications. It uses an object-oriented language similar to C++. A set of versatile visual-design tools makes it possible to create applications practically without programming. The environment includes data controls, as well as query and report designers... Get more info and download Oko at: http://ploko.net. We need testers.

Classes or prototypes

Recently been looking at prototype-based languages eg. Self. While the concept sounds good, I've got this feeling that they are more memory intensive than class-based OOPLs. I haven't had the chance lately to check on this. Does anyone have experience or knowledge on this subject? Oh, and while I'm on this topic, how is the Prothon project getting on? I haven't been able to contact the site. Seems to be offline. Thanks.

Congrats in order

Could it be that our gracious host has gone and got himself appointed to the Scheme Language Editors Committee?

Reusing XML Processing Code in non-XML Applications

I'd like to introduce an article which might be of some interest:

Reusing XML Processing Code in non-XML Applications

[abstract]

XML can be considered as a representation of hierarchical data, and the XML-related standards - as methods of processing such data. We describe benefits of XML view on legacy data and its processing, and suggest a method to develop XML tools and make them reusable for different tree-like structures in different programming languages.

Our approach is to use virtual machine technology, in particular, the Scheme programming language. We're taking the unusual step of using the Scheme syntax itself as a native virtual machine language. Together with the SXML format and Scheme implementations tuning, it gives us the XML virtual machine (XML VM).

Reference implementations are ready for the Python and C languages. We describe a library for XSLT-like transformations of the Python parse trees and a special version of the GNU find utility which supports XPath queries over the file system.

[/abstract]

The article needs some rework. Unfortunately, I don't know when I'll find time for it, so I publish it as is.

data locality and data structures

In the past few months, I've been studying programming languages/compilers/etc.. I'm surprised that basic data structures used to implement various language constructs are not given a great deal of importance.


Many PL/Compiler books mention tuples, records, trees, linked lists...but don't generally describe their performance trade-offs.


Simple matters such as using a basic linked list vs. a linked list which stores several keys in a node would greatly improve performance (and just one paper I've read mentions that most implementation do use such a technique).


Huge performance gains from languages such as fortran and APL seem to come from data locality as well (alhtough I can't be sure since I didn't get any straight answers from relevant usenet newgroups...or I didn't know how to phrase the question correctly).


Now I have collected enough books and papers which talk about lexing, parsing, type theory, functional vs. imperative, etc. But nothing which goes into detail about having the right set of fundamental data structures. For example: isn't it better to use to 'struct' to keep attributes of an object together in memory (since they are often likely to be used together), where as attributes of a large relation should be more liked a 'linked' data structure to allow quick addition/deletion of attributes (...basically adding relational algebra as a first class component my mini-language). What if I have a list of a million records (tuple with named attributes)...isn't it much better to have name/position correspondence stored on as part of list definition rather than a million times with each instance of record?


Data structures are, obviously, a seperate subject, but surely they deserve more attention in compiler/PL books. Any way, what do the experts on this forum think? Did I miss something obvious?

XML feed