Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"It's not just a computer -- it's your ass." -- Cal Keegan


devel / comp.lang.c / Re: Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

SubjectAuthor
* Synchrozining and versioning "linked files"/"dependencies" language neutral/indeskybuck2000
+- Re: Synchrozining and versioning "linked files"/"dependencies"Joy Steav
`* Re: Synchrozining and versioning "linked files"/"dependencies"Malcolm McLean
 `- Re: Synchrozining and versioning "linked files"/"dependencies"skybuck2000

1
Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

<835601c7-51de-42cf-82f9-d698245bb4dan@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19256&group=comp.lang.c#19256

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:4ef:: with SMTP id b15mr18209652qkh.662.1637977341524;
Fri, 26 Nov 2021 17:42:21 -0800 (PST)
X-Received: by 2002:ac8:7d46:: with SMTP id h6mr29061726qtb.379.1637977341415;
Fri, 26 Nov 2021 17:42:21 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Fri, 26 Nov 2021 17:42:21 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=84.25.28.171; posting-account=np6u_wkAAADxbE7UBGUIOm-csir6aX02
NNTP-Posting-Host: 84.25.28.171
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <835601c7-51de-42cf-82f9-d698245bb4dan@googlegroups.com>
Subject: Synchrozining and versioning "linked files"/"dependencies" language neutral/independent
From: skybuck2...@hotmail.com (skybuck2000)
Injection-Date: Sat, 27 Nov 2021 01:42:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 128
 by: skybuck2000 - Sat, 27 Nov 2021 01:42 UTC

Idea how to make GIT link aware written on 27 november 2021 by Skybuck Flying/Harald Houppermans and posted on "Git for human beings" newsgroup:

Programming languages like C, Delphi, Python, Java, C#, C++ and others often have include and import and use clausules and such in their program files..

For example:
include "filea.h";
uses fileb;
import graphics;

These pieces of synthax describe how the files are linked together and how they dependent on each other.

Each compiler writer/language designer could write a small little tool/parser that GIT.exe could use to discover links/dependencies between files.

Even graphics and other file types could make use of this feature/idea.

This allows GIT to become aware of what could be considered a "dependency" map.

Such a dependency map, or "view of dependency" would allow certain desired features.

One very important one is including version numbers/information in files, which is currently completely lacking.

Problem example:
file.a includes/uses/imports/depends on file.b

There are now three scenerios:

scenerio 1: file.a is changed/updated
scenerio 2: file.b is changed/updated
scenerio 3: both are changed/updated

question/problem:
which version of file.a used which version of file.b ?

There are two ways to tackle this problem:

1. Either development environments are made aware of git and different
versions.

2. Or the version information gets exported from git and stored into the files
themselfes, either in the file system as a special field, or appended to the filename.

Examples of solution 2 are:

file.a.version.001
file.b.version.001
file.a.version.002
file.b.version.002

Now for a more complex example to illustrate better the requirements:

file.a uses file.b, file.c, file.d, file.e.

if any of the file.b to file.e is updated/versioned then so should file.a, even though file.a did not change the final behaviour of file.a may have changed through different behaviours in file.b to file.e which are used by file.a, therefore it is highly desireable that file.a also gets versioned/up a version+1 in case any of it's dependencies is also versioned/changed/up a version+1

Furthermore by constructing a "dependency map" it can be seen that A also depends on other files, therefore it may be desireable to update all of their versions as well, and sync them, especially if they are in the same folder, this can be a strong indicator that these files belong together and should have the same version number to describe them as a form of a package, library, module and such though more implicit perhaps.

This could be set as a rule, "versioning/sync-up" files in the same folder.

When a commit is done, all files on the dependency map get a new incremented synchronized version number, at least the files in the same folder.

Different options could be used to also allow individual versioning.

The second tool that would be necessary from compiler writers is a "change include/uses/import" tool or functionality.

Where the compiler/parser parses the files on the dependency map, then scans the files for the dependency links and replaces the existing links with the new filenames with their new version numbers.

Such that builds don't break and all files uses all other files properly such that they use the correct updated/incremented versioning number.

Such a tool could be called "Link.exe" or "LinkUp" or "LinkDependency.exe"

