Re: [fpc-pascal] What to do to get new users

2024-10-19 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 18. Oktober 2024, 18:11:54 CEST schrieb Thomas Young via fpc-
pascal:
> Rainer, did you create this application with FPC? Please provide more
> information about its development.
> 
> Thomas Young
> 
> > On Oct 18, 2024, at 10:48 AM, Rainer Stratmann via fpc-pascal
> >  wrote:
> > 
> > Am Freitag, 18. Oktober 2024, 14:02:15 CEST schrieb Thomas Young via fpc-
> > 
> > pascal:
> >> One way to attract new users is create great software applications with
> >> FPC
> >> for the world to see.
> > 
> > https://klimaregelung.de/pages/deutsch/software.php

Originally it was started around 1990 with QuickBasic, then 1991 or 1992 moved 
to Turbo Pascal when it still wasn't very big. Inbetween there was another 
compiler and around 2005 it moved to Freepascal.

Sourcecode now:
- 4MB, 120.000 lines, about 100 units
- build in server written from scratch (which is not very difficult)
- own memory management for the server
- the software runs 24/7
- more than 100 clients use it
- runs on a debian linux os x86 system 
- plain screen 800 x 600 pixel or in a window (windows, kde) which puts the 
800x600 bitmap to the window
- minimum dependencies, nearly everything I wrote myself (serial 
unit,graphical output, browser access, etc.)
- very close to the operating system
- if an update is available all the clients have to do is to press an update 
button, all data structures (if they change) are updated automatically


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Rainer Stratmann via fpc-pascal
Am Samstag, 19. Oktober 2024, 15:34:48 CEST schrieb Hairy Pixels via fpc-
pascal:
>  On Oct 19, 2024 at 8:06:56 PM, Rainer Stratmann via fpc-pascal <
> 
> fpc-pascal@lists.freepascal.org> wrote:
> > Sorry, but if you start then you start with a simple program and then you
> > have
> > to gain experience over time. That is the same case everywhere.
> > 
> > There is a german sayword "Es ist noch kein Meister vom Himmel gefallen".
> > 
> > No master has yet fallen from the sky
> 
> All true but if the compiler can make your life easier then new people will
> be going that route. Manual memory management is a thing of the past I
> think it’s safe to say.

I really can not see where beginners have to struggle with memory management.
If a project gets bigger you have to think about it, yes. It depends on the 
coding style. In my project I wrote my own memory management for the 
webserver. It took me 3 weeks of work.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Rainer Stratmann via fpc-pascal
Am Samstag, 19. Oktober 2024, 14:57:32 CEST schrieb Hairy Pixels via fpc-
pascal:
>  On Oct 19, 2024 at 7:53:14 PM, Rainer Stratmann via fpc-pascal <
> 
> fpc-pascal@lists.freepascal.org> wrote:
> > I feel very safe with freepascal. I don't know what you are talking about.
> > It depends on the programmer who is in front of the computer.
> 
> We’re talking about new users and programmers that don’t have 25 years of
> experience with manual memory management. All news languages have some form
> of non-manual memory management where you don’t have to worry about memory
> leaks and double-frees etc.. leaving Pascal behind. That’s all I’m saying.

Sorry, but if you start then you start with a simple program and then you have 
to gain experience over time. That is the same case everywhere.

There is a german sayword "Es ist noch kein Meister vom Himmel gefallen".

No master has yet fallen from the sky

What you want causes much work and is not easy at all if I understand it 
right. I did not read all the details.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Rainer Stratmann via fpc-pascal
Am Samstag, 19. Oktober 2024, 14:20:45 CEST schrieb Hairy Pixels via fpc-
pascal:
> So right now if you wanted a low level compiled language to learn and you
> want some memory safety you’re still going for C++.

I feel very safe with freepascal. I don't know what you are talking about.
It depends on the programmer who is in front of the computer.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-18 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 18. Oktober 2024, 14:02:15 CEST schrieb Thomas Young via fpc-
pascal:
> One way to attract new users is create great software applications with FPC
> for the world to see.

https://klimaregelung.de/pages/deutsch/software.php


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-18 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 18. Oktober 2024, 06:37:59 CEST schrieb Nikolay Nikolov via fpc-
pascal:
> > Lazarus is for Delphi nostalgic guys, like me. I'm sure 90% of Lazarus
> > users have worked professionally with Delphi before.
> 
> Not me. I really think Free Pascal is an improvement over many "modern"
> languages. When I say some of the issues are not "quality of life"
> issues for me, means that I would never trade things like 10 times
> faster compilation speed or the runtime speed for something like tuples
> or having the ability to declare vars everywhere.

I agree with all your statements.
If we can make it easier for new users then they will use it more.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-17 Thread Rainer Stratmann via fpc-pascal
Am Donnerstag, 17. Oktober 2024, 03:24:07 CEST schrieb Ralf Quint via fpc-
pascal:
> Sorry, but do you really suggest that Lazarus should intentionally
> adjust itself to the shortcomings of other IDEs? Being able to move
> windows around over multiple (2 or 3) monitors is the most effective way
> to work., 

May be for you it is the most effective to work.

To exaggerate, the more monitors the better your code???

For me, at least at the moment the opposite is the case. I concentrate on a 
defined, clear area without any major distractions.

Of course, it is good to have the option of placing the windows on umpteen 
monitors. But this should not be the default setting.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 23:12:08 CEST schrieb Michael Van Canneyt via 
fpc-pascal:
> Actually, my employer has already offered twice to sponsor a web-designer to
> overhaul the website. Money was not an issue. The idea was to announce a
> contest and to select a winning design. The designer gets then the money.

What counts is a site that is alive.

Look at
https://www.mikrocontroller.net
This site is very alive. A lot of development is going on there.
You can even make a post as a guest without registration.

May be we don't have to reinvent the wheel and ask the owner.
https://www.mikrocontroller.net/contact


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Donnerstag, 17. Oktober 2024, 00:08:27 CEST schrieb Sven Barth via fpc-
pascal:
> News flash: this is how well behaved Linux applications are supposed to
> behave no matter if they are a "Linux system program" or not.

Haha, I did not know this. Very good that you tell me...

As far as I know fpcupdeluxe stores everything in one folder and that works 
(better).

> That said the FPC installer allows you to install FPC in a completely
> separate folder with only the configuration file(s) in your home directory
> (I do so for example, cause I have multiple FPC versions installed).

Very good.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 18:27:19 CEST schrieb Martin Frb via fpc-
pascal:
> >> Yeah, editor toolbar => you get that name, if you click the "configure"
> >> option. The toolbar can be on top or bottom.
> > 
> > However, this has to be done from scratch every time you install Lazarus
> > instead of having it in the basic installation.
> 
> That sounds like a bug to me. Unless you mean a really new install, not
> an upgrade?

Yes, I mean a really new install.
 
Sorry I am tired for today...


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 17:40:26 CEST schrieb xuser13--- via fpc-
pascal:
> Freepascal will never become popular in a world where JavaScript is
> everywhere, Delphi exists & Pascal has a reputation of not cool
> programming language.

I strongly believe that many users will have fun with Freepascal when it would 
be easy to use. Turbo Pascal was very popular because they made it easy. You 
can do everything with Freepascal.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 16:16:45 CEST schrieb Marco van de Voort via 
fpc-pascal:
> > I can't see any contradiction here. If we do things better, everyone
> > benefits.
> You need the new users to stick, not just to try it. Specially if you
> have to do a lot of trouble to increase the numbers only a bit. This is
> different from the really popular projects where small efforts can huge
> changes in usage.
> 
> It is not bad to work at release engineering and default behavior of the
> IDE, but it should be more focussed on what can be done with limited
> means without changing course, rather than wild new plans.

It is not that much work to appear more userfriendly.
Often it are little things. But when they not work you got stuck.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 15:54:20 CEST schrieb Martin Frb via fpc-
pascal:
> Define "Compiler".
> 
> You use one and the same fpc.exe.
> 
> But you need a different ppc.exe. All those ppc live in the same
> folder. And they are all called by the same fpc.exe, depending on the
> options given to that fpc.exe.
> 
> Of course, for that they must be installed as cross compilers. So they
> also share the fpc.cfg. But the all have their own ppu and o files.

That means fpc.exe calls another (more specific) compiler?
 
> Yeah, editor toolbar => you get that name, if you click the "configure"
> option. The toolbar can be on top or bottom.

However, this has to be done from scratch every time you install Lazarus 
instead of having it in the basic installation.
 
> Generally a matter of personal preference. I use a key combo, For me the
> toolbar is lost screen space.

Then may be a simple turn on/off toolbar button (I hope it is not a lost screen 
space for you :-) ) would make sense.

> But, I don't say my preference has to be the defining one. Since it can
> be disabled, IMHO it may be there to start with.
> As for which buttons should be on there by default, I have only a basic
> opinion (since I don't use it).

I think the buttons on my little mentioned screenshot are useful for all 
(beginners and experts). And next to it a shortcut icon to the edit of the 
toolbar. Edit of the toolbar is already possible with a right button click. 
Better would be an explicit button so that this is more obvious.
 
> But for people using toolbars, there is (both can be configured)
> - the "IDE coolbar" (toolbar in the main IDE window, where the menu is)
> - "Editor toolbar"
> 
> Since you can have many editor windows open, and each of them shows you
> the same "editor toolbar", IMHO that toolbar should have (as default)
> only buttons relating to the current editor (or the editor window / the
> tabs in the editor window).
> https://pasteboard.co/8CdEFiy4cZiy.png has 3 editor windows => 3 times
> the toolbar (not much on it in my case, but that is not the point)
> 
> Functions such as "compile the whole project" don't relate to a single
> Editor. Showing them multiply times (for each editor window) is imho not
> a proper default.
> 
> But of course fine for anyone who likes it.
> 
> > https://wiki.lazarus.freepascal.org/Screenshots
> > Look at all this screenshots. This userfriendly icons are configured
> > nowhere. I did not see them by now.
> 
> Well, I am not against having them visible as default. Or having a
> different set of them.
> Though I don't call that decision on my own.
> 
> - Find out on the Lazarus list (or bug tracker), what would be accepted
> - Within that, provide a patch. Or try to find someone who will.
> 
> That is how change happens.
> 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 15:09:47 CEST schrieb Liam Proven via fpc-
pascal:
> On Wed, 16 Oct 2024 at 00:16, Rainer Stratmann via fpc-pascal
> 
>  wrote:
> > At the Lazarus Congress in Cologne in October 2024, it ended up being very
> > interesting.
> 
> Promoting the event better might help! I did not know about it at all.

The official freepascal page would be a good place to promote it.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 14:03:39 CEST schrieb Marco van de Voort via 
fpc-pascal:
> Making sure the few initial
> converts stick is as important as getting more initial impressions.

I can't see any contradiction here. If we do things better, everyone benefits.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 11:20:35 CEST schrieb Martin Frb via fpc-
pascal:
> If it is cross compiling (using same compiler version), and if the
> compiler is installed (as cross compiler):
> Project Options > Compiler opts > Config and Target

But there is not the compiler itself. If you have different targets (for 
example i386 and avr embedded) I think you need different fpc compiler 
versions.

> You mean the editor toolbar?
> I don't know if it has ever been discussed, if/what the default config
> for it should be.

http://85.114.142.209:18080/uploads/x_Lazarus_with_icons.png
What you can see here at the bottom is what I called shortcut Icons.
If you want to compile the whole project you simply click on the button 
instead of searching it in the menu. That is one step to make it easier for 
all kinds of users.

https://wiki.lazarus.freepascal.org/Screenshots
Look at all this screenshots. This userfriendly icons are configured nowhere. I 
did not see them by now.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 11:07:25 CEST schrieb Nikolay Nikolov via fpc-
pascal:
> Or maybe, it's better? I don't know. Maybe explain what do you mean by
> "doesn't look like the project is very lively". Maybe we should post
> updates more often?

It all comes to the point of easy beginning.

For example if you look for Linux AMD64/Intel 64/x86_64 and want to download 
Freepascal.

You go to download. Then there are all kinds of various systems.

In my opinion it would be better to put the most popular systems on top.
This is Windows and Linux.

So you have to search AMD64/Intel 64/x86_64 and click on Linux.

Then if you click on SourceForge again you have a big confusing list of things 
you can download. At least for a beginner who wants to start coding. And that 
is the topic here: What to do to get new users?

If you click on Hungary/Canada this situation is not much better.

And if you finally got the right Package and were able to install it what do 
you have? Only the compiler.

This method is suitable for the experts of the experts. But not at all for a 
beginner.
 
> Kinda agree, at least for beginners and for small programs. How about
> the console IDE? I sometimes prefer it for small programs. But for large
> programs, nothing beats Lazarus.

Console IDE :-) Then better Lazarus.

