www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Some questions on latest work

reply Bienlein <jeti789 web.de> writes:
Hello,

I've been busy with other things for about a year and would like 
to ask some questions to catch up with latest language/library 
additions in D. Looking through the change logs simply appeared 
to be a bit tedious. My questions might look a bit like asking 
pain point questions on purpose, but it's really only about 
catching up with the status on some issues:

* There was a problem with the GC leaking memory in some 
situations. Is this still the case?

* There was some talk about changing the standard library in a 
way that it can be used with the GC and without. My question is 
what the current status is concerning this topic.

* RefCounted only used to work with structs. It would be useful 
if it worked with classes as well. Is it being considered to work 
on this?

Thanks for any answers.
Regards, Bienlein
Apr 25 2016
next sibling parent reply Bill Hicks <billhicks reality.com> writes:
On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 Hello,

 I've been busy with other things for about a year and would 
 like to ask some questions to catch up with latest 
 language/library additions in D. Looking through the change 
 logs simply appeared to be a bit tedious. My questions might 
 look a bit like asking pain point questions on purpose, but 
 it's really only about catching up with the status on some 
 issues:

 Thanks for any answers.
 Regards, Bienlein
To be frank, if you are using D for anything more than a throwaway hobby project, I have to tell you, D is a failed language, so stop wasting your time. The people who think that one day D is going to replace or threaten C++, or for that matter any other programming language, are delusional. No offense to all those who have spent great amount of time contributing to D, but people need to accept reality. Five years ago Rust was not even a blip on the radar; however, over the years it has gained steady momentum. It has a larger and ever-growing users and contributors, as well as many PL researchers that will ensure the language is future-proof for the next 10-20 years and beyond. If you are running away from C++, Rust should be your first choice as a systems programming language. And with all the 'improvements' that C++ has received, and will receive, there is really not much room left for D. D also has many flaws, and they don't know how to fix them or won't, specially not without breaking backward compatibility. If you have a GC that is not optional, then you don't have a systems programming language. They finally recognized that, and decided to remove all GC from Phobos so that they case say "see, no GC." Even the basic containers that are available in C++ are missing in Phobos. Why? Because of allocators, which are in experimental stage. How many years did that take? Over five years. Good luck implementing some fancy container and hope you won't have to rewrite it again in the future. Nowadays they're spending time implementing stupid features that nobody cares about or needs. And why DMD still uses its own back-end and not GCC or LLVM is beyond me. I guess you look really good on your resume for reinventing such a big wheel, but it's a foolish and arrogant mistake that has not benefited D. And the idea of a foundation was proposed many years ago, but I suppose back then people were fantasizing about the day that Facebook would poor millions of dollars into D, but that never happened. And Facebook's decision to no longer host DConf was a heavy blow. The list goes on and on and one...
Apr 25 2016
next sibling parent reply bigsandwich <bigsandwich gmail.com> writes:
On Tuesday, 26 April 2016 at 01:04:21 UTC, Bill Hicks wrote:
 On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 [...]
To be frank, if you are using D for anything more than a throwaway hobby project, I have to tell you, D is a failed language, so stop wasting your time. The people who think that one day D is going to replace or threaten C++, or for that matter any other programming language, are delusional. No offense to all those who have spent great amount of time contributing to D, but people need to accept reality. [...]
1) This rant has nothing to do with OP's questions. It does not help him. 2) I'm not sure what you are so angry about. D seems to be making slow but steady progress. Its a community driven project, and its free. If you would rather use C++ or Rust, you know where to find them.
Apr 25 2016
parent Bill Hicks <billhicks reality.com> writes:
On Tuesday, 26 April 2016 at 01:48:21 UTC, bigsandwich wrote:
 
 1) This rant has nothing to do with OP's questions.  It does 
 not help him.
I disagree. It does help him. It has the potential to save him time and frustration. One thing that is common among most PL communities is that they do not explicitly and openly communicate design flaws, and every other shortcoming in the language that has the potential to impact the user and their projects, with the outside world. I can understand such a thing from a corporation and their marketing department, whose goal is to make money by manipulating people to buy their stuff, but not from a community of volunteers whose so-called goal is to make life easier for the rest of us.
 2) Its a community driven project, and its free.
That's a lame excuse that's been used over and over again in FOSS communities, usually by those who have failed or are in the process of failing. It's getting worse as more and more sophisticated idiots put their junk on Github and then make a big announcement on reddit/HN for others to start using their greatest inventions.
 If you would rather use C++ or Rust, you know where to find 
 them.
That's a kind of response one gets from Amerikans everytime someone criticizes the government, the educations system, the financial and the banking system, etc. "If you don't like it, get the f**k out; this is 'Merica, the greatest country in the world on God's greenest earth." The only people who think Amerika is great are the brain-dead and brainwashed Amerikans themselves. So if you want people to use other languages, then stop elevating D to such high places where it doesn't belong. On DConf, the title of Andrei's next talk should be "D's flaws and why you shouldn't use it." And maybe Walter could talk about how "In 15 years Perl6 introduced more innovations than D in 20". Think about it, D is refurbished C++, done by those with zero experience designing a successful programming language. And what is C++? Possibly one of the worst programming languages in the world. That says something.
Apr 26 2016
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 04/25/2016 09:04 PM, Bill Hicks wrote:
 On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 Hello,

 I've been busy with other things for about a year and would like to
 ask some questions to catch up with latest language/library additions
 in D. Looking through the change logs simply appeared to be a bit
 tedious. My questions might look a bit like asking pain point
 questions on purpose, but it's really only about catching up with the
 status on some issues:

 Thanks for any answers.
 Regards, Bienlein
