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

2018-09-09 Thread 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. Let's start with 1 level. For default arrays it's

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

2018-09-06 Thread Michael Van Canneyt
On Thu, 6 Sep 2018, Ryan Joseph wrote: On Sep 5, 2018, at 11:22 AM, Ryan Joseph wrote: I just realized that default shouldn’t be allowed on non-object fields right? I think that’s what was decided and makes most sense to me too. Disregard my last email. Sorry if I make a bunch of noise

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

2018-09-06 Thread Michael Van Canneyt
On Wed, 5 Sep 2018, Ryan Joseph wrote: On Sep 4, 2018, at 7:15 PM, Sven Barth via fpc-pascal wrote: The idea of the default property is that *all* operators (and methods) (except management operators) are hoisted from the type of the default property. The assignment of one record with

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

2018-09-03 Thread Michael Van Canneyt
On Mon, 3 Sep 2018, Ryan Joseph wrote: On Sep 3, 2018, at 9:17 PM, Martin wrote: No it is not the same. You.f.Free; will always work, it is not ambiguous. You.Free; depends on no method Free being declared on the class of You, or any of its base classes, or any other default class (if

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

2018-09-03 Thread Michael Van Canneyt
On Mon, 3 Sep 2018, Ryan Joseph wrote: On Sep 3, 2018, at 4:14 PM, Michael Van Canneyt wrote: On Sep 3, 2018, at 2:41 PM, Michael Van Canneyt wrote: 'with' is terribly awkward. “with” came to mind because it’s basically a with statement but within a class. Properties had another

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

2018-09-03 Thread Michael Van Canneyt
On Mon, 3 Sep 2018, Ryan Joseph wrote: On Sep 3, 2018, at 2:41 PM, Michael Van Canneyt wrote: 'with' is terribly awkward. “with” came to mind because it’s basically a with statement but within a class. Properties had another side effect of requiring naming which is redundant (I’d

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

2018-09-03 Thread Michael Van Canneyt
On Mon, 3 Sep 2018, Ryan Joseph wrote: I’m sorry to bring this one up again but it was touched upon in regards to management operators and auto free objects. Please bear with me while I recap. I’m writing this email today because I just had this exact same problem in my code and I’m

Re: [fpc-pascal] Resource compilation

2018-08-28 Thread Michael Van Canneyt
On Tue, 28 Aug 2018, Martok wrote: Hi again, a quick update: I have a somewhat-working version, but many things are still missing. We have: a preprocessor, full support for BITMAP, ICON, CURSOR, resource attributes (LANGUAGE etc.), all RCDATA-like resources, including their definition from

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

2018-08-18 Thread Michael Van Canneyt
On Sat, 18 Aug 2018, Bo Berglund wrote: On Sat, 18 Aug 2018 03:19:55 +0200, Sven Barth via fpc-pascal wrote: In Delphi objects are deprecated Huh? ObjectPascal deprecating objects? Sounds far-fetched. Old-style TP Objects are deprecated, but classes are not. Michael.

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 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 >>>> defin

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 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 all as (currently) the operator won't be visible during the

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 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. When I specialize a class using this TDictionary

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 Michael Van Canneyt
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. When I specialize a class using this TDictionary with a type: TSecurity = object   end; e.g. TNewDict =

Re: [fpc-pascal] Resource compilation

2018-08-04 Thread Michael Van Canneyt
On Sat, 4 Aug 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > changes/extensions to fcl-res? I think a lot. There is a request in the bugtracker for a resource compiler since ages. It comes up regularly. Many people don't even pursue it furt

Re: [fpc-pascal] Resource compilation

2018-08-03 Thread Michael Van Canneyt
On Sat, 4 Aug 2018, Martok wrote: Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: The RC language itself isn't *that* difficult. Main difficulty would be to essentially implement a C-preprocessor-compatible preprocessor. Just "a few" months later, I finally got around to

Re: [fpc-pascal] access violation?

2018-07-27 Thread Michael Van Canneyt
On Fri, 27 Jul 2018, Dmitry Boyarintsev wrote: From high-level (OOP) such actions are not welcomed (and are enforced using -CR in case of FPC). In order to have robust, maintainable and portable (to either other platform or even language) a developer should respect high-level rules and

Re: [fpc-pascal] access violation?

2018-07-26 Thread Michael Van Canneyt
On Thu, 26 Jul 2018, Ryan Joseph wrote: I was doing some testing today (Mac) and discovered that calling Free on a nil object didn’t cause a EAccessViolation exception. Why doesn’t that crash? It is by design. And - OMG !! - it is even documented:

Re: [fpc-pascal] No type info available for this type (Enumerated type with constant assignment)

2018-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2018, Dennis wrote: I am trying out the examples at http://wiki.freepascal.org/Enumerated_types but The following simple program will raise compiler error "No type info available for this typ" I am using Lazarus 1.8.0  FPC 3.0.4   x86_64-Win64-win32/win64 program testenum;

Re: [fpc-pascal] Syntax changes suggestions

2018-07-23 Thread Michael Van Canneyt
On Sat, 21 Jul 2018, Ben Grasset wrote: On Fri, Jul 20, 2018 at 1:20 AM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: Because a feature might change the language in a way that's not in the spirit of the language. Look at how Delphi implemented attributes: they're

Re: [fpc-pascal] Syntax changes suggestions

2018-07-21 Thread Michael Van Canneyt
On Fri, 20 Jul 2018, Sven Barth via fpc-pascal wrote: Am 20.07.2018 um 00:53 schrieb Ben Grasset: If a feature works as intended and is useful (which is all that matters), how is it "blind copying"? Because a feature might change the language in a way that's not in the spirit of the

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Vojtěch Čihák wrote: Hi,   Lazarus has option "Show Class/Proc Hint" which displays method name (with light-green background) as the top line in source editor, only if the method's body is longer than number of lines in source editor. Maybe new option "Show Proc var

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Henry Vermaak wrote: On Tue, Jul 17, 2018 at 12:07:10PM +0200, Michael Van Canneyt wrote: >On Tue, Jul 17, 2018 at 11:14:31AM +0200, Michael Van Canneyt wrote: If you need to "reduce the scope of variables", your routines are too long to begin with. If

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Martin wrote: On 17/07/2018 11:05, Henry Vermaak wrote: On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: I have some suggestions of change to freepascal syntax, just to debate (All are

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Henry Vermaak wrote: On Tue, Jul 17, 2018 at 12:07:42PM +0200, Martin wrote: On 17/07/2018 12:02, Henry Vermaak wrote: >On Tue, Jul 17, 2018 at 11:45:26AM +0200, Sven Barth via fpc-pascal wrote: >>*you* might do this, but there are enough developers that won't. I

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Martin wrote: On 17/07/2018 12:02, Henry Vermaak wrote: On Tue, Jul 17, 2018 at 11:45:26AM +0200, Sven Barth via fpc-pascal wrote: *you* might do this, but there are enough developers that won't. I already By not having this feature you're not giving anyone a choice.

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Henry Vermaak wrote: On Tue, Jul 17, 2018 at 11:14:31AM +0200, Michael Van Canneyt wrote: On Tue, 17 Jul 2018, Henry Vermaak wrote: >On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: >>Santiago A. schrieb am Mo., 16. Juli 2018, 13:41:

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Michael Van Canneyt
On Tue, 17 Jul 2018, Henry Vermaak wrote: On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > I have some suggestions of change to freepascal syntax, just to debate > > (All are backward compatible) > > - Declaring

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Michael Van Canneyt
On Mon, 16 Jul 2018, Santiago A. wrote: I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks, and loop variables - Autofree pointers - Try except finally blocks - Private declarations in implementation some

Re: [fpc-pascal] Searchable docs online

2018-07-08 Thread Michael Van Canneyt
On Sun, 8 Jul 2018, Ryan Joseph wrote: Just tried to use https://www.freepascal.org/docsearch/docsearch.html and it seems to have a bug (not working, errors in the JS console). Awaiting the source on svn also. :) Possibly, I have been doing some experiments. I have re-enabled it. It is

Re: [fpc-pascal] Searchable docs online

2018-07-05 Thread Michael Van Canneyt
On Thu, 5 Jul 2018, Rainer Stratmann wrote: Is the server itself written in freepascal? Or is it apache or nginx? The search server is a single program which is switchable between CGI and standalone HTTP server using a define. I use HTTP server for development, it is deployed as CGI.

[fpc-pascal] Searchable docs online

2018-07-05 Thread Michael Van Canneyt
Hello, Given the questions of late, I have created a search page for the docs: https://www.freepascal.org/docsearch/docsearch.html This will search in the manuals, and in the reference documentation for the units. There is ample room for improvement, but the page already works. Things to

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Michael Van Canneyt
On Tue, 3 Jul 2018, Marcos Douglas B. Santos wrote: On Tue, Jul 3, 2018 at 10:26 AM, Michael Van Canneyt wrote: On Tue, 3 Jul 2018, Marcos Douglas B. Santos wrote: On Tue, Jul 3, 2018 at 7:50 AM, Michael Van Canneyt wrote: On Tue, 3 Jul 2018, Marco van de Voort wrote: Trivial indeed

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Michael Van Canneyt
On Tue, 3 Jul 2018, Marcos Douglas B. Santos wrote: On Tue, Jul 3, 2018 at 7:50 AM, Michael Van Canneyt wrote: On Tue, 3 Jul 2018, Marco van de Voort wrote: Trivial indeed, till you need more fine-grained control. e.g. C needs to be an array of chars that mark word boundaries etc. But I

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Michael Van Canneyt
On Tue, 3 Jul 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > In our previous episode, Michael Van Canneyt said: >> >> What's the easiest way to split a stream into words ? > > Doesn't strutils have some word extraction and coun

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Michael Van Canneyt
On Tue, 3 Jul 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: What's the easiest way to split a stream into words ? Doesn't strutils have some word extraction and count functions? It does: WordCount,ExtractWord, but they are very inefficent. Michael

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Michael Van Canneyt
On Tue, 3 Jul 2018, Michael Van Canneyt wrote: Hi, What's the easiest way to split a stream into words ? Words are just that: words, but - here is the caveat - they must support unicode. So Michael and Michaël are both words. Tried regexpr unit (the obvious choice), but that does

[fpc-pascal] Split stream into words

2018-07-03 Thread Michael Van Canneyt
Hi, What's the easiest way to split a stream into words ? Words are just that: words, but - here is the caveat - they must support unicode. So Michael and Michaël are both words. Tried regexpr unit (the obvious choice), but that does not seem to do the trick: {$mode objfpc} {$H+} uses

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Michael Van Canneyt
On Mon, 2 Jul 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: It takes currently about 1000 secs to process the FCL docs (~ 5000 files). That seems acceptable to me. Test with the LCL docs. Generating a rtl or fcl chm is measured in tens of seconds, LCL

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Michael Van Canneyt
On Mon, 2 Jul 2018, Martok wrote: Am 02.07.2018 um 11:46 schrieb Michael Van Canneyt: The CHM manual generation is as problematic as the indexing itself. And the CHM search index is generated by Windows on first use, as far as I know. Hm, okay. Not really helping then, sorry. They never

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Michael Van Canneyt
generation is as problematic as the indexing itself. And the CHM search index is generated by Windows on first use, as far as I know. Am 01.07.2018 um 10:03 schrieb Michael Van Canneyt: Can you explain what you think is wrong with or missing in the official documentation ? (apart from a search

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Michael Van Canneyt
On Sun, 1 Jul 2018, Jim Lee wrote: On 07/01/18 12:28, Michael Van Canneyt wrote: The documentation is brought up to date at every release: all new identifiers are documented and the documentation regenerated. If you look in the bugtracker, you will see that I regularly fix documentation

Re: [fpc-pascal] TFPGObjectList error

2018-07-01 Thread Michael Van Canneyt
On Sun, 1 Jul 2018, Ryan Joseph wrote: On Jul 1, 2018, at 1:28 PM, Michael Van Canneyt wrote: RTL: https://www.freepascal.org/docs-html/current/rtl/index-8.html Without a good search feature these are really hard to use. Searching should be the first priority. Can’t we just make

Re: [fpc-pascal] TFPGObjectList error

2018-07-01 Thread Michael Van Canneyt
On Sun, 1 Jul 2018, Jim Lee wrote: On 07/01/18 01:03, Michael Van Canneyt wrote: Can you explain what you think is wrong with or missing in the official documentation ? (apart from a search mechanism) Michael. Well, search is a big one, but there seems to be a lot of missing pieces

Re: [fpc-pascal] TFPGObjectList error

2018-07-01 Thread Michael Van Canneyt
On Sun, 1 Jul 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Can you explain what you think is wrong with or missing in the official documentation ? (apart from a search mechanism) (the CHM form of the documentation has fulltext search, indexes etc

Re: [fpc-pascal] TFPGObjectList error

2018-07-01 Thread Michael Van Canneyt
On Sat, 30 Jun 2018, Jim Lee wrote: On 06/30/18 19:42, Ryan Joseph wrote: Is that part of the RTL and if so what’s the unit name? I had a hard time finding good resources on classes the RTL provides. That has been my experience as well.  Is there a definitive source of

Re: [fpc-pascal] GetAppConfigDir(False) in a Citrix environment

2018-06-28 Thread Michael Van Canneyt
On Thu, 28 Jun 2018, Bart wrote: Hi, One of my apps also runs in a Citrix environment. It does not retrieve it's settings. If appears that GetAppConfigDir(False) returns "C:\Users\\AppData\Local". (%LOCALAPPDATA%=C:\Users\902617\AppData\Local) Whereas %APPDATA% points to

Re: [fpc-pascal] Format specifier in FPC?

2018-06-27 Thread Michael Van Canneyt
On Wed, 27 Jun 2018, Darius Blaszyk wrote: Hi, I have the following format specifier in C : %+.05f. What would be the FPC equivalent? A float is printed like this: -0.70711 The specified '+' will explicitly print out the sign for the float independent if it is a positive or negative. It

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Michael Van Canneyt
On Fri, 22 Jun 2018, denisgolovan wrote: Do you have examples here? There are several use-cases I often see. 1. The task is to allow declaration of some container structure (vector, tree, etc.) 2. Meta declarations for global entities with names/ids/descriptions/etc. 3. Dynamic libraries

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Michael Van Canneyt
On Fri, 22 Jun 2018, Sven Barth via fpc-pascal wrote: A good and just question. We most likely didn't realize the consequences. Meanwhile we're older, more experienced and we now know what impact seemingly good ideas can have... They were added for MacPascal compatibility:

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Michael Van Canneyt
On Fri, 22 Jun 2018, Ryan Joseph wrote: On Jun 22, 2018, at 12:21 PM, Michael Van Canneyt wrote: 'Nice' is not an argument. If someone else assumes that assert() works as expected - i.e. throws an exception, then your macro will mess up his code, leading to unpredictable results

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Michael Van Canneyt
On Fri, 22 Jun 2018, Ryan Joseph wrote: On Jun 22, 2018, at 3:19 AM, Marc Santhoff wrote: function HOFFSETP(rectypevar: pointer; fieldvar: pointer): longint; inline; begin HOFFSETP := longint(fieldvar - rectypevar); end; H5Tinsert(s2_tid, 'c_name', HOFFSETP(@s2[0], @s2[0].c),

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Michael Van Canneyt
On Wed, 20 Jun 2018, Ryan Joseph wrote: On Jun 20, 2018, at 9:26 PM, Marc Santhoff wrote: Long ago, at the time of fpc 1.9.x or 2.0.x I did some digging in compiler source code, the lexer and parser part. IIRC there were some hooks for calling a proprocessor in the code at that time. If

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Michael Van Canneyt
On Wed, 20 Jun 2018, Martin Schreiber wrote: On Wednesday 20 June 2018 16:06:13 Michael Van Canneyt wrote: Please stop calling it 'dogma'. As with all features, it is a trade-off between the burden this places on the compiler (and the people maintaining it) and the expected gain

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Michael Van Canneyt
On Wed, 20 Jun 2018, Ryan Joseph wrote: On Jun 20, 2018, at 8:09 PM, Michael Van Canneyt wrote: Nothing stops people from preprocessing their code if they need really advanced preprocessing: The toolchain can handle it already. But there is no need to integrate it in the compiler

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Michael Van Canneyt
On Wed, 20 Jun 2018, Mark Morgan Lloyd wrote: The other alternative would be break the compiler in such a way that it was usable from a standard makefile, but since there isn't separate compilation of definition and implementation parts this would probably impact on type safety. I believe

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Michael Van Canneyt
On Wed, 20 Jun 2018, Ryan Joseph wrote: On Jun 20, 2018, at 3:50 PM, Michael Van Canneyt wrote: Because it is simply a bad idea ? Yeah that’s what the programming gurus in ivory towers and professors keep saying but what about the person actually trying to finish some work? It really

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Michael Van Canneyt
On Wed, 20 Jun 2018, Ryan Joseph wrote: Are there any plans to make a proper preprocessor like #define in C? I’m not saying this is good programming practice or anything but I just had a really annoying copy and paste chore on some temporary code which I could have easily accomplished if I

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Michael Van Canneyt
On Mon, 4 Jun 2018, Ryan Joseph wrote: On Jun 4, 2018, at 5:46 PM, Michael Van Canneyt wrote: Well, as far as I can see, you are repeating what the compiler already does for you out of the box. But it’s customizable, that’s the point. What happens when you remove an element from

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Michael Van Canneyt
On Mon, 4 Jun 2018, Ryan Joseph wrote: On Jun 4, 2018, at 4:39 PM, Michael Van Canneyt wrote: I fail to see why you need management operators for this. just because I wanted the array implementation available and to get automatic cleanup. I don’t know all the stuff dynamic arrays do

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Michael Van Canneyt
On Mon, 4 Jun 2018, Ryan Joseph wrote: Since we were talking about dynamic arrays I was curious to see if they could be implemented using the new management operators so I made a little proof of concept by cobbling together old code. It’s not complete or very good by any means but I think

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-03 Thread Michael Van Canneyt
On Sun, 3 Jun 2018, Ryan Joseph wrote: On Jun 3, 2018, at 9:07 PM, Marco van de Voort wrote: But nobody + an item to their item list. The operator is "+" not "add". What other operators could be used then? There’s only so many characters on the keyboard after all. My only interest is

Re: [fpc-pascal] C# stackalloc

2018-06-02 Thread Michael Van Canneyt
On Sat, 2 Jun 2018, Ryan Joseph wrote: On Jun 2, 2018, at 1:44 PM, Michael Van Canneyt wrote: 2 remarks: 1. It's only for arrays 2. It's for fixed-length arrays So you can do this in FPC today. Thirdly, you have objects which can be allocated on the stack, or advanced records. Plenty

Re: [fpc-pascal] C# stackalloc

2018-06-02 Thread Michael Van Canneyt
On Sat, 2 Jun 2018, Ryan Joseph wrote: As a sanity check for myself if you remember a while ago I posted about an idea for “stack aliases” to override the memory allocation for classes. No one really liked the idea and lots of potential safety concerns were raised (fair criticisms). By

[fpc-pascal] Privacy statement published.

2018-05-28 Thread Michael Van Canneyt
Hello, As most of you are aware, the servers of FPC (and many of the collaborators of the core team) are located in the EU. The GDPR (General Data Protection Regulation) is in effect since 25 may, and Free Pascal is also subject to its stipulations. One of the requirements is to inform

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 1:06 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: Dynamic arrays are reference counted. The interlocked increment is there to make the operations thread safe. I do not know whether the classes you speak of are

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Michael Van Canneyt
On Fri, 25 May 2018, Sven Barth via fpc-pascal wrote: Yes, that is what it does. Though a possible optimization would be that the compiler detects "dynarr := dynarr + [elem]" and converts it to "Insert(elem, dynarr, High(dynarr))". Since dynamic array helpers work could you expose a

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 12:43 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: I think the above is "right", and completely equivalent to sets, which are in some ways like an array: a "collection" of same typed

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 1:37 AM, Sven Barth via fpc-pascal wrote: This is currently not supported. And to avoid backwards compatibility problems with existing operator overloads you'd probably need to convert it to a

Re: [fpc-pascal] Libxml2 - How to get messages on Linux?

2018-05-24 Thread Michael Van Canneyt
On Wed, 23 May 2018, Gabor Boros wrote: Same problem with Win64. So not Linux specific. Are these functions callbacks ? If so, is the calling convention correct ? Michael. Gabor 2018. 05. 22. 10:06 keltezéssel, Gabor Boros írta: Hi All, I need to accomplish validate XML files with an

Re: [fpc-pascal] Printing TFPImage to TCairoPSCanvas

2018-05-21 Thread Michael Van Canneyt
On Mon, 21 May 2018, Leonardo M. Ramé via fpc-pascal wrote: On Mon, 21 May 2018, Leonardo M. Ramé via fpc-pascal wrote: Hi, I need to print an TFPMemoryimage into Printer.Canvas (which uses TCairoPSCanvas to printing to CUPS) from a Linux CGI (no widgetset), but it seems that it's an

Re: [fpc-pascal] Printing TFPImage to TCairoPSCanvas

2018-05-21 Thread Michael Van Canneyt
On Mon, 21 May 2018, Leonardo M. Ramé via fpc-pascal wrote: Hi, I need to print an TFPMemoryimage into Printer.Canvas (which uses TCairoPSCanvas to printing to CUPS) from a Linux CGI (no widgetset), but it seems that it's an impossible task, because Printer.Canvas requieres a TBitmap which in

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Michael Van Canneyt
On Sun, 20 May 2018, Mattias Gaertner wrote: On Sun, 20 May 2018 14:23:25 +0200 Sven Barth via fpc-pascal wrote: Hello together! I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Michael Van Canneyt
On Sun, 20 May 2018, Sven Barth via fpc-pascal wrote: Hello together! I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the following features: - support for array constructors using "[...]" syntax - support for

Re: [fpc-pascal] Undocumented SetLength functionality

2018-05-18 Thread Michael Van Canneyt
On Fri, 18 May 2018, Sven Barth via fpc-pascal wrote: Michael Van Canneyt <mich...@freepascal.org> schrieb am Di., 15. Mai 2018, 14:29: On Tue, 15 May 2018, Sven Barth via fpc-pascal wrote: Torsten Bonde Christiansen <t...@epidata.info> schrieb am Di., 15. Mai

Re: [fpc-pascal] Copy dynamic array

2018-05-16 Thread Michael Van Canneyt
On Wed, 16 May 2018, denisgolovan wrote: Yes. That's exactly why I gave that example. Your method with Move will trigger segfault eventually, so the compiler support is required to handle it properly. But compiler support for copying records exists. What's wrong with simply doing

Re: [fpc-pascal] Undocumented SetLength functionality

2018-05-15 Thread Michael Van Canneyt
On Tue, 15 May 2018, Sven Barth via fpc-pascal wrote: Torsten Bonde Christiansen schrieb am Di., 15. Mai 2018, 12:03: Is this a feature, bug or undocumented behaviour? This is a feature and absolutely by design. Afair, this was allowed back in Delphi7 (which is

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Marcos Douglas B. Santos wrote: On Wed, May 9, 2018 at 9:31 AM, Michael Van Canneyt <mich...@freepascal.org> wrote: OK sorry for didn't find this bugreport. Is this fix in fixes_3_0 ? I do not know, presumably not. For "new things" I use to use

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Marcos Douglas B. Santos wrote: The memleak is present only in 3.0.4, no longer in trunk. I remembered a similar bugreport by African Wild Dog: https://bugs.freepascal.org/view.php?id=33535 where I had the same conclusion. OK sorry for didn't find this bugreport. Is

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Ryan Joseph wrote: On May 9, 2018, at 1:46 PM, Ryan Joseph wrote: Ok got it working now finally. Now I need to learn how to do anything at all besides writeln. :) Finally got a context open and working. Next things: 1) what’s the best

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Michael Van Canneyt wrote: Let me know if you need a tester or more information. I tested it. The memleak is present only in 3.0.4, no longer in trunk. I remembered a similar bugreport by African Wild Dog: https://bugs.freepascal.org/view.php?id=33535 where I had

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Ryan Joseph wrote: On May 9, 2018, at 1:25 PM, Mattias Gaertner wrote: The -Ji option searches in the unit search path. In the svn the rtl.js is only in "compiler/utils/pas2js/dist/rtl.js". So you need to add a -Fu. In the release it is in

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt
On Tue, 8 May 2018, Marcos Douglas B. Santos wrote: On Mon, May 7, 2018 at 6:05 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: On Mon, 7 May 2018, Marcos Douglas B. Santos wrote: Application.Run; end. ===END=== My environment is: Lazarus 1.8.3 r57764 FPC 3.0.4 i386

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Ryan Joseph wrote: On May 9, 2018, at 1:20 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: Where is the rtl.js file ? is it in /Developer/pas2js/packages/rtl ? it should be in one of the directories specified with -Fu. I misunderstood the wiki I gu

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-09 Thread Michael Van Canneyt
On Wed, 9 May 2018, Ryan Joseph wrote: On May 9, 2018, at 8:41 AM, Ryan Joseph wrote: Ok it finally worked. Making progress but the wiki is incomplete I think. I figured out how to add the rtl with -Fu but I’m getting an error. What’s wrong with that name?

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-08 Thread Michael Van Canneyt
On Tue, 8 May 2018, Ryan Joseph wrote: You mean this line: PT:=P.Targets.AddLibrary('pas2jslib.pp’);? Yes. I removed that line but if I do a “make all” in the /utils/pas2js directory I still get this error. I remember getting this in the past before and doing a clean install seem to

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-07 Thread Michael Van Canneyt
IMO the simplest solution for you is to use the pas2js repo: Remove the line in fpMake.pp that adds the library. Run make all. You will not have the library version of the compiler, but the rest should be compiled: command-line compiler and web compiler. Michael. On Tue, 8 May 2018, Ryan

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-07 Thread Michael Van Canneyt
On Mon, 7 May 2018, Marcos Douglas B. Santos wrote: Application.Run; end. ===END=== My environment is: Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64 Best regards, Marcos Douglas Michael, Would you want that I open a issue for it? Allow me to test first, please. Michael.

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-05 Thread Michael Van Canneyt
On Sat, 5 May 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Is there a reason you didn't implement a global directive: {$NAMESPACE somens} or is this still planned ? How would this work anyway? Same problem like where to put a global $define

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-05 Thread Michael Van Canneyt
On Sat, 5 May 2018, Sven Barth via fpc-pascal wrote: Hello together! I'm pleased to announce the implementation of a new feature: default namespaces. Great !! Nice job, Sven :) Enter default namespaces. The compiler is told about a default namespace using the new -FN parameter,

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-05 Thread Michael Van Canneyt
On Sat, 5 May 2018, Marcos Douglas B. Santos wrote: I'm using fpWeb in standalone mode (fphttpapp unit) to develop and debug. I would like to see the heaptrc log in the end, as we can do in normal desktop applications. So, in one route I create an object and don't release it to simulate a

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-03 Thread Michael Van Canneyt
On Thu, 3 May 2018, Ryan Joseph wrote: On May 3, 2018, at 8:23 PM, Joost van der Sluis wrote: Actually this makes no sense at all. Pas2js is a separate product that we should be able to distribute separately from the compiler. But doesn’t it extend the existing compiler

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-03 Thread Michael Van Canneyt
On Thu, 3 May 2018, Joost van der Sluis wrote: Op 02-05-18 om 11:28 schreef Ryan Joseph: So I need to build the entire compiler and I get pas2js in the end? I didn’t realize it was built on the entire FPC compiler but I guess that makes sense. Actually this makes no sense at all. Pas2js

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-03 Thread Michael Van Canneyt
On Thu, 3 May 2018, Ryan Joseph wrote: On May 3, 2018, at 12:53 PM, Sven Barth via fpc-pascal wrote: A "make all" in the top level directory should suffice (yes, that will build all of FPC, but that is at least more or less guaranteed to work). You can

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-02 Thread Michael Van Canneyt
On Wed, 2 May 2018, Ryan Joseph wrote: On May 2, 2018, at 5:28 PM, Mattias Gaertner wrote: What is the difference to the existing webgl.pas? It’s missing a couple types and missing comments. :) I can fix that of course and works for other .idl’s also I

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-02 Thread Michael Van Canneyt
On Wed, 2 May 2018, Ryan Joseph wrote: On May 2, 2018, at 1:24 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: It will only work with trunk. trunk of what? Do mean the entire fpc sources? Yes. the fpmkunit needs to be the latest version, for the AddLibrary call. I wi

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-02 Thread Michael Van Canneyt
On Wed, 2 May 2018, Ryan Joseph wrote: On May 2, 2018, at 8:18 AM, Ryan Joseph wrote: On Mac cd’ing to the directory and using make gives this error: /usr/local/bin/ppc386 fpmake.pp -n Fatal: Can't find unit system used by fpmake Fatal: Compilation aborted

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-01 Thread Michael Van Canneyt
On Tue, 1 May 2018, Ryan Joseph wrote: On May 1, 2018, at 9:56 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: You must do gl := TJSWebGLRenderingContext(canvas.getContext('webgl')); because getContext can return various classes depending on the argument. Ok so getC

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-01 Thread Michael Van Canneyt
On Tue, 1 May 2018, Ryan Joseph wrote: On May 1, 2018, at 8:28 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: Check the canvas demo (demo/rtl/democanvas2d.pas) something like this? var canvas: TJSElement; // What type should this be? gl: TJSWebGLRenderingContext;

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-01 Thread Michael Van Canneyt
On Tue, 1 May 2018, Ryan Joseph wrote: On May 1, 2018, at 7:49 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: I didn't. Some Regexps in an editor did the job handsomely... By hand. Hardcore. ;) Because I don’t see it on the wiki can post a minimal example/template

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-01 Thread Michael Van Canneyt
On Tue, 1 May 2018, Ryan Joseph wrote: On May 1, 2018, at 7:40 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: Hi, See subject. Rev 83 in pas2js subversion. I have no experience with webgl, so if someone could provide several examples which I can include in the demo

<    4   5   6   7   8   9   10   11   12   13   >