Recent

Author Topic: Well-aged Online Information (it's not wine!)  (Read 3808 times)

Warfley

  • Hero Member
  • *****
  • Posts: 1851
Re: Well-aged Online Information (it's not wine!)
« Reply #30 on: November 15, 2024, 12:54:41 am »
It is similar to the situation of a man whose roof is leaking, and instead of fixing it (which may be time-consuming, expensive and exhausting), he puts a bucket or a tub under it to collect the water that pours in during the rain. And he does it only because he is lazy, has no idea how to fix it and does not want to devote his own strength to the work (for himself, by the way).
I would use a very different analogy, because the issue with the preprocessor is that it is way to powerful (it's turing complete after all and can do string manipulation). So it's more like if you have a leaky roof but instead of fixing it, whenever it rains you shoot rockets into the sky to dispurse the clouds through the explosions

As I wrote above, at the end of the 1990s everyone was aware that it was simply crap and they should stop using it and start solving this problem properly. But the sentiments for the "golden days of ..ix" won. And today we still have shitty OSes. And the fact that they are free does not improve the situation in any way.

Just because certain solutions were good at one time (or seemed so at the time) doesn't mean that they should still be used. From old technologies: ladder wagons, horse-drawn carriages, wooden tubs and forest huts still work. But somehow people (apart from single freaks) are not thrilled with them and do not want to use them. They prefer newer solutions.

There would be no MacOS, Linux, and iOS, but there would be something different. It's possible it would be something much better. Nature (the world) does not tolerate a vacuum.
I mean it's not like there are no alternatives. Microsoft went into the totally different direction, instead of having one unified format and buildprocess that can be used by any language, with object files that are linked together by a liker, Microsoft chose that every language should have their own buildsystem to create PE executables.

And now after 30 years of NT kernel and 60 years of Unix we clearly see that *nix like systems are generally prefered for development. Sure windows has won in many other markets, but when it comes to developing applications, *nix systems are preferred. Pretty much all buildsystems today are *nix first windows second. Often relying on tools developed for *nix systems ported to windows (often through cygwin or mingw).

The reason it is so good and has stood the test of time, is because it is so generic. Can you design a better system for a language? Yes definitely, most languages have a better build system. But can you design a system that is better independent of a language? That turns out to be really hard.
And again, the thing that C allows is not just to build C applications, it allows you to write an application in which some parts are written in C, others in Pascal, others in Rust, etc. and they can all work together as one binary seemlesly to the end user

domasz

  • Hero Member
  • *****
  • Posts: 554
Re: Well-aged Online Information (it's not wine!)
« Reply #31 on: November 15, 2024, 10:55:26 pm »
Sorry but C/C++ are a joke. They aren't even standardized properly.
I can compile most Turbo Pascal code under Delphi and Free Pascal because of standards.
I cannot compile Visual C++ apps under Borland C++ or Borland C++ under GCC on Linux. Without complicated makefiles you can't compile anything while with delphi/tp/fpc you just click Compile and get a binary.

Warfley

  • Hero Member
  • *****
  • Posts: 1851
Re: Well-aged Online Information (it's not wine!)
« Reply #32 on: November 15, 2024, 11:36:34 pm »
It's the exact opposite, C and C++ are standardized by the ISO, while (Object-) Pascal isn't, but due to the more or less monopoly that Borland and now embarcadero has on the language it's what is often called a quasi standard, like java.

The reason you observe that behavior is exactly because of that. The C and C++ standard, because it's standardized by committee, is basically just what all members of the committee could agree to. Each Compiler vendor then adds additional features on top of that.
If you actually restrict yourself to strictly following the ISO C standard, your code will run basically identical on all major compilers. If you rely on Compiler specific features, it will only work on that Compiler.

In Pascal it's different, here the reason why your tp code works in tp, Delphi and FPC is simply because tp and Delphi are made by the same company, and FPC is quite strictly following compatibility.
That said not all is compatible. First there are some divergence both in language (e.g. inline vars) but also in RTL. Additionally Delphi is not even the native mode to the FPC and in mode FPC or ObjFPC, the language is quite different.

But in the end it's just a private decision by the FPC development team to what degree to follow Delphi compatibility and to what degree they won't. There is no standard, no standardization committee, etc.

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 576
Re: Well-aged Online Information (it's not wine!)
« Reply #33 on: November 16, 2024, 12:26:59 am »
To bore everyone with the "how old is too old" question again, I've spent the past few days exploring alternative ways to implement inter-process communications using sockets.  There are quite a few different ways to approach this, in the fcl, the rtl, using packages like synapse, indy, INet, SImpleIPC, using shared memory -- and others. 

The range of advice one finds on the forum about which approach to use is all over the map.  X is depreciated, use Y:  Y has bugs and memory leaks, Z is good but not cross platform...  etc..  And there is not much if any documentation on any of the alternatives although there are many examples to start from (most I've tried work with limitations and reservations).

Anyway -- fun to note that "fsocket" in fcl-net is dated 2003! 

Warfley

  • Hero Member
  • *****
  • Posts: 1851
Re: Well-aged Online Information (it's not wine!)
« Reply #34 on: November 16, 2024, 01:22:21 am »
Yes FCL net is quite an interesting bit. There are a lot of things in there like netdb httpsvt, or fpsock (which I guess you meant with fsocket), etc. Which seem like there was the idea for something but never really got anywhere, while other things like ssockets or sslsockets are useful even though still lacking.

But I mean such things are to expected, if you look at the contributed units on the website, you see that there are a lot of units contributed by different people over time

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 576
Re: Well-aged Online Information (it's not wine!)
« Reply #35 on: November 16, 2024, 02:53:35 am »
Yes,  sorry:  fsock.  And no doubt there are people out there that have mastered and are still using it.

One day, somebody needs to write a history of the open source phenomenon.  It has aspects that are I suspect unique in the story of our species. 

PascalDragon

  • Hero Member
  • *****
  • Posts: 5811
  • Compiler Developer
Re: Well-aged Online Information (it's not wine!)
« Reply #36 on: November 16, 2024, 02:12:07 pm »
I mean it's not like there are no alternatives. Microsoft went into the totally different direction, instead of having one unified format and buildprocess that can be used by any language, with object files that are linked together by a liker, Microsoft chose that every language should have their own buildsystem to create PE executables.

No one is stopping compiler developers to use MSVC's masm and link. In fact FPC can even use masm (though not link). Everything on Windows is PE/COFF after all.

Sorry but C/C++ are a joke. They aren't even standardized properly.
I can compile most Turbo Pascal code under Delphi and Free Pascal because of standards.

As Warfley already wrote: C and C++ are both standardized. The Pascal dialects understood by TP, Delphi and FPC (with the exception of FPC's support for ISO Pascal) are not standardized.

I cannot compile Visual C++ apps under Borland C++ or Borland C++ under GCC on Linux. Without complicated makefiles you can't compile anything while with delphi/tp/fpc you just click Compile and get a binary.

C and C++ are simply designed in a different way, namely that the compilation modules are independant of each other and due to the headers every source essentially contains all required information and thus it's the job of the build system (which is not part of the language specification) to get it all together. (Object) Pascal simply has a module system that is part of the language (and C++ is getting there as well with module support).

VisualLab

  • Hero Member
  • *****
  • Posts: 614
Re: Well-aged Online Information (it's not wine!)
« Reply #37 on: November 17, 2024, 01:51:28 am »
It's the exact opposite, C and C++ are standardized by the ISO, while (Object-) Pascal isn't, but due to the more or less monopoly that Borland and now embarcadero has on the language it's what is often called a quasi standard, like java.


The reason you observe that behavior is exactly because of that. The C and C++ standard, because it's standardized by committee, is basically just what all members of the committee could agree to. Each Compiler vendor then adds additional features on top of that.
If you actually restrict yourself to strictly following the ISO C standard, your code will run basically identical on all major compilers. If you rely on Compiler specific features, it will only work on that Compiler.

In Pascal it's different, here the reason why your tp code works in tp, Delphi and FPC is simply because tp and Delphi are made by the same company, and FPC is quite strictly following compatibility.
That said not all is compatible. First there are some divergence both in language (e.g. inline vars) but also in RTL. Additionally Delphi is not even the native mode to the FPC and in mode FPC or ObjFPC, the language is quite different.

Yes, you are right, from the point of view of formalism C and C++ are standardized. And Pascal and Object Pascal are not standardized. I.e. more specifically, there is no committee for Pascal and Object Pascal. However, practice shows something else. Apparently this standardization of C and C++ works, but there are many exceptions in the operation of these compilers.

The standardization of programming languages ​​is a bit like the standardization of quality control, health and safety or information security in companies (e.g. ISO 9000, ISO 18000 or ISO 27000). In reality, however, these aforementioned "papers" are a collection of "wishful thinking", a conglomeration of generalities, high-flown phrases, smart-aleck recommendations, and various corporate gibberish. Real standards are strict. For example, those concerning industrial equipment and infrastructure (threads, pipe flanges, electrical insulation, etc.) or those concerning the performance of industrial physicochemical measurements (determining acid number, determining kinematic viscosity, etc.). Such standards have a narrowly and strictly defined subject of standardization. They describe each element in detail. Meanwhile, programming language is too broad, complex and incredibly extensive a subject.

In practice, to maintain strict control over the development of the language, sometimes it works better when there is a single entity setting the rules of the game (unless it suffers from schizophrenia). These smaller entities then have no choice but to comply or disappear. But there are exceptions, e.g. C# or Swift. Although C# probably has a more stable specification than Swift. On the other hand, decision-makers at Apple have no qualms about changing the rules of the game every now and then, and in many different matters (corporate schizophrenia?). Either way, the problem, as usual, is people who don't want to cooperate with each other, but everyone wants to show how important and smart they are. But this is a non-IT topic, so I will take a break here.

But in the end it's just a private decision by the FPC development team to what degree to follow Delphi compatibility and to what degree they won't. There is no standard, no standardization committee, etc.

Why isn't there? The FPC programming team is a committee :) Does it need to have the "anointing" of corporate CEOs, like the C++ committee? Luckily for us, no :)
« Last Edit: November 17, 2024, 01:55:40 am by VisualLab »

Warfley

  • Hero Member
  • *****
  • Posts: 1851
Re: Well-aged Online Information (it's not wine!)
« Reply #38 on: November 17, 2024, 05:14:22 pm »
Yes, you are right, from the point of view of formalism C and C++ are standardized. And Pascal and Object Pascal are not standardized. I.e. more specifically, there is no committee for Pascal and Object Pascal. However, practice shows something else. Apparently this standardization of C and C++ works, but there are many exceptions in the operation of these compilers.
I can only disagree. While I don't work with C and C++ anymore (aside from a few side projects), I used both languages very intensively for quite some time. And while it's true that some parts of the standard tend to not be adopted (C++ had multiple approaches for modules), in general if you write ISO compliant C and C++ code it works identical on all major compilers.

The problem is neither the standard noch the compilers. The problem is that a lot of C and C++ developers specifically work outside the standard. For example, the C standard says that int is a signed type with at least 15 significant bits and long at least having 31 (31 significant bits in going from -2^31..2^31). In practice it's very compiler and target dependent. On many 32 bit systems and compilers both are 32 bit, but on 64 bit systems often int is 32 bit and long 64.
The problem now is if you have programmers writing code assuming that int is 32 bit and long is 64 bit, then you port this to another compiler and it breaks. But thats not the fault of the compiler or standard, the standard specifies the type int32_t and so on, which guarantee to be 2nd complement with an exact bit number. So the actual problem is that many programmers rather write "int" than "int32_t" and then wonder why it breaks on porting to another system.

If you are writing ISO compliant C, your code will run identical on GCC, Clang, MSVC, Intel C, Boarland C++, etc. It's just that a lot of C developers don't know the standard very well.

In practice, to maintain strict control over the development of the language, sometimes it works better when there is a single entity setting the rules of the game (unless it suffers from schizophrenia). These smaller entities then have no choice but to comply or disappear. But there are exceptions, e.g. C# or Swift. Although C# probably has a more stable specification than Swift. On the other hand, decision-makers at Apple have no qualms about changing the rules of the game every now and then, and in many different matters (corporate schizophrenia?). Either way, the problem, as usual, is people who don't want to cooperate with each other, but everyone wants to show how important and smart they are. But this is a non-IT topic, so I will take a break here.
I mean it generally depends. Languages like C# and Swift work well because the company that makes these decisions also takes the effort to make it attractive. Swift while being a really good language, is only really a thing because it's the native language for iOS and MacOS. Without that probably no one would use it. Similarly Microsoft put C# with .Net, ASP and also their contracts with Unity, into a very good position.
If you want an example of where this didn't work well, you can look at the very same companies. Besides Swift Apple first developed Objective C, and everyone hated it. And Microsoft besides C# introduced VB.Net.

Why isn't there? The FPC programming team is a committee :) Does it need to have the "anointing" of corporate CEOs, like the C++ committee? Luckily for us, no :)
Well the thing about Standardization organizations is that they are open to anyone and work transparently. For example if I want to contribute to an ISO standard, joining the ISO working groups, while being annoying, is not very difficult. All you need to do is to join your national Standardization Organization, so for me here in Germany it would be the DIN, which granted is tailored towards companies and costs like a Thousand euros per year, so it's not really free, but this is literally the only payment you have to do and it's fixed.
From that point onwards a lot of beurocracy has to be done, with different roles and positions. The first step is to join the national mirror working group. Basically whenever the ISO makes a new proposal, it is sent to all the UN member state standardization organizations, where the mirror working groups can then have an internal vote and this vote is then given to the ISO committee. So taking my example I would be then as a member of DIN get to vote for the opinion that DIN/Germany would hand in at the ISO.
As part of this vote the member states can elect delegates which will then become members of the working group. Besides the national delegates theres also the option to get chosen as independent expert. Once you're in there you can take part in the comittee work, if you want to take the role of editor or other special roles you can apply for that in the comittee work.
Lastly once the draft is finalized it will again be given to the national SDOs to get the final vote. Meaning no matter if you get delegated or anything, as long as you become a member in your national SDO you will have a vote.
I myself am for my work right now in this process of getting into certain standardization working group, and while it's a beurocratic pain that takes many months, it is quite non discriminatory and does not depend on budget or something.

Also important is that the SDOs have clear procedures for the working groups, where the discussions and decisions are well documented each meeting is preceded by minutes outlining the topics, decisions and reasoning, and everything will be published so that every single decision can be traced back to why it was taken, when and by whom.

There are different governance models, each with their pros and cons. The three most notable are standardization through an SDO, maintainance through a Foundation and Private ownership. SDOs are the most transparent and give everyone the opportunity to contribute with equal voting power, independent of money. On the flip side they have a lot of beurocratic overhead and tend to underspecify. Foundations (like for example with Python) tend to favor the contributers who "donate"/invest the most money, here often voting power is proportional to financial contributions. And private ownership tends to have a very specific target and vision that is important for the maintainer, e.g. Swift is specifically designed for iOS development, to the degree that Swift for Linux or Windows is just an after thought. But the Maintainer has no obligations other than to themselves. For private projects (as Zig or how I would also consider the FPC to a certain degree) it's often a question of vision of the maintainers, while for companies it's usually first and foremost their personal business interests.

So the reason why the FPC maintainers are not comparable to an SDO commitee is simply that  there are no rules for them. There are no general organizational rules like there are for SDOs (e.g. EU Regulation 2012/1025 for european SDOs), there are no Rules of Procedure for the working groups and official subgroups, there are no formalities, no requirements on documentation and no formal voting. You can't sue them if they don't follow procedure, and they aren't responsible to anyone but themselves.
Not saying that this is necessarily a bad thing, personally I find it better than the embarcadero approach. That said, looking at extended Pascal standardized by ISO there are a lot of things in there that are very well thought out and are something that would be still beneficial today
« Last Edit: November 17, 2024, 05:51:57 pm by Warfley »

 

TinyPortal © 2005-2018