Re: Beta 2.079.0

2018-03-30 Thread meppl via Digitalmars-d-announce

On Saturday, 31 March 2018 at 00:25:47 UTC, Seb wrote:
On Tuesday, 20 February 2018 at 08:43:50 UTC, Martin Nowak 
wrote:

On Monday, 19 February 2018 at 15:58:57 UTC, Joakim wrote:

[...]


No need to use it if you don't like it. It's particularly 
useful for small examples, localized imports and hacking.
It's mainly a generalisation of the existing possibility to 
mix module imports and one selective import at the end.
If you prefer java-like 50 lines import manifests, then by all 
means keep using those.

How would that feature cause bugs though?


AFAICT Rust now has introduced the exactly same feature. It's 
quite interesting to see that there was no outcry by the 
community and it was universally liked:


https://blog.rust-lang.org/2018/03/29/Rust-1.25.html
https://github.com/rust-lang/rust/issues/44494


the curly brackets make the rust implementation more readable. 
The dmd implementation didn't use brackets. I believe that's a 
main reason for the resistance from the people


Re: Beta 2.079.0

2018-03-30 Thread Seb via Digitalmars-d-announce

On Tuesday, 20 February 2018 at 08:43:50 UTC, Martin Nowak wrote:

On Monday, 19 February 2018 at 15:58:57 UTC, Joakim wrote:
17. Allow multiple selective imports from different modules in 
a single import statement


I have a bad feeling that that one is going to be a source of 
a raft of bugs for years to come.


No need to use it if you don't like it. It's particularly 
useful for small examples, localized imports and hacking.
It's mainly a generalisation of the existing possibility to mix 
module imports and one selective import at the end.
If you prefer java-like 50 lines import manifests, then by all 
means keep using those.

How would that feature cause bugs though?


AFAICT Rust now has introduced the exactly same feature. It's 
quite interesting to see that there was no outcry by the 
community and it was universally liked:


https://blog.rust-lang.org/2018/03/29/Rust-1.25.html
https://github.com/rust-lang/rust/issues/44494




Re: std.variant Is Everything Cool About D

2018-03-30 Thread Walter Bright via Digitalmars-d-announce

On 3/29/2018 12:32 PM, Walter Bright wrote:

On 3/29/2018 10:30 AM, 12345swordy wrote:

There are some quite criticisms being made in the comments section.


The main criticism is a misunderstanding about std.variant's allocation 
strategy. I have been trying to correct that.


Part of the problem is the documentation for std.variant is not clear about when 
memory allocation happens. It also is not clear that "boxing" means "allocates 
space for the data on the GC heap and stores a pointer to it in the variant".


Re: LDC 1.8.0

2018-03-30 Thread Matthias Klumpp via Digitalmars-d-announce
On Thursday, 29 March 2018 at 08:10:11 UTC, Martin Tschierschke 
wrote:
On Saturday, 24 March 2018 at 17:33:18 UTC, Matthias Klumpp 
wrote:
On Tuesday, 13 March 2018 at 01:52:48 UTC, Matthias Klumpp 
wrote:

[...]
Aww, just a little bit too late to easily get into Ubuntu 
18.04 LTS


Well It still made it, yay! (Even without me explicitly 
requesting it)
This means Ubuntu 18.04 will be pretty up-to-date when it 
comes to D stuff, only GDC 8 won't be the default (but still 
available).
The thing that is facilitating an up-to-date D stack in Debian 
and Ubuntu is software in the archive using D. The Tilix 
terminal emulator is at the forefront there, followed by my 
appstream-generator and the Laniakea archive management suite 
and all the bits and pieces those projects depend on (like 
GtkD in Tilix' case).


This is very cool! Will DMD become part of Ubuntu, too?


No, it's too late for that and adding DMD to Debian (and thereby 
Ubuntu) would be a significant amount of work.
For compiling D code in Debian/Ubuntu, we will pretty much always 
use LDC or GDC, because we want stronger optimization and better 
architecture support, while compilation time doesn't matter at 
all.
That being said, with DMD being under a completely free license 
now, the only thing that is preventing it from being in Debian is 
lack of manpower in the D team (having it would be very useful!).
So, if anyone is interested in helping out with maintaining 
compiler packages, D libraries or tools, please join the Debian D 
team![1].
You don't have to be a Debian developer to help, but you should 
ideally be somewhat familiar with Debian's policies and 
packaging. Me or others in the D team who are Debian developers 
can review the changes and sponsor them into the Debian and 
Ubuntu archives.


Since Ubuntu 18.04 LTS releases this April, getting DMD in that 
release will be almost impossible (feature freeze is very soon), 
but we could have it in Ubuntu 18.10, if someone creates packages 
for it.


[1]: https://salsa.debian.org/d-team/ - get a guest account: 
https://signup.salsa.debian.org/


Re: std.variant Is Everything Cool About D

2018-03-30 Thread Meta via Digitalmars-d-announce

