From rodney_bates at lcwb.coop Wed Feb 5 00:43:58 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Tue, 04 Feb 2014 17:43:58 -0600 Subject: [M3devel] A bug in M3C Message-ID: <52F17B3E.3030203@lcwb.coop> Jay, The attached M3 program compiles using cm3cg on AMD64_LINUX. Using M3C, it generates C code that the C compiler chokes on: rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep --- building in ../AMD64_LINUX --- new source -> compiling Test.m3 ../src/Test.m3: In function ?Test__P?: ../src/Test.m3:12: error: aggregate value used where an integer was expected compile_c => 1 C compiler failed compiling: Test.m3.c compilation failed => not building program "test" Fatal Error: package build failed A much larger program from which this case is reduced suffers the same problem compiling the equivalent code using M3C, but compiles and executes as expected using cm3cg. Removing or simplifying the IF statement makes it go away. -------------- next part -------------- M3_BACKEND_MODE = "C" %M3_FRONT_FLAGS = ["-unfold_nested_procs"] import("libm3") implementation("Test") program ("test") -------------- next part -------------- MODULE Test EXPORTS Main ; TYPE T = ARRAY [ 0 .. BYTESIZE ( WIDECHAR ) - 1 ] OF CHAR ; CONST C = T { '\x05' , .. } ; PROCEDURE P ( READONLY Arr : T ; Msg : TEXT ) = VAR LMsg : TEXT ; BEGIN IF Arr # C THEN LMsg := Msg & "XYZ" END (* IF *) END P ; BEGIN P ( C , "ABC" ) END Test . From rodney_bates at lcwb.coop Thu Feb 6 17:00:35 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 06 Feb 2014 10:00:35 -0600 Subject: [M3devel] I need more cvs help Message-ID: <52F3B1A3.1070205@lcwb.coop> I am trying to move some small subdirectories. In my local copy, I created the new directories, did cvs add on them, copied the source files to the new directories, did cvs add and cvs commit on them, in the new directories. On this machine, it looks like it worked, and CVS/Entries shows the new version numbers the commit showed. But doing cvs update -d on a different machine gets nothing. Moreover, the commit messages coming through on m3commit show the files as committed in the directory where the old copies were. CVS/Entries there also shows the new version numbers. And cvs update in the old directory not only gets the new versions, that were committed from the new directory, but it gets some other files that came from a different subdirectory too. Surely, cvs can't be treating files in different directories with the same simple name as the same file. We have tens, maybe hundreds of files named "m3makefile" all over, and these don't get mixed up in this way. Any help would be greatly appreciated. From wagner at elegosoft.com Thu Feb 6 17:32:31 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Thu, 6 Feb 2014 17:32:31 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F3B1A3.1070205@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> Message-ID: <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> On Thu, 06 Feb 2014 10:00:35 -0600 "Rodney M. Bates" wrote: > I am trying to move some small subdirectories. In my local copy, I created the new > directories, did cvs add on them, copied the source files to the new directories, > did cvs add and cvs commit on them, in the new directories. On this machine, it > looks like it worked, and CVS/Entries shows the new version numbers the commit showed. > But doing cvs update -d on a different machine gets nothing. > > Moreover, the commit messages coming through on m3commit show the files as > committed in the directory where the old copies were. CVS/Entries there also > shows the new version numbers. And cvs update in the old directory not only gets > the new versions, that were committed from the new directory, but it gets some > other files that came from a different subdirectory too. > > Surely, cvs can't be treating files in different directories with the same simple > name as the same file. We have tens, maybe hundreds of files named "m3makefile" > all over, and these don't get mixed up in this way. > > Any help would be greatly appreciated. It sounds like you did it right, yet I am sure that you somewhere made a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? Have you got a log of the commands you executed, or can you retry the move/add/commit/remove and record the session? Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From jay.krell at cornell.edu Fri Feb 7 11:31:37 2014 From: jay.krell at cornell.edu (Jay K) Date: Fri, 7 Feb 2014 10:31:37 +0000 Subject: [M3devel] A bug in M3C In-Reply-To: <52F17B3E.3030203@lcwb.coop> References: <52F17B3E.3030203@lcwb.coop> Message-ID: Sorry, I am here, but really busy... > Date: Tue, 4 Feb 2014 17:43:58 -0600 > From: rodney_bates at lcwb.coop > To: m3devel at elegosoft.com > Subject: [M3devel] A bug in M3C > > Jay, > > The attached M3 program compiles using cm3cg on AMD64_LINUX. > Using M3C, it generates C code that the C compiler chokes on: > > rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep > --- building in ../AMD64_LINUX --- > > new source -> compiling Test.m3 > ../src/Test.m3: In function ?Test__P?: > ../src/Test.m3:12: error: aggregate value used where an integer was expected > compile_c => 1 > C compiler failed compiling: Test.m3.c > compilation failed => not building program "test" > Fatal Error: package build failed > > A much larger program from which this case is reduced suffers the same problem > compiling the equivalent code using M3C, but compiles and executes as expected > using cm3cg. > > Removing or simplifying the IF statement makes it go away. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodney_bates at lcwb.coop Fri Feb 7 16:53:30 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 07 Feb 2014 09:53:30 -0600 Subject: [M3devel] A bug in M3C In-Reply-To: References: <52F17B3E.3030203@lcwb.coop> Message-ID: <52F5017A.1000001@lcwb.coop> "No hurry", said the carpenter. On 02/07/2014 04:31 AM, Jay K wrote: > Sorry, I am here, but really busy... > > > > > > Date: Tue, 4 Feb 2014 17:43:58 -0600 > > From: rodney_bates at lcwb.coop > > To: m3devel at elegosoft.com > > Subject: [M3devel] A bug in M3C > > > > Jay, > > > > The attached M3 program compiles using cm3cg on AMD64_LINUX. > > Using M3C, it generates C code that the C compiler chokes on: > > > > rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep > > --- building in ../AMD64_LINUX --- > > > > new source -> compiling Test.m3 > > ../src/Test.m3: In function ?Test__P?: > > ../src/Test.m3:12: error: aggregate value used where an integer was expected > > compile_c => 1 > > C compiler failed compiling: Test.m3.c > > compilation failed => not building program "test" > > Fatal Error: package build failed > > > > A much larger program from which this case is reduced suffers the same problem > > compiling the equivalent code using M3C, but compiles and executes as expected > > using cm3cg. > > > > Removing or simplifying the IF statement makes it go away. From rodney_bates at lcwb.coop Sun Feb 9 03:22:14 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Sat, 08 Feb 2014 20:22:14 -0600 Subject: [M3devel] I need more cvs help In-Reply-To: <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> Message-ID: <52F6E656.8000804@lcwb.coop> On 02/06/2014 10:32 AM, Olaf Wagner wrote: > On Thu, 06 Feb 2014 10:00:35 -0600 > "Rodney M. Bates" wrote: > >> I am trying to move some small subdirectories. In my local copy, I created the new >> directories, did cvs add on them, copied the source files to the new directories, >> did cvs add and cvs commit on them, in the new directories. On this machine, it >> looks like it worked, and CVS/Entries shows the new version numbers the commit showed. >> But doing cvs update -d on a different machine gets nothing. >> >> Moreover, the commit messages coming through on m3commit show the files as >> committed in the directory where the old copies were. CVS/Entries there also >> shows the new version numbers. And cvs update in the old directory not only gets >> the new versions, that were committed from the new directory, but it gets some >> other files that came from a different subdirectory too. >> >> Surely, cvs can't be treating files in different directories with the same simple >> name as the same file. We have tens, maybe hundreds of files named "m3makefile" >> all over, and these don't get mixed up in this way. >> >> Any help would be greatly appreciated. > > It sounds like you did it right, yet I am sure that you somewhere made > a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? That's possible, > > Have you got a log of the commands you executed, or can you retry > the move/add/commit/remove and record the session? but I don't have enough info to reconstruct the sequence, especially after a hard disk just went sick. I tried saving everything I care about off to the side, removing all of both subdirectories from cvs, and re-adding from scratch. I even changed the name of the top new subdirectory, which wasn't consistent anyway. This appears to have worked, finally. The directories to be removed were dens of werewolves. cvs, it seems, won't remove anything that is in an inconsistent state, and even when it did, it seemed to take many repetitions to get it done both in the repository and my local copy. > > Olaf > From wagner at elegosoft.com Sun Feb 9 12:46:03 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Sun, 9 Feb 2014 12:46:03 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F6E656.8000804@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> Message-ID: <20140209124603.73172fda853526c4f524654f@elegosoft.com> On Sat, 08 Feb 2014 20:22:14 -0600 "Rodney M. Bates" wrote: > On 02/06/2014 10:32 AM, Olaf Wagner wrote: > > On Thu, 06 Feb 2014 10:00:35 -0600 > > "Rodney M. Bates" wrote: [...] > >> Any help would be greatly appreciated. > > > > It sounds like you did it right, yet I am sure that you somewhere made > > a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? > > That's possible, > > > > Have you got a log of the commands you executed, or can you retry > > the move/add/commit/remove and record the session? > > but I don't have enough info to reconstruct the sequence, especially after > a hard disk just went sick. > > I tried saving everything I care about off to the side, removing all of > both subdirectories from cvs, and re-adding from scratch. I even changed > the name of the top new subdirectory, which wasn't consistent anyway. > This appears to have worked, finally. > > The directories to be removed were dens of werewolves. cvs, it seems, > won't remove anything that is in an inconsistent state, and even when > it did, it seemed to take many repetitions to get it done both in the > repository and my local copy. So I gather that you've resolved the problem and cleaned up the source tree. CVS is known to have problems with refacturing code, as it does not treat directories as versioned objects. Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From rodney_bates at lcwb.coop Sun Feb 9 16:26:23 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Sun, 09 Feb 2014 09:26:23 -0600 Subject: [M3devel] I need more cvs help In-Reply-To: <20140209124603.73172fda853526c4f524654f@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> Message-ID: <52F79E1F.4070401@lcwb.coop> On 02/09/2014 05:46 AM, Olaf Wagner wrote: > On Sat, 08 Feb 2014 20:22:14 -0600 > "Rodney M. Bates" wrote: > >> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>> On Thu, 06 Feb 2014 10:00:35 -0600 >>> "Rodney M. Bates" wrote: > [...] >>>> Any help would be greatly appreciated. >>> >>> It sounds like you did it right, yet I am sure that you somewhere made >>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >> >> That's possible, >>> >>> Have you got a log of the commands you executed, or can you retry >>> the move/add/commit/remove and record the session? >> >> but I don't have enough info to reconstruct the sequence, especially after >> a hard disk just went sick. >> >> I tried saving everything I care about off to the side, removing all of >> both subdirectories from cvs, and re-adding from scratch. I even changed >> the name of the top new subdirectory, which wasn't consistent anyway. >> This appears to have worked, finally. >> >> The directories to be removed were dens of werewolves. cvs, it seems, >> won't remove anything that is in an inconsistent state, and even when >> it did, it seemed to take many repetitions to get it done both in the >> repository and my local copy. > > So I gather that you've resolved the problem and cleaned up the > source tree. CVS is known to have problems with refacturing code, > as it does not treat directories as versioned objects. Yes, as far as I can tell, it is resolved. > > Olaf > From estellnb at elstel.org Sun Feb 9 17:25:38 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Sun, 09 Feb 2014 16:25:38 +0000 Subject: [M3devel] I need more cvs help In-Reply-To: <52F79E1F.4070401@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> Message-ID: <52F7AC02.5050504@elstel.org> Haven`t we been thinking about switching to git? When would you expect the cm3/pm3 repos to be available via git? Am 09.02.2014 15:26, schrieb Rodney M. Bates: > > > On 02/09/2014 05:46 AM, Olaf Wagner wrote: >> On Sat, 08 Feb 2014 20:22:14 -0600 >> "Rodney M. Bates" wrote: >> >>> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>>> On Thu, 06 Feb 2014 10:00:35 -0600 >>>> "Rodney M. Bates" wrote: >> [...] >>>>> Any help would be greatly appreciated. >>>> >>>> It sounds like you did it right, yet I am sure that you somewhere made >>>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >>> >>> That's possible, >>>> >>>> Have you got a log of the commands you executed, or can you retry >>>> the move/add/commit/remove and record the session? >>> >>> but I don't have enough info to reconstruct the sequence, especially >>> after >>> a hard disk just went sick. >>> >>> I tried saving everything I care about off to the side, removing all of >>> both subdirectories from cvs, and re-adding from scratch. I even >>> changed >>> the name of the top new subdirectory, which wasn't consistent anyway. >>> This appears to have worked, finally. >>> >>> The directories to be removed were dens of werewolves. cvs, it seems, >>> won't remove anything that is in an inconsistent state, and even when >>> it did, it seemed to take many repetitions to get it done both in the >>> repository and my local copy. >> >> So I gather that you've resolved the problem and cleaned up the >> source tree. CVS is known to have problems with refacturing code, >> as it does not treat directories as versioned objects. > > Yes, as far as I can tell, it is resolved. > >> >> Olaf >> > From dragisha at m3w.org Sun Feb 9 19:33:09 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Sun, 9 Feb 2014 19:33:09 +0100 Subject: [M3devel] I need more cvs help ... git migration, final? In-Reply-To: <52F7AC02.5050504@elstel.org> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> Message-ID: I did two big tests on cvs -> git and now I have all ready? I suppose all we need to make it work is a bit of synchronization now. I propose we do it Feb 15 - Feb 17. I have an extended weekend so I can pour additional time in process if needed. Please let me know if anyone has some last moment questions, doubts, suggestions. TIA, dd On 09 Feb 2014, at 17:25, Elmar Stellnberger wrote: > Haven`t we been thinking about switching to git? > When would you expect the cm3/pm3 repos to be available via git? > > Am 09.02.2014 15:26, schrieb Rodney M. Bates: >> >> >> On 02/09/2014 05:46 AM, Olaf Wagner wrote: >>> On Sat, 08 Feb 2014 20:22:14 -0600 >>> "Rodney M. Bates" wrote: >>> >>>> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>>>> On Thu, 06 Feb 2014 10:00:35 -0600 >>>>> "Rodney M. Bates" wrote: >>> [...] >>>>>> Any help would be greatly appreciated. >>>>> >>>>> It sounds like you did it right, yet I am sure that you somewhere made >>>>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >>>> >>>> That's possible, >>>>> >>>>> Have you got a log of the commands you executed, or can you retry >>>>> the move/add/commit/remove and record the session? >>>> >>>> but I don't have enough info to reconstruct the sequence, especially after >>>> a hard disk just went sick. >>>> >>>> I tried saving everything I care about off to the side, removing all of >>>> both subdirectories from cvs, and re-adding from scratch. I even changed >>>> the name of the top new subdirectory, which wasn't consistent anyway. >>>> This appears to have worked, finally. >>>> >>>> The directories to be removed were dens of werewolves. cvs, it seems, >>>> won't remove anything that is in an inconsistent state, and even when >>>> it did, it seemed to take many repetitions to get it done both in the >>>> repository and my local copy. >>> >>> So I gather that you've resolved the problem and cleaned up the >>> source tree. CVS is known to have problems with refacturing code, >>> as it does not treat directories as versioned objects. >> >> Yes, as far as I can tell, it is resolved. >> >>> >>> Olaf >>> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From wagner at elegosoft.com Sun Feb 9 19:33:59 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Sun, 9 Feb 2014 19:33:59 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F7AC02.5050504@elstel.org> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> Message-ID: <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> On Sun, 09 Feb 2014 16:25:38 +0000 Elmar Stellnberger wrote: > Haven`t we been thinking about switching to git? Yes, we have several times. I'm for it, but except for Dragisha there has been little enthusiasm and feedback on the suggestions. I prepared a Wiki page 10 months ago at https://cm3-bugs.elegosoft.com/cm3/wiki/CvsToGitMigration with the things that should be done, but nobody has worked on that AFAIK. Dragisha has made some test migrations. The part of migrating the data should be easy; problems are rather in the external access for all users and adapting the existing depending infrastructure like Hudson and build scripts. > When would you expect the cm3/pm3 repos to be available via git? I really cannot answer this one, as I cannot spent any time on the project myself. If I could, I'd say it would take me two weeks to get everything working again as it was at the time of the last release but based on a git repository. There may be others who can do it in half the time of course :-) Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From dragisha at m3w.org Sun Feb 9 19:42:09 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Sun, 9 Feb 2014 19:42:09 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> Message-ID: <35203502-51A0-417A-8781-90BB6358580A@m3w.org> For external access, I need a list of developers github account names, to grant access. At least I would need major contributors added to admin group. New and occasional contributors can use fork/pull request path for fast start. I am still enthusiastic about this, and as for Hudson etc - I will also work on this. Not immediately, but in number of weeks at worst. dd On 09 Feb 2014, at 19:33, Olaf Wagner wrote: > AFAIK. Dragisha has made some test migrations. The part of migrating > the data should be easy; problems are rather in the external > access for all users and adapting the existing depending infrastructure > like Hudson and build scripts. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rodney_bates at lcwb.coop Thu Feb 13 23:45:41 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 16:45:41 -0600 Subject: [M3devel] Warning on apparent compiler bug Message-ID: <52FD4B15.1050901@lcwb.coop> I added a procedure signature to an interface and forgot to add the body to the (only) corresponding module that exported the interface. The compiler gave me no error message, no matter how hard I tried. I eventually did a -realclean, touched both the interface and module, and recompiled, to no avail. This was in a library package. From rodney_bates at lcwb.coop Thu Feb 13 23:51:41 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 16:51:41 -0600 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? Message-ID: <52FD4C7D.9030107@lcwb.coop> Rd.m3 contains, for example: PROCEDURE Closed (rd: T): BOOLEAN = BEGIN RETURN (rd.closed); END Closed; Most other procedures in Rd lock rd before doing anything. Even though it's only read access, and to a BOOLEAN, is it really true that we can rely on this to work on all targets with neither a lock nor some atomic operation? It seems to me like it should be OK, but I have thought that several times before. only to be shown wrong. Meanwhile, modern hardware keeps adding more complex caching, making these things trickier. From schlepptop at henning-thielemann.de Thu Feb 13 23:55:28 2014 From: schlepptop at henning-thielemann.de (Henning Thielemann) Date: Thu, 13 Feb 2014 23:55:28 +0100 Subject: [M3devel] Warning on apparent compiler bug In-Reply-To: <52FD4B15.1050901@lcwb.coop> References: <52FD4B15.1050901@lcwb.coop> Message-ID: <52FD4D60.80801@henning-thielemann.de> Am 13.02.2014 23:45, schrieb Rodney M. Bates: > I added a procedure signature to an interface and forgot to add the body > to the > (only) corresponding module that exported the interface. The compiler > gave me > no error message, no matter how hard I tried. I eventually did a > -realclean, > touched both the interface and module, and recompiled, to no avail. > This was > in a library package. Since several implementations can export something to the same interface, the compiler cannot warn about a missing procedure body in a specific implementation module. But I guess you get a linker error later. (Maybe too late, to understand the cause.) From rodney_bates at lcwb.coop Fri Feb 14 03:08:30 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 20:08:30 -0600 Subject: [M3devel] Warning on apparent compiler bug In-Reply-To: <52FD4D60.80801@henning-thielemann.de> References: <52FD4B15.1050901@lcwb.coop> <52FD4D60.80801@henning-thielemann.de> Message-ID: <52FD7A9E.8030102@lcwb.coop> On 02/13/2014 04:55 PM, Henning Thielemann wrote: > Am 13.02.2014 23:45, schrieb Rodney M. Bates: >> I added a procedure signature to an interface and forgot to add the body >> to the >> (only) corresponding module that exported the interface. The compiler >> gave me >> no error message, no matter how hard I tried. I eventually did a >> -realclean, >> touched both the interface and module, and recompiled, to no avail. >> This was >> in a library package. > > Since several implementations can export something to the same interface, the compiler cannot warn about a missing procedure body in a specific implementation module. > > But I guess you get a linker error later. (Maybe too late, to understand the cause.) Yes, when the package is linked, which is always done as part of a single cm3 command. And in many cases, you do get a message for this error, something like "procedure If.Mumble is not implemented." I have gotten this in the past, for this very error. But not this time. So it's an intermittent bug. > > From estellnb at elstel.org Fri Feb 14 13:32:11 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Fri, 14 Feb 2014 12:32:11 +0000 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <52FD4C7D.9030107@lcwb.coop> References: <52FD4C7D.9030107@lcwb.coop> Message-ID: <52FE0CCB.6060708@elstel.org> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be required. Am 13.02.2014 22:51, schrieb Rodney M. Bates: > Rd.m3 contains, for example: > > PROCEDURE Closed (rd: T): BOOLEAN = > BEGIN > RETURN (rd.closed); > END Closed; > > Most other procedures in Rd lock rd before doing anything. > > Even though it's only read access, and to a BOOLEAN, is it really true > that we can rely > on this to work on all targets with neither a lock nor some atomic > operation? > It seems to me like it should be OK, but I have thought that several > times before. > only to be shown wrong. Meanwhile, modern hardware keeps adding more > complex > caching, making these things trickier. > > > From estellnb at elstel.org Fri Feb 14 19:40:38 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Fri, 14 Feb 2014 19:40:38 +0100 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> References: <52FD4C7D.9030107@lcwb.coop> <52FE0CCB.6060708@elstel.org> <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> Message-ID: <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> Sorry, I did not get the point about it yet. Even if the boolean is read by multiple mem-read operations at least one of them will yield a value # 0 if the boolean was set at that specific sub-operation which should totally suffice; i.e. if there are four read operations to be done and the forth may read a value # 0 then it should be sufficient that the fourth read is atomic by itself ignoring all other reads and writes except the fourth because booleans are always either zero or one and thus only one byte will matter so that atomic access is ensured. Similarely, what difference on caching will a lock yield? The lock statement is not associated with the value it protects in any way so it can not explicitly flush the cache for the given value. Theoretically it could choose to invalidate all caches (horribly inefficient!). Well; I think we may have caught the point here. Either way I would expect some kind of machine-level reasoning about it. Shouldn`t there be a way to atomically access a word on every kind of machine architecture? Why not introduce anything like ATOMIC(x) := 3; y:= ATMOIC(x); INC(ATOMIC(x),3) which should then yield sth. like LOCK MOV EAX,[EA] LOCK MOV [EA],EAX LOCK ADD/INC [EA], const/ on Intel platforms f.i. and respective machine instructions on other platforms. Isn`t it horribly inefficient having to lock even for a boolean value? Do you think there is any way to achieve ATOMIC(designator) behavior for m3gcc? Am 14.02.2014 um 15:38 schrieb Antony Hosking: > volatile in C is next to useless on multi-processors ? it is only a compiler directive, not a hardware fence of any kind. > > Indeed, a lock statement is needed here (or some other atomic operation). > > On Feb 14, 2014, at 7:32 AM, Elmar Stellnberger wrote: > >> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be required. >> >> Am 13.02.2014 22:51, schrieb Rodney M. Bates: >>> Rd.m3 contains, for example: >>> >>> PROCEDURE Closed (rd: T): BOOLEAN = >>> BEGIN >>> RETURN (rd.closed); >>> END Closed; >>> >>> Most other procedures in Rd lock rd before doing anything. >>> >>> Even though it's only read access, and to a BOOLEAN, is it really true that we can rely >>> on this to work on all targets with neither a lock nor some atomic operation? >>> It seems to me like it should be OK, but I have thought that several times before. >>> only to be shown wrong. Meanwhile, modern hardware keeps adding more complex >>> caching, making these things trickier. >>> >>> >>> >> > From mika at async.caltech.edu Fri Feb 14 19:56:40 2014 From: mika at async.caltech.edu (mika at async.caltech.edu) Date: Fri, 14 Feb 2014 10:56:40 -0800 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> References: <52FD4C7D.9030107@lcwb.coop> <52FE0CCB.6060708@elstel.org> <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> Message-ID: <20140214185640.A9A1B1A2080@async.async.caltech.edu> Yes the unlock I think will have to flush all writes from that processor. No need to flush the entire cache, any reasonable cache system will track which lines are modified and flush only those. Intel processors have a lot of hardware for cache-coherence built in, most of it just happens automatically in the background. On Alpha I think you'd have to insert a Memory Barrier (MB) instruction where the processor releases the lock. The requirements on the compiler will be different from architecture to architecture. Ah there's a nice graphic here: http://en.wikipedia.org/wiki/Memory_ordering Mika Elmar Stellnberger writes: >Sorry, I did not get the point about it yet. >Even if the boolean is read by multiple mem-read operations at least one = >of them will yield a value # 0 if the boolean was set at that specific = >sub-operation which should totally suffice; i.e. if there are four read = >operations to be done and the forth may read a value # 0 then it should = >be sufficient that the fourth read is atomic by itself ignoring all = >other reads and writes except the fourth because booleans are always = >either zero or one and thus only one byte will matter so that atomic = >access is ensured. >Similarely, what difference on caching will a lock yield? >The lock statement is not associated with the value it protects in any = >way so it can not explicitly flush the cache for the given value. = >Theoretically it could choose to invalidate all caches (horribly = >inefficient!). Well; I think we may have caught the point here. Either = >way I would expect some kind of machine-level reasoning about it. > >Shouldn`t there be a way to atomically access a word on every kind of = >machine architecture? >Why not introduce anything like ATOMIC(x) :=3D 3; y:=3D ATMOIC(x); = >INC(ATOMIC(x),3) > which should then yield sth. like >LOCK MOV EAX,[EA] >LOCK MOV [EA],EAX >LOCK ADD/INC [EA], const/ >on Intel platforms f.i. and respective machine instructions on other = >platforms. > >Isn`t it horribly inefficient having to lock even for a boolean value? >Do you think there is any way to achieve ATOMIC(designator) behavior for = >m3gcc? > > >Am 14.02.2014 um 15:38 schrieb Antony Hosking: > >> volatile in C is next to useless on multi-processors =97 it is only a = >compiler directive, not a hardware fence of any kind. >>=20 >> Indeed, a lock statement is needed here (or some other atomic = >operation). >>=20 >> On Feb 14, 2014, at 7:32 AM, Elmar Stellnberger = > wrote: >>=20 >>> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be = >required. >>>=20 >>> Am 13.02.2014 22:51, schrieb Rodney M. Bates: >>>> Rd.m3 contains, for example: >>>>=20 >>>> PROCEDURE Closed (rd: T): BOOLEAN =3D >>>> BEGIN >>>> RETURN (rd.closed); >>>> END Closed; >>>>=20 >>>> Most other procedures in Rd lock rd before doing anything. >>>>=20 >>>> Even though it's only read access, and to a BOOLEAN, is it really = >true that we can rely >>>> on this to work on all targets with neither a lock nor some atomic = >operation? >>>> It seems to me like it should be OK, but I have thought that several = >times before. >>>> only to be shown wrong. Meanwhile, modern hardware keeps adding = >more complex >>>> caching, making these things trickier. >>>>=20 >>>>=20 >>>>=20 >>>=20 >>=20 From dragisha at m3w.org Mon Feb 17 08:51:48 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Mon, 17 Feb 2014 08:51:48 +0100 Subject: [M3devel] Git, a call for participation Message-ID: <06409246-E868-4009-A4B6-335A19E862E2@m3w.org> Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Mon Feb 17 16:24:07 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Mon, 17 Feb 2014 15:24:07 +0000 Subject: [M3devel] Git, a call for participation Message-ID: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Tue Feb 18 00:05:25 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Tue, 18 Feb 2014 00:05:25 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> References: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> Message-ID: <0DA0B270-D697-43A9-8DCF-E7BA56EDA6A2@m3w.org> Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: > Dragi?a: > > I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. > > 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? > If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? > > 2. What are the security concerns with installing the GitHub software? > > My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. > > I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. > > Thanks, > Randy Coleburn > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 2:52 AM > To: m3devel > Subject: EXT:[M3devel] Git, a call for participation > > Hi, > > To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. > > TIA, > -- > Dragi?a Duri? > dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Tue Feb 18 01:30:08 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Tue, 18 Feb 2014 00:30:08 +0000 Subject: [M3devel] Git, a call for participation Message-ID: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? I seem to recall providing you with my email earlier for the authors file. I can install TortoiseGit at some point and run a test when you are ready. BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? --Randy From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 6:05 PM To: Coleburn, Randy Cc: m3devel Subject: EXT:Re: [M3devel] Git, a call for participation Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy > wrote: Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Wed Feb 19 08:09:43 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Wed, 19 Feb 2014 08:09:43 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> Message-ID: Email was for conversion process and it is all set-up. Github account, and request to me (dragisha) on github for cm3 repository is separate step. You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. Sandbox? Meaning virtual machine or? dd On 18 Feb 2014, at 01:30, Coleburn, Randy wrote: > I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? > I seem to recall providing you with my email earlier for the authors file. > I can install TortoiseGit at some point and run a test when you are ready. > BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? > --Randy > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 6:05 PM > To: Coleburn, Randy > Cc: m3devel > Subject: EXT:Re: [M3devel] Git, a call for participation > > Randy, > > You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. > > dd > > On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: > > > Dragi?a: > > I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. > > 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? > If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? > > > 2. What are the security concerns with installing the GitHub software? > > My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. > > I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. > > Thanks, > Randy Coleburn > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 2:52 AM > To: m3devel > Subject: EXT:[M3devel] Git, a call for participation > > Hi, > > To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. > > TIA, > -- > Dragi?a Duri? > dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Wed Feb 19 18:05:19 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Wed, 19 Feb 2014 17:05:19 +0000 Subject: [M3devel] Git, a call for participation In-Reply-To: References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL>, Message-ID: Sorry, I should rephrase the question: Do I need to create a separate folder tree for my local copy of the cm3 source code tree for use with Git, or can I reuse the existing folder tree that I use with CVS? --Randy Coleburn On Feb 19, 2014, at 2:10 AM, "Dragi?a Duri?" > wrote: Email was for conversion process and it is all set-up. Github account, and request to me (dragisha) on github for cm3 repository is separate step. You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. Sandbox? Meaning virtual machine or? dd On 18 Feb 2014, at 01:30, Coleburn, Randy > wrote: I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? I seem to recall providing you with my email earlier for the authors file. I can install TortoiseGit at some point and run a test when you are ready. BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? --Randy From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 6:05 PM To: Coleburn, Randy Cc: m3devel Subject: EXT:Re: [M3devel] Git, a call for participation Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy > wrote: Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Wed Feb 19 23:34:18 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Wed, 19 Feb 2014 23:34:18 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL>, Message-ID: <688E1E2E-D298-4FD3-84DD-2F2F60E4D0A6@m3w.org> You will need separate working directory. With git, you will have whole cm3 repository cloned in toplevel .git folder. With svn you have .svn folders around, and CVS folders with cvs. On 19 Feb 2014, at 18:05, Coleburn, Randy wrote: > Sorry, I should rephrase the question: Do I need to create a separate folder tree for my local copy of the cm3 source code tree for use with Git, or can I reuse the existing folder tree that I use with CVS? > > --Randy Coleburn > > On Feb 19, 2014, at 2:10 AM, "Dragi?a Duri?" wrote: > >> Email was for conversion process and it is all set-up. >> >> Github account, and request to me (dragisha) on github for cm3 repository is separate step. >> >> You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. >> >> Sandbox? Meaning virtual machine or? >> >> dd >> >> On 18 Feb 2014, at 01:30, Coleburn, Randy wrote: >> >>> I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? >>> I seem to recall providing you with my email earlier for the authors file. >>> I can install TortoiseGit at some point and run a test when you are ready. >>> BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? >>> --Randy >>> >>> From: Dragi?a Duri? [mailto:dragisha at m3w.org] >>> Sent: Monday, February 17, 2014 6:05 PM >>> To: Coleburn, Randy >>> Cc: m3devel >>> Subject: EXT:Re: [M3devel] Git, a call for participation >>> >>> Randy, >>> >>> You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. >>> >>> dd >>> >>> On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: >>> >>> >>> Dragi?a: >>> >>> I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. >>> >>> 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? >>> If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? >>> >>> >>> 2. What are the security concerns with installing the GitHub software? >>> >>> My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. >>> >>> I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. >>> >>> Thanks, >>> Randy Coleburn >>> >>> From: Dragi?a Duri? [mailto:dragisha at m3w.org] >>> Sent: Monday, February 17, 2014 2:52 AM >>> To: m3devel >>> Subject: EXT:[M3devel] Git, a call for participation >>> >>> Hi, >>> >>> To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. >>> >>> TIA, >>> -- >>> Dragi?a Duri? >>> dragisha at m3w.org >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rodney_bates at lcwb.coop Thu Feb 27 00:37:42 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 17:37:42 -0600 Subject: [M3devel] Optional full-range Unicode support now merged into the CVS head. Message-ID: <530E7AC6.40004@lcwb.coop> Optional, low-level support for full-range Unicode characters is now merged into the CVS head. By default, WIDECHAR remains 16-bit, as it has been. Enabling the full range requires a manual configuration change and a rebuild of the "front" group of packages. cm3/scripts/README-build-unicode describes the process. cm3/README-unicode describes the changes. The abbreviated summary below can be found in c3/README-unicode-summary. ------------------------------------------------------------------------ CM3 now has low-level support of full-range Unicode characters in the type WIDECHAR. The philosophy is: 1. Use the streams (Rd, Wr) for encoding and decoding variable-length encodings (e.g., UTF-8) of characters. Rd and Wr have been designed from the beginning for primarily sequential access, which variable-length encodings get along with. 2. Expand WIDECHAR to hold any character in the entire Unicode range, in a fixed-size type. This property carries into Arrays of WIDECHAR and TEXTs. These have been designed from the beginning to support random access by character, not fragments thereof, and this property is preserved. Of course, if you really want to, you can still put individual fragments of characters into either, and handle them that way. By default, the compiler is configured to keep WIDECHAR at 16 bits, as before. If you keep it this way and do not do anything to utilize the full Unicode range, everything should work as before. If not, it's a bug. If you configure for Unicode-sized WIDECHAR, but change no code, most things will still work the same. WIDECHAR values in memory will occupy 32 bits. As a result, record/object field layouts obviously can change, and the legality of packed layouts can also change. Low-level code that makes assumptions about memory sizes and layouts can break. Most significantly, the procedures in Wr and Rd that transfer WIDECHAR values (e.g., Rd.GetWideChar) will transfer 32 bits to/from the stream, as well as in memory. If you want to utilize Unicode-sized WIDECHAR, there are some new things waiting for you. The interfaces UniWr and UniRd, in package libunicode, are as similar as reasonable to Wr and Rd, but they perform encoding and decoding. They act as filters on a Wr.T or Rd.T. There are 9 different encodings possible, including the 5 defined in the Unicode standard, the two that older Modula-3 systems use, and two transitional UCS encodings. Character and Text literals have new escapes for the entire code point range. The subtype and assignability rules are relaxed as if CHAR and WIDECHAR were the same base type. Pickles and network objects have a reasonable degree of compatibility between programs compiled with different WIDECHAR sizes. Most library code adapts to different WIDECHAR sizes when compiled. Some functions adapt at runtime, including m3gdb. Only the compiler needs to be configured. These changes provide no support for higher level Unicode functions. The only awareness of specific code points are of the null character, surrogate code points (relevant to the encodings), the end-of-line sequences defined in the Unicode standard, and the Unicode "replacement character", inserted in place of characters that are invalid in one way or another. From jcchu at acm.org Wed Feb 26 18:08:54 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 01:08:54 +0800 Subject: [M3devel] REFANY-keyed tables? Message-ID: Hi, I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? Thanks. ? JC Chu From rodney_bates at lcwb.coop Thu Feb 27 04:28:28 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 21:28:28 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: Message-ID: <530EB0DC.6040809@lcwb.coop> On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > Hmm, can you point out where these are? I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. So the table can only work on a narrower set of allocated object types than REFANY. If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. Rodney Bates > Thanks. > > ? JC Chu > From rodney_bates at lcwb.coop Thu Feb 27 04:35:36 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 21:35:36 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: Message-ID: <530EB288.4080905@lcwb.coop> Tony, I see that Refany.Equal does not raise an exception, but rather just checks pointer equality. Is it true, as this would require, that parallel GC prevents a mutator from executing this during the period when some but not all of the pointers to a being-moved heap object have been updated? On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > > Thanks. > > ? JC Chu > From jcchu at acm.org Thu Feb 27 05:01:03 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 12:01:03 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530EB0DC.6040809@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> Message-ID: > Hmm, can you point out where these are? See for example . > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. Just out of curiosity, is there any way to lock the GC temporarily? ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Thursday, February 27, 2014 11:28 To: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > Hmm, can you point out where these are? I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. So the table can only work on a narrower set of allocated object types than REFANY. If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. Rodney Bates > Thanks. > > ? JC Chu > From jcchu at acm.org Thu Feb 27 02:37:09 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 09:37:09 +0800 Subject: [M3devel] REFANY-keyed tables? Message-ID: Refany.Hash() simply raises a Refany.Error, which is marked as fatal. And the comment for it in Refany.i3 does state that it ?causes a checked runtime error?. (Same for Refany.Compare() (rather than Refany.Equal(), as I previously said).) ? JC Chu ________________________________ From: Antony Hosking Sent: ?2/?27/?2014 9:08 To: JC Chu Cc: ^M3DEVEL Subject: Re: [M3devel] REFANY-keyed tables? Sounds like some sort of build error. What is the exception? On Feb 26, 2014, at 12:08 PM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > > Thanks. > > ? JC Chu -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodney_bates at lcwb.coop Thu Feb 27 16:39:56 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 27 Feb 2014 09:39:56 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB0DC.6040809@lcwb.coop> Message-ID: <530F5C4C.7000101@lcwb.coop> I did some grepping for uses of RefIntTbl and found a couple of interesting variations. See, e.g., m3-ui/juno-2/juno-machine/src/JunoRT.m3 and JunoValue.[im]3. First, I was thinking of using a narrower reference type than REFANY, with its own Hash function, to instantiate Tbl. But you can use RefIntTbl and provide a different Hash function another way. Tbl just uses Key.Hash to initialize Default.keyHash. You can use the instantiation with REFANY, then create a subtype of RefIntTbl.Default that overrides Default.keyHash with another hash function. This is probably a bit quicker to code. It can create the false impresssion that the table is keyed by REFANY in its full generality, using Refany.Hash. Second, in this example, the table there can contain a mixture of three different reference types as keys, but they have no common ancestor narrower than REFANY and no common fields. The Hash function in JunoValue just does a TYPECASE on the key and uses different fields of the different objects to compute its hash value. It still won't work on all of REFANY, just the subtypes it explicitly codes for. On 02/26/2014 10:01 PM, JC Chu wrote: >> Hmm, can you point out where these are? > > See for example . Unfortunately, this documentation page gives no clue that the REFANY-keyed tables will have to have an override for their Hash function, unlike the other types. Somewhere, there is an explanation of this, but I don't remember where. BTW, this documentation says the instantiating interfaces (e.g. Refany.i3) can be found in either m3core and libm3. I see they are only in m3core. Could two interfaces with the same name in a link closure have ever linked successfully? Further BTW, does it seem odd that while these type interfaces are in m3core, libm3 has pure renaming interfaces RealType and LongrealType but no others? Just to save some particular favored client code from having to be edited? > >> I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > >> The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. > > Just out of curiosity, is there any way to lock the GC temporarily? > > ? JC Chu > > -----Original Message----- > From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] > Sent: Thursday, February 27, 2014 11:28 > To: m3devel at elegosoft.com > Subject: Re: [M3devel] REFANY-keyed tables? > > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From rodney_bates at lcwb.coop Thu Feb 27 18:54:13 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 27 Feb 2014 11:54:13 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB0DC.6040809@lcwb.coop> Message-ID: <530F7BC5.4030409@lcwb.coop> On 02/26/2014 10:01 PM, JC Chu wrote: >> Hmm, can you point out where these are? > > See for example . > >> I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > >> The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. > > Just out of curiosity, is there any way to lock the GC temporarily? Look in cm3/m3-libs/m3core/src/runtime/common/RTCollector.i3. There are various procedures you can call at runtime to [dis|en]able different collection strategies or stop collection altogether, with performance consequences, obviously. For example, DisableMotion will prevent moving any heap objects. If you did this, you really could use a REFANY directly as a hash code in a Ref*Tbl. You would still have to provide a different Hash function that actually did this, instead of just excepting. (Can "except" be verbed? Some say any word can be verbed.) > > ? JC Chu > > -----Original Message----- > From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] > Sent: Thursday, February 27, 2014 11:28 > To: m3devel at elegosoft.com > Subject: Re: [M3devel] REFANY-keyed tables? > > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From hendrik at topoi.pooq.com Thu Feb 27 20:56:12 2014 From: hendrik at topoi.pooq.com (Hendrik Boom) Date: Thu, 27 Feb 2014 14:56:12 -0500 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530F7BC5.4030409@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> Message-ID: <20140227195611.GA29137@topoi.pooq.com> On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: > (Can "except" be verbed? Some say any word can be verbed.) Peter Naur said it, "In English, any noun can be verbed." But "except" is already a verb. -- hendrik From hendrik at topoi.pooq.com Thu Feb 27 21:09:40 2014 From: hendrik at topoi.pooq.com (Hendrik Boom) Date: Thu, 27 Feb 2014 15:09:40 -0500 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <20140227195611.GA29137@topoi.pooq.com> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> <20140227195611.GA29137@topoi.pooq.com> Message-ID: <20140227200940.GC29137@topoi.pooq.com> On Thu, Feb 27, 2014 at 02:56:12PM -0500, Hendrik Boom wrote: > On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: > > > (Can "except" be verbed? Some say any word can be verbed.) > > Peter Naur said it, "In English, any noun can be verbed." > > But "except" is already a verb. But I suspect it may have a different meaning: verbformal 1. specify as not included in a category or group; exclude. "he excepted from his criticism a handful of distinguished writers" synonyms: exclude, omit, leave out, count out, disregard; exempt "lawyers are all crooks, present company excepted" -- hendrik From rodney_bates at lcwb.coop Fri Feb 28 16:04:49 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:04:49 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <20140227200940.GC29137@topoi.pooq.com> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> <20140227195611.GA29137@topoi.pooq.com> <20140227200940.GC29137@topoi.pooq.com> Message-ID: <5310A591.5070909@lcwb.coop> Yeah, I thought about the different meaning. I suppose I could have verbed "exception", giving "instead of just exceptioning", but that would have been more than even I can stomach. On 02/27/2014 02:09 PM, Hendrik Boom wrote: > On Thu, Feb 27, 2014 at 02:56:12PM -0500, Hendrik Boom wrote: >> On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: >> >>> (Can "except" be verbed? Some say any word can be verbed.) >> >> Peter Naur said it, "In English, any noun can be verbed." >> >> But "except" is already a verb. > > But I suspect it may have a different meaning: > > verbformal > 1. > specify as not included in a category or group; exclude. > "he excepted from his criticism a handful of distinguished writers" > synonyms: exclude, omit, leave out, count out, disregard; exempt > "lawyers are all crooks, present company excepted" > > -- hendrik > From rodney_bates at lcwb.coop Fri Feb 28 16:10:52 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:10:52 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB288.4080905@lcwb.coop> Message-ID: <5310A6FC.6020202@lcwb.coop> On 02/27/2014 02:07 PM, Antony Hosking wrote: > [Your prior e-mail is a great description of why REFANY does not have a hash, and hence why Refany.T raises an exception for Refany.Hash. Short answer is there is nothing about a REFANY that can conceivably be used as a hash. We could choose to implement an invariant hash code for REFANY, much as Java does for Object, but it would impose a space cost to store the hash.] > > In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. == in Java is much the same. A copying collector implementation can use a number of techniques to ensure this, but in our case pointer equality is sufficient because the mostly-copying collector does not move heap objects that are referenced from the stacks. Thus, while the REFANY = operation is being performed neither target will move and pointer equality suffices. > OK, that makes sense. But then what about this code: IF P^.link = Q^.link ... getting executed after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? (And assuming no stack pointers equal to P^.link exist, or it wouldn't happen.) > On Feb 26, 2014, at 10:35 PM, Rodney M. Bates wrote: > >> Tony, I see that Refany.Equal does not raise an exception, but rather just checks >> pointer equality. Is it true, as this would require, that parallel GC prevents >> a mutator from executing this during the period when some but not all of the >> pointers to a being-moved heap object have been updated? >> >> On 02/26/2014 11:08 AM, JC Chu wrote: >>> Hi, >>> >>> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >>> >>> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >>> >>> Thanks. >>> >>> ? JC Chu >>> >> > > From rodney_bates at lcwb.coop Fri Feb 28 16:15:55 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:15:55 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530EB0DC.6040809@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> Message-ID: <5310A82B.1040702@lcwb.coop> On 02/26/2014 09:28 PM, Rodney M. Bates wrote: > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move > a heap object and adjust all the pointers to it, if it knows where they all are, > which holds for some objects. So the bit contents of a REFANY can change. This > means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far > more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every > object an object sequence number field, explicitly initialized when an object > is allocated, and using that for the Hash function. But this won't work for > REFANY, because it can have no fields. > There is more to this. The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. But in many cases, you might want to hash on the contents, not the address of the object, in which case, the technique used in juno-2, using actual data fields instead of an object sequence number is the right way. For example, to turn the objects into atoms. > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can > still do that with a hierarchy of OBJECT types, but they will have to have a common > supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) > variables, but it is carefully arranged that they all have an allocated type > that has fields a Hash function can work on. Hash would then have to do a > NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From jcchu at acm.org Fri Feb 28 18:40:55 2014 From: jcchu at acm.org (JC Chu) Date: Sat, 1 Mar 2014 01:40:55 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <5310A6FC.6020202@lcwb.coop> References: <530EB288.4080905@lcwb.coop> <5310A6FC.6020202@lcwb.coop> Message-ID: >> In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. > ... after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? ... ... So do we actually have that for r1, r2: REFANY, r1 = r2 # NIL implies r1^ = r2^? I was hoping that at least REFANY-valued lists would still be safe to use.... ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Friday, February 28, 2014 23:11 To: Antony Hosking Cc: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/27/2014 02:07 PM, Antony Hosking wrote: > [Your prior e-mail is a great description of why REFANY does not have > a hash, and hence why Refany.T raises an exception for Refany.Hash. > Short answer is there is nothing about a REFANY that can conceivably > be used as a hash. We could choose to implement an invariant hash > code for REFANY, much as Java does for Object, but it would impose a > space cost to store the hash.] > > In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. == in Java is much the same. A copying collector implementation can use a number of techniques to ensure this, but in our case pointer equality is sufficient because the mostly-copying collector does not move heap objects that are referenced from the stacks. Thus, while the REFANY = operation is being performed neither target will move and pointer equality suffices. > OK, that makes sense. But then what about this code: IF P^.link = Q^.link ... getting executed after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? (And assuming no stack pointers equal to P^.link exist, or it wouldn't happen.) > On Feb 26, 2014, at 10:35 PM, Rodney M. Bates wrote: > >> Tony, I see that Refany.Equal does not raise an exception, but rather >> just checks pointer equality. Is it true, as this would require, >> that parallel GC prevents a mutator from executing this during the >> period when some but not all of the pointers to a being-moved heap object have been updated? >> >> On 02/26/2014 11:08 AM, JC Chu wrote: >>> Hi, >>> >>> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >>> >>> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >>> >>> Thanks. >>> >>> ? JC Chu >>> >> > > From jcchu at acm.org Fri Feb 28 18:40:58 2014 From: jcchu at acm.org (JC Chu) Date: Sat, 1 Mar 2014 01:40:58 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <5310A82B.1040702@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> <5310A82B.1040702@lcwb.coop> Message-ID: > ... The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. Yes, I was indeed in need of an immutable version of REFANY. ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Friday, February 28, 2014 23:16 To: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/26/2014 09:28 PM, Rodney M. Bates wrote: > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which > means it can move a heap object and adjust all the pointers to it, if > it knows where they all are, which holds for some objects. So the bit > contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to > prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving > every object an object sequence number field, explicitly initialized > when an object is allocated, and using that for the Hash function. > But this won't work for REFANY, because it can have no fields. > There is more to this. The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. But in many cases, you might want to hash on the contents, not the address of the object, in which case, the technique used in juno-2, using actual data fields instead of an object sequence number is the right way. For example, to turn the objects into atoms. > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different > types, you can still do that with a hierarchy of OBJECT types, but > they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed > (statically) variables, but it is carefully arranged that they all > have an allocated type that has fields a Hash function can work on. > Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From rodney_bates at lcwb.coop Wed Feb 5 00:43:58 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Tue, 04 Feb 2014 17:43:58 -0600 Subject: [M3devel] A bug in M3C Message-ID: <52F17B3E.3030203@lcwb.coop> Jay, The attached M3 program compiles using cm3cg on AMD64_LINUX. Using M3C, it generates C code that the C compiler chokes on: rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep --- building in ../AMD64_LINUX --- new source -> compiling Test.m3 ../src/Test.m3: In function ?Test__P?: ../src/Test.m3:12: error: aggregate value used where an integer was expected compile_c => 1 C compiler failed compiling: Test.m3.c compilation failed => not building program "test" Fatal Error: package build failed A much larger program from which this case is reduced suffers the same problem compiling the equivalent code using M3C, but compiles and executes as expected using cm3cg. Removing or simplifying the IF statement makes it go away. -------------- next part -------------- M3_BACKEND_MODE = "C" %M3_FRONT_FLAGS = ["-unfold_nested_procs"] import("libm3") implementation("Test") program ("test") -------------- next part -------------- MODULE Test EXPORTS Main ; TYPE T = ARRAY [ 0 .. BYTESIZE ( WIDECHAR ) - 1 ] OF CHAR ; CONST C = T { '\x05' , .. } ; PROCEDURE P ( READONLY Arr : T ; Msg : TEXT ) = VAR LMsg : TEXT ; BEGIN IF Arr # C THEN LMsg := Msg & "XYZ" END (* IF *) END P ; BEGIN P ( C , "ABC" ) END Test . From rodney_bates at lcwb.coop Thu Feb 6 17:00:35 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 06 Feb 2014 10:00:35 -0600 Subject: [M3devel] I need more cvs help Message-ID: <52F3B1A3.1070205@lcwb.coop> I am trying to move some small subdirectories. In my local copy, I created the new directories, did cvs add on them, copied the source files to the new directories, did cvs add and cvs commit on them, in the new directories. On this machine, it looks like it worked, and CVS/Entries shows the new version numbers the commit showed. But doing cvs update -d on a different machine gets nothing. Moreover, the commit messages coming through on m3commit show the files as committed in the directory where the old copies were. CVS/Entries there also shows the new version numbers. And cvs update in the old directory not only gets the new versions, that were committed from the new directory, but it gets some other files that came from a different subdirectory too. Surely, cvs can't be treating files in different directories with the same simple name as the same file. We have tens, maybe hundreds of files named "m3makefile" all over, and these don't get mixed up in this way. Any help would be greatly appreciated. From wagner at elegosoft.com Thu Feb 6 17:32:31 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Thu, 6 Feb 2014 17:32:31 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F3B1A3.1070205@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> Message-ID: <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> On Thu, 06 Feb 2014 10:00:35 -0600 "Rodney M. Bates" wrote: > I am trying to move some small subdirectories. In my local copy, I created the new > directories, did cvs add on them, copied the source files to the new directories, > did cvs add and cvs commit on them, in the new directories. On this machine, it > looks like it worked, and CVS/Entries shows the new version numbers the commit showed. > But doing cvs update -d on a different machine gets nothing. > > Moreover, the commit messages coming through on m3commit show the files as > committed in the directory where the old copies were. CVS/Entries there also > shows the new version numbers. And cvs update in the old directory not only gets > the new versions, that were committed from the new directory, but it gets some > other files that came from a different subdirectory too. > > Surely, cvs can't be treating files in different directories with the same simple > name as the same file. We have tens, maybe hundreds of files named "m3makefile" > all over, and these don't get mixed up in this way. > > Any help would be greatly appreciated. It sounds like you did it right, yet I am sure that you somewhere made a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? Have you got a log of the commands you executed, or can you retry the move/add/commit/remove and record the session? Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From jay.krell at cornell.edu Fri Feb 7 11:31:37 2014 From: jay.krell at cornell.edu (Jay K) Date: Fri, 7 Feb 2014 10:31:37 +0000 Subject: [M3devel] A bug in M3C In-Reply-To: <52F17B3E.3030203@lcwb.coop> References: <52F17B3E.3030203@lcwb.coop> Message-ID: Sorry, I am here, but really busy... > Date: Tue, 4 Feb 2014 17:43:58 -0600 > From: rodney_bates at lcwb.coop > To: m3devel at elegosoft.com > Subject: [M3devel] A bug in M3C > > Jay, > > The attached M3 program compiles using cm3cg on AMD64_LINUX. > Using M3C, it generates C code that the C compiler chokes on: > > rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep > --- building in ../AMD64_LINUX --- > > new source -> compiling Test.m3 > ../src/Test.m3: In function ?Test__P?: > ../src/Test.m3:12: error: aggregate value used where an integer was expected > compile_c => 1 > C compiler failed compiling: Test.m3.c > compilation failed => not building program "test" > Fatal Error: package build failed > > A much larger program from which this case is reduced suffers the same problem > compiling the equivalent code using M3C, but compiles and executes as expected > using cm3cg. > > Removing or simplifying the IF statement makes it go away. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodney_bates at lcwb.coop Fri Feb 7 16:53:30 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 07 Feb 2014 09:53:30 -0600 Subject: [M3devel] A bug in M3C In-Reply-To: References: <52F17B3E.3030203@lcwb.coop> Message-ID: <52F5017A.1000001@lcwb.coop> "No hurry", said the carpenter. On 02/07/2014 04:31 AM, Jay K wrote: > Sorry, I am here, but really busy... > > > > > > Date: Tue, 4 Feb 2014 17:43:58 -0600 > > From: rodney_bates at lcwb.coop > > To: m3devel at elegosoft.com > > Subject: [M3devel] A bug in M3C > > > > Jay, > > > > The attached M3 program compiles using cm3cg on AMD64_LINUX. > > Using M3C, it generates C code that the C compiler chokes on: > > > > rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep > > --- building in ../AMD64_LINUX --- > > > > new source -> compiling Test.m3 > > ../src/Test.m3: In function ?Test__P?: > > ../src/Test.m3:12: error: aggregate value used where an integer was expected > > compile_c => 1 > > C compiler failed compiling: Test.m3.c > > compilation failed => not building program "test" > > Fatal Error: package build failed > > > > A much larger program from which this case is reduced suffers the same problem > > compiling the equivalent code using M3C, but compiles and executes as expected > > using cm3cg. > > > > Removing or simplifying the IF statement makes it go away. From rodney_bates at lcwb.coop Sun Feb 9 03:22:14 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Sat, 08 Feb 2014 20:22:14 -0600 Subject: [M3devel] I need more cvs help In-Reply-To: <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> Message-ID: <52F6E656.8000804@lcwb.coop> On 02/06/2014 10:32 AM, Olaf Wagner wrote: > On Thu, 06 Feb 2014 10:00:35 -0600 > "Rodney M. Bates" wrote: > >> I am trying to move some small subdirectories. In my local copy, I created the new >> directories, did cvs add on them, copied the source files to the new directories, >> did cvs add and cvs commit on them, in the new directories. On this machine, it >> looks like it worked, and CVS/Entries shows the new version numbers the commit showed. >> But doing cvs update -d on a different machine gets nothing. >> >> Moreover, the commit messages coming through on m3commit show the files as >> committed in the directory where the old copies were. CVS/Entries there also >> shows the new version numbers. And cvs update in the old directory not only gets >> the new versions, that were committed from the new directory, but it gets some >> other files that came from a different subdirectory too. >> >> Surely, cvs can't be treating files in different directories with the same simple >> name as the same file. We have tens, maybe hundreds of files named "m3makefile" >> all over, and these don't get mixed up in this way. >> >> Any help would be greatly appreciated. > > It sounds like you did it right, yet I am sure that you somewhere made > a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? That's possible, > > Have you got a log of the commands you executed, or can you retry > the move/add/commit/remove and record the session? but I don't have enough info to reconstruct the sequence, especially after a hard disk just went sick. I tried saving everything I care about off to the side, removing all of both subdirectories from cvs, and re-adding from scratch. I even changed the name of the top new subdirectory, which wasn't consistent anyway. This appears to have worked, finally. The directories to be removed were dens of werewolves. cvs, it seems, won't remove anything that is in an inconsistent state, and even when it did, it seemed to take many repetitions to get it done both in the repository and my local copy. > > Olaf > From wagner at elegosoft.com Sun Feb 9 12:46:03 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Sun, 9 Feb 2014 12:46:03 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F6E656.8000804@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> Message-ID: <20140209124603.73172fda853526c4f524654f@elegosoft.com> On Sat, 08 Feb 2014 20:22:14 -0600 "Rodney M. Bates" wrote: > On 02/06/2014 10:32 AM, Olaf Wagner wrote: > > On Thu, 06 Feb 2014 10:00:35 -0600 > > "Rodney M. Bates" wrote: [...] > >> Any help would be greatly appreciated. > > > > It sounds like you did it right, yet I am sure that you somewhere made > > a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? > > That's possible, > > > > Have you got a log of the commands you executed, or can you retry > > the move/add/commit/remove and record the session? > > but I don't have enough info to reconstruct the sequence, especially after > a hard disk just went sick. > > I tried saving everything I care about off to the side, removing all of > both subdirectories from cvs, and re-adding from scratch. I even changed > the name of the top new subdirectory, which wasn't consistent anyway. > This appears to have worked, finally. > > The directories to be removed were dens of werewolves. cvs, it seems, > won't remove anything that is in an inconsistent state, and even when > it did, it seemed to take many repetitions to get it done both in the > repository and my local copy. So I gather that you've resolved the problem and cleaned up the source tree. CVS is known to have problems with refacturing code, as it does not treat directories as versioned objects. Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From rodney_bates at lcwb.coop Sun Feb 9 16:26:23 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Sun, 09 Feb 2014 09:26:23 -0600 Subject: [M3devel] I need more cvs help In-Reply-To: <20140209124603.73172fda853526c4f524654f@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> Message-ID: <52F79E1F.4070401@lcwb.coop> On 02/09/2014 05:46 AM, Olaf Wagner wrote: > On Sat, 08 Feb 2014 20:22:14 -0600 > "Rodney M. Bates" wrote: > >> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>> On Thu, 06 Feb 2014 10:00:35 -0600 >>> "Rodney M. Bates" wrote: > [...] >>>> Any help would be greatly appreciated. >>> >>> It sounds like you did it right, yet I am sure that you somewhere made >>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >> >> That's possible, >>> >>> Have you got a log of the commands you executed, or can you retry >>> the move/add/commit/remove and record the session? >> >> but I don't have enough info to reconstruct the sequence, especially after >> a hard disk just went sick. >> >> I tried saving everything I care about off to the side, removing all of >> both subdirectories from cvs, and re-adding from scratch. I even changed >> the name of the top new subdirectory, which wasn't consistent anyway. >> This appears to have worked, finally. >> >> The directories to be removed were dens of werewolves. cvs, it seems, >> won't remove anything that is in an inconsistent state, and even when >> it did, it seemed to take many repetitions to get it done both in the >> repository and my local copy. > > So I gather that you've resolved the problem and cleaned up the > source tree. CVS is known to have problems with refacturing code, > as it does not treat directories as versioned objects. Yes, as far as I can tell, it is resolved. > > Olaf > From estellnb at elstel.org Sun Feb 9 17:25:38 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Sun, 09 Feb 2014 16:25:38 +0000 Subject: [M3devel] I need more cvs help In-Reply-To: <52F79E1F.4070401@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> Message-ID: <52F7AC02.5050504@elstel.org> Haven`t we been thinking about switching to git? When would you expect the cm3/pm3 repos to be available via git? Am 09.02.2014 15:26, schrieb Rodney M. Bates: > > > On 02/09/2014 05:46 AM, Olaf Wagner wrote: >> On Sat, 08 Feb 2014 20:22:14 -0600 >> "Rodney M. Bates" wrote: >> >>> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>>> On Thu, 06 Feb 2014 10:00:35 -0600 >>>> "Rodney M. Bates" wrote: >> [...] >>>>> Any help would be greatly appreciated. >>>> >>>> It sounds like you did it right, yet I am sure that you somewhere made >>>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >>> >>> That's possible, >>>> >>>> Have you got a log of the commands you executed, or can you retry >>>> the move/add/commit/remove and record the session? >>> >>> but I don't have enough info to reconstruct the sequence, especially >>> after >>> a hard disk just went sick. >>> >>> I tried saving everything I care about off to the side, removing all of >>> both subdirectories from cvs, and re-adding from scratch. I even >>> changed >>> the name of the top new subdirectory, which wasn't consistent anyway. >>> This appears to have worked, finally. >>> >>> The directories to be removed were dens of werewolves. cvs, it seems, >>> won't remove anything that is in an inconsistent state, and even when >>> it did, it seemed to take many repetitions to get it done both in the >>> repository and my local copy. >> >> So I gather that you've resolved the problem and cleaned up the >> source tree. CVS is known to have problems with refacturing code, >> as it does not treat directories as versioned objects. > > Yes, as far as I can tell, it is resolved. > >> >> Olaf >> > From dragisha at m3w.org Sun Feb 9 19:33:09 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Sun, 9 Feb 2014 19:33:09 +0100 Subject: [M3devel] I need more cvs help ... git migration, final? In-Reply-To: <52F7AC02.5050504@elstel.org> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> Message-ID: I did two big tests on cvs -> git and now I have all ready? I suppose all we need to make it work is a bit of synchronization now. I propose we do it Feb 15 - Feb 17. I have an extended weekend so I can pour additional time in process if needed. Please let me know if anyone has some last moment questions, doubts, suggestions. TIA, dd On 09 Feb 2014, at 17:25, Elmar Stellnberger wrote: > Haven`t we been thinking about switching to git? > When would you expect the cm3/pm3 repos to be available via git? > > Am 09.02.2014 15:26, schrieb Rodney M. Bates: >> >> >> On 02/09/2014 05:46 AM, Olaf Wagner wrote: >>> On Sat, 08 Feb 2014 20:22:14 -0600 >>> "Rodney M. Bates" wrote: >>> >>>> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>>>> On Thu, 06 Feb 2014 10:00:35 -0600 >>>>> "Rodney M. Bates" wrote: >>> [...] >>>>>> Any help would be greatly appreciated. >>>>> >>>>> It sounds like you did it right, yet I am sure that you somewhere made >>>>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >>>> >>>> That's possible, >>>>> >>>>> Have you got a log of the commands you executed, or can you retry >>>>> the move/add/commit/remove and record the session? >>>> >>>> but I don't have enough info to reconstruct the sequence, especially after >>>> a hard disk just went sick. >>>> >>>> I tried saving everything I care about off to the side, removing all of >>>> both subdirectories from cvs, and re-adding from scratch. I even changed >>>> the name of the top new subdirectory, which wasn't consistent anyway. >>>> This appears to have worked, finally. >>>> >>>> The directories to be removed were dens of werewolves. cvs, it seems, >>>> won't remove anything that is in an inconsistent state, and even when >>>> it did, it seemed to take many repetitions to get it done both in the >>>> repository and my local copy. >>> >>> So I gather that you've resolved the problem and cleaned up the >>> source tree. CVS is known to have problems with refacturing code, >>> as it does not treat directories as versioned objects. >> >> Yes, as far as I can tell, it is resolved. >> >>> >>> Olaf >>> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From wagner at elegosoft.com Sun Feb 9 19:33:59 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Sun, 9 Feb 2014 19:33:59 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F7AC02.5050504@elstel.org> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> Message-ID: <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> On Sun, 09 Feb 2014 16:25:38 +0000 Elmar Stellnberger wrote: > Haven`t we been thinking about switching to git? Yes, we have several times. I'm for it, but except for Dragisha there has been little enthusiasm and feedback on the suggestions. I prepared a Wiki page 10 months ago at https://cm3-bugs.elegosoft.com/cm3/wiki/CvsToGitMigration with the things that should be done, but nobody has worked on that AFAIK. Dragisha has made some test migrations. The part of migrating the data should be easy; problems are rather in the external access for all users and adapting the existing depending infrastructure like Hudson and build scripts. > When would you expect the cm3/pm3 repos to be available via git? I really cannot answer this one, as I cannot spent any time on the project myself. If I could, I'd say it would take me two weeks to get everything working again as it was at the time of the last release but based on a git repository. There may be others who can do it in half the time of course :-) Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From dragisha at m3w.org Sun Feb 9 19:42:09 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Sun, 9 Feb 2014 19:42:09 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> Message-ID: <35203502-51A0-417A-8781-90BB6358580A@m3w.org> For external access, I need a list of developers github account names, to grant access. At least I would need major contributors added to admin group. New and occasional contributors can use fork/pull request path for fast start. I am still enthusiastic about this, and as for Hudson etc - I will also work on this. Not immediately, but in number of weeks at worst. dd On 09 Feb 2014, at 19:33, Olaf Wagner wrote: > AFAIK. Dragisha has made some test migrations. The part of migrating > the data should be easy; problems are rather in the external > access for all users and adapting the existing depending infrastructure > like Hudson and build scripts. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rodney_bates at lcwb.coop Thu Feb 13 23:45:41 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 16:45:41 -0600 Subject: [M3devel] Warning on apparent compiler bug Message-ID: <52FD4B15.1050901@lcwb.coop> I added a procedure signature to an interface and forgot to add the body to the (only) corresponding module that exported the interface. The compiler gave me no error message, no matter how hard I tried. I eventually did a -realclean, touched both the interface and module, and recompiled, to no avail. This was in a library package. From rodney_bates at lcwb.coop Thu Feb 13 23:51:41 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 16:51:41 -0600 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? Message-ID: <52FD4C7D.9030107@lcwb.coop> Rd.m3 contains, for example: PROCEDURE Closed (rd: T): BOOLEAN = BEGIN RETURN (rd.closed); END Closed; Most other procedures in Rd lock rd before doing anything. Even though it's only read access, and to a BOOLEAN, is it really true that we can rely on this to work on all targets with neither a lock nor some atomic operation? It seems to me like it should be OK, but I have thought that several times before. only to be shown wrong. Meanwhile, modern hardware keeps adding more complex caching, making these things trickier. From schlepptop at henning-thielemann.de Thu Feb 13 23:55:28 2014 From: schlepptop at henning-thielemann.de (Henning Thielemann) Date: Thu, 13 Feb 2014 23:55:28 +0100 Subject: [M3devel] Warning on apparent compiler bug In-Reply-To: <52FD4B15.1050901@lcwb.coop> References: <52FD4B15.1050901@lcwb.coop> Message-ID: <52FD4D60.80801@henning-thielemann.de> Am 13.02.2014 23:45, schrieb Rodney M. Bates: > I added a procedure signature to an interface and forgot to add the body > to the > (only) corresponding module that exported the interface. The compiler > gave me > no error message, no matter how hard I tried. I eventually did a > -realclean, > touched both the interface and module, and recompiled, to no avail. > This was > in a library package. Since several implementations can export something to the same interface, the compiler cannot warn about a missing procedure body in a specific implementation module. But I guess you get a linker error later. (Maybe too late, to understand the cause.) From rodney_bates at lcwb.coop Fri Feb 14 03:08:30 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 20:08:30 -0600 Subject: [M3devel] Warning on apparent compiler bug In-Reply-To: <52FD4D60.80801@henning-thielemann.de> References: <52FD4B15.1050901@lcwb.coop> <52FD4D60.80801@henning-thielemann.de> Message-ID: <52FD7A9E.8030102@lcwb.coop> On 02/13/2014 04:55 PM, Henning Thielemann wrote: > Am 13.02.2014 23:45, schrieb Rodney M. Bates: >> I added a procedure signature to an interface and forgot to add the body >> to the >> (only) corresponding module that exported the interface. The compiler >> gave me >> no error message, no matter how hard I tried. I eventually did a >> -realclean, >> touched both the interface and module, and recompiled, to no avail. >> This was >> in a library package. > > Since several implementations can export something to the same interface, the compiler cannot warn about a missing procedure body in a specific implementation module. > > But I guess you get a linker error later. (Maybe too late, to understand the cause.) Yes, when the package is linked, which is always done as part of a single cm3 command. And in many cases, you do get a message for this error, something like "procedure If.Mumble is not implemented." I have gotten this in the past, for this very error. But not this time. So it's an intermittent bug. > > From estellnb at elstel.org Fri Feb 14 13:32:11 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Fri, 14 Feb 2014 12:32:11 +0000 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <52FD4C7D.9030107@lcwb.coop> References: <52FD4C7D.9030107@lcwb.coop> Message-ID: <52FE0CCB.6060708@elstel.org> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be required. Am 13.02.2014 22:51, schrieb Rodney M. Bates: > Rd.m3 contains, for example: > > PROCEDURE Closed (rd: T): BOOLEAN = > BEGIN > RETURN (rd.closed); > END Closed; > > Most other procedures in Rd lock rd before doing anything. > > Even though it's only read access, and to a BOOLEAN, is it really true > that we can rely > on this to work on all targets with neither a lock nor some atomic > operation? > It seems to me like it should be OK, but I have thought that several > times before. > only to be shown wrong. Meanwhile, modern hardware keeps adding more > complex > caching, making these things trickier. > > > From estellnb at elstel.org Fri Feb 14 19:40:38 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Fri, 14 Feb 2014 19:40:38 +0100 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> References: <52FD4C7D.9030107@lcwb.coop> <52FE0CCB.6060708@elstel.org> <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> Message-ID: <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> Sorry, I did not get the point about it yet. Even if the boolean is read by multiple mem-read operations at least one of them will yield a value # 0 if the boolean was set at that specific sub-operation which should totally suffice; i.e. if there are four read operations to be done and the forth may read a value # 0 then it should be sufficient that the fourth read is atomic by itself ignoring all other reads and writes except the fourth because booleans are always either zero or one and thus only one byte will matter so that atomic access is ensured. Similarely, what difference on caching will a lock yield? The lock statement is not associated with the value it protects in any way so it can not explicitly flush the cache for the given value. Theoretically it could choose to invalidate all caches (horribly inefficient!). Well; I think we may have caught the point here. Either way I would expect some kind of machine-level reasoning about it. Shouldn`t there be a way to atomically access a word on every kind of machine architecture? Why not introduce anything like ATOMIC(x) := 3; y:= ATMOIC(x); INC(ATOMIC(x),3) which should then yield sth. like LOCK MOV EAX,[EA] LOCK MOV [EA],EAX LOCK ADD/INC [EA], const/ on Intel platforms f.i. and respective machine instructions on other platforms. Isn`t it horribly inefficient having to lock even for a boolean value? Do you think there is any way to achieve ATOMIC(designator) behavior for m3gcc? Am 14.02.2014 um 15:38 schrieb Antony Hosking: > volatile in C is next to useless on multi-processors ? it is only a compiler directive, not a hardware fence of any kind. > > Indeed, a lock statement is needed here (or some other atomic operation). > > On Feb 14, 2014, at 7:32 AM, Elmar Stellnberger wrote: > >> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be required. >> >> Am 13.02.2014 22:51, schrieb Rodney M. Bates: >>> Rd.m3 contains, for example: >>> >>> PROCEDURE Closed (rd: T): BOOLEAN = >>> BEGIN >>> RETURN (rd.closed); >>> END Closed; >>> >>> Most other procedures in Rd lock rd before doing anything. >>> >>> Even though it's only read access, and to a BOOLEAN, is it really true that we can rely >>> on this to work on all targets with neither a lock nor some atomic operation? >>> It seems to me like it should be OK, but I have thought that several times before. >>> only to be shown wrong. Meanwhile, modern hardware keeps adding more complex >>> caching, making these things trickier. >>> >>> >>> >> > From mika at async.caltech.edu Fri Feb 14 19:56:40 2014 From: mika at async.caltech.edu (mika at async.caltech.edu) Date: Fri, 14 Feb 2014 10:56:40 -0800 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> References: <52FD4C7D.9030107@lcwb.coop> <52FE0CCB.6060708@elstel.org> <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> Message-ID: <20140214185640.A9A1B1A2080@async.async.caltech.edu> Yes the unlock I think will have to flush all writes from that processor. No need to flush the entire cache, any reasonable cache system will track which lines are modified and flush only those. Intel processors have a lot of hardware for cache-coherence built in, most of it just happens automatically in the background. On Alpha I think you'd have to insert a Memory Barrier (MB) instruction where the processor releases the lock. The requirements on the compiler will be different from architecture to architecture. Ah there's a nice graphic here: http://en.wikipedia.org/wiki/Memory_ordering Mika Elmar Stellnberger writes: >Sorry, I did not get the point about it yet. >Even if the boolean is read by multiple mem-read operations at least one = >of them will yield a value # 0 if the boolean was set at that specific = >sub-operation which should totally suffice; i.e. if there are four read = >operations to be done and the forth may read a value # 0 then it should = >be sufficient that the fourth read is atomic by itself ignoring all = >other reads and writes except the fourth because booleans are always = >either zero or one and thus only one byte will matter so that atomic = >access is ensured. >Similarely, what difference on caching will a lock yield? >The lock statement is not associated with the value it protects in any = >way so it can not explicitly flush the cache for the given value. = >Theoretically it could choose to invalidate all caches (horribly = >inefficient!). Well; I think we may have caught the point here. Either = >way I would expect some kind of machine-level reasoning about it. > >Shouldn`t there be a way to atomically access a word on every kind of = >machine architecture? >Why not introduce anything like ATOMIC(x) :=3D 3; y:=3D ATMOIC(x); = >INC(ATOMIC(x),3) > which should then yield sth. like >LOCK MOV EAX,[EA] >LOCK MOV [EA],EAX >LOCK ADD/INC [EA], const/ >on Intel platforms f.i. and respective machine instructions on other = >platforms. > >Isn`t it horribly inefficient having to lock even for a boolean value? >Do you think there is any way to achieve ATOMIC(designator) behavior for = >m3gcc? > > >Am 14.02.2014 um 15:38 schrieb Antony Hosking: > >> volatile in C is next to useless on multi-processors =97 it is only a = >compiler directive, not a hardware fence of any kind. >>=20 >> Indeed, a lock statement is needed here (or some other atomic = >operation). >>=20 >> On Feb 14, 2014, at 7:32 AM, Elmar Stellnberger = > wrote: >>=20 >>> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be = >required. >>>=20 >>> Am 13.02.2014 22:51, schrieb Rodney M. Bates: >>>> Rd.m3 contains, for example: >>>>=20 >>>> PROCEDURE Closed (rd: T): BOOLEAN =3D >>>> BEGIN >>>> RETURN (rd.closed); >>>> END Closed; >>>>=20 >>>> Most other procedures in Rd lock rd before doing anything. >>>>=20 >>>> Even though it's only read access, and to a BOOLEAN, is it really = >true that we can rely >>>> on this to work on all targets with neither a lock nor some atomic = >operation? >>>> It seems to me like it should be OK, but I have thought that several = >times before. >>>> only to be shown wrong. Meanwhile, modern hardware keeps adding = >more complex >>>> caching, making these things trickier. >>>>=20 >>>>=20 >>>>=20 >>>=20 >>=20 From dragisha at m3w.org Mon Feb 17 08:51:48 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Mon, 17 Feb 2014 08:51:48 +0100 Subject: [M3devel] Git, a call for participation Message-ID: <06409246-E868-4009-A4B6-335A19E862E2@m3w.org> Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Mon Feb 17 16:24:07 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Mon, 17 Feb 2014 15:24:07 +0000 Subject: [M3devel] Git, a call for participation Message-ID: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Tue Feb 18 00:05:25 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Tue, 18 Feb 2014 00:05:25 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> References: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> Message-ID: <0DA0B270-D697-43A9-8DCF-E7BA56EDA6A2@m3w.org> Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: > Dragi?a: > > I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. > > 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? > If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? > > 2. What are the security concerns with installing the GitHub software? > > My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. > > I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. > > Thanks, > Randy Coleburn > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 2:52 AM > To: m3devel > Subject: EXT:[M3devel] Git, a call for participation > > Hi, > > To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. > > TIA, > -- > Dragi?a Duri? > dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Tue Feb 18 01:30:08 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Tue, 18 Feb 2014 00:30:08 +0000 Subject: [M3devel] Git, a call for participation Message-ID: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? I seem to recall providing you with my email earlier for the authors file. I can install TortoiseGit at some point and run a test when you are ready. BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? --Randy From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 6:05 PM To: Coleburn, Randy Cc: m3devel Subject: EXT:Re: [M3devel] Git, a call for participation Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy > wrote: Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Wed Feb 19 08:09:43 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Wed, 19 Feb 2014 08:09:43 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> Message-ID: Email was for conversion process and it is all set-up. Github account, and request to me (dragisha) on github for cm3 repository is separate step. You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. Sandbox? Meaning virtual machine or? dd On 18 Feb 2014, at 01:30, Coleburn, Randy wrote: > I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? > I seem to recall providing you with my email earlier for the authors file. > I can install TortoiseGit at some point and run a test when you are ready. > BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? > --Randy > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 6:05 PM > To: Coleburn, Randy > Cc: m3devel > Subject: EXT:Re: [M3devel] Git, a call for participation > > Randy, > > You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. > > dd > > On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: > > > Dragi?a: > > I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. > > 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? > If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? > > > 2. What are the security concerns with installing the GitHub software? > > My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. > > I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. > > Thanks, > Randy Coleburn > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 2:52 AM > To: m3devel > Subject: EXT:[M3devel] Git, a call for participation > > Hi, > > To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. > > TIA, > -- > Dragi?a Duri? > dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Wed Feb 19 18:05:19 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Wed, 19 Feb 2014 17:05:19 +0000 Subject: [M3devel] Git, a call for participation In-Reply-To: References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL>, Message-ID: Sorry, I should rephrase the question: Do I need to create a separate folder tree for my local copy of the cm3 source code tree for use with Git, or can I reuse the existing folder tree that I use with CVS? --Randy Coleburn On Feb 19, 2014, at 2:10 AM, "Dragi?a Duri?" > wrote: Email was for conversion process and it is all set-up. Github account, and request to me (dragisha) on github for cm3 repository is separate step. You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. Sandbox? Meaning virtual machine or? dd On 18 Feb 2014, at 01:30, Coleburn, Randy > wrote: I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? I seem to recall providing you with my email earlier for the authors file. I can install TortoiseGit at some point and run a test when you are ready. BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? --Randy From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 6:05 PM To: Coleburn, Randy Cc: m3devel Subject: EXT:Re: [M3devel] Git, a call for participation Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy > wrote: Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Wed Feb 19 23:34:18 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Wed, 19 Feb 2014 23:34:18 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL>, Message-ID: <688E1E2E-D298-4FD3-84DD-2F2F60E4D0A6@m3w.org> You will need separate working directory. With git, you will have whole cm3 repository cloned in toplevel .git folder. With svn you have .svn folders around, and CVS folders with cvs. On 19 Feb 2014, at 18:05, Coleburn, Randy wrote: > Sorry, I should rephrase the question: Do I need to create a separate folder tree for my local copy of the cm3 source code tree for use with Git, or can I reuse the existing folder tree that I use with CVS? > > --Randy Coleburn > > On Feb 19, 2014, at 2:10 AM, "Dragi?a Duri?" wrote: > >> Email was for conversion process and it is all set-up. >> >> Github account, and request to me (dragisha) on github for cm3 repository is separate step. >> >> You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. >> >> Sandbox? Meaning virtual machine or? >> >> dd >> >> On 18 Feb 2014, at 01:30, Coleburn, Randy wrote: >> >>> I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? >>> I seem to recall providing you with my email earlier for the authors file. >>> I can install TortoiseGit at some point and run a test when you are ready. >>> BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? >>> --Randy >>> >>> From: Dragi?a Duri? [mailto:dragisha at m3w.org] >>> Sent: Monday, February 17, 2014 6:05 PM >>> To: Coleburn, Randy >>> Cc: m3devel >>> Subject: EXT:Re: [M3devel] Git, a call for participation >>> >>> Randy, >>> >>> You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. >>> >>> dd >>> >>> On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: >>> >>> >>> Dragi?a: >>> >>> I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. >>> >>> 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? >>> If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? >>> >>> >>> 2. What are the security concerns with installing the GitHub software? >>> >>> My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. >>> >>> I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. >>> >>> Thanks, >>> Randy Coleburn >>> >>> From: Dragi?a Duri? [mailto:dragisha at m3w.org] >>> Sent: Monday, February 17, 2014 2:52 AM >>> To: m3devel >>> Subject: EXT:[M3devel] Git, a call for participation >>> >>> Hi, >>> >>> To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. >>> >>> TIA, >>> -- >>> Dragi?a Duri? >>> dragisha at m3w.org >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rodney_bates at lcwb.coop Thu Feb 27 00:37:42 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 17:37:42 -0600 Subject: [M3devel] Optional full-range Unicode support now merged into the CVS head. Message-ID: <530E7AC6.40004@lcwb.coop> Optional, low-level support for full-range Unicode characters is now merged into the CVS head. By default, WIDECHAR remains 16-bit, as it has been. Enabling the full range requires a manual configuration change and a rebuild of the "front" group of packages. cm3/scripts/README-build-unicode describes the process. cm3/README-unicode describes the changes. The abbreviated summary below can be found in c3/README-unicode-summary. ------------------------------------------------------------------------ CM3 now has low-level support of full-range Unicode characters in the type WIDECHAR. The philosophy is: 1. Use the streams (Rd, Wr) for encoding and decoding variable-length encodings (e.g., UTF-8) of characters. Rd and Wr have been designed from the beginning for primarily sequential access, which variable-length encodings get along with. 2. Expand WIDECHAR to hold any character in the entire Unicode range, in a fixed-size type. This property carries into Arrays of WIDECHAR and TEXTs. These have been designed from the beginning to support random access by character, not fragments thereof, and this property is preserved. Of course, if you really want to, you can still put individual fragments of characters into either, and handle them that way. By default, the compiler is configured to keep WIDECHAR at 16 bits, as before. If you keep it this way and do not do anything to utilize the full Unicode range, everything should work as before. If not, it's a bug. If you configure for Unicode-sized WIDECHAR, but change no code, most things will still work the same. WIDECHAR values in memory will occupy 32 bits. As a result, record/object field layouts obviously can change, and the legality of packed layouts can also change. Low-level code that makes assumptions about memory sizes and layouts can break. Most significantly, the procedures in Wr and Rd that transfer WIDECHAR values (e.g., Rd.GetWideChar) will transfer 32 bits to/from the stream, as well as in memory. If you want to utilize Unicode-sized WIDECHAR, there are some new things waiting for you. The interfaces UniWr and UniRd, in package libunicode, are as similar as reasonable to Wr and Rd, but they perform encoding and decoding. They act as filters on a Wr.T or Rd.T. There are 9 different encodings possible, including the 5 defined in the Unicode standard, the two that older Modula-3 systems use, and two transitional UCS encodings. Character and Text literals have new escapes for the entire code point range. The subtype and assignability rules are relaxed as if CHAR and WIDECHAR were the same base type. Pickles and network objects have a reasonable degree of compatibility between programs compiled with different WIDECHAR sizes. Most library code adapts to different WIDECHAR sizes when compiled. Some functions adapt at runtime, including m3gdb. Only the compiler needs to be configured. These changes provide no support for higher level Unicode functions. The only awareness of specific code points are of the null character, surrogate code points (relevant to the encodings), the end-of-line sequences defined in the Unicode standard, and the Unicode "replacement character", inserted in place of characters that are invalid in one way or another. From jcchu at acm.org Wed Feb 26 18:08:54 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 01:08:54 +0800 Subject: [M3devel] REFANY-keyed tables? Message-ID: Hi, I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? Thanks. ? JC Chu From rodney_bates at lcwb.coop Thu Feb 27 04:28:28 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 21:28:28 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: Message-ID: <530EB0DC.6040809@lcwb.coop> On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > Hmm, can you point out where these are? I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. So the table can only work on a narrower set of allocated object types than REFANY. If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. Rodney Bates > Thanks. > > ? JC Chu > From rodney_bates at lcwb.coop Thu Feb 27 04:35:36 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 21:35:36 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: Message-ID: <530EB288.4080905@lcwb.coop> Tony, I see that Refany.Equal does not raise an exception, but rather just checks pointer equality. Is it true, as this would require, that parallel GC prevents a mutator from executing this during the period when some but not all of the pointers to a being-moved heap object have been updated? On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > > Thanks. > > ? JC Chu > From jcchu at acm.org Thu Feb 27 05:01:03 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 12:01:03 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530EB0DC.6040809@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> Message-ID: > Hmm, can you point out where these are? See for example . > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. Just out of curiosity, is there any way to lock the GC temporarily? ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Thursday, February 27, 2014 11:28 To: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > Hmm, can you point out where these are? I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. So the table can only work on a narrower set of allocated object types than REFANY. If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. Rodney Bates > Thanks. > > ? JC Chu > From jcchu at acm.org Thu Feb 27 02:37:09 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 09:37:09 +0800 Subject: [M3devel] REFANY-keyed tables? Message-ID: Refany.Hash() simply raises a Refany.Error, which is marked as fatal. And the comment for it in Refany.i3 does state that it ?causes a checked runtime error?. (Same for Refany.Compare() (rather than Refany.Equal(), as I previously said).) ? JC Chu ________________________________ From: Antony Hosking Sent: ?2/?27/?2014 9:08 To: JC Chu Cc: ^M3DEVEL Subject: Re: [M3devel] REFANY-keyed tables? Sounds like some sort of build error. What is the exception? On Feb 26, 2014, at 12:08 PM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > > Thanks. > > ? JC Chu -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodney_bates at lcwb.coop Thu Feb 27 16:39:56 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 27 Feb 2014 09:39:56 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB0DC.6040809@lcwb.coop> Message-ID: <530F5C4C.7000101@lcwb.coop> I did some grepping for uses of RefIntTbl and found a couple of interesting variations. See, e.g., m3-ui/juno-2/juno-machine/src/JunoRT.m3 and JunoValue.[im]3. First, I was thinking of using a narrower reference type than REFANY, with its own Hash function, to instantiate Tbl. But you can use RefIntTbl and provide a different Hash function another way. Tbl just uses Key.Hash to initialize Default.keyHash. You can use the instantiation with REFANY, then create a subtype of RefIntTbl.Default that overrides Default.keyHash with another hash function. This is probably a bit quicker to code. It can create the false impresssion that the table is keyed by REFANY in its full generality, using Refany.Hash. Second, in this example, the table there can contain a mixture of three different reference types as keys, but they have no common ancestor narrower than REFANY and no common fields. The Hash function in JunoValue just does a TYPECASE on the key and uses different fields of the different objects to compute its hash value. It still won't work on all of REFANY, just the subtypes it explicitly codes for. On 02/26/2014 10:01 PM, JC Chu wrote: >> Hmm, can you point out where these are? > > See for example . Unfortunately, this documentation page gives no clue that the REFANY-keyed tables will have to have an override for their Hash function, unlike the other types. Somewhere, there is an explanation of this, but I don't remember where. BTW, this documentation says the instantiating interfaces (e.g. Refany.i3) can be found in either m3core and libm3. I see they are only in m3core. Could two interfaces with the same name in a link closure have ever linked successfully? Further BTW, does it seem odd that while these type interfaces are in m3core, libm3 has pure renaming interfaces RealType and LongrealType but no others? Just to save some particular favored client code from having to be edited? > >> I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > >> The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. > > Just out of curiosity, is there any way to lock the GC temporarily? > > ? JC Chu > > -----Original Message----- > From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] > Sent: Thursday, February 27, 2014 11:28 > To: m3devel at elegosoft.com > Subject: Re: [M3devel] REFANY-keyed tables? > > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From rodney_bates at lcwb.coop Thu Feb 27 18:54:13 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 27 Feb 2014 11:54:13 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB0DC.6040809@lcwb.coop> Message-ID: <530F7BC5.4030409@lcwb.coop> On 02/26/2014 10:01 PM, JC Chu wrote: >> Hmm, can you point out where these are? > > See for example . > >> I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > >> The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. > > Just out of curiosity, is there any way to lock the GC temporarily? Look in cm3/m3-libs/m3core/src/runtime/common/RTCollector.i3. There are various procedures you can call at runtime to [dis|en]able different collection strategies or stop collection altogether, with performance consequences, obviously. For example, DisableMotion will prevent moving any heap objects. If you did this, you really could use a REFANY directly as a hash code in a Ref*Tbl. You would still have to provide a different Hash function that actually did this, instead of just excepting. (Can "except" be verbed? Some say any word can be verbed.) > > ? JC Chu > > -----Original Message----- > From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] > Sent: Thursday, February 27, 2014 11:28 > To: m3devel at elegosoft.com > Subject: Re: [M3devel] REFANY-keyed tables? > > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From hendrik at topoi.pooq.com Thu Feb 27 20:56:12 2014 From: hendrik at topoi.pooq.com (Hendrik Boom) Date: Thu, 27 Feb 2014 14:56:12 -0500 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530F7BC5.4030409@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> Message-ID: <20140227195611.GA29137@topoi.pooq.com> On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: > (Can "except" be verbed? Some say any word can be verbed.) Peter Naur said it, "In English, any noun can be verbed." But "except" is already a verb. -- hendrik From hendrik at topoi.pooq.com Thu Feb 27 21:09:40 2014 From: hendrik at topoi.pooq.com (Hendrik Boom) Date: Thu, 27 Feb 2014 15:09:40 -0500 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <20140227195611.GA29137@topoi.pooq.com> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> <20140227195611.GA29137@topoi.pooq.com> Message-ID: <20140227200940.GC29137@topoi.pooq.com> On Thu, Feb 27, 2014 at 02:56:12PM -0500, Hendrik Boom wrote: > On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: > > > (Can "except" be verbed? Some say any word can be verbed.) > > Peter Naur said it, "In English, any noun can be verbed." > > But "except" is already a verb. But I suspect it may have a different meaning: verbformal 1. specify as not included in a category or group; exclude. "he excepted from his criticism a handful of distinguished writers" synonyms: exclude, omit, leave out, count out, disregard; exempt "lawyers are all crooks, present company excepted" -- hendrik From rodney_bates at lcwb.coop Fri Feb 28 16:04:49 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:04:49 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <20140227200940.GC29137@topoi.pooq.com> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> <20140227195611.GA29137@topoi.pooq.com> <20140227200940.GC29137@topoi.pooq.com> Message-ID: <5310A591.5070909@lcwb.coop> Yeah, I thought about the different meaning. I suppose I could have verbed "exception", giving "instead of just exceptioning", but that would have been more than even I can stomach. On 02/27/2014 02:09 PM, Hendrik Boom wrote: > On Thu, Feb 27, 2014 at 02:56:12PM -0500, Hendrik Boom wrote: >> On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: >> >>> (Can "except" be verbed? Some say any word can be verbed.) >> >> Peter Naur said it, "In English, any noun can be verbed." >> >> But "except" is already a verb. > > But I suspect it may have a different meaning: > > verbformal > 1. > specify as not included in a category or group; exclude. > "he excepted from his criticism a handful of distinguished writers" > synonyms: exclude, omit, leave out, count out, disregard; exempt > "lawyers are all crooks, present company excepted" > > -- hendrik > From rodney_bates at lcwb.coop Fri Feb 28 16:10:52 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:10:52 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB288.4080905@lcwb.coop> Message-ID: <5310A6FC.6020202@lcwb.coop> On 02/27/2014 02:07 PM, Antony Hosking wrote: > [Your prior e-mail is a great description of why REFANY does not have a hash, and hence why Refany.T raises an exception for Refany.Hash. Short answer is there is nothing about a REFANY that can conceivably be used as a hash. We could choose to implement an invariant hash code for REFANY, much as Java does for Object, but it would impose a space cost to store the hash.] > > In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. == in Java is much the same. A copying collector implementation can use a number of techniques to ensure this, but in our case pointer equality is sufficient because the mostly-copying collector does not move heap objects that are referenced from the stacks. Thus, while the REFANY = operation is being performed neither target will move and pointer equality suffices. > OK, that makes sense. But then what about this code: IF P^.link = Q^.link ... getting executed after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? (And assuming no stack pointers equal to P^.link exist, or it wouldn't happen.) > On Feb 26, 2014, at 10:35 PM, Rodney M. Bates wrote: > >> Tony, I see that Refany.Equal does not raise an exception, but rather just checks >> pointer equality. Is it true, as this would require, that parallel GC prevents >> a mutator from executing this during the period when some but not all of the >> pointers to a being-moved heap object have been updated? >> >> On 02/26/2014 11:08 AM, JC Chu wrote: >>> Hi, >>> >>> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >>> >>> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >>> >>> Thanks. >>> >>> ? JC Chu >>> >> > > From rodney_bates at lcwb.coop Fri Feb 28 16:15:55 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:15:55 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530EB0DC.6040809@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> Message-ID: <5310A82B.1040702@lcwb.coop> On 02/26/2014 09:28 PM, Rodney M. Bates wrote: > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move > a heap object and adjust all the pointers to it, if it knows where they all are, > which holds for some objects. So the bit contents of a REFANY can change. This > means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far > more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every > object an object sequence number field, explicitly initialized when an object > is allocated, and using that for the Hash function. But this won't work for > REFANY, because it can have no fields. > There is more to this. The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. But in many cases, you might want to hash on the contents, not the address of the object, in which case, the technique used in juno-2, using actual data fields instead of an object sequence number is the right way. For example, to turn the objects into atoms. > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can > still do that with a hierarchy of OBJECT types, but they will have to have a common > supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) > variables, but it is carefully arranged that they all have an allocated type > that has fields a Hash function can work on. Hash would then have to do a > NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From jcchu at acm.org Fri Feb 28 18:40:55 2014 From: jcchu at acm.org (JC Chu) Date: Sat, 1 Mar 2014 01:40:55 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <5310A6FC.6020202@lcwb.coop> References: <530EB288.4080905@lcwb.coop> <5310A6FC.6020202@lcwb.coop> Message-ID: >> In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. > ... after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? ... ... So do we actually have that for r1, r2: REFANY, r1 = r2 # NIL implies r1^ = r2^? I was hoping that at least REFANY-valued lists would still be safe to use.... ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Friday, February 28, 2014 23:11 To: Antony Hosking Cc: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/27/2014 02:07 PM, Antony Hosking wrote: > [Your prior e-mail is a great description of why REFANY does not have > a hash, and hence why Refany.T raises an exception for Refany.Hash. > Short answer is there is nothing about a REFANY that can conceivably > be used as a hash. We could choose to implement an invariant hash > code for REFANY, much as Java does for Object, but it would impose a > space cost to store the hash.] > > In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. == in Java is much the same. A copying collector implementation can use a number of techniques to ensure this, but in our case pointer equality is sufficient because the mostly-copying collector does not move heap objects that are referenced from the stacks. Thus, while the REFANY = operation is being performed neither target will move and pointer equality suffices. > OK, that makes sense. But then what about this code: IF P^.link = Q^.link ... getting executed after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? (And assuming no stack pointers equal to P^.link exist, or it wouldn't happen.) > On Feb 26, 2014, at 10:35 PM, Rodney M. Bates wrote: > >> Tony, I see that Refany.Equal does not raise an exception, but rather >> just checks pointer equality. Is it true, as this would require, >> that parallel GC prevents a mutator from executing this during the >> period when some but not all of the pointers to a being-moved heap object have been updated? >> >> On 02/26/2014 11:08 AM, JC Chu wrote: >>> Hi, >>> >>> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >>> >>> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >>> >>> Thanks. >>> >>> ? JC Chu >>> >> > > From jcchu at acm.org Fri Feb 28 18:40:58 2014 From: jcchu at acm.org (JC Chu) Date: Sat, 1 Mar 2014 01:40:58 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <5310A82B.1040702@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> <5310A82B.1040702@lcwb.coop> Message-ID: > ... The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. Yes, I was indeed in need of an immutable version of REFANY. ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Friday, February 28, 2014 23:16 To: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/26/2014 09:28 PM, Rodney M. Bates wrote: > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which > means it can move a heap object and adjust all the pointers to it, if > it knows where they all are, which holds for some objects. So the bit > contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to > prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving > every object an object sequence number field, explicitly initialized > when an object is allocated, and using that for the Hash function. > But this won't work for REFANY, because it can have no fields. > There is more to this. The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. But in many cases, you might want to hash on the contents, not the address of the object, in which case, the technique used in juno-2, using actual data fields instead of an object sequence number is the right way. For example, to turn the objects into atoms. > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different > types, you can still do that with a hierarchy of OBJECT types, but > they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed > (statically) variables, but it is carefully arranged that they all > have an allocated type that has fields a Hash function can work on. > Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From rodney_bates at lcwb.coop Wed Feb 5 00:43:58 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Tue, 04 Feb 2014 17:43:58 -0600 Subject: [M3devel] A bug in M3C Message-ID: <52F17B3E.3030203@lcwb.coop> Jay, The attached M3 program compiles using cm3cg on AMD64_LINUX. Using M3C, it generates C code that the C compiler chokes on: rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep --- building in ../AMD64_LINUX --- new source -> compiling Test.m3 ../src/Test.m3: In function ?Test__P?: ../src/Test.m3:12: error: aggregate value used where an integer was expected compile_c => 1 C compiler failed compiling: Test.m3.c compilation failed => not building program "test" Fatal Error: package build failed A much larger program from which this case is reduced suffers the same problem compiling the equivalent code using M3C, but compiles and executes as expected using cm3cg. Removing or simplifying the IF statement makes it go away. -------------- next part -------------- M3_BACKEND_MODE = "C" %M3_FRONT_FLAGS = ["-unfold_nested_procs"] import("libm3") implementation("Test") program ("test") -------------- next part -------------- MODULE Test EXPORTS Main ; TYPE T = ARRAY [ 0 .. BYTESIZE ( WIDECHAR ) - 1 ] OF CHAR ; CONST C = T { '\x05' , .. } ; PROCEDURE P ( READONLY Arr : T ; Msg : TEXT ) = VAR LMsg : TEXT ; BEGIN IF Arr # C THEN LMsg := Msg & "XYZ" END (* IF *) END P ; BEGIN P ( C , "ABC" ) END Test . From rodney_bates at lcwb.coop Thu Feb 6 17:00:35 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 06 Feb 2014 10:00:35 -0600 Subject: [M3devel] I need more cvs help Message-ID: <52F3B1A3.1070205@lcwb.coop> I am trying to move some small subdirectories. In my local copy, I created the new directories, did cvs add on them, copied the source files to the new directories, did cvs add and cvs commit on them, in the new directories. On this machine, it looks like it worked, and CVS/Entries shows the new version numbers the commit showed. But doing cvs update -d on a different machine gets nothing. Moreover, the commit messages coming through on m3commit show the files as committed in the directory where the old copies were. CVS/Entries there also shows the new version numbers. And cvs update in the old directory not only gets the new versions, that were committed from the new directory, but it gets some other files that came from a different subdirectory too. Surely, cvs can't be treating files in different directories with the same simple name as the same file. We have tens, maybe hundreds of files named "m3makefile" all over, and these don't get mixed up in this way. Any help would be greatly appreciated. From wagner at elegosoft.com Thu Feb 6 17:32:31 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Thu, 6 Feb 2014 17:32:31 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F3B1A3.1070205@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> Message-ID: <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> On Thu, 06 Feb 2014 10:00:35 -0600 "Rodney M. Bates" wrote: > I am trying to move some small subdirectories. In my local copy, I created the new > directories, did cvs add on them, copied the source files to the new directories, > did cvs add and cvs commit on them, in the new directories. On this machine, it > looks like it worked, and CVS/Entries shows the new version numbers the commit showed. > But doing cvs update -d on a different machine gets nothing. > > Moreover, the commit messages coming through on m3commit show the files as > committed in the directory where the old copies were. CVS/Entries there also > shows the new version numbers. And cvs update in the old directory not only gets > the new versions, that were committed from the new directory, but it gets some > other files that came from a different subdirectory too. > > Surely, cvs can't be treating files in different directories with the same simple > name as the same file. We have tens, maybe hundreds of files named "m3makefile" > all over, and these don't get mixed up in this way. > > Any help would be greatly appreciated. It sounds like you did it right, yet I am sure that you somewhere made a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? Have you got a log of the commands you executed, or can you retry the move/add/commit/remove and record the session? Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From jay.krell at cornell.edu Fri Feb 7 11:31:37 2014 From: jay.krell at cornell.edu (Jay K) Date: Fri, 7 Feb 2014 10:31:37 +0000 Subject: [M3devel] A bug in M3C In-Reply-To: <52F17B3E.3030203@lcwb.coop> References: <52F17B3E.3030203@lcwb.coop> Message-ID: Sorry, I am here, but really busy... > Date: Tue, 4 Feb 2014 17:43:58 -0600 > From: rodney_bates at lcwb.coop > To: m3devel at elegosoft.com > Subject: [M3devel] A bug in M3C > > Jay, > > The attached M3 program compiles using cm3cg on AMD64_LINUX. > Using M3C, it generates C code that the C compiler chokes on: > > rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep > --- building in ../AMD64_LINUX --- > > new source -> compiling Test.m3 > ../src/Test.m3: In function ?Test__P?: > ../src/Test.m3:12: error: aggregate value used where an integer was expected > compile_c => 1 > C compiler failed compiling: Test.m3.c > compilation failed => not building program "test" > Fatal Error: package build failed > > A much larger program from which this case is reduced suffers the same problem > compiling the equivalent code using M3C, but compiles and executes as expected > using cm3cg. > > Removing or simplifying the IF statement makes it go away. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodney_bates at lcwb.coop Fri Feb 7 16:53:30 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 07 Feb 2014 09:53:30 -0600 Subject: [M3devel] A bug in M3C In-Reply-To: References: <52F17B3E.3030203@lcwb.coop> Message-ID: <52F5017A.1000001@lcwb.coop> "No hurry", said the carpenter. On 02/07/2014 04:31 AM, Jay K wrote: > Sorry, I am here, but really busy... > > > > > > Date: Tue, 4 Feb 2014 17:43:58 -0600 > > From: rodney_bates at lcwb.coop > > To: m3devel at elegosoft.com > > Subject: [M3devel] A bug in M3C > > > > Jay, > > > > The attached M3 program compiles using cm3cg on AMD64_LINUX. > > Using M3C, it generates C code that the C compiler chokes on: > > > > rodney at allegheny:~/proj/m3/exp/m3cbug1/src$ cm3 -keep > > --- building in ../AMD64_LINUX --- > > > > new source -> compiling Test.m3 > > ../src/Test.m3: In function ?Test__P?: > > ../src/Test.m3:12: error: aggregate value used where an integer was expected > > compile_c => 1 > > C compiler failed compiling: Test.m3.c > > compilation failed => not building program "test" > > Fatal Error: package build failed > > > > A much larger program from which this case is reduced suffers the same problem > > compiling the equivalent code using M3C, but compiles and executes as expected > > using cm3cg. > > > > Removing or simplifying the IF statement makes it go away. From rodney_bates at lcwb.coop Sun Feb 9 03:22:14 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Sat, 08 Feb 2014 20:22:14 -0600 Subject: [M3devel] I need more cvs help In-Reply-To: <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> Message-ID: <52F6E656.8000804@lcwb.coop> On 02/06/2014 10:32 AM, Olaf Wagner wrote: > On Thu, 06 Feb 2014 10:00:35 -0600 > "Rodney M. Bates" wrote: > >> I am trying to move some small subdirectories. In my local copy, I created the new >> directories, did cvs add on them, copied the source files to the new directories, >> did cvs add and cvs commit on them, in the new directories. On this machine, it >> looks like it worked, and CVS/Entries shows the new version numbers the commit showed. >> But doing cvs update -d on a different machine gets nothing. >> >> Moreover, the commit messages coming through on m3commit show the files as >> committed in the directory where the old copies were. CVS/Entries there also >> shows the new version numbers. And cvs update in the old directory not only gets >> the new versions, that were committed from the new directory, but it gets some >> other files that came from a different subdirectory too. >> >> Surely, cvs can't be treating files in different directories with the same simple >> name as the same file. We have tens, maybe hundreds of files named "m3makefile" >> all over, and these don't get mixed up in this way. >> >> Any help would be greatly appreciated. > > It sounds like you did it right, yet I am sure that you somewhere made > a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? That's possible, > > Have you got a log of the commands you executed, or can you retry > the move/add/commit/remove and record the session? but I don't have enough info to reconstruct the sequence, especially after a hard disk just went sick. I tried saving everything I care about off to the side, removing all of both subdirectories from cvs, and re-adding from scratch. I even changed the name of the top new subdirectory, which wasn't consistent anyway. This appears to have worked, finally. The directories to be removed were dens of werewolves. cvs, it seems, won't remove anything that is in an inconsistent state, and even when it did, it seemed to take many repetitions to get it done both in the repository and my local copy. > > Olaf > From wagner at elegosoft.com Sun Feb 9 12:46:03 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Sun, 9 Feb 2014 12:46:03 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F6E656.8000804@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> Message-ID: <20140209124603.73172fda853526c4f524654f@elegosoft.com> On Sat, 08 Feb 2014 20:22:14 -0600 "Rodney M. Bates" wrote: > On 02/06/2014 10:32 AM, Olaf Wagner wrote: > > On Thu, 06 Feb 2014 10:00:35 -0600 > > "Rodney M. Bates" wrote: [...] > >> Any help would be greatly appreciated. > > > > It sounds like you did it right, yet I am sure that you somewhere made > > a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? > > That's possible, > > > > Have you got a log of the commands you executed, or can you retry > > the move/add/commit/remove and record the session? > > but I don't have enough info to reconstruct the sequence, especially after > a hard disk just went sick. > > I tried saving everything I care about off to the side, removing all of > both subdirectories from cvs, and re-adding from scratch. I even changed > the name of the top new subdirectory, which wasn't consistent anyway. > This appears to have worked, finally. > > The directories to be removed were dens of werewolves. cvs, it seems, > won't remove anything that is in an inconsistent state, and even when > it did, it seemed to take many repetitions to get it done both in the > repository and my local copy. So I gather that you've resolved the problem and cleaned up the source tree. CVS is known to have problems with refacturing code, as it does not treat directories as versioned objects. Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From rodney_bates at lcwb.coop Sun Feb 9 16:26:23 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Sun, 09 Feb 2014 09:26:23 -0600 Subject: [M3devel] I need more cvs help In-Reply-To: <20140209124603.73172fda853526c4f524654f@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> Message-ID: <52F79E1F.4070401@lcwb.coop> On 02/09/2014 05:46 AM, Olaf Wagner wrote: > On Sat, 08 Feb 2014 20:22:14 -0600 > "Rodney M. Bates" wrote: > >> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>> On Thu, 06 Feb 2014 10:00:35 -0600 >>> "Rodney M. Bates" wrote: > [...] >>>> Any help would be greatly appreciated. >>> >>> It sounds like you did it right, yet I am sure that you somewhere made >>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >> >> That's possible, >>> >>> Have you got a log of the commands you executed, or can you retry >>> the move/add/commit/remove and record the session? >> >> but I don't have enough info to reconstruct the sequence, especially after >> a hard disk just went sick. >> >> I tried saving everything I care about off to the side, removing all of >> both subdirectories from cvs, and re-adding from scratch. I even changed >> the name of the top new subdirectory, which wasn't consistent anyway. >> This appears to have worked, finally. >> >> The directories to be removed were dens of werewolves. cvs, it seems, >> won't remove anything that is in an inconsistent state, and even when >> it did, it seemed to take many repetitions to get it done both in the >> repository and my local copy. > > So I gather that you've resolved the problem and cleaned up the > source tree. CVS is known to have problems with refacturing code, > as it does not treat directories as versioned objects. Yes, as far as I can tell, it is resolved. > > Olaf > From estellnb at elstel.org Sun Feb 9 17:25:38 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Sun, 09 Feb 2014 16:25:38 +0000 Subject: [M3devel] I need more cvs help In-Reply-To: <52F79E1F.4070401@lcwb.coop> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> Message-ID: <52F7AC02.5050504@elstel.org> Haven`t we been thinking about switching to git? When would you expect the cm3/pm3 repos to be available via git? Am 09.02.2014 15:26, schrieb Rodney M. Bates: > > > On 02/09/2014 05:46 AM, Olaf Wagner wrote: >> On Sat, 08 Feb 2014 20:22:14 -0600 >> "Rodney M. Bates" wrote: >> >>> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>>> On Thu, 06 Feb 2014 10:00:35 -0600 >>>> "Rodney M. Bates" wrote: >> [...] >>>>> Any help would be greatly appreciated. >>>> >>>> It sounds like you did it right, yet I am sure that you somewhere made >>>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >>> >>> That's possible, >>>> >>>> Have you got a log of the commands you executed, or can you retry >>>> the move/add/commit/remove and record the session? >>> >>> but I don't have enough info to reconstruct the sequence, especially >>> after >>> a hard disk just went sick. >>> >>> I tried saving everything I care about off to the side, removing all of >>> both subdirectories from cvs, and re-adding from scratch. I even >>> changed >>> the name of the top new subdirectory, which wasn't consistent anyway. >>> This appears to have worked, finally. >>> >>> The directories to be removed were dens of werewolves. cvs, it seems, >>> won't remove anything that is in an inconsistent state, and even when >>> it did, it seemed to take many repetitions to get it done both in the >>> repository and my local copy. >> >> So I gather that you've resolved the problem and cleaned up the >> source tree. CVS is known to have problems with refacturing code, >> as it does not treat directories as versioned objects. > > Yes, as far as I can tell, it is resolved. > >> >> Olaf >> > From dragisha at m3w.org Sun Feb 9 19:33:09 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Sun, 9 Feb 2014 19:33:09 +0100 Subject: [M3devel] I need more cvs help ... git migration, final? In-Reply-To: <52F7AC02.5050504@elstel.org> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> Message-ID: I did two big tests on cvs -> git and now I have all ready? I suppose all we need to make it work is a bit of synchronization now. I propose we do it Feb 15 - Feb 17. I have an extended weekend so I can pour additional time in process if needed. Please let me know if anyone has some last moment questions, doubts, suggestions. TIA, dd On 09 Feb 2014, at 17:25, Elmar Stellnberger wrote: > Haven`t we been thinking about switching to git? > When would you expect the cm3/pm3 repos to be available via git? > > Am 09.02.2014 15:26, schrieb Rodney M. Bates: >> >> >> On 02/09/2014 05:46 AM, Olaf Wagner wrote: >>> On Sat, 08 Feb 2014 20:22:14 -0600 >>> "Rodney M. Bates" wrote: >>> >>>> On 02/06/2014 10:32 AM, Olaf Wagner wrote: >>>>> On Thu, 06 Feb 2014 10:00:35 -0600 >>>>> "Rodney M. Bates" wrote: >>> [...] >>>>>> Any help would be greatly appreciated. >>>>> >>>>> It sounds like you did it right, yet I am sure that you somewhere made >>>>> a mistake. Are you sure you didn't copy any metadata (CVS/xxx) around? >>>> >>>> That's possible, >>>>> >>>>> Have you got a log of the commands you executed, or can you retry >>>>> the move/add/commit/remove and record the session? >>>> >>>> but I don't have enough info to reconstruct the sequence, especially after >>>> a hard disk just went sick. >>>> >>>> I tried saving everything I care about off to the side, removing all of >>>> both subdirectories from cvs, and re-adding from scratch. I even changed >>>> the name of the top new subdirectory, which wasn't consistent anyway. >>>> This appears to have worked, finally. >>>> >>>> The directories to be removed were dens of werewolves. cvs, it seems, >>>> won't remove anything that is in an inconsistent state, and even when >>>> it did, it seemed to take many repetitions to get it done both in the >>>> repository and my local copy. >>> >>> So I gather that you've resolved the problem and cleaned up the >>> source tree. CVS is known to have problems with refacturing code, >>> as it does not treat directories as versioned objects. >> >> Yes, as far as I can tell, it is resolved. >> >>> >>> Olaf >>> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From wagner at elegosoft.com Sun Feb 9 19:33:59 2014 From: wagner at elegosoft.com (Olaf Wagner) Date: Sun, 9 Feb 2014 19:33:59 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <52F7AC02.5050504@elstel.org> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> Message-ID: <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> On Sun, 09 Feb 2014 16:25:38 +0000 Elmar Stellnberger wrote: > Haven`t we been thinking about switching to git? Yes, we have several times. I'm for it, but except for Dragisha there has been little enthusiasm and feedback on the suggestions. I prepared a Wiki page 10 months ago at https://cm3-bugs.elegosoft.com/cm3/wiki/CvsToGitMigration with the things that should be done, but nobody has worked on that AFAIK. Dragisha has made some test migrations. The part of migrating the data should be easy; problems are rather in the external access for all users and adapting the existing depending infrastructure like Hudson and build scripts. > When would you expect the cm3/pm3 repos to be available via git? I really cannot answer this one, as I cannot spent any time on the project myself. If I could, I'd say it would take me two weeks to get everything working again as it was at the time of the last release but based on a git repository. There may be others who can do it in half the time of course :-) Olaf -- Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com Gustav-Meyer-Allee 25 / Geb?ude 12, 13355 Berlin, Germany phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95 Gesch?ftsf?hrer: Michael Diers, Olaf Wagner | Sitz: Berlin Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194 From dragisha at m3w.org Sun Feb 9 19:42:09 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Sun, 9 Feb 2014 19:42:09 +0100 Subject: [M3devel] I need more cvs help In-Reply-To: <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> References: <52F3B1A3.1070205@lcwb.coop> <20140206173231.cc9116913eed0450a0496a32@elegosoft.com> <52F6E656.8000804@lcwb.coop> <20140209124603.73172fda853526c4f524654f@elegosoft.com> <52F79E1F.4070401@lcwb.coop> <52F7AC02.5050504@elstel.org> <20140209193359.c1359e86be3b677eda33ad05@elegosoft.com> Message-ID: <35203502-51A0-417A-8781-90BB6358580A@m3w.org> For external access, I need a list of developers github account names, to grant access. At least I would need major contributors added to admin group. New and occasional contributors can use fork/pull request path for fast start. I am still enthusiastic about this, and as for Hudson etc - I will also work on this. Not immediately, but in number of weeks at worst. dd On 09 Feb 2014, at 19:33, Olaf Wagner wrote: > AFAIK. Dragisha has made some test migrations. The part of migrating > the data should be easy; problems are rather in the external > access for all users and adapting the existing depending infrastructure > like Hudson and build scripts. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rodney_bates at lcwb.coop Thu Feb 13 23:45:41 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 16:45:41 -0600 Subject: [M3devel] Warning on apparent compiler bug Message-ID: <52FD4B15.1050901@lcwb.coop> I added a procedure signature to an interface and forgot to add the body to the (only) corresponding module that exported the interface. The compiler gave me no error message, no matter how hard I tried. I eventually did a -realclean, touched both the interface and module, and recompiled, to no avail. This was in a library package. From rodney_bates at lcwb.coop Thu Feb 13 23:51:41 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 16:51:41 -0600 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? Message-ID: <52FD4C7D.9030107@lcwb.coop> Rd.m3 contains, for example: PROCEDURE Closed (rd: T): BOOLEAN = BEGIN RETURN (rd.closed); END Closed; Most other procedures in Rd lock rd before doing anything. Even though it's only read access, and to a BOOLEAN, is it really true that we can rely on this to work on all targets with neither a lock nor some atomic operation? It seems to me like it should be OK, but I have thought that several times before. only to be shown wrong. Meanwhile, modern hardware keeps adding more complex caching, making these things trickier. From schlepptop at henning-thielemann.de Thu Feb 13 23:55:28 2014 From: schlepptop at henning-thielemann.de (Henning Thielemann) Date: Thu, 13 Feb 2014 23:55:28 +0100 Subject: [M3devel] Warning on apparent compiler bug In-Reply-To: <52FD4B15.1050901@lcwb.coop> References: <52FD4B15.1050901@lcwb.coop> Message-ID: <52FD4D60.80801@henning-thielemann.de> Am 13.02.2014 23:45, schrieb Rodney M. Bates: > I added a procedure signature to an interface and forgot to add the body > to the > (only) corresponding module that exported the interface. The compiler > gave me > no error message, no matter how hard I tried. I eventually did a > -realclean, > touched both the interface and module, and recompiled, to no avail. > This was > in a library package. Since several implementations can export something to the same interface, the compiler cannot warn about a missing procedure body in a specific implementation module. But I guess you get a linker error later. (Maybe too late, to understand the cause.) From rodney_bates at lcwb.coop Fri Feb 14 03:08:30 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 13 Feb 2014 20:08:30 -0600 Subject: [M3devel] Warning on apparent compiler bug In-Reply-To: <52FD4D60.80801@henning-thielemann.de> References: <52FD4B15.1050901@lcwb.coop> <52FD4D60.80801@henning-thielemann.de> Message-ID: <52FD7A9E.8030102@lcwb.coop> On 02/13/2014 04:55 PM, Henning Thielemann wrote: > Am 13.02.2014 23:45, schrieb Rodney M. Bates: >> I added a procedure signature to an interface and forgot to add the body >> to the >> (only) corresponding module that exported the interface. The compiler >> gave me >> no error message, no matter how hard I tried. I eventually did a >> -realclean, >> touched both the interface and module, and recompiled, to no avail. >> This was >> in a library package. > > Since several implementations can export something to the same interface, the compiler cannot warn about a missing procedure body in a specific implementation module. > > But I guess you get a linker error later. (Maybe too late, to understand the cause.) Yes, when the package is linked, which is always done as part of a single cm3 command. And in many cases, you do get a message for this error, something like "procedure If.Mumble is not implemented." I have gotten this in the past, for this very error. But not this time. So it's an intermittent bug. > > From estellnb at elstel.org Fri Feb 14 13:32:11 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Fri, 14 Feb 2014 12:32:11 +0000 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <52FD4C7D.9030107@lcwb.coop> References: <52FD4C7D.9030107@lcwb.coop> Message-ID: <52FE0CCB.6060708@elstel.org> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be required. Am 13.02.2014 22:51, schrieb Rodney M. Bates: > Rd.m3 contains, for example: > > PROCEDURE Closed (rd: T): BOOLEAN = > BEGIN > RETURN (rd.closed); > END Closed; > > Most other procedures in Rd lock rd before doing anything. > > Even though it's only read access, and to a BOOLEAN, is it really true > that we can rely > on this to work on all targets with neither a lock nor some atomic > operation? > It seems to me like it should be OK, but I have thought that several > times before. > only to be shown wrong. Meanwhile, modern hardware keeps adding more > complex > caching, making these things trickier. > > > From estellnb at elstel.org Fri Feb 14 19:40:38 2014 From: estellnb at elstel.org (Elmar Stellnberger) Date: Fri, 14 Feb 2014 19:40:38 +0100 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> References: <52FD4C7D.9030107@lcwb.coop> <52FE0CCB.6060708@elstel.org> <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> Message-ID: <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> Sorry, I did not get the point about it yet. Even if the boolean is read by multiple mem-read operations at least one of them will yield a value # 0 if the boolean was set at that specific sub-operation which should totally suffice; i.e. if there are four read operations to be done and the forth may read a value # 0 then it should be sufficient that the fourth read is atomic by itself ignoring all other reads and writes except the fourth because booleans are always either zero or one and thus only one byte will matter so that atomic access is ensured. Similarely, what difference on caching will a lock yield? The lock statement is not associated with the value it protects in any way so it can not explicitly flush the cache for the given value. Theoretically it could choose to invalidate all caches (horribly inefficient!). Well; I think we may have caught the point here. Either way I would expect some kind of machine-level reasoning about it. Shouldn`t there be a way to atomically access a word on every kind of machine architecture? Why not introduce anything like ATOMIC(x) := 3; y:= ATMOIC(x); INC(ATOMIC(x),3) which should then yield sth. like LOCK MOV EAX,[EA] LOCK MOV [EA],EAX LOCK ADD/INC [EA], const/ on Intel platforms f.i. and respective machine instructions on other platforms. Isn`t it horribly inefficient having to lock even for a boolean value? Do you think there is any way to achieve ATOMIC(designator) behavior for m3gcc? Am 14.02.2014 um 15:38 schrieb Antony Hosking: > volatile in C is next to useless on multi-processors ? it is only a compiler directive, not a hardware fence of any kind. > > Indeed, a lock statement is needed here (or some other atomic operation). > > On Feb 14, 2014, at 7:32 AM, Elmar Stellnberger wrote: > >> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be required. >> >> Am 13.02.2014 22:51, schrieb Rodney M. Bates: >>> Rd.m3 contains, for example: >>> >>> PROCEDURE Closed (rd: T): BOOLEAN = >>> BEGIN >>> RETURN (rd.closed); >>> END Closed; >>> >>> Most other procedures in Rd lock rd before doing anything. >>> >>> Even though it's only read access, and to a BOOLEAN, is it really true that we can rely >>> on this to work on all targets with neither a lock nor some atomic operation? >>> It seems to me like it should be OK, but I have thought that several times before. >>> only to be shown wrong. Meanwhile, modern hardware keeps adding more complex >>> caching, making these things trickier. >>> >>> >>> >> > From mika at async.caltech.edu Fri Feb 14 19:56:40 2014 From: mika at async.caltech.edu (mika at async.caltech.edu) Date: Fri, 14 Feb 2014 10:56:40 -0800 Subject: [M3devel] readonly access to a BOOLEAN, unprotected? In-Reply-To: <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> References: <52FD4C7D.9030107@lcwb.coop> <52FE0CCB.6060708@elstel.org> <1AA1500D-B77F-41C6-82EA-D188C6E56EB2@purdue.edu> <002A174F-3BE5-4177-B012-1AAC6B83B254@elstel.org> Message-ID: <20140214185640.A9A1B1A2080@async.async.caltech.edu> Yes the unlock I think will have to flush all writes from that processor. No need to flush the entire cache, any reasonable cache system will track which lines are modified and flush only those. Intel processors have a lot of hardware for cache-coherence built in, most of it just happens automatically in the background. On Alpha I think you'd have to insert a Memory Barrier (MB) instruction where the processor releases the lock. The requirements on the compiler will be different from architecture to architecture. Ah there's a nice graphic here: http://en.wikipedia.org/wiki/Memory_ordering Mika Elmar Stellnberger writes: >Sorry, I did not get the point about it yet. >Even if the boolean is read by multiple mem-read operations at least one = >of them will yield a value # 0 if the boolean was set at that specific = >sub-operation which should totally suffice; i.e. if there are four read = >operations to be done and the forth may read a value # 0 then it should = >be sufficient that the fourth read is atomic by itself ignoring all = >other reads and writes except the fourth because booleans are always = >either zero or one and thus only one byte will matter so that atomic = >access is ensured. >Similarely, what difference on caching will a lock yield? >The lock statement is not associated with the value it protects in any = >way so it can not explicitly flush the cache for the given value. = >Theoretically it could choose to invalidate all caches (horribly = >inefficient!). Well; I think we may have caught the point here. Either = >way I would expect some kind of machine-level reasoning about it. > >Shouldn`t there be a way to atomically access a word on every kind of = >machine architecture? >Why not introduce anything like ATOMIC(x) :=3D 3; y:=3D ATMOIC(x); = >INC(ATOMIC(x),3) > which should then yield sth. like >LOCK MOV EAX,[EA] >LOCK MOV [EA],EAX >LOCK ADD/INC [EA], const/ >on Intel platforms f.i. and respective machine instructions on other = >platforms. > >Isn`t it horribly inefficient having to lock even for a boolean value? >Do you think there is any way to achieve ATOMIC(designator) behavior for = >m3gcc? > > >Am 14.02.2014 um 15:38 schrieb Antony Hosking: > >> volatile in C is next to useless on multi-processors =97 it is only a = >compiler directive, not a hardware fence of any kind. >>=20 >> Indeed, a lock statement is needed here (or some other atomic = >operation). >>=20 >> On Feb 14, 2014, at 7:32 AM, Elmar Stellnberger = > wrote: >>=20 >>> Hmm; some <*VOLATILE*> pragma like you have it in C would likely be = >required. >>>=20 >>> Am 13.02.2014 22:51, schrieb Rodney M. Bates: >>>> Rd.m3 contains, for example: >>>>=20 >>>> PROCEDURE Closed (rd: T): BOOLEAN =3D >>>> BEGIN >>>> RETURN (rd.closed); >>>> END Closed; >>>>=20 >>>> Most other procedures in Rd lock rd before doing anything. >>>>=20 >>>> Even though it's only read access, and to a BOOLEAN, is it really = >true that we can rely >>>> on this to work on all targets with neither a lock nor some atomic = >operation? >>>> It seems to me like it should be OK, but I have thought that several = >times before. >>>> only to be shown wrong. Meanwhile, modern hardware keeps adding = >more complex >>>> caching, making these things trickier. >>>>=20 >>>>=20 >>>>=20 >>>=20 >>=20 From dragisha at m3w.org Mon Feb 17 08:51:48 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Mon, 17 Feb 2014 08:51:48 +0100 Subject: [M3devel] Git, a call for participation Message-ID: <06409246-E868-4009-A4B6-335A19E862E2@m3w.org> Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Mon Feb 17 16:24:07 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Mon, 17 Feb 2014 15:24:07 +0000 Subject: [M3devel] Git, a call for participation Message-ID: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Tue Feb 18 00:05:25 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Tue, 18 Feb 2014 00:05:25 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> References: <0BB8FA59C2932741A3A2941A8B9D8BFF925CAB74@ATLEX04-SRV.SCIRES.LOCAL> Message-ID: <0DA0B270-D697-43A9-8DCF-E7BA56EDA6A2@m3w.org> Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: > Dragi?a: > > I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. > > 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? > If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? > > 2. What are the security concerns with installing the GitHub software? > > My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. > > I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. > > Thanks, > Randy Coleburn > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 2:52 AM > To: m3devel > Subject: EXT:[M3devel] Git, a call for participation > > Hi, > > To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. > > TIA, > -- > Dragi?a Duri? > dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Tue Feb 18 01:30:08 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Tue, 18 Feb 2014 00:30:08 +0000 Subject: [M3devel] Git, a call for participation Message-ID: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? I seem to recall providing you with my email earlier for the authors file. I can install TortoiseGit at some point and run a test when you are ready. BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? --Randy From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 6:05 PM To: Coleburn, Randy Cc: m3devel Subject: EXT:Re: [M3devel] Git, a call for participation Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy > wrote: Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Wed Feb 19 08:09:43 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Wed, 19 Feb 2014 08:09:43 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL> Message-ID: Email was for conversion process and it is all set-up. Github account, and request to me (dragisha) on github for cm3 repository is separate step. You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. Sandbox? Meaning virtual machine or? dd On 18 Feb 2014, at 01:30, Coleburn, Randy wrote: > I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? > I seem to recall providing you with my email earlier for the authors file. > I can install TortoiseGit at some point and run a test when you are ready. > BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? > --Randy > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 6:05 PM > To: Coleburn, Randy > Cc: m3devel > Subject: EXT:Re: [M3devel] Git, a call for participation > > Randy, > > You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. > > dd > > On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: > > > Dragi?a: > > I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. > > 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? > If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? > > > 2. What are the security concerns with installing the GitHub software? > > My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. > > I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. > > Thanks, > Randy Coleburn > > From: Dragi?a Duri? [mailto:dragisha at m3w.org] > Sent: Monday, February 17, 2014 2:52 AM > To: m3devel > Subject: EXT:[M3devel] Git, a call for participation > > Hi, > > To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. > > TIA, > -- > Dragi?a Duri? > dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rcolebur at SCIRES.COM Wed Feb 19 18:05:19 2014 From: rcolebur at SCIRES.COM (Coleburn, Randy) Date: Wed, 19 Feb 2014 17:05:19 +0000 Subject: [M3devel] Git, a call for participation In-Reply-To: References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL>, Message-ID: Sorry, I should rephrase the question: Do I need to create a separate folder tree for my local copy of the cm3 source code tree for use with Git, or can I reuse the existing folder tree that I use with CVS? --Randy Coleburn On Feb 19, 2014, at 2:10 AM, "Dragi?a Duri?" > wrote: Email was for conversion process and it is all set-up. Github account, and request to me (dragisha) on github for cm3 repository is separate step. You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. Sandbox? Meaning virtual machine or? dd On 18 Feb 2014, at 01:30, Coleburn, Randy > wrote: I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? I seem to recall providing you with my email earlier for the authors file. I can install TortoiseGit at some point and run a test when you are ready. BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? --Randy From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 6:05 PM To: Coleburn, Randy Cc: m3devel Subject: EXT:Re: [M3devel] Git, a call for participation Randy, You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. dd On 17 Feb 2014, at 16:24, Coleburn, Randy > wrote: Dragi?a: I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? 2. What are the security concerns with installing the GitHub software? My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. Thanks, Randy Coleburn From: Dragi?a Duri? [mailto:dragisha at m3w.org] Sent: Monday, February 17, 2014 2:52 AM To: m3devel Subject: EXT:[M3devel] Git, a call for participation Hi, To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. TIA, -- Dragi?a Duri? dragisha at m3w.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dragisha at m3w.org Wed Feb 19 23:34:18 2014 From: dragisha at m3w.org (=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?=) Date: Wed, 19 Feb 2014 23:34:18 +0100 Subject: [M3devel] Git, a call for participation In-Reply-To: References: <0BB8FA59C2932741A3A2941A8B9D8BFF925D0BFD@ATLEX04-SRV.SCIRES.LOCAL>, Message-ID: <688E1E2E-D298-4FD3-84DD-2F2F60E4D0A6@m3w.org> You will need separate working directory. With git, you will have whole cm3 repository cloned in toplevel .git folder. With svn you have .svn folders around, and CVS folders with cvs. On 19 Feb 2014, at 18:05, Coleburn, Randy wrote: > Sorry, I should rephrase the question: Do I need to create a separate folder tree for my local copy of the cm3 source code tree for use with Git, or can I reuse the existing folder tree that I use with CVS? > > --Randy Coleburn > > On Feb 19, 2014, at 2:10 AM, "Dragi?a Duri?" wrote: > >> Email was for conversion process and it is all set-up. >> >> Github account, and request to me (dragisha) on github for cm3 repository is separate step. >> >> You don?t really need TortoiseGit. Github has it?s GUI shell, but everything is doable just well with Git Bash console. I will share my Git on Windows experience as we progress with migration. >> >> Sandbox? Meaning virtual machine or? >> >> dd >> >> On 18 Feb 2014, at 01:30, Coleburn, Randy wrote: >> >>> I have ssh set up with existing repository. Do I need a different ssh for the Git, or will we use the existing one? >>> I seem to recall providing you with my email earlier for the authors file. >>> I can install TortoiseGit at some point and run a test when you are ready. >>> BTW, do I need to create a separate sandbox for Git, or can I just reuse existing CVS sandbox? >>> --Randy >>> >>> From: Dragi?a Duri? [mailto:dragisha at m3w.org] >>> Sent: Monday, February 17, 2014 6:05 PM >>> To: Coleburn, Randy >>> Cc: m3devel >>> Subject: EXT:Re: [M3devel] Git, a call for participation >>> >>> Randy, >>> >>> You don?t need to install anything on your computer to participate in Github project. If you have ssh enabled, you are ready to go. If not, then problem can be with corporate proxies running NTLM authentication. My company enabled github and bitbucket access without NTLM so I don?t have experience solving it, but I know it is possible. >>> >>> dd >>> >>> On 17 Feb 2014, at 16:24, Coleburn, Randy wrote: >>> >>> >>> Dragi?a: >>> >>> I am not currently a member of GitHub. From what I understand, this site provides some social networking functionality and requires that software supporting this functionality be installed on your computer. >>> >>> 1. Is it possible to take advantage of Git for source code checkin/checkout WITHOUT also becoming a member of GitHub? >>> If so, what, if any, are the limitations of not being a member wrt the future of the CM3 repository? >>> >>> >>> 2. What are the security concerns with installing the GitHub software? >>> >>> My company severely restricts use of social media (it is blocked via the various firewalls), so that may make use of GitHub more difficult in my situation. >>> >>> I think I should be able to use TortoiseGit for source code checkin/out, since I currently use TortoiseCVS; however, I have not used TortoiseGit before, so there will be a slight learning curve for me I?m sure. >>> >>> Thanks, >>> Randy Coleburn >>> >>> From: Dragi?a Duri? [mailto:dragisha at m3w.org] >>> Sent: Monday, February 17, 2014 2:52 AM >>> To: m3devel >>> Subject: EXT:[M3devel] Git, a call for participation >>> >>> Hi, >>> >>> To proceed with planned conversion, I need developers to join github and connect me there (dragisha @ github). Once we have developers connected there, we can proceed and switch. >>> >>> TIA, >>> -- >>> Dragi?a Duri? >>> dragisha at m3w.org >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From rodney_bates at lcwb.coop Thu Feb 27 00:37:42 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 17:37:42 -0600 Subject: [M3devel] Optional full-range Unicode support now merged into the CVS head. Message-ID: <530E7AC6.40004@lcwb.coop> Optional, low-level support for full-range Unicode characters is now merged into the CVS head. By default, WIDECHAR remains 16-bit, as it has been. Enabling the full range requires a manual configuration change and a rebuild of the "front" group of packages. cm3/scripts/README-build-unicode describes the process. cm3/README-unicode describes the changes. The abbreviated summary below can be found in c3/README-unicode-summary. ------------------------------------------------------------------------ CM3 now has low-level support of full-range Unicode characters in the type WIDECHAR. The philosophy is: 1. Use the streams (Rd, Wr) for encoding and decoding variable-length encodings (e.g., UTF-8) of characters. Rd and Wr have been designed from the beginning for primarily sequential access, which variable-length encodings get along with. 2. Expand WIDECHAR to hold any character in the entire Unicode range, in a fixed-size type. This property carries into Arrays of WIDECHAR and TEXTs. These have been designed from the beginning to support random access by character, not fragments thereof, and this property is preserved. Of course, if you really want to, you can still put individual fragments of characters into either, and handle them that way. By default, the compiler is configured to keep WIDECHAR at 16 bits, as before. If you keep it this way and do not do anything to utilize the full Unicode range, everything should work as before. If not, it's a bug. If you configure for Unicode-sized WIDECHAR, but change no code, most things will still work the same. WIDECHAR values in memory will occupy 32 bits. As a result, record/object field layouts obviously can change, and the legality of packed layouts can also change. Low-level code that makes assumptions about memory sizes and layouts can break. Most significantly, the procedures in Wr and Rd that transfer WIDECHAR values (e.g., Rd.GetWideChar) will transfer 32 bits to/from the stream, as well as in memory. If you want to utilize Unicode-sized WIDECHAR, there are some new things waiting for you. The interfaces UniWr and UniRd, in package libunicode, are as similar as reasonable to Wr and Rd, but they perform encoding and decoding. They act as filters on a Wr.T or Rd.T. There are 9 different encodings possible, including the 5 defined in the Unicode standard, the two that older Modula-3 systems use, and two transitional UCS encodings. Character and Text literals have new escapes for the entire code point range. The subtype and assignability rules are relaxed as if CHAR and WIDECHAR were the same base type. Pickles and network objects have a reasonable degree of compatibility between programs compiled with different WIDECHAR sizes. Most library code adapts to different WIDECHAR sizes when compiled. Some functions adapt at runtime, including m3gdb. Only the compiler needs to be configured. These changes provide no support for higher level Unicode functions. The only awareness of specific code points are of the null character, surrogate code points (relevant to the encodings), the end-of-line sequences defined in the Unicode standard, and the Unicode "replacement character", inserted in place of characters that are invalid in one way or another. From jcchu at acm.org Wed Feb 26 18:08:54 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 01:08:54 +0800 Subject: [M3devel] REFANY-keyed tables? Message-ID: Hi, I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? Thanks. ? JC Chu From rodney_bates at lcwb.coop Thu Feb 27 04:28:28 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 21:28:28 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: Message-ID: <530EB0DC.6040809@lcwb.coop> On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > Hmm, can you point out where these are? I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. So the table can only work on a narrower set of allocated object types than REFANY. If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. Rodney Bates > Thanks. > > ? JC Chu > From rodney_bates at lcwb.coop Thu Feb 27 04:35:36 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Wed, 26 Feb 2014 21:35:36 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: Message-ID: <530EB288.4080905@lcwb.coop> Tony, I see that Refany.Equal does not raise an exception, but rather just checks pointer equality. Is it true, as this would require, that parallel GC prevents a mutator from executing this during the period when some but not all of the pointers to a being-moved heap object have been updated? On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > > Thanks. > > ? JC Chu > From jcchu at acm.org Thu Feb 27 05:01:03 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 12:01:03 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530EB0DC.6040809@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> Message-ID: > Hmm, can you point out where these are? See for example . > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. Just out of curiosity, is there any way to lock the GC temporarily? ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Thursday, February 27, 2014 11:28 To: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/26/2014 11:08 AM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > Hmm, can you point out where these are? I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. So the table can only work on a narrower set of allocated object types than REFANY. If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. Rodney Bates > Thanks. > > ? JC Chu > From jcchu at acm.org Thu Feb 27 02:37:09 2014 From: jcchu at acm.org (JC Chu) Date: Thu, 27 Feb 2014 09:37:09 +0800 Subject: [M3devel] REFANY-keyed tables? Message-ID: Refany.Hash() simply raises a Refany.Error, which is marked as fatal. And the comment for it in Refany.i3 does state that it ?causes a checked runtime error?. (Same for Refany.Compare() (rather than Refany.Equal(), as I previously said).) ? JC Chu ________________________________ From: Antony Hosking Sent: ?2/?27/?2014 9:08 To: JC Chu Cc: ^M3DEVEL Subject: Re: [M3devel] REFANY-keyed tables? Sounds like some sort of build error. What is the exception? On Feb 26, 2014, at 12:08 PM, JC Chu wrote: > Hi, > > I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. > > I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? > > Thanks. > > ? JC Chu -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodney_bates at lcwb.coop Thu Feb 27 16:39:56 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 27 Feb 2014 09:39:56 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB0DC.6040809@lcwb.coop> Message-ID: <530F5C4C.7000101@lcwb.coop> I did some grepping for uses of RefIntTbl and found a couple of interesting variations. See, e.g., m3-ui/juno-2/juno-machine/src/JunoRT.m3 and JunoValue.[im]3. First, I was thinking of using a narrower reference type than REFANY, with its own Hash function, to instantiate Tbl. But you can use RefIntTbl and provide a different Hash function another way. Tbl just uses Key.Hash to initialize Default.keyHash. You can use the instantiation with REFANY, then create a subtype of RefIntTbl.Default that overrides Default.keyHash with another hash function. This is probably a bit quicker to code. It can create the false impresssion that the table is keyed by REFANY in its full generality, using Refany.Hash. Second, in this example, the table there can contain a mixture of three different reference types as keys, but they have no common ancestor narrower than REFANY and no common fields. The Hash function in JunoValue just does a TYPECASE on the key and uses different fields of the different objects to compute its hash value. It still won't work on all of REFANY, just the subtypes it explicitly codes for. On 02/26/2014 10:01 PM, JC Chu wrote: >> Hmm, can you point out where these are? > > See for example . Unfortunately, this documentation page gives no clue that the REFANY-keyed tables will have to have an override for their Hash function, unlike the other types. Somewhere, there is an explanation of this, but I don't remember where. BTW, this documentation says the instantiating interfaces (e.g. Refany.i3) can be found in either m3core and libm3. I see they are only in m3core. Could two interfaces with the same name in a link closure have ever linked successfully? Further BTW, does it seem odd that while these type interfaces are in m3core, libm3 has pure renaming interfaces RealType and LongrealType but no others? Just to save some particular favored client code from having to be edited? > >> I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > >> The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. > > Just out of curiosity, is there any way to lock the GC temporarily? > > ? JC Chu > > -----Original Message----- > From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] > Sent: Thursday, February 27, 2014 11:28 > To: m3devel at elegosoft.com > Subject: Re: [M3devel] REFANY-keyed tables? > > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From rodney_bates at lcwb.coop Thu Feb 27 18:54:13 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Thu, 27 Feb 2014 11:54:13 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB0DC.6040809@lcwb.coop> Message-ID: <530F7BC5.4030409@lcwb.coop> On 02/26/2014 10:01 PM, JC Chu wrote: >> Hmm, can you point out where these are? > > See for example . > >> I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > The keys are indeed objects that require explicit initialization. Thanks for the suggestion. > >> The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. > > Just out of curiosity, is there any way to lock the GC temporarily? Look in cm3/m3-libs/m3core/src/runtime/common/RTCollector.i3. There are various procedures you can call at runtime to [dis|en]able different collection strategies or stop collection altogether, with performance consequences, obviously. For example, DisableMotion will prevent moving any heap objects. If you did this, you really could use a REFANY directly as a hash code in a Ref*Tbl. You would still have to provide a different Hash function that actually did this, instead of just excepting. (Can "except" be verbed? Some say any word can be verbed.) > > ? JC Chu > > -----Original Message----- > From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] > Sent: Thursday, February 27, 2014 11:28 > To: m3devel at elegosoft.com > Subject: Re: [M3devel] REFANY-keyed tables? > > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move a heap object and adjust all the pointers to it, if it knows where they all are, which holds for some objects. So the bit contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every object an object sequence number field, explicitly initialized when an object is allocated, and using that for the Hash function. But this won't work for REFANY, because it can have no fields. > > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can still do that with a hierarchy of OBJECT types, but they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) variables, but it is carefully arranged that they all have an allocated type that has fields a Hash function can work on. Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From hendrik at topoi.pooq.com Thu Feb 27 20:56:12 2014 From: hendrik at topoi.pooq.com (Hendrik Boom) Date: Thu, 27 Feb 2014 14:56:12 -0500 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530F7BC5.4030409@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> Message-ID: <20140227195611.GA29137@topoi.pooq.com> On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: > (Can "except" be verbed? Some say any word can be verbed.) Peter Naur said it, "In English, any noun can be verbed." But "except" is already a verb. -- hendrik From hendrik at topoi.pooq.com Thu Feb 27 21:09:40 2014 From: hendrik at topoi.pooq.com (Hendrik Boom) Date: Thu, 27 Feb 2014 15:09:40 -0500 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <20140227195611.GA29137@topoi.pooq.com> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> <20140227195611.GA29137@topoi.pooq.com> Message-ID: <20140227200940.GC29137@topoi.pooq.com> On Thu, Feb 27, 2014 at 02:56:12PM -0500, Hendrik Boom wrote: > On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: > > > (Can "except" be verbed? Some say any word can be verbed.) > > Peter Naur said it, "In English, any noun can be verbed." > > But "except" is already a verb. But I suspect it may have a different meaning: verbformal 1. specify as not included in a category or group; exclude. "he excepted from his criticism a handful of distinguished writers" synonyms: exclude, omit, leave out, count out, disregard; exempt "lawyers are all crooks, present company excepted" -- hendrik From rodney_bates at lcwb.coop Fri Feb 28 16:04:49 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:04:49 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <20140227200940.GC29137@topoi.pooq.com> References: <530EB0DC.6040809@lcwb.coop> <530F7BC5.4030409@lcwb.coop> <20140227195611.GA29137@topoi.pooq.com> <20140227200940.GC29137@topoi.pooq.com> Message-ID: <5310A591.5070909@lcwb.coop> Yeah, I thought about the different meaning. I suppose I could have verbed "exception", giving "instead of just exceptioning", but that would have been more than even I can stomach. On 02/27/2014 02:09 PM, Hendrik Boom wrote: > On Thu, Feb 27, 2014 at 02:56:12PM -0500, Hendrik Boom wrote: >> On Thu, Feb 27, 2014 at 11:54:13AM -0600, Rodney M. Bates wrote: >> >>> (Can "except" be verbed? Some say any word can be verbed.) >> >> Peter Naur said it, "In English, any noun can be verbed." >> >> But "except" is already a verb. > > But I suspect it may have a different meaning: > > verbformal > 1. > specify as not included in a category or group; exclude. > "he excepted from his criticism a handful of distinguished writers" > synonyms: exclude, omit, leave out, count out, disregard; exempt > "lawyers are all crooks, present company excepted" > > -- hendrik > From rodney_bates at lcwb.coop Fri Feb 28 16:10:52 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:10:52 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: References: <530EB288.4080905@lcwb.coop> Message-ID: <5310A6FC.6020202@lcwb.coop> On 02/27/2014 02:07 PM, Antony Hosking wrote: > [Your prior e-mail is a great description of why REFANY does not have a hash, and hence why Refany.T raises an exception for Refany.Hash. Short answer is there is nothing about a REFANY that can conceivably be used as a hash. We could choose to implement an invariant hash code for REFANY, much as Java does for Object, but it would impose a space cost to store the hash.] > > In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. == in Java is much the same. A copying collector implementation can use a number of techniques to ensure this, but in our case pointer equality is sufficient because the mostly-copying collector does not move heap objects that are referenced from the stacks. Thus, while the REFANY = operation is being performed neither target will move and pointer equality suffices. > OK, that makes sense. But then what about this code: IF P^.link = Q^.link ... getting executed after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? (And assuming no stack pointers equal to P^.link exist, or it wouldn't happen.) > On Feb 26, 2014, at 10:35 PM, Rodney M. Bates wrote: > >> Tony, I see that Refany.Equal does not raise an exception, but rather just checks >> pointer equality. Is it true, as this would require, that parallel GC prevents >> a mutator from executing this during the period when some but not all of the >> pointers to a being-moved heap object have been updated? >> >> On 02/26/2014 11:08 AM, JC Chu wrote: >>> Hi, >>> >>> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >>> >>> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >>> >>> Thanks. >>> >>> ? JC Chu >>> >> > > From rodney_bates at lcwb.coop Fri Feb 28 16:15:55 2014 From: rodney_bates at lcwb.coop (Rodney M. Bates) Date: Fri, 28 Feb 2014 09:15:55 -0600 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <530EB0DC.6040809@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> Message-ID: <5310A82B.1040702@lcwb.coop> On 02/26/2014 09:28 PM, Rodney M. Bates wrote: > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which means it can move > a heap object and adjust all the pointers to it, if it knows where they all are, > which holds for some objects. So the bit contents of a REFANY can change. This > means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to prevent a far > more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving every > object an object sequence number field, explicitly initialized when an object > is allocated, and using that for the Hash function. But this won't work for > REFANY, because it can have no fields. > There is more to this. The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. But in many cases, you might want to hash on the contents, not the address of the object, in which case, the technique used in juno-2, using actual data fields instead of an object sequence number is the right way. For example, to turn the objects into atoms. > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different types, you can > still do that with a hierarchy of OBJECT types, but they will have to have a common > supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed (statically) > variables, but it is carefully arranged that they all have an allocated type > that has fields a Hash function can work on. Hash would then have to do a > NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > > From jcchu at acm.org Fri Feb 28 18:40:55 2014 From: jcchu at acm.org (JC Chu) Date: Sat, 1 Mar 2014 01:40:55 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <5310A6FC.6020202@lcwb.coop> References: <530EB288.4080905@lcwb.coop> <5310A6FC.6020202@lcwb.coop> Message-ID: >> In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. > ... after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? ... ... So do we actually have that for r1, r2: REFANY, r1 = r2 # NIL implies r1^ = r2^? I was hoping that at least REFANY-valued lists would still be safe to use.... ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Friday, February 28, 2014 23:11 To: Antony Hosking Cc: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/27/2014 02:07 PM, Antony Hosking wrote: > [Your prior e-mail is a great description of why REFANY does not have > a hash, and hence why Refany.T raises an exception for Refany.Hash. > Short answer is there is nothing about a REFANY that can conceivably > be used as a hash. We could choose to implement an invariant hash > code for REFANY, much as Java does for Object, but it would impose a > space cost to store the hash.] > > In general, the implementation of REFANY = would have to work whether a concurrent copying collector is being used or not. == in Java is much the same. A copying collector implementation can use a number of techniques to ensure this, but in our case pointer equality is sufficient because the mostly-copying collector does not move heap objects that are referenced from the stacks. Thus, while the REFANY = operation is being performed neither target will move and pointer equality suffices. > OK, that makes sense. But then what about this code: IF P^.link = Q^.link ... getting executed after the collector has moved P^.link^ and updated P^.link but hasn't yet updated Q^.link? (And assuming no stack pointers equal to P^.link exist, or it wouldn't happen.) > On Feb 26, 2014, at 10:35 PM, Rodney M. Bates wrote: > >> Tony, I see that Refany.Equal does not raise an exception, but rather >> just checks pointer equality. Is it true, as this would require, >> that parallel GC prevents a mutator from executing this during the >> period when some but not all of the pointers to a being-moved heap object have been updated? >> >> On 02/26/2014 11:08 AM, JC Chu wrote: >>> Hi, >>> >>> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >>> >>> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >>> >>> Thanks. >>> >>> ? JC Chu >>> >> > > From jcchu at acm.org Fri Feb 28 18:40:58 2014 From: jcchu at acm.org (JC Chu) Date: Sat, 1 Mar 2014 01:40:58 +0800 Subject: [M3devel] REFANY-keyed tables? In-Reply-To: <5310A82B.1040702@lcwb.coop> References: <530EB0DC.6040809@lcwb.coop> <5310A82B.1040702@lcwb.coop> Message-ID: > ... The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. Yes, I was indeed in need of an immutable version of REFANY. ? JC Chu -----Original Message----- From: Rodney M. Bates [mailto:rodney_bates at lcwb.coop] Sent: Friday, February 28, 2014 23:16 To: m3devel at elegosoft.com Subject: Re: [M3devel] REFANY-keyed tables? On 02/26/2014 09:28 PM, Rodney M. Bates wrote: > > > On 02/26/2014 11:08 AM, JC Chu wrote: >> Hi, >> >> I need a REFANY-to-INTEGER table in my program but RefIntTbl.Default is giving me runtime errors. Apparently Table(Key, Value) uses Key.Equal() and Key.Hash(), but those procedures in Refany, which is use to instantiate RefIntTbl, both raise a fatal exception. >> > > The garbage collector is a (partially) compacting collector, which > means it can move a heap object and adjust all the pointers to it, if > it knows where they all are, which holds for some objects. So the bit > contents of a REFANY can change. This means it is not possible to have a consistent Hash on the pointer value alone. > > So Refany.Hash is deliberately coded to raise this exception, to > prevent a far more insidious bug. > >> I?m a bit confused since a number of REFANY-keyed tables are shipped with CM3. Is this actually the expected behavior or am I doing anything wrong? >> > > Hmm, can you point out where these are? > > I have some pointer-keyed tables, but they use techniques like giving > every object an object sequence number field, explicitly initialized > when an object is allocated, and using that for the Hash function. > But this won't work for REFANY, because it can have no fields. > There is more to this. The above technique works if you really want to simulate keying on the address (as it would be in a no-move GC environment.), which I suppose is what you wanted. But in many cases, you might want to hash on the contents, not the address of the object, in which case, the technique used in juno-2, using actual data fields instead of an object sequence number is the right way. For example, to turn the objects into atoms. > So the table can only work on a narrower set of allocated object types than REFANY. > If you need the table to hold addresses of a mixture of different > types, you can still do that with a hierarchy of OBJECT types, but > they will have to have a common supertype that contains whatever fields the Hash function needs for consistency. > > It would be possible that pointers get passed around in REFANY-typed > (statically) variables, but it is carefully arranged that they all > have an allocated type that has fields a Hash function can work on. > Hash would then have to do a NARROW or TYPECASE to the type it expected. > > Rodney Bates > >> Thanks. >> >> ? JC Chu >> > >