LtU Forum

Dynamic Languages Journal?

A few months ago, I received some mail from Dr. Dobb's Journal informing me that I qualified for a free subscription. Unlike some of the other free rags out there, Dr. Dobb's seemed genuinely useful, so I accepted. The first issue I received was Java only. The issue I am looking at now covers Java, C, C++, C# and .NET. So for casual free reading, it's OK, but it really doesn't have much impact on what I do. Even though I know Java and C, I really don't care about them.

Even though Dr. Dobb's is not narrow (it's even had articles on Prolog), it's largely useless to me due to its understandably heavy focus on languages with "market share". Despite that, there are times when it has fantastic articles that really pique my curiosity. I just want it to be more consistently relevant to me. What I want is a magazine like Dr. Dobb's that focuses primarily in dynamic programming languages.

Imagine a "Dynamic Languages Journal" which focuses on Perl, Python, PHP, Javascript, Ruby, etc. It has an "Exotic (to non-LtU readers) Languages" corner which has introductory articles on Prolog, Squeek, Haskell and similar beasts. Exciting new developments like Open JSAN can be covered and has columns covering the philosophical discussions that some love and others hate. That's what I would subscribe to in a heartbeat. Further, by having a professionally produced magazine like that, it would even further drive the "respectability" of the powerful tools that we appreciate even if outsiders don't.

Note: this was originally posted to my Perl journal and some folks seemed interested. In fact, the editor and publisher of the Perl Review has stated he wants to start such a magazine, but he needs editors who have the subject matter expertise. I'm sure a few folks around here would be qualified.

The New C Standard

The New C Standard is a line-by-line commentary on C99. Check out the free 8M byte pdf.

(via PLNews)

XSL and DSL code refactoring

I've had lately a lot of fun and success with refactoring our DSL using XSL.

While I could have coded the refactoring in our main language (Delphi), I've tried to use a language dedicated to XML transformations and with pattern matching capabilities.

In order to do so, I've had to stream out the AST of our DSL files into XML files.
Then I've written a small IDE to select the DSL file and the XSL transformation to apply on it.
I've several tabs to display the different steps of the transformations, disable some steps, select the command line XSL engine, ...

When the transformation has been applied, the resulting AST is reloaded and the corresponding DSL code is generated.
I can then compare the source and the result to see if the transformation has changed the source file.

It's an incremental process, you can watch the corresponding XML for the DSL file being processed, compare it to the refactored one.
You then make some changes to the XSL files and restart the transformation until the resulting AST fits your needs.

Have you also had some success in this domain using XSL ?

Some references :
XSL : http://www.w3.org/TR/xslt
Java ML : java modelisation using XML

Ook?

I guess I am spamming, sorry for that, but this is too funny to be left out

Ook!
is a programming language designed for orang-utans.

See some other esoteric languages here.

Martin Fowler on Language Workbenches and DSLs

I thought this would be interesting, if only because of the author: Martin Fowler, of UML and XP fame, on

Language Workbenches: The Killer-App for Domain Specific Languages?

and

Generating Code for DSLs

Never really took the guy to be a language guru. His books are Ok though.

[fixed second link]

Lambda-mu

Either I cannot search, or the term has web-unfriendly name, but it's pretty tough to look for lambda-mu calculus, even in scope of LtU only.

For example, did we discuss this paper or related?

Control Categories and Duality: on the Categorical Semantics of the Lambda-Mu Calculus Just one of the results:

As a corollary, we obtain a syntactic duality result: there exist syntactic translations between call-by-name and call-by-value which are mutually inverse and which preserve the operational semantics.
...and...
It is interesting to compare this with Filinski’s work, in which he obtains a duality result by working with a larger and more symmetric syntax, in which the dual of a term is essentially its mirror image.
Also, is Parigot's Lambda-mu-calculus: an algorithmic interpretation of classical natural deduction available online anywhere (except ACM)?


[on edit: aha, found one reference (actually a pair forming one reference): Call-by-Value is Dual to Call-by-Name and Call-by-value is Dual to Call-by-name, Reloaded ("We consider the relation of the dual calculus of Wadler to the lambda-mu-calculus of Parigot")]

"typed" files OR xml OR meta information for delim. files.

I hope this isn't off topic. It seems a very large number of text files are some sort of delimited files (.csv, .tab, etc.). Awk seems to expect these files and cleanly allows dealing with only specific 'fields' in the file. Have there been any attempts to introduce some sort of (easy to use) meta data which describes layout of the file...perhaps more importantly the type of data in it. Excel or specific database files are obviously tied to the application that created them.

XML works well here...it defines data types and some relationship among data points, but is too verbose (a file with 5 columns but thousands of lines would be many times larger if xmlized).

I've come accross some information about type systems which describe memory layout (...which I don't really understand yet)...could something like that also be used to describe disk files?

organizing papers...

Related to the recent "how to read papers" thread...

How do you guys organize your papers? I have a file naming scheme that's a big pain to manage and not terribly useful. I guess what I want is something like iPapers, but less tied to PubMed and cross-platform. (At least I need it to run on my Linux workstation, and hopefully on my Mac laptop...) And I guess in my dirtiest fantasies it would maybe integrate with Citeseer and CiteULike, but that's not so important to me, actually.

I'm sure semantic web types will tell me that I really want a general purpose RDF browser or something to manage general meta-data, but I'd be happy with something less general and more tailored to this domain.

Anyway, does anybody out there have a tool (or just an organizational discipline) that they're happy with? Satisfy my curiosity...

Dyna: a weighted dynamic logic programming language

Dyna is a language I stumbled upon by accident today. What I find interesting qualities of it are its claimed clean compilation to C++ and its non-standard semantics.

Dyna is a small, very-high-level programming language that makes it easy to specify dynamic programs and train their weights. You write a short declarative specification in Dyna, and the Dyna optimizing compiler produces efficient C++ classes that form the core of your C++ application.

Natural applications in NLP include various kinds of parsing, machine translation, speech decoding, and finite-state modeling. Dyna also has many other applications, especially in other applied AI areas, since dynamic programming (and its degenerate case, tree search) is a common strategy for solving combinatorial optimization problems.

Properly speaking, Dyna is a "weighted" logic programming language: terms have values, and Horn clauses are replaced by aggregation equations. It is Turing-complete. You can also think of Dyna as extending compiled C++ with powerful deductive database features.

Dead Languages

What languages do we wish were still maintained? My list starts:

XML feed