Re: [fpc-pascal] Running FPC in the browser...

2023-11-03 Thread Graeme Geldenhuys via fpc-pascal
On 10/22/23 11:20, Michael Van Canneyt via fpc-pascal wrote: > As a consequence, this means FPC can now be run in a browser. > See the screenshot at Well done to everyone involved. That is amazing, and yes, I can think of many possibilities this could be used for. Regards, - Graeme -

[fpc-pascal] Choice of exceptions to use?

2023-06-04 Thread Graeme Geldenhuys via fpc-pascal
Hi, I'm working on code where the function take a (x, y) set of coordinates. If the coordinates are out of range/bounds, I want to raise an exception with a message explaining the reason and limits. I definitely don't want to "silently do nothing". Looking at these set of built-in exceptions:

Re: [fpc-pascal] Forking the GitLab FPC Source repository

2023-05-01 Thread Graeme Geldenhuys via fpc-pascal
On 5/1/23 18:55, Graeme Geldenhuys via fpc-pascal wrote: > I just tried, and had no problems. It took about 40 seconds to clone and > checkout the `main` branch. The download seemed to be just over 200MB. Just tried the Gitlab repo too - same result. No proble

Re: [fpc-pascal] Forking the GitLab FPC Source repository

2023-05-01 Thread Graeme Geldenhuys via fpc-pascal
On 4/30/23 15:23, Norman Dunbar via fpc-pascal wrote: > Any advice gratefully reeceived. Thanks. I just tried, and had no problems. It took about 40 seconds to clone and checkout the `main` branch. The download seemed to be just over 200MB.

Re: [fpc-pascal] Forking the GitLab FPC Source repository

2023-05-01 Thread Graeme Geldenhuys via fpc-pascal
On 4/30/23 15:59, Michael Van Canneyt via fpc-pascal wrote: > One possible reason is that the repo is simply too big: it has 26 years of > commits. I can't imagine that being the reason. I just did a fresh clone, and it was just over 200MB download, and the commit count on the main branch is less

Re: [fpc-pascal] FPC Backtrace

2022-01-03 Thread Graeme Geldenhuys via fpc-pascal
On 2022-01-03 23:45, Graeme Geldenhuys wrote: On 2022-01-03 13:28, James Richters via fpc-pascal wrote: I’m curious if there is some way, perhaps with some directive or something to force a debug backtrace to happen, but without an error. Christo already offered you a solution, but to offer

Re: [fpc-pascal] FPC Backtrace

2022-01-03 Thread Graeme Geldenhuys via fpc-pascal
On 2022-01-03 13:28, James Richters via fpc-pascal wrote: I’m curious if there is some way, perhaps with some directive or something to force a debug backtrace to happen, but without an error. Christo already offered you a solution, but to offer an alternative solution... Most IDE debugging

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-29 Thread Graeme Geldenhuys via fpc-pascal
On 2021-12-29 13:56, Graeme Geldenhuys via fpc-pascal wrote: I did the load test multiple times, and the results were consistent. It should go without saying, my testing methodology could be flawed. ;-) G. ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-29 Thread Graeme Geldenhuys via fpc-pascal
On 2021-12-29 09:54, Michael Van Canneyt via fpc-pascal wrote: They showed clearly that the used protocol (http & xml) is the largest factor. in 2013 I did many tests in a JSON REST framework: the times for streaming were dwarfed by the time spent on network & database access. Have you, or

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-29 Thread Graeme Geldenhuys via fpc-pascal
On 2021-12-29 11:22, wkitty42--- via fpc-pascal wrote: i'm sorry... what is WST? googling https://wiki.lazarus.freepascal.org/Web_Service_Toolkit G. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-28 Thread Graeme Geldenhuys via fpc-pascal
On 2021-12-28 15:25, Michael Van Canneyt via fpc-pascal wrote: Thanks to the magic of RTTI and Invoke(), creating a JSON-RPC server has just become significantly easier ! That's pretty neat - nicely done Michael. // Create a class that implements the interface Type   TIntf2Impl =

