Unfortunately you are right. For me this is a very unpleasant surprise after I put aside D and rewrote my little framework in Go. Everybody said that the gc is not final, that there are some performance issues and they are working on it but I never imagined that such catastrophic bugs are not solved by now.
D has a nice allocation management(i loved the manual+gc approach) and in my benchmarks, optimized D was slightly faster than Go at almost anything and consumed up to 70% less memory (I assumed that was because the Go gc kicked in later and was a bit lazy) but D was weak at threading/synchronization and the documentation of the standard lib was quite messy and lacking. So I decided that in the long run Go will be better (cheap goroutines, channels, good stdlib /documentation + support from google and the prospect of a better GC, all indicated a clear winner).I really hope they fix this cause I can't throw away my atom box and ARM is becoming more and more important.
It's strange that with all those threading examples, they didn't notice the need for a WaitGroup primitive. I know that you could implement it yourself. You could simulate the goroutines, implement channels and SCGI/FCGI and so on, but why bother when there is Go ?
barrier is not a suitable primitive for a WaitGroup. The ideea is simple. You accept sockets in a loop and handle the connections in parallel threads.At one point you want to stop this loop and the main thread must wait for all the active threads to finish before exiting, otherwise some clients may receive "connection reset by peer". With a WaitGroup, every starting thread increments a counter, and every finishing thread decrements it;when the counter is zero -> all the threads finished.The main thread calls WaitGroup.Wait and it remains blocked until all the worker threads finish the jobs. I guess you could simulate it with core.sync.condition
At the program level, this is built in (D has daemon and non-daemon threads like Java). Or you could use ThreadGroup in core.thread. It would be pretty trivial to do this at the user level with messaging as well.
std.concurrency "is a low-level messaging API." The language provides low-level concurrency primitives. It is possible a higher level library providing "goroutines" might be made, though there is not effort or plan.
I wrote a couple of D programs long ago and I still have a taste of an unfinished language. If I recall correctly, arrays manipulation is pretty weird and the language feels a bit the same PHP feels: a bunch of different things pieced together with no coherence. Compared to Python or Go, it's a whole different world.
The Phobos standard library is quite unfinished indeed and poorly documented in some areas but the D2 language is rather complete. It has sh*tloads of features but this also makes it a bit harder to master. Go is lighter (very easy to take on) and has an impressive library. Long story short: with D2 I needed ~1 month to get a good grasp of the language and the std library (the library was the hardest part) while with Go I needed around a week.
Agreed, D is a much bigger and complex language than Go.
Comparing the standard libraries, Phobos doesn't look far behind Go in scope. There are big holes though, like crypto, which is entirely missing, and a complete SQL driver (was in development, but we haven't heard from it for a while now), although there is a binding for SQLite3 and several drivers for major RDBMSs (not in the standard lib, tough). Logging will be included soon.
Most of the rest is included (networking uses libCurl), and Phobos quality is continuously improving, some parts of it being excellent both in terms of functionality and performance, like the new regex library. On some other parts, like containers, Phobos seems much more advanced than Go. OTOH, there seems to be more 3-party libraries for Go than for D, but we can't comment on their quality. And of course, both languages allow to bind C libraries.
If Ceylon/Rust are not ready today it means they will be immature for at least 2 years from their release date. Without a large community behind them, they will slowly fade away like D did.In order to get community, they have to have a good/clean/pragmatic design and a library as comprehensive as possible. If they don't have a good library they better have excellent interop with other platforms or they will be doomed. IMO Go is a solid step in the right direction and if the authors will resist the temptation to complicate it with (too many) new features¶digms I think it will fare well.
> Without a large community behind them, they will slowly fade away like D did.
This is a rather strange assessment. The history of "successful" languages has been a mixture of "cool jump onboard" and "who can stay alive the longest to get a community." D is in the latter camp.
It seems to me, unreasonable to expect a language to be coming out the gate with guns blazing. People expect Nukes now!
The market will decide. As someone said on HN: the best language in the world would be a mix of Go and D and would be called GoD. When there were few options, yes, it was enough to survive long enough to get a community. But when you have plenty of similar options, some of them backed by some major actors (at least in the early stages), i think no one will sacrifice his productivity (other than for hobby projects) for the sake of one language. I really hope D will develop into something, but looking to various sources (abandoned projects for D1 on dsource.org) on the net and google results, it seemed to me that D peaked somewhere around 2007-2008 with a slight revival in 2010 when D2 was released.
The drop after 2007/2008 probably corresponds to the Phobos/Tango debacle, and the fact that Walter decided to fork with D2.
One of the main problems was, he was almost the sole compiler developer, and could hardly keep up with the tasks of maintaining 2 parallel branches and developing new ideas at the same time. People complained that they couldn't get involved as much as they wanted. It's understandable that many people thought that D didn't have a solid future with such uncertainties.
Nowadays, these problems are mostly overcome with a much better organization: there are several committers for the compiler, and several committers for the standard library. Phobos is the standard library, it's maturing, D2 has shown its strengths over D1 and the community is united again, because not only it is deeply involved with the design of the language and standard lib(through the m-l), it is also involved with the implementation of essential parts of it. 2011 has been a very good year for D, and I think that more than ever, the whole project feels like it's going in the right direction.
edit: I guess another reason D isn't gaining as much traction as it could is, it has been removed from the Alioth computer language shootout. For a language which is aimed at raw speed (and was brilliant at that when it was still on the shootout), it's a severe blow.
How were you able to sell software in eastern europe (especially at that early age)? Even today if I try selling software over here, nobody takes me seriously and more often it's all perceived like an insult. "How dare you ask money for that sketchy program/website that even my 12 year old son could write???" or "I don't pay for software ! I take it from internet. It's free !!!".
You are my kind of guys ! Why aren't there more guys like you in my team ?? I just love patronizing young enthusiastic programmers who just jumped careers and are now feeling insecure and scared of all the things that they might not know. Oh how I love to tell you that "It's more complicated than that" every time you feel like you nailed it. Yes, i'm such a douche, but for you I'm the "team leader".
Heh. :) I had a bit more CompSci than most that make the programming jump, from AP CompSci in high school to roughly two years worth of it to complete my CompEng degree (and a few "electives" such as compiler construction and a low-level intro to AI course). But there were still lots of things that I missed (OO and all the related trappings were completely missing from my schoolwork. STL barely existed.), but most of those had no benefit to what I was doing then. (Just as assembly and being able to design a chip from the sand up has little benefit to what I'm doing now.)
"Team Leaders" are fun to lead into blind alleys and ambush with little known facts and tricks, too. ;)
The fundamentals of programming are the algorithms & data structures. If you know these and you are able to implement them in a (compilable) programming language, you can call yourself a programmer.But this is just the beginning. In order to have no problems in one field of programming, you must know well the algorithms&data structs used in that field(web programming is very different from 3D engines programming or embedded devices programming or signal processing and so on). If you know web programming using python, you are perfect for jobs in that area but everything else will be a "problem" until you acquire more knowledge. So welcome to the club of perpetual learning.
I think it's also important to be able to look at your habits and the habits of others and create something that is the right trade-off between being abstracted/concise/readable/writeable/efficient/elegant.
I appreciate your pragmatic view. I would add only the fact that the empires seem kinder only when the resources are abundant. If the oil discoveries fail to keep pace with the consumption and no serious alternatives are found, I foresee some nasty imperial wars ahead and the next "totalen krieg" will be fought with nuclear weapons.
Don't you think it's funny that the same people who are able to classify nations as "inclusive"(USA) and "extractive"(the others) fail to see how USA and Europe are "inclusive" internally but highly exclusive and "extractive" externally (they exclusively rule the world using the United Nations puppet organization and when it does not obey enough, they attack others anyways). And if we look again, how it's possible to say that US/Europe are inclusive when the wealth and income polarization is at it's peak and the policy is made by the rich for the rich ? My feeling is that both US and Europe are in fact internally exclusive and "extractive" but the people will not see clearly this until US/Europe will fail to extract enough wealth from the rest of the world anymore.
Historically this is a proven strategy exercised by all empires and there is nothing new to it: expand and enrich your citizens in good times and milk them in tough times; rinse and repeat.
I think it is very strange. But the reason, I think, is that many academics and others have a worldview that has been warped by propaganda and a general and common trust of authority, or at least some basic trust of their government.
I think that this trust of authority and faith in the worldview presented by authority is a general characteristic of social groups of all sizes. In some ways it is a great failure, as in these cases. In other ways it is necessary, since a group without a common belief system probably couldn't function.
Maybe group membership and belief systems are somewhat directly connected.
Democracies in the rest of the world is also "inclusive". In general, the only dictatorships that are tolerated, are those which the democracies are dependent on...
UK and other western countries were sitting ducks in the face of the eastern european gipsy invasion and their supernatural ability to exploit the social protection programs and other benefits. And now all the romanians take the blame. I'll retract my stereotypes when you will show me one gipsy having a real job.
In order to understand why romanians take this so seriously, you need to understand the context. Romania is widely regarded by the western Europe as backward, poor and corrupt. On top of this, Romania has the largest Roma minority in the region ~500.000 according to wikipedia.org/wiki/Roma_(Romani_subgroup). The average westerner can't distinguish a romanian from a roma/romani/gipsy although they are quite distinct. In the last 20 years there were several waves of romanian immigrants hitting the western europe, including the Roma minority which are highly nomadic by tradition and very visible in the west because they beg and steal aggressively and live in slums in very primitive conditions. This lead to the association romanians = gipsies, thiefs, primitives etc. The current campaign is a response to these stereotypes, which unfortunately are easily promoted in western europe especially since western massmedia can't pick on blacks and arabs anymore cause that's clearly racist and open racism is not trendy anymore.
> ...including the Roma minority which are highly nomadic by tradition and very visible in the west because they beg and steal aggressively and live in slums in very primitive conditions.
I'd say that in my experience, the Roma don't beg and steal particularly worse than any other marginalised or impoverished group. There may be a culture of theft among some of the poorer groups, but that is hardly unique, a culture of theft is extremely common in a lot of widely varied communities around the world, from energy companies to impoverished slums.
First of all I'm not trying to paint all gypsies with the same brush. I actually know a couple that are very educated, very honest and very hard-working human beings. But within all the "Roma" minorities, there are sub-groups and not all of them are created equal.
In general in Romania there are many gypsies that are definitely not marginalized and impoverished.
Some of their culture is also part of ours (e.g. many people like their music), their children go to the same schools as Romanians, some of their words became a part of our language, interracial marriages are not at all uncommon (up to the point that for some people their origin is not at all visible) and they also receive lots of subsidies from the government ... they definitely are NOT marginalized. If anything, some sub-groups of this minority are marginalizing themselves.
Also, there are many gypsies that are filthy rich. Come down here sometimes and I'll show you entire villages of villas (i.e. big and luxurious country residences) that are inhabited by gypsies. Those villas come paired with luxury cars too. And some of them still steal, still beg for money on our streets or in other countries, some of them still live in tents in their own backyard.
My experience is it varies site by site, family by family and individual by individual. Stereotypyes can fit cultures but they become fairly destructive (and sometimes even self-fulfilling) when you start applying them to individuals or treating them as rules.
I know quite a few travellers, roma and irish gypsies and the one thing I do know is all three groups are tight and fairly insular, especially from each other. And like any tight groups they are very good at reflecting the attitudes they percieve to be directed towards them.
For the record, I am not from any of these groups and have had relatively few problems with them, when compared to other groups I have interacted with. Drunk anglo-saxon football fans, for instance.
In my experience, the general public in the west does not believe and can't believe what an eastern european says about the Roma people, because anything we say sounds like prejudice and discrimination. The westerners simply ignore the fact that these prejudices were formed along more than 150 years of coexistence and although insulting, they describe rather accurately the character and the habits of an entire ethnic group (group which is not as diverse as you may assume). Time will tell you more (cause if I enter details, I will be banned :D).
While I agree that romanians integrate easily into the local culture (especially when the local culture is italian, french, belgian or spanish) I don't fully agree that romanians distrust each other completely :D. There are 3 classes of romanian immigrants that don't mix with each other:
1.The engineers, medical workers (doctors & assistants) and programmers: These are the silent romanians, one barely notices. 2.Construction workers and other low paid workers: These are the generic romanians and 3. The romanian gipsy group composed of organized beggars, pimps, prostitutes and thiefs = the bad romanians. When I hear someone talking romanian outside of romania, I try to classify him, and if he belongs to 3, I stay as far away as posible.