Using Lazarus for other Languages lazarus / 21-General ---------------------------------------------------------------------- Shpend · 2021-01-27 18:12 Hi ppl, quick question, how much work would it be to use Lazarus or to develop with Lazarus I shall say, a feasible IDE for "Oxygene" since I wanted to give that language a try for a project. But both their VS extension and Water IDE suck balls and so I wanted to use a more compact, but fast and mostly bug-free IDE with tons of options. Ah and also, can some1 address me how to develop a debugger for Oxygene(i won't do this alone ofc, but am acquiring more information from you on that topic!) Would pretty much love to hear cool advice from all of you! Thanks and peace out. Shpend ---------------------------------------------------------------------- marcov · 2021-01-27 18:26 Hard to say, it all depends how polished you want it and how deep you want to integrate it. Retargeting a shallow IDE like dev pascal to use with some 3rd party command compiler is relatively easy (a few weeks/months). Doing something deep is long and unpredictable. It doesn't help that there is no history of people retargeting lazarus or parts for something else. A debugger is totally a different question and not very generic. Afaik Oxygene is .NET based, so you have to ask that on a .NET forum. ---------------------------------------------------------------------- Shpend · 2021-01-27 18:40 Hi marcov, thx for the reply! Oxygene itself is first only the language, but I want to target their Island/Cocoa Compiler, nothing else. That one is a native compiler that compiles directly to machine code. And yea, I don't like their LDB (LLVM debugger I think) at all, very messy and buggy and they just keep adding senselessly new languages to the mix without addressing the debugging problems and frameworks properly, hard if you stick to 8 employees for 20 years.  I wouldn't use their stuff at all, but I  gotta say the Island stuff and Oxygene has its worthy notes, not gonna lie, even tho I know your standpoint on that topic, @marcov. I understand ur point a bit as well but idk for me personally, I prefer the OOP aspect of oxygen a lot vs Delphi/FPC sadly. Quote from: marcov on January 27, 2021, 07:26:13 pmHard to say, it all depends on how polished you want it and how deep you want to integrate it. How you mean that exactly, I mean I want to allow every compiler message and error and have an easy build setup and stuff, as well as a settings-panel in the Tools-Options menu where you can address all of their compilers and build settings. Yea, I thought since I wanna target their LLVM based Island/Cocoa compiler, I thought maybe I can somehow use FPC-debugger to understand Oxygene-code. ---------------------------------------------------------------------- Shpend · 2021-01-27 18:49 To be absolutly honest to you guys, Im not even sure right now if I wanna stick to their products. One of their weird chiefs constantly deletes my posts about his ridiculous IDE which consumes memory like crazy in under and 1h of work, like up to 6GB and more... Insane, and I did a post about that on their dumb forum and he deleted my post, XD where I have shown in a .png of how that thing spikes up... Now read this: Me writing: Hopefully, you are as quick in fixing the issues as deleting/unlisting posts. Huzzah. Marc Hoffman: If you don’t stop being obnoxious, I’ll ban you completely. Consider this your last warning. I mean.. I wrote that guy a DM because he did that to other posts as well, where I ONLY reported bugs in their RTL, which I OFFERED HIM TO FIX... Imagine this and he kept unlisting them and deleting them???? So idk, but I endorse their compiler dev @carlo Kok since he took the time to understand my bug-fix offer for free and even implemented some stuff I suggested to him that would be good to have in their toolchain. But this guy is IMHO hardcore ridiculous. I bet he is the reason that company didn't grow at all in 20 years. Insane. To make it clear, I only like their OOP stuff more than in FPC/Delphi tbf, that's the only reason for me to switch to that thing, otherwise, their entire stuff is buggy and messy and you have to do with ppl with very low-level minds. ---------------------------------------------------------------------- marcov · 2021-01-27 20:03 Quote from: Shpend on January 27, 2021, 07:40:30 pmOxygene itself is first only the language, but I want to target their Island/Cocoa Compiler, nothing else. That one is a native compiler that compiles directly to machine code. A language without implementation is a piece of paper. It burns easily :-) QuoteAnd yea, I don't like their LDB (LLVM debugger I think) at all, very messy and buggy and they just keep adding senselessly new languages to the mix without addressing the debugging problems and frameworks properly, hard if you stick to 8 employees for 20 years.  I wouldn't use their stuff at all, but I  gotta say the Island stuff and Oxygene has its worthy notes, not gonna lie, even tho I know your standpoint on that topic, @marcov. I understand ur point a bit as well but idk for me personally, I prefer the OOP aspect of oxygen a lot vs Delphi/FPC sadly. Then cut the cord, and go for it, all out. Throw your weight behind Oxygene, and make it happen! I really wonder why you are here then if it is all so rosy? QuoteQuote from: marcov on January 27, 2021, 07:26:13 pmHard to say, it all depends on how polished you want it and how deep you want to integrate it. How you mean that exactly, I mean I want to allow every compiler message and error and have an easy build setup and stuff, as well as a settings-panel in the Tools-Options menu where you can address all of their compilers and build settings. That simply text processing and easy-peasy if you spend a month at it. QuoteYea, I thought since I wanna target their LLVM based Island/Cocoa compiler, I thought maybe I can somehow use FPC-debugger to understand Oxygene-code. That is a totally different magnitude from the rest. Maybe even several magnitudes. To give you perspective, the first claims that we should get rid of GDB are from 2003. It is 2021 now, and we still mostly use GDB for debugging..... ---------------------------------------------------------------------- Shpend · 2021-01-29 13:39 QuoteA language without implementation is a piece of paper. It burns easily :-)I only noted that I was not planning to use their .NET Compiler, more their Island-Native compiler. Because you said b4: QuoteAfaik Oxygene is .NET based, so you have to ask that on a .NET forum. QuoteThen cut the cord, and go for it, all out. Throw your weight behind Oxygene, and make it happen! I really wonder why you are here then if it is all so rosy? Bro, don't hate me because I'm trying alternatives, why has programming become such a damn religious-movement, what is this, I mean, ofc there are somethings other ppl do better in some regards, afaik I was as far as telling in how many regards they fail, numerous arguments were made by me, in posts above.  Like unstable, not a big framework and stuff like that and mostly their arrogance of taking bugfixes for free which have a decent amount of presence in their IslandRTL. So don't be so offending with that line @marcov, and yes, again, there are points I wished Delphi/FPC (but actually more Delphi since its a full-time company that can afford those easier) to implement some of their good OOP features like Invariants and stuff like that, but as I also said by now, I tend to really abandon this company completely from my use of tools. It's not worth my time to deal with endless buggy code where you get out of surprise every method you write an internal error. ---------------------------------------------------------------------- MarkMLl · 2021-01-29 13:49 Quote from: Shpend on January 29, 2021, 02:39:13 pmQuoteThen cut the cord, and go for it, all out. Throw your weight behind Oxygene, and make it happen! I really wonder why you are here then if it is all so rosy? Bro, don't hate me because I'm trying alternatives, why has programming become such a damn religious-movement, Steady on, that's lowering the tone of discussion. I think the point he was making- and it's a fair one IMO- is that there are a lot of people who are attracted by the Lazarus IDE's facilities, join the forum or mailing lists, and then try to single- handedly steer the project in a direction that interests few other people. "All" you have to do is work out how the IDE works, and what assumptions it makes about other parts of the toolchain, and then you'll find it "quite easy" to fork the project and reengineer it for a different backend. But "all" and "quite easy" hide a vast amount of effort. MarkMLl ---------------------------------------------------------------------- Shpend · 2021-01-29 14:16 You know what, you are right MarkMLI, I will abandon remobjects and stick to Delphi/FPC, I'm annoyed anyways from their arrogance and stuff like that. Thanks for clearing that out! ---------------------------------------------------------------------- MarkMLl · 2021-01-29 14:28 Quote from: Shpend on January 29, 2021, 03:16:38 pmYou know what, you are right MarkMLI, I will abandon remobjects and stick to Delphi/FPC, I'm annoyed anyways from their arrogance and stuff like that. Thanks for clearing that out! I'm sorry, but I felt it was a point that had to be made :-) Basically, there's a whole lot of us searching for something better, but the amount of work that's gone into (over the years) * Turbo pascal which made Pascal usable and (for quite a while) popular * Delphi which firmed up the object definition and introduced a robust form designer * FPC which expanded the Object Pascal language to cover an unprecedented number of platforms * Lazarus/LCL which built on Delphi-like ideas to support unix etc. ...means that this really is a very hard act to follow. I'm pretty sure that if somebody /could/ generalise the IDE to cover multiple languages, and managed to get other languages' maintainers to introduce support for form creation etc. (basically, the bits you find invoked in the .lpr file), and managed to do so without ending up with the bloat that is Eclipse, then the World would beat a path to his door. But the amount of religious opposition he'd get from other languages would make the FPC/Lazarus community look like Quakers :-) MarkMLl ---------------------------------------------------------------------- Shpend · 2021-01-29 18:35 Yea i thought giving their suspicious tools a chance and with a good IDE as Lazarus with a stable debugger they would benefit from it, rather than their currently DogShit IDE, Water. ---------------------------------------------------------------------- marcov · 2021-01-29 20:21 Quote from: Shpend on January 29, 2021, 02:39:13 pmQuoteThen cut the cord, and go for it, all out. Throw your weight behind Oxygene, and make it happen! I really wonder why you are here then if it is all so rosy? Bro, don't hate me because I'm trying alternatives, why has programming become such a damn religious-movement, what is this, I mean, ofc there are somethings other ppl do better in some regards, afaik I was as far as telling in how many regards they fail, numerous arguments were made by me, in posts above.  I don't hate you. I might have been teasing a bit though, mostly because your request and answers were a bit non-committal(a bit like MarkMLI also noticed). Hence I dared you to make a commitment, though more to make you really think about what it would take to pull a project like that off. That said, I still stand by my original remark. Keep the initial part simple, try to retarget something simple like dev pascal or its C++ sibling. If you can somehow pull that off and get some compatriots from the Remobjects world, maybe you can later take the next step. Though if parts (compiler, rtl) are under a non-free license, I rather wouldn't even bother. If you read the forum, e.g. the Modula2/Oberon threads, you'll see I'm a fugitive from Modula2 also because perspective wasn't there.  QuoteLike unstable, not a big framework and stuff like that and mostly their arrogance of taking bugfixes for free which have a decent amount of presence in their IslandRTL. So don't be so offending with that line @marcov, and yes, again, there are points I wished Delphi/FPC (but actually more Delphi since its a full-time company that can afford those easier) to implement some of their good OOP features like Invariants and stuff like that, but as I also said by now, I tend to really abandon this company completely from my use of tools. It's not worth my time to deal with endless buggy code where you get out of surprise every method you write an internal error. I still use Delphi at work for the more major apps (which are 250000+ to 1Mlines and years of research). Main reason is effective and stable debugging (though Delphi also has problems there). I had a lot of internal error issues with D2009..DXE3 when dealing with generics, but less so with Delphi Seattle, which I still use. Smaller apps and apps we don't sell have been migrated to Lazarus though. The base framework of the larger apps also works with Lazarus. ---------------------------------------------------------------------- MarkMLl · 2021-01-29 21:02 Quote from: marcov on January 29, 2021, 09:21:03 pmIf you read the forum, e.g. the Modula2/Oberon threads, you'll see I'm a fugitive from Modula2 also because perspective wasn't there. As am I of course. In fact I almost expanded on my comments earlier by commenting on the size that development tools used to be: the Logitech and Topspeed tools could be installed from a stack of floppies in the late 80s and you got most of the library sources (not the compiler sources obviously). These days the FPC+lazarus configuration files wouldn't fit on a floppy... :-) MarkMLl ---------------------------------------------------------------------- PascalDragon · 2021-01-30 14:34 Quote from: Shpend on January 29, 2021, 02:39:13 pmSo don't be so offending with that line @marcov, and yes, again, there are points I wished Delphi/FPC (but actually more Delphi since its a full-time company that can afford those easier) to implement some of their good OOP features like Invariants and stuff like that, but as I also said by now, I tend to really abandon this company completely from my use of tools. Class contracts and invariants are something that I think are very interesting and I'm planning for a long time already to give them a try in FPC, but it's how it always is: my todo list is getting longer and longer. ---------------------------------------------------------------------- Shpend · 2021-01-30 16:56 @marcov: I took your advice to heart, and abandon it completely, it's too much work and in the end, they will probably go against this by Law/juridical ways. As I said b4 in some posts, their CEO (marc Hoffman) deleted my posts regarding the free offering of improvement in their RTL, for free and all that and he DELETED them, without any info whatsoever, now regard that bastard seeing an open-source solution coming his way, they will make RTL (compiler already is closed-src as u correctly assumed Markov) also closed src and voila all my work would be gone! So thanks for the courage in giving me some hints to that, otherwise I would have started blindly. So thx! @PascalDragon Glad to hear from you my friend:=) I know I have a bit penetrated you guys with all that move semantics and stuff, but my annoying posts about features sometimes are only an attempt that this beautiful and community-driven Language (well I count Delphi too now..) doesn't die, since as you can see in the current market, C#/Java are prospering with good and easy to code features which remove boilerplate code ( I understand ofc where FPC stands in terms of money financial support and the like and where  C# stands.. but still wanted to mention that) and also I know that there is quite a lot to do in compiler-regards, I hate it so much that I am not versed in Compiler-code... I would have started one year already with some stuff I saw is useful and would have helped you out... but what can you do... Could you actually, PascalDragon, only for the sake of information tell me, how many people are working on the Compiler? Since it looks a bit hidden/not easily findable. If you have it in your mind, if not,  screw it. EDIT: @marcov: quoting you: "That is a totally different magnitude from the rest. Maybe even several magnitudes. To give you perspective, the first claims that we should get rid of GDB are from 2003. It is 2021 now, and we still mostly use GDB for debugging....." Why is GDB so bad in your opinion, I legit had never an issue with it, ok granted, my biggest project was about 1k lines of code but still. Could you elaborate on this? ---------------------------------------------------------------------- PascalDragon · 2021-01-30 17:31 Quote from: Shpend on January 30, 2021, 05:56:11 pmCould you actually, PascalDragon, only for the sake of information tell me, how many people are working on the Compiler? Since it looks a bit hidden/not easily findable. If you have it in your mind, if not,  screw it. For the compiler itself currently active core developers are around 8 people give or take one or two, plus one or two people from outside actively contributing patches. Quote from: Shpend on January 30, 2021, 05:56:11 pmEDIT: @marcov: quoting you: "That is a totally different magnitude from the rest. Maybe even several magnitudes. To give you perspective, the first claims that we should get rid of GDB are from 2003. It is 2021 now, and we still mostly use GDB for debugging....." Why is GDB so bad in your opinion, I legit had never an issue with it, ok granted, my biggest project was about 1k lines of code but still. Could you elaborate on this? Just look at the amount of workarounds martin_fr has to implement in the debugger interface of Lazarus to get GDB to play nicely with Pascal code (look at the Debugger subforum here). Not to mention support for things like evaluating properties that is still a very big todo for both the debugger and the compiler (the later for the debug information). ---------------------------------------------------------------------- marcov · 2021-01-30 17:33 Quote from: Shpend on January 30, 2021, 05:56:11 pmC#/Java are prospering with good and easy to code features which remove boilerplate code ( I understand ofc where FPC stands in terms of money financial support and the like and where  C# stands.. but still wanted to mention that) The core thing is not their features, but the companies (MS, Oracle) pushing it as platform of choice for their products. ---------------------------------------------------------------------- Shpend · 2021-01-30 18:10 Quote from: marcov on January 30, 2021, 06:33:15 pmQuote from: Shpend on January 30, 2021, 05:56:11 pmC#/Java are prospering with good and easy to code features that remove boilerplate code ( I understand ofc where FPC stands in terms of money financial support and the like and where  C# stands.. but still wanted to mention that) The core thing is not their features, but the companies (MS, Oracle) pushing it as a platform of choice for their products True that. ---------------------------------------------------------------------- Martin_fr · 2021-02-03 21:20 I split the debugger development part to its own thread: https://forum.lazarus.freepascal.org/index.php/topic,53178.0.html ---------------------------------------------------------------------- dpremus · 2021-02-03 22:21 I bought RemObjects Elements, but decided not to use. There is no something like LCL or VCL, their philosophy is to use "native" framework for each platform. It's easy if your target platform is for example Net or Android, where you have rich framework, but if you want to compile for Linux it's similar like using only FPC for GUI Applications  in that case you need to find some GUI framework (qt, gtk ....).  So you can forget "write once compile anywhere" philosophy. Regarding using Lazarus for other languages, only thing where I'm not so happy with Lazarus is for web development. So am thinking about creating code generator for Go in Lazarus. ---------------------------------------------------------------------- PascalDragon · 2021-02-04 08:02 Quote from: dpremus on February 03, 2021, 11:21:31 pmRegarding using Lazarus for other languages, only thing where I'm not so happy with Lazarus is for web development. Why, what are you missing? ---------------------------------------------------------------------- dpremus · 2021-02-04 16:41 Quote from: PascalDragon on February 04, 2021, 09:02:37 amQuote from: dpremus on February 03, 2021, 11:21:31 pmRegarding using Lazarus for other languages, only thing where I'm not so happy with Lazarus is for web development. Why, what are you missing? I was making some REST server with Pascal and there was lots of things that I need to handle, database connection pool, processing each request in separate thread, thread synchronisation, constantly worrying what is thread safe  and what I need to execute in main thread. Maybe I'm wrong, but seems that making this kind of  REST API servers are easier in Go. Network support in Go are in standard libraries, you have channels and Go routines and new comers doesn't need to worry regarding memory allocation, there are tons of libraries for network and cloud support, but Go is designed as server language. So I'm thinking about to combine Lazarus for thin desktop client applications that consumes REST web services written in Go, and making tool in Lazarus that will generate Go boilerplate code for CRUD actions. But, I don't know maybe is this wrong direction, maybe is better to write or enhance some FPC web framework and make everything in Pascal. ---------------------------------------------------------------------- PascalDragon · 2021-02-05 13:51 Quote from: dpremus on February 04, 2021, 05:41:12 pmQuote from: PascalDragon on February 04, 2021, 09:02:37 amQuote from: dpremus on February 03, 2021, 11:21:31 pmRegarding using Lazarus for other languages, only thing where I'm not so happy with Lazarus is for web development. Why, what are you missing? I was making some REST server with Pascal and there was lots of things that I need to handle, database connection pool, processing each request in separate thread, thread synchronisation, constantly worrying what is thread safe  and what I need to execute in main thread. Maybe you haven't looked at the right framework? Have you tried e.g. mORMot? (And yes, I'm aware that it looks quite intimidating at first, but it essentially provides everything you need) ---------------------------------------------------------------------- dpremus · 2021-02-05 17:35 QuoteQuoteI was making some REST server with Pascal and there was lots of things that I need to handle, database connection pool, processing each request in separate thread, thread synchronisation, constantly worrying what is thread safe  and what I need to execute in main thread. Maybe you haven't looked at the right framework? Have you tried e.g. mORMot? (And yes, I'm aware that it looks quite intimidating at first, but it essentially provides everything you need) Maybe you are right. I was looking something simpler than mORMot. I made comparison between Go and fpWeb If you ignore syntax, these examples look same. I don't know how stable is fpWeb in production but I will make a try with fpWeb. Code: Go  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i package main import (    "fmt"    "log"    "net/http") func homePage(w http.ResponseWriter, r *http.Request){    fmt.Fprintf(w, "Welcome to the HomePage!")    fmt.Println("Endpoint Hit: homePage")} func handleRequests() {    http.HandleFunc("/", homePage)    log.Fatal(http.ListenAndServe(":10000", nil))} func main() {    handleRequests()}  Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program test_web;  uses  SysUtils, fphttpapp, httpdefs, httproute;  procedure homePage(req: TRequest; res: TResponse);begin  res.Content := format('%s Welcome to the HomePage!', [req.ToString]) +                      ' Endpoint Hit: homePage';end;  procedure handleRequest;begin  Application.Port := 10000;  HTTPRouter.RegisterRoute('/', @homePage, true);end;  begin  Application.Threaded := true;  Application.Initialize;  handleRequest;  Application.Run;end. ---------------------------------------------------------------------- Leledumbo · 2021-02-06 06:57 Quote from: dpremus on February 05, 2021, 06:35:07 pmI don't know how stable is fpWeb in production but I will make a try with fpWeb. My company has been using a service written in fpWeb for about 3 years now. It's one of the less often crash among all of our other services. The service is backed by a MySQL server and uses mORMot's mustache template engine for one UI endpoint (the rest provides, well, REST interface). Someone also benchmarked it with Go's built-in HTTP package as you show above and the performance is comparable. ---------------------------------------------------------------------- dpremus · 2021-02-07 17:17 Quote from: Leledumbo on February 06, 2021, 07:57:23 amQuote from: dpremus on February 05, 2021, 06:35:07 pmI don't know how stable is fpWeb in production but I will make a try with fpWeb. My company has been using a service written in fpWeb for about 3 years now. It's one of the less often crash among all of our other services. The service is backed by a MySQL server and uses mORMot's mustache template engine for one UI endpoint (the rest provides, well, REST interface). Someone also benchmarked it with Go's built-in HTTP package as you show above and the performance is comparable. Thank you for your info, real world example is more valuable than any test I made.