Jump to content
AlekXL

Delphi compiler need to be opensourced

Recommended Posts

19 hours ago, Remy Lebeau said:

Borland tried that once before.  The CLX framework in Delphi 6 was a cross-platform version of the VCL.  Most of the interfaces remained the same, just the internal implementations changed.  That didn't work out so well for them, CLX had to be scrapped.

I was keen to get Kylix and thought CLX was a good start. I think what killed Kylix was the plethora of Linux distributions which added twists and turns from Borland's perspective. And for those of us testing the waters, the fact that there were only 3 distributions (if memory serves) on which Kylix was certified to work was daunting. Then there was the lack of components -- how many do anything non-trivial in Delphi without the use of third-party components?

And as to components, Delphi 1 offered no component in support of serial ports, at a time when almost anything which connected outside the PC used serial ports. That was remedied soon enough by the appearance of third-party components, but always struck me as evidence of blind spots in determining what the base components needed to be. Further, the component business has always been problematic, as Delphi must ship with components, and realistically must also add to its component sets over time, but then risks competing with the third-party vendors who are essential to Delphi's popularity.

 

I do not imagine in my wildest dreams that Embarcadero will do anything serious with open source. The Interbase exercise would be enough to make many take a wait and see position. Why invest in supporting an open source project which is closed again after some months?

Share this post


Link to post
Posted (edited)
22 hours ago, Joseph MItzen said:

Now your second point gets to one of the things on my list of what I'd do if I ran Embarcadero. You're half right. We need a way to make importing easier. We don't need a conversion tool though. There's a long-running open source project whose software automatically wraps C and C++ code to make it callable from other languages! It's called SWIG, or Simplified Wrapper and Interface Generator. Referencing my point about popularity again, it even supports Modula-3 (!!!) but not Delphi. The good news is that I encountered someone on Stack Overflow whose company added support for Delphi to SWIG internally and were able to generate a fine wrapper of a complex C++ 3D graphics library with it. The bad news is that although asked his company did not appear interested in open sourcing their work. But of course, that means that it is possible to add Delphi support to SWIG.

There is a modified version of SWIG that includes support for Delphi & Object Pascal - https://github.com/FMXExpress/swig-delphi

But I've never used it.

 

Another excellent tool which utilize CLang to convert C (not C++) header files to Delphi:

https://github.com/neslib/Chet

 

Another tool that does source to source conversion: https://github.com/WouterVanNifterick/C-To-Delphi

Edited by edwinyzh
link correction

Share this post


Link to post
Posted (edited)

wrongly pressed Ctrl + Enter, will be posted as a new reply.

Edited by edwinyzh

Share this post


Link to post

Feel free to disagree to each other, but you must stop discussing about politics here.

Reason is simple - it takes just too much time to moderate these discussions as they tend to get out of control very quickly.

 

And honestly - you did not clarify anything. You just accused him to be misinformed.

But let me be clear: Please do not try to clarify anything about the political aspects of this thread. This will get too far offtopic. If there is really some clearly false information I am sorry for this.

Share this post


Link to post
Posted (edited)

This is definitely off-topic, but Joseph Mitzen's reply contains a lot of inaccurate information that needs to be clarified.

And a note to the administrators - if you'd delete my reply, please also delete Joseph's misinformed previous reply. After clarifying things I'll back to the topic. There is nothing in my reply were to against Joseph, he's just misinformed by the mainstream western media, just like many of my fellow Chinese people are misinformed by the local media.

I'll clarify it one by one.

Quote

The United States isn't actively planning to annex Taiwan

Do you know the history of Taiwan? If you don't I'm afraid you have to read little about it before you can seriously discuss this topic. It's one part of the China, it's closer to the China mainland than Northern Ireland is to the UK. Either the Taiwan government to unify the mainland or the other way around. Just for the record - I wish there will be no war involved. 

Quote

hasn't enabled a "Great Firewall" to control its citizens' access to the Internet

I'm one of those who suffer from this evil operation by the local gov. I hate it more than you can imagine.

Quote

doesn't artificially devalue its currency to court manufacturing jobs,

I don't know too much about the Globalization thing, but I am honestly not sure if it's more or less moral than the wall street capital to greatly benefit from low paying workers around the world, including China

Quote

doesn't hold innocent Canadians hostage when one of its industrialists is arrested,

Those Canadians violate local laws in here, so it's an international convention to arrest them. On the other hand, it's ironic that the Canada government arrest a Chinese industrialist because the US thinks she violated the US sanctions - not the UN's sanctions, so that they can use that to negotiate with China in the trade war. Who's holding a hostage if you read more and think carefully? 

Quote

 

hasn't built a network of artificial islands in the South China Sea to prevent access, annex territory and be able to grab resources by military force, 

 

I think it's much more reasonable than the US is sending young lives to kill lives and die in the Middle East for the sand (or for the oil?)

 

Quote

it's also not rolling all of this personal data into a nightmarish "social trustworthiness rating", designed to punish those not deemed sufficiently loyal to the state

It's designed to punish those who borrow other's money and intentionally not to repay, so it's a protection to innocent people.

Quote

The United States is the key country preventing China from extending its reach and enslaving other populaces or taking their territories.

US is the key to this and history will tell. But "enslaving" is a wrong wording for China who is bringing infrastructure enhancements, instead of wars like the West has done in the pas centries, to other countries. Read the world history, note which country actually enslaving other populaces (one of the key words - indian).

Quote

hasn't instituted a nationwide biometric monitoring network,

I hate this, on the other hand, the upside is that we innocent people is safer here.

 

Quote

hasn't declared a President For Life

True, that's a bad thing and I wish it will not lead to very bad situation here.

 

For other points I have no information so not commenting on them. And thanks for wasted hours of my time.

 

Back to the topic

===

Now back to the topic - as opposed to hoping Delphi (only the compiler doesn't make to much sense) to be open sourced, I guess the following things will be more practical to achieve the goal of being safe just in case EMBT drop Delphi:

  • Use only FPC-compatible language features.
  • Pursue 3rd party library/component vendors to support FPC. TMS and Synopse (mORMot) is doing very well in this regard.
  • Contribute to FPC to make it more compatible with Delphi.
Edited by edwinyzh
grammar correction
  • Thanks 1

Share this post


Link to post
1 minute ago, Markus Kinzler said:

Sorry, I will, and all of us should stop it. Sorry, but I couldn't resist to clarify misinformation about my beloved country in this forum which is all about my beloved Delphi (which is obvious not suitable for political topics).

  • Like 3

Share this post


Link to post
Posted (edited)

Tangentially on topic: is it possible to exclude this particular thread from the Activity feed?

(I mean me for myself, is there any setting for that)

Edited by Attila Kovacs

Share this post


Link to post

Not yet, but it‘s near.

  • Like 2

Share this post


Link to post
1 hour ago, edwinyzh said:

it's closer to the China mainland than Scotland is to the UK

Dude, Scotland is literally inside the UK

  • Haha 1

Share this post


Link to post
Posted (edited)
18 hours ago, Joseph MItzen said:

Again, a "skilled developer" can't just look at one million lines of undocumented code (that might be older than they are) and fix it

Tell that to a reverse engineer, who fixed a bug -- namely "license verification" in RAD Studio, despite being thoroughly hidden, or the author of IDEFixPack

18 hours ago, Joseph MItzen said:

Who would be in charge of the code? Would Embarcadero oversee it? If so, they might not approve changes.

They would approve bugfixes, wouldn't they?

 

18 hours ago, Joseph MItzen said:

Are you serious? Get-It has about 200 packages after four years, most of which are trials. Torry's Delphi Pages, the oldest collection of Delphi software still around, has a little over 10,000 packages ( a number that's barely moved from 2012),

GetIt and Torry is not representative nowadays. Use google with  (github OR bitbucket OR gitlab OR sourcefourge) clause, Luke

18 hours ago, Joseph MItzen said:

Serious numeric software (although you can pay $1600 for a bundle of Dew Research's matrix library, sci/stat function library, 3 basic data mining algorithms and Steema's TeeChart). Machine learning libraries. Financial libraries

Well, deep-learning probably not Delphi forte, but how often one needs this?

 

