Recent

Author Topic: The future of Free Pascal  (Read 229070 times)

jacmoe

  • Full Member
  • ***
  • Posts: 249
    • Jacmoe's Cyber SoapBox
Re: The future of Free Pascal
« Reply #255 on: March 21, 2017, 05:36:54 pm »
Strange, isn't it, that both .NET core and Mono has downloads for OSX? Did you actually check it out? ;)

Personally, I really prefer the syntax of C++ over the syntax of Java, and actually over C# as well.

It's probably great and all, but not really my cup of tea. To put it mildly.

Java is still really slow and hungry for resources.
That's the main reason why I don't use any Java based IDE.
Even VSCode, based on Typescript, is faster than Netbeans, Eclipse, ..
The only thing that comes really, really close to being excellent is everything that JetBrains does.  8)
more signal - less noise

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: The future of Free Pascal
« Reply #256 on: March 21, 2017, 05:56:02 pm »
Personally, I really prefer the syntax of C++ over the syntax of
That's the problem... WHICH C++ syntax.... There isn't any.... Apart from curly brackets it is pretty much free for all.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

jacmoe

  • Full Member
  • ***
  • Posts: 249
    • Jacmoe's Cyber SoapBox
Re: The future of Free Pascal
« Reply #257 on: March 21, 2017, 06:29:30 pm »
Exactly!  :)
more signal - less noise

john horst

  • Jr. Member
  • **
  • Posts: 68
    • JHorst
Re: The future of Free Pascal
« Reply #258 on: March 21, 2017, 08:57:08 pm »
Java is verbose, OBJPAS is also verbose, mystery solved. Java has its issues.. try it on a non Intel platform without 32gb of ram.  FWIW, I had to open a mono app to sign-in to the forum "keepass2". I should get a bloated Java app, right. You sound like you are learning Java, praise it 10 years latter. ;) Do something other than running a few little apps....

Some things I believe could improve Free Pascal.

An SSL cert.
A playground.
A package manager. (go get) is very nice.
An updated website.
Nice documentation, more examples. Laz and Console apps.

What else does a programmer need?



jacmoe

  • Full Member
  • ***
  • Posts: 249
    • Jacmoe's Cyber SoapBox
Re: The future of Free Pascal
« Reply #259 on: March 21, 2017, 10:23:20 pm »
Are you referring to me, or someone else?
I was introduced to Java 17 years ago. We didn't click, but I know how to program in it.
Delphi and later C++ did click, however.
.NET never clicked either.

Verbosity?
Yes. But the verbosity is not the same.
I can live with the verbosity of Object Pascal.
It has some benefits over C++, for some things. Like desktop applications.

My main gripe with both .NET and Java is that you are basically sitting on top of  a large runtime.
I don't want and I don't need that kind of overhead.
« Last Edit: March 21, 2017, 10:25:33 pm by jacmoe »
more signal - less noise

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: The future of Free Pascal
« Reply #260 on: March 21, 2017, 11:56:49 pm »
Java is still really slow and hungry for resources.
Sorry, but you’ll have to be more specific than that! As far as I, and many others on the internet, believe - the “Java is slow” in this day and age is just another myth that doesn’t want to go away. If it was that slow, then why to most financial institues, and trading companies run Java backends on their servers. To them every millisecond counts. 

Closer to home…. Like I mentioned earlier, have a look in the Graphics section of this form. I showed a 100% software rendering raycaster implemented near identical in C, Java and Object Pascal. The code is purposely badly written, because it was based on a Java 4KB competition, so small was a priority of well written code. Anyway, the graphics output is identical on all, but the Java version runs circles around the other two. On my system Java was hitting 30+ frames per second, C was in the mid to high 20’s, and no matter how many optimazations was applied, the Object Pascal version (compiled with FPC of course) as struggling at around 4-6 frames per second.

Eclipse IDE runs really fast here. No slower than Lazarus IDE. The same goes for other Java applications I run. jEdit for example loaded and syntax highlighted a huge 20MB source file much faster than Lazarus IDE could.

I can add that you do get good and bad applications, and one can always find examples of slow (and badly written applications), be that native executables, .NET based or Java based. But do yourself a favour, and do some new internet searches about Java executable performance. Java today is NOT the Java from 1996.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

jacmoe

  • Full Member
  • ***
  • Posts: 249
    • Jacmoe's Cyber SoapBox
Re: The future of Free Pascal
« Reply #261 on: March 22, 2017, 12:11:55 am »
For Christ sakes, dude: what the gobbles do you think?
Yes, I have run Eclipse, Netbeans, etc. on my machine, right here, right now.
And they are definitely slower (and hungrier) than IDEs programmed in C/C++.
Yes, they are faster than they were 10 years ago. But they are still slower.
That's a fact.
And they also eats more RAM.
Sublime, VSCode, QtCreator, KDevelop, Emacs : all faster and speedier than anything powered by Java.
I have 8GB of RAM, and I don't intend to fill that up running an IDE.
The Java runtime needs to be run, that's a fact.
And native programs (not running Java) does not need to run it to run themselves. That's also a fact.
more signal - less noise

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: The future of Free Pascal
« Reply #262 on: March 22, 2017, 12:16:19 am »

My issue with Java for years has been memory consumption. But these days I made peace with that. What modern PC doesn’t come standard with 8GB or RAM anyways? My desktop system has 32GB RAM and my laptop has 16GB RAM.

My laptop has 4gb

i have huge issues running firefox, java ide and javac.

everyrthing freezes

Same as mine. Since I routinely have about 15+ tabs open of Firefox, I never run Eclipse IDE and Firefox at the same time because 2GB of memory gets eaten fast. In addition, I have some background processes/Firefox plugins running to free memory so my system does not come to a halt. Java IDEs are resource hungry. There is no getting around it.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

john horst

  • Jr. Member
  • **
  • Posts: 68
    • JHorst
Re: The future of Free Pascal
« Reply #263 on: March 22, 2017, 12:56:17 am »
Java is still really slow and hungry for resources.
Sorry, but you’ll have to be more specific than that! As far as I, and many others on the internet, believe - the “Java is slow” in this day and age is just another myth that doesn’t want to go away. If it was that slow, then why to most financial institues, and trading companies run Java backends on their servers. To them every millisecond counts. 

Closer to home…. Like I mentioned earlier, have a look in the Graphics section of this form. I showed a 100% software rendering raycaster implemented near identical in C, Java and Object Pascal. The code is purposely badly written, because it was based on a Java 4KB competition, so small was a priority of well written code. Anyway, the graphics output is identical on all, but the Java version runs circles around the other two. On my system Java was hitting 30+ frames per second, C was in the mid to high 20’s, and no matter how many optimazations was applied, the Object Pascal version (compiled with FPC of course) as struggling at around 4-6 frames per second.

Eclipse IDE runs really fast here. No slower than Lazarus IDE. The same goes for other Java applications I run. jEdit for example loaded and syntax highlighted a huge 20MB source file much faster than Lazarus IDE could.

I can add that you do get good and bad applications, and one can always find examples of slow (and badly written applications), be that native executables, .NET based or Java based. But do yourself a favour, and do some new internet searches about Java executable performance. Java today is NOT the Java from 1996.

All of the important / performance gains in Java are written in c/c++. You keep naming single use cases of who gives a .... I/O I/O I/O this will be your problem 99.9999999% time regardless, be it Java, C, Pascal or Go. Go and Java can be slow under certain condition on a hammered server during garbage collection. OMG C is faster...

The day I hear someone say lets rewrite this C in Java, it's faster, is the day I will love Java.
« Last Edit: March 22, 2017, 12:59:42 am by john horst »

jacmoe

  • Full Member
  • ***
  • Posts: 249
    • Jacmoe's Cyber SoapBox
Re: The future of Free Pascal
« Reply #264 on: March 22, 2017, 02:00:58 am »
Not all applications are IO bound. Just want to mention that. ;D
IDEs are process bound more than IO bound, so that's actually one instance where you can really feel the difference between Java/Python/Node.js and native languages like C/C++/Rust/Pascal.
more signal - less noise

john horst

  • Jr. Member
  • **
  • Posts: 68
    • JHorst
Re: The future of Free Pascal
« Reply #265 on: March 22, 2017, 04:33:53 am »
Not all applications are IO bound. Just want to mention that. ;D
IDEs are process bound more than IO bound, so that's actually one instance where you can really feel the difference between Java/Python/Node.js and native languages like C/C++/Rust/Pascal.

