Re: [fpc-pascal] Syntax changes suggestions

2018-07-27 Thread Sven Barth via fpc-pascal
R0b0t1 schrieb am Do., 26. Juli 2018, 09:53: > On Mon, Jul 23, 2018 at 11:11 AM, Ryan Joseph > wrote: > > > > > >> On Jul 22, 2018, at 4:54 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> And that's

Re: [fpc-pascal] access violation?

2018-07-28 Thread Sven Barth via fpc-pascal
Am 27.07.2018 um 19:41 schrieb Ryan Joseph: On Jul 27, 2018, at 11:24 AM, Mattias Gaertner wrote: You can't if you compile with -CR. The RTL is not compiled with objectchecks, so it works there. According to this test not only can you call methods on nil objects but it calls the method sta

Re: [fpc-pascal] access violation?

2018-07-30 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 30. Juli 2018, 18:05: > > > > On Jul 28, 2018, at 2:03 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > The method you provided below would not fail anyway, because it doesn't > dereference Se

Re: [fpc-pascal] access violation?

2018-07-31 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 31. Juli 2018, 18:15: > > > > On Jul 30, 2018, at 11:08 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > If the method doesn't access Self then there is nothing you can do. > > Is this someth

Re: [fpc-pascal] Operator overload bug

2018-08-04 Thread Sven Barth via fpc-pascal
On 28.07.2018 16:38, John Doe wrote: > On Mon, Jul 23, 2018 at 1:49 PM, Sven Barth via fpc-pascal > <mailto:fpc-pascal@lists.freepascal.org>> wrote: > > Ryan Joseph <mailto:r...@thealchemistguild.com>> schrieb am Mo., 23. Juli 2018, > 17:35: > &

Re: [fpc-pascal] Operator overload bug

2018-08-04 Thread Sven Barth via fpc-pascal
On 04.08.2018 17:31, Ben Grasset wrote: > On Sat, Aug 4, 2018 at 10:38 AM, Sven Barth via fpc-pascal > <mailto:fpc-pascal@lists.freepascal.org>> wrote: > > On 28.07.2018 16:38, John Doe wrote: > > On Mon, Jul 23, 2018 at 1:49 PM, Sven Barth via fpc-pascal

Re: [fpc-pascal] Rebuilding RTL

2018-08-07 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 8. Aug. 2018, 00:02: > If I cd to the rtl directory in the fpc sources and run make they are > compiled into the /rtl/units/x86_64-darwin directory. > > 1) How do I compile the ppc386 units? the readme says there’s a FPC > variable for on the makefile configs but I can

Re: [fpc-pascal] Rebuilding RTL

