Recent

Poll

What's your age bracket ?

10 to 19
3 (2.5%)
20 to 29
3 (2.5%)
30 to 39
15 (12.4%)
40 to 49
32 (26.4%)
50-59
43 (35.5%)
60-69
22 (18.2%)
70-79
2 (1.7%)
80-89
1 (0.8%)
90-99
0 (0%)
100+
0 (0%)

Total Members Voted: 119

Author Topic: Who are the Pascal lovers ?  (Read 6179 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10398
  • FPC developer.
Re: Who are the Pascal lovers ?
« Reply #75 on: November 24, 2022, 03:28:02 pm »
I haven’t tried it but in Lazarus if you make a simple console program do all the palettes with the gui controls still show? Even if they cannot be used?

Yes.

Quote
I don’t see any need to get rid of gui parts of Lazarus.

Not in all of lazarus. Just as a build/install option to do initial courses in some educational edition.

Quote
Why not teach it like Visual Basic was taught learning to operate the gui componets at same time as learning pascal?

Why no also throw quantum computing and neural networks into the mix?  :)

Seriously, the initial course must be as simple and overviewable as possible.  See also the remarks about boilerplate in the other message.

Even a certain percentage of CS masters never programmed before, and first need to get the basic idea. Often with the cooking recipe analogue (stir, check if done, if not goto stir) etc etc. Bits and pieces.

Quote
  Learning gui event programming is a valuable skill as well.

Less so than two decades ago. Most will never do anything but web and serverside development.

But even if it were, you need to phase it, and not throw everything and the kitchen sink at them in the first week.

Quote
I’ve never tried plain fpc. Is it more like turbo pascal was?

Yes. But as said, teaching students to operate console applications like the textmode IDE, and console apps in general is also lost time.  And quite often you only have 15-25 hours for the whole course.

Probably some limited framework to have some input and output in some GUI app is easier. But it is even easier to do that with precooked templates, with "// insert code here" comments.

Anyway the point is to listen to the needs of actual teachers.
« Last Edit: November 24, 2022, 03:31:41 pm by marcov »

Thaddy

  • Hero Member
  • *****
  • Posts: 12199
Re: Who are the Pascal lovers ?
« Reply #76 on: November 24, 2022, 03:35:26 pm »
Why no also throw quantum computing and neural networks into the mix?  :)
Well, the latter has been taken care off. Joao has his Ph.D and we have his code! All Freepascal.
« Last Edit: November 24, 2022, 03:40:28 pm by Thaddy »
Manuals, manuals, manuals first.
You have incompetence and sheer incompetence.

440bx

  • Hero Member
  • *****
  • Posts: 3157
Re: Who are the Pascal lovers ?
« Reply #77 on: November 24, 2022, 03:38:30 pm »
I wasn’t referring to people who write operating systems although I wish an operating system could be written in pascal
An operating system can and, has been, written in Pascal as @Winni's link showed.

That said, even FPC is a deficient choice when it comes to writing very low level code (e,g. an O/S.)   Not enough control and not optimized enough.

OTH, it's a much better language to develop application programs, e,g, word processors, spreadsheets, etc but, those are often written in C as well because there are plenty of C programmers out there that must be kept busy somehow (not to mention they are readily available.)

In addition to what @marcov mentioned...

One of the problems is that educational institutions are very rarely teaching _programming_, what they teach instead is a programming language and, there is an _enormous_ difference between the two (this is not new... this has been going on for many decades.)  That's one of the reasons there are programmers out there who cannot write a program unless the programming language supports OOP.    Basically, since they have not been taught programming, their mind is trapped in whatever programming language paradigm/straightjacket they were taught.

« Last Edit: November 24, 2022, 03:43:31 pm by 440bx »
FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 12199
Re: Who are the Pascal lovers ?
« Reply #78 on: November 24, 2022, 03:44:34 pm »
what they teach instead is a programming language and, there is a _enormous_ difference between the two (this is not new... this has been going on for many decades.)  That's one of the reasons there are programmers out there who cannot write a program unless the programming language supports OOP.   
Well, that is simply not true. In academics you learn programming and not a programming language. This has always been the case at the major institutions. Maybe you got out of luck in choosing your university? E.Dijkstra worked - mostly - with pen and paper, did not need hardware. As Charles Babbage and Ada Lovelace did not need working hardware.
Order is Philosophy -> Logic -> (math) -> application.
See https://en.wikipedia.org/wiki/On_the_Cruelty_of_Really_Teaching_Computer_Science
« Last Edit: November 24, 2022, 04:03:19 pm by Thaddy »
Manuals, manuals, manuals first.
You have incompetence and sheer incompetence.

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: Who are the Pascal lovers ?
« Reply #79 on: November 24, 2022, 03:56:51 pm »
I’m not sure if the decision to teach pascal is even up to teachers. Wouldn’t it be the school administration? Who knows if they are corrupted by donations. The schools most likely to be interested in free pascal are probably ones with limited budgets. It’s a shame because pascal is better than ever now.