To be frank, if you are using D for anything more than a throwaway hobby project, I have to tell you, D is a failed language, so stop wasting your time. The people who think that one day D is going to replace or threaten C++, or for that matter any other programming language, are delusional. No offense to all those who have spent great amount of time contributing to D, but people need to accept reality. Five years ago Rust was not even a blip on the radar; however, over the years it has gained steady momentum. It has a larger and ever-growing users and contributors, as well as many PL researchers that will ensure the language is future-proof for the next 10-20 years and beyond. If you are running away from C++, Rust should be your first choice as a systems programming language. And with all the 'improvements' that C++ has received, and will receive, there is really not much room left for D. D also has many flaws, and they don't know how to fix them or won't, specially not without breaking backward compatibility. If you have a GC that is not optional, then you don't have a systems programming language. They finally recognized that, and decided to remove all GC from Phobos so that they case say "see, no GC." Even the basic containers that are available in C++ are missing in Phobos. Why? Because of allocators, which are in experimental stage. How many years did that take? Over five years. Good luck implementing some fancy container and hope you won't have to rewrite it again in the future. Nowadays they're spending time implementing stupid features that nobody cares about or needs. And why DMD still uses its own back-end and not GCC or LLVM is beyond me. I guess you look really good on your resume for reinventing such a big wheel, but it's a foolish and arrogant mistake that has not benefited D. And the idea of a foundation was proposed many years ago, but I suppose back then people were fantasizing about the day that Facebook would poor millions of dollars into D, but that never happened. And Facebook's decision to no longer host DConf was a heavy blow. The list goes on and on and one...
That's a pretty awesome rant! Bill, could you please email me your mailing address? I'd be glad to send you a DConf T-shirt. Thanks! -- Andrei
Apr 25 2016
parent reply Bill Hicks <billhicks reality.com> writes:
On Tuesday, 26 April 2016 at 02:33:41 UTC, Andrei Alexandrescu 
wrote:
 That's a pretty awesome rant! Bill, could you please email me 
 your mailing address? I'd be glad to send you a DConf T-shirt. 
 Thanks! -- Andrei
Quitting a well paying job at Facebook to peruse a hobby sounds like something a person going through midlife crisis would do. You may keep the T-shirt. I suggest you smoke some DMT (and have a breakthrough), or have a few Ayahuasca sessions. If that doesn't set you off on a path to the greatest positive impact, then nothing ever will. Everything you've desired to achieve with D is a construct of your ego, and nothing more.
Apr 26 2016
next sibling parent reply Meta <jared771 gmail.com> writes:
On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 On Tuesday, 26 April 2016 at 02:33:41 UTC, Andrei Alexandrescu 
 wrote:
 That's a pretty awesome rant! Bill, could you please email me 
 your mailing address? I'd be glad to send you a DConf T-shirt. 
 Thanks! -- Andrei
Quitting a well paying job at Facebook to peruse a hobby sounds like something a person going through midlife crisis would do. You may keep the T-shirt. I suggest you smoke some DMT (and have a breakthrough), or have a few Ayahuasca sessions. If that doesn't set you off on a path to the greatest positive impact, then nothing ever will. Everything you've desired to achieve with D is a construct of your ego, and nothing more.
This is completely over the line. Personal attacks of this nature are absolutely unwarranted and unwelcome here.
Apr 27 2016
parent reply Bill Hicks <billhicks reality.com> writes:
On Wednesday, 27 April 2016 at 15:28:37 UTC, Meta wrote:
 On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 On Tuesday, 26 April 2016 at 02:33:41 UTC, Andrei Alexandrescu 
 wrote:
 That's a pretty awesome rant! Bill, could you please email me 
 your mailing address? I'd be glad to send you a DConf 
 T-shirt. Thanks! -- Andrei
Quitting a well paying job at Facebook to peruse a hobby sounds like something a person going through midlife crisis would do. You may keep the T-shirt. I suggest you smoke some DMT (and have a breakthrough), or have a few Ayahuasca sessions. If that doesn't set you off on a path to the greatest positive impact, then nothing ever will. Everything you've desired to achieve with D is a construct of your ego, and nothing more.
This is completely over the line. Personal attacks of this nature are absolutely unwarranted and unwelcome here.
He started it. If I get up on a stage with a grin splitting my face and talk about how great D is, I'm considered a hero. But if I criticize D for it's flaws, then I'm a troll or someone who is just ranting. Anybody has the right to criticize D, just as people have the right to praise it. If D is part of your identity to the point where you can't stand hearing people criticize it and then get offended, then you have issues. Grow up.
Apr 27 2016
next sibling parent jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 27 April 2016 at 17:57:55 UTC, Bill Hicks wrote:
 He started it.
 Grow up.
Contradiction?
Apr 27 2016
prev sibling next sibling parent Abdulhaq <alynch4047 gmail.com> writes:
On Wednesday, 27 April 2016 at 17:57:55 UTC, Bill Hicks wrote:
 If I get up on a stage with a grin splitting my face and talk 
 about how great D is, I'm considered a hero.  But if I 
 criticize D for it's flaws, then I'm a troll or someone who is 
 just ranting.  Anybody has the right to criticize D, just as 
 people have the right to praise it.  If D is part of your 
 identity to the point where you can't stand hearing people 
 criticize it and then get offended, then you have issues.  Grow 
 up.
If you want to be taken seriously then you'll need to furnish us with a real name and stop hiding behind a pseudonym. You've also obviously got plenty of 'issues' that greatly subtract from any useful comment you might otherwise have made, so before investing too much time in unloading here you might care to reflect on the fact that no one can possibly take you seriously.
Apr 27 2016
prev sibling parent Jeremy DeHaan <dehaan.jeremiah gmail.com> writes:
On Wednesday, 27 April 2016 at 17:57:55 UTC, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 15:28:37 UTC, Meta wrote:
 On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 On Tuesday, 26 April 2016 at 02:33:41 UTC, Andrei 
 Alexandrescu wrote:
 That's a pretty awesome rant! Bill, could you please email 
 me your mailing address? I'd be glad to send you a DConf 
 T-shirt. Thanks! -- Andrei
Quitting a well paying job at Facebook to peruse a hobby sounds like something a person going through midlife crisis would do. You may keep the T-shirt. I suggest you smoke some DMT (and have a breakthrough), or have a few Ayahuasca sessions. If that doesn't set you off on a path to the greatest positive impact, then nothing ever will. Everything you've desired to achieve with D is a construct of your ego, and nothing more.
This is completely over the line. Personal attacks of this nature are absolutely unwarranted and unwelcome here.
He started it. If I get up on a stage with a grin splitting my face and talk about how great D is, I'm considered a hero. But if I criticize D for it's flaws, then I'm a troll or someone who is just ranting. Anybody has the right to criticize D, just as people have the right to praise it. If D is part of your identity to the point where you can't stand hearing people criticize it and then get offended, then you have issues. Grow up.
Look, no one here thinks D is perfect. There are some things that I don't like about it myself, but I like it more than everything else. Unless you have criticism that you want to bring up for the sake of discussion, then you *are* ranting. If you take your first post in this thread and rewrite it so that it starts discussion about those topics, it could be valuable. Nothing is going to be changed unless people start talking about them.
Apr 27 2016
prev sibling next sibling parent reply Bienlein <jeti789 web.de> writes:
On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:

 Quitting a well paying job at Facebook to peruse a hobby (...)
This is why I thought that those issues with the GC and things like RefCounted could have been fixed meanwhile. I would like to encourage the D people to put priority on fixing everything that is vital for surprise-free development in D. Because those surprises seem to me really being what drives people away from D, which is a pitty as it is really the best thought out language I have seen so far. For people not being C or C++ developers from ground up fixing those issues that pop up in D here and there themselves is simply too effortful ;-).
Apr 27 2016
parent jkpl <jkpl wowhere.de> writes:
On Wednesday, 27 April 2016 at 16:45:44 UTC, Bienlein wrote:
 On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:

 Quitting a well paying job at Facebook to peruse a hobby (...)
This is why I thought that those issues with the GC and things like RefCounted could have been fixed meanwhile. I would like to encourage the D people to put priority on fixing everything that is vital for surprise-free development in D. Because those surprises seem to me really being what drives people away from D, which is a pitty as it is really the best thought out language I have seen so far. For people not being C or C++ developers from ground up fixing those issues that pop up in D here and there themselves is simply too effortful ;-).
It's because of the second concept.
Apr 27 2016
prev sibling next sibling parent WhatMeWorry <WhatMeWorry gmail.com> writes:
On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 On Tuesday, 26 April 2016 at 02:33:41 UTC, Andrei Alexandrescu 
 wrote:
 That's a pretty awesome rant! Bill, could you please email me 
 your mailing address? I'd be glad to send you a DConf T-shirt. 
 Thanks! -- Andrei
Quitting a well paying job at Facebook to peruse a hobby sounds like something a person going through midlife crisis would do. You may keep the T-shirt. I suggest you smoke some DMT (and have a breakthrough), or have a few Ayahuasca sessions. If that doesn't set you off on a path to the greatest positive impact, then nothing ever will. Everything you've desired to achieve with D is a construct of your ego, and nothing more.
Someone didn't have their meds today.
Apr 27 2016
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 4/26/2016 2:49 PM, Bill Hicks wrote:
 [...]
Criticizing D is fine here. Personal attacks are not welcome.
Apr 28 2016
prev sibling parent reply ShamShime Azelkraft <sszalf gmx.ir> writes:
On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 I suggest you smoke some DMT (and have a breakthrough), or have 
 a few Ayahuasca sessions.  If that doesn't set you off on a 
 path to the greatest positive impact, then nothing ever will.  
 Everything you've desired to achieve with D is a construct of 
 your ego, and nothing more.
You know the name but you ignore the effects. Look at this guy (famous BTW): https://www.youtube.com/watch?v=PXitvt24Q6w He's not cool, he's ridiculous. No more filter. What are those 'Ayahuasca' idea ? Do you want to look like Cassidy, in this particular setup ? The complete village idiot ?
May 03 2016
parent reply Bill Hicks <billhicks reality.com> writes:
On Tuesday, 3 May 2016 at 19:05:03 UTC, ShamShime Azelkraft wrote:
 On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 I suggest you smoke some DMT (and have a breakthrough), or 
 have a few Ayahuasca sessions.  If that doesn't set you off on 
 a path to the greatest positive impact, then nothing ever 
 will.  Everything you've desired to achieve with D is a 
 construct of your ego, and nothing more.
...
DMT: The Spirit Molecule (2010) HD https://www.youtube.com/watch?v=LtT6Xkk-kzk
May 03 2016
parent Abdulhaq <alynch4047 gmail.com> writes:
On Wednesday, 4 May 2016 at 02:42:40 UTC, Bill Hicks wrote:
 On Tuesday, 3 May 2016 at 19:05:03 UTC, ShamShime Azelkraft 
 wrote:
 On Tuesday, 26 April 2016 at 21:49:33 UTC, Bill Hicks wrote:
 I suggest you smoke some DMT (and have a breakthrough), or 
 have a few Ayahuasca sessions.  If that doesn't set you off 
 on a path to the greatest positive impact, then nothing ever 
 will.  Everything you've desired to achieve with D is a 
 construct of your ego, and nothing more.
