Recent

Author Topic: A question on Modula2 vs Free Pascal  (Read 15053 times)

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1198
Re: A question on Modula2 vs Free Pascal
« Reply #60 on: March 19, 2024, 12:05:06 am »
@dodeep nobody is fooled by your change of name

@fpc users
See this ?
Quote
b) most importantly for the voice of reason in here
There are persons who either play the "investigator", or use irony. 
He is trying to use divide and conquer tactics get us to fight eachother to disrupt the community. That’s what these people do.
Quote
A bit friendlier please. Not every new guy is suspect directly
I’m very friendly to people who know pascal and are serious about using it. I do not enjoy encounters with the opposite.  O:-)

If there is a technological way to ensure that everyone knows at least rudimentary pascal before being allowed to post in here, it would save many helpful people a lot of wasted time and grief.
« Last Edit: March 19, 2024, 12:23:09 am by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

Thaddy

  • Hero Member
  • *****
  • Posts: 16139
  • Censorship about opinions does not belong here.
Re: A question on Modula2 vs Free Pascal
« Reply #61 on: March 19, 2024, 12:38:08 am »
Joanna, Marcov is allowed to always put me right. My answer could indeed be interpreted as unfriendly.
It wasn't. OP did not put any effort in. That hurts me. He seems not a noob, lacks basic linux build-from-source knowledge and does not listen to Mark and me. He should have had a running M2 this weekend.

At least i have Modula-2 installed....(for now)
« Last Edit: March 19, 2024, 01:08:00 am by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1198
Re: A question on Modula2 vs Free Pascal
« Reply #62 on: March 19, 2024, 01:36:43 am »
@thaddy I’ve heard stories of you scolding people but I’ve never had a problem with you  :)

I’m sorry to say but you and mark Had your efforts to help wasted upon someone who didn’t deserve them.

Thaddy, you have done nothing wrong. The goal of this person who does not even know pascal was to attack the nice people in this forum who try to help. If he keeps being allowed to do this the forums will become toxic and less helpful as people get burned out and leave.

This is just another “Trojan horse“ Style attack upon the fpc community.
They like to disguise themselves as new people interested in pascal but they are really like a weapon filled with poison once they get in.

They are really easy to stop though. Just don’t allow people who don’t know pascal to post.  Problem solved.  8)
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

speter

  • Sr. Member
  • ****
  • Posts: 352
Re: A question on Modula2 vs Free Pascal
« Reply #63 on: March 19, 2024, 03:09:19 am »
They are really easy to stop though. Just don’t allow people who don’t know pascal to post.  Problem solved.  8)
I would not support this approach.

I would suggest the opposite -> give help to everyone who asks; especially those with poor (or no) knowledge of Pascal.

cheers
S.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

LV

  • Full Member
  • ***
  • Posts: 153
Re: A question on Modula2 vs Free Pascal
« Reply #64 on: March 19, 2024, 07:39:34 am »
Code: Pascal  [Select][+][-]
  1. program project1;
  2.  
  3. {$R *.res}
  4.  
  5. begin
  6.   writeln('Pascal Community - 1 :-(');
  7.   readln;
  8. end.    
  9.  
  10.  

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1198
Re: A question on Modula2 vs Free Pascal
« Reply #65 on: March 19, 2024, 08:08:26 am »
They are really easy to stop though. Just don’t allow people who don’t know pascal to post.  Problem solved.  8)
I would not support this approach. I would suggest the opposite -> give help to everyone who asks; especially those with poor (or no) knowledge of Pascal.
cheers
It’s easy to be idealistic when it was not your time that was squandered isn’t it?
The idea of giving help to anyone who comes along and asks questions Sounds great. Are YOU willing to donate YOUR  time answering every question ? {I’ll read your posts to find out..} if I were to ask you for help with something would you help me ?

The people who developed fpc/Lazarus and people who come here are unpaid volunteers donating their time. They have absolutely no obligation to help anyone. They most certainly have no obligation to be the playthings of bored trolls. Everytime this happens people become a little bit more cynical and less likely to help.

At this point the needs of people who actually use fpc should be given priority over trying to entice unknown people to use FPC.