2018-08-07 Thread Sven Barth via fpc-pascal
Am 08.08.2018 um 00:42 schrieb Ryan Joseph: On Aug 7, 2018, at 4:17 PM, Sven Barth via fpc-pascal wrote: Are you sure that you used the correct compiler? Try to pass -n to tell it to ignore the fpc.cfg and see whether it picks up the correct ones when you pass them with - Fu (-Fo is not

Re: [fpc-pascal] Rebuilding RTL

2018-08-08 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 8. Aug. 2018, 18:48: > Btw, what are all these messages I get when building the compiler? I don’t > know if they should be ignored or I caused them myself. > > objc1.inc(360,3) Note: tgobj: (FreeTemp) freeing of temp at pos > -2147483648 requested > They are due to th

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 11:17 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Dennis wrote: Michael Van Canneyt wrote: On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one.

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 10:59 schrieb Dennis: Why class operator is accepted for advanced records but not old fashion object??? Because objects are not records. Internally they are handled more closely to classes than records. Regards, Sven ___ fpc-pascal m

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 17:29 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Sven Barth via fpc-pascal wrote: But maybe you are using mode delphi ? If so, try separating out the object definition in a separate unit which is not compiled in delphi mode. A global operator won't help at a

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Sven Barth via fpc-pascal
Am 16.08.2018 um 12:47 schrieb Michael Van Canneyt: Am 15.08.2018 um 17:29 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Sven Barth via fpc-pascal wrote: But maybe you are using mode delphi ? If so, try separating out the object definition in a separate unit which is not compiled in

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Sven Barth via fpc-pascal
Am 16.08.2018 um 12:23 schrieb Dennis Poon: Sven Barth via fpc-pascal wrote: Am 15.08.2018 um 10:59 schrieb Dennis: Why class operator is accepted for advanced records but not old fashion object??? Because objects are not records. Internally they are handled more closely to classes than

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-17 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 17. Aug. 2018, 18:22: > > > > On Aug 16, 2018, at 8:55 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > It shouldn't be hard. Feel free to provide a patch together with some > tests and it will

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-19 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Sa., 18. Aug. 2018, 19:38: > > > > On Aug 17, 2018, at 7:19 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > However for classes there is the problem of temporary variables. Take a > := b + c + d. That i

Re: [fpc-pascal] Very slow startup of Frepascal programs on just one system

2018-08-22 Thread Sven Barth via fpc-pascal
James schrieb am Mi., 22. Aug. 2018, 11:06: > Any ideas on what may be going on? This is pretty much un-usable with > these huge delays every time I need to start one of my freepascal > programs. > As a test try to disable your anti virus and/or Windows Defender. Regards, Sven > _

Re: [fpc-pascal] Link with GCC object files

2018-08-22 Thread Sven Barth via fpc-pascal
Andreas schrieb am Mi., 22. Aug. 2018, 12:59: > Hi, I have a question. Is it possible to link FPC for Linux (PC and ARM) > with GCC or other C++ object files? > You can use the $L directive for this ( https://freepascal.org/docs-html/current/prog/progsu43.html#x50-490001.2.43 ). If you use C++ i

Re: [fpc-pascal] How is interface variable implemented?

2018-08-25 Thread Sven Barth via fpc-pascal
Dennis schrieb am Fr., 24. Aug. 2018, 13:11: > The run results: > Object call Time Taken Seconds: 2.1899964194744825E-001 > Interface call Time Taken Seconds: 2.799001622200E-001 > > so, the time difference is about 27% > > > My question is, where is this extra time spent? > > I am assuming a

Re: [fpc-pascal] Unbuffering I/O

2018-08-29 Thread Sven Barth via fpc-pascal
Am 29.08.2018 um 18:25 schrieb Mark Morgan Lloyd: On 29/08/18 16:00, Henry Vermaak wrote: On Wed, Aug 29, 2018 at 03:01:54PM +, Mark Morgan Lloyd wrote:> I think I've seen this question asked before, my apologies if this was> recently.> > I've got two programs intended to be functionally i

Re: [fpc-pascal] with in classes/records

2018-09-03 Thread Sven Barth via fpc-pascal
On 03.09.2018 09:15, Ryan Joseph wrote: > Thank you for bearing with me, so finally here are my questions: > > 1) Given this is critical to make management operators work smoothly what > does the compiler team think about this idea to have a default property or > “with" in classes/records? > >

Re: [fpc-pascal] with in classes/records

2018-09-04 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 4. Sep. 2018, 11:27: > > > > On Sep 4, 2018, at 2:06 PM, Ryan Joseph > wrote: > > > > Sorry I didn’t think enough before I sent this. > > > > We *must* allow this assignment to make operator overloads work. += > operators are also basically assigning TWrapper to TWrap

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 6. Sep. 2018, 16:33: > > > > On Sep 6, 2018, at 9:25 PM, Michael Van Canneyt > wrote: > > > > No, the whole point of default is that they should be for any kind of > field. > > For example if you want a nullable boolean, you'll do something like > > > > Type > >TN

Re: [fpc-pascal] with in classes/records

2018-09-09 Thread Sven Barth via fpc-pascal
Am 09.09.2018 um 16:16 schrieb Michael Van Canneyt: On Sun, 9 Sep 2018, Ryan Joseph wrote: It seems syntacticly possible that default properties could be recursive by having a default property reference a record/class with another default property. Should that be allowed? I don't think so.

Re: [fpc-pascal] Concatenating CP Strings

2018-09-16 Thread Sven Barth via fpc-pascal
On 9/15/18 10:12 PM, Martok wrote: > And another one: > > var > f: TextFile; > s: string; > begin > AssignFile(f, 'a_file.txt'); > SetTextCodePage(f, 866); > Reset(f); > ReadLn(f, s); > WriteLn(StringCodePage(s)); > readln; > end. > > That is rather useless... No, it is not. The

Re: [fpc-pascal] Concatenating CP Strings

2018-09-16 Thread Sven Barth via fpc-pascal
On 9/15/18 1:38 AM, Martok wrote: > Hi all, > > concatenating codepage strings is documented to be a bit weird: > > > Knowing this, how does one achieve the following? > > - have a string in any dynamic codepage > - append an

Re: [fpc-pascal] "No debugger support" in FPC3.0.4 for DOS (go32v2)

2018-09-17 Thread Sven Barth via fpc-pascal
schrieb am Mo., 17. Sep. 2018, 08:11: > I downloaded "dos304full" and did the install. But trying to debug results > in "No debugger support available" > I looked into the sourcecode of the IDE and discovert that the IDE > included > in the downloaded DOS304FULL.zip must have been compiled with "

Re: [fpc-pascal] seeing messages?

2018-09-17 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 17. Sep. 2018, 09:46: > I haven’t got a reply in days to some questions I had in the "with in > classes/records” thread, which is unusual. Are people seeing my messages? > Just wanted to make sure the messages aren’t getting lost. > If your last message is the one fro

Re: [fpc-pascal] Listing the type (even as string) of the parameters and the return of a function

2018-10-08 Thread Sven Barth via fpc-pascal
silvioprog schrieb am Mo., 8. Okt. 2018, 10:11: > Hi. > > First, thanks for the great work in the invoke.inc for win64! ☺ > > So, consider the following example: > > uses RTTI; > > type > TFoo = class > public > function Bar(const A: string; B: Integer): string; > end; > > function TFoo

Re: [fpc-pascal] Listing the type (even as string) of the parameters and the return of a function

2018-10-09 Thread Sven Barth via fpc-pascal
silvioprog schrieb am Di., 9. Okt. 2018, 19:56: > On Mon, Oct 8, 2018 at 6:21 AM Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> Short answer: No. >> >> Long answer: No. The extended RTTI required for that is currently only >>

Re: [fpc-pascal] Option in Makefile to clean installed compiled units

2018-10-10 Thread Sven Barth via fpc-pascal
Fr0sT schrieb am Mi., 10. Okt. 2018, 13:39: > Hi all, > > when building FPC from sources, I couldn't find a command to cleanup > unit binaries copied to common .\units\ dir by "install" command. > Without this step build process fails. > > I build FPC from sources with the following layout: > > .

Re: [fpc-pascal] Parse strings like "day-1" to convert in a time stamp

2018-10-14 Thread Sven Barth via fpc-pascal
Marcos Douglas B. Santos schrieb am So., 14. Okt. 2018, 16:15: > Do you know any Pascal lib to parse strings to convert in date/time values? > The user is supposed to type human-friendly values like: > - "day"=> trunc(now) > - "day-2" => trunc(now-2) > - "week" => trunc(now-7) > - "yesterday"

Re: [fpc-pascal] Add assembler source file to fpmake package?

2018-10-15 Thread Sven Barth via fpc-pascal
christo schrieb am Mo., 15. Okt. 2018, 18:22: > I'm trying to build a fpmake project for the RTL. Are you aware that the RTL already has a fpmake project? It might not be entirely up to date, but it exists. Regards, Sven ___ fpc-pascal maillist - f

Re: [fpc-pascal] Add assembler source file to fpmake package?

2018-10-15 Thread Sven Barth via fpc-pascal
christo schrieb am Mo., 15. Okt. 2018, 21:41: > On 15/10/2018 20:07, Sven Barth via fpc-pascal wrote: > > christo schrieb am Mo., 15. Okt. 2018, 18:22: > >> I'm trying to build a fpmake project for the RTL. > > > Are you aware that the RTL already has a

Re: [fpc-pascal] Cannot use SQLite 64 bit dll

2018-10-20 Thread Sven Barth via fpc-pascal
Am 19.10.2018 um 19:22 schrieb Dennis: Using Lazarus and FPC and sqlite3conn unit, I can use the sqlite3.dll on windows without problem. However, when I try to convert my project to win 64, it just fail without any warning. I am using     FPC 3.1.1 Revision 63034     Lazarus 1.9.0     both a

Re: [fpc-pascal] Where can I download the fpc 3.0.0 seed compiler for Linux on i386 x64?

2018-10-23 Thread Sven Barth via fpc-pascal
Bo Berglund schrieb am Di., 23. Okt. 2018, 17:02: > I want to build FPC/Lazarus (3.0.4/1.8.4) from sources on a new Linux > (Ubuntu 18.04 TLS MATE) using an i386 family CPU. > AFAIK I need to have the fpc seed compiler in order to do this. > > But this is a hen and egg problem, how can I download

Re: [fpc-pascal] Where can I download the fpc 3.0.0 seed compiler for Linux on i386 x64?

2018-10-23 Thread Sven Barth via fpc-pascal
Bo Berglund schrieb am Di., 23. Okt. 2018, 18:13: > On Tue, 23 Oct 2018 17:08:40 +0200, Sven Barth via fpc-pascal > wrote: > > >Why don't you simply use the distribution independent release of 3.0.4? > > But I was under the impression that I cannot build 3.0.4 from sou

Re: [fpc-pascal] Where can I download the fpc 3.0.0 seed compiler for Linux on i386 x64?

2018-10-23 Thread Sven Barth via fpc-pascal
Bo Berglund schrieb am Di., 23. Okt. 2018, 18:59: > On Tue, 23 Oct 2018 18:12:41 +0200, Bo Berglund > wrote: > > > >sudo apt-get install -y libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev > >gir1.2-coglpango-1.0 libpangox-1.0-dev xorg-dev libgtk2.0-dev > >libpango1.0-dev > > > >Is this what I need

Re: [fpc-pascal] instance memory usage

2018-10-24 Thread Sven Barth via fpc-pascal
Am 20.10.2018 um 20:09 schrieb Marc Santhoff: Hi, from testing a while ago I remember the following: The memory used by a class instance is composed of 1. the size ".instanceSize()" gives back 2. the memory used by other variables and maybe class instances referenced by pointers and owned b

Re: [fpc-pascal] Case statements without constants?

2018-10-29 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 29. Okt. 2018, 10:41: > I tried today to make a case that used variables instead of constants and > was surprised to get an error. I’m sure this been true since the 80’s but > why don’t cases allow variables??? I thought a case statement was just a > group of if..else

Re: [fpc-pascal] fphttpclient.post

2018-10-31 Thread Sven Barth via fpc-pascal
Ched schrieb am Mi., 31. Okt. 2018, 23:43: > Hello All, > > I'm using fphttpclient.simpleget to make querries to webserver. It's very > very simple to use this > function ! "Du pur bonheur". > > As some data which travel the world encoded in clear in the url of the get > are sometime private > (c

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Sven Barth via fpc-pascal
Am Sa., 3. Nov. 2018, 23:56 hat Tomas Hajny geschrieben: > On Sat, November 3, 2018 23:04, James wrote: > > Thanks for the suggestion... > > > > I put my code in the OnCreate event as you suggested, but when I try to > > compile it, I get wrong number of parameters specified for call to > > Assig

Re: [fpc-pascal] Constants in generics

2018-11-06 Thread Sven Barth via fpc-pascal
Am Di., 6. Nov. 2018, 08:44 hat Ryan Joseph geschrieben: > I implemented a first draft of constants (integers) in generics. My reason > was specifically that I wanted a way to add methods to static arrays and > generic records is the only way to accomplish this AFAIK. > > If I fix this up will it

Re: [fpc-pascal] Constants in generics

2018-11-06 Thread Sven Barth via fpc-pascal
Am Di., 6. Nov. 2018, 14:35 hat Ryan Joseph geschrieben: > > > > On Nov 6, 2018, at 8:21 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > First of I'm not a fan of adding support for constants, mainly because > it w

Re: [fpc-pascal] Restricted generic param types

2018-11-08 Thread Sven Barth via fpc-pascal
Am Fr., 9. Nov. 2018, 05:48 hat Ryan Joseph geschrieben: > I’m getting a parse error here. It thinks the “U” is another type but in > fact it’s another generic parameter and not related to “T” at all. Is this > a bug? I don’t think the way the parsing works the compiler actually can > discern th

Re: [fpc-pascal] Constants in generics

2018-11-08 Thread Sven Barth via fpc-pascal
Am Fr., 9. Nov. 2018, 03:44 hat Ryan Joseph geschrieben: > > > > On Nov 9, 2018, at 4:28 AM, Florian Klämpfl > wrote: > > > > I like the idea of const in generics, but it needs serious cleanup when > it's working: > > - commit messages like "first commit" are useless > > Those are for github so

Re: [fpc-pascal] Default record const values

2018-11-10 Thread Sven Barth via fpc-pascal
Am Sa., 10. Nov. 2018, 10:06 hat Ryan Joseph geschrieben: > Should’t this work? This would be a good way to set default record values > but it doesn’t seem to be supported. > TMyRecord is not yet completely parsed. There could be another field located behind the "default" constant. Thus using th

Re: [fpc-pascal] Default record const values

2018-11-10 Thread Sven Barth via fpc-pascal
Am Sa., 10. Nov. 2018, 12:44 hat Ryan Joseph geschrieben: > Not quite understanding how that’s not entirely parsed by the time you > assign outside of the record. Even so I would expect it to copy what the > const was able to capture, fully parsed or not. > It's not entirely parsed by the time t

Re: [fpc-pascal] Constants in generics

2018-11-10 Thread Sven Barth via fpc-pascal
Am Sa., 10. Nov. 2018, 14:47 hat Ryan Joseph geschrieben: > > > > On Nov 10, 2018, at 7:22 PM, Florian Klämpfl > wrote: > > > > If you "export" a generic taking a const from a unit, this info has to > be stored in the ppu. > > Can you show a test case I could use to see where this is triggered i

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am 11.11.2018 um 16:03 schrieb tobiasgie...@gmail.com: Hello, Delphi 10.3 is going to support inline variable declarations like this: begin var i : Integer := 22; WriteLn(i); end; I would assume it can also be used with records. For details, please see http://blog.marcocantu.com/blog/2

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am 11.11.2018 um 12:59 schrieb Ryan Joseph: Since I’ve got a little more free time I wanted to see if there was a simple solution to issue in Pascal that causes quite a bit of friction for me, i.e. constructor boiler plate. In c++ there is “uniform initialization” for structs which uses the {}

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am 11.11.2018 um 19:29 schrieb leledumbo via fpc-pascal: But *if* I had to decide I would pick #1, cause then there wouldn't be the chance to break existing code if a user decides to add a constructor to their record and some other code relies on there not being a constructor. Also due to the syn

Re: [fpc-pascal] Default record const values

2018-11-11 Thread Sven Barth via fpc-pascal
Am 10.11.2018 um 09:35 schrieb Ryan Joseph: Should’t this work? This would be a good way to set default record values but it doesn’t seem to be supported. type TMyRecord = record public a: integer; b: string;

Re: [fpc-pascal] Default record const values

2018-11-11 Thread Sven Barth via fpc-pascal
Am Mo., 12. Nov. 2018, 02:56 hat Ryan Joseph geschrieben: > > > > On Nov 12, 2018, at 8:08 AM, Ryan Joseph > wrote: > > > > But this syntax worked if you assigned it within blocks. Why does it > need to be removed? Since I discovered it I was planning on using it > instead of class functions wit

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am Mo., 12. Nov. 2018, 03:12 hat Ryan Joseph geschrieben: > > > > On Nov 12, 2018, at 12:25 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > I'm not convinced that this feature is really needed, because one can > simply

Re: [fpc-pascal] Uniform initialization?

2018-11-12 Thread Sven Barth via fpc-pascal
Am Di., 13. Nov. 2018, 07:04 hat Ryan Joseph geschrieben: > > > > On Nov 12, 2018, at 5:45 AM, Vojtěch Čihák > wrote: > > > > We've already decided internally that we are *not* going to support this. > > Why does FPC have Delphi mode anyways? It’s not actually compatible with > Delphi so what is

Re: [fpc-pascal] Default record const values

2018-11-13 Thread Sven Barth via fpc-pascal
Am 14.11.2018 um 02:05 schrieb John Doe: On Mon, Nov 12, 2018 at 1:51 AM Sven Barth via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> wrote: The compiler now correctly rejects such declarations with a "Type is not completely defined error". Making this not w

Re: [fpc-pascal] C-blocks

2018-11-14 Thread Sven Barth via fpc-pascal
Am 15.11.2018 um 03:59 schrieb Ryan Joseph: Can c-blocks support Jonas added for Cocoa support be extended to other platforms or is this stuck with OS X? It uses a runtime library by Apple but is it possible to replace this with a custom Pascal implementation? Somes notes: http://wiki.lazarus

Re: [fpc-pascal] C-blocks

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 08:39 hat Ryan Joseph geschrieben: > > > > On Nov 15, 2018, at 1:27 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > They are only useful when interacting with the external runtime. On > other OSes noth

Re: [fpc-pascal] Passing nested procs out?

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 10:17 hat Ryan Joseph geschrieben: > Is passing nested procs outside of the calling scope relying on undefined > behavior? It doesn’t seem like this should be allowed. > See the notes mentioned here: http://wiki.freepascal.org/FPC_New_Features_2.6.0#Support_for_nested_proc

Re: [fpc-pascal] Passing nested procs out?

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 12:26 hat Marcos Douglas B. Santos geschrieben: > On Thu, Nov 15, 2018 at 8:15 AM Sven Barth via fpc-pascal > wrote: > > > > Am Do., 15. Nov. 2018, 10:17 hat Ryan Joseph > geschrieben: > >> > >> Is passing nested procs outside of t

Re: [fpc-pascal] Passing nested procs out?

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 12:40 hat Ryan Joseph geschrieben: > > > > On Nov 15, 2018, at 5:14 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > See the notes mentioned here: > http://wiki.freepascal.org/FPC_New_Features_2.6.0#Su

Re: [fpc-pascal] C-blocks

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 15:01 hat Ryan Joseph geschrieben: > Given that, having a light-weight “anonymous nested function” (not a > “reference to” closure) is actually a nice compliment and in fact 2 > different things. As FPC’s current c-blocks support demonstrates, it has > closure properties bu

Re: [fpc-pascal] C-blocks

2018-11-16 Thread Sven Barth via fpc-pascal
Am Fr., 16. Nov. 2018, 03:25 hat Ryan Joseph geschrieben: > > > > On Nov 15, 2018, at 11:30 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > No, too many ways to do the same thing don't make things easier, not to > menti

Re: [fpc-pascal] C-blocks

2018-11-16 Thread Sven Barth via fpc-pascal
Am Fr., 16. Nov. 2018, 12:57 hat Ryan Joseph geschrieben: > > > > On Nov 16, 2018, at 5:33 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > When a function contains at least one anonymous function then a capture > obje

Re: [fpc-pascal] Building trunk

2018-11-23 Thread Sven Barth via fpc-pascal
Am Fr., 23. Nov. 2018, 10:26 hat C Western geschrieben: > I haven't been able to build trunk i386 fpc for a couple of weeks. Is > this supposed to be working, or have I misconfigured something? (I don't > think I have changed anything.) The output is below. I don't think it is > significant, but

Re: [fpc-pascal] Building trunk

2018-11-24 Thread Sven Barth via fpc-pascal
Am Sa., 24. Nov. 2018, 10:09 hat C Western geschrieben: > On 23/11/2018 09:50, Sven Barth via fpc-pascal wrote: > > Am Fr., 23. Nov. 2018, 10:26 hat C Western > <mailto:l...@c-m-w.me.uk>> geschrieben: > > > > I haven't been able to build trunk i386 fpc

Re: [fpc-pascal] Multi-scope helpers draft

2018-11-25 Thread Sven Barth via fpc-pascal
Am 24.11.2018 um 05:20 schrieb Ryan Joseph: I’d like to propose this mode switch ($modeswitch multiscopehelpers) to allow multiple helpers per scope. I have no idea why Delphi thinks only one helper should be allowed in any scope but it cripples the feature severely. Sharing helpers is mostly

Re: [fpc-pascal] Constants in generics

2018-11-25 Thread Sven Barth via fpc-pascal
Am 14.11.2018 um 03:25 schrieb Ryan Joseph: I think I have this done except for cleanup. Here’s the status: - Integer,string,real,set and nil constant for parameters. - Consts can have type restrictions which correspond to the above types. - Const can be assigned to from generic const params. -

Re: [fpc-pascal] Multi-scope helpers draft

2018-11-25 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 03:12 hat Ryan Joseph geschrieben: > > > > On Nov 25, 2018, at 11:03 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > It's a good thing that you saw the errors in your first design and > rectified

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > - your pretty name is wrong; the pretty name for a specialization with > con

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 12:14 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 5:16 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph > geschrieben: > > > > > &

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 15:47 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 8:18 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > You don't need to manually check for U. The parser will find U in the > symbol

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph geschrieben: > > > > On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Best check again once you've done the switch to tconstsym for constants. >

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 12:03 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > On Tue, 27 Nov 2018 11:35:22 +0100 > Sven Barth via fpc-pascal wrote: > > >[...] > > > const > > > kSomeDays:TDays = [Mon, Wed]; &g

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 14:00 hat Ryan Joseph geschrieben: > > > > On Nov 27, 2018, at 5:35 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > 1) kSomeDays is a typed const so I get a load node instead of > tsetconstnode, whic

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 15:08 hat Ryan Joseph geschrieben: > > You did read the part about the generic and the specialization being > located in two different units? 😉 > > Oops. This still works so I guess it’s ok. > > program gc_ppu; > uses > gc_types_unit; > > var > a: specialize

