Jump to page: 1 28  
Page
Thread overview
ImportC can now automatically run the preprocessor
May 14, 2022
Walter Bright
May 14, 2022
Salih Dincer
May 15, 2022
forkit
May 15, 2022
max haughton
May 15, 2022
Walter Bright
May 15, 2022
Nick Treleaven
May 15, 2022
Adam D Ruppe
May 15, 2022
Andrea Fontana
May 15, 2022
Ali Çehreli
May 15, 2022
Walter Bright
May 15, 2022
Andrea Fontana
May 16, 2022
Walter Bright
May 16, 2022
Adam D Ruppe
May 15, 2022
Walter Bright
May 15, 2022
Adam Ruppe
May 15, 2022
Andrea Fontana
May 15, 2022
max haughton
May 16, 2022
Walter Bright
May 16, 2022
Walter Bright
May 16, 2022
Adam D Ruppe
May 16, 2022
forkit
May 16, 2022
max haughton
May 16, 2022
forkit
May 16, 2022
rikki cattermole
May 16, 2022
max haughton
May 16, 2022
Walter Bright
May 16, 2022
max haughton
May 16, 2022
max haughton
May 16, 2022
forkit
May 16, 2022
Walter Bright
May 16, 2022
rikki cattermole
May 16, 2022
Walter Bright
May 16, 2022
max haughton
May 16, 2022
rikki cattermole
May 16, 2022
max haughton
May 16, 2022
Walter Bright
May 16, 2022
Adam D Ruppe
May 16, 2022
jmh530
May 16, 2022
Adam D Ruppe
May 18, 2022
Adrian Matoga
May 16, 2022
Adam D Ruppe
May 16, 2022
Dave P.
May 16, 2022
Adam D Ruppe
May 15, 2022
Walter Bright
May 15, 2022
Ali Çehreli
May 15, 2022
Mike Parker
May 15, 2022
Ali Çehreli
May 15, 2022
forkit
May 16, 2022
Ali Çehreli
May 16, 2022
Walter Bright
May 15, 2022
Walter Bright
May 15, 2022
Vladimir Panteleev
May 15, 2022
Walter Bright
May 15, 2022
Guillaume Piolat
May 16, 2022
deadalnix
May 16, 2022
bauss
May 16, 2022
zjh
May 16, 2022
zjh
May 16, 2022
zjh
May 16, 2022
bauss
May 16, 2022
zjh
May 18, 2022
Adrian Matoga
May 19, 2022
zjh
May 17, 2022
Walter Bright
May 17, 2022
Tejas
May 17, 2022
Paulo Pinto
May 16, 2022
jmh530
May 16, 2022
Mike Parker
May 16, 2022
jmh530
May 16, 2022
Mike Parker
May 14, 2022
As https://github.com/dlang/dmd/pull/14121 has been merged, the following #ImportC program can now be compiled and run:

  #include <stdio.h>

  void main()
  {
    printf("hello ImportC!\n");
  }

It's been a longer and windy-er road than I'd anticipated, but isn't that the way all software projects work?

Next up:

1. passing dmd command line arguments to the preprocessor

2. capturing the #define macro dump from the preprocessor, so it can be mined for macros that can be translated to D symbols (anticipating leveraging Atila's great dpp work on this)
May 14, 2022
On Saturday, 14 May 2022 at 21:05:09 UTC, Walter Bright wrote:
> [...]
> 2. capturing the #define macro dump from the preprocessor, so it can be mined for macros that can be translated to D symbols (anticipating leveraging Atila's great dpp work on this)

Item 2 is very interesting! About 10 years ago, when I was just learning, I was thinking how can I make a feature like #define in D.

SDB@79
May 15, 2022
On Saturday, 14 May 2022 at 21:05:09 UTC, Walter Bright wrote:
> ...
>
> It's been a longer and windy-er road than I'd anticipated, but isn't that the way all software projects work?
> ...

Well...I'm not aware of any software projects where someone wakes up one morning, with a thought bubble, and then decides to submit a PR, marked as 'Trivial', that adds a C compiler insider an already existing compiler for a different language.

https://github.com/dlang/dmd/pull/12507/

The long, windy road 'could' have been anticipated.

I certainly anticipated it when I read that PR.

It'll be a long, windy road ahead to, for anyone having to maintain projects that explicitly, actively, encourage you to combine different languages.