Re: [fpc-pascal] FPC & Lazarus moving to gitlab

2021-07-05 Thread Graeme Geldenhuys via fpc-pascal
On 04/07/2021 9:12 pm, Martin Frb via fpc-pascal wrote: > I recommend on the long run to switch to git. Once you switch, you'll never want to go back. ;-) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key:

Re: [fpc-pascal] FPC & Lazarus moving to gitlab

2021-06-22 Thread Graeme Geldenhuys via fpc-pascal
On 22/06/2021 7:54 pm, fpc-devel via fpc-pascal wrote: > Graeme will be happy finally :) LOL - years in the making, but it's finally happening. :-) Well done for everybody that contributedto make this happen. I know it's not easy - I have had my fare share of SVN conversions to Git, and they

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-19 Thread Graeme Geldenhuys via fpc-pascal
On 18/05/2021 11:49 am, Sven Barth via fpc-pascal wrote: > I don't think we need to mention any specific clients (and why did your > list not include Filezilla? :P ) +1 on both counts. :-D Regards, Graeme ___ fpc-pascal maillist -

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Graeme Geldenhuys via fpc-pascal
On 17/05/2021 3:13 pm, Karoly Balogh via fpc-pascal wrote: > I'd actually keep > FTP enabled, as it doesn't hurt anything and it's still a thing for retro > downloads. Not just "retro" but a more efficient and faster protocol for file downloads. Unfortunately the whole world is going HTTP crazy

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-29 Thread Graeme Geldenhuys via fpc-pascal
On 29/04/2021 8:00 am, Mattias Gaertner via fpc-pascal wrote: > FPC does not. > Delphi does: If only FPC would have strived to be Delphi Compatible. ;-) :-P Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-28 Thread Graeme Geldenhuys via fpc-pascal
On 28/04/2021 6:26 pm, Martin Frb via fpc-pascal wrote: > Would omitting the type info not lead to issues with overloaded functions? Luckily others have already solved that problem. :-) Here is Java's JSR-355 and overloading is covered in Section F.

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-28 Thread Graeme Geldenhuys via fpc-pascal
Hello Sven, On 28/04/2021 6:32 am, Sven Barth via fpc-pascal wrote: > Second: the syntax is required for Delphi compatibility anyway Couldn't such verbose syntax be limited to {$mode delphi} behaviour, and then leave {$mode objfpc} free to experiment and introduce new less verbose syntax in the

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-27 Thread Graeme Geldenhuys via fpc-pascal
On 27/04/2021 10:13 pm, Ryan Joseph via fpc-pascal wrote: > value.SortEntities(function(a, b: TEntity): integer >begin > // do stuff >end > ); It seem the beginning of the thread is missing, but I would like to comment on something here - purely based on the

Re: [fpc-pascal] Background info on Generics in FPC

2021-04-18 Thread Graeme Geldenhuys via fpc-pascal
On 17/04/2021 10:19 pm, Sven Barth via fpc-pascal wrote: > The compiler's parser has a very limited look ahead and thus especially > with more complex specializations (especially nested ones) and type > overloads in scope the compiler might not come to the right decision OK, that and the "it's

Re: [fpc-pascal] Abstract classes ignored

2021-04-18 Thread Graeme Geldenhuys via fpc-pascal
On 17/04/2021 10:09 pm, Sven Barth via fpc-pascal wrote: > but Delphi compatbility is more > important here, thus the default is a warning and not an error. How is this beneficial? The compiler should help the developer, but here it was decided that it's beneficial for the program to crash at

Re: [fpc-pascal] Abstract classes ignored

2021-04-18 Thread Graeme Geldenhuys via fpc-pascal
On 18/04/2021 11:31 am, C Western via fpc-pascal wrote: > but there are also case where it never makes sense to > implement them and calling them indicates a logical error elsewhere in > the code. So do the logical thing... Throw an exception! Don't promote a faulty compiler. Fix your code

[fpc-pascal] Background info on Generics in FPC

2021-04-17 Thread Graeme Geldenhuys via fpc-pascal
Hi I'm looking at the wiki and official FPC language documentation. What was the reason for the decision to make the FPC syntax so verbose regarding Generics? eg: What we have now type generic TArray = array of t; TMyIntegerArray = specialize TArray; generic IList<_T> = Interface

Re: [fpc-pascal] Pull request for fphttpclient.pp in git mirror repo

2021-03-16 Thread Graeme Geldenhuys via fpc-pascal
On 16/03/2021 9:29 pm, Martin Frb via fpc-pascal wrote: > For none git users, githup offers patch/diff Ah yes, I forgot to mention that. Thanks Martin. G. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Pull request for fphttpclient.pp in git mirror repo

2021-03-16 Thread Graeme Geldenhuys via fpc-pascal
Hi, I just received a notification that somebody created a pull request for FPC in my git mirror repository. I will notify the person that it's a read-only repository, but if anybody wanted to review and apply the changes directly, here is the link:

Re: [fpc-pascal] Unicode chars losing information

2021-03-09 Thread Graeme Geldenhuys via fpc-pascal
On 09/03/2021 1:44 am, Tomas Hajny via fpc-pascal wrote: > UnicodeString may be used in a program simply because the included unit > has it used in its interface. That may be the case even if there's no > use of characters outside of US ASCII at all. So FPC rather goes with the fact that data

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Graeme Geldenhuys via fpc-pascal
On 08/03/2021 7:49 pm, Jonas Maebe via fpc-pascal wrote: > It's not possible to safely use unicodestring without > knowing how 16bit unicode works. The compiler can't solve that. I disagree. Java does just that! The issue is the assumption of using array indexing into the a string. I guess

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Graeme Geldenhuys via fpc-pascal
On 08/03/2021 2:49 pm, Michael Van Canneyt via fpc-pascal wrote: > In that sense, unicode conversion support is something optional and so we > require you to enable it explicitly, since enabling it has some drawbacks: Surely if you explicitly use the UnicodeString type, the compiler should know

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Graeme Geldenhuys via fpc-pascal
On 07/03/2021 5:48 pm, Nikolay Nikolov via fpc-pascal wrote: > It depends on what you mean by "just working". No, "just worked" is exactly what it says on the tin. It is FPC that overcomplicating matters. As an example, here is Java that also uses UTF-16 encoding, just like FPC's UnicodeString

Re: [fpc-pascal] Generic routines for both dynamic array and other collections

2021-02-22 Thread Graeme Geldenhuys via fpc-pascal
On 22/02/2021 1:10 pm, Sven Barth via fpc-pascal wrote: > If users > want expect arrays to be object oriented they should use corresponding > languages like Java or C#. Fully agree. Even Java doesn't "objectify" arrays as some type of object. Hence Java includes the Arrays class that has a static

Re: [fpc-pascal] Windows Defender considers fp.exe a malicious program

2021-02-12 Thread Graeme Geldenhuys via fpc-pascal
On 12/02/2021 4:17 pm, Bart via fpc-pascal wrote: > I exclude the folders where fpc/lazarus reside from scanning. > Also the folders where I develop my programs. > If you don't you're bound to get strange bugs and thing like this. Yes, that's a very good idea. We do the same at work for our Java,

Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Graeme Geldenhuys via fpc-pascal
On 08/02/2021 11:53 pm, Bo Berglund via fpc-pascal wrote: > I assume if this is left as is as $(CompPath) it will use the globally defined > compiler 3.2.0, but if changed will use the project defined compiler instead. Yes, everything you stated is correct. I find that setting the global option

Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Graeme Geldenhuys via fpc-pascal
On 06/02/2021 10:07 am, Bo Berglund via fpc-pascal wrote: > How do you manage different versions of the compiler in Lazarus? This is where I believe MSEide does things much better that Lazarus, but that's for another discussion. In Lazarus under "Tools -> Options... -> Compiler executable" I

Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Graeme Geldenhuys via fpc-pascal
On 06/02/2021 10:28 am, Michael Van Canneyt via fpc-pascal wrote: > No, you don't. I think my fpc.cfg has not changed in many many years. Same here. My last modification date on that file is 2013. :-) Regards, Graeme ___ fpc-pascal maillist -

Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-05 Thread Graeme Geldenhuys via fpc-pascal
On 05/02/2021 11:18 pm, Bo Berglund via fpc-pascal wrote: > Can they share the same fpc.cfg file (or rather .fpc.cfg)? Yes, I've been doing so for probably the last 10 years. I have 7 different FPC versions installed on my system - all working together. The trick is to have paths as follows in

[fpc-pascal] Two versions of freemem() - are they equal

2020-12-30 Thread Graeme Geldenhuys via fpc-pascal
Hi, Do both these method yield the same result, or is one better (performance, safer?) that the other? procedure FreeMem(p:pointer;Size:ptruint); procedure FreeMem(p:pointer); Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Re: [fpc-pascal] TCustomStream still using LongInt and not Int64

2020-12-27 Thread Graeme Geldenhuys via fpc-pascal
On 27/12/2020 5:02 pm, Michael Van Canneyt via fpc-pascal wrote: > Because on 32 bit platforms, this is the maximum size of available memory for > a program, and we like things maximally portable. You can't read more than > 2gb in memory on a 32-bit platform. Ha yes, it's been so long since I

Re: [fpc-pascal] Documentation bug - Language Ref - Ordinal types

2020-12-27 Thread Graeme Geldenhuys via fpc-pascal
On 27/12/2020 4:53 pm, Graeme Geldenhuys via fpc-pascal wrote: > > According to this HTML page: >https://freepascal.org/docs-html/ref/refsu4.html Oh wait, the table I was looking at is titled "Integer constant type mapping", so it's how the compile maps constants t

[fpc-pascal] Documentation bug - Language Ref - Ordinal types

2020-12-27 Thread Graeme Geldenhuys via fpc-pascal
According to this HTML page: https://freepascal.org/docs-html/ref/refsu4.html The data types Byte, Word and Cardinal (LongWord) has the following ranges: 128..255Byte 32768..65535Word 2147483648..4294967295 Cardinal (longword) Those should be 0.. Regards, Graeme -- fpGUI

Re: [fpc-pascal] heaptrc unit troubles with New() & Dispose() calls

2020-12-27 Thread Graeme Geldenhuys via fpc-pascal
On 27/12/2020 4:00 pm, Jonas Maebe via fpc-pascal wrote: > No. New and Dispose eventually result in calls to plain getmem/freemem > anyway. Thanks Jonas. I'll try and reproduce the original issue with a smaller example. It the issue still persists (can't determine the method causing the memory

[fpc-pascal] TCustomStream still using LongInt and not Int64

2020-12-27 Thread Graeme Geldenhuys via fpc-pascal
Hi, Is this a bug in FPC 3.2.0 where TCustomStream still uses LongInt in the Read() method, where all other methods in in the class uses Int64 type? Here is the FPC code: TCustomMemoryStream = class(TStream) private FMemory: Pointer; FSize, FPosition: PtrInt; protected

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-23 Thread Graeme Geldenhuys via fpc-pascal
On 22/12/2020 10:20 pm, gabor via fpc-pascal wrote: > Sorry, I keep mistaking code point for character. I thought that the > code point is a value in the range 0..10. I don't think I fully > understand Unicode... Here in an example: https://en.wikipedia.org/wiki/Combining_character Two

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-21 Thread Graeme Geldenhuys via fpc-pascal
On 21/12/2020 2:07 pm, Liam Proven via fpc-pascal wrote: > Is this conversion of TurboVision FOSS, then? Yes, it definitely is, otherwise it wouldn't be part of FPC. If you have FPC install, you should be able to simply type 'fp' from the command prompt and it should fire up the FreeVision Text

[fpc-pascal] heaptrc unit troubles with New() & Dispose() calls

2020-12-13 Thread Graeme Geldenhuys via fpc-pascal
Hi, Are there any known issues with heaptrc unit via compiler parameters -gl -gh, when using New() and Dispose() to manually allocate and free memory. I helped someone debug their code, finding and fixing a memory leaks, but the FPC memory leak output, after the application terminates, did not

Re: [fpc-pascal] Daily docs

2020-11-29 Thread Graeme Geldenhuys via fpc-pascal
On 28/11/2020 11:40 pm, Michael Van Canneyt via fpc-pascal wrote: > The total size of the generated documentation is 1.3 Gb, roughly 280.000 > files, so a lot of identifiers. Wow, that has grown a lot in recent times. Regards, Graeme ___ fpc-pascal

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-23 Thread Graeme Geldenhuys via fpc-pascal
On 23/11/2020 1:26 pm, James Richters via fpc-pascal wrote: > Any Ideas on how this, or some of it could be accomplished? Or is it all > completely impossible? If the object that you are trying to output has RTTI enabled, then maybe you could query everything you need via TypeInfo (or the new

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Graeme Geldenhuys via fpc-pascal
On 20/11/2020 6:51 pm, Bart via fpc-pascal wrote: > I know, and there he can see how this capability is detected, hence my > reference to the compiler. Thanks, that's good to know. I'll definitely give it a try too. Regards, Graeme ___ fpc-pascal

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Graeme Geldenhuys via fpc-pascal
On 20/11/2020 1:29 pm, James Richters via fpc-pascal wrote: > so as you can see, my #1 item in my wish list is the ability to assign colors, Some good examples there. :-) I wouldn't want to guess how long it takes to create those boxed versions. Wow! At work, our automated CI pipelines run on

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Graeme Geldenhuys via fpc-pascal
On 20/11/2020 7:04 am, Sven Barth via fpc-pascal wrote: > a way to convert the > option list to TConsoleApplication's argument handling so that one doesn't > have to declare that twice. Oh, I really like that idea. I'll make sure to include both of those mentioned. Regards, Graeme -- fpGUI

[fpc-pascal] I'm working on automated Help Output for console apps

2020-11-19 Thread Graeme Geldenhuys via fpc-pascal
Hi, I'm working on a automated help output writer(s) for console apps. Thus no more tedious and ugly output when you do: myapp -h My aims: * I write a lot of console apps, so this would be very useful to me. * Ability to swap out the help formatter. It's interface based, so custom

Re: [fpc-pascal] Graphing library

2020-11-19 Thread Graeme Geldenhuys via fpc-pascal
On 19/11/2020 1:29 pm, James Richters via fpc-pascal wrote: > Exporting PDF files from my AGG-Pas buffer would be really nice. Indeed an interesting idea, but unfortunately that ability has not been implemented yet. In my earlier message I was more referring to using either fpPDF or AggPas.

Re: [fpc-pascal] Graphing library

2020-11-18 Thread Graeme Geldenhuys via fpc-pascal
On 15/11/2020 8:33 am, Darius Blaszyk via fpc-pascal wrote: > I am looking for a simple to use non-visual graphing library to produce x-y > plots in a raster file format (similar to how pyplot works). You could also use the fppdf code included with FPC and generate PDFs of any size (you don't

Re: [fpc-pascal] fpcres now supports compilation of RC files

2020-08-22 Thread Graeme Geldenhuys via fpc-pascal
On 12/08/2020 8:16 pm, Sven Barth via fpc-pascal wrote: > Thanks to the work of Martok the fpcres utility is now able to compile > RC files into RES files. Awesome, been waiting about 15 years for that. :-) Fantastic contribution. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI