Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Marco van de Voort via fpc-pascal
Op 24-1-2025 om 13:10 schreef Hairy Pixels via fpc-pascal: The FPC implementation inlines if the unit-with-function-to-be-inlined was compiled before the unit that references the inline function. That is within the /same/ (single) build, but also has as disadvantage afaik that if it is NOT like

Re: [fpc-pascal] Question about tprocess from fpc

2025-01-24 Thread Marco van de Voort via fpc-pascal
Op 24-1-2025 om 15:10 schreef Terry A. Haimann via fpc-pascal: I recently tried to execute a sed command from Lazarus, but didn't receive any output. But when I imbedded the sed command in a script and then executed the script from tprocess, it worked fine. Why is this? I have run across s

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Marco van de Voort via fpc-pascal
Op 24-1-2025 om 09:58 schreef Hairy Pixels via fpc-pascal: On Jan 24, 2025 at 2:01:09 PM, Sven Barth via fpc-pascal wrote: When a function has inlining enabled (either explicit with the inline directive or implicit through AutoInline optimization) then in addition to generating its code to th

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

2025-01-24 Thread Marco van de Voort via fpc-pascal
Op 24-1-2025 om 07:56 schreef Sven Barth via fpc-pascal: Hairy Pixels via fpc-pascal schrieb am Fr., 24. Jan. 2025, 06:16: Feels to me like manual memory management and exceptions don’t mix well. I use exceptions in C# and Swift and they don’t require all this boiler plate to prev

Re: [fpc-pascal] External library name

2025-01-05 Thread Marco van de Voort via fpc-pascal
Op 5-1-2025 om 13:23 schreef Marco van de Voort via fpc-pascal: Op 5-1-2025 om 10:43 schreef Jonas Maebe via fpc-pascal: That said, Darwin also uses two-level namespaces: https://blog.darlinghq.org/2018/07/mach-o-linking-and-loading-tricks.html#two-level-symbol-namespace . However, it

Re: [fpc-pascal] External library name

2025-01-05 Thread Marco van de Voort via fpc-pascal
Op 5-1-2025 om 10:43 schreef Jonas Maebe via fpc-pascal: That said, Darwin also uses two-level namespaces: https://blog.darlinghq.org/2018/07/mach-o-linking-and-loading-tricks.html#two-level-symbol-namespace . However, it does not do this through name mangling. The linker simply encodes in

Re: [fpc-pascal] Is there a recent change to TProcess?

2024-12-20 Thread Marco van de Voort via fpc-pascal
Op 20-12-2024 om 15:36 schreef James Richters: I assume that it is exactly the same source on exactly the same system with exactly the same compiler configuration. And the same machine otherwise ? ___ fpc-pascal maillist - fpc-pascal@lists.free

Re: [fpc-pascal] Is there a recent change to TProcess?

2024-12-20 Thread Marco van de Voort via fpc-pascal
Op 20-12-2024 om 14:44 schreef Tomas Hajny via fpc-pascal: I am not aware of any such changes, but given your remark about the meaning of 3F, the latter seems a likely explanation. Could it be due to a change of compilation mode (DELPHIUNICODE etc.) by the user? I assume that it is exac

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

2024-11-20 Thread Marco van de Voort via fpc-pascal
Op 20-11-2024 om 15:45 schreef Travis Siegel via fpc-pascal: Again, both of which are IDEs (just of a different type. You still haven't shown me how to build a GUI app with default fpc installed resources.  What's the point of claiming FPC can do gui apps if it can't do them w/o third party s

Re: [fpc-pascal] GetMem slow in threads

2024-11-09 Thread Marco van de Voort via fpc-pascal
Op 9-11-2024 om 14:59 schreef Hairy Pixels via fpc-pascal: The solution would be to be to use a different allocator but because FPC only allows overriding NewInstance per class it would be mean you would need a mutex anyway to control which allocator was used depending on the thread. Maybe

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

2024-10-18 Thread Marco van de Voort via fpc-pascal
Op 16-10-2024 om 23:49 schreef James Richters via fpc-pascal: I think anyone coming across the IDE and not realizing the help needs to be downloaded and installed separately would just assume there is no help.I know it states it quite clearly on the download page, but when downloading it you

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

2024-10-18 Thread Marco van de Voort via fpc-pascal
Op 18-10-2024 om 11:23 schreef Karoly Balogh via fpc-pascal: Embarcadero tried it in Delphi, and they failed. Not surprisingly, they removed again all automatic memory management. Maybe it was mentioned in the thread, I just glanced through it, but how about ARC (Automatic Reference Counting

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

2024-10-18 Thread Marco van de Voort via fpc-pascal
Op 18-10-2024 om 10:41 schreef Karoly Balogh via fpc-pascal: By contrast, Pascal is not designed with GC in mind. You'd need to redesign the language. If you do that, you can throw away all existing code if you introduce GC, because the two concepts do not merge easily. Embarcadero tried it in

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

2024-10-17 Thread Marco van de Voort via fpc-pascal
Op 17-10-2024 om 09:10 schreef Michael Van Canneyt via fpc-pascal: I fully agree. It is especially true for young people. My wife creates websites for a living. I nearly had to re-animate her after she looked at the FPC website. The FPC website is a no-go area for her since that time. Henc

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

2024-10-16 Thread Marco van de Voort via fpc-pascal
Op 16-10-2024 om 15:50 schreef Ștefan-Iulian Alecu via fpc-pascal: 4. a proper VSCode extension (we can include Vim and Emacs there too, but the main focus is VSCode) with all the bells and whistles more established extensions have. I know we would all want to stick to Lazarus and we all kn

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

2024-10-16 Thread Marco van de Voort via fpc-pascal
Op 16-10-2024 om 16:06 schreef Hairy Pixels via fpc-pascal: Another point is that FPC doesn’t have an official forum except for the mail list and that in and of itself is a problem if you ask me. Most young people don’t use email and won’t like this. I myself don’t prefer the mail list over so

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

2024-10-16 Thread Marco van de Voort via fpc-pascal
Op 16/10/2024 om 06:53 schreef Alexey T. via fpc-pascal: - Linux: All relevant files (executable files, configuration files, source code,etc.) are scattered all over the Linux system. This is very complicated again. This is important part. I agree. Some FPC binaries are in /usr/bin. Data fi

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

2024-10-16 Thread Marco van de Voort via fpc-pascal
Op 16/10/2024 om 15:36 schreef 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

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

2024-10-16 Thread Marco van de Voort via fpc-pascal
Op 16/10/2024 om 04:32 schreef Rainer Stratmann 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

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

2024-10-16 Thread Marco van de Voort via fpc-pascal
Op 16/10/2024 om 02:54 schreef DougC via fpc-pascal: On Tue, 15 Oct 2024 19:07:58 -0400 *Rainer Stratmann via fpc-pascal * wrote --- At the Lazarus Congress in Cologne in October 2024, it ended up being very interesting. An important question came up. Why

Re: [fpc-pascal] Type-casting a class variable

2024-05-02 Thread Marco van de Voort via fpc-pascal
Op 2-5-2024 om 08:32 schreef Adriaan van Os via fpc-pascal: TWindow(myClass).CreateNewWindow; And this is what crashes. I can report this, if the type-cast is supposed to work. Known gotcha. Is and as are no good for method variables, use: if myclass.inheritsfrom(twindow) then     twin

Re: [fpc-pascal] AnsiString address changed

2024-03-18 Thread Marco van de Voort via fpc-pascal
Op 18-3-2024 om 09:27 schreef Hairy Pixels via fpc-pascal: do that, you'll have the same output 3 times. Oh, it's a pointer to a pointer? No, it is a pointer variable, but you take the address (@) of that pointer, which causes the second indirection _

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Marco van de Voort via fpc-pascal
Op 14-3-2024 om 11:52 schreef Tomas Hajny via fpc-pascal: "OK, that would be addressed in case of inclusion under utils as well. Even more so, actually - users who want to recompile packages for whatever reason (e.g. to have debug information included as discussed here recently ;-) ) aren't

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Marco van de Voort via fpc-pascal
Op 14-3-2024 om 11:04 schreef Michael Van Canneyt via fpc-pascal: To me it therefore seems a better idea to move the IDE to utils, and to have a toplevel make command that does the same as 'make all' simply without the utilities. Or have a 'NOUTILS=1' define. Or let fpmake simply build the

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Marco van de Voort via fpc-pascal
Op 14-3-2024 om 09:34 schreef Guillermo Martínez Jiménez via fpc-pascal: Thanks, Karoly and Marco. I thought "packages" were libraries not applications, as there is an "utils" directory with programs. Roughly the RTL is a base set of units needed for the compiler itself. When the compiler bo

Re: [fpc-pascal] FP IDE sources

2024-03-13 Thread Marco van de Voort via fpc-pascal
Op 13-3-2024 om 21:34 schreef Karoly Balogh via fpc-pascal: H Where are they? Why aren't with the official source packages? But they are. The IDE code is here: https://gitlab.com/freepascal.org/fpc/source/-/tree/main/packages/ide It also depends on Free Vision, which is here: https://gitlab.

Re: [fpc-pascal] Floating point question

2024-02-22 Thread Marco van de Voort via fpc-pascal
Op 22-2-2024 om 15:08 schreef Thomas Kurz via fpc-pascal: If you're using Win64, then the answer is simple: x86_64-win64 unlike any other x86 target does not support Extended, so neither the compiler nor the code in runtime will ever calculate anything with that precision. That's another thing

Re: [fpc-pascal] Floating point question

2024-02-13 Thread Marco van de Voort via fpc-pascal
Op 13-2-2024 om 11:39 schreef Bernd Oppolzer via fpc-pascal: But, sorry, because we are talking about compile time math, performance (nanoseconds) in this case doesn't count, IMO. But probably compiled code is then automatically upscaled to the higher type too, since if one of the terms o

Re: [fpc-pascal] IntToStr implementation

2024-01-17 Thread Marco van de Voort via fpc-pascal
Op 17-1-2024 om 15:57 schreef Hairy Pixels via fpc-pascal: Can anyone show me where to find the IntToStr implementation in SysUtils? There's so many level of indirection and macros I have no idea where to look for it! Grep rtl/objpas/sysutils for it. sysstr.inc for the implementation syss

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

2024-01-08 Thread Marco van de Voort via fpc-pascal
Op 7-1-2024 om 16:09 schreef Travis Siegel via fpc-pascal: Not that it's 100 percent relevant, but I always use powerbasic (https://www.powerbasic.com) when it's a matter of size, I also never use powerbasic. ___ fpc-pascal maillist - fpc-pasca

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

2024-01-08 Thread Marco van de Voort via fpc-pascal
Op 8-1-2024 om 14:03 schreef Karoly Balogh via fpc-pascal: No, it's not. But the Linker specific options are under Options -> Linker... There's a smartlinking related option there, but I'm not sure if it is what you need. :) That one is -XX, and the "create smartlinkable units" in the tab bef

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

2024-01-07 Thread Marco van de Voort via fpc-pascal
Op 7-1-2024 om 11:23 schreef Sven Barth via fpc-pascal: To underline this with some numbers (I assume you mean the demo/text/hello.pp which only contains a mere "Writeln('Hello World')" and no additional units; all tests on x86_64-linux with 3.3.1): - FPC compiled as is: 388976 B - FPC compi

Re: [fpc-pascal] How to avoid Copy

2023-12-31 Thread Marco van de Voort via fpc-pascal
Op 31/12/2023 om 04:11 schreef Amir--- via fpc-pascal: I compiled the code with `fpc -O3 -Sd -gv -g -gl ` and ran `valgrind` on it (the output is attached). It does not look like there is a big difference between the Check1 and Check2 but Check3 is about 20 times faster than the other two. I

Re: [fpc-pascal] Daily snapshots?

2023-12-29 Thread Marco van de Voort via fpc-pascal
Op 27/12/2023 om 12:38 schreef Thomas Kurz via fpc-pascal: as it seems to take longer for the next major release, I'd appreciate if automated snapshots could be provided either daily or weekly. In the documentation, I found a link to ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/ but I ca

Re: [fpc-pascal] Does the compiler make prodigious use of use ENTER instruction?

2023-12-12 Thread Marco van de Voort via fpc-pascal
Op 12-12-2023 om 17:48 schreef Anthony Walter via fpc-pascal: Iwas reading this article today on the Microsoft website about the mysterious x86 ENTER instruction. The article states that it's primary purpose is to support Pascal and similar compilers to allow for preserving local variables on

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

2023-09-01 Thread Marco van de Voort via fpc-pascal
On 1-9-2023 15:43, Rainer Stratmann via fpc-pascal wrote: 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. How do you start it? TProcess, Runcommand hav

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-27 Thread Marco van de Voort via fpc-pascal
On 26-6-2023 21:39, Michael Van Canneyt via fpc-pascal wrote:  (afaik 3.2.2's comobj does this automatically, in older version YMMV). Well, I checked prior to sending my answer. If it does this, it's well hidden. There seems to be some hook for it, though. It hooks initproc into a linked lis

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-26 Thread Marco van de Voort via fpc-pascal
On 26-6-2023 20:26, Michael Van Canneyt via fpc-pascal wrote: I suspect COM is not properly initialized, and that Lazarus does this for you. (it needs com for some components on windows) So, try adding unit windows to the uses clause and add CoInitialize(nil); as the first statement of yo

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-26 Thread Marco van de Voort via fpc-pascal
On 26-6-2023 15:54, Michael Van Canneyt via fpc-pascal wrote:   v.Voice:=v.GetVoices().Item(1); I have to change that to (0) to get it to work. Might depend on configuration? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists

Re: [fpc-pascal] Free Pascal bindings for EyeLink C code (with a god-cast)

2023-06-13 Thread Marco van de Voort via fpc-pascal
On 13-6-2023 15:38, Rafael Picanço via fpc-pascal wrote: Thank you Marco, I am elaborating on top of your suggestions. > The problem is that the logical solution, making it a macro, doesn't work, as macro definitions don't export through USES clauses. I think that pre-processor constants with

Re: [fpc-pascal] Free Pascal bindings for EyeLink C code (with a god-cast)

2023-06-13 Thread Marco van de Voort via fpc-pascal
On 13-6-2023 05:19, Rafael Picanço via fpc-pascal wrote: (1) I have no idea on how to translate these god-casts, eg., ((getExButtonStates)0), to free pascal. Right now, I think that even if I don't really need them, I just want to understand and learn in the process. The problem is that the

Re: [fpc-pascal] fpc isn't optimised for tail recursion, is it?

2023-06-12 Thread Marco van de Voort via fpc-pascal
On 12-6-2023 08:15, Nikolay Nikolov via fpc-pascal wrote: Shouldn't the recursive call assign the result? nextt(num - 1); nextt:=nextt(num - 1); if you don't use the result, the whole call may be optimized away? ___ fpc-pascal maillist - fpc

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

2023-05-29 Thread Marco van de Voort via fpc-pascal
On 29-5-2023 16:24, Sven Barth via fpc-pascal wrote: FPC itself is single threaded. So for that the single thread rating is more important. However Lazarus (and fpmake) can parallelize the building of packages if they don't depend on each other. On the other hand this is only really importan

Re: [fpc-pascal] Freeing memory with exceptions

2023-05-24 Thread Marco van de Voort via fpc-pascal
On 24-5-2023 13:00, Benito van der Zander via fpc-pascal wrote: It is weird that your code calls setjmp? Are you using a non Windows platform?  Comparisons with Delphi should be done on Windows where the exception systems match. Apples to Apples please. It is FPC on Linux. And Delphi 4 on

Re: [fpc-pascal] Freeing memory with exceptions

2023-05-24 Thread Marco van de Voort via fpc-pascal
On 23-5-2023 12:44, Benito van der Zander via fpc-pascal wrote: Hi, Depends on your code. I wrote all my code in Delphi 4. From 1998 or so. I do not make new projects, only maintain old ones. Delphi 4 felt much better. Like take: procedure test; var s: string; begin   s:= 'abc'; end;

Re: [fpc-pascal] Multiple enumerators per class

2023-05-12 Thread Marco van de Voort via fpc-pascal
Op 12/05/2023 om 14:16 schreef Hairy Pixels via fpc-pascal: Is it possible to have multiple enumerators on one class? Yes, see e.g. TDictionary that allows iterations over keys and values and both. There is only one default iterator, but you can have some property that has its own iterator.

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Marco van de Voort via fpc-pascal
On 30-3-2023 07:38, Bo Berglund via fpc-pascal wrote: The problem seems to be that neither is a valid COFF file according to my Fpc (or Lazarus) in any case. Both generate the COFF error when reaching the linker step. 32-bit objs for delphi are typically OMF, 64-bit are typically coff (for A

Re: [fpc-pascal] Fpc 3.2.2 fails to "make install" on RPi4 to local directory

2023-03-28 Thread Marco van de Voort via fpc-pascal
On 28-3-2023 13:43, Bo Berglund via fpc-pascal wrote: make install prefix="$HOME" FPC="$HOME/dev/fpc/3.2.2/compiler/ppcarm" It is install_prefix= not install prefix=  iow, insert a underscore ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-03-28 Thread Marco van de Voort via fpc-pascal
On 28-3-2023 11:33, Karoly Balogh via fpc-pascal wrote: Probably yes, but there might be an alternative, see below. But as far as I understand, Unit is a Turbo Pascal concept, so any Pascal programming dialect that predates it, probably don't understand it. True, and before units in Turbo Pa

Re: [fpc-pascal] Why in {$mode delphi} it works and in {$mode objfpc} it doesn't?

2023-01-16 Thread Marco van de Voort via fpc-pascal
On 16-1-2023 20:56, Giuliano Colla via fpc-pascal wrote: No chance. Addr is a pointer (of type Pin_addr) but Addr := Pin_addr(HostEnt.h_addr^) works only if mode is Delphi. In objfpc it raises exactly the same error. A little bit weird, isn't it? It depends. It assumes .h_addr is compatibl

Re: [fpc-pascal] GStreamer API unit added

2022-11-01 Thread Marco van de Voort via fpc-pascal
On 1-11-2022 11:45, Michael Van Canneyt via fpc-pascal wrote: I'm not an expert in sound/video streams, so if someone can contribute a more elaborate example, it would be most welcome :) Did you use gir2pascal ?  Seems there are GIR files for it https://gitlab.freedesktop.org/gstreamer/gstr

Re: [fpc-pascal] pthread_detach

2022-10-30 Thread Marco van de Voort via fpc-pascal
On 30-10-2022 13:05, Hairy Pixels via fpc-pascal wrote: On Oct 30, 2022, at 6:55 PM, Marco van de Voort via fpc-pascal wrote: Yes. They call pthread_detach when ending, i.e. just before calling pthread_exit. So if you use normal threads, you already use that. Similarly, pthread_join is a

Re: [fpc-pascal] pthread_detach

2022-10-30 Thread Marco van de Voort via fpc-pascal
On 30-10-2022 12:28, Hairy Pixels via fpc-pascal wrote: The POSIX thread library has a function called pthread_detach (https://man7.org/linux/man-pages/man3/pthread_detach.3.html). Do the RTL threads have anything comparable? Yes. They call pthread_detach when ending, i.e. just before callin

Re: [fpc-pascal] Variants with classes and records

2022-10-06 Thread Marco van de Voort via fpc-pascal
On 6-10-2022 14:16, Sven Barth via fpc-pascal wrote: And that crashed also. I thought it would be ok to just hold the reference but not claim ownership over it. Variants count as managed types and they can contain interface references and strings. If you use a custom type you can do

Re: [fpc-pascal] Enum property can't be published

2022-09-27 Thread Marco van de Voort via fpc-pascal
On 27-9-2022 11:14, Hairy Pixels via fpc-pascal wrote: I just tried to build a lazarus project using 3.3.1/ppca64 and I’m getting an error that an enum can’t be published. This was working on 3.2.2/ppcx64 so what changed? === lazbuild ./pasls.lpi --widgets

Re: [fpc-pascal] mciSendString with long file names

2022-09-23 Thread Marco van de Voort via fpc-pascal
On 22-9-2022 21:26, Travis Siegel via fpc-pascal wrote: That's on windows, you said the program was running on linux. Afaik he said he was on Windows, but his files are on a Linux server: James richter Wrote: I just figured out that short filenames won't work, my files are on a linux serv

Re: [fpc-pascal] BoolToStr

2022-08-28 Thread Marco van de Voort via fpc-pascal
Op 8/28/2022 om 8:45 PM schreef Ralf Quint via fpc-pascal: On 8/28/2022 8:23 AM, James Richters via fpc-pascal wrote: Running "i:\booltostr.exe " -1 0 Why true is -1 instead of 1 is beyond me, but anyway, I would consider this BoolToInt, not BoolToStr,I want the Strings ‘TRUE’ or ‘FALSE’ a

Re: [fpc-pascal] Class or Record Helper for Interface?

2022-08-27 Thread Marco van de Voort via fpc-pascal
Op 8/27/2022 om 3:06 PM schreef Anthony Walter via fpc-pascal: Ah, it seems the problem is even in {$mode delphi} you must use {$modeswitch typehelpers} to define a type helper for an interface. I put a note on the checklist for the next major version about this to review this. (only review,

Re: [fpc-pascal] I am offering a $100 reward for linking static libraries

2022-08-22 Thread Marco van de Voort via fpc-pascal
On 22-8-2022 15:01, Anthony Walter via fpc-pascal wrote: I never thought about the linker changes to FPC and am probably using the internal one. I know in the past I had been able to compile / link libraries created with MinGW GCC on Windows. Parts of the problem also include determining which

Re: [fpc-pascal] Here is real time graphics and physics simulation, library

2022-08-01 Thread Marco van de Voort via fpc-pascal
On 1-8-2022 11:12, Michael Van Canneyt via fpc-pascal wrote: Hence my proposal to refactor it in sysutils, so at least the exception handling can be kept common to all units. His main objection seems to be the IFDEFING, which is hard to avoid in a 20 targets + compiler. Also, the browsa

Re: [fpc-pascal] UBER H3 API working/partially converted

2022-08-01 Thread Marco van de Voort via fpc-pascal
On 31-7-2022 15:55, Skybuck Flying via fpc-pascal wrote: (I mainly write this second e-mail to prevent you from wasting time on the previous e-mail, cause the conversion was already quite successfull with a different tool, read below) IIRC h2pas doesn't like calling convention modifiers, no

Re: [fpc-pascal] Feature Announcement: Function References and Anonymous Functions

2022-05-27 Thread Marco van de Voort via fpc-pascal
On 27-5-2022 14:12, Sven Barth via fpc-pascal wrote: You couldn't have written a test that's independent of TThread? 🥺 When I saw no reactions on core this morning, I dumped everything I had to the respective issue trackers. I'm not sure if I can get all of this reproduced on my private laptop

Re: [fpc-pascal] Feature Announcement: Function References and Anonymous Functions

2022-05-27 Thread Marco van de Voort via fpc-pascal
On 27-5-2022 00:46, Mattias Gaertner via fpc-pascal wrote: As these two features are rather complicated there might still be a huge bundle of bugs lurking around so I ask you to test them to year heart's content and report found bugs First! Ditto! https://gitlab.com/freepascal.org/lazarus/

Re: [fpc-pascal] alloca

2022-05-14 Thread Marco van de Voort via fpc-pascal
On 14-5-2022 17:51, Jonas Maebe via fpc-pascal wrote: On 14/05/2022 17:31, Marco van de Voort via fpc-pascal wrote: Also when an exception happens, the stack pointer is not as expected in exception frames (don't know if that really is an issue, but I can image).  It would be interesting

Re: [fpc-pascal] alloca

2022-05-14 Thread Marco van de Voort via fpc-pascal
On 14-5-2022 10:49, Hairy Pixels via fpc-pascal wrote: Apparently what it does is advance the stack pointer x bytes and return a pointer to the new location so you could probably do that with some assembly. Of course this is dangerous because you can request more memory than exists in the cur

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

2022-04-25 Thread Marco van de Voort via fpc-pascal
On 25-4-2022 11:11, Sven Barth via fpc-pascal wrote: Then you don't think creative enough. Think about (de)serialization code for binary data which needs to use the correct size. If done correctly this can very well be handled with a generic. Actually that's what I immediate thought of too,

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

2022-04-24 Thread Marco van de Voort via fpc-pascal
Op 24/04/2022 om 04:37 schreef Hairy Pixels via fpc-pascal: On Apr 23, 2022, at 10:30 PM, Marco van de Voort via fpc-pascal wrote: Btw since you are afaik an Apple user, did you actually use conformant arrays, or do you base this on UCSD/Borland dialects only? I started with THINK Pascal

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

2022-04-23 Thread Marco van de Voort via fpc-pascal
On 23-4-2022 16:09, Hairy Pixels via fpc-pascal wrote: For 2) I'm also of the opinion of the others: this is unneeded syntactic sugar. There is already a way to declare arrays with a specific size and for a language it's in nearly all cases not good to provide multiple ways to achieve the sam

Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Marco van de Voort via fpc-pascal
On 21-3-2022 22:45, Karoly Balogh via fpc-pascal wrote: Hi, I can reproduce this, or something very similar for the clean/distclean targets, if I have no FPC installed on my machine, but I specify PP= as a Makefile argument to a "bootstrap" compiler binary, and I use OS_TARGET= as well, for cro

Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Marco van de Voort via fpc-pascal
On 21-3-2022 22:17, Victor Campillo via fpc-pascal wrote: make: -iVSPTPSOTO: Command not found Makefile:235: *** The Makefile doesn't support target -, please run fpcmake first.  Stop. Binary "fpc" not found. Maybe a different account or something else changed in your $PATH ? __

Re: [fpc-pascal] Case statement for class introspection

2022-01-16 Thread Marco van de Voort via fpc-pascal
On 16-1-2022 14:18, Ryan Joseph via fpc-pascal wrote: I had some fun today on my day off and managed to actually implement this based on the if-statement based string case labels. Is the compiler team interested in this feature? I think it's a clearly useful addition to OOP and an appropriate

Re: [fpc-pascal] Building fpc 3.2.2 from sources - which compiler to use for install?

2021-12-06 Thread Marco van de Voort via fpc-pascal
Op 6-12-2021 om 12:53 schreef Bo Berglund via fpc-pascal: I.e. should I use the newly compiled 3.2.2 in this step or the seed compiler, which is the previous version? New. See buildfaq. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2021-09-10 Thread Marco van de Voort via fpc-pascal
Op 10-9-2021 om 09:46 schreef Sven Barth via fpc-pascal: You can use the ipconfig command and parse its output (especially ipconfig /all). Afaik netsh has more info. I have several tests  for this in Delphi, but they use the iphlp headers that FPC doesn't have yet (a point on my todo list).

Re: [fpc-pascal] How to get fpc and lazarus sources when svn has shut down?

2021-08-12 Thread Marco van de Voort via fpc-pascal
Op 2021-08-12 om 08:12 schreef Christo Crause via fpc-pascal: This example downloads about 46 MiB of data, which expands to around 309 MiB on disk, of which 50 MiB is git information.  Note that a full clone is about 500MB. Still, it is a nice to have for e.g. machines that only do release

Re: [fpc-pascal] TProcess read buffer size

2021-07-15 Thread Marco van de Voort via fpc-pascal
Op 2021-07-15 om 20:26 schreef Ryan Joseph via fpc-pascal: I have some code the basically does: while bytesRead > 0 do bytesRead := process.Output.Read(buffer^, kBufferSize); but bytesRead is only ever 512 per call to Read. Is this a system imposed limit or something that's part of TP

Re: [fpc-pascal] https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ : Missing install.sh

2021-07-07 Thread Marco van de Voort via fpc-pascal
Op 2021-07-06 om 22:37 schreef Jean Pierre CASSOU via fpc-pascal: https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ Missing install.sh Install is a script to install _binary_ releases, and is part of the fpcbui

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-17 Thread Marco van de Voort via fpc-pascal
Op 2021-06-16 om 23:49 schreef Jean SUZINEAU via fpc-pascal: My best score is 67 kb after strip -s with the code below ... ;-) The fact that you use "result" for function result indicates that you use a object pascal mode,  and not the default. If you don't do that (compile in the default mo

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Marco van de Voort via fpc-pascal
Op 2021-06-16 om 12:30 schreef Mattias Gaertner via fpc-pascal: Since the final binary size after using strip -s on the exe file is 271 kb it seems a bit big! Or is there a lot behind the scenes I have missed? Classes is a hog. I had a look, and only tthreadlist (and with that tlist) were in

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Marco van de Voort via fpc-pascal
Op 2021-06-16 om 11:21 schreef Tomas Hajny via fpc-pascal:  Or if they contain $R inclusions. ...or many other things which may not be smartlinked, either because it is not possible, or because the compiler and/or linker cannot do it right now. Yes. But it is good to keep the things that fu

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Marco van de Voort via fpc-pascal
Op 2021-06-16 om 09:16 schreef Mattias Gaertner via fpc-pascal: On Wed, 16 Jun 2021 08:57:13 +0200 Bo Berglund via fpc-pascal wrote: If I by habit add a bunch of often used units to the uses clause will that affects the size of the compiled application even if they are not in fact used? Yes,

Re: [fpc-pascal] -FNsystem

2021-05-27 Thread Marco van de Voort via fpc-pascal
Op 2021-05-27 om 13:31 schreef Mattias Gaertner via fpc-pascal: There are some dotted units in fpc, e.g. system.uitypes. So it would be nice to have -FNsystem in the default fpc.cfg (Delphi compatible). What do you think? In principle yes, but keep in mind that then probably first uitypes mus

[fpc-pascal] FPC 3.2.2 released

2021-05-21 Thread Marco van de Voort via fpc-pascal
Hello, Finally, the Free Pascal 3.2.2 release is available from our servers and from sourceforge. Changes that may break backwards compatibility will be documented at: http://wiki.freepascal.org/User_Changes_3.2.2 For an overview of what is new see the summary below The website has been upda

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Marco van de Voort via fpc-pascal
Op 2021-05-18 om 23:29 schreef Travis Siegel via fpc-pascal: I'm not positive, but I'm pretty sure the sleep command in linux does not behave the same way it does in windows. As you know, in windows, a sleep command (even if delivered with a parameter of 0) gives up time slices to other progr

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

2021-05-13 Thread Marco van de Voort via fpc-pascal
Op 2021-05-13 om 01:51 schreef Brian via fpc-pascal: There are still some OpenVMS sites out there, which would lead you to assume that VAX Pascal is still alive and kicking, albeit very much a minority compiler. For historic pascal compilers, have a look at this list: https://www.pascalan

Re: [fpc-pascal] Separate release cycle for RTL and compiler proposal

2021-04-19 Thread Marco van de Voort via fpc-pascal
Op 2021-04-19 om 07:52 schreef Karoly Balogh via fpc-pascal: No, the RTL and the compiler are tightly coupled. What might be possible are further packages like the FCL and interfaceing units, but the core RTL itself definitely not. I think the need comes from the fact that the release cycle fo

Re: [fpc-pascal] Version 3.2.2 changes

2021-04-11 Thread Marco van de Voort via fpc-pascal
Op 2021-04-11 om 15:21 schreef Marco van de Voort via fpc-pascal: Op 2021-04-09 om 10:42 schreef Florian Klämpfl via fpc-pascal:  but the "fix version" of most bug reports does not get updated when fixes are backported. I used to spend days on going through all merges and updating

Re: [fpc-pascal] Version 3.2.2 changes

2021-04-11 Thread Marco van de Voort via fpc-pascal
Op 2021-04-09 om 10:42 schreef Florian Klämpfl via fpc-pascal:  but the "fix version" of most bug reports does not get updated when fixes are backported. I used to spend days on going through all merges and updating the merge revisions and fix versions when a release was nearing, but I no longe

Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-03 Thread Marco van de Voort via fpc-pascal
Op 2021-04-03 om 13:22 schreef LacaK via fpc-pascal: I am guessing, that there must be something in initialization sections of units (SysUtils and Classes), which cause that some code is included, right? Can I somehow to avoid this grow of size (for example I need from Classes only TFPList)?

Re: [fpc-pascal] Hide warning number

2021-03-25 Thread Marco van de Voort via fpc-pascal
Op 2021-03-25 om 16:28 schreef Ryan Joseph via fpc-pascal: Is there a way to hide a warning for all files from the command line? The "not inlined" warnings (6058) are too numerous to even be useful anymore so I'd like to disable it. from FPC -h:  -v  Be verbose. is a combination of the fo

Re: [fpc-pascal] Pass type as function parameter

2021-03-24 Thread Marco van de Voort via fpc-pascal
Op 2021-03-24 om 11:05 schreef Michael Van Canneyt via fpc-pascal: Would it be possible in FPC to pass a type of a variable as a parameter to a function? e.g.  MyFunction(integer); I have legacy C code that does this via a macro. Hopefully, it can be done so I do not need to change the ex

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Marco van de Voort via fpc-pascal
Op 2021-03-07 om 22:26 schreef Bart via fpc-pascal: On Sun, Mar 7, 2021 at 5:31 PM Marco van de Voort via fpc-pascal wrote: Probably it is not in the BMP and thus needs more position than one. Length(Char) is 5 according to fpc, I see 5 "graphemes" Indeed: .Ld1$strlab:

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Marco van de Voort via fpc-pascal
Op 2021-03-07 om 17:38 schreef Ryan Joseph via fpc-pascal: On Mar 7, 2021, at 9:31 AM, Marco van de Voort via fpc-pascal wrote: Probably it is not in the BMP and thus needs more position than one. Isn't char[1] a 2 byte wide char? Not sure I understand "more position than o

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Marco van de Voort via fpc-pascal
Op 2021-03-07 om 17:21 schreef Ryan Joseph via fpc-pascal: I came across a bug which was caused but a unicode character losing information and narrowed it down to this. Why doesn't the chars[1] print the same character as appeared in the string? var chars: UnicodeString; begin chars :=

Re: [fpc-pascal] Strange output from make when building 3.2.0

2021-02-25 Thread Marco van de Voort via fpc-pascal
Op 2021-02-25 om 10:12 schreef Bo Berglund via fpc-pascal: I am installing fpc 3.2.0 on a notebook running Ubuntu 20.04 LTS When I execute make clean and make sourceinstall I get this strange output message: :~/dev/fpc/3.2.0$ time make sourceinstall PREFIX=$HOME make: -iVSPTPSOTO: Command n

Re: [fpc-pascal] Traits Proposal

2021-02-19 Thread Marco van de Voort via fpc-pascal
Op 2021-02-19 om 16:50 schr So the method resolution doesn't actually change the VMT table of the class, just the interface? See it like this: An interface is a fragment of VMT. All methods of the interface are there in order. If implemented right, it is like a pointer into the implementin

Re: [fpc-pascal] Traits Proposal

2021-02-17 Thread Marco van de Voort via fpc-pascal
Op 2021-02-17 om 00:02 schreef Benito van der Zander via fpc-pascal: And there often is a lot of unintentional deep copying. This is also why a property returning a record is fairly useless except for extremely small records like TPoint (and even that is not optimal no But a managed record

Re: [fpc-pascal] Traits Proposal

2021-02-16 Thread Marco van de Voort via fpc-pascal
Op 2021-02-16 om 21:33 schreef Ryan Joseph via fpc-pascal: On Feb 16, 2021, at 1:27 PM, Marco van de Voort via fpc-pascal wrote: And there often is a lot of unintentional deep copying. This is also why a property returning a record is fairly useless except for extremely small records

Re: [fpc-pascal] Traits Proposal

2021-02-16 Thread Marco van de Voort via fpc-pascal
Op 2021-02-16 om 19:21 schreef Ryan Joseph via fpc-pascal: Interfaces are extremely slow. Virtual method calls are also slow. I have been using interfaces for reference counting, and have been thinking to replace it all with managed records because they are so slow (unfortunately records can

Re: [fpc-pascal] Traits Proposal

2021-02-15 Thread Marco van de Voort via fpc-pascal
Op 2021-02-15 om 18:08 schreef Ryan Joseph via fpc-pascal: As I understand, this is not a method hiding, but just to tell the compiler which method to implement the interface—the interface could have method names which are very very common to use and this syntax allows us to "rename" those met

Re: [fpc-pascal] Traits Proposal

2021-02-14 Thread Marco van de Voort via fpc-pascal
Op 2021-02-14 om 17:16 schreef Michael Van Canneyt via fpc-pascal: except it doesn't require an interface. The thing we seem to want here is a default property which works on records/objects so maybe we can just focus on that? The interface has so much boiler plate and I don't really see wha

  1   2   3   4   5   6   7   8   9   10   >