May 15, 2022
On Sunday, 15 May 2022 at 01:00:14 UTC, forkit wrote:
> On Saturday, 14 May 2022 at 21:05:09 UTC, Walter Bright wrote:
>> ...
>>
>> It's been a longer and windy-er road than I'd anticipated, but isn't that the way all software projects work?
>> ...
>
> Well...I'm not aware of any software projects where someone wakes up one morning, with a thought bubble, and then decides to submit a PR, marked as 'Trivial', that adds a C compiler insider an already existing compiler for a different language.
>
> https://github.com/dlang/dmd/pull/12507/
>
> The long, windy road 'could' have been anticipated.
>
> I certainly anticipated it when I read that PR.
>
> It'll be a long, windy road ahead to, for anyone having to maintain projects that explicitly, actively, encourage you to combine different languages.

That depends on the nature of the combination.

I will likely never compile a C dependency with ImportC directly, and I will definitely never import a D module into a C project, but I have already used ImportC for some things and it really isn't that complicated either in implementation or praxis.

ImportC should've really happened 10 years ago.

May 15, 2022

On Sunday, 15 May 2022 at 01:00:14 UTC, forkit wrote:

>

The long, windy road 'could' have been anticipated.

I certainly anticipated it when I read that PR.

It'll be a long, windy road ahead to, for anyone having to maintain projects that explicitly, actively, encourage you to combine different languages.

Yes, there is no process, but by now it has become clear that D evolves by people starting to use incomplete features and quite a few are «given up on» and left incomplete like with most hobby projects. This is what happens when you start implementation before you have a design ready. This cannot be helped at this point as the culture is dominated by this experimental development mode.

To change this you have to shake up the whole process and the power stucture. And frankly it turns out that it is easier to just create a new language than to change this mindset. If you take the view that D is an ongoing experimental plaform you’ll feel better.

And that is perfectly fine, but it can be frustrating when people pretend it isn’t.

May 15, 2022

On Sunday, 15 May 2022 at 07:39:21 UTC, Ola Fosheim Grøstad wrote:

>

Yes, there is no process, but by now it has become clear that D evolves by people starting to use incomplete features and quite a few are «given up on» and left incomplete like with most hobby projects. This is what happens when you start implementation before you have a design ready.

Integrated C support with D has never been done before, and Walter never claimed supporting all preprocessor macros would work. ImportC was very useful even not long after it was first merged. I'm surprised at some of the negativity from people here.

Features are not given up on unless they're deprecated. The problem is manpower and getting through the dip process. The waterfall software development method is well known. I think your narrative is unfair and breeds negativity about D. The problems can often be solved, and when they can't it's because it's a problem with no known good solution or a trade off. But none of that is relevant to ImportC, which has obvious merit yet requires more work but clearly will pay its way.

May 15, 2022
On Sunday, 15 May 2022 at 13:09:45 UTC, Nick Treleaven wrote:
> Walter never claimed supporting all preprocessor macros would work.

One of the interesting potentials of importC is that all of them *could* work:

http://dpldocs.info/experimental-docs/mixinc.html

> ImportC was very useful even not long after it was first merged.

What did you use it for?
May 15, 2022
On Saturday, 14 May 2022 at 21:05:09 UTC, Walter Bright wrote:
> As https://github.com/dlang/dmd/pull/14121 has been merged, the following #ImportC program can now be compiled and run:
>
>   #include <stdio.h>
>
>   void main()
>   {
>     printf("hello ImportC!\n");
>   }
>
> It's been a longer and windy-er road than I'd anticipated, but isn't that the way all software projects work?

Amazing. Thanks and congratulations to everyone who worked on this feature.

I'm looking forward to the future when we can stop worrying and deprecate the entirety of https://github.com/D-Programming-Deimos.

May 15, 2022

On Sunday, 15 May 2022 at 13:09:45 UTC, Nick Treleaven wrote:

>

Integrated C support with D has never been done before, and Walter never claimed supporting all preprocessor macros would work.

There is no process behind this, so what exactly are the requirements from "non-hardcore" users?

All I can say that 90% is probably worse than nothing from the perspective of someone externally evaluating the language.

>

But none of that is relevant to ImportC, which has obvious merit yet requires more work but clearly will pay its way.

Yes, it has obvious merits, but if people start using it before it is a complete solution, then it will never reach a state of completion. It will become another «not quite there, but sufficient for the fan-base».

To put this is perspective: I actually find the differences between C++ and C rather problematic. And those are minimal.

May 15, 2022
On Saturday, 14 May 2022 at 21:05:09 UTC, Walter Bright wrote:
> As https://github.com/dlang/dmd/pull/14121 has been merged, the following #ImportC program can now be compiled and run:
>
>   #include <stdio.h>
>
>   void main()
>   {
>     printf("hello ImportC!\n");
>   }
>
> It's been a longer and windy-er road than I'd anticipated, but isn't that the way all software projects work?

Go ImportC! Great news, and great feature.

« First   ‹ Prev
1 2 3 4 5 6 7 8