18 hours ago, Joseph MItzen said:

Let's go smaller - I'm interested in making a media player. Delphi lacks a music file tag manipulation library (that's post-unicode and documented), audio manipulation library, replay gain library, cover art library, etc., all of which I can find on other platforms  as open source.

Surely you wouldn't write a media player on python, would you? Even .Net is bad option? And java? On Android, yes, maybe, but what's the point writing yet another crappy player on Java. If you are going to be serious, you would end up with C++. And albeit it maybe harder to link C++ libs to Delphi app, once it's done, it will work faster, and can be integrated tighter since managed-unmanaged transition is costly.

18 hours ago, Joseph MItzen said:

I'm working on another pet project now that involves data analysis and machine learning and if successful will require interacting with websites

Well,  numerical calculs and deep learning maybe python forte (if backed by C++ libs, of cause), but are you sure, that we comparing apples to apples? Delphi has its strong points, UI and Database, to name two..

And your choice for python as example is bad : I will never believe that a weak-typed language, is actually good for anything except quick-and-dirty scripts. Scientists would love it. Hobbyist would too. But how it usable Pros, comparing to Java or C#? Actually Python is known to be slow in serious workloads.

Edited by AlekXL
typos

Share this post


Link to post
12 minutes ago, AlekXL said:

Surely you wouldn't write a media player on python, would you? Even .Net is bad option? And java? On Android, yes, maybe, but what's the point writing yet another crappy player on Java.

Really?

I have seen highly performant programs including media players written in .NET and even JavaScript.

Share this post


Link to post
5 hours ago, Bill Meyer said:

I do not imagine in my wildest dreams that Embarcadero will do anything serious with open source. The Interbase exercise would be enough to make many take a wait and see position. Why invest in supporting an open source project which is closed again after some months? 

To get bugs fixed? Code generation improved? I dont dream that Delphi compiler will soon be completely free, I just want it to be better

 

4 hours ago, edwinyzh said:

There is a modified version of SWIG that includes support for Delphi & Object Pascal - https://github.com/swig/swig

But I've never used it. 

Did you mean  https://github.com/FMXExpress/swig-delphi  ? But this helpful anyway.

4 hours ago, edwinyzh said:

Another excellent tool which utilize CLang to convert C (not C++) header files to Delphi: 

https://github.com/neslib/Chet

 

Another tool that does source to source conversion: https://github.com/WouterVanNifterick/C-To-Delphi

Oh, that's nice.. Looks like Joseph Mitzen exaggerated poor condition of C++/Delphi linkage? All those 5 pages of discussion worth that single post..

 

Share this post


Link to post

And yes,

On 4/12/2019 at 6:19 PM, Daniel said:

We are on page #4 because of a lot of off-topic

#5, and here we have best conversation among those recently occurred on this thinly populated, boringly politically correct forum. So giving devil his due, lets recall, that

 

On 4/12/2019 at 6:15 PM, AlekXL said:

this topic about opensourcing Delphi compiler, please vote on QP , if you didn't already

Additionally consider supporting Delphi-compatibility issue on Newpascal 

https://github.com/newpascal/newpascal/issues/6

 

Share this post


Link to post
10 minutes ago, AlekXL said:

Oh, that's nice.. Looks like Joseph Mitzen exaggerated poor condition of C++/Delphi linkage? All those 5 pages of discussion worth that single post..

 

 

Just for the record C is not C++. Joseph Mitzen didn't exaggerated that.

  • Thanks 1

Share this post


Link to post
6 minutes ago, Dalija Prasnikar said:

Just for the record C is not C++. Joseph Mitzen didn't exaggerated that

please clarify, those tools edwinyzh mentioned is unable bind to C++ class? 

 

Share this post


Link to post
23 minutes ago, AlekXL said:

and here we have best conversation among those recently occurred on this thinly populated, boringly politically correct forum.

If you think we are narrow minded and boring, why you waste your time here?

We have good reasons to act like we act ( 15+ years).

Share this post


Link to post
Posted (edited)
10 minutes ago, AlekXL said:

please clarify, those tools edwinyzh mentioned is unable bind to C++ class? 

 

First tool explicitly mentions it is not for translating C++ header files

Another excellent tool which utilize CLang to convert C (not C++) header files to Delphi:  https://github.com/neslib/Chet

 

Second tool description says This tool will convert most of your standard C code.

 

So, yes C, no C++. 

 

For using C++ you need to go extra mile: http://rvelthuis.de/articles/articles-cppobjs.html

Edited by Dalija Prasnikar
  • Like 1

Share this post


Link to post
Posted (edited)
8 hours ago, edwinyzh said:

as opposed to hoping Delphi (only the compiler doesn't make to much sense) to be open sourced, I guess the following things will be more practical to achieve the goal of being safe just in case EMBT drop Delphi:

  • Use only FPC-compatible language features.
  • Pursue 3rd party library/component vendors to support FPC. TMS and Synopse (mORMot) is doing very well in this regard.
  • Contribute to FPC to make it more compatible with Delphi.

I would disagree to #1. I love inline variables, it's small miracle to use, especially with Generics. Declare, use, and forget  I love Lambdas they make me more productive. I love attributes, this is next word to develop more modular, less bloated, and elegant code. So no, I'd rather go option #3

Edited by AlekXL
typos
  • Like 1

Share this post


Link to post
34 minutes ago, AlekXL said:

To get bugs fixed? Code generation improved? I dont dream that Delphi compiler will soon be completely free, I just want it to be better

Serious question. So far you have managed to volunteer other people to do the compiler fixing.

 

But you haven't told us anything about what can you offer in that regard? How can you help improving and fixing the compiler? What are your skills?

  • Like 4

Share this post


Link to post
8 minutes ago, Markus Kinzler said:

If you think we are narrow minded and boring, why you waste your time here?

We have good reasons to act like we act ( 15+ years). 

You edited your post, did you? Quoting myself, but addressing to edwinyzh Chinese guy?   Freudian slip? You like his post barely better, than mine?

I hope you will  act politically correct, not just claim you do.

"Truth is born in disputes", and there are a few people worth debating, just not all, you know.

Share this post


Link to post
Guest

if you wish check this project https://github.com/fredvs/mselang

compiler very well written, clean, fast code, based on LLVM

still lack a framework as vcl or fmx 

Share this post


Link to post
7 minutes ago, Dalija Prasnikar said:

But you haven't told us anything about what can you offer in that regard? How can you help improving and fixing the compiler? What are your skills?

Delphi mostly. C/C++ And I know how to build an LR-parser, from Grammar to PDA, including classic Knuth LR(1) algorithm implementation.  I wrote some labs "Languages and translation methods" for  students (for pay), LR grammar, simple codegen, optimizing expression tree for register allocation, including commutative ops reordering. Not much, I know, but I have some glimpse of compiler design.

3 hours ago, Ugochukwu Mmaduekwe said:

This implements just ECDSA using only secp256r1 curve

But did edwinyzh  just proved that you are partially wrong? I asked you to be factual, and now ask it again -- you named Edwards curves, and here we have some implemented. Now please clarify further, what "Edwards curves" Delphi lacking, and why those lacking are important (where they used)?

1 hour ago, Ugochukwu Mmaduekwe said:

Really?

I have seen highly performant programs including media players written in .NET and even JavaScript.

Because they are thin wrappers around C/C++ FFMpeg or some other C/C++ library or web browser runtime. All dirty work is hidden.. Delphi isn't meant to build thin wrappers, apparently. And many of those who write .NET and Js -- are barely aware what is memory leak, how to prevent it, or investigate .. that's beyond their mindset, thanks to learning managed languages from youth.

 

Share this post


Link to post
35 minutes ago, RDPasqua said:

if you wish check this project https://github.com/fredvs/mselang

compiler very well written, clean, fast code, based on LLVM

still lack a framework as vcl or fmx 

Yet another reinventing the wheel? We already have Oxygene for that. I hate fragmentation (burn the heretics!).. We already have our resources stretched thin.

And under viral license, so you can't even borrow code from it, without being infected. With FPC we have our plate full. So that guy can shove it..

Share this post


Link to post
Guest
This topic is now closed to further replies.

×