comp.lang.ada
 help / color / mirror / Atom feed
From: jan.de.kruyf@gmail.com
Subject: Re: Is this a bug in my code or the compiler?
Date: Sat, 13 Jun 2015 07:21:21 -0700 (PDT)
Date: 2015-06-13T07:21:21-07:00	[thread overview]
Message-ID: <1e967e01-706b-41bc-b961-a426a05d7b6c@googlegroups.com> (raw)
In-Reply-To: <90baaa9f-8d9b-48bc-9b26-bb005fde9192@googlegroups.com>

On Saturday, June 13, 2015 at 12:10:22 AM UTC+2, David Botton wrote:
> > Or, uh . . . A language designer having to worry about...  :)
> 

David,

> Actually it is exactly what a designer should think about. Want to prevent when and how reasonable errors by the use of that language.
>  

Of course I agree with you there; but there is a fine line, that we as programmers are not always aware of. Which is the balance between nannying the programmers and giving them true power. (not in the C sense)

> 
> Yes, I could just write in assembly, but that would remove the efficiency of my creativity as a programmer :) I choose my tools to assist me in both beautiful expression of the idea that others can read (and as Wirth points out in Programming in Oberon, Assembly is unreadable) and to assist me in correctness.

Which is fully my sentiment. But I grew up with those 8 bitters. So historically I might be more inclined not to trust my tools, unless I fully understand them. Which is very hard of course these days.


> 
> Not sure I got that one. I assume first I was wrong and the tool had a different idea than I, as was evident. 

I always blame the tool first (shame faced . .) but that got me quite far because then I start taking the tools apart, to see what is cooking. (and most of the time find it is me)

> Not sure though how Wirth fits in

I was just repeating the sentiment of the group in a joking way, as I understood it a while back.

> (I wish he would have qualified his statements a bit more.

He killed his life's work by not communicating. And what is worse, the faculty had no real way forward when he left. Nothing is happening there anymore.
His secrets are revealed in his code.

> I would say that concatenation operations with order of evaluation not significant is an unexpected gotcha for most human readers and so a language should not tolerate it.

Or perhaps this "must have" runs amok with the limitations Dmitry pointed out in the second post of this thread, but the designers did not realize at the time (it was still single processors then).
This touches the deepest levels of computer science. Many thick books have been written about order of evaluation and concurrent execution.
Look at the amount of work it took to clean up the linux kernel so it could be more or less real time and pre-emptible.

Now it will take a lot of courage to go back a few steps and see if we can implement this thing in a different way, which automatically resolves the concurrency issue.

If you are interested in that kind of thing, have a look at the chapter about texts in Project Oberon (the book that describes the operating system, and the compiler) He found a very clever way to deal with strings, texts, streams fonts etc.
Any text consists of a collection of pieces (strings) in a double linked list. And each piece has attributes (font, color, anything). And a text knows how to load itself and store itself (That is also where the mess gets sorted and the pieces are collected into bigger pieces, where the attributes allow)

So if you want to insert some text you just split the piece in two and insert a new piece, and so on. The concept looks very messy at first, but it works very fast and it automatically deals with wide strings etc. by virtue of the attributes.
As a programmer you have a unified and coherent view of the whole text business, except for the most trivial strings, there you just roll your own if needed.

enjoy your weekend,

j.


  parent reply	other threads:[~2015-06-13 14:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 15:56 Is this a bug in my code or the compiler? David Botton
2015-06-12 16:15 ` Dmitry A. Kazakov
2015-06-12 17:25   ` G.B.
2015-06-12 18:00     ` Dmitry A. Kazakov
2015-06-13 10:04       ` Georg Bauhaus
2015-06-13 10:32         ` Dmitry A. Kazakov
2015-06-15 10:37           ` G.B.
2015-06-15 12:27             ` Dmitry A. Kazakov
2015-06-15 12:31               ` Simon Wright
2015-06-15 13:16                 ` Dmitry A. Kazakov
2015-06-15 14:56                   ` Simon Wright
2015-06-15 15:03                     ` G.B.
2015-06-13 19:42       ` Brad Moore
2015-06-12 17:53   ` David Botton
2015-06-12 18:11     ` Dmitry A. Kazakov
2015-06-12 18:43       ` marciant
2015-06-12 19:37     ` Jeffrey R. Carter
2015-06-12 19:55       ` Simon Wright
2015-06-12 20:40         ` Jeffrey R. Carter
2015-06-12 21:40           ` Simon Wright
2015-06-12 19:39     ` jan.de.kruyf
2015-06-12 22:10       ` David Botton
2015-06-13  0:19         ` Dennis Lee Bieber
2015-06-13 14:21         ` jan.de.kruyf [this message]
2015-06-14  3:13     ` Randy Brukardt
2015-06-14  3:21     ` Randy Brukardt
2015-06-12 16:48 ` Jeffrey R. Carter
2015-06-13 13:33 ` Jacob Sparre Andersen
2015-06-13 15:15   ` J-P. Rosen
2015-06-13 16:43     ` Jacob Sparre Andersen
2015-06-13 20:50       ` J-P. Rosen
2015-06-14  3:18   ` Randy Brukardt
2015-06-14  3:10 ` Randy Brukardt
2015-06-14  9:02   ` Jacob Sparre Andersen
2015-06-14 12:48     ` brbarkstrom
2015-06-15 22:06     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox