Re: [fpc-pascal] FPC 3.2.0 released!

2020-06-22 Thread Marco van de Voort
Op 2020-06-22 om 14:05 schreef Sven Barth via fpc-pascal: Anthony Walter via fpc-pascal > schrieb am Mo., 22. Juni 2020, 06:29: Great news and thank you to all the developers! I carefully read through the notes and look forward to using the new

[fpc-pascal] FPC 3.2.0 released!

2020-06-20 Thread Marco van de Voort
Hello, Finally, the Free Pascal 3.2.0 release is available from our servers and from sourceforge. Changes that may break backwards compatibility will be documented at: http://wiki.freepascal.org/User_Changes_3.2.0. For an overview of what is new see

Re: [fpc-pascal] Segmentation fault with cthreads on FreeBSD

2020-06-08 Thread Marco van de Voort
Op 2020-06-08 om 10:14 schreef Zamrony P. Juhara via fpc-pascal: Following program program test; {$IFDEF UNIX} uses cthreads; {$ENDIF} begin  writeln('test'); end. Compile with FPC 3.0.4 on FreeBSD 12. When run test program, it causes segmentation fault. What is wrong? Without cthreads

Re: [fpc-pascal] optimization for strlicomp()

2020-06-01 Thread Marco van de Voort
Op 2020-06-01 om 09:22 schreef Michael Van Canneyt: I think the correct solution is to use a correct widestring upcase, not the simple one. I think he means to have a simple shortcut for some known <127 codepoints, to cut widestring uppercase for long trivial routines. It's not a bad idea

Re: [fpc-pascal] Implementing a simple tcp/ip connection

2020-05-28 Thread Marco van de Voort
Op 2020-05-28 om 17:08 schreef Giuliano Colla: Hi everybody, I needed to implement a simple dedicated TCP/IP connection between a client and a server. Nothing fancy, just sending and receiving short strings. I have used in the past for that purpose the unit Sockets lifting it from

[fpc-pascal] Delphi TService

2020-05-20 Thread Marco van de Voort
Does somebody have a compatible TService somewhere for dual compilation Delphi/Lazarus purposes? There is daemonapp, but that seems to be incompatible, but maybe it can be wrapped? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-13 Thread Marco van de Voort
Op 12/05/2020 om 23:05 schreef Noel Duffy via fpc-pascal: function TryStrToHostAddr(IP: String; var ip4: in_addr): Boolean; function TryStrToHostAddr6(IP: String; var ip6: in6_addr): Boolean; Rationale for this request: All conversion calls in sysutils and dateutils use this naming scheme,

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-12 Thread Marco van de Voort
Op 2020-05-12 om 12:32 schreef Michael Van Canneyt: The names I use here are the libc names, which many other languages also use. Now, StrToHostAddr and StrToHostAddr6 can call the appropriate function, and programs that use those functions won't notice any change. But new code will be

Re: [fpc-pascal] Vector code

2020-05-02 Thread Marco van de Voort
Op 2020-05-02 om 07:46 schreef Adriaan van Os: No, but you can ask questions here. I've done some minor x86_64 assembler work for image processing. Things like format conversions, uniform lighting, rotate, erosion/dilation etc. Thanks for offering. I am particularly interested in knowing

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Marco van de Voort
Op 2020-05-01 om 20:15 schreef Sven Barth via fpc-pascal: Ryan Joseph via fpc-pascal > schrieb am Fr., 1. Mai 2020, 17:48: > On May 1, 2020, at 10:18 PM, Sven Barth mailto:pascaldra...@googlemail.com>> wrote: > > If you need to

Re: [fpc-pascal] Vector code

2020-05-01 Thread Marco van de Voort
Op 2020-05-01 om 10:44 schreef Adriaan van Os: Can someone recommend a good book on writing (assembly) vector code ? No, but you can ask questions here. I've done some minor x86_64 assembler work for image processing. Things like format conversions, uniform lighting, rotate, erosion/dilation

Re: [fpc-pascal] Question about compiling FPC trunk after revision 44849