This would allow GIT two things:

1. Query files for links to other files.
2. Update links inside files to other files.

Basically this would allow GIT to do proper versioning numbering by for example appending version numbers to file names. To keep version numbers in sync across
related files in folders, to replace version numbers inside include/users/import statements.

This feature would be/could be more fine-grained then submodules, I have not yet used submodules, and could be weird to use submodules per file in some folder.

Plus for development environments it becomes more clear which version is actually used/opened.

Mixing of versions also becomes possible to some degree.

For example
file.a.002 could use file.b.001 and file.b.002

to transition between functionality or compare, or provide backwards compatibility and so forth.

also mixed-versions of file allows code to be upgraded more gradually instead of all or nothing.

For example some files could still use apiv1 while updated files could use apiv2 or libraryv2.

Bye for now,
Skybuck.

Re: Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

<sns5n2$8g0$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19257&group=comp.lang.c#19257

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!wfCiSHnELlsUCCjf2V9EWA.user.46.165.242.91.POSTED!not-for-mail
From: joystea...@gmail.com (Joy Steav)
Newsgroups: comp.lang.c
Subject: Re: Synchrozining and versioning "linked files"/"dependencies"
language neutral/independent
Date: Sat, 27 Nov 2021 02:30:00 +0000
Organization: Aioe.org NNTP Server
Message-ID: <sns5n2$8g0$1@gioia.aioe.org>
References: <835601c7-51de-42cf-82f9-d698245bb4dan@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: base64
Injection-Info: gioia.aioe.org; logging-data="8704"; posting-host="wfCiSHnELlsUCCjf2V9EWA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Joy Steav - Sat, 27 Nov 2021 02:30 UTC

On 27/11/2021 01:42, skybuck2000 wrote:
> < a big snip of useless stuff >
If you are so smart then work out the output of this program without
running it:
#include <stdio.h>
void f(int *p, int m)
{
    m = m + 5;
    *p = *p + m;
    return;
}
int main()
{
    int i = 5;
    int j = 10;
    f(&i, j);
    printf("%4d", i + j);
    return 0;
}
//  output = 30

Re: Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

<56efae44-8f94-4b2c-b763-0feea2a4cb35n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19258&group=comp.lang.c#19258

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1705:: with SMTP id h5mr42853121qtk.331.1638187916070;
Mon, 29 Nov 2021 04:11:56 -0800 (PST)
X-Received: by 2002:ad4:5945:: with SMTP id eo5mr29975492qvb.130.1638187915943;
Mon, 29 Nov 2021 04:11:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 29 Nov 2021 04:11:55 -0800 (PST)
In-Reply-To: <835601c7-51de-42cf-82f9-d698245bb4dan@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:2da1:e91f:e252:a001;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:2da1:e91f:e252:a001
References: <835601c7-51de-42cf-82f9-d698245bb4dan@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <56efae44-8f94-4b2c-b763-0feea2a4cb35n@googlegroups.com>
Subject: Re: Synchrozining and versioning "linked files"/"dependencies"
language neutral/independent
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 29 Nov 2021 12:11:56 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 25
 by: Malcolm McLean - Mon, 29 Nov 2021 12:11 UTC

On Saturday, 27 November 2021 at 01:42:27 UTC, skybuck2000 wrote:
> Idea how to make GIT link aware written on 27 november 2021 by Skybuck Flying/Harald Houppermans and posted on "Git for human beings" newsgroup:
>
> Programming languages like C, Delphi, Python, Java, C#, C++ and others often have include and import and use clausules and such in their program files.
>
> For example:
> include "filea.h";
> uses fileb;
> import graphics;
>
Very often you have this situation.

You have a file containing utilities. Say it's graphics, and there is a function called "ClearRect".
Another file includes the header, and calls ClearRect.

Development proceeds, and you add FillCircle to the graphics utiliites files, and to the header.

That now forces a recompile of all the files that include the utility header. However there should
be no change in behaviour. There's just a small possibility that the symbol FillCircle has been
used somewhere else.

Now obviously the utilities file needs to be marked as "updated". But should you mark all the files
which include the header as updated too?

Re: Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

