Intellij D Language plugin v1.28.0

2022-06-06 Thread singingbush via Digitalmars-d-announce
For anyone that likes to use Intellij, the latest release of the 
D Language plugin has now been published to the Jetbrains plugin 
repository: https://plugins.jetbrains.com/plugin/8115


I'd like to thank Etienne Brateau for contributing numerous bug 
fixes in this release.


For a list of resolved issues see: 
https://github.com/intellij-dlanguage/intellij-dlanguage/milestone/32?closed=1


There's still much to be done both in terms of fixes and features 
so if anyone is interested in contributing please visit the 
github repo: 
https://github.com/intellij-dlanguage/intellij-dlanguage


The documentation is available here 
https://intellij-dlanguage.github.io but it is in need of an 
overhaul as it's not been updated for a while.


Re: D Language Foundation May 2022 Monthly Meeting Summary

2022-06-06 Thread Guillaume Piolat via Digitalmars-d-announce

On Monday, 6 June 2022 at 08:44:32 UTC, Mike Parker wrote:


## The next meeting
Our next monthly meeting is scheduled for Friday, June 10, at 
14:00 UTC. The vision document is the main item on the agenda, 
and I expect it to take up most of the oxygen. We'll review the 
current draft and decide what to cut, what to keep, what to 
add, etc. My expectation after that meeting is that it will be 
on me to make the revisions, after which I'll email the members 
for final feedback, then make any final revisions, then 
publish. It should be ready before DConf, the end of June at 
the earliest.


Thanks for following through with SIMD bugs!
Love seeing the Foundation reports.


Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce

On Monday, 6 June 2022 at 11:23:44 UTC, Daniel N wrote:

So Object-C can import C, but *C* cannot import *C*.


Objective-C is a proper superset of C AFAIK.



Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Dom Disc via Digitalmars-d-announce

On Monday, 6 June 2022 at 03:17:34 UTC, forkit wrote:

cannot have encapsulation unless it is put into a super type
(the module), all by its self (with no friends).


It can have friends - they just need to be in the same file 
(module).
And a class without its friend is really only half a type - 
that's why it is better to think of the module as the new type - 
which contains both the interface and all interna (friends and 
sub-classes and @system parts that should not be visible from the 
outside).


That's what a file is for in general: to collect things that 
belong together and should be seen as a single object. It makes 
no sense to put other unrelated classes or functions into the 
same file. Especially not in a large project (which is the only 
case where encapsulation makes sense at all).


Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Daniel N via Digitalmars-d-announce

On Monday, 6 June 2022 at 05:49:55 UTC, Paulo Pinto wrote:

On Sunday, 5 June 2022 at 22:41:14 UTC, Walter Bright wrote:

On 6/4/2022 10:54 PM, Paulo Pinto wrote:

That paper had a real implementation to follow along,


I didn't see it.


while Lucid and IBM products were real things one could buy.


That are *C* compilers doing imports for *C* code?

What C compilers have imports:

gcc - nope
clang - nope
VC - nope
Digital Mars C - nope
C Standard - nope

ImportC - yes!


https://clang.llvm.org/docs/Modules.html

And I am out of this thread.


https://clang.llvm.org/docs/Modules.html#objective-c-import-declaration

"At present, there is no C or C++ syntax for import declarations. 
Clang will track the modules proposal in the C++ committee. See 
the section Includes as imports to see how modules get imported 
today."


So Object-C can import C, but *C* cannot import *C*.

Walter added __import support in *.c, clang could have done the 
same but they *didn't*, they were also probably just 10 lines 
away from the goal.




Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce

On Monday, 6 June 2022 at 11:02:32 UTC, Ola Fosheim Grøstad wrote:
Yes, Objective-C has added modules to C since forever… Just 
rename your .c file to .m


I guess that would be the first.


Or maybe not… you still use .h, so it depends on the 
implementation. Pointless discussion really.





Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce

On Monday, 6 June 2022 at 05:49:55 UTC, Paulo Pinto wrote:

https://clang.llvm.org/docs/Modules.html

And I am out of this thread.


Yes, Objective-C has added modules to C since forever… Just 
rename your .c file to .m


I guess that would be the first.






Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce

On Monday, 6 June 2022 at 01:05:38 UTC, zjh wrote:

On Monday, 6 June 2022 at 00:19:16 UTC, zjh wrote:


Because it's fun to be first!

Yes, `'d'` is always independent.


[C++'s 
moudle](https://www.oschina.net/news/198583/c-plus-plus-23-to-introduce-module-support)


`D`, hurry up and get nervous.


C++ has had modules for a while, but only Microsoft has a fully 
compliant implementation:


https://en.cppreference.com/w/cpp/language/modules
https://en.cppreference.com/w/cpp/compiler_support/20

Give it a year to be fully usable across compilers.



Re: D Language Foundation May 2022 Monthly Meeting Summary

2022-06-06 Thread max haughton via Digitalmars-d-announce

On Monday, 6 June 2022 at 08:44:32 UTC, Mike Parker wrote:
The monthly meeting for May 2022, took place on May 6th at 
14:00 UTC. The meeting lasted a little under an hour. The 
following people attended:


[...]


Note that Razvan's PR fixes the issue with synchronized by 
turning the check off rather than fixing the assumption inside 
the compiler. It still breaks LDC atomics for example.


D Language Foundation May 2022 Monthly Meeting Summary

2022-06-06 Thread Mike Parker via Digitalmars-d-announce
The monthly meeting for May 2022, took place on May 6th at 14:00 
UTC. The meeting lasted a little under an hour. The following 
people attended:


* Walter Bright
* Iain Buclaw
* Ali Çehreli
* Max Haughton
* Martin Kinkelin
* Mathias Lang
* Razvan Nitu
* Mike Parker

## Iain
Iain gave us an update on the release of GDC 12.1. He talked 
about some of the work he put into getting it ready. Now that he 
is also involved in releasing DMD, he was extremely busy prepping 
for both. In the future, he's going to streamline his process so 
that it's less stressful.


## Max
In the April meeting, Atila noted that he wanted to enable 
`-preview=nosharedaccess` by default, but [was blocked because it 
didn't work with 
syncronized](https://issues.dlang.org/show_bug.cgi?id=22626). Max 
reported that he had looked into it. He said he tried to have the 
compiler cast away `shared` in `synchronized` blocks, but this 
was defeated by the frontend optimizer stripping the cast away.


Razvan [has subsequently submitted a 
PR](https://github.com/dlang/dmd/pull/14143) to fix the issue.


Max also wanted to make sure Walter was aware of a SIMD issue in 
DMD. [Walter had already submitted a PR for 
it](https://github.com/dlang/dmd/pull/14081) the day before the 
meeting. This prompted a discussion about what the problem was, 
Iain's attempt to find it, and a tangential discussion about 
FreeBSD tests.


## Mathias
Mathias let us know he was about to officially start his new job 
with Symmetry. He also talked a bit about this [Argument 
Dependent Attributes DIP](https://github.com/dlang/DIPs/pull/198) 
in the PR queue (a.k.a. Draft Review). He wants to have a fully 
working implementation that he can test out before moving forward 
to the first Community Review round. He currently has a partial 
implementation and will let me know when it's ready.


## Martin
Martin noted that cooperation on D 2.100.0 was great, and 
acknowledged that Iain had the most stressful time of it. He said 
the release was in good shape, as it had been tested with 
Symmetry's codebase and all was well. The beta of LDC 1.30 was 
released a little over a week after the meeting.


He reported he had been trying out the PGO build feature on DMD. 
He found a huge effect on binary size. He was planning also to do 
some performance comparisons.


## Me
I noted that I plan to enter the foundation's YouTube channel 
into the YouTube Partner Program so we can use it to raise money. 
Before that, I want to increase the variety of content we put out 
and the frequency at which we publish. I told everyone that to 
that end I'd like to start putting out interviews, and they 
agreed to participate.


I have since recorded and published an interview with [Razvan and 
Dennis in our 'D Community Q & A' 
playlist](https://youtu.be/nvo7wzjVDQc). I'll publish more in 
that format, and also in a longer form 'D Community Discussions' 
format, with Walter, Atila, Iain, Martin, and others in the 
coming months.


## Walter
Walter said his next issue was the C preprocessor in ImportC. He 
had some PRs that hadn't been merged and it was slowing him down. 
Iain said that he had not merged those yet because he thought it 
would be better for them to go into the next release. Razvan 
noted that he was monitoring Walter's PRs, but most of the time 
would like a second or even third opinion on Walter's code (and 
he did merge one of the preprocessor PRs while this discussion 
was in progress).


In the ensuing discussion (which took up a significant chunk of 
the meeting), Walter said he has no special attachment to the 
code he's writing for preprocessor support. Iain, Martin, and Max 
want something more sophisticated (e.g., something that detects 
preprocessor support rather than calling out to specific 
preprocessors), and he's all for it. But right now, he wants 
something that just works so he can make forward progress. If 
something better comes along, he's happy for it to replace his 
implementation.


This segued into a discussion about importing header files. 
Martin brought up the current approach of importing C symbols 
into local modules that are generated per compiler invocation. 
This can be a problem with a large codebase like Symmetry's that 
has a large number of foreign language dependencies, and the same 
headers can be imported multiple times all over the place: the 
result would be huge object files, each having its own definition 
of the same structs, their `TypeInfo`s, their `.init` symbols, 
and so on.


Iain agreed, noting that if you, for example, import `tgmath.h` 
and `math.h`, which `#include` each other, then calling e.g., 
`sin` will result in a conflict. He suggested the way to handle 
this is that ImportC symbols, rather than going into a module 
space, should go into a global ImportC module. Each imported C 
file or header file is then appended to that module. This would 
also prevent the potential problem of non-identifier characters 
(illegal in D 

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread claptrap via Digitalmars-d-announce

On Monday, 6 June 2022 at 03:17:34 UTC, forkit wrote:

On Monday, 6 June 2022 at 00:19:16 UTC, zjh wrote:

On Sunday, 5 June 2022 at 22:41:41 UTC, Walter Bright wrote:


But yes, as far as i know, D is the first to do this - i.e. 
turn the class into a pseudo type, that cannot have 
encapsulation unless it is put into a super type (the module), 
all by its self (with no friends).



Delphi / Object Pascal had the same visibility as D, private only 
meant private to the module.


Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread zjh via Digitalmars-d-announce

On Monday, 6 June 2022 at 05:01:27 UTC, forkit wrote:

The addidtion of a little character, @, to word private, could 
change this:


@private // Compiler says: oh. so you really want private to 
mean private? ok. I'll do it for you. no problem.




You need a `DIP`.


Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread forkit via Digitalmars-d-announce

On Monday, 6 June 2022 at 05:48:14 UTC, Ali Çehreli wrote:


Now, that is trolling.

Ali


juvenalian satire, perhaps. I'd accept that.

But trolling? Really?


Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread forkit via Digitalmars-d-announce

On Monday, 6 June 2022 at 05:48:14 UTC, Ali Çehreli wrote:


Now, that is trolling.

Ali


Well, I could argue, correctly, that trolling is when someone 
picks only part of your argument, and uses only that part to 
support their own agenda - which is to destroy your argument by 
making it out to be something it is not.