Jump to page: 1 2
Thread overview
June 21

We've had a meeting to discuss splitting up druntime a bit, although we got slightly off track during it.

As part of it, it was suggested by Steven that instead of sharding druntime, we should shard phobos, so here is my proposal.

I proposed this many many months ago, right back at the start of PhobosV3 work that we "shard" Phobos, of course back then I didn't call it as such.

The reason we did not adopt this earlier is because of some insistence from Walter for PhobosV3 must be import only, which I unsurprisingly have been against this entire time; although he has now accepted that this will not necessarily be possible.

The idea is simple:

  • You have a root package, this has been decided to be phobos.
  • A sub package below that phobos.XYZ would be a "shard".
  • A shard may be mapped to a binary, or it could be import only.
  • Each shard would be considered independent of the others, however it may declare a dependency on another.
  • No module can exist outside of a shard.

As a proposal it is simple to map a module to its binary.

It scales as PhobosV3 grows, with each independent shard allowed to do its own thing that it requires with clear dependencies.

We do not need to worry about things like event loops design work right now, but it does allow us to go: its a dependency of sockets therefore we can't do it right now.
This too was a concern of Walter's that Adam Wilson was taking on too much.

June 22

On Friday, 21 June 2024 at 16:39:43 UTC, Richard (Rikki) Andrew Cattermole wrote:

>

I proposed this many many months ago, right back at the start of PhobosV3 work that we "shard" Phobos, of course back then I didn't call it as such.

Those shards might also be published on dub. This could in principle allow patches and improvements to shards without waiting for D release.

Each shard could have it's own versioning, and releases, so people needing a change won't need to wait much.

There might also be a meta package that imports other shards, and is locked with D release versions. This meta package would sort of work like bom projects in maven, i.e. it's dependencies would specify versions of shards that are guaranteed to work with specific D version.

Ofc, a reference phobos version should be shipped with D installation. The build system for D installers could then just pull a version of phobos meta package and include it as part of D installers.

Note: it would be nice if in dub you could specify the language version the library was written in. This defined on shards would also allow easier phobos meta package build.

June 22

On Friday, 21 June 2024 at 16:39:43 UTC, Richard (Rikki) Andrew Cattermole wrote:

>

We've had a meeting to discuss splitting up druntime a bit, although we got slightly off track during it.

As part of it, it was suggested by Steven that instead of sharding druntime, we should shard phobos, so here is my proposal.

I proposed this many many months ago, right back at the start of PhobosV3 work that we "shard" Phobos, of course back then I didn't call it as such.

The reason we did not adopt this earlier is because of some insistence from Walter for PhobosV3 must be import only, which I unsurprisingly have been against this entire time; although he has now accepted that this will not necessarily be possible.

The idea is simple:

  • You have a root package, this has been decided to be phobos.
  • A sub package below that phobos.XYZ would be a "shard".
  • A shard may be mapped to a binary, or it could be import only.
  • Each shard would be considered independent of the others, however it may declare a dependency on another.
  • No module can exist outside of a shard.

As a proposal it is simple to map a module to its binary.

It scales as PhobosV3 grows, with each independent shard allowed to do its own thing that it requires with clear dependencies.

We do not need to worry about things like event loops design work right now, but it does allow us to go: its a dependency of sockets therefore we can't do it right now.
This too was a concern of Walter's that Adam Wilson was taking on too much.

Independent ... but with dependency?
The impression is that everything in D-lanD is moving towards an over-eng complexity ...

June 22

On Saturday, 22 June 2024 at 08:37:40 UTC, Paolo Invernizzi wrote:

>

Independent ... but with dependency?
The impression is that everything in D-lanD is moving towards an over-eng complexity ...

Perhaps it is implied optional dependencies?

June 22
On 22/06/2024 8:37 PM, Paolo Invernizzi wrote:
> Independent ... but with dependency?
> The impression is that everything in D-lanD is moving towards an over-eng complexity ...

No no.

Its literally just the event loop shard depends upon base shard.

Explicit dependencies, no accidental importing something that you shouldn't be able to without clear stated intention.

This is a key goal of PhobosV3 work, was to break the interdependencies of modules.
June 23
On Saturday, 22 June 2024 at 10:28:10 UTC, Richard (Rikki) Andrew Cattermole wrote:
> On 22/06/2024 8:37 PM, Paolo Invernizzi wrote:
>> Independent ... but with dependency?
>> The impression is that everything in D-lanD is moving towards an over-eng complexity ...
>
> No no.
>
> Its literally just the event loop shard depends upon base shard.
>
> Explicit dependencies, no accidental importing something that you shouldn't be able to without clear stated intention.
>
> This is a key goal of PhobosV3 work, was to break the interdependencies of modules.

I still think it's over-eng.

Indirect dependencies of module are direct dependencies of the imported module, that means that the opinion is that the imported module is using another module without a valid good reason. So, the only thing to do is "just" (well, "just" ...) improve the quality of imported module itself, cleaning it. Why is it necessary to have another abstraction, shard, in a already complicated language like D?

Another thing is the policy to "forbid the usage of a module" in a project. For example, we forbid to import directly "std.stdio", but the task is handled by our custom builder, that just enforce that.
June 24
On 24/06/2024 3:59 AM, Paolo Invernizzi wrote:
> On Saturday, 22 June 2024 at 10:28:10 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> On 22/06/2024 8:37 PM, Paolo Invernizzi wrote:
>>> Independent ... but with dependency?
>>> The impression is that everything in D-lanD is moving towards an over-eng complexity ...
>>
>> No no.
>>
>> Its literally just the event loop shard depends upon base shard.
>>
>> Explicit dependencies, no accidental importing something that you shouldn't be able to without clear stated intention.
>>
>> This is a key goal of PhobosV3 work, was to break the interdependencies of modules.
> 
> I still think it's over-eng.
> 
> Indirect dependencies of module are direct dependencies of the imported module, that means that the opinion is that the imported module is using another module without a valid good reason. So, the only thing to do is "just" (well, "just" ...) improve the quality of imported module itself, cleaning it. Why is it necessary to have another abstraction, shard, in a already complicated language like D?