Programming skills definitely go far beyond syntax. I don’t have a high opinion of formal education in general because it’s just teaching for tests. It takes many years of practice to get good at programming.  At best schools can help people get started as pascal programmers. Many believe that all important things are taught at school so when pascal classes were discontinued it was a real setback.
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10398
  • FPC developer.
Re: Who are the Pascal lovers ?
« Reply #80 on: November 24, 2022, 04:46:45 pm »
I’m not sure if the decision to teach pascal is even up to teachers. Wouldn’t it be the school administration?

It varies, and usually no single point. From education ministers that set lofty goals, to university boards that do the same, as to faculties that "prepare for the next decade" to the teachers themselves that have to be more practical.

Moreover not all schools teach all courses in one language. We had Java for PC and C for embedded work, with some rudimentary (8051) assembler here and there. Java was taught with Visual Cafe and later JBuilder, and both sucked :)

Quote
Who knows if they are corrupted by donations. The schools most likely to be interested in free pascal are probably ones with limited budgets. It’s a shame because pascal is better than ever now.

First list the reasons why they should choose pascal, only then begin with the paranoia arguments.


Quote
Programming skills definitely go far beyond syntax. I don’t have a high opinion of formal education in general because it’s just teaching for tests. It takes many years of practice to get good at programming.  At best schools can help people get started as pascal programmers. Many believe that all important things are taught at school so when pascal classes were discontinued it was a real setback.

I don't really agree. For starters, not everything is exams, most also have a lot of project work. Sure, there is more to it than just following the curriculum on auto pilot, but I see autodidact programmers often skirting or flat out avoiding some difficult topics with a range of excuses.  Lots of talk why it doesn't matter blabla bla, but they simply can't get it done.

For the top 1%, it probably doesn't matter and they will get there no matter what route they take. The most lazy 5-10% will do just enough to pass the exams, and let others pull the project work, and will graduate but still have no real skills and probably end up in shallow webdesign that is more layouting than programming. It is the average case that you aim, not the cases that you can't really influence.
« Last Edit: November 24, 2022, 11:00:30 pm by marcov »

440bx

  • Hero Member
  • *****
  • Posts: 3157
Re: Who are the Pascal lovers ?
« Reply #81 on: November 24, 2022, 05:38:35 pm »
Well, that is simply not true.
For something that you claim not to be true, I have to mention that I am yet to see an educational institution that teaches a _programming_ class _without_ using a programming language.   

Teaching programming does not need to be done using a programming language and, it is actually detrimental to teach it indirectly through the use of a programming language because the activity of programming does _not_ have the limitations present in most, if not all, languages.

IOW, in academics people learn programming _indirectly_, which is a major problem.

Programming languages are still being designed because some programmers have learned programming _the hard way_ and they realize that the programming languages they've used fall short of carrying out the many tasks that are pure programming.

FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 12199
Re: Who are the Pascal lovers ?
« Reply #82 on: November 24, 2022, 06:19:30 pm »
Well, that is simply not true.
For something that you claim not to be true, I have to mention that I am yet to see an educational institution that teaches a _programming_ class _without_ using a programming language.   

Teaching programming does not need to be done using a programming language and, it is actually detrimental to teach it indirectly through the use of a programming language because the activity of programming does _not_ have the limitations present in most, if not all, languages.

IOW, in academics people learn programming _indirectly_, which is a major problem.

Programming languages are still being designed because some programmers have learned programming _the hard way_ and they realize that the programming languages they've used fall short of carrying out the many tasks that are pure programming.
That is plain silly, because you forgot about the first: logic. Stupid people create stupid programs. You are esteemed, but don't make me calling you "the Donald" every time.
Manuals, manuals, manuals first.
You have incompetence and sheer incompetence.

440bx

  • Hero Member
  • *****
  • Posts: 3157
Re: Who are the Pascal lovers ?
« Reply #83 on: November 24, 2022, 06:51:30 pm »
@Thaddy,

Since you are into presidents... your post reminded me of what Abraham Lincoln once said "Better to remain silent... "

You should heed his advice or you end up looking like the ex-president you mentioned.

FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 SP1 64bit.

winni

  • Hero Member
  • *****
  • Posts: 3164
Re: Who are the Pascal lovers ?
« Reply #84 on: November 24, 2022, 09:49:10 pm »

Since you are into presidents... your post reminded me of what Abraham Lincoln once said "Better to remain silent... "



And Abe Lincoln has stolen this  from philosopher Boëthius, ~ 480 .. 525, Bergamo, Italy

Si tacuisses, philosophus mansisses.

If you kept silence, you continued to be a philosopher.

Winni
 

PascalDragon

  • Hero Member
  • *****
  • Posts: 4749
  • Compiler Developer
Re: Who are the Pascal lovers ?
« Reply #85 on: November 24, 2022, 10:16:54 pm »
Have any of you used the pascal os with fpc? or for other things?

Ultibo seems to be used quite a bit.

Seenkao

  • Sr. Member
  • ****
  • Posts: 416
    • New ZenGL.
Re: Who are the Pascal lovers ?
« Reply #86 on: November 25, 2022, 12:02:38 am »
Programming languages are still being designed because some programmers have learned programming _the hard way_ and they realize that the programming languages they've used fall short of carrying out the many tasks that are pure programming.
Хорошо бы это привести пример. Что именно нельзя сделать на Pascal? Что именно нельзя сделать на ассемблере?

Вы наверно хотели сказать, что стараются упростить программирование людям? Но это совершенно другое, это "облегчение" задач "программистам". Которых уже сложно назвать программистами. Они просто бездумно "собирают код", который работает за них. Это удобно только для начальных тестов. А в конечном итоге ведёт к программам которые очень медленно работают на очень мощных компьютерах.

google translate:
It would be nice to give an example. What exactly can't be done in Pascal? What exactly can not be done in assembler?

You probably wanted to say that they are trying to make programming easier for people? But this is completely different, this is the "facilitation" of tasks for "programmers". Who can hardly be called programmers. They just mindlessly "build code" that works for them. This is only useful for initial tests. And ultimately leads to programs that run very slowly on very powerful computers.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

440bx

  • Hero Member
  • *****
  • Posts: 3157
Re: Who are the Pascal lovers ?
« Reply #87 on: November 25, 2022, 12:33:07 am »
It would be nice to give an example. What exactly can't be done in Pascal? What exactly can not be done in assembler?
It's not about what cannot be done but about what _could_ be done which would significantly improve the quality of the code (measured in ease of understanding and maintenance) yet, features that would significantly improve a programming language are _still_ missing 60 to 70 years after the first compiler was written (1951 or 1957 depending on how "formal" you want to get about what a compiler is.)

One such feature which is almost trivial to implement is inline scopes (if memory serves, ADA has them.)  A very poor implementation exists in C and C++ (the open and close braces define a scope but both languages fail to implement instructions to control flow within a scope - something that is downright obvious by now.)   C++ even uses that brain-damaged implementation of scopes to implement RAII.

Programming isn't about a language or a grammar, it's about a set of facilities (implemented in the language's grammar) that enable a programmer to easily design local control flow graphs that fit the problem at hand. 

A programming language should be like clay that you can mold to fit the problem at hand.





FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 SP1 64bit.

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: Who are the Pascal lovers ?
« Reply #88 on: November 25, 2022, 01:10:54 am »
I read the discussion above and my conclusion is that the most important thing about programming is the algorithms. I always write down what I want to do on paper before trying to program it. There are a lot of things I’ve written down which people say is unnecessary or impossible.
Programming is fundamentally for getting things done. Everything besides the algorithms are just tools.
People who are not very knowledgeable about a topic are not going to write very good algorithms even if their coding skills are perfect. I know many aren’t going to agree but I believe that the best programs are written by people with more than just programming skill. For instance a game that simulates playing tennis should be written by expert tennis players etc

This is hardly the case. I believe that “modern “ programming has become dominated by drones who do it just for the money and have no principles. They have no problem of writing whatever they are told to in every new language or platform that comes along. They just do as little as they can get away with because they don’t care they are in it for the money. Also software projects are often rushed which makes the problem even worse. But then again if they didn’t have a taskmaster goading them they probably would never finish anything.

I know this sounds trivial but it has dire consequences because bad programmers are writing things like tax return processing software for the government. The government has literally replaced a large portion of their employees with “omnipotent “ computers. They no longer bother to answer their phones they want everyone to do things online interfacing with their computer. However, their website is just as bad as the tax processing software.
It’s is not too difficult to end up in the situation of being ordered to pay your taxes twice followed up by computer generated extortion letters threatening horrible things if you don’t pay up. The employees who work there do nothing but feed paper into the machines. They don’t care about anyone having problems or being treated unfairly. To top it off the computer can’t seem to handle complicated addresses and mangles my address so much that it’s a miracle that I get any mail from them at all.

I have even seen people who are programmers become apologists for badly written Social media software that “solves” the problem of possible difficult users by imposing more and more invasive demands for personal information as a condition for being there.

People in general are lazy and often don’t think of the possible consequences of information they are asked to provide both for themselves and society as a whole. This has only lead to everything imaginable being more and difficult to do yet nothing has improved in the ways that were promised and all the data collected is often ending up in the possession of some very unscrupulous people.
« Last Edit: November 25, 2022, 02:08:38 am by Joanna »
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

abouchez

  • Jr. Member
  • **
  • Posts: 67
    • Synopse
Re: Who are the Pascal lovers ?
« Reply #89 on: November 26, 2022, 10:18:51 am »
I read the discussion above and my conclusion is that the most important thing about programming is the algorithms.

I 100% agree with you.
And today, programmers forget about algorithms. They just use the language.

In a recent discussion here, we got a good proof of it: https://forum.lazarus.freepascal.org/index.php/topic,61035.msg461281.html#msg461281
The use case of this test program is to load two big CSVs into memory, then serve over HTTP some JSON generated by route identifiers, joining both CSVs.

The "modern" / "school" approach, as implemented in the reference project in Go/Rust/C#/... is using two lists for the CSVs data, then two maps/dictionaries between route ID and lists indexes.
This is fine, but for the "mORMot" version in FPC, I used another approach, with two diverse algorithms:
- I ensured the lists were sorted in memory, then made a O(log(n)) binary lookup in it;
- All stored strings were "interned", i.e. the same text was sharing a single string instance, and FPC reference counting did its magic.

There is no low-level tricks like generating the JSON by hand or using complex data structures (they still are high-level)

As a result:
- It uses much less memory - 10 times less memory;
- Performance is as fast as Go, and its very tuned/optimized compiler and RTL.
 :o

Main idea was to let the algorithms match the input data and the expected resultset.
As programmers do when programming games. Not as coders do when pissing out business or governmental software.   :P

The source code is still pretty readable, thanks to using mORMot efficient TDynArray to map the dynamic array storage, and its CSV and JSON abilities.
I guess source is still understandable for out-of-school programmers - much more readable than Rust for instance. To by fair, I used typed pointers in TScheduler.BuildTripResponse but it is not so hard getting their purpose, and FPC compiles this function into very efficient assembly. I could have used regular dynamic array access with indexes, it would have been slightly slower, but not really easier to follow, nor safer (if we compile with no range checking).
https://github.com/synopse/mORMot2/tree/master/ex/lang-cmp

Here are the numbers for memory:
Quote
Upon finished loading the CSV, mORMot only eats 80MB, heck so little. Sounds a bit magical. But during load test, it fluctuates between 250-350MB, upon which it returns to 80MB at the end.
The Go version eats 925MB upon finished loading the CSV. During load test, it tops at 1.5GB, returning to 925MB afterwards.


And to be fair, a regular/business/governmental coder would have used a database for this. Not silly memory structures. And asked for money on HW. >:D

It is not only about Pascal, it is about algorithms and libraries, but this sample was initially to compare them. Not only as unrealistic micro-benchmarks, or "computer language benchmark games", but as data processing abilities on a real usecase.
And... pascal is still in the race for sure! Not only for "old" people like me - I just got 50 years old. ;D
The more we spread such kind of information, the less people would make jokes about pascal programmers.
« Last Edit: November 26, 2022, 11:02:14 am by abouchez »

 

TinyPortal © 2005-2018