> Free Pascal is exactly as "scattered" all over the Linux system, as gcc,
> clang, rust and pretty much any other compiler. How is this exactly a
> problem, since all major distros ship fpc as an official package and it
> is used to build other packages as well? It's not exactly difficult to
> do e.g. on Fedora:

In my view that is a huge problem. You defend it simply by saying other 
programs do it, too. You rely on the distro in relation to updates.

I am very experienced in making software that my clients understand. If I 
would throw the software in front of my clients like this I had no chance to 
sell it to them and to survive. I know exactly what I'm talking about. If 
there is an Update of the software more than 100 clients can press a button 
and in 10 seconds at the latest they have the newest version. I'm putting it 
on a golden platter because they don't even have to pay for it at the moment. 
Because I see it also as an advantage for me to learn from the clients needs. 
And it is a very big advantage to have a fast feedback. Instead of waiting 
years for the newest version.

With one ZIP File that contains all necessary files you can have a similar 
effect.

> Even strange distros like NixOS ship fpc. I'm sorry, but I don't get it,
> how is this a problem? Maybe for people who are new and want to get into
> FPC development and want to build it from source? But definitely not for
> new users.

May be it has changed (a little bit), but at least in the past it did not work 
smoothly  "out of the box". I am happy if I get Freepascal/Lazarus to work on 
my Debian distro. And then I cut the internet access and don't touch it 
anymore for years. Because I am afraid that something goes wrong and I have to 
start the whole process again.

It would definitely be better for understanding if everything is in one 
directory and not scattered over the whole system.

> 
> I tend to agree that Lazarus is a little bit too complex and convoluted
> for beginners.

:-)

> Still don't get it. Use your distro's package manager. If your distro
> doesn't package fpc, then become a packager and contribute fpc as a
> package. This way, fpc-compiled programs can also be added to the distro.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-15 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 04:00:30 CEST schrieb DougC via fpc-pascal:
> I don't think the situations are vary similar, so I don't think the
> comparison is useful.

I mainly wanted to say that it is possible to do so without extensive 
marketing. Linux is another example. Linux does not spend a huge amount of 
money in marketing. It is widely used because it runs stable and for some 
other reasons.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What to do to get new users

2024-10-15 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 16. Oktober 2024, 02:54:12 CEST schrieb DougC via fpc-pascal:
> So, faced with this situation, what can be done? Short of a massive and
> expensive marketing effort, not much...

Please notice that Telegram does not spend any money in marketing!
Pavel Durov, the founder of Telegram says that clearly in this interview:
https://www.youtube.com/watch?v=1Ut6RouSs0w&ab_channel=TuckerCarlson

In addition he says Telegram has a way better functionality than Whatsapp.

Telegram is one of the most popular messenger:
https://www.oberlo.com/statistics/most-popular-messaging-apps

Because it values the privacy it is under heavy pressure.
Otherwise it would be may be higher in the ranking.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] What to do to get new users

2024-10-15 Thread Rainer Stratmann via fpc-pascal
At the Lazarus Congress in Cologne in October 2024, it ended up being very 
interesting. An important question came up.

Why are no new users coming to Lazarus/Freepascal?
Why do we find it so difficult?
How can we get new, younger users to come to us?

The same questions came up over a year ago at a Freepascal/Lazarus meeting in 
Backnang.

I have some answers:

- The official Freepascal website doesn't look like the project is very lively. 

- Lazarus looks very complicated with its many windows. And it is also 
relatively complicated to understand and use. There are too many options that 
are too nested.

- Crosscompiling: The compiler file name is hidden in Tools - Settings instead 
of in the project settings. I found this out after some time. Since it was 
nowhere to be found in the project settings I first thought it might be hard-
coded!

- Linux: All relevant files (executable files, configuration files, source 
code, 
etc.) are scattered all over the Linux system. This is very complicated again. 
If Lazarus/Freepascal were a Linux system program it would make sense. But it 
is NOT a Linux system program. The chance that it will be used by several 
users on a multi-user system is close to zero.

- Fpcupdeluxe: A good idea. But it doesn't work. I have tried to install an 
AVR crosscompiler on a Linux system. Fatal: Can't find unit Infodrwf used by 
Project1. And ‘Project1’ does not use any unit at all.

- For a new installation of Lazarus: The most important quick start icons have 
to be configured again at the bottom of the source code window. So that fast 
and smooth work is possible. Instead of placing them like this from the start. 
The many confusing windows I have already mentioned above.

As good as Freepascal is. The situation described above is a brake pad and 
sooner or later leads to a dead end.

My tip is to put all the required files in one directory. This also makes it 
easier to install an installation on the different systems. Only one ZIP file 
is 
then required. And you can even install it without internet access.  
  
Translated with www.deepl.com


Auf dem Lazarus Kongress im Oktober 2024 in Köln war es am Ende sehr 
interessant. Eine wichtige Frage kam auf.

Warum kommen keine neuen Anwender zu Lazarus/Freepascal?
Warum tun wir uns damit so schwer?
Wie können wir es schaffen, dass neue, jüngere Anwender zu uns kommen.

Die gleichen Fragen kamen auch schon vor über einem Jahr bei einem Freepascal/
Lazarus-Treffen in Backnang auf.

Ich habe einige Antworten:

- Die offizielle Freepascal Webseite sieht nicht so aus, als wäre das Projekt 
sehr lebendig.

- Lazarus sieht mit seinen vielen Fenstern sehr kompliziert aus. Und es ist 
auch relativ kompliziert zu verstehen und zu bedienen. Es gibt zu viele 
Optionen, die zu sehr verschachtelt sind.

- Crosscompiling: Der Compiler Dateiname ist in Werkzeuge - Einstellungen 
anstatt in den Projekteinstellungen versteckt. Das habe ich nach einiger Zeit 
herausgefunden. Da er nirgendwo in den Projekeinstellungen zu finden war, 
dachte ich zuerst er sei vielleicht fest einkompiliert!

- Linux: Alle relevanten Dateien (ausführbare Dateien, Konfigurationsdateien, 
Quellcodes, etc.) sind über das gesamte Linux-System verstreut. Das ist wieder 
sehr kompliziert. Wäre Lazarus/Freepascal ein Linux Systemprogramm würde es 
Sinn machen. Es ist aber KEIN Linux Systemprogramm. Die Chance, dass es von 
mehreren Benutzern auf einem Mehrbenutzersystem verwendet  wird, geht gegen 
null.

- Fpcupdeluxe: Eine gute Idee. Aber es funktioniert nicht. Ich habe versucht 
auf ein Linux System einen AVR Crosscompiler zu installieren. Fatal: Can't find 
unit Infodrwf used by Project1. Und "Project1" benutzt überhaupt keine Unit.

- Bei einer Neuinstallation von Lazarus: Es müssen die wichtigsten 
Schnellstart Icons wieder sehr aufwändig unten im Quellcodefenster konfiguriert 
werden. Damit ein schnelles und reibungsloses Arbeiten möglich ist. Anstatt 
diese von Anfang an so zu platzieren. Die vielen verwirrenden Fenster habe ich 
oben schon erwähnt.
  
So gut Freepascal auch ist. Dier oben beschriebene Situation ist ein 
Bremsklotz und führt früher oder später in eine Sackgasse.

Mein Tipp ist es alle benötigten Dateien in einem Verzeichnis zu legen. 
Dadurch wird es auch einfacher eine Installation auf den verschiedenen 
Systemen zu installieren. Es wird dann nur noch eine ZIP-Datei benötigt. Und 
man kann es sogar ohne Internetzugang installieren.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What's in Hello World

2024-01-07 Thread Rainer Stratmann via fpc-pascal
Am Sonntag, 7. Januar 2024, 14:09:24 CET schrieb Florian Klämpfl via fpc-
pascal:
> > Am 07.01.2024 um 13:21 schrieb Ingemar Ragnemalm via fpc-pascal
> > :
> > 
> > Just for comparison, I fired up Think Pascal and made Hello world!
> > 
> > Plain Hello world, closes so quickly that you don't have time to see it:
> > 4625 bytes.
> > 
> > Including ShowText and while not Button do; 4639 bytes.
> > 
> > Yes, less than 5k! Progress?
> 
> https://github.com/chainq/amiga-tiny-hello-p
> 
> 244 bytes with FPC.

Is the size of AVR programs reasonable small?
Is the AVR code stable?
I would like to switch to freepascal.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] RIP: Software design pioneer and Pascal creator Niklaus Wirth

2024-01-05 Thread Rainer Stratmann via fpc-pascal
Misconstruing complexity as sophistication: According to Wirth, “people seem 
to misinterpret complexity as sophistication.” The more complicated a product 
is, the more polished or knowledgeable the user would appear. Hence, software 
vendors create complex software and send this marketing message.

I see it widely

https://www.techslang.com/definition/what-is-wirths-law/



Am Freitag, 5. Januar 2024, 10:13:53 CET schrieb Tony Whyman via fpc-pascal:
> "Swiss computer scientist Professor Niklaus Wirth died on New Year's
> Day, roughly six weeks before what would have been his 90th birthday."
> 
> https://www.theregister.com/2024/01/04/niklaus_wirth_obituary/?utm_source=da
> ily&utm_medium=newsletter&utm_content=top-article
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 1. September 2023, 18:46:06 CEST schrieb Peter B via fpc-pascal:
> Can you compile the crashing program with  -gl?

Yes, I can. I know this, but then the program is bigger. For finding the error 
it is useful, yes. Otherwise I switch it off. There are around 100 clients that 
download the program automatically.

> That should give you a useful stack dump with line numbers.
:-)


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 1. September 2023, 17:57:26 CEST schrieb Tomas Hajny via fpc-
pascal:
> On 2023-09-01 17:39, Rainer Stratmann via fpc-pascal wrote:
> > Ah, sorry. I Forgot it totally.
> > 
> > It is a plain console program under Linux.
> > 
> > Yes, the remaining program starts the crashing one and I would like to
> > check
> > the results? Yes, a run-time error was there.
> > 
> > I start the program with a console command.
> > 
> > An unhandled exception occured at $0814EC41:
> > EAccessViolation:  Access violation
> > 
> >   $0814EC41
> >   ...
> >   ...
> >   ...
> > 
> > This messages I need to read automatically
> 
> OK. You still missed to provide information on how you start the
> crashing program from the remaining program

Look above.
> > I start the program with a console command.
More precisely: I start the crashing program with a shell command from the 
remaining program.

Everything runs as root. These are more or less the only programs on this 
(mini-itx embedded) computer running. I have full control then.

> - certain approaches don't
> allow simple access to the result (e.g. checking whether it's still
> running or accessing the process exit code), whereas others do. However,
> in general, you need to redirect the output and stderr handles (e.g. to
> a pipe if doing it under Linux, but a file would do as well) and read
> them from the remaining program. As an example, TProcess (in unit
> Process) provides means for all of this.

If I start the program with

program 2>output.txt

it works! Thank you.

> 
> Tomas
> 
> > Am Freitag, 1. September 2023, 16:13:54 CEST schrieb Tomas Hajny via
> > fpc-
> > 
> > pascal:
> >> On 2023-09-01 15:43, Rainer Stratmann via fpc-pascal wrote:
> >> 
> >> 
> >> Hello,
> >> 
> >> > Where can I find the output of the error messages if a program crashes.
> >> > 
> >> > There is another program that still is running.
> >> > I want to read the error messages automatically if that is possible.
> >> 
> >> I'm afraid that we'd need a bit more information on what is your
> >> situation and what you try to achieve. In particular:
> >> 
> >> 1) What kind of an application is your program (console, GUI, ...),
> >> under which operating system?
> >> 
> >> 2) You mention that there is another program that is still running -
> >> do
> >> you mean that the remaining program starts the crashing one and you
> >> would like to check the results? If this is the case, how you start
> >> the
> >> program (Dos.Exec, SysUtils.ExecuteProcess, Process.TProcess, ...)?
> >> 
> >> 3) What do you mean if you say "crashes" - a run-time error? Or a GUI
> >> message box stating that the program crashed? Or...?
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Rainer Stratmann via fpc-pascal
Ah, sorry. I Forgot it totally.

It is a plain console program under Linux.

Yes, the remaining program starts the crashing one and I would like to check 
the results? Yes, a run-time error was there.

I start the program with a console command.

An unhandled exception occured at $0814EC41:
EAccessViolation:  Access violation
  $0814EC41
  ...
  ...
  ...

This messages I need to read automatically

Am Freitag, 1. September 2023, 16:13:54 CEST schrieb Tomas Hajny via fpc-
pascal:
> On 2023-09-01 15:43, Rainer Stratmann via fpc-pascal wrote:
> 
> 
> Hello,
> 
> > Where can I find the output of the error messages if a program crashes.
> > 
> > There is another program that still is running.
> > I want to read the error messages automatically if that is possible.
> 
> I'm afraid that we'd need a bit more information on what is your
> situation and what you try to achieve. In particular:
> 
> 1) What kind of an application is your program (console, GUI, ...),
> under which operating system?
> 
> 2) You mention that there is another program that is still running - do
> you mean that the remaining program starts the crashing one and you
> would like to check the results? If this is the case, how you start the
> program (Dos.Exec, SysUtils.ExecuteProcess, Process.TProcess, ...)?
> 
> 3) What do you mean if you say "crashes" - a run-time error? Or a GUI
> message box stating that the program crashed? Or...?
> 
> Tomas
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Rainer Stratmann via fpc-pascal
Where can I find the output of the error messages if a program crashes.

There is another program that still is running.
I want to read the error messages automatically if that is possible.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Compile time -> processor benchmark values

2023-05-29 Thread Rainer Stratmann via fpc-pascal
Now I have a i7-3770S

cpubenchmark says:
Average CPU Mark: 6175
Single Thread Rating: 2043
https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-3770S+%40+3.10GHz

I expect to buy a new computer with a i5-13400F or similar
cpubenchmark says:
Average CPU Mark: 25969
Single Thread Rating: 3702
https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i5-13400

What is important for the compile time?
The average CPU Mark that means more than 4 times faster?
Or the single thread rating that means 1,8 times faster?

Besides faster memory, ssd, etc.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-29 Thread Rainer Stratmann via fpc-pascal
Am Donnerstag, 29. Dezember 2022, 15:02:41 CET schrieb DougC via fpc-pascal:
> The response has been made that the example code in the tutorial is more
> complicated than it should be.

The installation process (in my case Linux) should be easy as well.
For beginners that is at least as important as a good example.
My experience is that this is often a problem in Linux. I use debian.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-28 Thread Rainer Stratmann via fpc-pascal
Am Dienstag, 27. Dezember 2022, 17:47:13 CET schrieb Anthony Walter via fpc-
pascal:
> Hi guys,
> 
> I had a new idea for an interface design to help people who either are not
> into programming yet or have only used a language other than Free Pascal.

Hello,

the design is really good.
I have the same opinion that the example is very difficult. If I was a beginner 
I would not be enthusiastic about starting with freepascal with these kind of 
example. I would also describe me as a very experienced programmer.

You could make 2 examples. One simple and one advanced.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Be careful of too many features

2022-05-30 Thread Rainer Stratmann via fpc-pascal
Am Montag, 30. Mai 2022, 20:59:56 CEST schrieb Steve Litt via fpc-pascal:
> I think adding yet more features obfuscates and Perlizes
> Pascal.

What does Perlize mean?

Only a very little percentage of the code is using it.
And you could easily do it in another way.
I also don't like make things complicated.
But they will do it anyway.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 22. April 2022, 19:53:34 CEST schrieben Sie:
> Am 22.04.2022 um 15:48 schrieb Rainer Stratmann via fpc-pascal:
> > Am Mittwoch, 20. April 2022, 19:15:15 CEST schrieb Sven Barth via fpc-
pascal:

> We don't deal in percentages, however it reduces the amount of typing
> required to write code with a lot of specializations (in theory an IDE
> like Lazarus *could* help here as well however).

Of course 'you' do. When I asked for a simple feature years ago it was 
refused. And there were several explanations why this feature is not 
necessary.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 22. April 2022, 17:27:33 CEST schrieb Hairy Pixels via fpc-pascal:
> > On Apr 22, 2022, at 8:48 PM, Rainer Stratmann via fpc-pascal

> It’s like everything else in programming languages.
> 
> 1) you can specialize the function manually so implicit specialization is
> not needed. 
> 2) you can duplicate functions and change types manually so
> generic functions are not needed. 
> 3) you can program in assembly so high-level languages are needed. 
> 4) etc… :)
> 
> Joking aside it just makes for less code and more readable code (in my
> opinion).

From assembly to high-level language there is a huge step.
From high-level language to implicit generic function specializations it is a 
little step regarding the benefits.

In my opinion it makes everything more complicated. My mind refuses to read 
the description of the new feature.

But mostly I am worried because of the statement "has the potential to break 
existing code".
 


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 20. April 2022, 19:15:15 CEST schrieb Sven Barth via fpc-pascal:
> This feature is enabled with the modeswitch
> ImplicitFunctionSpecialization and is for now not enabled by default as
> this has the potential to break existing code.

How many percent of the users need this feature?
Is it a feature that is a must?
Can everyone get also a solution without the feature?
Does it justify the risk of the whole language (has the potential to break 
existing code)?



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Interface section overload procedures are all public

2022-01-23 Thread Rainer Stratmann via fpc-pascal
// making only one procedure bugtest public in the interface section
// makes all other bugtest procedures public as well!
// Lazarus 2.0.0+dfsg-2
// FPC-Version: 3.0.4
// OS: Linux Debian 32 Bit

unit test;

interface

procedure bugtest( p1 : longint );

implementation

procedure bugtest( p1 : longint );
begin
end;

procedure bugtest( p1 , p2 : longint );
begin
end;

procedure bugtest( p1 , p2 , p3 : longint );
begin
end;

begin
end. 


// Somewhere in the main program
 bugtest( 1 );
 bugtest( 1 , 2 );
 bugtest( 1 , 2 , 3 );



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN

2022-01-05 Thread Rainer Stratmann via fpc-pascal
Here it is ok now.

Linux Debian, Firefox Browser

Am Mittwoch, 5. Januar 2022, 11:05:34 CET schrieb Michael Van Canneyt via fpc-
pascal:
> On Wed, 5 Jan 2022, Dimitrios Chr. Ioannidis via fpc-pascal wrote:
> > Hi,
> > 
> > On 2022-01-05 11:09, Dmitry Boyarintsev via fpc-pascal wrote:
> >> On Wed, Jan 5, 2022 at 2:49 AM Dimitrios Chr. Ioannidis via fpc-pascal
> >> 
> >>  wrote:
> >>> the certificate issued for www.freepascal.org [1] and not for
> >>> freepascal.org [2] .
> >>> 
> >>> It seems that the let's encrypt script was run with -d
> >>> freepascal.org [2]
> >>> instead of -d *.freepascal.org [2] .
> >> 
> >> I don't know how it works for Open Source world, but for the
> >> commercial world wild-card certificates (*.freepascal.org [2]) are
> >> more expensive, than a single name certificate (www.freepascal.org
> >> [1])
> > 
> > AFAIK, let's encrypt support's wildcard certificates from 2018. I don't
> > know if anything is changed.
> 
> I have made some changes, hopefully all is fixed...
> 
> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN

2022-01-04 Thread Rainer Stratmann via fpc-pascal
https://freepascal.org/


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to list IP and MAC of network adapters on Windows?

2021-12-28 Thread Rainer Stratmann via fpc-pascal
May be that helps a little bit.
Please give a feedback if it works or not or if you can improve it.

I use the curl library directly. Not on the command line.

{$ifdef windows}

uses sockets , winsock2;

procedure adds2( var dw : dword ; p : pointer );
var
 addr : pinaddr;
begin
 addr := p;
 if addr <> nil then begin
  dw := addr^.s_bytes[ 1 ] shl 24
  + addr^.s_bytes[ 2 ] shl 16
  + addr^.s_bytes[ 3 ] shl 8
  + addr^.s_bytes[ 4 ];
 end;
end;

function ipx_getlocal_ip( out ip , mask , flags : dword ) : boolean;
var
 hostinfo : phostent;
 addr2 : pchar;
 p1 : pointer;
 pp : ^pointer;
 l : longint;
begin
 result := false;
 ip := 0;
 mask := 0;
 flags := 0;
 hostinfo := gethostbyname( nil );
 if hostinfo <> nil then begin
   p1 := hostinfo^.h_addr_list;
   pp := p1;
   if pp^ <> nil then adds2( ip , pp^ );
 end;
end;
{$endif} 




Am Freitag, 10. September 2021, 09:03:30 CET schrieb Bo Berglund via fpc-
pascal:
> Is there a way to enumerate the active adapters on a Windows computer with
> their IPv4 and MAC addresses?
> 
> I am trying to convert a Linux reporting script to Windows, but I have a
> hard time finding a suitable Windows command. The script uses common Linux
> commands and tools to get the eth0 and wlan0 data (IPv4 and MAC addresses)
> and then to POST it to my website mailer (php script) via curl. See below.
> 
> I have curl on Windows too so once the data are found the same command can
> be used here as well, but the network info extraction seems to be a lot
> harder.
> 
> So I figured I could write a small FPC command line tool to extract this
> information and use it in the batch file.
> 
> But is there some such call available in FPC or standard packages like LNet
> or similar?
> 
> On Linux I can do this in the bash script:
> 
> MyName=$(hostname)
> IPAddr=$(ifconfig eth0|grep "inet "|sed 's/ *inet //;s/ .*//')
> IPAddrWiFi=$(ifconfig wlan0|grep "inet "|sed 's/ *inet //;s/ .*//')
> IPMac=$(ifconfig eth0 | grep -Eo ..\(\:..\){5})
> IPMacWiFi=$(ifconfig wlan0 | grep -Eo ..\(\:..\){5})
> 
> I don't believe there is a similar command line way on Windows, so therefore
> I ask for a FPC way of getting it.




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Creating a shared library (Linux)

2021-12-28 Thread Rainer Stratmann via fpc-pascal
Ok.

'lib' is placed in front of the output file and '.so' afterwards.
So the library is "libmylib.so"

And "nm -D libmylib.so" works now.

But it is confusing, because it is nowhere explained in the compiler.
[x] Konventionen anwenden
[x] use conventions
In the Project settings -> path window could be better explained.