What new language concept?

Its purely build system, what files get passed to the compiler and made available via ``-I``.

Everything is in place except the build system (and enabling of PAYG for linking).

It is no different than a dub sub package and explicitly setting the dependencies there.
June 23
On Sunday, 23 June 2024 at 16:09:00 UTC, Richard (Rikki) Andrew Cattermole wrote:
>
> On 24/06/2024 3:59 AM, Paolo Invernizzi wrote:
>> On Saturday, 22 June 2024 at 10:28:10 UTC, Richard (Rikki) Andrew Cattermole wrote:
>>> On 22/06/2024 8:37 PM, Paolo Invernizzi wrote:
>>>> Independent ... but with dependency?
>>>> The impression is that everything in D-lanD is moving towards an over-eng complexity ...
>>>
>>> No no.
>>>
>>> Its literally just the event loop shard depends upon base shard.
>>>
>>> Explicit dependencies, no accidental importing something that you shouldn't be able to without clear stated intention.
>>>
>>> This is a key goal of PhobosV3 work, was to break the interdependencies of modules.
>> 
>> I still think it's over-eng.
>> 
>> Indirect dependencies of module are direct dependencies of the imported module, that means that the opinion is that the imported module is using another module without a valid good reason. So, the only thing to do is "just" (well, "just" ...) improve the quality of imported module itself, cleaning it. Why is it necessary to have another abstraction, shard, in a already complicated language like D?
>
> What new language concept?
>
> Its purely build system, what files get passed to the compiler and made available via ``-I``.
>
> Everything is in place except the build system (and enabling of PAYG for linking).
>
> It is no different than a dub sub package and explicitly setting the dependencies there.

Language intended as language as a whole, ecosystem included. I still don't grasp where's the improvement over the status quo of a monolithic Phobos and far west dub modules.

Phobos modules interdependencies should be reduced? It's a decade that this point is on the table, I was here when Andrei rants about Phobos quality were flying around.  Nothing new introduced into the "language as a whole" supersede the simple point that hard analysis work needs to be done on the code itself.

I still do not grasp the point.

/P
June 24
On 24/06/2024 4:24 AM, Paolo Invernizzi wrote:
> On Sunday, 23 June 2024 at 16:09:00 UTC, Richard (Rikki) Andrew Cattermole wrote:
>>
>> On 24/06/2024 3:59 AM, Paolo Invernizzi wrote:
>>> On Saturday, 22 June 2024 at 10:28:10 UTC, Richard (Rikki) Andrew Cattermole wrote:
>>>> On 22/06/2024 8:37 PM, Paolo Invernizzi wrote:
>>>>> Independent ... but with dependency?
>>>>> The impression is that everything in D-lanD is moving towards an over-eng complexity ...
>>>>
>>>> No no.
>>>>
>>>> Its literally just the event loop shard depends upon base shard.
>>>>
>>>> Explicit dependencies, no accidental importing something that you shouldn't be able to without clear stated intention.
>>>>
>>>> This is a key goal of PhobosV3 work, was to break the interdependencies of modules.
>>>
>>> I still think it's over-eng.
>>>
>>> Indirect dependencies of module are direct dependencies of the imported module, that means that the opinion is that the imported module is using another module without a valid good reason. So, the only thing to do is "just" (well, "just" ...) improve the quality of imported module itself, cleaning it. Why is it necessary to have another abstraction, shard, in a already complicated language like D?
>>
>> What new language concept?
>>
>> Its purely build system, what files get passed to the compiler and made available via ``-I``.
>>
>> Everything is in place except the build system (and enabling of PAYG for linking).
>>
>> It is no different than a dub sub package and explicitly setting the dependencies there.
> 
> Language intended as language as a whole, ecosystem included. I still don't grasp where's the improvement over the status quo of a monolithic Phobos and far west dub modules.
> 
> Phobos modules interdependencies should be reduced? It's a decade that this point is on the table, I was here when Andrei rants about Phobos quality were flying around.  Nothing new introduced into the "language as a whole" supersede the simple point that hard analysis work needs to be done on the code itself.
> 
> I still do not grasp the point.
> 
> /P

If you want to grow the standard library you have no choice but to split into different binaries.

That 64k symbol limit is quite the limiter here.

Having stuff like eventloops or even just curl which are heavily tied to platform specifics does prevent porting even the subset that doesn't depend on anything on the platform. In practice nobody ports phobos but they do copy stuff out of it.

At some point a split will occur, a well defined split is better than "we can't release dmd anymore as it won't link".
June 23
On Sunday, 23 June 2024 at 16:24:23 UTC, Paolo Invernizzi wrote:
> 
> Phobos modules interdependencies should be reduced? It's a decade that this point is on the table, I was here when Andrei rants about Phobos quality were flying around.  Nothing new introduced into the "language as a whole" supersede the simple point that hard analysis work needs to be done on the code itself.

is it hard? I'd try just "tempateify" everything

I think you could write a script that trasformed `alias foo=`=> `alias foo()=` and `[type] foo(*){`=> `[type] foo()(*){`
« First   ‹ Prev
1 2