...
DMT: The Spirit Molecule (2010) HD https://www.youtube.com/watch?v=LtT6Xkk-kzk
Sorry Bill but reading a few wikipedia articles about the Beats and Carlos Castenada doesn't a spiritual guru make... even if you did get as far as a couple of youtube videos as well.
May 04 2016
prev sibling next sibling parent Stefan Koch <uplink.coder googlemail.com> writes:
On Tuesday, 26 April 2016 at 01:04:21 UTC, Bill Hicks wrote:
 On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 [...]
To be frank, if you are using D for anything more than a throwaway hobby project, I have to tell you, D is a failed language, so stop wasting your time. The people who think that one day D is going to replace or threaten C++, or for that matter any other programming language, are delusional. No offense to all those who have spent great amount of time contributing to D, but people need to accept reality. [...]
I cannot believe what I just read ... Anyhow have fun!
Apr 25 2016
prev sibling next sibling parent reply Suliman <evermind live.ru> writes:
On Tuesday, 26 April 2016 at 01:04:21 UTC, Bill Hicks wrote:
 If you are running away from C++, Rust should be your first 
 choice as a systems programming language.
Are you joking? When I am reading it's code my eyes begin to bleed. It's syntax is terrible. Look at it: enum Edge<T> { Edge(Option<T>), Nothing } impl<T> fmt::Display for Edge<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", match self { &Edge::Edge(_) => "E", &Edge::Nothing => "-", }) } } impl<T: fmt::Display> fmt::Display for Edge<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}({})", match self { &Edge::Edge(_) => "E", &Edge::VirtualEdge(_) => "e", &Edge::Nothing => "-", }, match self { &Edge::Edge(Some(v)) => v, &Edge::VirtualEdge(Some(v)) => v, _ => "-" }) } } Do you really think that modern language should like this? I talked with a lot of rust fun-boys. Most of them do not understand do not understand the code of their favourite language. Rust will die when Mozilla will move to WebKit. I much more believe in Swift success, that that Rust have any future.
Apr 26 2016
parent reply ag0aep6g <anonymous example.com> writes:
On 26.04.2016 10:20, Suliman wrote:
 Do you really think that modern language should like this?

 I talked with a lot of rust fun-boys. Most of them do not understand do
 not understand the code of their favourite language.

 Rust will die when Mozilla will move to WebKit. I much more believe in
 Swift success, that that Rust have any future.
Please don't bash on other languages, especially when they're perceived as competition. It reflects badly on the D community.
Apr 26 2016
parent reply Joakim <dlang joakim.fea.st> writes:
On Tuesday, 26 April 2016 at 13:55:23 UTC, ag0aep6g wrote:
 On 26.04.2016 10:20, Suliman wrote:
 Do you really think that modern language should like this?

 I talked with a lot of rust fun-boys. Most of them do not 
 understand do
 not understand the code of their favourite language.

 Rust will die when Mozilla will move to WebKit. I much more 
 believe in
 Swift success, that that Rust have any future.
Please don't bash on other languages, especially when they're perceived as competition. It reflects badly on the D community.
He gave very specific criticism, along with a code sample, then made a prediction, followed by suggesting another competing language that might do better. None of that is the usual content-free fanboy "bashing." There is nothing wrong with occasional criticism of the competition, as long as we don't overdo it, either in frequency or by exaggerating.
Apr 26 2016
next sibling parent reply ag0aep6g <anonymous example.com> writes:
On 26.04.2016 20:16, Joakim wrote:
 He gave very specific criticism,
This is not "very specific criticism": "Are you joking? When I am reading it's code my eyes begin to bleed. It's syntax is terrible. [...] Do you really think that modern language should like this?"
 along with a code sample,
He gave a code sample, yes. He didn't point out what he dislikes about it. He didn't contrast it with another language.
 then made a prediction,
You skipped the part where he puts puts down Rust "fan boys", saying they don't even understand Rust code. His "prediction" is the death of Rust. In my opinion, calling death upon competing projects is bad form. [...]
  None of that is the usual content-free fanboy "bashing."
I don't agree. I don't see any content to speak of.
Apr 26 2016
parent deadalnix <deadalnix gmail.com> writes:
On Tuesday, 26 April 2016 at 19:39:01 UTC, ag0aep6g wrote:
  None of that is the usual content-free fanboy "bashing."
I don't agree. I don't see any content to speak of.
You are talking a lot for someone who sees nothing to speak of.
Apr 26 2016
prev sibling next sibling parent Era Scarecrow <rtcvb32 yahoo.com> writes:
On Tuesday, 26 April 2016 at 18:16:42 UTC, Joakim wrote:
 On Tuesday, 26 April 2016 at 13:55:23 UTC, ag0aep6g wrote:
 Please don't bash on other languages, especially when they're 
 perceived as competition. It reflects badly on the D community.