<6ab74bbc-4420-470c-8be0-328b6256c175n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19267&group=comp.lang.c#19267

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:5aa4:: with SMTP id u4mr11514010qvg.7.1638431087202;
Wed, 01 Dec 2021 23:44:47 -0800 (PST)
X-Received: by 2002:a05:6214:c6f:: with SMTP id t15mr11438927qvj.6.1638431087109;
Wed, 01 Dec 2021 23:44:47 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 1 Dec 2021 23:44:46 -0800 (PST)
In-Reply-To: <56efae44-8f94-4b2c-b763-0feea2a4cb35n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.25.28.171; posting-account=np6u_wkAAADxbE7UBGUIOm-csir6aX02
NNTP-Posting-Host: 84.25.28.171
References: <835601c7-51de-42cf-82f9-d698245bb4dan@googlegroups.com> <56efae44-8f94-4b2c-b763-0feea2a4cb35n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6ab74bbc-4420-470c-8be0-328b6256c175n@googlegroups.com>
Subject: Re: Synchrozining and versioning "linked files"/"dependencies"
language neutral/independent
From: skybuck2...@hotmail.com (skybuck2000)
Injection-Date: Thu, 02 Dec 2021 07:44:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: skybuck2000 - Thu, 2 Dec 2021 07:44 UTC

On Monday, November 29, 2021 at 1:12:02 PM UTC+1, Malcolm McLean wrote:
> On Saturday, 27 November 2021 at 01:42:27 UTC, skybuck2000 wrote:
> > Idea how to make GIT link aware written on 27 november 2021 by Skybuck Flying/Harald Houppermans and posted on "Git for human beings" newsgroup:
> >
> > Programming languages like C, Delphi, Python, Java, C#, C++ and others often have include and import and use clausules and such in their program files.
> >
> > For example:
> > include "filea.h";
> > uses fileb;
> > import graphics;
> >
> Very often you have this situation.
>
> You have a file containing utilities. Say it's graphics, and there is a function called "ClearRect".
> Another file includes the header, and calls ClearRect.
>
> Development proceeds, and you add FillCircle to the graphics utiliites files, and to the header.
>
> That now forces a recompile of all the files that include the utility header. However there should
> be no change in behaviour. There's just a small possibility that the symbol FillCircle has been
> used somewhere else.
>
> Now obviously the utilities file needs to be marked as "updated". But should you mark all the files
> which include the header as updated too?

If they belong together than yes.

For example:

graphics.h
graphics_rect.h
graphics_circle.h

They should become:

graphics_v001.h
graphics_rect_v001.h
graphics_circle_v001.h

Perhaps initially even^ could still be done later if no versioning present yet.

Then if graphics_v001.h also includes graphics_circle_v001.h then both should be updated.

However perhaps an even better plan instead of using link.exe would be to create special files called "link.map" or "dependency.map" where programmers can specify which files logically belong together, so that external tools can understand the relationship better between files.

So when one of these files is updated it changed as follows:

graphics_v002.h
graphics_rect_v002.h
graphics_circle_v002.h

So a change to any of them, is a change to all, because they belong together. Now while progamming this might become annoying, it depends on what the other files do that include them, a setting could be present that allows these files to go temporarely out of sync with each other to later sync them up again:

So while making many changes to say graphics_circle_v003,v004,v005 etc the rest stays at v001.

Then perhaps later the software can be told to re-sync these files and tell software that v005 was changed in one revision multiple times by editing programs. and needs to be squashed back down to v002... it could try and detect lowest other versions... or if any files actually use v004 and v003 if not can go back down to v002, alternatively safest thing to do is v005 especially if they are checked out multiple times or stored into different version folders. So many different possibilities how to go about it, this is why maybe depedency map file is better perhaps with some * asterix support to indicate the files in current folder belong together but just follow a certain filename pattern.

Also it would be very usefull if other software that is part of a project automatically updates it's links to these files.

So development environments should also understand which other files use these 3 files, and if these 3 files are updated in the project and versioned upwards, then all the links in the project to these files should be auto updated.

It could even be made such that the project itself/software/folder version or project version also gets auto-updated versioned upwards because this project is now using new graphics files and thus the main program/project also has changed.

Bye for now,
Skybuck.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor