<div>Hi!</div><div> </div><div> </div><div>} WSL anyway.</div><div> </div><div>WSL doesn't include in ReactOs, Windows Server 2019 and Windows Server 2016.</div><div><div><div>May be exist in Windows Server 2022 "Insider"/Beta version.</div><div> </div></div></div><div> </div><div>} I see little point in Cygwin now</div><div> </div><div> And Cygwin is useful as environment for testing M3.</div><div> </div><div>Best regards, Victor Miasnikov</div><div> </div><div>P.S.</div><div> </div><div>} '/' might work in notepad or on the command line etc.</div><div> </div><div>I known -), an even often use it.</div><div> </div><div> </div><div>15.03.2021, 11:51, "Jay K" <jayk123@hotmail.com>:</div><blockquote><div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"><span style="background-color:#ffffff;color:#201f1e;font-size:15px"> > Q: Cygwin is Posix?</span></div><div><div> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">I think so.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">The difference is mainly this exact line in several m3makefiles:</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">include_dir (OS_TYPE)</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">So then using open/read/write/close vs. CreateFile/ReadFile/WriteFile/CloseHandle.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">And pthreads vs. Win32 threads (which can probably be unified, if you drop pre-Vista support).</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">And look for "OnUnix" throughout the tree, which is mainly about chosing '/' or '\\', even though Win32 supports '/' just fine.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">So it is a mostly pointless distinction.<br />Except, if you print the paths, like in errors, '/' might work in notepad or on the command line etc.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">Because too much code does too much path manipulation and does it incorrectly.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">Win32 CreateFile et. al. support '/'. It is layers above it that sometimes break it.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"><span style="font-size:12pt;margin:0px">The problem with Cygwin in my experience is the noticably slow fork.</span></div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">The Interix port was noticably much faster. But these days, WSL anyway. I see little point in Cygwin now.<div style="font-size:12pt;margin:0px"> </div></div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> - Jay</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><hr style="width:98%" /><div><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><strong>From:</strong> M3devel <<a href="mailto:m3devel-bounces@elegosoft.com" rel="noopener noreferrer">m3devel-bounces@elegosoft.com</a>> on behalf of Jay K <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer">jayk123@hotmail.com</a>><br /><strong>Sent:</strong> Monday, March 15, 2021 8:41 AM<br /><strong>To:</strong> <a href="mailto:vvm@tut.by" rel="noopener noreferrer">vvm@tut.by</a> <<a href="mailto:vvm@tut.by" rel="noopener noreferrer">vvm@tut.by</a>>; m3devel <<a href="mailto:m3devel@elegosoft.com" rel="noopener noreferrer">m3devel@elegosoft.com</a>><br /><strong>Subject:</strong> Re: [M3devel] Compiler.ThisOS, Endian, Platform?</font><div> </div></div><div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">I didn't say unicode is unimportant.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">Though, really, it probably is. UTF8 has gained large traction.</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"><span style="color:#000000;font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">I just mean, there are few users, so maybe changing things, and keeping things working, isn't difficult.</span></div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> - Jay</div><div><div> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><hr style="width:98%" /><div><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><strong>From:</strong> <a href="mailto:vvm@tut.by" rel="noopener noreferrer">vvm@tut.by</a> <<a href="mailto:vvm@tut.by" rel="noopener noreferrer">vvm@tut.by</a>><br /><strong>Sent:</strong> Monday, March 15, 2021 8:29 AM<br /><strong>To:</strong> Jay K <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer">jayk123@hotmail.com</a>>; m3devel <<a href="mailto:m3devel@elegosoft.com" rel="noopener noreferrer">m3devel@elegosoft.com</a>><br /><strong>Subject:</strong> Re: [M3devel] Compiler.ThisOS, Endian, Platform?</font><div> </div></div><div><div><div>Hi!</div><div> </div><div> </div><div><span style="background-color:#ffffff;color:#000000;float:none;font-family:'calibri' , 'helvetica' , sans-serif;font-size:16px;font-style:normal;font-weight:400;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">} To repeat, it is more about const vs. var, than C vs. Modula-3.</span></div></div><div> </div><div>I hope...</div><div> </div><div><div>}git grep ThisEndian</div><div>} Used very little -- libunicode</div></div><div> </div><div>libunicode is very important.</div><div> </div><div> </div><div><div>VVM}} Exist preprocessor write on Modula-2 ( i.e. we can convert it by m2tom3) for language with (* *) style comments.</div></div><div><div>} Modula-3 doesn't have a preprocessor (...)</div><div>} But in the unlikely case that there was some decision to add a preprocessor</div></div><div> </div><div> Ok, may be implement "D language" "ifdef style"?</div><div> </div><div> </div><div>Best regards, Victor Miasnikov</div><div> </div><div> </div><div>15.03.2021, 11:13, "Jay K" <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer">jayk123@hotmail.com</a>>:</div><blockquote><div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">The dependency on C is..I tried to explain it earlier... there were two reasons:</div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"><ol><li>The better one: avoid rewriting /usr/include</li></ol><ol><li>Build system machinations. That is the case here..but not even that really.</li></ol><div>I produce these "bootstrap C" archives.</div><div>They consist mostly of Modula-3 compiled to C.</div><div>But for any actual C in the system, the files are just copied. That is an ancient functionality. I noticed, and leverage profitably.</div><div>Then, on the eventual host system, you compile there.</div><div>The C is ifdefed. Or it includes /usr/include. Either way, the point is to defer resolution to the eventual host system.</div><div> </div><div>I am actually a bit fan of the C preprocessor.<br />I recognize its effects on the language, in that it interweaves a separate scopeless language, and it slows things down.</div><div>It is a kinda horrible, but it is also very useful both for macros and conditional compilation.</div><div>Conditional compilation, sometimes, not always, is "better" than separate source files.</div><div><span style="background-color:#ffffff;margin:0px">(Part of the horribleness is that to learn C and C++ you also have to learn this other unrelated language.)</span></div><div> </div><div>But, point being, when I bring these things up, everyone kinda gets upset.</div><div>Modula-3 doesn't have a preprocessor people like it that way. I do see the advantages, and the disadvantages.</div><div>Some of the disadvantages are mitigated by Quake.</div><div>But not all.</div><div>But in the unlikely case that there was some decision to add a preprocessor, it'd have to be designed and implemented.</div><div>All three are unlikely.</div><div> </div><div>So that is why I do that.</div><div> </div><div>But it isn't just C. It is about constant vs. variable.</div><div>You can also detect endian at runtime in Modula-3 with loophole.</div><div>Changing these to runtime checks in Modula-3 is also ok.</div><div>For example you could also get the environment variable $OS and if it is Windows_NT then you are on Win32, otherwise Unix.</div><div> A little gross, but ok?</div><div> </div><div>ThisEndian is used very little, but at first glance, the code does want a constant. Unless maybe I can ripple through a const to var change there. Sometimes const is just convenient and efficient, sometimes it is required. (Notice how I changed all the errno values from const to var, so I converted case statements to if/else if ladders, less efficient but probably good enough.)</div><div> </div><div>To repeat, it is more about const vs. var, than C vs. Modula-3.</div><div> </div><div> - Jay</div><div> </div></div><div><div> </div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt"> </div><hr style="width:98%" /><div><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><strong>From:</strong> <a href="mailto:vvm@tut.by" rel="noopener noreferrer">vvm@tut.by</a> <<a href="mailto:vvm@tut.by" rel="noopener noreferrer">vvm@tut.by</a>><br /><strong>Sent:</strong> Monday, March 15, 2021 7:58 AM<br /><strong>To:</strong> Jay K <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer">jayk123@hotmail.com</a>>; m3devel <<a href="mailto:m3devel@elegosoft.com" rel="noopener noreferrer">m3devel@elegosoft.com</a>><br /><strong>Subject:</strong> Re: [M3devel] Compiler.ThisOS, Endian, Platform?</font><div> </div></div><div><div>Hi!</div><div> </div><div> </div><div>} <span style="background-color:#ffffff;color:#000000;float:none;font-family:'calibri' , 'helvetica' , sans-serif;font-size:16px;font-style:normal;font-weight:400;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> Used quite a bit. There are two values: Win32 and Posix.</span></div><div> </div><div>Q: Cygwin is Posix?</div><div> </div><div> </div><div>}  Move (...) to C under #ifdef _WIN32</div><div> </div><div> Again we depends "C language"...</div><div> </div><div>Exist preprocessor write on Modila-2 ( i.e. we can convert it by m2tom3) for language with (* *) style comments.</div><div> </div><div>If need "ifdef" then we can use this preprocessor/</div><div> </div><div> </div><div>Best regards, Victor Miasnikov</div><div> </div><div> </div><div> </div><div>15.03.2021, 10:47, "Jay K" <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer">jayk123@hotmail.com</a>>:</div><blockquote><div><div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">The following are "problematic".<div> </div><div>By "problematic", I mean, they cause otherwise identical C backend output to vary.</div><div> </div><div>git grep ThisPlatform</div><div> Not used at all (within Critical Mass). And the worst of them, because it is different</div><div> for every system.</div><div> </div><div>git grep ThisOS</div><div>  Used quite a bit. There are two values: Win32 and Posix.</div><div> </div><div>git grep ThisEndian</div><div> Used very little -- libunicode and ordsets, that is all.</div><div> ordsets because pickles.</div><div> </div><div>I propose:</div><div> Remove ThisPlatform.</div><div> Move ThisOS to C under #ifdef _WIN32</div><div> Move ThisEndian to C under a runtime check.</div><div> </div><div>I understand, constant propagation would be lost.</div><div> </div><div>Oh, actually, ThisEndian's const-ness is heavily used by its few users.</div><div>So maybe leave that alone for now.</div><div> </div><div>ThisOS I think can be made a function call easily enough.</div><div>Or a variable that initialized early.</div><div> </div><div>It is true that Endian and OS are factors that are somewhat rampant in the system and fixing these instances is not enough to collapse the matrix.</div><div> </div><div>But ThisPlatform is trivial. It expands the matrix by n and isn't used at all.</div><div> </div><div>Thank you,</div>  - Jay</div></div>,<p style="margin-bottom:0;margin-top:0">_______________________________________________<br />M3devel mailing list<br /><a href="mailto:M3devel@elegosoft.com" rel="noopener noreferrer">M3devel@elegosoft.com</a><br /><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fm3lists.elegosoft.com%2Fmailman%2Flistinfo%2Fm3devel&data=04%7C01%7C%7Cd9f066a315334ebc6f0d08d8e78e37e8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637513945500255175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=YDmxnskHYT7LvuhdJiboi2hlzArDwFmHi1DS0lrGfnE%3D&reserved=0" rel="noopener noreferrer">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a></p></blockquote></div></div></div></blockquote></div></div></div></div></div></blockquote>