From: "Andy "Krazy" Glew" on
Ken Hagan wrote:
> On Sun, 21 Feb 2010 07:42:00 -0000, Andy "Krazy" Glew
> <ag-news(a)patten-glew.net> wrote:
>
>> I am a big proponent of languages that use XML syntactically. XML
>> capable editors are now widely available.
>
> I beg to differ, but I may have mis-understood your point.
>
>> E.g. while the user might type "if(cond) { then_code(); }"
>> the editing system might produce, internally
>> <keyword>if</keyword>{then_code;}
>> etc. And colorize semantically to boot.
>
> If what the user types is not XML, then the language isn't using XML
> syntactically, but merely has (potentially) an internal representation
> in XML. The transformation between source and XML would have to be
> two-way, or else the editor couldn't present the programmer with their
> original text the following day, so there's little to be gained from
> storing the program code in the XML representation.

Fair enough, but I think that you are quibbling.

I think that the *language* should be sensitive to XML annotations. So that <keyword>if</keyword> and
<variable>if</variable> are treated differently. (Also with namespaces.)

I imagine that the editing system might have modifiers to indicate what mode you are typing in.

But I also imagine that the editing system might have shorthands that do not require the modifiers to be typed by the
user: so that the user could type "if( cond )" and the editing system might produce <keyword>if</keyword>(cond)
internally, as well as colorizing and fontifying it on the screen.

I.e. I suggest that the XML notation be the language. What the user types is just an input mechanism.

--

Mathematics is a rich source of notation. Mathematicians have used font and boldness to indicate semantics and type
information for more than a century. Why should computers not do the same, now that we have suitable displays? XML is
just a nice way of representing such information.



>> With this mindset, conflicting keywords in different mini-languages
>> are just an issue of namespace:
>> if modules A and B both introduce keywords "scan", it might look like
>>
>> <A::keyword>scan</A::keyword>dA_atastructure(<B::keyword>scan</B::keyword>scan(B_datastructure));
>>
>>
>> (Although this example has little advantage over function calls.)
>
> Now you'd be blending two different languages in the same source file,
> which certainly is something that XML facilitates, but what is the
> end-user representation here? Once again, either that representation
> allows the blending or you've really just invented part of a compiler
> for reading and combining source files in a variety of mini-languages.

The representation that the compiler parses is the XML.

What the user types - it may be just plain ascii, with the editing system applying heuristics to figure out what XML to
apply. But, the end user may also need to disambiguate himself by selecting ad modifying text.

---

I think that you are confusing the human with the end-user; one could consider the compiler the real end-user.

From: "Andy "Krazy" Glew" on
Chris Gray wrote:
> "Ken Hagan" <K.Hagan(a)thermoteknix.com> writes:
>
>> Now you'd be blending two different languages in the same source file,
>> which certainly is something that XML facilitates, but what is the
>> end-user representation here? Once again, either that representation
>> allows the blending or you've really just invented part of a compiler
>> for reading and combining source files in a variety of mini-languages.
>
> Using Andy's syntax choice, it could look like this:
>
> <code>
> ...
> Sql::select recordVar Sql::from ...
> <use recordVar and the record fields>
> Sql::end
> ...
>
> Basically, a compiler doesn't have to key its parsing on a fixed set of
> keywords. That's normal, but not required. Sql has been done sort-of this way
> before, using a preprocessor that expanded the Sql statements, etc. to C
> source that interacted with the C code around the Sql statements.
>
> This discussion has resulted in a page of notes in my "to do" file. It is
> doable in my system. Question for helpful folks here: what "mini-languages"
> other than Sql could benefit from being embedded into a full programming
> language?


I used techniques such as this to embed little "equation solvers" in programming languages.

(This predated XML.)

---

Most of my work on microarchitecture simulators and instruction decoders has used such mini languages. Sometimes
declarative, sometimes imperative - actually both.

Again, this predated XML, but I might nowadays write it as:

<instruction>
<encoding> 0F 1F 11dddsss</encoding>
<assembly>FOO gpr[ddd],x87fp[sss]</assembly>
<microcode> gpr_tmp := mov_x87_to_int( x87fp_sss ) ; gpr_ddd := foo( gpr_tmp ) </microcode>
<compiler-rtl> ... </compiler>
<PRM_documentation>
The foo instruction is the best new instruction since sliced bread
</PRM_documentation>
</instruction>

Although in the example above I embedded no directly executed C or C++ code, I can assure you that usually I do so.

---

I find single assignment code oftenuseful in finding bugs.
So I might want to be able to say

<normal_c_code>
a=b;
a=c;
<single_assignment>
a=b;
a=c; // this is a syntax error
</single_assignment>
// back to normal imperative code
</normal_c_code>

---

Heck, I could go on and on.
From: Andrew Reilly on
On Mon, 22 Feb 2010 18:24:47 -0800, Andy \"Krazy\" Glew wrote:

[I'll elide the bit about XML, other than to say that I can't imagine
myself doing any coding that way.]

> Mathematics is a rich source of notation. Mathematicians have used font
> and boldness to indicate semantics and type information for more than a
> century. Why should computers not do the same, now that we have
> suitable displays? XML is just a nice way of representing such
> information.

Nice is clearly in the eye of the beholder, but there's always the
example of APL, or (more recently) Fortress
http://projectfortress.sun.com/Projects/Community
On that page, have a quick look at the PDF "Project Fortress Reference
Card". They've used PDF, presumably because all of the fancy typesetting
doesn't render well in HTML, at least until MathML is wide-spread (if
only...)

Not that I agree that this sort of surface detail is useful or even
desirable. Maybe it is. I'm in no hurry to find out. The language
itself sounds as though it might have promise though.

Even without going all that way, there are an increasing number of
languages that allow or require Unicode as the input character set, so
you can knock yourself out with greek-alpha an iota as variable names
already. (Scheme is unicode now, and it is quite common to see a symbol-
lambda as a visually shorter name/alias for the "lambda" function
definition keyword.)

Regarding mixed languages: Scheme and Lisp are the granddaddies of that
game. With programmable source input parsers and the whole language
available at compile time for writing syntax transformers (macros),
anything is possible, and quite a lot is done, in fact. Check out the
scribble language in PLT for one example. Dylan has/had both s-
expression and in-fix surface syntaxes. PLT has honu, algol and java
(sort-of) as available sub-languages (aside from all of the scheme
dialects.)

Language mixing was/is one of the claimed strengths of the .NET platform.

I'm not sure that mixing languages within a single file or module is
really such a great idea, but maybe the SQL example shows that it can
be. Even little languages like C or lisp format strings, or regular
expressions tend to stand out like sore thumbs in the programs that use
them.

Cheers,

--
Andrew
From: Eugene Miya on
>> >>What computer was that?
>> Nick has not answered that.

>> >>I just got an email marvelling how much "power" is in my particular
>> ...
>> >>Sid Fernbach, for whom one of the IEEE awards is given, started a brief
>>
>> %A Sidney Fernbach, ed.
>> %T Supercomputers, Class VI Systems, Hardware and Software
>> %I North-Holland
>> %C Amsterdam
>> %D 1986
>> %O ISBN 0-444-87981 1
>> %K book, text, cray, cdc cyber, data flow, NEC SX-2, Fujitsu VP-200,
>> Hitachi 810/20, vector processing,
>> %K trade/popular/business press, industry references,
>> %X A collection of papers surveying existing computer architectures
>> rather than newer proposed supercomputer architectures.
>> %X A book from one of the men who set up the "Class system" of the DOE.

In article <0986f579-388d-4a33-8155-4df4bc7c4d4e(a)v20g2000yqv.googlegroups.com>,
Robert Myers <rbmyersusa(a)gmail.com> wrote:
>Oh, for shame, Eugene. I don't know exactly how smart you are, but
>you are smarter than that. Shilling for a DoE bureaucrat, whom the
>ACM sucked up to?

Sid died 2 decades ago.

Where did you get ACM?


It was CRI which always attempted to suck up to Sid.
The CRI guys noted that they always tried to hire a saleperson/acct. rep
who was shorter than Sid. I think Sid was shorter than I am. I suspect
that went for CDC as well.

Water under the bridge.

--

Looking for an H-912 (container).

From: Eugene Miya on
In article <7tjs9oFihuU1(a)mid.individual.net>,
Del Cecchi <delcecchinospamofthenorth(a)gmail.com> wrote:
>>> That is not what killed osborne. What killed osborne was announcing a
>>> better machine that was not in production and freezing the market when
>>> they didn't have cash to cover the interval.

Eugene Miya wrote:
>> I seem to recall another firm which announced a "better machine not in
>> production...."
>>
>IBM nearly died by the way they announced and priced 370. But I presume
>you are talking about FS? That was never announced actually. Itanium?
> Intel had enough money, but some didn't.
>
>Whatcha talking about?

That machine, what was it 360/90, or 95? or 195 which resulted in
IBM giving $600M to CDC. Before the 370. FS? Was ACS before FS?

--

Looking for an H-912 (container).