Am Dienstag, 28. Dezember 2021, 13:10:56 CET schrieb Rainer Stratmann via fpc-
pascal:
> https://www.freepascal.org/docs-html/prog/progse55.html
> 
> When analysing the mylib.o output file under Linux with
> 
> nm -D mylib.o
> 
> the answer is: no symbols.
> 
> I have an export section in the library and in the past it worked already,
> but I did not remember exactly how.
> 
> How can I get a shared library?
> What compiler switches do I have to set?
> 
> 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Creating a shared library (Linux)

2021-12-28 Thread Rainer Stratmann via fpc-pascal
https://www.freepascal.org/docs-html/prog/progse55.html

When analysing the mylib.o output file under Linux with

nm -D mylib.o

the answer is: no symbols.

I have an export section in the library and in the past it worked already, but 
I did not remember exactly how.

How can I get a shared library?
What compiler switches do I have to set?



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit Linux syscall from 32 bit fpc program

2021-12-24 Thread Rainer Stratmann via fpc-pascal
Am Freitag, 24. Dezember 2021, 23:02:03 CET schrieb Sven Barth via fpc-pascal:
> Rainer Stratmann via fpc-pascal  schrieb
> 
> am Fr., 24. Dez. 2021, 15:04:
> > Is it possible to make a direct 64 bit Linux syscall from a 32 bit fpc
> > programm?
> 
> No, because your program is running as a 32-bit process and thus only has
> access to the 32-bit space of syscalls.
> 
> Why, what do you want to do?

My Kernel Mode Setting Program is not working on the latest Debian Linux 64 
Bit Kernel.

Debian 10 - 32 Bit Linux - it works
Debian 10 - 64 Bit Linux - it works
Debian 11 - 32 Bit Linux - it works
Debian 11 - 64 Bit Linux - it does not work

It has something to do with mmap2 and may be the vtconsole.
I guess mmap2 is not working correctly in Debian 11 - 64 Bit Linux.
Or the vtconsole takes over the framebuffer.

> Regards,
> Sven




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] 64 bit Linux syscall from 32 bit fpc program

2021-12-24 Thread Rainer Stratmann via fpc-pascal
Is it possible to make a direct 64 bit Linux syscall from a 32 bit fpc 
programm?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How To: Use lib curl example

2021-12-05 Thread Rainer Stratmann via fpc-pascal
Am Sonntag, 5. Dezember 2021, 20:38:30 CET schrieb Rainer Stratmann via fpc-
pascal:
> Does that mean curl is always waiting until the whole operation (download)
> is complete?
> 
> Is it possible to do it in a nonblocked way? For example with a continuous
> nonblocked loop call and a flag when the operation is finished?
> 

Found it already. It seems that a nonblocking operation mode is possible!

https://everything.curl.dev/libcurl/drive
https://everything.curl.dev/libcurl/drive/multi

> 
> Am Dienstag, 28. September 2021, 02:01:00 CET schrieb Anthony Walter via
> fpc-
> pascal:
> > I was having some problems using vanilla sockets and OpenSSL to read a few
> > specific web pages using HTTPS. Normally I don't have any problems
> > using HTTPS, but with a few sites my code was not working. I ending up
> > finding the RTL unit LibCurl in one of the FPC packages and got it working
> > without too much trouble. LibCurl is a library allowing programmers to get
> > the functionality of the curl program without launching an external
> > process.
> > 
> > If anyone is interested, here is a small bit of code to GET a page over
> > HTTP or HTTPS using LibCurl.
> > 
> > Interface:
> > 
> > function CurlGet(const Url: string; out Data: string; UserAgent: string =
> > ''): Boolean;
> > 
> > Implementation:
> > 
> > uses
> > 
> >   LibCurl;
> > 
> > function WriteData(Ptr: PChar; MemberSize, MemberCount: UIntPtr; var Data:
> > string): UIntPtr; cdecl;
> > var
> > 
> >   S: string;
> > 
> > begin
> > 
> >   SetString(S, Ptr, MemberSize * MemberCount);
> >   Data := Data + S;
> >   Result := MemberSize * MemberCount;
> > 
> > end;
> > 
> > function CurlGet(const Url: string; out Data: string; UserAgent: string =
> > ''): Boolean;
> > var
> > 
> >   Curl: PCURL;
> > 
> > begin
> > 
> >   Data := '';
> >   Result := False;
> >   if Url = '' then
> >   
> > Exit;
> >   
> >   Curl := curl_easy_init();
> >   if Curl = nil then
> >   
> > Exit;
> >   
> >   try
> >   
> > curl_easy_setopt(curl, CURLOPT_URL, [PChar(Url)]);
> > if UserAgent <> '' then
> > 
> >   curl_easy_setopt(curl, CURLOPT_USERAGENT, [PChar(UserAgent)]);
> > 
> > curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, [@WriteData]);
> > curl_easy_setopt(curl, CURLOPT_WRITEDATA, [@Data]);
> > curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, [0]);
> > curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, [0]);
> > Result := curl_easy_perform(curl) = CURLE_OK;
> >   
> >   finally
> >   
> > curl_easy_cleanup(Curl);
> >   
> >   end;
> > 
> > end;
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How To: Use lib curl example

2021-12-05 Thread Rainer Stratmann via fpc-pascal
Does that mean curl is always waiting until the whole operation (download) is 
complete?

Is it possible to do it in a nonblocked way? For example with a continuous 
nonblocked loop call and a flag when the operation is finished?


Am Dienstag, 28. September 2021, 02:01:00 CET schrieb Anthony Walter via fpc-
pascal:
> I was having some problems using vanilla sockets and OpenSSL to read a few
> specific web pages using HTTPS. Normally I don't have any problems
> using HTTPS, but with a few sites my code was not working. I ending up
> finding the RTL unit LibCurl in one of the FPC packages and got it working
> without too much trouble. LibCurl is a library allowing programmers to get
> the functionality of the curl program without launching an external process.
> 
> If anyone is interested, here is a small bit of code to GET a page over
> HTTP or HTTPS using LibCurl.
> 
> Interface:
> 
> function CurlGet(const Url: string; out Data: string; UserAgent: string =
> ''): Boolean;
> 
> Implementation:
> 
> uses
>   LibCurl;
> 
> function WriteData(Ptr: PChar; MemberSize, MemberCount: UIntPtr; var Data:
> string): UIntPtr; cdecl;
> var
>   S: string;
> begin
>   SetString(S, Ptr, MemberSize * MemberCount);
>   Data := Data + S;
>   Result := MemberSize * MemberCount;
> end;
> 
> function CurlGet(const Url: string; out Data: string; UserAgent: string =
> ''): Boolean;
> var
>   Curl: PCURL;
> begin
>   Data := '';
>   Result := False;
>   if Url = '' then
> Exit;
>   Curl := curl_easy_init();
>   if Curl = nil then
> Exit;
>   try
> curl_easy_setopt(curl, CURLOPT_URL, [PChar(Url)]);
> if UserAgent <> '' then
>   curl_easy_setopt(curl, CURLOPT_USERAGENT, [PChar(UserAgent)]);
> curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, [@WriteData]);
> curl_easy_setopt(curl, CURLOPT_WRITEDATA, [@Data]);
> curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, [0]);
> curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, [0]);
> Result := curl_easy_perform(curl) = CURLE_OK;
>   finally
> curl_easy_cleanup(Curl);
>   end;
> end;




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Example for unit paszlib

2021-08-26 Thread Rainer Stratmann via fpc-pascal
Yes it works now.

I used the unit paszlib like in the wiki on top and in the url of the wiki.
It works somehow, because the paszlib unit exists.
But I changed it into zipper now and everything is fine!
Thank you for helping me.


Am Mittwoch, 25. August 2021, 22:14:26 CEST schrieb Michael Van Canneyt via 
fpc-pascal:
> On Wed, 25 Aug 2021, Rainer Stratmann via fpc-pascal wrote:
> > Is there an example for the unit paszlib?
> > 
> > This does not work:
> > https://wiki.lazarus.freepascal.org/paszlib
> 
> What does not work exactly ? the zipper unit is used a lot.
> It definitely works.
> 
> > I have Lazarus 2.0.0
> > FPC 3.0.4
> 
> Maybe start by upgrading to 3.2.2 ?
> 
> > May be there are different versions of paszlib.
> 
> Not to our knowledge.
> 
> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Example for unit paszlib

2021-08-25 Thread Rainer Stratmann via fpc-pascal
Is there an example for the unit paszlib?

This does not work:
https://wiki.lazarus.freepascal.org/paszlib

I have Lazarus 2.0.0
FPC 3.0.4

May be there are different versions of paszlib.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 50 years of Pascal, by the the author himself

2021-05-12 Thread Rainer Stratmann via fpc-pascal
https://www.mikroe.com/mikropascal-avr

It is in heavy use.

They have Pascal compilers for ARM, PIC, etc. also.

Am Mittwoch, 12. Mai 2021, 21:51:03 CEST schrieb Ryan Joseph via fpc-pascal:
> > On May 12, 2021, at 12:30 PM, Ralf Quint via fpc-pascal
> >  wrote:
> > 
> > Thought this was kind of interesting, though it leaves short of mentioning
> > the later Object Pascal evolution and thus Delphi and FreePascal...
> Isn't Free Pascal and Delphi basically the only Pascal compilers left? I
> used THINK Pascal and Metrowerks Pascal in the distant past but those are
> all long dead. You can't really talk about Pascal in 2021 without
> mentioning those 2 compilers.
> 
> Regards,
>   Ryan Joseph
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 50 Years of Pascal

2021-02-24 Thread Rainer Stratmann via fpc-pascal
Am Mittwoch, 24. Februar 2021, 17:50:45 CET schrieb Liam Proven via fpc-
pascal:
> I thought this might interest folks. Apologies if I am late to the party.
> 
> https://cacm.acm.org/magazines/2021/3/250705-50-years-of-pascal/fulltext

https://de.wikipedia.org/wiki/Niklaus_Wirth

Here is an interesting Video Interview with the founder of the language 
Pascal. In german.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpmmap problem 64 bit linux

2020-11-22 Thread Rainer Stratmann via fpc-pascal
mmap2 could be helpful.

The mmap2() system call provides the same interface as mmap(),
except that the final argument specifies the offset into the file in
4096-byte units (instead of bytes, as is done by mmap()).  This
enables applications that use a 32-bit off_t to map large files (up
to 2^44 bytes).

https://man7.org/linux/man-pages/man2/mmap2.2.html

But it is not yet implemented.

FPC 3.0.4