Re: [fpc-pascal] Constants in generics

2018-11-28 Thread Sven Barth via fpc-pascal
Am Mi., 28. Nov. 2018, 09:41 hat Ryan Joseph geschrieben: > I just noticed I sent this to the wrong person and the list never saw it > so I’m sending it again. I feel like I should try to fix it while I’ve got > my eyes on the generics code before I forget. > > Is there a reason it’s not implemen

Re: [fpc-pascal] Constants in generics

2018-11-28 Thread Sven Barth via fpc-pascal
Am Mi., 28. Nov. 2018, 15:27 hat Ryan Joseph geschrieben: > > > > On Nov 28, 2018, at 7:26 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Because that is not supposed to work. Generic routines are *routines*, > not types. Y

Re: [fpc-pascal] Default record const values

2018-11-28 Thread Sven Barth via fpc-pascal
Am 28.11.2018 um 20:27 schrieb Benjamin Rosseaux: program Test123; {$ifdef fpc}   {$mode delphi} {$endif} type   TTest = record   public     a: LongInt;     b: LongInt;   end;   TTestHelper = record helper for TTest   public     const Default: TTest = (a: 1; b: 2);   end; var   Test: TTest; be

Re: [fpc-pascal] Constants in generics

2018-11-28 Thread Sven Barth via fpc-pascal
Am 27.11.2018 um 11:35 schrieb Sven Barth: Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph mailto:r...@thealchemistguild.com>> geschrieben: > On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal mailto:fpc-pascal@lists.freepascal.org>> wrote: > > Best ch

