Re: Sublime Text Syntax Definition Rewrite

2019-02-27 Thread Benjamin Schaaf via Digitalmars-d-announce

On Thursday, 28 February 2019 at 05:37:42 UTC, Dmitry wrote:
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf 
wrote:

I've recently gotten a massive rewrite of the D syntax

...

Hope you enjoy!
---
Thank you! Looking forward to try it (right now it shows 'no 
update available', build 3176)


3176 was the latest stable build, you'd need to change to the 
development versions (requires a license) to get more recent 
updates or you can install the Packages manually.


Is this the reason why it works extremely slow with big files? 
:D


I know you're just taking a fun jab but from personal experience 
its behaved pretty well with multi-GB files. All the corner cases 
we're aware of where it does become slow are algorithmic problems 
where a change in language really wouldn't help :)


Re: Sublime Text Syntax Definition Rewrite

2019-02-27 Thread Dmitry via Digitalmars-d-announce
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf 
wrote:

I've recently gotten a massive rewrite of the D syntax

...

Hope you enjoy!
---
Thank you! Looking forward to try it (right now it shows 'no 
update available', build 3176)



Though I'd love to, we don't use D internally for anything.

Is this the reason why it works extremely slow with big files? :D



Re: DIP 1018--The Copy Constructor--Formal Review

2019-02-27 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 02/25/2019 03:41 PM, Paolo Invernizzi wrote:

On Monday, 25 February 2019 at 20:23:58 UTC, Andrei Alexandrescu wrote:

On 2/25/19 3:23 PM, Jacob Carlborg wrote:

On 2019-02-25 20:24, Mike Parker wrote:


 From the process document:

“the DIP Manager or the Language Maintainers may allow for
exceptions which waive requirements or responsibilities at their
discretion.”


Having it documented doesn't make it less flawed.


Jacob, are there amends you need to make to the DIP?


Honestly, I've not understood the rationale or the covered use case in
letting the copy ctor mutate the ref source parameters...
Sincerely, without polemical intent.


I made an editorial pass:

https://github.com/dlang/DIPs/pull/145

The most material change was additional explanation of using mutable ref 
instead of e.g. const. Here's the relevant excerpt, please let me know 
if it clarifies the motivation.


=
1. The parameter of the copy constructor is passed by a mutable 
reference to the
source object. This means that a call to the copy constructor may 
legally modify

the source object:

```d
struct A
{
int[] a;
this(ref A another)
{
another.a[2] = 3;
}
}

void main()
{
A a, b;
a = b;// b.a[2] is modified
}
```

This is surprising and potentially error-prone behavior because changing 
the source of a copy is not customary and may surprise the user of a 
type. (For that reason, C++ coding standards adopt the convention of 
taking the source by means of reference to `const`; copy constructors 
that use non-`const` right-hand side are allowed but discouraged.) In D, 
`const` and `immutable` are more restrictive than in C++, so forcing 
`const` on the copy constructor's right-hand side would make simple 
copying task unduly difficult. Consider:


```d
class Window
{
...
}
struct Widget
{
private Window display;
...
this(ref const Widget rhs)
{
display = rhs.display; // Error! Cannot initialize a Window 
from a const(Window)

}
}
```

Such sharing of resources across objects is a common occurrence, which 
would be impeded by forcing `const` on the right-hand side of a copy. 
(An inferior workaround would be to selectively cast `const` away inside 
the copy constructor, which is obviously undesirable.) For that reason 
this DIP proposes allowing mutable copy sources.

=



Sublime Text Syntax Definition Rewrite

2019-02-27 Thread Benjamin Schaaf via Digitalmars-d-announce

Hello all,

I've recently gotten a massive rewrite of the D syntax 
highlighting merged into the Sublime Text default packages. This 
has since been deployed in the most recent development version 
3192 (license required) and will be shipping with the next stable.


Anyone trying Sublime Text has probably noticed the poor D 
support. Here's a very incomplete list of everything that's been 
fixed/improved:


* Functions, classes, interfaces, enums, structs, unions, 
templates and aliases are now properly indexed, making GoTo 
Definition work properly
* Function/Template calls are properly marked, making GoTo 
Reference work properly

* Nested comments now work as expected
* Shebangs are properly highlighted
* Ligatures are now properly supported
* `..` no longer highlights as a floating point
* Strings are now properly highlighted, including postfixes and 
delimited strings

* Token strings actually highlight tokens now
* Attributes, including UDAs, are highlighted properly
* Automatic indentation is no longer broken (Typing `} catch...` 
would re-indent the line)

* Arguments are highlighted as actual arguments
* Contracts are properly highlighted now

You can find the pr here: 
https://github.com/sublimehq/Packages/pull/1850


If you do find a bug with the syntax highlighting or just 
something that could be done better please leave a bug report on 
the repository, I'll be maintaining it for the foreseeable future:

https://github.com/sublimehq/Packages/issues

If you don't have a license you can still use the new syntax 
highlighting before the next stable build by cloning the 
repository and symlinking the `D` folder into your Sublime Text 
"Packages" directory (Details in the README).

You can download Sublime Text here: https://www.sublimetext.com/3

Hope you enjoy!
---

Full disclosure: I work for Sublime HQ. Though I'd love to, we 
don't use D internally for anything.


Re: The D Programming Language has been accepted as a GSoC 2019 organization

2019-02-27 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Feb 27, 2019 at 01:04:42PM -0500, Nick Sabalausky (Abscissa) via 
Digitalmars-d-announce wrote:
[...]
> Although frankly, I have to admit, this whole "Fast code, fast" thing
> is complete and utter rubbish compared to the "Better C++" that we've
> now decided to be politically incorrect (very ironically, despite
> active promotion of "betterC").

That fast-fast-fast slogan makes me cringe every time I see it. I try
not to look at it every time I go to dlang.org, lest I throw up. If it
weren't for the fact that D is actually technically superior to many
other alternatives, I might have left D on that account alone; it's
*that* bad.

It surely can't have escaped the more observant among us the irony that
the flagship D compiler, dmd, is the antithesis of that slogan as far as
codegen quality is concerned.  Thankfully, ldc/gdc comes to the rescue
on the codegen front, otherwise this slogan would bear far more
resemblance to fast food than I find palatable -- fast food fast, who
cares if it's unhealthy and fattening AKA compile code fast, who cares
if it produces slow executables.

But since the PTBs have decreed it, and I really don't care enough about
marketing to want to push for a change, I just shut one eye and carry on
with the more important things in life. *shrug*


T

-- 
Without outlines, life would be pointless.


Re: gtkDcoding Blog: Post #0009 - Boxes

2019-02-27 Thread Ron Tarrant via Digitalmars-d-announce

On Wednesday, 13 February 2019 at 02:42:07 UTC, DanielG wrote:
Why not just make a single thread, "gtkDecoding Blog updates", 
and always append to it? It will bump the topic back up to the 
top whenever you add something.


Sounds sane enough. :)


Re: The D Programming Language has been accepted as a GSoC 2019 organization

2019-02-27 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce

On 2/27/19 11:05 AM, JN wrote:

On Wednesday, 27 February 2019 at 16:01:15 UTC, Bastiaan Veelo wrote:

On Tuesday, 26 February 2019 at 22:34:45 UTC, Seb wrote:


The D Language Language got accepted as a Google Summer of Code 
organization!


Awesome!



Or be turned off. If I didn't know about D, from that description I'd 
think it's some experimental language for whom Boost wasn't crazy enough 
with templates. "The best, most innovative ways to use the D language 
are yet to be discovered." That's great. But it doesn't answer the most 
important questions - what can it be used for, what makes it different 
than say C++ or Java.


In my experience, when non-D-users are asking that question, what 
they're REALLY looking for is one (and only one) gimmick that the entire 
D language (and ONLY D) takes religiously at the negligence of all else. 
And since "pragmatism" isn't a trendy silver-bullet ideology like Java's 
"Everything is an object", or JS's "Everything is a variant", Python's 
"Everything is a variant AND we have 'Zen'", Haskell's "Though shalt not 
do imperative", or Go's "ZOMG, It's from teh Google Gods!!!", so they 
gripe about not being spoon-fed marketing BS and walk away. Habitual 
consumerists. They're lost souls, slaves to pack mentality, so forget 
about them. Target leaders and thinkers instead.


Although frankly, I have to admit, this whole "Fast code, fast" thing is 
complete and utter rubbish compared to the "Better C++" that we've now 
decided to be politically incorrect (very ironically, despite active 
promotion of "betterC").


Re: The D Programming Language has been accepted as a GSoC 2019 organization

2019-02-27 Thread JN via Digitalmars-d-announce
On Wednesday, 27 February 2019 at 16:01:15 UTC, Bastiaan Veelo 
wrote:

On Tuesday, 26 February 2019 at 22:34:45 UTC, Seb wrote:

Hi all,

I have some very exciting news to share.

The D Language Language got accepted as a Google Summer of 
Code organization!


The official GSoC page provides a few initial pointers and 
details:


https://summerofcode.withgoogle.com/organizations/6103365956665344


You guys give a very nice description of the language on that 
page. If I didn’t already use D, I would want to now!


Bastiaan.


Or be turned off. If I didn't know about D, from that description 
I'd think it's some experimental language for whom Boost wasn't 
crazy enough with templates. "The best, most innovative ways to 
use the D language are yet to be discovered." That's great. But 
it doesn't answer the most important questions - what can it be 
used for, what makes it different than say C++ or Java.


Although I doubt it matters in a description on a page like that.

As for GSoC, good luck to all participants. I think just as 
important are the ideas, it's important to deliver on them, so we 
don't end up with lost effort such as with std.experimental.xml, 
which is kind of in a limbo right now.


Re: The D Programming Language has been accepted as a GSoC 2019 organization

2019-02-27 Thread Bastiaan Veelo via Digitalmars-d-announce

On Tuesday, 26 February 2019 at 22:34:45 UTC, Seb wrote:

Hi all,

I have some very exciting news to share.

The D Language Language got accepted as a Google Summer of Code 
organization!


The official GSoC page provides a few initial pointers and 
details:


https://summerofcode.withgoogle.com/organizations/6103365956665344


You guys give a very nice description of the language on that 
page. If I didn’t already use D, I would want to now!


Bastiaan.


Re: The D Programming Language has been accepted as a GSoC 2019 organization

2019-02-27 Thread Craig Dillabaugh via Digitalmars-d-announce

On Tuesday, 26 February 2019 at 22:34:45 UTC, Seb wrote:

Hi all,

I have some very exciting news to share.

[...]


Congratulations on being excepted this year. In addition to the 
'free' work for the community this is also a great way to draw in 
new talent.


Re: DIP 1018--The Copy Constructor--Formal Review

2019-02-27 Thread Kagamin via Digitalmars-d-announce

On Tuesday, 26 February 2019 at 05:38:01 UTC, Manu wrote:
I'm talking about this DIP. Allowing a mutable copy argument 
feels super weird.


The problem was out of place mutation, which can't happen with 
copy constructor, because initialization from rvalue is a move, 
so the copy constructor won't be called.


Re: The D Programming Language has been accepted as a GSoC 2019 organization

2019-02-27 Thread jmh530 via Digitalmars-d-announce

On Tuesday, 26 February 2019 at 22:34:45 UTC, Seb wrote:

Hi all,

I have some very exciting news to share.
[snip]


Great news.


DConf 2019 Guided Tour

2019-02-27 Thread Mike Parker via Digitalmars-d-announce
From now, all DConf 2019 registrants are eligible to participate 
for free in a walking tour guided by Julian McDonnell of Joolz 
Guides:


https://joolzguides.com/

You can see some of Julian's video guides on his YouTube channel:

https://www.youtube.com/channel/UCFWqceEDVxifaU3ljzMH5tg

Tours will be offered on May 6th and May 7th. Details will be 
forthcoming.


Availability is limited, so this is a first-come-first-serve sort 
of thing. When you register, I'll provide you with the 
information you need to reserve a spot.


Re: DIP 1018--The Copy Constructor--Formal Review

2019-02-27 Thread Walter Bright via Digitalmars-d-announce

On 2/27/2019 3:27 AM, Jacob Carlborg wrote:

[...]


Please start another thread.


Re: DIP 1018--The Copy Constructor--Formal Review

2019-02-27 Thread Jacob Carlborg via Digitalmars-d-announce

On 2019-02-26 12:07, Walter Bright wrote:

It hasn't been approved yet, and please start another thread if you want 
to discuss it.


You have approved the pull request.

--
/Jacob Carlborg