Am Samstag, 21. November 2020, 13:31:22 CET schrieb Rainer Stratmann via fpc-
pascal:
> I watched the syscalls with strace and my assumption was confirmed.
> 
> function Fpmmap( start: pointer; len: size_t; prot: cint; flags: cint;
> fd:cint; offst: off_t ):pointer;
> 
> My offst value for fpmmap is $1.
> 
> strace output:
> 
> mmap(NULL, 192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_32BIT, 3, 0) = -1
> EINVAL
> 
> Here the value is 0.
> 
> It is likely that the offst value is stripped to 32 bit before passed to the
> mmap syscall.
> 
> 
> 
> Am Samstag, 21. November 2020, 01:15:20 CET schrieb Alexander Grotewohl via
> 
> fpc-pascal:
> > It would seem C handles this at compile time with a define.. mapping mmap
> > to mmap64. Which would almost seem to imply you'd end up with a 32 bit
> > binary that would only work on 64 bit systems. I'm not really sure how
> > this would work for Pascal. You could start by looking in the file listed
> > in the fpmmap docs you posted. My guess is the easiest answer is
> > "distribute both 32 and 64 bit versions," but that doesn't help when you
> > need to test the 32 bit one..
> > 
> > --
> > Alexander Grotewohl
> > https://dcclost.com
> > 
> > --
> > Alexander Grotewohl
> > https://dcclost.com
> > ________
> > From: fpc-pascal  on behalf of
> > Rainer Stratmann via fpc-pascal  Sent:
> > Friday, November 20, 2020 6:33:51 PM
> > To: fpc-pascal@lists.freepascal.org 
> > Cc: Rainer Stratmann 
> > Subject: [fpc-pascal] fpmmap problem 64 bit linux
> > 
> > A 32 bit freepascal program on a 32 bit Linux Debian system is working
> > properly. It uses fpmmap for getting the adress of a kms framebuffer.
> > 
> > The same 32 bit program on a 64 bit Linux Debian system *** is not
> > working.
> > When it comes to the fpmmap it gives an error:
> > 
> > Sys_EINVAL
> > 
> > One of the record fields Start, length or offset is invalid.
> > 
> > https://www.freepascal.org/docs-html/rtl/baseunix/fpmmap.html
> > 
> > I figured out that it likely can only be the offset value since start and
> > length are always the same.
> > 
> > The offset value I got from a previous DRM function.
> > 
> > On the 32 bit System this offset value is $1000 (fits in 32 bit)
> > And on the 64 bit System this offset value is $1 (does not fit in
> > 32 bit).
> > 
> > Can it be possible that the fpmmap function strips the offset value to 32
> > bit? Is there another way to call fpmmap more directly?
> > What does fpmmap exactly?
> > Where can I research?
> > 
> > 
> > ***
> > dpkg --add-architecture i386
> > apt-get update
> > apt-get install libc6-i386
> > 
> > 
> > ___
> > fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpmmap problem 64 bit linux

2020-11-21 Thread Rainer Stratmann via fpc-pascal
I watched the syscalls with strace and my assumption was confirmed.

function Fpmmap( start: pointer; len: size_t; prot: cint; flags: cint; fd:cint; 
offst: off_t ):pointer;

My offst value for fpmmap is $1.

strace output:

mmap(NULL, 192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_32BIT, 3, 0) = -1 
EINVAL

Here the value is 0.

It is likely that the offst value is stripped to 32 bit before passed to the 
mmap syscall.



Am Samstag, 21. November 2020, 01:15:20 CET schrieb Alexander Grotewohl via 
fpc-pascal:
> It would seem C handles this at compile time with a define.. mapping mmap to
> mmap64. Which would almost seem to imply you'd end up with a 32 bit binary
> that would only work on 64 bit systems. I'm not really sure how this would
> work for Pascal. You could start by looking in the file listed in the
> fpmmap docs you posted. My guess is the easiest answer is "distribute both
> 32 and 64 bit versions," but that doesn't help when you need to test the 32
> bit one..
> 
> --
> Alexander Grotewohl
> https://dcclost.com
> 
> --
> Alexander Grotewohl
> https://dcclost.com
> ____
> From: fpc-pascal  on behalf of
> Rainer Stratmann via fpc-pascal  Sent:
> Friday, November 20, 2020 6:33:51 PM
> To: fpc-pascal@lists.freepascal.org 
> Cc: Rainer Stratmann 
> Subject: [fpc-pascal] fpmmap problem 64 bit linux
> 
> A 32 bit freepascal program on a 32 bit Linux Debian system is working
> properly. It uses fpmmap for getting the adress of a kms framebuffer.
> 
> The same 32 bit program on a 64 bit Linux Debian system *** is not working.
> When it comes to the fpmmap it gives an error:
> 
> Sys_EINVAL
> One of the record fields Start, length or offset is invalid.
> 
> https://www.freepascal.org/docs-html/rtl/baseunix/fpmmap.html
> 
> I figured out that it likely can only be the offset value since start and
> length are always the same.
> 
> The offset value I got from a previous DRM function.
> 
> On the 32 bit System this offset value is $1000 (fits in 32 bit)
> And on the 64 bit System this offset value is $1 (does not fit in 32
> bit).
> 
> Can it be possible that the fpmmap function strips the offset value to 32
> bit? Is there another way to call fpmmap more directly?
> What does fpmmap exactly?
> Where can I research?
> 
> 
> ***
> dpkg --add-architecture i386
> apt-get update
> apt-get install libc6-i386
> 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] fpmmap problem 64 bit linux

2020-11-20 Thread Rainer Stratmann via fpc-pascal
A 32 bit freepascal program on a 32 bit Linux Debian system is working 
properly. It uses fpmmap for getting the adress of a kms framebuffer.

The same 32 bit program on a 64 bit Linux Debian system *** is not working.
When it comes to the fpmmap it gives an error:

Sys_EINVAL
One of the record fields Start, length or offset is invalid.

https://www.freepascal.org/docs-html/rtl/baseunix/fpmmap.html

I figured out that it likely can only be the offset value since start and 
length 
are always the same.

The offset value I got from a previous DRM function.

On the 32 bit System this offset value is $1000 (fits in 32 bit)
And on the 64 bit System this offset value is $1 (does not fit in 32 
bit).

Can it be possible that the fpmmap function strips the offset value to 32 bit?
Is there another way to call fpmmap more directly?
What does fpmmap exactly?
Where can I research?


***
dpkg --add-architecture i386
apt-get update
apt-get install libc6-i386


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Writeln() behaves differently on Windows and Linux, why?

2020-07-09 Thread Rainer Stratmann
I had exactly the same behaviour.

Some setterm commands solved it, if I remember correct.

setterm -blank 0
setterm -powersave off

I guess it was the first command.
You can try it.


Am Donnerstag, 9. Juli 2020, 18:01:42 CEST schrieb Bo Berglund via fpc-pascal:
> I am writing a cross-platform program (console program, no GUI).
> I am using Lazarus 2.0.8 and FPC 3.0.4 on both Linux and Windows.
> 
> During sebugging I have put numerous writeln commands in the code to
> track what is happening.
> I started on Windows and all worked just fine according to
> expectations.
> Every new output generated a new line on the console with the printed
> text left aligned.
> 
> But then I moved the code over to Linux (Raspbian Buster) and
> strangely this happens:
> 
> Test line 1
>Test line 2
>   Test line 3
> 
> and so on.
> It looks exactly the same if I use a terminal window on the Linux
> system itself as it does if I connect to the Linux machine using PuTTY
> from Windows...
> 
> 
> It seems like a writeln() in the code does actually not do a carriage
> return on the console, just a linefeed so the console continues at the
> column where the previous line ended.
> The messages I print out are simple text strings either showing
> incoming data packets or just my comment.
> 
> Typical code:
> 
>   s := 'Status changed: ' + newstat + ' msg: ' + AStatusText;
>   LogStd(s);
>   Writeln(s);
> 
> In the log file this obviously does not happen...
> 
> What can cause this strange behaviour?




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC for Win64

2020-07-07 Thread Rainer Stratmann
Am Dienstag, 7. Juli 2020, 09:42:54 CEST schrieb Marco van de Voort:
> Op 07/07/2020 om 09:14 schreef Rainer Stratmann:
> > For Linux: Does that mean apt-get install lazarus is always the 32bit
> > version? Regardless of the Linux Version (32bit or 64bit).
> 
> No. The reason for no 64-bit compiler is specific to Windows 64-bit.

Then how to install a 32-bit Lazarus/FPC on a 64-bit Linux Debian System?



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC for Win64

2020-07-07 Thread Rainer Stratmann
Am Samstag, 4. Juli 2020, 20:02:39 CEST schrieb Graeme Geldenhuys:
> On 02/07/2020 9:30 pm, Evert van Dijken via fpc-pascal wrote:
> > I see a WIN32 compiler and a WIN64 cross
> > compiler. How it works is a mystery for me.
> 
> I never understood the choice FPC made to not create a native 64-bit
> compiler, but rather stay with a cross-compiler. *shrug*
> I've always simply downloaded the latest release source code, and
> built my own native 64-bit FPC with the previous FPC release.
> 
> I've done this for 10 years - simply because 10 years ago (there
> about) I had issues with the cross-compiler generating broken
> executables. Obviously that could have been a local problem, but
> either way, I didn't trust them since. So I compile my own
> native 64-bit version (just like I did for Linux and FreeBSD).

For Linux: Does that mean apt-get install lazarus is always the 32bit version?
Regardless of the Linux Version (32bit or 64bit).
 
> 
> Regards,
>   Graeme




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Rainer Stratmann
Am Dienstag, 5. Mai 2020, 22:53:53 CEST schrieb Bart via fpc-pascal:
> On Tue, May 5, 2020 at 10:05 PM Rainer Stratmann
> 
>  wrote:
> > Did I overlooked something?
> 
> Your function returns a functiontype?
> Is that intended?

And I wonder why
 result := false;
did not work in this function :-)
 
> --
> Bart
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Rainer Stratmann
Am Dienstag, 5. Mai 2020, 22:53:53 CEST schrieb Bart via fpc-pascal:
> On Tue, May 5, 2020 at 10:05 PM Rainer Stratmann
> 
>  wrote:
> > Did I overlooked something?
> 
> Your function returns a functiontype?
> Is that intended?

No :-)
But that worked a long time (2 years or so) with FPC 2.6.4

procvar points either to a library function or to a default function.

In case of the shown example it was the default function.

May be a pointer to zero was not executed in FPC 2.6.4 because it does not 
make sense. And in FPC 3.0.4 the compiled program executes a pointer to zero 
(nil). Or similar.

Anyway it runs well now. Thanks!
 
> --
> Bart
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Rainer Stratmann
YES that works, thank you!


Am Dienstag, 5. Mai 2020, 22:27:12 CEST schrieb Alexander Grotewohl:
> my original suggestion and then
> 
> function proc_bool : boolean;
> 
> what exactly are you trying to accomplish?
> 
> --
> Alexander Grotewohl
> https://dcclost.com
> 
> From: fpc-pascal  on behalf of
> Rainer Stratmann  Sent: Tuesday, May 5, 2020
> 4:20:11 PM
> To: FPC-Pascal users discussions 
> Subject: Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC
> 3.0.4
> Am Dienstag, 5. Mai 2020, 22:14:09 CEST schrieb Alexander Grotewohl:
> > procvar:=@proc_bool; ?
> 
> Error: Incompatible types
> 
> > --
> > Alexander Grotewohl
> > https://dcclost.com
> > 
> > 
> > From: fpc-pascal  on behalf of
> > Rainer Stratmann  Sent: Tuesday, May 5, 2020,
> > 4:05 PM
> > To: FPC-Pascal users discussions
> > Subject: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4
> > 
> > Compiled with FPC 3.0.4 there is an access violation when executing
> > procvar; Compiled with FPC 2.6.4 it works for a long time.
> > 
> > Did I overlooked something?
> > 
> > Mode: MObjFPC
> > 
> > type
> > 
> >  t_funcboolean = function : boolean;
> > 
> > var
> > 
> >  procvar : t_funcboolean;
> > 
> > function proc_bool : t_funcboolean;
> > begin
> > end;
> > 
> > begin
> > 
> >  procvar := proc_bool;
> >  procvar; // -> access violation with FPC 3.0.4
> > 
> > ___
> > fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Rainer Stratmann
Am Dienstag, 5. Mai 2020, 22:14:09 CEST schrieb Alexander Grotewohl:
> procvar:=@proc_bool; ?

Error: Incompatible types

> --
> Alexander Grotewohl
> https://dcclost.com
> 
> 
> From: fpc-pascal  on behalf of
> Rainer Stratmann  Sent: Tuesday, May 5, 2020,
> 4:05 PM
> To: FPC-Pascal users discussions
> Subject: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4
> 
> Compiled with FPC 3.0.4 there is an access violation when executing procvar;
> Compiled with FPC 2.6.4 it works for a long time.
> 
> Did I overlooked something?
> 
> Mode: MObjFPC
> 
> type
>  t_funcboolean = function : boolean;
> var
>  procvar : t_funcboolean;
> 
> function proc_bool : t_funcboolean;
> begin
> end;
> 
> begin
>  procvar := proc_bool;
>  procvar; // -> access violation with FPC 3.0.4
> 
> 
> 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Rainer Stratmann
Compiled with FPC 3.0.4 there is an access violation when executing procvar; 
Compiled with FPC 2.6.4 it works for a long time.

