Recent

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

VisualLab

  • Hero Member
  • *****
  • Posts: 569
Re: A question on Modula2 vs Free Pascal
« Reply #45 on: March 18, 2024, 01:00:06 am »
Let's consider an example. Pascal uses '   ' for strings, Modula-2 uses either '   ' or "   ", neither supports multi-line string literals. There's sporadic debate in the FPC community about using either `   ` or '''   ''' to represent multi-line string literals, but wouldn't a better solution be a way to declare "/this/ sequence defines this derived string type which is closed by /this/ sequence" which would then work with the existing (excellent) polymorphic functions?

Or maybe you should ask yourself: is "stuffing" a large amount of text in an executable file really a good idea? Especially long content? Maybe a better solution is to place the text in a file (e.g. CSV, XML, etc.), load the contents of these files while the program is running and display the appropriate text only then? For this you do not need to "modify" the language and the compiler.

Moreover, the idea of the so-called "multi-line strings" comes from poorly designed scripting languages. How to add something to the language from features coming from the "better" rather than the "worse" ones.

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1198
Re: A question on Modula2 vs Free Pascal
« Reply #46 on: March 18, 2024, 03:47:45 am »
@visuallab
You reminded me of back when I was using turbo pascal and there was not enough memory to have all my menu strings be part of exe file and I had to resort to retrieving them from tresource file at runtime.

With Lazarus though I store most of my strings in file under tresourcestring
, I suppose that becomes part of exe?
✨ 🙋🏻‍♀️ 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: 16144
  • Censorship about opinions does not belong here.
Re: A question on Modula2 vs Free Pascal
« Reply #47 on: March 18, 2024, 07:06:21 am »
resourcestring is a reserved word (not tresourcestring).
And yes, resourcestrings will become part of a binary's resource file and linked in with {$R *.res}.
In Lazarus this is usually transparent.
If I smell bad code it usually is bad code and that includes my own code.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: A question on Modula2 vs Free Pascal
« Reply #48 on: March 18, 2024, 08:41:05 am »
a) for instance no gm2 executable was to be found in my system

i) Look very carefully at the build output, and at what file the final stage created.

ii) Was there a final  make install  stage or similar, to be run as root? What did it say it was doing and what actually happened?

Quote
b) when I tried to compile a sample program it did not work (I tried what you wrote as well, but nothing) -so the switches, probably, were not the actual problem

iii) SO TELL US WHAT HAPPENED FOR $DEITY'S SAKE!!!

Look we're generally interested in sorting this out, but you're really not giving us the info we need to do so.

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: 11931
  • FPC developer.
Re: A question on Modula2 vs Free Pascal
« Reply #49 on: March 18, 2024, 09:00:47 am »
(maybe install prefix? Quite often in the past software was set to install to /usr/local from source and changed to /usr when packaging)

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: A question on Modula2 vs Free Pascal
« Reply #50 on: March 18, 2024, 09:18:28 am »
(maybe, but he hasn't said anything about a configure stage that would set that up or given us a URL for the precise instructions he's using. Also he's told us that the build didn't work, then apparently run the compiler regardless...)
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

DoDep

  • New Member
  • *
  • Posts: 26
Re: A question on Modula2 vs Free Pascal
« Reply #51 on: March 18, 2024, 01:52:19 pm »
(maybe, but he hasn't said anything about a configure stage that would set that up or given us a URL for the precise instructions he's using. Also he's told us that the build didn't work, then apparently run the compiler regardless...)
A few posts back, I described the steps I did.

Thanks

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: A question on Modula2 vs Free Pascal
« Reply #52 on: March 18, 2024, 02:05:33 pm »
A few posts back, I described the steps I did.

You didn't. You said "For the time being I am building gm2 (veeeery time consuming ;-) )" and gave us a URL, then said it had built, then said you couldn't find gm2,

We're trying to help, but I for one have other things to do with my time.

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

gidesa

  • Full Member
  • ***
  • Posts: 141
Re: A question on Modula2 vs Free Pascal
« Reply #53 on: March 18, 2024, 02:07:30 pm »
( I repeat the joke :) )
Yeah...quite funny....not

The joke is on Specturm. But the site is alive and full of information.

DoDep

  • New Member
  • *
  • Posts: 26
Re: A question on Modula2 vs Free Pascal
« Reply #54 on: March 18, 2024, 02:30:28 pm »
You didn't.
From the previous page

Quote
Hello again!

I have followed the instructions to be found here:
https://www.nongnu.org/gm2/11/building.html
It seemed that the compilation was successful (make step) and the installation too (make install step). BUT:
a) for instance no gm2 executable was to be found in my system
b) when I tried to compile a sample program it did not work (I tried what you wrote as well, but nothing) -so the switches, probably, were not the actual problem
Regarding the prerequisites, well, I did all the necessary steps mentioned in the link above (which, strangely enough mentions only Debian as the "test bed").
Of course, eventually, something went wrong but I can not estimate what was that. That's why my latest question on alternatives.
Thank you.

PS #1 In PKG.ORG I saw just a few distros (like Fedora and Slackware) which have gm2 in their repos -except Debian. PS #2 Moreover, I searched for Void + GM2 but in vain...
PS #3 Another solution was to have multiple GNU GCC installations on my system (since my distro does not ship gm2),
           but again such a move was neither advised nor easy in practice.

It would be nice to read the threads first and then answer. Nevertheless, thanks for your time -no need to waste your time.

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1198
Re: A question on Modula2 vs Free Pascal
« Reply #55 on: March 18, 2024, 03:59:18 pm »
@Markmli this odysseus poster is probably the same one who started a thread about books for learning pascal And then quickly transitioned into declaring that he wouldn’t use oop  ::)

Its quite likely that he doesn’t know pascal at all. Also there is no guarantee that he is really trying to install anything, it could just be a pretext for engaging people in a frustrating discussion.
✨ 🙋🏻‍♀️ 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: 8007
Re: A question on Modula2 vs Free Pascal
« Reply #56 on: March 18, 2024, 04:34:21 pm »
It would be nice to read the threads first and then answer. Nevertheless, thanks for your time -no need to waste your time.

I would point out that the third message on the first page was from me, and I put in enough time to try to give you a reasonably in-depth answer. Also I re-read everything earlier, to make sure I'd not missed anything.

As Thaddy has suggested, you'd be better off sticking to a distro that didn't require you to build stuff from scratch. Perhaps Ubuntu, since Debian still requires a modicum of experience and common sense.

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

Thaddy

  • Hero Member
  • *****
  • Posts: 16144
  • Censorship about opinions does not belong here.
Re: A question on Modula2 vs Free Pascal
« Reply #57 on: March 18, 2024, 04:45:32 pm »
Indeed, he even accused me of not following the thread, which is obviously nonsence.
I compiled and installed m2 under debian without issues. OP seems the issue. I will leave this thread.

(now playing:free speech for the dumb. )
If I smell bad code it usually is bad code and that includes my own code.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11931
  • FPC developer.
Re: A question on Modula2 vs Free Pascal
« Reply #58 on: March 18, 2024, 05:29:18 pm »
A bit friendlier please. Not every new guy is suspect directly.

But the GM2 compilation issues can be better taken up in Modula2 support media. (I assume the maillist), it is offtopic here.

DoDep

  • New Member
  • *
  • Posts: 26
Re: A question on Modula2 vs Free Pascal
« Reply #59 on: March 18, 2024, 06:15:13 pm »
A bit friendlier please. Not every new guy is suspect directly.

But the GM2 compilation issues can be better taken up in Modula2 support media. (I assume the maillist), it is offtopic here.
I would like to thank you personally, for two things:
a) your time and effort
b) most importantly for the voice of reason in here
There are persons who either play the "investigator", or use irony.

Thanks, I am out of here.

Again, Markov thank you.

 

TinyPortal © 2005-2018