Without a doubt. You are 100% correct. Lazarus is the only IDE I will use from time to time. I do all my work in vim, including Pascal. If I need a GUI app I will open Lazarus. I value battery life and being able to do 8 hours of work on my laptop vs being chained to a power source. I run low ram, slow cpu, 1 drive, crap video card, 99% cli apps, and firefox to achieve that. I would have to wait 15 mins for Eclipse to open, Lazarus opens instantly. The other dude just can't understand, we are in a time, we understand throwing more resources at it was a bad idea. Sure eclipse runs great on 32GB of ram, his system is not, avg,  commodity hardware. 

eMko

  • New Member
  • *
  • Posts: 13
Re: The future of Free Pascal
« Reply #266 on: March 22, 2017, 07:12:56 am »
DotNet got many things right (like mandatory JIT, generics, nullable types and autoboxing) that a sleeping Java fixed only in 1.5 and after. It's interoperability with native code is better/easier too. (pinvoke vs jni)

(disclaimer I abandoned these kinds of languages in 2005, might have changed since)

Luckily for me (Java & C# programmer) it has changed on the Java side.

.Net has always had 2 forms of calling a native code:
1) through C++/CLI (redesign of Managed C++) - all the hard work is done on the side of the library (C++), you just call .Net classes which it exposes. So you have to wrap the library in your C++ code.

2) through P/Invoke - all the work is done on the C# side, you just call a C library (or library with C interface, doesn't work for C++ classes) and marshall the data. Feels like calling a C library from FreePascal.

Java has also two:
1) JNI - similar to C++/CLI, just with plain C++, not with language extensions. Therefore the JNI libraries can be built by any compiler you want.

2) JNA (Java Native Access, since 2007) - similar to P/Invoke.

Many languages has these two forms, including Python (Python C modules vs ctypes). The 1st is usually faster and more efficient, the 2nd is easier and safer. I'd choose the 2nd any single day unless I'd run into problems. For the past 10 years, I had to use C++/CLI over P/Invoke only once in my daily job.

eMko

  • New Member
  • *
  • Posts: 13
Re: The future of Free Pascal
« Reply #267 on: March 22, 2017, 07:33:24 am »
Java is still really slow and hungry for resources.
That's the main reason why I don't use any Java based IDE.
Even VSCode, based on Typescript, is faster than Netbeans, Eclipse, ..
The only thing that comes really, really close to being excellent is everything that JetBrains does.  8)

You can't compare VSCode with NB/Eclipse. The former has very limited features compared to the later ones, it's simpler and its architecture is created with having Node.js, Chromium and Google V8 in mind with all their limitations.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: The future of Free Pascal
« Reply #268 on: March 22, 2017, 10:44:20 am »
Java IDEs are resource hungry. There is no getting around it.
And "native non Java based" web browsers (Chrome, Chromium, Opera and Firefox) all are *very* resource hungry too! So there you go, it's not just a Java problem.

Have you ever monitored Lazarus IDE resource usage after you have used it for about an hour? It hogs up an awful lot of RAM too. At least Eclipse and IntelliJ IDEA do about 20x more code analysis and other functionality etc while running - compared to Lazarus IDE. So it makes sense the former two IDE's use lots of RAM.

In my experience, RAM is dirt cheap, so get as much of it as your system can handle. If you starve your system of RAM, any application is going to perform badly - no matter what SSD hard drive or CPU you have. Maybe the reason why my Java applications (yes, even Eclipse) runs at native application speed, is because I have enough resources available in my system (especially RAM, which I know every application, OS, desktop environment loves).

I also choose my environment wisely. FreeBSD seems to perform better than Linux or Windows in my experience. The GNOME/MATE desktop environment hogs 2GB of RAM easily, hence I run JWM window manager instead which only uses 8MB of RAM. I don't need the extra bells and whistles, and I'd rather that other real applications have that extra RAM.

Anyway, we are drifting off-topic, so I'll stop here.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: The future of Free Pascal
« Reply #269 on: March 22, 2017, 10:46:52 am »
DotNet got many things right (like mandatory JIT, generics, nullable types and autoboxing) that a sleeping Java fixed only in 1.5 and after. It's interoperability with native code is better/easier too. (pinvoke vs jni)

(disclaimer I abandoned these kinds of languages in 2005, might have changed since)

Luckily for me (Java & C# programmer) it has changed on the Java side.

Thanks for the info. But the point was a bit that the innovation there came from the .NET/C# side, not from Java, same with e.g. Linq and support of multiple languages by the VM. Java only caught up.

P.s. I abandonned Java and C# because I changed jobs into a more embedded position where they were not relevant.

 

TinyPortal © 2005-2018