2020-04-29 Thread Marco van de Voort
Op 2020-04-29 om 19:50 schreef Jonas Maebe: Yes, but you cannot use "clean" and "all" in the same make invocation. This was in fact never supported, and did not work on all platforms either. So simply split it: make -j 9 clean make -j 9 all install Does "clean" have a valid return value of

Re: [fpc-pascal] StrToHostAddr in sockets unit accepts negative octets

2020-04-20 Thread Marco van de Voort
Op 2020-04-20 om 09:41 schreef Karoly Balogh (Charlie/SGR): Great, good to know it's fixed. Not having the SVN repo to hand, I can't tell how recent that revision is. Has this change made it to any released version of the compiler? No. I just fixed it yesterday. :) So the fix is new. I'll

Re: [fpc-pascal] Why external execution so slow? (fixed)

2020-04-03 Thread Marco van de Voort
Op 2020-04-01 om 23:49 schreef Bart via fpc-pascal: I think I'll put this under a special porunidle option in trunk and fpc 3.2.0 , so to only trigger this when needed. Hmm.. porunidle -> poRunIdle (to be consistent in namegiving)? Done. ___

Re: [fpc-pascal] Why external execution so slow? (fixed)

2020-04-03 Thread Marco van de Voort
Op 2020-04-02 om 08:45 schreef Gabor Boros: 2020. 04. 01. 17:21 keltezéssel, Marco van de Voort írta: But at least FPC3.2.0rc1 has a rewritten tprocess/runcommand that makes this fixable without source changes and recompilation, look at the next example: It's fast but FPC's help not showed

Re: [fpc-pascal] TString idea (like stringlist but string only)

2020-04-02 Thread Marco van de Voort
Op 2020-04-02 om 19:30 schreef nore...@z505.com: Is there a need by anyone for a TString where one could add to a string (TString.Add) without any CRLF (line feeds) and modify a string as an object? I have needed this several times as the TStringList linefeeds get in the way. It's similar

Re: [fpc-pascal] Why external execution so slow? (fixed)

2020-04-01 Thread Marco van de Voort
Op 2020-04-01 om 09:59 schreef Gabor Boros: 2020. 03. 31. 19:37 keltezéssel, Gabor Boros írta: RunCommandInDir('E:\FPC\3.2.0\bin\i386-win32','fpc.exe',['-h'],OS,[]); Tried with modified(fpc -h) "Reading large output" example

Re: [fpc-pascal] Why external execution so slow?

2020-04-01 Thread Marco van de Voort
Op 2020-03-31 om 19:37 schreef Gabor Boros: I need to execute an external program from my application. This execution is much slower than execute the external application from command line. I made a simple example (see below) which show 1.7 seconds for me. Why? (From command line the

Re: [fpc-pascal] Why external execution so slow?

2020-03-31 Thread Marco van de Voort
Op 2020-03-31 om 19:37 schreef Gabor Boros: I need to execute an external program from my application. This execution is much slower than execute the external application from command line. I made a simple example (see below) which show 1.7 seconds for me. Why? (From command line the

[fpc-pascal] FPC 3.2.0RC1 released!

2020-03-29 Thread Marco van de Voort
Hello, We have placed the first release candidate of the Free Pascal Compiler version 3.2.0 on our ftp servers. You can help improve the upcoming 3.2.0 release by downloading and testing this release. If you want you can report what you have done here: http://wiki.freepascal.org/Testers_3.2.0

Re: [fpc-pascal] inline declarations...

2020-03-11 Thread Marco van de Voort
Op 2020-03-11 om 16:04 schreef geneb: Op 2020-03-11 om 15:52 schreef geneb: Will v3.2 support inline variable declarations? No. Thanks for the quick reply Marco! Is that "No" as in "never" or just "maybe > 3.2"? Not (yet) never, but not anytime soon in any version. The feature is

Re: [fpc-pascal] inline declarations...

2020-03-11 Thread Marco van de Voort
Op 2020-03-11 om 15:52 schreef geneb: Will v3.2 support inline variable declarations? No. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Marco van de Voort
Op 2020-03-11 om 11:44 schreef fredvs via fpc-pascal: PS: Imho, using "-1" was a nice trick and it is sad that it cannot more be used. It is a warning not an error. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] modeswitch multihelpers precedence problem

2020-03-10 Thread Marco van de Voort
Op 2020-03-10 om 14:46 schreef Anthony Walter via fpc-pascal: Stdreamer, you are wrong. The last unit take precedence. Please test to verify. Yes. He might be mixed up with the uses clause of the main program governing unit initialization. ___

Re: [fpc-pascal] Error on https://www.freepascal.org/download.var

2020-03-03 Thread Marco van de Voort
Op 2020-03-03 om 11:16 schreef Sven Barth via fpc-pascal: Martin mailto:f...@mfriebe.de>> schrieb am Di., 3. März 2020, 10:46: The page https://www.freepascal.org/download.var gives an error. It is still linked in many places as the download page for fpc. Has it moved, or does

Re: [fpc-pascal] Best start point for adding new FPC target

2020-01-28 Thread Marco van de Voort
Op 28/01/2020 om 18:08 schreef Fabio Luis Girardi via fpc-pascal: Hi all! I'm studying how to add a new target for the Freepascal compiler. The target is the missing armhf-FreeBSD. So I have looked at FPC guide (https://wiki.freepascal.org/Porting_Free_Pascal#Adding_a_new_target) and

Re: [fpc-pascal] TProcess and zombie processes in *nix systems

2020-01-21 Thread Marco van de Voort
Op 2020-01-21 om 21:40 schreef Graeme Geldenhuys: ie: I want to launch a new application in a separate OS process and then forget about it. This is the responsibility of the callee I think, to daemonize and cut the cord so to speak. ___

Re: [fpc-pascal] "Hello world" syscalls

2020-01-07 Thread Marco van de Voort
Op 2020-01-07 om 14:29 schreef James Richters: How can 0% + 0%+ 0%+ 0%+ 0%+ 0% = 100% ? looks like it just prints 100% all the time and doesn't really add any total. All those zeros seem strange unless your computer is so fast that every call takes so much less than a microsecond that I can't

Re: [fpc-pascal] "Hello world" syscalls

2020-01-07 Thread Marco van de Voort
Op 2020-01-07 om 02:28 schreef Vojtěch Čihák via fpc-pascal: I found this article: https://drewdevault.com/2020/01/04/Slow.html but FPC is missing, so Iwrote simple: program Project1; begin   writeln('Hello world!'); end. $ fpc -O3 -XX Project1.pas Add -Xm and look at the generated map

Re: [fpc-pascal] Static linking to C library on Windows

2019-11-27 Thread Marco van de Voort
Op 2019-11-27 om 21:38 schreef Ryan Joseph via fpc-pascal: Moving on to Windows now and more basic problems. I've built from Python sources again but I'm not sure about static libraries on Windows. There is a .dll which is a dynamic library and .lib which I assume is the static library.

Re: [fpc-pascal] Compile fpc 64 bit from /fixes_3_2/

2019-10-08 Thread Marco van de Voort
Op 2019-10-08 om 17:02 schreef fredvs: The script first clean everything and do the compilation of fpc with ppcx64 and all seems ok. But, when the compilation is ok and a "new" ppcx64 is created, I dont know why, the process continue, remove all was already done, recompile all using ppc386

Re: [fpc-pascal] [Pas2js] It's alive !

2019-09-29 Thread Marco van de Voort
Op 2019-09-29 om 11:55 schreef Michael Van Canneyt: It suggest to rename it to "ppwasm". Why not "ppcwasm"? shorter, I suppose. You should ask Dmitry :) The name is not yet settled. If it is to be used via the "fpc" frontend binary, ppc* would be better I guess.

Re: [fpc-pascal] FPC docs about FindFirst

2019-09-24 Thread Marco van de Voort
Op 2019-09-24 om 18:57 schreef Ralf Quint: On 9/24/2019 12:24 AM, Marco van de Voort wrote: Op 2019-09-24 om 03:03 schreef Ralf Quint: systutils, so having documentation that includes the differences between the versions would be helpful. Turbo Pascal (for DOS) didn't have a FindClose

Re: [fpc-pascal] FPC docs about FindFirst

2019-09-24 Thread Marco van de Voort
Op 2019-09-24 om 03:03 schreef Ralf Quint: systutils, so having documentation that includes the differences between the versions would be helpful. Turbo Pascal (for DOS) didn't have a FindClose function, as "officially", this would not be necessary on DOS. On all other OS, including Windows,

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-07 Thread Marco van de Voort
Op 2019-09-06 om 20:02 schreef Michael Van Canneyt: What I will do is explain in the documentation why the units are not mentioned. Can we remove the division in *nix also ? If ms resolution is not supported, then why divide the us/ns ? It serves no purpose, if rollover and unit size are

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-06 Thread Marco van de Voort
Op 2019-09-06 om 16:07 schreef Michael Van Canneyt: While consulting the online reference about gettickcount https://www.freepascal.org/docs-html/rtl/sysutils/gettickcount64.html I could not know anything about the units involved. It says "It is useful for time measurements, but no

Re: [fpc-pascal] Documentation generation

2019-08-18 Thread Marco van de Voort
Op 2019-08-18 om 11:43 schreef Michael Van Canneyt: On Sat, 17 Aug 2019, leledumbo via fpc-pascal wrote: How are the FPC RTL documentations generated? I wanted to see if I could generate .docsets files from them also. A starting point: https://wiki.freepascal.org/FPCDocs_Tutorial I

Re: [fpc-pascal] Challenge accepted

2019-08-10 Thread Marco van de Voort
Op 2019-08-10 om 17:30 schreef Joost van der Sluis: And who else wanna help? Why not simply port superobject? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Implementation of variant records

2019-07-05 Thread Marco van de Voort
Op 2019-07-05 om 13:53 schreef Ralf Quint: IMO, the variants in a variant record should always overlay correctly (like unions in C), so the variant part should start at offset 32 in this case, and this is where all three variants should start. This is not a guarantee case in the Pascal

Re: [fpc-pascal] Implementation of variant records

2019-07-05 Thread Marco van de Voort
Op 2019-07-05 om 11:49 schreef Bernd Oppolzer: IMO, the variants in a variant record should always overlay correctly (like unions in C), so the variant part should start at offset 32 in this case, and this is where all three variants should start. This is not a guarantee case in the

Re: [fpc-pascal] Virtual object methods

2019-07-02 Thread Marco van de Voort
Op 2019-07-02 om 19:41 schreef Ryan Joseph: On Jul 2, 2019, at 10:32 AM, Michael Van Canneyt wrote: It overwrites the first. There is no such thing as '2 VMT tables'. That’s what I thought. How costly is this? Not sure what it’s doing under the hood but I’d like to know more. You'd expect

Re: [fpc-pascal] Virtual object methods

2019-06-28 Thread Marco van de Voort
Op 27/06/2019 om 23:56 schreef Ryan Joseph: On Jun 27, 2019, at 5:53 PM, Ben Grasset wrote: If you specifically need inheritance (combined with virtual methods) you should probably just use classes, because doing it with objects will require heap allocation regardless. Heap allocate how

Re: [fpc-pascal] String conversions

2019-06-26 Thread Marco van de Voort
Op 25/06/2019 om 21:58 schreef Ryan Joseph: An exponential growing function applied to all strings would have many worse case behaviours, where it would eat up heaps of memory for nothing. This is why it is better to have the programmer indicate it is a growing string some how (or have a

Re: [fpc-pascal] String conversions

2019-06-25 Thread Marco van de Voort
Op 2019-06-25 om 21:12 schreef Ryan Joseph: On Jun 25, 2019, at 2:16 PM, Jonas Maebe wrote: It has to allocate a new ansistring. Another question: if I do "s += c” will the string reallocate memory for 1 character or is there an exponential growing function? If it does grow by one

Re: [fpc-pascal] Using constants in constant record definition

2019-06-12 Thread Marco van de Voort
Op 2019-06-12 om 22:25 schreef Simon Ameis: const   MYRECORDCONST2: TMyRecord = (x: 5); //< compiles fine   MYINTEGERCONST: Integer = 5;    //< defining integer const   MYRECORDCONST1: TMyRecord = (x: MYINTEGERCONST); //< using constant is no possible begin end. Is this intended or

Re: [fpc-pascal] Heavy heap fragmentation issue

2019-06-03 Thread Marco van de Voort
Op 6/2/2019 om 6:49 PM schreef Martok: I'm having a problem here in a sequential image processing application that seems to test a particularly bad operation mode for the RTL heap manager (on Windows, but I don't think this matters here). The work load looks like this: load "normal sized"

Re: [fpc-pascal] RPos Causing Access violation

2019-05-21 Thread Marco van de Voort
Op 2019-05-21 om 14:18 schreef James Richters: Does anyone have any idea at all why RPOS could not determine that the position of .dpax in M:\elipse_1.dpax was 12 like every other time I ran this I ran this while looking at task manager and it starts up with 9.2MB of memory

Re: [fpc-pascal] Does FPC require glibc?

2019-05-08 Thread Marco van de Voort
Op 5/7/2019 om 11:14 AM schreef Sven Barth via fpc-pascal: It depends whether the musl libc also leads to the inclusion of "libc.so.6" in the ELF files. If yes, then all should be good (except if not all calls are available, but then recompilation wouldn't help either), if not everything

Re: [fpc-pascal] {$warn 5024 off} does not work with FPC 3.2.0

2019-04-24 Thread Marco van de Voort
Op 4/24/2019 om 9:53 AM schreef Graeme Geldenhuys: On 22/04/2019 00:14, Graeme Geldenhuys wrote: yet when I compile/build my project, it still shows that compiler hint (as can be seen in the attached screenshot). Is nobody else experiencing this? Try to put your includes and warnes after

Re: [fpc-pascal] MacOS wrong timestamp in debug map object file

2019-04-15 Thread Marco van de Voort
Op 2019-04-15 om 13:36 schreef Martin: Apparently the files may be on an NAS. Not sure if relevant... I.e. maybe if there is some cache... That might be the reason.  If you have remote files, you have three date systems, the local PC one, the NAS one, and the one of the filesharing

Re: [fpc-pascal] Optional param modifier

2019-04-15 Thread Marco van de Voort
Op 2019-04-13 om 09:47 schreef Sven Barth via fpc-pascal: I think the same as when I read the suggestion for an inout variant of VAR. Move this out of the language syntax, and make it directives or attribute like syntax (like we will need to get anyway for const ref). Im

Re: [fpc-pascal] Optional param modifier

2019-04-15 Thread Marco van de Voort
Op 2019-04-12 om 21:11 schreef Ryan Joseph: What do you do about the problem of not knowing when a parameter of a 3rd party function can accept null? If it is native Pascal it is probably VAR, as Jonas said. If it is an header for an external package/API, consult their documentation.

Re: [fpc-pascal] Optional param modifier

2019-04-12 Thread Marco van de Voort
Op 2019-04-12 om 17:23 schreef Ryan Joseph: What do you think of that? Sounds like an easy way to get some support for nil pointers deref’s and provides self documenting code. I think the same as when I read the suggestion for an inout variant of VAR. Move this out of the language syntax,

Re: [fpc-pascal] h2pas fails on c++ header file

2019-02-01 Thread Marco van de Voort
Op 2019-01-31 om 19:00 schreef Sven Barth via fpc-pascal: That is because h2pas is unable to handle it, or because fpc is unable to generate the proper code for a c++ parameter by reference The former. For the later you'd either use var or constref. Though there'd still be the

Re: [fpc-pascal] h2pas fails on c++ header file

2019-01-31 Thread Marco van de Voort
Op 1/30/2019 om 11:57 AM schreef Giuliano Colla: What I'm doing wrong? Using a C header converter or a C++ header file.   & is not proper C. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Dos unit for Windows

2019-01-30 Thread Marco van de Voort
Op 2019-01-30 om 14:18 schreef Marco Borsari via fpc-pascal: I noted that two bytes are reported as a result, thought IIRC in DOS only the low byte is affected while the high one should be zero, so the assignment would become attr:=l and $ff; Waiting for your comments, Windows

Re: [fpc-pascal] GDeque unit crash, FPC trunk

2019-01-30 Thread Marco van de Voort
Op 2019-01-27 om 19:40 schreef AlexeyT: I see stange crash in gdeque unit if I use unit from FPC trunk https://github.com/graemeg/freepascal/blob/master/packages/fcl-stl/src/gdeque.pp crash in TDeque.PushFront, i cannot understand it and i don't know the code. pls, reproduce it like me:

Re: [fpc-pascal] SetLength warnings - request

2019-01-01 Thread Marco van de Voort
Op 2019-01-01 om 01:55 schreef Martok: The non-initialization of 'Result' has bitten me more than once in Delphi. Aye. But it's rather rare in Delphi and very common in FPC, so not everyone might have encountered it (that's how I'm justifying to myself putting it on the Portability List

Re: [fpc-pascal] Fixes 3.2: make all fails

2019-01-01 Thread Marco van de Voort
Op 2018-12-31 om 19:22 schreef Bart: OpenSuse Tumbleweed 64-bit (in a VirtualBox VM under Win10) I can compile the classic Hello World with fpc 3.0.4. Did: svn co https://svn.freepascal.org/svn/fpc/branches/fixes_3_2/ Start compiling package utils-h2pas for target x86_64-linux. Executing

Re: [fpc-pascal] Rest in peace Martin Schreiber

2018-12-28 Thread Marco van de Voort
Op 2018-12-27 om 12:10 schreef Joost van der Sluis: Op 27-12-18 om 00:49 schreef Graeme Geldenhuys: Today I became aware of very sad news. Martin Schreiber, author of the MSEide+MSEgui project, has unexpected succumbed of cardiac arrest on 29 November 2018. This his really sad. For himself,

Re: [fpc-pascal] Ho to convert a special format of datetime?

2018-12-13 Thread Marco van de Voort
Op 2018-12-13 om 21:07 schreef luciano de souza: Hello all, I'd like to convert this date "2017-01-11T17:47:22.2912317-02:00" to TDatetime. A quick attempt with some standard functions, note that it only parses till millisecond precision, the rest (317) is ignored. uses

Re: [fpc-pascal] precedence "is" and "and"

2018-12-09 Thread Marco van de Voort
Op 2018-12-08 om 22:03 schreef Michael Van Canneyt: I don't see where the bitwise should be involved here. There is no integer. The docs do not mention a different precedence lvl for logical/bitwise "and". My line of thought was the docs might mean bitwise there. Because to the best of my

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Marco van de Voort
Op 2018-12-08 om 20:38 schreef Mattias Gaertner via fpc-pascal: According to the docs, the "is" operator is fourth level, the "and" is second level, so the "and" must be computed before the "is". But it seems fpc treats "is" and "and" as same level: logical (boolean) vs bitwise AND

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

2018-10-29 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > > > I think it is important to differentiate between a language feature > > and its common implementation. Perhaps case statements with variables > > make sense? Of course, that doesn't mean anyone is going to add them. > > I?ve been programming

Re: [fpc-pascal] FpWaitPid() multiplies status by 256

2018-10-06 Thread Marco van de Voort
In our previous episode, Anton Shepelev said: > may return the status multiplied by 256? If my child pro- > cess terminates with Halt(1), the status is 256, if with > Halt(2), the status is 512, etc. Entirely normal. Status is an opague format in POSIX, and there are macros to pry them

Re: [fpc-pascal] Custom file drivers

2018-09-30 Thread Marco van de Voort
In our previous episode, Anton Shepelev said: > The documentation on the FILE and TEXT types says > that "nothing prevents the programmer, from writing > a file driver that stores its data for instance in > memory." Is there a more detailed instruction or an > example illustrating how to do

Re: [fpc-pascal] Resource compilation

2018-09-09 Thread Marco van de Voort
In our previous episode, Martok said: > However, there's an issue I hope somebody can help with. Binutils has this > test > case: > > > > Every Resource compiler

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

2018-08-22 Thread Marco van de Voort
In our previous episode, James said: > Does anyone have any idea what could be going on to cause such a > slowdown? Pretty much only security software/anti virus. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-19 Thread Marco van de Voort
In our previous episode, Martok said: > Am 18.08.2018 um 23:25 schrieb Marco van de Voort: > > Summary: behaviour with range checks off is implementation defined? > No. "implementation different", but not really "implementation defined". > TP and Delphi are

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Marco van de Voort
In our previous episode, Martok said: > There is the old "Porting TP" document at > , but it is rather incomplete (and > probably on an older language level). It also covers mostly syntactic > differences - things a programmer will notice because of the error

Re: [fpc-pascal] Resource compilation

2018-08-04 Thread Marco van de Voort
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 further, and just use resources generator by e.g. an old

Re: [fpc-pascal] Syntax changes suggestions

2018-07-21 Thread Marco van de Voort
In our previous episode, Ben Grasset said: > If a feature works as intended and is useful (which is all that matters), The first is not sure, the second is extremely subjective. The point is that border conditions can vary between source and destination language. How features parse, how they

Re: [fpc-pascal] Syntax changes suggestions

2018-07-19 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > That?s pretty disheartening honestly. So there was a useful feature users > could be leveraging but it was turned down because it didn?t fit into some > paradigm or something like that. Sorry to hear that. No, because blind copying from one

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > However, I do wish that people wouldn't resort to that same old > chestnut. There ought to be a Pascal discussion equivalent of Godwin's > Law: "sooner or later in any debate about a language feature somebody > will complain that it's too much

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Marco van de Voort
In our previous episode, Santiago A. said: > > And since the feature is implementable as an IDE macro (generating a nested > > try except/finally) it doesn't make Ooccam's razor of usefulness to begin > > with. > The Occam's razor is that if it is so usefull that a macro is used a > lot, why not

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said: > > interested in why it is not supported. > > At least Delphi Tokyo (10.2) does not support it. > > If I remember the discussion correctly it came to light that some users > would need "try ? finally ? except ? end" while others would

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said: > > function) > > > > In such cases, you don't declare it "auto". Just as you don't free a > > pointer in the function you declare it if you pass the instance to another > > code that stores it beyond the life time of the function > > > >

Re: [fpc-pascal] Embedding DLL into EXE for Windows 32 bit?

2018-07-07 Thread Marco van de Voort
In our previous episode, Zoe Peterson said: > > There are a few options: > > 1) Include the DLL as a resource and extract it to a temp location ... > > 2) Load it directly from memory using a third party unit like this: ... > > 3) Codesign the DLL and executable and verify that they haven't

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-03 Thread Marco van de Voort
In our previous episode, Santiago A. said: > > Pascal needs to break backward compatibility to advance, that is, in > fact, a new language. But if pascal is struggling to survive, let alone > a new language if you are not mozilla, google... I think to advance Pascal needs less discussion about

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Marco van de Voort
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 count functions? > > It does: WordCount,ExtractWord, but they are

Re: [fpc-pascal] Split stream into words

2018-07-03 Thread Marco van de Voort
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? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > > > And to what page would this script then point when you find something ? If > > it was easy, it would have been done already. > > > > But, here's your shot at contributing :) > > The easiest thing would be to read the .chm file and search that

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Marco van de Voort
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 a full 8 minutes.

Re: [fpc-pascal] TFPGObjectList error

2018-07-02 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > > > From what it looks like, this is built on the CHM format files? If one could > > figure out what they use, maybe that would be a step in the right direction? > > The CHM manual generation is as problematic as the indexing itself. > And

Re: [fpc-pascal] TFPGObjectList error

2018-07-01 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > (the CHM form of the documentation has fulltext search, indexes etc. On > > Windows you can just click them to open. > > I know. we have fpIndexer to make such an index. The CHM packages has its own (afaik with phrase compression) > I just

Re: [fpc-pascal] TFPGObjectList error

2018-07-01 Thread Marco van de Voort
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. On Windows you can just click them to open. It

Re: [fpc-pascal] How to list USB devices on Windows?

2018-06-28 Thread Marco van de Voort
In our previous episode, Marc Santhoff said: > > Or is there an FPC command already? > > I have some code in Object Pascal doing such stuff. The problem with it is, it > has no copyright string or author anywhere. I even don't know where it is > from, it's one of the pieces of code collected when

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > > > A threadvar section is started using "class threadvar" and the "class" > > specifier is required. They are accessed like ordinary class variables with > > the difference that they'll hold different values per thread - the same as > > global

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > Here?s an example of something I?ve seen for debugging. I think that was kind > of cool you could print types like that and I?m not sure how that would work > in Pascal if at all. Maybe some RTTI magic perhaps. > > {$define typestr(t):='#t:

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > On Jun 20, 2018, at 10:02 PM, Michael Van Canneyt > > wrote: > > > > Because it is a simple textual token replacement at present. Supporting > > arguments would mean parsing the macro, parsing whatever comes after it, > > matching the arguments

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > Till now, the burden of preprocessing is considered simply too big for the > gain. > > One consequence, for example, is that the ppu files are thrown out of the > window. The compiler would have to compile every used unit every time again, >

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > If the preprocessor really does such extended work, can't one simply keep > > the intermediate output of the preprocessor as a source file and then > > relate to that? > > Then you have 2 versions of the source code right? No. One source, and one

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > > > I've done my fair share of language advocacy in the past and in general am > > no friend of C, but I suggest that a number of people- on both the "pure" > > and the "pragmatic" sides of the argument- could very much do with "cooling > > it". >

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > complicating it even more. The consequences of such a step are far-reaching. > > > > And till now, no-one has presented the really pressing use cases that would > > warrant such a step. > > How can you integrate a preprocessor without misaligning

Re: [fpc-pascal] math with infinity and NaN

2018-06-20 Thread Marco van de Voort
In our previous episode, C Western said: > > I can do things like +infinity*2 and +infinity-3 and even sqr(infinity) > > and power(infinity,10) the results are still +Inf which is expected? > > ??but I can?t do anything involving subtracting infinity from > > infinity.? Isn't that normal?

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > 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 and thus needlessly > complicating it even more.

Re: [fpc-pascal] Better usage of "with"

2018-06-14 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > // works with function parameters also. > // this is almost like a class helper or at very least mimics ?self? in > methods. > > procedure OpenDoor(with var door: TDoor); > begin > state := true; // with imports door namespace into entire

Re: [fpc-pascal] round(2.5)=2

2018-06-13 Thread Marco van de Voort
In our previous episode, Florian Kl?mpfl said: > > In our previous episode, Sven Barth via fpc-pascal said: > >> Which is what FPC already provides with SetRoundMode() in unit Math. > >> > >> As long as one changes the rounding mode only locally for some calculations > >> and restores it

Re: [fpc-pascal] round(2.5)=2

2018-06-13 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said: > Which is what FPC already provides with SetRoundMode() in unit Math. > > As long as one changes the rounding mode only locally for some calculations > and restores it afterwards there should be no problem (the rounding mode > can be

Re: [fpc-pascal] FP IDE browse-function (search symbol) errors

2018-06-08 Thread Marco van de Voort
In our previous episode, Klaus Hartnegg said: > I'm struggling with two issues with the Search,Symbol (Browse) function > of the FreePascal IDE. Afaik browse hasn't been worked on in a long time. https://bugs.freepascal.org/view.php?id=21113 ___

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