He gave very specific criticism, along with a code sample, then made a prediction, followed by suggesting another competing language that might do better.
To be honest when I looked at the code I thought it was really hard to read and it was C++, it wasn't until I noted we were talking about rust that I looked at it again, but it hurts my eyes and my head...
Apr 26 2016
prev sibling parent reply Max Samukha <maxsamukha gmail.com> writes:
On Tuesday, 26 April 2016 at 18:16:42 UTC, Joakim wrote:

 He gave very specific criticism, along with a code sample, then 
 made a prediction, followed by suggesting another competing 
 language that might do better.  None of that is the usual 
 content-free fanboy "bashing."  There is nothing wrong with 
 occasional criticism of the competition, as long as we don't 
 overdo it, either in frequency or by exaggerating.
No, judging a language by the appearance of its syntax *is* fanboy bashing. BTW, some interesting points about Swift made by a Rust designer http://graydon2.dreamwidth.org/5785.html.
Apr 27 2016
parent reply Joakim <dlang joakim.fea.st> writes:
On Wednesday, 27 April 2016 at 18:38:17 UTC, Max Samukha wrote:
 On Tuesday, 26 April 2016 at 18:16:42 UTC, Joakim wrote:

 He gave very specific criticism, along with a code sample, 
 then made a prediction, followed by suggesting another 
 competing language that might do better.  None of that is the 
 usual content-free fanboy "bashing."  There is nothing wrong 
 with occasional criticism of the competition, as long as we 
 don't overdo it, either in frequency or by exaggerating.
No, judging a language by the appearance of its syntax *is* fanboy bashing. BTW, some interesting points about Swift made by a Rust designer http://graydon2.dreamwidth.org/5785.html.
Syntax matters. Both for the ease of programmers reading it and, as we've seen with C++, the speed of the compiler. I look at that code sample and I don't want to read code like that. I have the same feeling when I see template-heavy C++ code. It is one of the primary reasons I use D, because it reads very easily to me. Is it just because I'm used to C-style code? Is it purely aesthetic? I don't know, but there is a difference. Walter has talked about an aesthetic quality to D that he tries to optimize, and whatever it is, it comes through to me. And whatever you may think of Suliman's and my opinion, I guarantee that Rust's syntax is one of the main reasons it will never take off, because most programmers have such preferences. The Rust designers may not care: they may have chosen the syntax that best suits their particular audience, just like Haskell, and they don't want it to become more popular. But its syntax will limit it.
Apr 27 2016
parent reply Timon Gehr <timon.gehr gmx.ch> writes:
On 28.04.2016 05:55, Joakim wrote:
 On Wednesday, 27 April 2016 at 18:38:17 UTC, Max Samukha wrote:
 On Tuesday, 26 April 2016 at 18:16:42 UTC, Joakim wrote:

 He gave very specific criticism, along with a code sample, then made
 a prediction, followed by suggesting another competing language that
 might do better.  None of that is the usual content-free fanboy
 "bashing."  There is nothing wrong with occasional criticism of the
 competition, as long as we don't overdo it, either in frequency or by
 exaggerating.
No, judging a language by the appearance of its syntax *is* fanboy bashing. BTW, some interesting points about Swift made by a Rust designer http://graydon2.dreamwidth.org/5785.html.
Syntax matters. Both for the ease of programmers reading it and, as we've seen with C++, the speed of the compiler. I look at that code sample and I don't want to read code like that. I have the same feeling when I see template-heavy C++ code. It is one of the primary reasons I use D, because it reads very easily to me. Is it just because I'm used to C-style code? Is it purely aesthetic? I don't know, but there is a difference. Walter has talked about an aesthetic quality to D that he tries to optimize, and whatever it is, it comes through to me. ...
This is some D code I wrote: template CreateBinderForDependent(string name, string fun=lowerf(name)){ mixin(mixin(X!q{ template (name)(string s, bool propErr = true) if(s.split(",")[0].split(";").length==2){ enum ss = s.split(";"); enum var = ss[0]; enum spl = var.split(" "); enum varn = strip(spl.length==1?var:spl[$-1]); enum sss = ss[1].split(","); enum e1 = sss[0]; enum er = sss[1..$].join(" , "); enum (name)=` auto _ (name)_`~varn~`=`~e1~`. (fun)(`~er~`); if(auto d=_ (name)_`~varn~`.dependee){ static if(is(typeof(return) A: Dependent!T,T)) return d.dependent!T; else mixin(`~(propErr?q{SemProp}:q{PropRetry})~`!q{sc=d.scope_;d.node}); } `~(propErr?`assert(!_ (name)_`~varn~`.dependee,text("illegal dependee ",_ (name)_`~varn~`.dependee.node," ",_ (name)_`~varn~`.dependee.node.sstate));`:``)~` static if(!is(typeof(_ (name)_`~varn~`)==Dependent!void))`~var~`=_ (name)_`~varn~`.value; `; } })); } Ugly code can be written in any language.
Apr 28 2016
next sibling parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Fri, Apr 29, 2016 at 12:40:36AM +0200, Timon Gehr via Digitalmars-d wrote:
[...]
 Ugly code can be written in any language.
"Real programmers can write assembly code in any language. :-)" -- Larry Wall :-P T -- If the comments and the code disagree, it's likely that *both* are wrong. -- Christopher
Apr 28 2016
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 4/28/2016 3:40 PM, Timon Gehr wrote:
 Ugly code can be written in any language.
Of course. But my problem is when there is no way to write an attractive piece of code to perform some functionality, i.e. if you *cannot* write beautiful code.
Apr 28 2016
prev sibling parent Joakim <dlang joakim.fea.st> writes:
On Thursday, 28 April 2016 at 22:40:36 UTC, Timon Gehr wrote:
 On 28.04.2016 05:55, Joakim wrote:
 On Wednesday, 27 April 2016 at 18:38:17 UTC, Max Samukha wrote:
 [...]
Syntax matters. Both for the ease of programmers reading it and, as we've seen with C++, the speed of the compiler. I look at that code sample and I don't want to read code like that. I have the same feeling when I see template-heavy C++ code. It is one of the primary reasons I use D, because it reads very easily to me. Is it just because I'm used to C-style code? Is it purely aesthetic? I don't know, but there is a difference. Walter has talked about an aesthetic quality to D that he tries to optimize, and whatever it is, it comes through to me. ...
This is some D code I wrote: template CreateBinderForDependent(string name, string fun=lowerf(name)){ mixin(mixin(X!q{ template (name)(string s, bool propErr = true) if(s.split(",")[0].split(";").length==2){ enum ss = s.split(";"); enum var = ss[0]; enum spl = var.split(" "); enum varn = strip(spl.length==1?var:spl[$-1]); enum sss = ss[1].split(","); enum e1 = sss[0]; enum er = sss[1..$].join(" , "); enum (name)=` auto _ (name)_`~varn~`=`~e1~`. (fun)(`~er~`); if(auto d=_ (name)_`~varn~`.dependee){ static if(is(typeof(return) A: Dependent!T,T)) return d.dependent!T; else mixin(`~(propErr?q{SemProp}:q{PropRetry})~`!q{sc=d.scope_;d.node}); } `~(propErr?`assert(!_ (name)_`~varn~`.dependee,text("illegal dependee ",_ (name)_`~varn~`.dependee.node," ",_ (name)_`~varn~`.dependee.node.sstate));`:``)~` static if(!is(typeof(_ (name)_`~varn~`)==Dependent!void))`~var~`=_ (name)_`~varn~`.value; `; } })); } Ugly code can be written in any language.
I agree, both about the D code sample and the principle, but that's a very high bar. This is uncommon code, likely impossible in most languages. Whereas the Rust code seems like something you'd be more likely to run into, though I don't know what either code sample does nor do I want to look deeper to find out. ;) Is common code ugly? That's the threshold that must not be crossed, and I believe Walter says the same above, in a different way.
Apr 28 2016
prev sibling next sibling parent reply Steven Schveighoffer <schveiguy yahoo.com> writes:
On 4/25/16 9:04 PM, Bill Hicks wrote:
 On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 Hello,

 I've been busy with other things for about a year and would like to
 ask some questions to catch up with latest language/library additions
 in D. Looking through the change logs simply appeared to be a bit
 tedious. My questions might look a bit like asking pain point
 questions on purpose, but it's really only about catching up with the
 status on some issues:

 Thanks for any answers.
 Regards, Bienlein
To be frank, if you are using D for anything more than a throwaway hobby project, I have to tell you, D is a failed language, so stop wasting your time. The people who think that one day D is going to replace or threaten C++, or for that matter any other programming language, are delusional. No offense to all those who have spent great amount of time contributing to D, but people need to accept reality.
I'm just gonna leave this here. http://techcrunch.com/2014/04/03/tesco-buys-into-ad-tech-as-big-data-division-dunnhumby-buys-sociomantic-for-over-100m/ -Steve
Apr 27 2016
parent reply Bill Hicks <billhicks reality.com> writes:
On Wednesday, 27 April 2016 at 15:14:17 UTC, Steven Schveighoffer 
wrote:
 I'm just gonna leave this here.

 http://techcrunch.com/2014/04/03/tesco-buys-into-ad-tech-as-big-data-division-dunnhumby-buys-sociomantic-for-over-100m/

 -Steve
And a Big Mac is a healthy alternative to unprocessed organic food because McDonald's has made billions in profit.
Apr 27 2016
parent reply Steven Schveighoffer <schveiguy yahoo.com> writes:
On 4/27/16 1:56 PM, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 15:14:17 UTC, Steven Schveighoffer wrote:
 I'm just gonna leave this here.

 http://techcrunch.com/2014/04/03/tesco-buys-into-ad-tech-as-big-data-division-dunnhumby-buys-sociomantic-for-over-100m/
And a Big Mac is a healthy alternative to unprocessed organic food because McDonald's has made billions in profit.
As far as a business is concerned, McDonalds is not just a "throwaway hobby project". I'll let you continue finding absolutely irrelevant analogies to this if you wish, but I'm out. -Steve
Apr 27 2016
parent reply Bill Hicks <billhicks reality.com> writes:
On Wednesday, 27 April 2016 at 18:08:20 UTC, Steven Schveighoffer 
wrote:
 On 4/27/16 1:56 PM, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 15:14:17 UTC, Steven 
 Schveighoffer wrote:
 I'm just gonna leave this here.

 http://techcrunch.com/2014/04/03/tesco-buys-into-ad-tech-as-big-data-division-dunnhumby-buys-sociomantic-for-over-100m/
And a Big Mac is a healthy alternative to unprocessed organic food because McDonald's has made billions in profit.
As far as a business is concerned, McDonalds is not just a "throwaway hobby project". I'll let you continue finding absolutely irrelevant analogies to this if you wish, but I'm out. -Steve
One can only feel sorry for people like you. That red-white-and-blue capitalist dick has been shoved so deep up your butthole that you can't see straight. Michael Parenti explaining how those corporations become so 'successful': https://www.youtube.com/watch?v=GEzOgpMWnVs Here is another: https://www.youtube.com/watch?v=fxcgm-atVlc You never know, you might learn a thing or two.
May 01 2016
next sibling parent Seb <seb wilzba.ch> writes:
On Sunday, 1 May 2016 at 07:35:43 UTC, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 18:08:20 UTC, Steven 
 Schveighoffer wrote:
 On 4/27/16 1:56 PM, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 15:14:17 UTC, Steven 
 Schveighoffer wrote:
 I'm just gonna leave this here.

 http://techcrunch.com/2014/04/03/tesco-buys-into-ad-tech-as-big-data-division-dunnhumby-buys-sociomantic-for-over-100m/
And a Big Mac is a healthy alternative to unprocessed organic food because McDonald's has made billions in profit.
As far as a business is concerned, McDonalds is not just a "throwaway hobby project". I'll let you continue finding absolutely irrelevant analogies to this if you wish, but I'm out. -Steve
One can only feel sorry for people like you. That red-white-and-blue capitalist dick has been shoved so deep up your butthole that you can't see straight. Michael Parenti explaining how those corporations become so 'successful': https://www.youtube.com/watch?v=GEzOgpMWnVs Here is another: https://www.youtube.com/watch?v=fxcgm-atVlc You never know, you might learn a thing or two.
Bill - please stop trolling this forum. If there is concrete stuff you don't like about D, please criticize in a rational way with arguments or better open a PR. If you don't like D, do something good with your time. Start your own open source project - or if you aren't in coding there are so many other good things that can be done in the world ;-)
May 01 2016
prev sibling next sibling parent reply Bruno Medeiros <bruno.do.medeiros+dng gmail.com> writes:
On 01/05/2016 08:35, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 18:08:20 UTC, Steven Schveighoffer wrote:
 On 4/27/16 1:56 PM, Bill Hicks wrote:
 On Wednesday, 27 April 2016 at 15:14:17 UTC, Steven Schveighoffer wrote:
 I'm just gonna leave this here.

 http://techcrunch.com/2014/04/03/tesco-buys-into-ad-tech-as-big-data-division-dunnhumby-buys-sociomantic-for-over-100m/
And a Big Mac is a healthy alternative to unprocessed organic food because McDonald's has made billions in profit.
As far as a business is concerned, McDonalds is not just a "throwaway hobby project". I'll let you continue finding absolutely irrelevant analogies to this if you wish, but I'm out. -Steve
One can only feel sorry for people like you. That red-white-and-blue capitalist dick has been shoved so deep up your butthole that you can't see straight. Michael Parenti explaining how those corporations become so 'successful': https://www.youtube.com/watch?v=GEzOgpMWnVs Here is another: https://www.youtube.com/watch?v=fxcgm-atVlc You never know, you might learn a thing or two.
You've never had a proper, balanced, well-meaning Ayahuasca ceremony, have you? Or if you had, you got the wrong message. That is clear from the way you present your arguments in a very non-emphatic way. And you talk about letting go of the ego, ha... -- Bruno Medeiros https://twitter.com/brunodomedeiros
May 04 2016
parent Bill Hicks <billhicks reality.com> writes:
On Wednesday, 4 May 2016 at 09:52:25 UTC, Bruno Medeiros wrote:
 You've never had a proper, balanced, well-meaning Ayahuasca 
 ceremony, have you? Or if you had, you got the wrong message. 
 That is clear from the way you present your arguments in a very 
 non-emphatic way. And you talk about letting go of the ego, 
 ha...
" So many gods So many creeds, So many paths that wind and wind While just the art of being kind is all this sad world needs. I am the voice of the voiceless Through me the mute shall speak 'til the deaf world's ear be made to hear the cry of the wordless weak. " -- Ella Wheeler Wilcox
May 04 2016
prev sibling parent Gary Willoughby <dev nomad.so> writes:
On Sunday, 1 May 2016 at 07:35:43 UTC, Bill Hicks wrote:
 ...
https://www.reddit.com/r/iamverysmart
May 04 2016
prev sibling parent reply Israel <tl12000 live.com> writes:
On Tuesday, 26 April 2016 at 01:04:21 UTC, Bill Hicks wrote:
 On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 [...]
To be frank, if you are using D for anything more than a throwaway hobby project, I have to tell you, D is a failed language, so stop wasting your time. The people who think that one day D is going to replace or threaten C++, or for that matter any other programming language, are delusional. No offense to all those who have spent great amount of time contributing to D, but people need to accept reality. [...]
Lol, i hope youre being paid and not doing it for free.
Apr 27 2016
parent NX <nightmarex1337 hotmail.com> writes:
On Wednesday, 27 April 2016 at 20:30:56 UTC, Israel wrote:
 Lol, i hope youre being paid and not doing it for free.
Don't feed the evil.
Apr 27 2016
prev sibling parent reply deadalnix <deadalnix gmail.com> writes:
Ok, let's get out of this stupid troll and have some actual 
answers

On Monday, 25 April 2016 at 21:20:04 UTC, Bienlein wrote:
 Hello,

 I've been busy with other things for about a year and would 
 like to ask some questions to catch up with latest 
 language/library additions in D. Looking through the change 
 logs simply appeared to be a bit tedious. My questions might 
 look a bit like asking pain point questions on purpose, but 
 it's really only about catching up with the status on some 
 issues:

 * There was a problem with the GC leaking memory in some 
 situations. Is this still the case?
As far as I know, this is not an issue on 64bits. On 32 bits, nothing fundamental changed, but the compiler got a bit smarter about alocating with the no scan flag, so that's better.
 * There was some talk about changing the standard library in a 
 way that it can be used with the GC and without. My question is 
 what the current status is concerning this topic.
Most of phobos is usable without a GC now, and it is getting better with every releases.
 * RefCounted only used to work with structs. It would be useful 
 if it worked with classes as well. Is it being considered to 
 work on this?
I don't know for that one, but if that doesn't work with classes, this is indeed a problem worth solving.
Apr 25 2016
next sibling parent reply Bienlein <jeti789 web.de> writes:
Hi deadalnix,

thanks for taking the time to answer my questions. The issue with 
RefCounted and classes appears to be fixed. I found this: 
http://wiki.dlang.org/DIP74. I also found evidence on the 
Internet that the GC leaking memory is only an issue with 32 bit 
machines. Looks like I could have just googled those things. 
Didn't expect things to be that easy. Anyway, thanks for 
answering.

With regard to Rust I think it is a very well thought out 
language also with an ecosystem that is well thought out (e.g. 
crates, module system, and other things). But it is for pure 
systems programming. I will not enter this area any more in this 
life, but do my stuff in Java and have some performance critical 
parts in C++. For that purpose modelling power still matters and 
I find Rust falls short in this area (which is probably fine for 
a pure systems language) whereas C++ and D are very well equipped 
for this.

Cheers, Bienlein
Apr 26 2016
parent reply cym13 <cpicard openmailbox.org> writes:
On Tuesday, 26 April 2016 at 12:19:40 UTC, Bienlein wrote:
 Hi deadalnix,

 thanks for taking the time to answer my questions. The issue 
 with RefCounted and classes appears to be fixed. I found this: 
 http://wiki.dlang.org/DIP74. I also found evidence on the 
 Internet that the GC leaking memory is only an issue with 32 
 bit machines. Looks like I could have just googled those 
 things. Didn't expect things to be that easy. Anyway, thanks 
 for answering.
Beware that what you found is but an Improvement Proposal, it hasn't been accepted in its current state yet and it hasn't been implemented either.
Apr 26 2016
parent reply Bienlein <jeti789 web.de> writes:
On Tuesday, 26 April 2016 at 12:34:49 UTC, cym13 wrote:
 On Tuesday, 26 April 2016 at 12:19:40 UTC, Bienlein wrote:
 Hi deadalnix,

 thanks for taking the time to answer my questions. The issue 
 with RefCounted and classes appears to be fixed. I found this: 
 http://wiki.dlang.org/DIP74. I also found evidence on the 
 Internet that the GC leaking memory is only an issue with 32 
 bit machines. Looks like I could have just googled those 
 things. Didn't expect things to be that easy. Anyway, thanks 
 for answering.
Beware that what you found is but an Improvement Proposal, it hasn't been accepted in its current state yet and it hasn't been implemented either.
All right, thanks for the hint. Is there a timeline till when this DIP will be implemented? Also it would be nice if the GC, that does not leak with 32-bit D, would be plugged into 32-bit D from the beginning. Regards, Bienlein
Apr 29 2016
parent reply tsbockman <thomas.bockman gmail.com> writes:
On Friday, 29 April 2016 at 10:06:06 UTC, Bienlein wrote:
 All right, thanks for the hint. Is there a timeline till when 
 this DIP will be implemented?
No; that particular solution might never be implemented at all. Getting safe reference counting working well in D (*somehow*) is a high priority, though. Andrei Alexandrescu is giving the opening keynote for DConf 2016 tomorrow: http://dconf.org/2016/schedule/ From the abstract, it sounds like he will be discussing the reference counting problem again.
 Also it would be nice if the GC, that does not leak with 32-bit 
 D, would be plugged into 32-bit D from the beginning.
Jeremy DeHaan just started a Google Summer of Code project to make D's GC precise - or at least much *more* precise than it is now: http://forum.dlang.org/post/dgvhslayxialmebvjuwr forum.dlang.org If he is able to meet his proposed schedule, I expect there will be a D release with a much less leaky GC in 6 months to a year.
May 03 2016
parent Bienlein <ffm2002 web.de> writes:
On Tuesday, 3 May 2016 at 19:54:06 UTC, tsbockman wrote:
 On Friday, 29 April 2016 at 10:06:06 UTC, Bienlein wrote:
 All right, thanks for the hint. Is there a timeline till when 
 this DIP will be implemented?
No; that particular solution might never be implemented at all. Getting safe reference counting working well in D (*somehow*) is a high priority, though. Andrei Alexandrescu is giving the opening keynote for DConf 2016 tomorrow: http://dconf.org/2016/schedule/ From the abstract, it sounds like he will be discussing the reference counting problem again.
 Also it would be nice if the GC, that does not leak with 
 32-bit D, would be plugged into 32-bit D from the beginning.
Jeremy DeHaan just started a Google Summer of Code project to make D's GC precise - or at least much *more* precise than it is now: http://forum.dlang.org/post/dgvhslayxialmebvjuwr forum.dlang.org If he is able to meet his proposed schedule, I expect there will be a D release with a much less leaky GC in 6 months to a year.
All right, that was constructive. Thanks.
May 04 2016
prev sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
On Tuesday, 26 April 2016 at 04:37:03 UTC, deadalnix wrote:
 On 32 bits, nothing fundamental changed, but the compiler
 got a bit smarter about alocating with the no scan flag,
 so that's better.
Indeed, though any large array is liable to be pinned by a false pointer on 32 bit, even with no_scan. I actually recommend malloc/free large arrays with easy lifetimes on 32 bit just to avoid those accidental leaks. 64 bit is fine though.
 I don't know for that one, but if that doesn't work with 
 classes, this is indeed a problem worth solving.
I think it kinda works now but not very well because the ref countedness gets lost in inheritance. If it implements two interfaces for example, it cannot properly express that implicit conversion. Usable though AFAIK, just clunky.
Apr 26 2016