Re: [fpc-pascal] How to get ANSI code command return value?

2018-12-02 Thread Sven Barth via fpc-pascal
Am So., 2. Dez. 2018, 08:29 hat Mr Bee via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > – I want to avoid CRT unit as much as possible. I prefer raw pascal > solution. > Um... The CRT unit is a raw Pascal solution?! Anyway, you can use that unit to see how the CRT unit did it. –

Re: [fpc-pascal] Implicit generic specializations

2018-12-02 Thread Sven Barth via fpc-pascal
Am So., 2. Dez. 2018, 10:55 hat denisgolovan geschrieben: > Hi Ryan > > That's definitely a nice feature. > Could you clarify and/or discuss with compiler devs the rules for function > overloads? > Currently FPC seems a bit messy even without inferencing like that. > Where is it messy? O.o Also

Re: [fpc-pascal] Implicit generic specializations

2018-12-02 Thread Sven Barth via fpc-pascal
Am So., 2. Dez. 2018, 15:28 hat Ryan Joseph geschrieben: > > > > On Dec 2, 2018, at 8:11 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Also the idea should be that a non-generic routine takes precedence. > > > > I

Re: [fpc-pascal] Implicit generic specializations

2018-12-02 Thread Sven Barth via fpc-pascal
Am Mo., 3. Dez. 2018, 03:45 hat Ryan Joseph geschrieben: > > > > On Dec 2, 2018, at 10:53 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Specialization is expensive. If specialization can be avoided, it should > be. Not to me