The best way to attract people who are genuinely interested in using fpc is to not allow malicious people to be disruptive. Forums that look good and are full of sensible constructive conversations about pascal are much more likely to attract sincere new members than threads such as
“do my homework for me it’s due by tomorrow..bruh!” ,
 “fornicate windows defender” ,
“I’m gonna waste your time pretending I’m having difficulty downloading modula2 “
Or the recent threads where the guy trolling the castle game engine developer Forums decided to do the same to people here.

People get scared away by the unpleasant drama that trolls are so good at creating. No newbie who needs help should ever have to experience “go google” , rtfm or even worse complete silence yet this is what happens when people  who were once wanting to help have had too many troll encounters. People getting their time wasted by trolls is not going to make the situation better, only worse. {and no I don’t blame anyone for getting mad at a troll}
This forum is being attacked by trolls and that is not fair to volunteers trying to help other fpc users with genuine problems.
« Last Edit: March 19, 2024, 08:52:56 am by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

MarkMLl

  • Hero Member
  • *****
  • Posts: 8001
Re: A question on Modula2 vs Free Pascal
« Reply #66 on: March 19, 2024, 08:39:26 am »
Joanna, Marcov is allowed to always put me right. My answer could indeed be interpreted as unfriendly.
It wasn't. OP did not put any effort in. That hurts me. He seems not a noob, lacks basic linux build-from-source knowledge and does not listen to Mark and me. He should have had a running M2 this weekend.

At least i have Modula-2 installed....(for now)

I second that, but this thread leaves me with even less inclination to get involved.

Joanna, please cool it. You're not helping.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Akiko

  • Newbie
  • Posts: 5
Re: A question on Modula2 vs Free Pascal
« Reply #67 on: June 05, 2024, 05:25:52 pm »
Uh, never though that Modula-2 stuff would come up here. Nice to see, really.

At least i have Modula-2 installed....(for now)

Yeah, at least the ISO part 1 version included in GCC 13 and up is really nice. (I build my own GCC compilers, currently GCC 15 snapshot 20240602.) Though, I hope they will add ISO part 2 (classes) and ISO part 3 (generics) soon. I mean Modula-2 is really nice, but writing instances (instead of "templates" for instancing objects) is a bit clumsy. The GCC people did a really good job here. The interface for attaching Modula-2 to C-libs (aka wrappers) is so well done, I already use my own Raylib wrapper and currently finishing a Xlib/X11 wrapper. Hmm, I even added threading by attaching to the pthreads lib. It works, but ugh, the macros in the pthread includes I have to rewrite in Modula-2, are a nightmare. Modula-2 itself has working processes and coroutines, but both are not concurrency (aka truly run in parallel) and their thread system (RTco) is broken. This is the only weak point compared to FreePascal. And it looks like the GCC backend does some damn good optimizations, fpc does really look bad here.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8001
Re: A question on Modula2 vs Free Pascal
« Reply #68 on: June 05, 2024, 10:40:54 pm »
I was able to map M2 coroutines directly onto x86 protected-mode tasks in an embedded system. Which I suppose is interesting when you consider that M2 was fairly closely related to Ada, and that the x86 was a very much cut-down derivative of the iAPX-432 which was designed to run Ada.

M2 as per Wirth did, AIUI, have an IOTRANSFER() for handling interrupts: I believe that somebody- probably in the context of JPI/Topspeed but by now the memory's faint- reworked that to take prioritisation into account.

If you reserve a single coroutine as the scheduler and ensure that ticks (etc.) transfer control back to it, then you can implement something pretty much like a standard OS. However the overhead can get out of control, and you're left with the same problems that caused Mach and its successors (notably the L series) enormous difficulty.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Akiko

  • Newbie
  • Posts: 5
Re: A question on Modula2 vs Free Pascal
« Reply #69 on: June 06, 2024, 08:18:14 pm »
I'm not sure how all the interrupt stuff is done in the GCC Modula-2 version. I mean, accessing and dealing with interrupts in a modern OS where a kernel handles all this, is a different beast. This is not DOS. It can be done in Linux using upposts and UIO. But for that GCC must provide a decent Modula-2 runtime (which actually clocks in at about 75kb if linked statically on x86_64). I did not try interrupt stuff yet. Coroutines work very well, but they way how they are done in Modula-2 is different from what I'm used to. I mean compared to C++20 where you (currently) have to write all the corountine boilerplate code. And dealing with masking - good old C/C++ bitmasking using normal integral types - is actually a pain in the ass.

