Re: [fpc-pascal] FPC 3.2.0 released!

2020-06-21 Thread Michalis Kamburelis via fpc-pascal
Great news! Thank you to the FPC team for all magnificent work. I maintain Docker images with FPC (with various versions and cross-compilers, with Castle Game Engine and some related tools), see https://hub.docker.com/r/kambi/castle-engine-cloud-builds-tools/ and https://github.com/castle-engine/c

Re: [fpc-pascal] Strange "division by zero" error using variants

2022-05-24 Thread Michalis Kamburelis via fpc-pascal
That's a funny interaction between Variants and Pascal's ambiguous (logical or bitwise) "and" :) Both the operators and the types are ambiguous -> making the boolean short-circuit evaluation not possible. Indeed one workaround is to cast the variants to Booleans explicitly, which makes it use logi

Re: [fpc-pascal] Programming Pascal using an AI Chatbot

2022-12-31 Thread Michalis Kamburelis via fpc-pascal
The chatbot is quite amazing :) I wrote about my nicest moments on https://castle-engine.io/wp/2022/12/17/my-mind-is-blown-i-can-use-ai-to-generate-castle-game-engine-code-to-integrate-it-with-physx-i-can-use-ai-to-generate-html-documentation-from-comments-in-pascal-code/ -- generate Pascal code to

Re: [fpc-pascal] What is -CO ?

2023-06-09 Thread Michalis Kamburelis via fpc-pascal
I'm also curious :) I just tested, and the -Co (lowercase "o") enables overflow checking by default (like "{$Q+}" in code), https://github.com/michaliskambi/modern-pascal-introduction/wiki/What-are-range-and-overflow-checks-(and-errors)-in-Pascal . But -CO (uppercase "O") seems unrelated to it.

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

2023-06-12 Thread Michalis Kamburelis via fpc-pascal
Steve, If you're looking for equivalent to "return X", use "Exit" with a parameter in Pascal: "Exit(X)". It's just a shortcut for "Result := X; Exit;" Regards, Michalis pon., 12 cze 2023 o 19:57 Steve Litt via fpc-pascal napisał(a): > > Nikolay Nikolov via fpc-pascal said on Mon, 12 Jun 2023 0

Re: [fpc-pascal] [Lazarus] Lazarus server under DDOS

2024-10-01 Thread Michalis Kamburelis via fpc-pascal
Note: As a consequence, the GitHub Action https://github.com/gcarreno/setup-lazarus also fails now. Trying to use it to install FPC+Lazarus results in an error Error: getPackageList -- Request timeout: /packagelist.json in GitHub Action workflow output. I guess because the action downloads htt

Re: [fpc-pascal] Adding Javascript to Pascal

2025-02-24 Thread Michalis Kamburelis via fpc-pascal
Karoly Balogh wrote: > We're in the offtopic again, but I really hate this kind of elitism. As a > kid I started with BASIC - on various Commodore home computers then also > on early IBM PCs - and I hope to think I grew up to be a semi-decent > programmer. At least I can fix your Pascal compiler fo

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-27 Thread Michalis Kamburelis via fpc-pascal
Michael Van Canneyt wrote: > > Let's delete custom very special FPC variant with ticks. leave only Delphi > > variant, please. in English it is maybe called as 'align implementation with > > Delphi'. > > It is aligned with Delphi ? > > > why? to keep the same source when changing objfpc/delphi mode

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-27 Thread Michalis Kamburelis via fpc-pascal
> > Anyways, thanks to for getting this merged. It’s been a whopping 6 years > since the PR was made and it’s a very welcome feature for embedded code. 👏 > Oh, I also want to add "thank you" by the way for multi-line strings! We have code constructing long shaders in Castle Game Engine. It right

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michalis Kamburelis via fpc-pascal
> Your argument makes no sense. There's always been multiple ways to do > many things in pascal, and it's never caused any more confusion than any > other typical language construct. I don't think the comparison to "multiple ways to write a comment" is proper here. Because various ways to write c

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michalis Kamburelis via fpc-pascal
Michael Van Canneyt wrote: > Personally, I prefer the backtick solution. > The triple quote is slow, it requires postprocessing the string. > The backtick solution needs only one pass. > > > I positively HATE it when people start treating whitespace as > significant. No YAML or Python for me on th

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michalis Kamburelis via fpc-pascal
> But pas2js exists, I believe it is important, and that explains my decision. OK. I will have to accept this decision :) Well I see your arguments (Pas2js compatibility + you feel Delphi design is "horror" :) ). Even if I do see a different decision as more optimal. For the sake of clarity, I do