Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-03

Programming in Pascal .

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Yves Boudeville

Bonjour.
I am asking questions on the art of scientific computing from 1966. After Algol and Modula,
the U.C.S.D. Pascal system has been the touchstone of the scientific computing. This has
been devoted by Niklaus Wirth book and applied in Borland TP7 software. The only thing
scientists need is a strongly typed language with pixel access on a single graphical windows.
 This is needed, for instance, by Monte-Carlo simulations. We need the full power of the
computer with the pixel definition of the result because the eyes are the  best investigators
for scientific bugs. TP7 with graph was the best tool for that. For less mathematical
approaches, like 3D models it was sufficient to use Borland Delphi-7. Now, in 2019, it was
possible to use FPC compiler with Fp-IDE to make in laboratories good simulations of
scientific equations, very clean in FPC Pascal, with the Graphical tools PtcGraph, PtcCrt, etc
... It is far more useful than old Seymour Cray Fortran or C// on Connection Machines CM1 / CM2
of Hillis : Theses need M.I.T. gourous in big National Laboratories. Some years ago, it was possible with the good job of Nikolay Nikolov on  Ptc Pascal Units, to do
clean-proof use of computer to visualize physics in HDMI 1920 x 1080 x 65536c under Windows.
With lesser resolution, a work in Pascal was running without adding/changing a word under
Windows_Intel / Ubuntu_Linux / or Raspbian_Raspberry Rpi3. Now, for scientific use, it is not
possible because  ptcgraph etc... are not included in latest versions, for instance of Raspbian.
So, in order to use software in Physics, we are compelled use old versions of OS  2.6.4 Fpc
systems instead of 3.0.0 on /usr/lib/fpc to use our programs. It is a big problem for us because
we are interested by easy Pascal simulations of physics and we are newbie in systems. Will it be
an hope to have again under Fpc : PtcGraph, PtcCrt, PtcMouse... to do good job in physics ?

Friendly Yours.

P.S. I beg your pardon for my desesperately rusty English language because Classrooms are very

far from me in time ... ( I am 73 ) .

+-------------------------------------------+ I Mr ou Mme BOUDEVILLE, Yves & Nicole ; I I "Le Jardin des Arts", 28, Rue Leon FABRE I I 69100, VILLEURBANNE. FRANCE. I I Tel Domicile : 04.78.93.67.95 (Repondeur) I I Courriel: I +-------------------------------------------+ --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus

Reply by email

J. Gareth Moreton

Hello there Yves Boudeville,
That's great to hear that Pascal has served you well with scientific programming and the like.  I confess unfortunately I'm not familiar with the units, but I will be happy to see if I can help optimise them in places, either by writing platform-specific assembly language (with a Pascal fallback if it's not Intel x86_64), kind of my speciality, or compiler improvements.
Are you sure that PtcGraph isn't stil available? I just checked with the development version and it seems to be present.
Gareth aka Kit.

On Tue 26/03/19 08:07 , Yves Boudeville sent:
Bonjour.
I am asking questions on the art of scientific computing from 1966. After Algol and Modula,
the U.C.S.D. Pascal system has been the touchstone of the scientific computing. This has
been devoted by Niklaus Wirth book and applied in Borland TP7 software. The only thing
scientists need is a strongly typed language with pixel access on a single graphical windows.
 This is needed, for instance, by Monte-Carlo simulations. We need the full power of the
computer with the pixel definition of the result because the eyes are the  best investigators
for scientific bugs. TP7 with graph was the best tool for that. For less mathematical
approaches, like 3D models it was sufficient to use Borland Delphi-7. Now, in 2019, it was
possible to use FPC compiler with Fp-IDE to make in laboratories good simulations of
scientific equations, very clean in FPC Pascal, with the Graphical tools PtcGraph, PtcCrt, etc
... It is far more useful than old Seymour Cray Fortran or C// on Connection Machines CM1 / CM2
of Hillis : Theses need M.I.T. gourous in big National Laboratories. Some years ago, it was possible with the good job of Nikolay Nikolov on  Ptc Pascal Units, to do
clean-proof use of computer to visualize physics in HDMI 1920 x 1080 x 65536c under Windows.
With lesser resolution, a work in Pascal was running without adding/changing a word under
Windows_Intel / Ubuntu_Linux / or Raspbian_Raspberry Rpi3. Now, for scientific use, it is not
possible because  ptcgraph etc... are not included in latest versions, for instance of Raspbian.
So, in order to use software in Physics, we are compelled use old versions of OS  2.6.4 Fpc
systems instead of 3.0.0 on /usr/lib/fpc to use our programs. It is a big problem for us because
we are interested by easy Pascal simulations of physics and we are newbie in systems. Will it be
an hope to have again under Fpc : PtcGraph, PtcCrt, PtcMouse... to do good job in physics ?

Friendly Yours.

P.S. I beg your pardon for my desesperately rusty English language because Classrooms are very

far from me in time ... ( I am 73 ) .

+-------------------------------------------+ I Mr ou Mme BOUDEVILLE, Yves I I "Le Jardin des Arts", 28, Rue Leon FABRE I I 69100, VILLEURBANNE. FRANCE. I I Tel Domicile : 04.78.93.67.95 (Repondeur) I I Courriel: [1] I +-------------------------------------------+ --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus [2]

Reply by email

Carsten Bager
to Yves Boudeville: Bonjour. I am asking questions on the art of scientific computing from 1966. the U.C.S.D.…

Hi
If you download FPC and source, then I think it can be done. I have tried to do this test program on my Pi.
Below is a description of the installation of Lazarus, you can skip the lazarus part. Carsten

Program Test1;
{$RANGECHECKS ON}
{$OVERFLOWCHECKS ON}
{$S+ STACK CHECKING ON}
{$SMARTLINK ON}
{$TYPEINFO ON}
{$LONGSTRINGS ON}
{$VARSTRINGCHECKS Off}

Uses
cthreads,
classes,
sysutils,
PtcMouse,
PtcCrt,

  PtcGraph;
Begin
  Writeln('Test');
End.

Compiled with
/pp/Fpc/bin/fpc -gl -XX -FU"Ppu" -Fu"/pp/fpcsrc/packages/graph/src/ptcgraph" -Fi"/pp/fpcsrc/packages/graph/src/inc" Test1.pp

This is done on a Pi
Free Pascal Compiler version 3.0.4 [2017/10/11] for arm Copyright (c) 1993-2017 by Florian Klaempfl and others Target OS: Linux for ARMHF
Compiling Test1.pp
Assembling test1
Linking Test1
Test1.pp(19,17) Warning: "crtbegin.o" not found, this will probably cause a linking failure Test1.pp(19,17) Warning: "crtend.o" not found, this will probably cause a linking failure /usr/bin/ld: warning: link.res contains output sections; did you forget -T? 19 lines compiled, 3.4 sec
2 warning(s) issued

If you want the newest Lazarus IDE on a PI, do the following (I use Midnight Commander on the Pi (sudo apt-get -y install mc) when unpacking tgz files etc).

1. Download FPC for Pi (Everything in 1 big package for eabihf ABI for raspberry)<ftp://ftp.hu.freepascal.org/pub/fpc/dist/3.0.4/arm-linux/fpc-3.0.4.arm-linux-eabihf-raspberry.tar>
2. Download FPC source (fpc-3.0.4.source.tar.gz)<ftp://ftp.hu.freepascal.org/pub/fpc/dist/3.0.4/source/fpc-3.0.4.source.tar.gz>
3. Download Lazarus source (lazarus-1.8.4.tar.gz) or (lazarus-2.0.0.tar.gz)<https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%202.0.0/lazarus-2.0.0.tar.gz/download>
4. Create a folder /pp that belongs to the pi user and the pi group. (sudo install -d -o pi -g pi -m 0770 /pp) Install Fpc in /pp/fpc folder
Create a /pp/fpcsrc folder
Place the downloaded fpc source in /pp/fpcsrc
Create a /pp/lazarus
Place the downloaded lazarus source /pp/lazarus
5. Place the make-lazarus-first.sh script in /pp/lazarus
6. Run the make-lazarus-first.sh script
7. Place the make-lazarus.sh script in /pp/lazarus
8. Run the make-lazarus.sh script
9. Create link in /bin to fpcres (sudo ln -sf /pp/fpc/bin/fpcres /bin/fpcres).
10. To create a Menu Programming short cut, go to
Menu -> Preferences-> Main Menu Editor
11. To create a Desktop short cut, place the text file "Lazarus" in the folder "/home/pi/Desktop/"

* Filename = "Lazarus"
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Lazarus
Comment=Pascal IDE
Icon=/pp/lazarus/ide/lazarus.ico
Exec=/pp/lazarus/startlazarus
Terminal=false
Categories=X-Debian-Applications-Editors;

* Filename = "make-lazarus-first.sh"
#!/bin/sh
#sudo apt-get update
sudo apt-get install -y libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev gir1.2-coglpango-1.0 libpangox-1.0-dev xorg-dev libgtk2.0-dev libpango1.0-dev

* Filename = "make-lazarus.sh"
#!/bin/sh
export PATH=/pp/fpc/bin:$PATH
make all OPT=-dFPC_ARMHF
sleep 60
make install OPT=-dFPC_ARMHF PREFIX=/pp/lazarus

* Links
Lazarus on Raspberry Pi<http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi>

Yves Boudeville wrote 67 lines
Bonjour. I am asking questions on the art of scientific computing from 1966. After Algol and Modula, the U.C.S.D. Pascal system has been the touchstone of the scientific computing. This has been devoted by Niklaus Wirth book and applied in Borland TP7 software. The only thing scientists need is a strongly typed language with pixel access on a single graphical windows. This is needed, for instance, by Monte-Carlo simulations. We need the full power of the computer with the pixel definition of the result because the eyes are the best investigators for scientific bugs. TP7 with graph was the best tool for that. For less mathematical approaches, like 3D models it was sufficient to use Borland Delphi-7. Now, in 2019, it was possible to use FPC compiler with Fp-IDE to make in laboratories good simulations of scientific equations, very clean in FPC Pascal, with the Graphical tools PtcGraph, PtcCrt, etc ... It is far more useful than old Seymour Cray Fortran or C// on Connection Machines CM1 / CM2 of Hillis : Theses need M.I.T. gourous in big National Laboratories. Some years ago, it was possible with the good job of Nikolay Nikolov on Ptc Pascal Units, to do clean-proof use of computer to visualize physics in HDMI 1920 x 1080 x 65536c under Windows. With lesser resolution, a work in Pascal was running without adding/changing a word under Windows_Intel / Ubuntu_Linux / or Raspbian_Raspberry Rpi3. Now, for scientific use, it is not possible because ptcgraph etc... are not included in latest versions, for instance of Raspbian. So, in order to use software in Physics, we are compelled use old versions of OS 2.6.4 Fpc systems instead of 3.0.0 on /usr/lib/fpc to use our programs. It is a big problem for us because we are interested by easy Pascal simulations of physics and we are newbie in systems. Will it be an hope to have again under Fpc : PtcGraph, PtcCrt, PtcMouse... to do good job in physics ? Friendly Yours. P.S. I beg your pardon for my desesperately rusty English language because Classrooms are very far from me in time ... ( I am 73 ) . -- +-------------------------------------------+ I Mr ou Mme BOUDEVILLE, Yves & Nicole ; I I "Le Jardin des Arts", 28, Rue Leon FABRE I I 69100, VILLEURBANNE. FRANCE. I I Tel Domicile : 04.78.93.67.95 (Repondeur) I I Courriel: I +-------------------------------------------+ --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Tomas Hajny

Hello,

Please note that the original poster isn't subscribed to the list apparently, you may better include him in Cc: when responding (doing that myself now).

As far as I can tell, the issue may be more likely related to the packaging of a particular Linux distribution (Raspbian in this case?) than FPC itself. Obviously, it should be possible to build either just the required packages with the FPC version distributed there, or the complete latest release of FPC there, but that obviously needs some additional effort. In any case, questions about not having PTC included with Raspbian might be better sent to the respective maintainer of Raspbian.

Tomas

Earlier message 83 lines
-------------------- Original Message -------------------- Subject: Re: [fpc-devel] Programming in Pascal . From: "J. Gareth Moreton" Date: Wed, March 27, 2019 09:56 To: "FPC developers' list" Hello there Yves Boudeville, That's great to hear that Pascal has served you well with scientific programming and the like.  I confess unfortunately I'm not familiar with the units, but I will be happy to see if I can help optimise them in places, either by writing platform-specific assembly language (with a Pascal fallback if it's not Intel x86_64), kind of my speciality, or compiler improvements. Are you sure that PtcGraph isn't stil available? I just checked with the development version and it seems to be present. Gareth aka Kit. On Tue 26/03/19 08:07 , Yves Boudeville sent: Bonjour. I am asking questions on the art of scientific computing from 1966. After Algol and Modula, the U.C.S.D. Pascal system has been the touchstone of the scientific computing. This has been devoted by Niklaus Wirth book and applied in Borland TP7 software. The only thing scientists need is a strongly typed language with pixel access on a single graphical windows.  This is needed, for instance, by Monte-Carlo simulations. We need the full power of the computer with the pixel definition of the result because the eyes are the  best investigators for scientific bugs. TP7 with graph was the best tool for that. For less mathematical approaches, like 3D models it was sufficient to use Borland Delphi-7. Now, in 2019, it was possible to use FPC compiler with Fp-IDE to make in laboratories good simulations of scientific equations, very clean in FPC Pascal, with the Graphical tools PtcGraph, PtcCrt, etc ... It is far more useful than old Seymour Cray Fortran or C// on Connection Machines CM1 / CM2 of Hillis : Theses need M.I.T. gourous in big National Laboratories. Some years ago, it was possible with the good job of Nikolay Nikolov on  Ptc Pascal Units, to do clean-proof use of computer to visualize physics in HDMI 1920 x 1080 x 65536c under Windows. With lesser resolution, a work in Pascal was running without adding/changing a word under Windows_Intel / Ubuntu_Linux / or Raspbian_Raspberry Rpi3. Now, for scientific use, it is not possible because  ptcgraph etc... are not included in latest versions, for instance of Raspbian. So, in order to use software in Physics, we are compelled use old versions of OS  2.6.4 Fpc systems instead of 3.0.0 on /usr/lib/fpc to use our programs. It is a big problem for us because we are interested by easy Pascal simulations of physics and we are newbie in systems. Will it be an hope to have again under Fpc : PtcGraph, PtcCrt, PtcMouse... to do good job in physics ? Friendly Yours. P.S. I beg your pardon for my desesperately rusty English language because Classrooms are very far from me in time ... ( I am 73 ) . -- +-------------------------------------------+ I Mr ou Mme BOUDEVILLE, Yves I I "Le Jardin des Arts", 28, Rue Leon FABRE I I 69100, VILLEURBANNE. FRANCE. I I Tel Domicile : 04.78.93.67.95 (Repondeur) I I Courriel: [1] I +-------------------------------------------+ --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus [2]

Reply by email

Tomas Hajny
Yves Boudeville wrote
Merci Tomas pour votre sympathique aide sur le Free Pascal.

Pas de quoi / you're welcome. :-)

.
.

I absolutely agree with you Tomas, I can do very interesting simulations 1920 x 1080 in using only Windows 10 / 64 bits for Fpc/Ptc and also I am conviced that Raspberry Rpi3 B+ ( 33.85 Euros) is a fantastic tool to do cheap scientific models. This is the reason why I am a little

.
.

To develop my scientific stuff, I have been helped very kindly by Nikolay Nikolov who, I hope, shall develop new PtcGraph modes in FpcPASCAL to reach in light programs the full HDMI capacity 1920 x 1080  x 65536c of the Rpi3 with the latest OS under Raspbian "stretch".

.
.

Admittedly, FPC doesn't seem to support the resolution 1920x1080 (hi-colour or true colour) on Unix platforms at the moment. I believe that Nikolay is subscribed to this list, he might be able to respond himself whether he sees possibility to extend the list of supported modes there.

Tomas

Reply by email

Paul Breneman
to Tomas Hajny
Tomas Hajny wrote 29 lines
On Wed, March 27, 2019 14:53, Yves Boudeville wrote: > Merci Tomas pour votre sympathique aide sur le Free Pascal. Pas de quoi / you're welcome. :-) . . > I absolutely agree with you Tomas, I can do very interesting simulations > 1920 x 1080 in using only Windows 10 / 64 bits for Fpc/Ptc and also I am > conviced that Raspberry Rpi3 B+ ( 33.85 Euros) is a fantastic tool to > do cheap scientific models. This is the reason why I am a little . . > To develop my scientific stuff, I have been helped very kindly by > Nikolay Nikolov who, I hope, shall develop new PtcGraph modes > in FpcPASCAL to reach in light programs the full HDMI capacity 1920 x > 1080  x 65536c of the Rpi3 with the latest OS under Raspbian "stretch". . . Admittedly, FPC doesn't seem to support the resolution 1920x1080 (hi-colour or true colour) on Unix platforms at the moment. I believe that Nikolay is subscribed to this list, he might be able to respond himself whether he sees possibility to extend the list of supported modes there. Tomas

I am also *very* interested to see if www.Ultibo.org will support PTC!

http://wiki.freepascal.org/ptc

http://wiki.freepascal.org/Textmode_IDE_development

Regards,
Paul
www.ControlPascal.com

Reply by email