On Friday, 30 March 2018 at 13:44:50 UTC, Meta wrote:
I've submitted it to Hacker News as well (looks like someone 
posted it yesterday, but it only got 1 vote and there was no 
discussion, so I figured that was grounds enough for 
resubmission). If you've got an account, please give me your 
meaningless internet points.


https://hn.algolia.com/?query=std.variant%20is%20everything%20cool%20about%20d=byDate=0=custom=story=1522368000=1522454400


And it seems they're still not biting. Looking at the front page, 
I can't believe how few actual programming or startup-related 
submissions there are.


https://imgur.com/a/hFlbs


Re: std.variant Is Everything Cool About D

2018-03-30 Thread Meta via Digitalmars-d-announce

On Thursday, 29 March 2018 at 14:10:39 UTC, Mike Parker wrote:
Jared Hanson (a.k.a Meta and MetaLang around these parts) was 
inspired by an article titled "std::visit is everything wrong 
with modern C++" to contrast it with D's std.variant.visit. The 
result is this well-written post for the D Blog.


The blog:
https://dlang.org/blog/2018/03/29/std-variant-is-everything-cool-about-d/

Reddit:
https://www.reddit.com/r/programming/comments/881hmi/stdvariant_is_everything_cool_about_d/


I've submitted it to Hacker News as well (looks like someone 
posted it yesterday, but it only got 1 vote and there was no 
discussion, so I figured that was grounds enough for 
resubmission). If you've got an account, please give me your 
meaningless internet points.


https://hn.algolia.com/?query=std.variant%20is%20everything%20cool%20about%20d=byDate=0=custom=story=1522368000=1522454400


Re: std.variant Is Everything Cool About D

2018-03-30 Thread rjframe via Digitalmars-d-announce
On Fri, 30 Mar 2018 00:55:20 +, dangbinghoo wrote:

> I think we need a book about D's std Phobos, like `mastering STL`
> or something like C++ world do, but of course, I didn't mean selling to
> C++ world, I mean newbie may need knowledge about the Phobos and the
> design and using the power of the library for real practice, not to
> compare with the C++ world.

I'm not sure Phobos is complex enough to need a book just for the library. 
Anything that would go into it would either be a programming in
D-in-general thing or would be a useful improvement to the documentation 
itself.


Re: std.variant Is Everything Cool About D

2018-03-30 Thread Patrick Schluter via Digitalmars-d-announce

On Friday, 30 March 2018 at 03:54:21 UTC, Mike Parker wrote:

On Friday, 30 March 2018 at 02:46:13 UTC, jmh530 wrote:

On Friday, 30 March 2018 at 00:37:27 UTC, Meta wrote:


Unfortunately, this turned out to be the worst possible day 
for me to try to actively monitor the thread and respond to 
questions. I'm surprised that people latched onto my little 
quip about C++ using the name variant for a tagged union.


It seems that any comment in a D article that refers to C++ 
will be construed in the worst possible way on reddit...


That's fine by me. Right now, this post is the fourth 
most-viewed this year and it's not far off from number three.


While I would love to please the reddit crowd to the extent 
that we see no negativity, I'm quite happy with the fact that 
our comment threads there are nowhere near as negative as they 
used to be. Posts that do generate this level of discussion 
have higher views.


I can't dismiss reddit comments completely, but I don't put as 
much weight on them as I used to. A subreddit is somewhat 
comparable to a forum for a popular video game -- lots of vocal 
people who are actually a small minority of the player base. We 
can't measure the number of people who click the reddit link to 
the blog and come away from it with a positive impression. They 
aren't going to bother commenting on reddit.


You're right and the unreasonable position of the 
SolidStateGraphics user is clear for everyone to see. There are 
some points he makes that could be discussed but by holding 
essentially the position "D is shit because it is not C++" his 
whole argumentation falls apart as Stockholm-syndrome induced 
rationalisation.


Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome

2018-03-30 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 28 March 2018 at 23:25:09 UTC, Walter Bright wrote:

On 3/28/2018 1:27 PM, Jacob Carlborg wrote:
There's usually nothing that prevents the build tool to write 
files at build time. Dub can do this.


It's expected with a build tool. Not a compiler.


With the frame of mind prevalent in our Industry I really want to 
have compiler includibg codegen as a bunch of library components.


Then there is no problem innovating while people argue over 
things “allowed” for a compiler, or a linker, or a build tool. 
None of these actually have to be apps talking via files.


If I look closely every program I see is a graph database, with 
nodes sometimes being code, types, sometimes data, other 
meta-data such as ABI attributes or conditional compilation 
flags, documentation, external tools, specs and databases are 
also part of this. Code that produces code is also part of such 
graph, and CTFE/macroses would just be finer grained approach.


Why process graphs piece-wise in a frentic dance of command-line 
tools that try to fit all to a tree of files (multiple ones, in 
many location, and part in some CMS) and then have editors/IDEs 
integrate? Was easier I believe + inertia, easy != simple though.