From: "Andy "Krazy" Glew" on
Chris Gray wrote:
> "Andy \"Krazy\" Glew" <ag-news(a)patten-glew.net> writes:
>
>> Again, this predated XML, but I might nowadays write it as:
>>
>> <instruction>
>> <encoding> 0F 1F 11dddsss</encoding>...
>> </instruction>
>>
> I think I'm missing the context for this. It's a bit like gcc's "asm" stuff,
> but I'm betting that's not what it is really for.

Probably a step too far. I've spent a lot of my life writing simulators.

Let's concentrate on stuff closer to "mass market" programming.


>> I find single assignment code often useful 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>
>
> Ok, so here you want to add a restriction on the normal language. I think
> that would be do-able. However, the next step, that of *changing* the
> semantics of something already in the programming language, would not be
> something I would want. That route could be a fast route to damnation! If
> you need different semantics (rather than just additional restrictions),
> then you need a different language. In that case, having the tools of some
> language system available to you is what you need.

I agree. Modest extensions to existing languages. Completely new languages discouraged, although supported by
providing the language designer a tool set.



More examples:

I already mentioned equation solvers:

<solve>
<equation>
cache_size = lines * bytes_per_line * bits_per_byte;
lines = sets * ways;
</equation>
<where>
cache_size = <human_readable_constant>64M</human_readable_constant>
ways = 4;
bytes_per_line = 64;
bits_per_byte = 16;
</where>
</solve>

// now use any of the above



Note: I am agnostic as to whether you write <solve>...</solve>
or <Equation_Solver::keyword>solve</Equation_Solver::keyword>
or <keyword namespace="Equation_Solver" id="equation"/>

I think the purist likes the middle form. My pseudo-xml tools interconvert. (I have so far written my pseudo-XML tools
three times - and now I have to rewrite them again. Leaving a company is like getting a lobotomy when you have to leave
your code behind.) (Hey, that would be fun: I think my present e,ployer would allow the pseudo-XML tools to be open
sourced.)





I like truth tables. I often write them as stylized IFs:

if(0) {}
else if( a==0 && b==0 && c == 0 ) case_000();
else if( a==0 /* b = dc */ && c == 1 ) case_0X1();
etc.

but they look better syntactically

<truthtable>
<var>a, b, c</var>
<case> 0, 0, 0 </case> case_000();
<case> 0, <dc/>, 1 </case> case_0X1();
etc.
</truthtable>

in this case I would expect to also provide CSS formatting to make it display like a table.





I have had seen many problems be facilitated by Cartesian expansion - the sort of thing that C-shells
{a,b}{c,d} => ac ad bc bd
does.

So put that in a mini-language:

<keyword>foreach</keyword>( <cartesian><term>a,b</term><term>c,d</term></cartesian> ) ...




From: "Andy "Krazy" Glew" on
Eugene Miya wrote:
> My very first wikipedia error edit was on the supercomputer page which
> had a quote misattributed to Cray (Ken Batcher really said it): a super
> turns a CPU bound problem into an I/O bound problem. It's since been
> completely removed.

Add ut to comp-arch.net.

I won't remove it.
From: Morten Reistad on
In article <4b845bcc$1(a)darkstar>, Eugene Miya <eugene(a)cse.ucsc.edu> wrote:
>In article <4vrk47-e5e.ln1(a)laptop.reistad.name>,
>Morten Reistad <first(a)last.name> wrote:
>>In article <0384a40d$0$1344$c3e8da3(a)news.astraweb.com>,
>>Nicholas King <ze(a)zerandconsulting.com> wrote:
>>>On 02/10/2010 01:31 PM, Robert Myers wrote:

>My very first wikipedia error edit was on the supercomputer page which
>had a quote misattributed to Cray (Ken Batcher really said it): a super
>turns a CPU bound problem into an I/O bound problem. It's since been
>completely removed.
>
>>>Programmers are just going to have get used to the real world being more
>>>complex. Historically we haven't had a huge success with this.
>>
>>Programming in the real world is about dealing with complexity, and
> true.
>>doing whatever you can to contain it. But we are forgetting the most
>>important tool we have for dealing with that complexity : language.
> Sort of. As a generalization. Some languages.
>
>>People can handle finite amounts of code lines; and complexity correlates
>>directly with code lines when the project becomes more than trivial in
>>size. This is where programming projects explode in programmer count.
>
>Added late (F. Brooks). A lot of programmers can think that they can
>beat complexity.

Some are better than others, but everyone has limits. Those limits
are quite low when you compare with the requirements for large, commercial
projects. And Brooks has documented how communication about complex
issues does not work in large groups.

>>But we can address the semantics by having specialist languages.
>>
>>All the large projects I have seen the last 4 decades have had huge
>>internal semantic gaps. ...
>
>Good observation.
>
>>I have long advocated "surface languages" to address such complaxity.
>>This may mean actually designing new languages for the applications.
>>There is huge resistance to doing this. But I see daily the productivity
>>that it generates.
>>
>>The asterisk extensions language, sendmail.cf and sed/awk are examples
>>that even pretty ghastly languages can boost productivity radically
>>when they address the issue at hand directly, and manage to bury
>>complexity.
>>
>>We need more languages.
>>
>>This is where the junior programmers scream foul, of course. When
>>they have to master language implementation and a new, initially
>>pretty volatile language definition.
>>
>>But it is the only path I see to contain complexity.
>
>Read Jon Louis Bentley's CACM Programming Pearls column Little Languages.
>
>Your above stuff reads OK as generalities go.
>I think that was about 2 decades ago now.

You would think we have advanced since then. But the reverse has
been true. Ca 1990 is was pretty OK to set up a small interpreter
to handle application-specific stuff.

Now this is not accepted. Toolchains are rigidly standardised.
Programmers are put in boxes "java", "php", "c".

And the toolchains have grown more complex, not less. If anything,
the semantic gaps are bigger now.

And for the bulk of such languages, a simple yacc/lex designed
interpreter with drivers and methods for the important stuff
for that application would work very nicely.

-- mrr
From: Andrew Reilly on
On Tue, 23 Feb 2010 19:48:50 -0800, Andy \"Krazy\" Glew wrote:

> So put that in a mini-language:

You *really* want to play with the macro facilities in lisp or scheme.
All of those examples are not only possible, but easy, and a lot less
ugly than the XML syntax, although you can do that too, I suppose.
What's more, there are existing equation solvers that you can just go
ahead and *use*.

The fact that no one that you know is using them, even though they've
been around for dozens of years, doesn't mean that there's necessarily
anything wrong with them, only that not a large fraction of the
programming community has yet reached the level of sophistication to want
that sort of facility (and known how to get it.)

Yes, you may be able to detect the enthusiasm of a newbie, but that
doesn't make me wrong.

Cheers,

--
Andrew
From: Eugene Miya on
In article <4B84A1F2.9040509(a)patten-glew.net>,
Andy \"Krazy\" Glew <ag-news(a)patten-glew.net> wrote:
>Eugene Miya wrote:
>> My very first wikipedia error edit was on the supercomputer page which
>> had a quote misattributed to Cray (Ken Batcher really said it): a super
>> turns a CPU bound problem into an I/O bound problem. It's since been
>> completely removed.
>
>Add ut to comp-arch.net.
^^ "it"? or something else?
>I won't remove it.

It's a half serious jest by a distinguished scholar architect whom
most have never heard of (like most could never cite any of the
architectures he did). Sad but true. For me, it was the first
wikipedia error which crossed one threshold (easily fixed) and didn't
cross a second (e.g., NDAs, official use data, discretion, honor,
better judgment, etc.) unlike other wikipedia pages. To me it was merely
an easy wikipedia learning exercise. That was some years ago after
meeting Larry and Jimmy. I think I heard that def 1-2 years after Ken
said it, reportedly on the Oregon coast.

--

Looking for an H-912 (container).