Hmm, bringing Topspeed Modula-2 as an example is a bit odd. They did some really weird shit like GOTO/LABEL features, though, today it is basically the only useful documentation you still can find. :D It is really odd that Pascal made it that far and Modula-2 basically disappeared. For me Modula-2 is the much cleaner and better structured language.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8001
Re: A question on Modula2 vs Free Pascal
« Reply #70 on: June 07, 2024, 09:08:37 am »
Some Linux-based APIs provide something "interrupt-like", for example the newer GPIO API (which I've previously found deficient in several areas).

Hmm, bringing Topspeed Modula-2 as an example is a bit odd. They did some really weird shit like GOTO/LABEL features, though, today it is basically the only useful documentation you still can find. :D It is really odd that Pascal made it that far and Modula-2 basically disappeared. For me Modula-2 is the much cleaner and better structured language.

Topspeed was a Borland spinoff.

I'd certainly hope that M2 was superior, since Wirth had had time (and tools) to do the job properly while Pascal was a hack to preempt ALGOL-68.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11930
  • FPC developer.
Re: A question on Modula2 vs Free Pascal
« Reply #71 on: June 07, 2024, 09:46:01 am »
I went back to FreePascal after I looked for something new after 16-bit Topspeed range, because first it was there (a relatively productive open
source environment with clear growth  in it). The string support, and to get a bit away from all the language minimalist. (which was IMHO fine for embedded use, but a tad unproductive otherwise)

MarkMLl

  • Hero Member
  • *****
  • Posts: 8001
Re: A question on Modula2 vs Free Pascal
« Reply #72 on: June 07, 2024, 10:02:21 am »
I went back to FreePascal after I looked for something new after 16-bit Topspeed range, because first it was there (a relatively productive open
source environment with clear growth  in it). The string support, and to get a bit away from all the language minimalist. (which was IMHO fine for embedded use, but a tad unproductive otherwise)

To get anything better than FPC, I've concluded that you have to go back to ALGOL-60 and then work forwards avoiding the dead ends.

Pascal introduced some remarkable innovations, notably the type system. Build on that with a decent polymorphic structure for functions (which could handle automatic dereferencing etc. where necessary), syntax-aware macros (i.e. rather than straight text substitution) and so on, and you've got a foundation language which can be customised for just about anything.

However I don't know how efficiently it could compile. If it implemented the macro system by defining parameters in terms of the underlying compiler-building notation, e.g. "this parameter can be a block of arbitrary complexity", it could end up being very hard work even for a modern processor which is several billion times more powerful than what Wirth had in the late 60s.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

mercurhyo

  • Sr. Member
  • ****
  • Posts: 253
Re: A question on Modula2 vs Free Pascal
« Reply #73 on: June 10, 2024, 01:16:12 pm »
afaik, after M2 Pr. Wirth created following "pascalish" languages :

- Oberon 2 known as A2 - OOP support

- Extended Pascal known as "blue box" if I remember. it's much more a fully built OOP O.S. but you can run it inside your own OS

- Oberon X (where x is the major number version, actually 7)

All are direct descendants of pascal and implement stuffs like garbage collectors on memory allocation, OOP, automatic instanciations, automatic multithreading,... etc... and so on ....

end of infos. Have fun !

n.b. I liked Oberon 2 pretty much !  8-)

you can try a forked/minimal version of an Oberon 2 compiler at

https://github.com/excelsior-oss/xds-ide/releases
« Last Edit: June 10, 2024, 01:30:19 pm by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

dtoffe

  • Jr. Member
  • **
  • Posts: 60
Re: A question on Modula2 vs Free Pascal
« Reply #74 on: June 12, 2024, 03:04:12 pm »
Yeah, at least the ISO part 1 version included in GCC 13 and up is really nice. (I build my own GCC compilers, currently GCC 15 snapshot 20240602.) Though, I hope they will add ISO part 2 (classes) and ISO part 3 (generics) soon.

Is there any legal way of getting the complete ISO Modula-2 (parts 1, 2 and 3) BNF definition without buying the ISO documents ? I mean, the BNF only.

Daniel

 

TinyPortal © 2005-2018