Re: [fpc-pascal] Generics question

2018-12-02 Thread Sven Barth via fpc-pascal
Am So., 2. Dez. 2018, 23:29 hat Bart geschrieben: > Hi, > > { TFoo } > > generic TFoo = class > procedure Bar; > end; > > { TFoo } > > procedure TFoo.Bar; > procedure localproc; > begin end; > begin > end; > > This will not compile (fpc 3.0.4): > gentest.lpr(35,4) Error: Generic met

Re: [fpc-pascal] Generics question

2018-12-03 Thread Sven Barth via fpc-pascal
Am Mo., 3. Dez. 2018, 10:53 hat Martok geschrieben: > Am 03.12.2018 um 08:00 schrieb Sven Barth via fpc-pascal: > > Because Delphi does not allow that either. We relaxed that however in > 3.1.1 and > > it should be part of 3.2.0. You can test the corresponding branch of you &

Re: [fpc-pascal] Object questions

2018-12-03 Thread Sven Barth via fpc-pascal
Am Di., 4. Dez. 2018, 04:06 hat Ryan Joseph geschrieben: > Some questions about old-style objects. > > 1) How can you check if self is assigned? self refers to the struct itself > but if the object was allocated on the stack then how do we know self is a > pointer or not? > > procedure TMyObject.

Re: [fpc-pascal] Object questions

2018-12-04 Thread Sven Barth via fpc-pascal
Am Di., 4. Dez. 2018, 08:00 hat Ryan Joseph geschrieben: > > > > On Dec 4, 2018, at 1:52 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > The type of "Self" inside a object is always the same no matter if it'

Re: [fpc-pascal] Implicit generic specializations

2018-12-05 Thread Sven Barth via fpc-pascal
Am 03.12.2018 um 14:01 schrieb Ryan Joseph: On Dec 3, 2018, at 2:45 PM, Ryan Joseph wrote: I just looked it over and I was wrong about the dummy, it’s just a flag. If the generic doesn’t cover existing functions then that messes up some assumptions I made so I need re-think the design now.

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Sven Barth via fpc-pascal
Am Fr., 14. Dez. 2018, 10:31 hat Michael Van Canneyt geschrieben: > > > On Fri, 14 Dec 2018, el es wrote: > > > On 13/12/2018 22:23, Michael Van Canneyt wrote: > >> > >> > >> On Thu, 13 Dec 2018, Martin Frb wrote: > >> > >>> > >>> Besides, the documentation does not say that FreeOnTerminate

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Sven Barth via fpc-pascal
Am Fr., 14. Dez. 2018, 11:23 hat Michael Van Canneyt geschrieben: > > > On Fri, 14 Dec 2018, Sven Barth via fpc-pascal wrote: > > > Am Fr., 14. Dez. 2018, 10:31 hat Michael Van Canneyt < > mich...@freepascal.org> > > geschrieben: > > > >> > >

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Sven Barth via fpc-pascal
Am Fr., 14. Dez. 2018, 11:26 hat Luca Olivetti geschrieben: > El 13/12/18 a les 20:36, Martin Frb ha escrit: > > > The thread may makes calls (several, one after the other) into a > > library, and each of those calls may not return for some time (to long > > for the main thread to wait, without t

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
Am Mi., 19. Dez. 2018, 09:03 hat denisgolovan geschrieben: > My personal wish-list is: > - support for array calculations / automatic loop parallelization via SSE, > AVX, etc. > Both static and dynamic arrays should supported. > Once implemented vector operations on arrays (ala APL) might be

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
Am Mi., 19. Dez. 2018, 13:18 hat Ryan Joseph geschrieben: > > > > On Dec 19, 2018, at 6:35 PM, Ryan Joseph > wrote: > > > > How does that work? I’ve been interested in coroutines for a while now > but I don’t understand how they function in the language. They would need > to manage stack states

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
Am Mi., 19. Dez. 2018, 11:38 hat Martok geschrieben: > > The main problem here is to model what registers an instruction uses and > > modifies so that the register allocator of the surrounding function can > take > > that into account accordingly... Maybe as a first step we could allow in > linin

Re: [fpc-pascal] inlining functions depending on implementation only functions

2018-12-29 Thread Sven Barth via fpc-pascal
Am Sa., 29. Dez. 2018, 15:23 hat Benito van der Zander geschrieben: > Hi, > > after updating from fpc 3.1 to fpc 3.3, I am getting a lot of "function > was not inlined" warnings, e.g. when an inline function depends on a > function not declared in the interface part like: > > unit inlinetest; > >

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 11:20 hat denisgolovan geschrieben: > Hi, all > > Could someone confirm this functionality is merged into trunk? I mean > constants in generics. > I can confirm that it is not integrated in trunk. Regards, Sven ___ fpc-pascal mai

Re: [fpc-pascal] SetLength warnings - request

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 17:05 hat Benito van der Zander geschrieben: > The non-initialization of 'Result' has bitten me more than once in Delphi. > > > Me, too. Usually the solution was to add a call to SetLength. > > That makes the bullshit hints especially bad. > Even in Delphi situations can oc

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 23:41 hat Alexander Shishkin via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > 06.11.2018 10:13, Ryan Joseph пишет: > > > > program generic_constants; > > > > type > > generic TList = record > > list: array[0..U-1] of T; > > fu

<    1   2   3   4   5   6   7   8   9   10   >