[OT] compiler optimisations

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 25 07:48:40 PDT 2015


Hi Ola.

You have been in this community for much longer than me, and I 
always learn from your posts technically.

> I find it worrying that the evangelical D users are perceiving 
> D as a compiled scripting language and claim it is similar to 
> Python... D semantics are not at all like Python. That can't 
> win.

Why does it worry you?  What bad things will happen?  People say 
all kinds of things and have all kinds of delusions about 
reality, yet the sky doesn't fall.  To an academic computer 
scientist, no doubt Python and D could not be more different.  To 
someone in the commercial world (hedge funds are what I know 
best), what tool do you pick up next to process your data when 
Python starts to choke?  Both the Eurostar and the plane will get 
you from London to Berlin - they work on very different 
principles technically, but am I a fool for considering them 
substitutes?

> I find it worrying that the people who say they want to use D 
> as a system programming language are into games, yet the 
> projected vision for the D leadership now is to make it a web 
> programming language that should ship with vibe.d. That can't 
> win.

Perhaps it's obvious to someone more familiar with the specific 
questions, but I think your argument would be more effective if 
you explained why shipping vibe.d somehow detracts from D's 
potential as a systems programming language, or for games in 
particular.  There are games devs here, and although they are 
spirited and opinionated, I don't recall them arguing against 
incuding vibe.d.

> I find it worrying that so many people attracted to D system 
> level programming are into games, yet game development needs 
> are ignored. That can't win.

Really?  You have a man with the expertise and experience of 
Walter Bright devoting his time to rewriting string processing 
parts of the standard library himself, in service of the goal of 
making Phobos GC free, and you say that game development needs 
are ignored?  (Not that games need strings, but that either a 
library is GC free or it isn't, and this is something games 
people seem to care about).  Plus all the work on refcounting 
etc.  I am sure there are many other aspects, and games 
themselves don't interest me, but that doesn't strike me as a 
balanced perspective.

It's odd to mention D's role as a systems language without 
discussing its use in embedded systems.  The pioneer who spoke at 
dconf a couple years back undertook a valiant effort, but it was 
too much for him to manage in one go.  (And of course Adam 
Ruppe's highly entertaining presentation on bare metal 
programming).  But although the pioneers may have the arrows in 
the back and not always be so happy about the situation, they do 
clear the way for others - these now  seem to be picking this up, 
and I would be really surprised if D is not pretty usable on a 
decent subset of embedded systems in a couple of years.

Similarly the work on ARM/Android/iOS, which seems to be coming 
along.

> There is a need to move towards something beautiful, and that's 
> not in Andrei's vision, but in the original D1 vision + the 
> improvements proposed by Bearophile, Timon Gehr and others.

I appreciate you may not have time, but if you had any links to 
stuff if they are gathered in documents rather than myriad 
fragments, I would be curious to see.

> …but move...

It's not for me to talk about strategy.  But it strikes me that 
you are calling for a further massive shift, when people have 
their plates too full already.  It may not be exciting, but full 
C++ support, making Phobos GC free, rounding out refcounting and 
introducing custom allocators seem to me to be likely to have a 
more immediate and more powerful impact than what you suggest, 
whatever may be the longer-term merits.  (I would like to 
understand these)

> Remember: It's a winner takes it all game.

I notcie that you keep asserting this, without taking the trouble 
(that I have seen) to argue the reasons for this belief.  The 
winner takes all idea can be traced to the work of Vilfredo 
Pareto, but he spends some time speaking about the circulation of 
the elites.  In other words the top dog is not static - this 
applies to income of a relatively free-market nation, and it also 
applies to other aspects of this phenomenon in human society.

It's a human tendency to lack imagination and to believe that the 
present state of things is how they intrinsically are and can 
never change.  This tendency is developed in our era by the 
mental habits that go with the way we use technology (see Iain 
Macgilchrist's work), and yet it also creates tremendous 
opportunity for those with imagination and perceptiveness.

You might as well have said To Honda, Toyota, Nissan, Hyundai etc 
that "it's a winner takes all game" when their products were 
demonstrably inferior with little prospect ever of competing with 
US cars - the idea of that would have been laughable.  But beyond 
being mistaken, this would not have been helpful advice.

I don't follow the news closely day to day, and just saw there 
are now 8Tb drives for a couple of hundred pounds.  These days 
you can download not just data for US equities, but the majority 
of all non-intraday data for all publicly listed stocks, futures, 
and currencies and economic series for free - this used to cost 
$100k pa plus.  So data sets keep growing - CPU performance 
continues to improve, but in a less convenient way, but as I 
understand it memory perf lags.  Which means in the future you 
may be increasingly irritated by people speaking of using D for 
scripting purposes...


Laeeth.


More information about the Digitalmars-d mailing list