Better HN
topnewbestaskshowjobs
Log inSign up

Expert-007

1 karma · joined Sep 15, 2014 (12y ago) · 6 submissions

Submissions

comment 3y ago · link · parent

"copy-pasta"? Is that a spaghetti replicator? :) I can reverse that, with XTRAN rules I have to automate removal of GOTOs by structuring code. (It uses XTRAN's code match/replace facility.)

comment 3y ago · link · parent

In creating and enhancing XTRAN, my Expert System that knows over 40 computer languages, I got tired of hard-coding parsers, so I created a parsing engine that takes EBNF (specified in more friendly syntax I created), parses the EBNF to an internal format, and then when asked to parse a language, executes its EBNF in order to parse. I would be interested to know if anyone else is executing EBNF to parse.

Since code must come back out after XTRAN rules have created / changed / translated it, I also created a rendering engine that is responsible for rendering XTRAN's internal format of language content out as text source code, complete with extensive styling controls. The rendering engine is also driven by EBNF, which it executes in order to render code content to text source code.

If you're interested in learning more, see WWW.XTRAN-LLC.com. I'll be glad to answer any questions.

comment 6y ago · link · parent

Such examples speak more to C++ templates as a mechanism for capturing usage patterns in a convenient form, thus effectively creating a special-purpose, domain-specific language, than they speak to such templates as a meta-language. "Meta" means "information about information", so a meta-language in this case would describe the mechanisms used to capture such patterns, not the patterns themselves.

I do meta every day, meta-meta often, and triple-meta occasionally. The rules language for my Expert System is a true meta-language, because I designed it to (among other things) specify the manipulation of computer languages. So its domain knowledge is about the nature of computer languages and how to automate their assessment / analysis, transformation / re-engineering, translation, and generation.

To give a real-life example, we used our Expert System to automate the translation of complex compiler front- and back-end code from a proprietary system language to C++ for a major computer manufacturer. The translation rules don't really care what the code is doing; they care how the code is doing it. The compiler team created new templates and classes to provide the functionality their system language had that C++ doesn't, and we adjusted our translation rules to ensure that the translated code invokes those templates and classes in a clear, effective, efficient, and readable way.

comment 7y ago · link · parent

The term "meta-language" shouldn't be used to identify a specific language; it's a general term for a language that describes or manipulates another language(s). For instance, the rules language for XTRAN, our Expert System, is a meta-language, and we call it "meta-code", because it manipulates many different computer languages (including itself!), as well as data and text.

A well-known ML example is Backus-Naur Form (BNF), which is a meta-language for specifying well-formed statements in a language. We use BNF to drive XTRAN's parsing engine, which executes the BNF at parse time.

comment 12y ago · link · parent

Solarsail -- not true. For one example, BNF is a meta-language (a language about language), and it is extremely useful in the real world.

As the author of a computer language expert system, I refer to its rules language as a meta-language (and rules as meta-code) because it manipulates language content symbolically. And, as it happens, it actually executes BNF in order to parse the languages it consumes, the BNF being delivered to it via that same rules language.

Code content represented in my system's Internal Representation (IR) is not itself a meta-language; it's more of a "super-language", being synthesized across real languages. But that IR's architecture does comprise a kind of meta-language; because it is a structure that represents language content in an abstracted way, it is "about" the very concept of a computer language.

As the author of such a system, I do meta every day, meta-meta often, and triple-meta occasionally.