Did I overlooked something?

Mode: MObjFPC

type
 t_funcboolean = function : boolean;
var
 procvar : t_funcboolean;

function proc_bool : t_funcboolean;
begin
end;

begin
 procvar := proc_bool;
 procvar; // -> access violation with FPC 3.0.4




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New release of MSEide.

2020-04-02 Thread Rainer Stratmann
Am Donnerstag, 2. April 2020, 20:23:07 CEST schrieb fredvs via fpc-pascal:
> Hello everybody.
> 
> Many thanks to fpc team that helped so much for that release (particularly
> Sven).
> 
> Have a lot of fun.
> 
> Fre;D

How long are you involved already in the MSEide project?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpbind ipv6 version

2019-10-28 Thread Rainer Stratmann
On Sonntag, 27. Oktober 2019 10:32:11 CET Michael Van Canneyt wrote:
> On Sat, 26 Oct 2019, Rainer Stratmann wrote:
> > https://www.freepascal.org/docs-html/current/rtl/sockets/fpbind.html
> > 
> > Is there an example for IPV6?
> > 
> > function fpbind(
> > 
> >  s: cint;
> >  addrx: psockaddr;
> >  addrlen: TSockLen
> > 
> > ):cint;
> > 
> > I guess psockaddr is different in IPV6 version.
> 
> No, it does not have to be..
> The addrlen will differ of course. That's why it is there to begin with.
> Maybe an overload could be added, I would need to look into this to see if
> it is required.

I wrote an http server on my own. It works a long time already with IPv4.

For the IPV6 version I changed psockaddr to sockaddr_in6.
And the proper addrlen -> sizeof( sockaddr_in6 );
I discovered that shortly after my first question about this topic here in the 
mailinglist.
Additionally the socket protocol family was changed from PF_INET to PF_INET6 
when creating the socket.

Also I have to change fpaccept the same way as fpbind.

The server then worked properly with a localhost IPV6 request from a browser 
[::1]

FPC 2.6.4

> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] fpbind ipv6 version

2019-10-26 Thread Rainer Stratmann
https://www.freepascal.org/docs-html/current/rtl/sockets/fpbind.html

Is there an example for IPV6?

function fpbind(
  s: cint;
  addrx: psockaddr;
  addrlen: TSockLen
):cint;

I guess psockaddr is different in IPV6 version.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] += property bug?

2019-08-15 Thread Rainer Stratmann
On Mittwoch, 14. August 2019 14:15:51 CEST Ryan Joseph wrote:
> > On Aug 14, 2019, at 12:33 PM, Rainer Stratmann
> >  wrote:
> > 
> > Didn't you know that Ryan?
> 
> Yes, of course, I use them all the time and it’s why I was defending them
> from their critics (which I still find hard to believe even exist).
> Anyways, they exist and can be disabled using the directive Sven mentioned.
> Everyone wins. :)

Even in your sentences you put (too) much in a small place.
I can hardly understand what you mean.
May by I am not so good in English language.

> Regards,
>   Ryan Joseph
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] += property bug?

2019-08-14 Thread Rainer Stratmann
On Mittwoch, 14. August 2019 18:24:40 CEST Michael Van Canneyt wrote:
> On Wed, 14 Aug 2019, Ryan Joseph wrote:
> >> On Aug 14, 2019, at 12:04 PM, Rainer Stratmann  wrote:
> >>> It’s so
> >>> intuitive that basically all languages have adopted the syntax.
> >> 
> >> That is not true
> > 
> > All languages I use have them: Pascal, C, PHP, C#, Swift, Python,
> > JavaScript. These are some of the most popular languages in the world
> > right now. You’re fighting a losing battle sir.
> I don't see what the issue is ?
> 
> You do have +=  and the like. They exist, since about as long as I can
> remember.

Didn't you know that Ryan?

> You just cannot use it on properties.
> 
> Properties have some other restrictions as well:
> 
> * You also cannot Use Inc() on integer properties,
> * or use Include()/Exclude() on set properties.
> * You also cannot do SomeRecordProp.X:=Y;
> * or pass them to functions that require var arguments.
> 
> And I'm probably forgetting some other limitations.
> 
> The += is just another one in the list of limitations of properties.
> 
> Basically any operation that requires an address is not allowed.
> That += is using an address is an implementation detail of the compiler.
> Same as Inc() or In/Exclude(). I don't know the exact reason for this
> limitation, but it's bound to be a good one, otherwise it would have been
> lifted a long time ago...
> 
> And if someone doesn't like these limitations of properties, (s)he can use
> fields. No-one abolished those, after all.
> 
> Michael.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] += property bug?

2019-08-14 Thread Rainer Stratmann
On Mittwoch, 14. August 2019 11:45:20 CEST Ryan Joseph wrote:
> > On Aug 14, 2019, at 11:41 AM, wkitt...@windstream.net wrote:
> > 
> > good reason?? because someone is too lazy to type 4 more characters? yes,
> > i'm counting the readability spaces which could easily be left out...
> yes, that’s exactly why. Programers got sick of wasting time typing
> redundant characters so they attacked the problem at the root.

I am so sick of typing all the characters...

No, your eyes get sick if you have to read C code.

If you had a real problem where there is no solution at the moment I could 
understand you. But there is no problem, and no one is preventing you from 
writing good and readable code.

> It’s so
> intuitive that basically all languages have adopted the syntax.

That is not true.

> I’m not
> saying you should but it’s going to  hurt Pascal if we ignore these kinds
> of trends.

Also not true.

> 
> Regards,
>   Ryan Joseph
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] += property bug?

2019-08-11 Thread Rainer Stratmann
On Sonntag, 11. August 2019 12:21:18 CEST Ryan Joseph wrote:
> > On Aug 11, 2019, at 11:41 AM, Sven Barth via fpc-pascal
> >  wrote:
> > 
> > This is forbidden by design.
> 
> Why? It makes sense it should resolve to: d.setter(d.getter + 10) but maybe
> there’s a problem?

For me it seems that you can solve the issue easily with existing 
technologies.
Moreover the code will be better to read and to handle in my opinion.
Otherwise your code will be likewise C code with much information in the 
smallest place. That is not good to handle in my opinion.
I have some experience with C code. It is not my preferred language.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-07-21 Thread Rainer Stratmann
On Dienstag, 16. April 2019 22:36:07 CEST Mattias Gaertner via fpc-pascal 
wrote:
> Packages / Install Packages
> Select anchordockingdsgn on the right side and click "Install
> selection".
> Then "Save and rebuild IDE".

Habe jetzt das ganz neue Debian 10 - mit apt-get install lazarus (2.0.0) - auf 
einem Rechner und es so wie oben beschrieben probiert.

Der Complier sagt: kann anchordockpgk nicht finden

Rainer
 
> Mattias
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Linphone wrapper

2019-05-29 Thread Rainer Stratmann
Is someone using Linphone?
I need a wrapper for the library.

https://www.linphone.org/technical-corner/liblinphone

Or is there another solution for automatic VoIP calls?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Translating c records

2019-04-24 Thread Rainer Stratmann
struct sockaddr_ll {
 unsigned short sll_family;   
 unsigned short sll_protocol; 
 intsll_ifindex;  
 unsigned short sll_hatype;   
 unsigned char  sll_pkttype;  
 unsigned char  sll_halen;
 unsigned char  sll_addr[8];  
 };


type
 sockaddr_ll = record
  sll_family : word;
  sll_protocol : word;
  sll_ifindex : integer;
  sll_hatype : word;
  sll_pkttype : byte;
  sll_halen : byte;
  sll_addr: array[ 0 .. 7 ] of byte;
 end;

Is this correct?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-17 Thread Rainer Stratmann
On Dienstag, 16. April 2019 22:36:07 CEST Mattias Gaertner via fpc-pascal 
wrote:
> On Tue, 16 Apr 2019 21:13:52 +0200
> 
> Rainer Stratmann  wrote:
> > On Dienstag, 16. April 2019 21:02:50 CEST Rainer Stratmann wrote:
> > > But how can I install/activate it.
> > 
> > I found an instruction, but I got an error:
> > 
> > lazarus.pp(1,1) Fatal: Kann anchordockingdsgn nicht finden verwendet
> > von Lazarus. Check if package AnchorDockingDsgn creates
> > anchordockingdsgn.ppu, check nothing deletes this file and check that
> > no two packages have access to the unit source..
> 
> What did you do?
> 
> Packages / Install Packages
> Select anchordockingdsgn on the right side and click "Install
> selection".
> Then "Save and rebuild IDE".

Yes.
I sent you an email to
nc-gaert...@netcologne.de
Did you receive the email?

 
> Mattias
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Rainer Stratmann
On Dienstag, 16. April 2019 13:07:33 CEST Ralf Quint wrote:
> But I still think that this should not be the default setting...

As you may have not seen while being busy with something else...
I repeat it for you.

On Dienstag, 16. April 2019 20:44:56 CEST Mattias Gaertner via fpc-pascal 
wrote:
> It is not a fixed docking. You can undock any window and place them on
> other screens. Or dock only some and place them on another screen.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux DRM (Direct Rendering Manager) porting (kernel mode setting)

2019-04-16 Thread Rainer Stratmann
The code below is now ported into pascal.
That took me about 2-3 weeks.

Anyone who is interested can write directly to me.
It's mainly for embedded projects writing directly into the framebuffer.

You can enquire and set the resolution of all possible connectors (monitor: 
for example vga, hdmi, dvi connector).
You get a mempointer to a framebuffer.
It is possible to have access to more than one connector at the same time if 
the mainboard or graphic card supports it.


On Donnerstag, 21. März 2019 23:41:08 CEST Rainer Stratmann wrote:
> Currently I am porting some C code from the Linux DRM Mode-Setting API to
> pascal. First in my own way. So that it is usable for me. But it would be
> possible to make a separate unit out of it, of course.
> 
> I could compile the modeset.c code with the Linux compiler. It runs well on
> Linux. It's a good assist to check the progress of the porting.
> 
> https://dvdhrm.wordpress.com/2012/09/13/linux-drm-mode-setting-api/
> 
> Also the library code has to be ported. That is not easy, but should be
> possible. About 1/3rd of the work is done, I guess.
> 
> May be someone is also interested in DRM and we can divide the work :-)
> 
> With DRM you can have access to all the possible video connectors on the
> mainboard. You can have access to the framebuffer directly for example. It
> is interesting for embedded devices, like I am working with.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Rainer Stratmann
On Dienstag, 16. April 2019 21:02:50 CEST Rainer Stratmann wrote:
> But how can I install/activate it.

I found an instruction, but I got an error:

lazarus.pp(1,1) Fatal: Kann anchordockingdsgn nicht finden verwendet von 
Lazarus. Check if package AnchorDockingDsgn creates anchordockingdsgn.ppu, 
check nothing deletes this file and check that no two packages have access to 
the unit source..


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Rainer Stratmann
On Dienstag, 16. April 2019 14:34:05 CEST Sven Barth via fpc-pascal wrote:
> You can install the AnchorDockingDsgn package and have all windows
> integrated (except for forms which need an additional package).

That sounds good for both use cases.

But how can I install/activate it.

I tried with apt-get install AnchorDockingDsgn
But that does not work.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Rainer Stratmann
On Dienstag, 16. April 2019 11:37:56 CEST Ralf Quint wrote:
> On 4/16/2019 4:46 AM, Rainer Stratmann wrote:

> Anyone who seriously develops software, specially desktop applications,
> is/should be using at least two (better 3 monitors).

That is completely new for me that the amount of monitors is an indication of 
how professional someone can write good software.

> And the "many"
> different windows allow easily to spread those out to those various
> screens as needed. One screen has the source code and associated
> windows, the second one the debugging windows, and the third one has the
> actually tested application screen.

For you that may makes sense.
But for me that seems like pretending who has the biggest car.

> 
> Something like this would be a major PITA with those stupid docked
> windows. That's only something that makes sense for someone who's
> tinkering along on a laptop or such...
> 
> Ralf
> 
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Rainer Stratmann
On Dienstag, 16. April 2019 13:46:59 CEST Rainer Stratmann wrote:
> buttons of the main window. Also the output window could be one tab of the
> search window.

I mean search result window more precisely.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Rainer Stratmann
Are there plans to merge some windows?

Like here (best solution):
https://cdn.portableapps.com/GeanyPortable.png

Because I think it is no more up to date.
I don't know any other Software that uses so many windows across the whole 
desktop. It would be more userfriendly to merge at least the main window with 
the code window. So that on top of the code window there are the buttons of 
the main window. Also the output window could be one tab of the search window.

Very often I use the search dialog.

It would be way more userfriendly if the search word (for example) can be 
double clicked and then is transferred automatically in a field at the bottom 
of the code window.

Like here:
http://3.bp.blogspot.com/-4GQwMug5bzE/VgN5qaECs7I/EdM/4jPugE78oWw/
s1600/kate5.png

Or here:
http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/4726430_orig.jpg




On Dienstag, 16. April 2019 10:24:09 CEST Mattias Gaertner via fpc-pascal 
wrote:
> The Lazarus team is glad to announce the release of Lazarus 2.0.2.
> 
> This release was built with FPC 3.0.4.
> The previous release Lazarus 2.0.0 was built with FPC 3.0.4 as
> well.
> 
> Here is the list of changes for Lazarus and Free Pascal:
> http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes
> http://wiki.lazarus.freepascal.org/User_Changes_3.0.4
> 
> Here is the list of fixes for Lazarus 2.0.x:
> http://wiki.freepascal.org/Lazarus_2.0_fixes_branch
> 
> The release is available for download on SourceForge:
> http://sourceforge.net/projects/lazarus/files/
> 
> Choose your CPU, OS, distro and then the "Lazarus 2.0.2" directory.
> 
> Checksums for the SourceForge files:
> http://www.lazarus-ide.org/index.php?page=checksums#2_0_2
> 
> Minimum requirements:
> 
> Windows:
>   2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit.
> 
> FreeBSD/Linux:
>   gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.
> 
> Mac OS X:
>   10.5 to 10.12; Carbon (32bit), Cocoa (64bit, beta), qt and qt5 (32 or
>   64bit).
> 
> The svn tag is
> http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_2
> 
> For people who are blocked by SF, the Lazarus releases from SourceForge
> are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/
> and later at (after some time for synchronization)
> http://mirrors.iwi.me/lazarus/
> 
> Mattias
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can FPC optimize: if (s[i]='a') or ...

2019-04-15 Thread Rainer Stratmann
On Sonntag, 14. April 2019 21:35:43 CEST wkitt...@windstream.net wrote:
> On 4/14/19 7:28 AM, Rainer Stratmann wrote:
> > On Samstag, 13. April 2019 22:30:55 CEST Alexey Tor. wrote:
> >> E.g. i have a loop which test each s[i] char for several cases: 'a',
> >> 'b', 'c'.
> >> 
> >> for i:= 1 to length(s) do
> >> 
> >> if (s[i]='a') or (s[i]='b') or (s[i]='c') then ...
> >> 
> >> Can FPC optimize it so it only reads s[i] once (to register), not 3
> >> times?
> > 
> > You can optimise by yourself.
> > 
> > var
> > 
> >   c : char;
> >   l : longint;
> > 
> > begin
> > 
> >   l := length( s );
> >   for i := 1 to l do
> >   
> >c := s[ i ];
> >if ( c = 'a' ) or ( c = 'b' ) or ( c = 'c' ) then ...
> 
> this looks like it will read three times like the original instead of once
> like using the IN set operation... it is still stepping through each one of
> the comparison steps instead of just doing a set match...

It is at least better than reading s[ i ] at every compare operation.
Feel free to make more optimizations if there is a chance.
For example the IN operation.

if c in ['a', 'b', 'c'] then ...

You have to know the whole code to decide if it makes sense to drop the var c 
completely.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can FPC optimize: if (s[i]='a') or ...

2019-04-14 Thread Rainer Stratmann
On Samstag, 13. April 2019 22:30:55 CEST Alexey Tor. wrote:
> E.g. i have a loop which test each s[i] char for several cases: 'a',
> 'b', 'c'.
> 
> for i:= 1 to length(s) do
> 
> if (s[i]='a') or (s[i]='b') or (s[i]='c') then ...
> 
> Can FPC optimize it so it only reads s[i] once (to register), not 3 times?

You can optimise by yourself.

var
 c : char;
 l : longint;

begin
 l := length( s );
 for i := 1 to l do
  c := s[ i ];
  if ( c = 'a' ) or ( c = 'b' ) or ( c = 'c' ) then ...

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Linux DRM (Direct Rendering Manager) porting

2019-03-21 Thread Rainer Stratmann
Currently I am porting some C code from the Linux DRM Mode-Setting API to 
pascal. First in my own way. So that it is usable for me. But it would be 
possible to make a separate unit out of it, of course.

I could compile the modeset.c code with the Linux compiler. It runs well on 
Linux. It's a good assist to check the progress of the porting.

https://dvdhrm.wordpress.com/2012/09/13/linux-drm-mode-setting-api/

Also the library code has to be ported. That is not easy, but should be 
possible. About 1/3rd of the work is done, I guess.

May be someone is also interested in DRM and we can divide the work :-)

With DRM you can have access to all the possible video connectors on the 
mainboard. You can have access to the framebuffer directly for example. It is 
interesting for embedded devices, like I am working with.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Compiling 32 bit software on Debian Linux 64 bit

2018-10-30 Thread Rainer Stratmann
On Dienstag, 30. Oktober 2018 12:25:04 CET Rainer Stratmann wrote:
> How is it possible to compile a 32 bit program on a 64 bit Debian Linux?
> 
> When I select i386 as the target cpu the message 'ppc 386 can't be executed'
> appears.
> 
> Is it possible to install ppc386 with an apt-get command?
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Does 
fpc-3.0.4.i386-linux.tar
makes it?

From here:
https://sourceforge.net/projects/freepascal/
?

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Compiling 32 bit software on Debian Linux 64 bit

2018-10-30 Thread Rainer Stratmann
How is it possible to compile a 32 bit program on a 64 bit Debian Linux?

When I select i386 as the target cpu the message 'ppc 386 can't be executed' 
appears.

Is it possible to install ppc386 with an apt-get command?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Searchable docs online

2018-07-05 Thread Rainer Stratmann
Is the server itself written in freepascal?
Or is it apache or nginx?

Am Donnerstag, 5. Juli 2018, 15:50:23 schrieb Michael Van Canneyt:
> Hello,
> 
> Given the questions of late, I have created a search page for the docs:
> 
> https://www.freepascal.org/docsearch/docsearch.html
> 
> This will search in the manuals, and in the reference documentation for the
> units.
> 
> There is ample room for improvement, but the page already works.
> 
> Things to improve:
> - Allow 'contains'
> - Allow 'minimum rank' (rank is the number of times a word appears in a
> page) - Allow to specify in which manual you want to search.
> - Integrate searching in the doc pages themselves.
> 
> The underlying mechanisms for this search are 100% FPC based:
> fpindexer, fcl-web, and the webpage logic is done using pas2js.
> (meaning you need to have Javascript enabled)
> 
> Feedback and comments welcome.
> 
> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Rainer Stratmann
Am Freitag, 22. Juni 2018, 16:03:28 schrieb Marcos Douglas B. Santos:
> On Fri, Jun 22, 2018 at 12:59 PM, Ralf Quint  wrote:
> > On 6/22/2018 4:19 AM, Karoly Balogh (Charlie/SGR) wrote:
> >> Hi,
> >> 
> >> On Fri, 22 Jun 2018, Ryan Joseph wrote:
> >>> I want to do a pivot away from the macro stuff to ask another question.
> >>> Since I’ve wanted to contribute to the compiler for so long and I
> >>> finally have a little understanding I’d like to know if there’s anything
> >>> minor I could do, that isn’t offensive to the compiler team.
> >> 
> >> It's not about the compiler team. It's about the integrity of a
> >> programming language, which doesn't matter these days a lot, when all
> >> languages turned into a feature race to provide the same broken concepts,
> >> but with slightly different syntax. Nevermind. I sometimes do not even
> >> understand how people did stuff for 50 years without
> >> TObjectClassAdvancedTemplateGenericRecordRTTI...
> > 
> > +1
> > It's not (only/just) what "the compiler team" wants. There are people
> > actually using the compiler. For real life purposes.
> > And a lot of what people are proposing, over and over again, are solutions
> > for problems that nobody has (in real life)...
> 
> +1
> It is better to have a simple language with packages/libs to do the (real)
> job than a complex language that try doing anything that someone could
> imagine or want to do.
> 
Yes, you can already do almost everything you want with freepascal.
Keep it easy.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] AppImage

2018-01-16 Thread Rainer Stratmann
Am Dienstag, 16. Januar 2018, 22:41:34 schrieb Sven Barth via fpc-pascal:
> This won't work in the more diverse
> Linux world where users are more free to decide.

But if you take a closer look at this (diverse) that is some kind of pseudo 
free and decide.

It would be technical no such problem to make some compatibility between the 
distributions. I am not deep in the KDE and Gnome development, but I wonder 
why it is not possible to make compatibility between them. That prevents a 
progress which is long overdue. Instead of they are fighting against each other 
who has the better window manager.

Also it is not a lack of choice if you put for example two distributions in 
one and make it possible to behave either like distro1 or distro2 by a 
checkbox. Or better to make it behave like distro1 and distro2. I guess that 
would be also technical possible.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] AppImage

2018-01-16 Thread Rainer Stratmann
Am Dienstag, 16. Januar 2018, 19:41:38 schrieb Graeme Geldenhuys:
> On 2018-01-16 06:51, Sven Barth via fpc-pascal wrote:
> > So, yeah, I'm definitely skeptical about such approaches.
> 
> All valid points. But if it was such a big concern, then why was Apple
> happy to go with it. Maybe the concern is not so bad. As for bigger apps
> (due to bundled dependencies) That might have been a concern years
> back, but nobody seems to care now about large apps. Hell, even websites
> are now 5+MB per page downloads (massive JavaScript libraries, huge
> high-res images etc). View a few pages and you have downloaded some 50MB
> easily.

Yes.

This is a very understandable constructive propagation. Everyone who can think 
right, especially from the view of a user should say, yes it is easy and good.

And yes, memory is enough there today. Since some years already.

My way is always a separate directory with all in it and an entry application.

And the key is to try to generate as less dependencies as possible.

Better less functionallity but almost working and extensible than an 
obstructive dependency.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] AppImage

2018-01-16 Thread Rainer Stratmann
Am Dienstag, 16. Januar 2018, 07:51:27 schrieb Sven Barth via fpc-pascal:
> Maybe because each app will have its own dependencies, thus duplicating
> code.
> Also if you have different versions of dependencies they might access
> shared global configuration in incompatible ways.
> Not to mention that if there is a (security) bug in one dependency you need
> to update all apps containing the bugged library instead of merely the
> library (that is if you can easily find out that an app contains that
> library).
> So, yeah, I'm definitely skeptical about such approaches.

For me the andvantage of the easy installation is higher.

You can leave the base Linux system as it is.

But if you want to install a hand full of special Apps you can do it fast.
If there is a security bug, then (easy) update your hand full of Apps.

If I make an App I do it always in a separate directory with minimum 
dependencies. So you have it easy and a have good overview of the needed app 
and data files.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] AppImage

2018-01-15 Thread Rainer Stratmann
Take a look at

https://appimage.org/

Is this possible for Freepascal and Lazarus?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MSEide+MSEgui 4.6 for FPC 3.0.4

2017-11-29 Thread Rainer Stratmann
Am Mittwoch, 29. November 2017, 21:43:00 schrieb Marcos Douglas B. Santos:
> On Wed, Nov 29, 2017 at 9:35 PM, Rainer Stratmann
> 
>  wrote:
> > Am Mittwoch, 29. November 2017, 07:19:32 schrieb Martin Schreiber:
> >> What is missing
> >> in Free Pascal?
> > 
> > A userfriendly setup/install for every compile/cross compile scenario out
> > of the box.
> > 
> > Without the need for compiling fpc.
> > 
> > Without the need for an internet connection.
> 
> Have you already seen fpcup -> http://wiki.freepascal.org/fpcup ?
> 
yes
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MSEide+MSEgui 4.6 for FPC 3.0.4

2017-11-29 Thread Rainer Stratmann
Am Mittwoch, 29. November 2017, 07:19:32 schrieb Martin Schreiber:
> What is missing
> in Free Pascal?

A userfriendly setup/install for every compile/cross compile scenario out of 
the box.

Without the need for compiling fpc.

Without the need for an internet connection.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC for AVR

2017-06-15 Thread Rainer Stratmann
Am Donnerstag, 15. Juni 2017, 08:34:49 schrieb Mark Morgan Lloyd:
> On 14/06/17 20:15, Brian wrote:
> > mikroPascal (not free) supports AVR and many other chips.
> > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license
> > Brian
> 
> Yes, but I was asking about the FPC situation. I'm desperately resisting
> local pressure to write code that might end up non-trivial in C/C++.

As far as I know there is not ab FPC solution by now.

I have Mikropascal for AVR and it works good.
All the projects I do with with it.

They also have an ARM Pascal compiler which works fine.

4k Byte code for AVR and 8k Byte code for ARM is free.
You can download it for free. I have a USB dongle Version here.

> 
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
> 
> [Opinions above are the author's, not those of his employers or colleagues]
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] https how does it work

2017-02-16 Thread Rainer Stratmann
How does httpy work, what is needed?

TLS/SSL library?

A http webserver without encryption I programed already on my own and wanted 
to integrate https.

Is there any example code of https?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Socket pair

2016-10-03 Thread Rainer Stratmann
There is fpaccept

http://www.freepascal.org/docs-html/rtl/sockets/fpaccept.html

But in the example accept is used ... (?!)


Am Montag, 3. Oktober 2016, 10:27:55 schrieb Santiago A.:
> I've seen that "accept" functions with socket pairs are deprecated. And
> fpsocketpair returns always -1.
> 
> How do you get the in and out streams when a server  accepts a new
> client connection? I have seen some server examples, like isocksrv.pp,
> but only read from client and send nothing back to client.
> 
> can anyone point and example with pair of sockets or bidirectional
> connection communication?
> 
> 
> --
> Saludos
> Santiago A.
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Test for valid ip address

2016-07-28 Thread Rainer Stratmann
Am Donnerstag, 28. Juli 2016, 10:26:32 schrieb Jonas Maebe:
> On 28/07/16 10:14, Koenraad Lelong wrote:
> > I need a way to test if an string containing an ipv4-address is really
> > an ipv4-address.
> > I tried
> > tmpAddress:=HostAddrToStr(StrToHostAddr(IPAddressStr));
> > writeln(tmpAddress);
> > 
> >  if (tmpAddress='0.0.0.0') then
> >  
> >   begin
> >   
> >writeln('Error in IP-address');
> >IPAddressStr:=tmpAddress;
> >   
> >   end;
> > 
> > When I enter 192.168.185.297 (i.e. not a valid ipv4 address) in
> > IPAddressStr I get
> > 192.168.185.41
> > not the expected error-message.
> 
> You can add a multiple of 256 to any octet of an IPv4 address in most
> programs. Try it in your browser, it will probably also work.

In Firefox 45.2.0 on Linux it does not work.
It is confusing anyway.
 
> 
> Jonas
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Test for valid ip address

2016-07-28 Thread Rainer Stratmann
The IP-Adress is a dword, but you can change, that it fits for you.


function str_getval( str : shortstring ) : longint;
var cod : longint;
begin
 val( str , result , cod );
end;

function ip_from_string( ipstr : shortstring ; out error : boolean ) : dword;
var
 c : char;
 ipn , pointanz : longint;
 x : longint;
 pstr : shortstring;
 ip : dword;


 procedure add_ip;
 begin
  ipn := str_getval( pstr );
  if ( ipn > 255 ) or ( pstr = '' ) then error := true;
  ip := ip shl 8;
  ip := ip or ipn;
  pstr := '';
 end;

begin
 ip := 0;
 pstr := '';
 error := false;
 pointanz := 0;
 for x := 1 to length( ipstr ) do begin
  c := ipstr[ x ];
  case c of
   '0'..'9' : pstr := pstr + c;
   '.' : begin
inc( pointanz );
add_ip;
   end;
   else error := true;
  end;
 end;
 add_ip;
 if pointanz <> 3 then error := true;
 if error then result := 0
  else result := ip;
end;



Am Donnerstag, 28. Juli 2016, 10:14:10 schrieb Koenraad Lelong:
> Hi,
> 
> I need a way to test if an string containing an ipv4-address is really
> an ipv4-address.
> I tried
> tmpAddress:=HostAddrToStr(StrToHostAddr(IPAddressStr));
> writeln(tmpAddress);
>   if (tmpAddress='0.0.0.0') then
>begin
> writeln('Error in IP-address');
> IPAddressStr:=tmpAddress;
>end;
> When I enter 192.168.185.297 (i.e. not a valid ipv4 address) in
> IPAddressStr I get
> 192.168.185.41
> not the expected error-message.
> 
> According to the rtl-manual :
> 
> function StrToHostAddr(IP: AnsiString) : in_addr
> Description: StrToHostAddr converts the string representation in IP to a
> host address and returns the host
> address.
> Errors: On error, the host address is filled with zeroes.
> 
> I would think that converting those zeroes to a host-address would yield
> 0.0.0.0.
> 
> Am I missing something ?
> Is there a better way, without using some other network-library ?
> 
> Koenraad.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] EBusError

2016-07-26 Thread Rainer Stratmann
An unhandled exception occured at $08113310 :
EBusError : Bus error or misaligned data access
 $08113310
 $08052EF3
 $08078A3E
 $080540B0
 $08054D96
 $080551D1
 $08055915

Is it likely that there is a problem with my Freepascal program or is it also 
possible that Linux or the Mainboard causes the error?

I found several things related to Freepascal when searching for EBusError.

Is it possible to see more if Debug Information is switched on?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Maximum of memory which can be used by single program in 32 bit Windows

2016-05-18 Thread Rainer Stratmann

Is there a different behaviour on linux?

I guess there is no limit...(!?)


Am Donnerstag, 19. Mai 2016, 08:46:57 schrieb LacaK:
> >> another question: is there any limit in FPC, which causes that only cca
> >> 1GB of memory can be used by FPC ?
> > 
> > No, but there is one that limits to 2GB.
> 
> Yes
> 
> > With {$peflags $20} in the main file that is increasable to 3GB
> > (reportedly 4GB for 32-bits apps under 64-bit windows, but I never tested
> > that)
> 
> Wow I never heared about such option.
> This are my results:
> (compiled application is Win 32 bit)
> 
> Before I have used this flag:
>Win7 32 bit with 4GB RAM: Out of memory at approx. 1 GB
>Win7 64 bit with 4GB RAM: Out of memory at approx. 1 GB
> 
> After I have used this flag:
>Win7 32 bit with 4GB RAM: Out of memory at 1 GB (no difference)
>Win7 64 bit with 4GB RAM: Success! (application consumes approx 1.8
> GB RAM, 1GB remains free)
> 
> Strange, does not ?
> Why I still encounter 1 GB limit and not 2 GB without {$setpeflag $20} ?
> Why on Win32 I still get Out of memory also with {$setpeflag $20} , but
> not on Win64 ?
> Take into account, that both OSes have 4GB RAM and application is same.
> 
> According to
> https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%
> 29.aspx it should be 2GB on 32bit and 4GB on 64bit Windows with
> *IMAGE_FILE_LARGE_ADDRESS_AWARE*
> 
> -Laco.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Build in a C compiler

2016-04-20 Thread Rainer Stratmann
Am Mittwoch, 20. April 2016, 12:40:19 schrieb Mark Morgan Lloyd:
> > http://www.mikroe.com/compilers
> 
> If you want to believe that BASIC- as originally implemented- and ALGOL
> are related then go ahead and do so. But the politest thing I can say is
> that it doesn't make you look particularly well-informed.

You can go to the company and say poliltely to them that they are not well 
informed. I don't know if they take you serious.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Build in a C compiler

2016-04-20 Thread Rainer Stratmann
Am Mittwoch, 20. April 2016, 07:05:10 schrieb Mark Morgan Lloyd:
> No. Pascal and ALGOL are closely related, C and ALGOL are closely
> related. Pascal and C are not so closely related.

As you can see here Pascal, C, and Basic are very close related.

http://www.mikroe.com/compilers
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Build in a C compiler

2016-04-19 Thread Rainer Stratmann
That would be great.

It is not that difficult.

{ = begin
} = end

and the other stuff is quite similar.

Pascal and C are close related.

It could be made with a compiler switch to determine if the compiler is in the 
Pascal or in the C compiling mode.

No more need to translate (huge amount of) C code. :-)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus vs MSEgui

2016-04-08 Thread Rainer Stratmann
con of mside why I don't use it:

The behaviour of the cursor on the end of the line. You cannot go behind the 
line as it is usual in almost every other editor. Martin says it is difficult 
to 
integrate which I find hard to understand. That behaviour of the cursor 
confuses me. The other editors are smarter in that way. And the editor is the 
most important thing you use when programming.


Am Freitag, 8. April 2016, 11:08:41 schrieb Santiago A.:
> I know it is a dangerous question that can easily turn into a  holly
> war, flame or whatever. But here it is.
> 
> I have only used Lazarus or a general editor (usually Jedit, geany).
> Time ago I checked a little MSEgui and, well, I didn't go for it.
> In MSEgui I found fonts small and interface not very nice. Beside I
> found it a little confusing. Later I found that it could be compiled to
> make fonts bigger etc.
> 
> The honest reality is that I didn't devote much time to evaluate it.
> That's the problem of frameworks: when you learn one you get a little
> married with it, there are always complains and quirks, but before
> divorce you want to be sure that where you are moving to is better that
> what you have now. Unfortunately, getting the pros and cons requires
> working with it some time.
> 
> The first pro of MSEgui is that it is light.
> In fact, That is the main pro of any thing that is not lazarus. No just
> because it's lighter but because lighter usually means less complex and
> less bugs.
> 
> Cons. The most important. It looks like Lazarus has more developers, so
> may be a better decision for the long term.
> The second is the RAD. The immediate two directions updates, from GUI to
> source and from source to GUI, is very handy.
> 
> Any body has experience in both (or another IDE for FPC) and has his two
> cents?
> 
> By the way, has anybody managed to debug strings.text or any property
> with a getter?
> 
> 
> --
> Saludos
> 
> Santi
> s...@ciberpiula.net
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


  1   2   3   4   5   6   >