Re: [fpc-pascal] Re: Selective Class Helper

2013-03-14 Thread Juha Manninen
On Thu, Mar 14, 2013 at 2:58 AM, Xiangrong Fang xrf...@gmail.com wrote: ... which was a feature I like in C++, although I have never write a program more complex than cout Hello World in that magnificent language. :-) You consider it magnificent because you have not written anything complex

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Juha Manninen
On Sun, Mar 10, 2013 at 2:38 PM, Graeme Geldenhuys gra...@geldenhuys.co.uk wrote: No. As far as I understand, sets are stored in 1 byte internally - as binary values. 256 is the max number of elements (bit values) it can hold in a byte. This is one area where FPC could actually improve

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Juha Manninen
On Sun, Mar 10, 2013 at 3:45 PM, Marco van de Voort mar...@stack.nl wrote: Sets are up to 32-byte (256bits), enums can be up to 32-bit. Ok, sorry. The limitation for sets is not one byte. Still, FPC could add support for still more bytes. 64-bit CPUs are now popular and the feature could easily

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Juha Manninen
On Sun, Mar 10, 2013 at 4:19 PM, Florian Klämpfl flor...@freepascal.org wrote: This issue is similar. This kind of artificial limitation I always wonder how people know more than me about the compiler :) could easily be fixed. Go ahead. :) Ok, I sent my reply too quickly. I must study the

[fpc-pascal] warning: link.res contains output sections; did you forget -T?

2013-03-04 Thread Juha Manninen
Yes, I know this warning can be ignored, and every active member of this list knows it, too. However new users don't know it. Everybody who tries FPC / Lazarus for the first time will scratch their heads and use Google, trying to find out where exactly they forgot to put this -T. My workmate

Re: [fpc-pascal] Result: string

2013-03-04 Thread Juha Manninen
On Mon, Mar 4, 2013 at 9:21 PM, José Mejuto joshy...@gmail.com wrote: What's the expected output of this code ? function TheA(): string; begin Result:=Result+'A'; end; writeln(TheA()); I thought that when the result type is an automated one its value gets initialized... Maybe I'm

Re: [fpc-pascal] Result: string

2013-03-04 Thread Juha Manninen
On Mon, Mar 4, 2013 at 10:51 PM, Howard Page-Clark h...@talktalk.net wrote: That report says the issue was assigned to Jonas and fixed in revision 20427 (ver 2.6.1). I find the current release (2.6.2) initialises a string function result to EmptyStr as you would hope. Ok, that sounds good. I

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread Juha Manninen
On Fri, Mar 1, 2013 at 11:52 AM, Sven Barth pascaldra...@googlemail.com wrote: Indeed. Like was the case with the project FireMonkey is based on... I have heard mixed comments about FireMonkey. I don't know what to think about it myself. I seriously considered using it about half a year ago for

Re: [fpc-pascal] [news] DA-Soft discontinues AnyDAC component suite

2013-03-01 Thread Juha Manninen
On Fri, Mar 1, 2013 at 1:33 PM, Sven Barth pascaldra...@googlemail.com wrote: As I'm not talking about FireMonkey's architecture, but Embarcadero's style of business it would be off-topic on either list :) Ok, it is about business and marketing decisions. It is not interesting for me, I am more

Re: [fpc-pascal] dglOpenGL - GL, GLu, GLExt

2013-02-23 Thread Juha Manninen
On Sun, Feb 17, 2013 at 11:12 PM, Marco van de Voort mar...@stack.nl wrote: Q: how am I supposed to initialize OpenGL when using units provided by FPC? The unit does it at startup. That has as disadvantage that the filename can't be changed (or at least that first try can't be avoided).

Re: [fpc-pascal] x86 asm bswap

2013-02-06 Thread Juha Manninen
On Wed, Feb 6, 2013 at 10:40 AM, Jeppe Græsdal Johansen jjoha...@student.aau.dk wrote: function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal; begin result := BeToN(aValue); end; Thanks, it works! There are so many functions in FPC libraries which I don't know anything about.

[fpc-pascal] State of fcl-stl generics lib

2013-01-11 Thread Juha Manninen
I remember seeing discussion about fcl-stl saying that it would still need improvement but nobody is actively working on it. I just couldn't find the thread about it now. So, what is the current state? Sorry I have not studied the lib myself yet (long ToDo list). For example, if someone is

Re: [fpc-pascal] Basically on the right track?

2012-12-28 Thread Juha Manninen
On Fri, Dec 28, 2012 at 6:47 AM, Patrick patr...@spellingbeewinnars.org wrote: I am also finding the site confusing. If I click on AMD64/x86_64 on the binary download page and then choose sourceforge, I end up being offered a package that says fpc-2.6.0.i386-linux.tar. I did find another

Re: [fpc-pascal] Brook 1.0 - A new framework for web was born

2012-12-15 Thread Juha Manninen
May I ask how were the hierarchy and dependency graps generated? Is there a tool that can do it? Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Brook 1.0 - A new framework for web was born

2012-12-15 Thread Juha Manninen
On Sat, Dec 15, 2012 at 12:50 PM, luciano de souza luchya...@gmail.com wrote: Yes, there is a very nice tool. Its name is Pasdoc. Take a look here: http://sourceforge.net/projects/pasdoc/ For this project, the author has changed the source code of Pasdoc. Originally, it's compatible only with

Re: [fpc-pascal] Design Patterns Questions

2012-10-28 Thread Juha Manninen
On Sun, Oct 28, 2012 at 5:09 PM, bsquared bwcod...@gmail.com wrote: And as an aside, what is the state of tiOPF, I could not get it to install in Lazarus 1.02. tiOPF2 works with Lazarus but the visual data-components included in tiOPF do not work. It is not a big problem because you can

Re: [fpc-pascal] Re: Design Patterns Questions

2012-10-28 Thread Juha Manninen
On Sun, Oct 28, 2012 at 6:42 PM, bsquared bwcod...@gmail.com wrote: Having trouble getting V2 demos to work. Have to keep at it. There is a different folder for Lazarus demos. The AddressBook demo is the most comprehensive. I don't have it installed on this machine so cannot check the paths.

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Juha Manninen
On Mon, Aug 20, 2012 at 5:47 PM, Jürgen Hestermann juergen.hesterm...@gmx.de wrote: Well, it is a bad idea to wildly scan directory branches just in case at all. That's fooling so many people and there is no good reason for doing so. Only paths specified by the user (i.e. in config) should

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Juha Manninen
On Tue, Aug 21, 2012 at 1:28 AM, Martin laza...@mfriebe.de wrote: Well I am not myself a user of the converter. But even if files are organized like this, then there may be several versions of the Mijn Lib (or one of the units that should be found there, is also in another folder). Then the

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Juha Manninen
On Tue, Aug 21, 2012 at 2:11 AM, Martin laza...@mfriebe.de wrote: On 21/08/2012 00:09, Juha Manninen wrote: The converter is clever enough to ask from user what to do with an unknown unit name. It can be commented out or the user can search and select its location. However, scanning

Re: [fpc-pascal] Text matching for configuration files etc.

2012-04-11 Thread Juha Manninen
On Wed, Apr 11, 2012 at 9:19 PM, Mark Morgan Lloyd markmll.fpc-pas...@telemetry.co.uk wrote: I know that there are algorithms which given a text fragment will find the best fit from a number of candidates, based on how many substrings have to be deleted or changed. Is there anything like

Re: [fpc-pascal] XML parser

2012-04-07 Thread Juha Manninen
Amazing, there are so many choices. I did not find most of them with a simple Google search. I will look at them more closely next week. Thanks! Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] XML parser

2012-04-06 Thread Juha Manninen
Hi I have a new job. Now I am looking for a proper XML parser for Delphi, for big XML files. The default Delphi parser, using MS DOM, chokes badly. 4 GB memory is not enough for it. Question: Does FCL-XML work with a new Unicode Delphi? Another question: What does the license say about using

[fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Juha Manninen
I am lazy and want to find the easiest way to install FPC 2.6.x on Mint Linux, which is compatible with Ubuntu. Has anyone made a repository which can be used with apt-get? Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: RE : [fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Juha Manninen
2012/2/20, Ludo Brands ludo.bra...@free.fr: Grab it from the debian sid repository. How? Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: RE : [fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Juha Manninen
2012/2/20, Ludo Brands ludo.bra...@free.fr: Grab it from the debian sid repository. How? Juha 2012/2/20, Juha Manninen juha.mannine...@gmail.com: 2012/2/20, Ludo Brands ludo.bra...@free.fr: Grab it from the debian sid repository. How? Juha

RE : [fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Juha Manninen
2012/2/20, Ludo Brands ludo.bra...@free.fr: I retract my proposal :) If you haven't installed from a foreign distribution repository before then there are too many risks for messing up your complete installation. You asked for an easy way: this isn't easy when never done something similar

Re: RE : [fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Juha Manninen
2012/2/20 Henry Vermaak henry.verm...@gmail.com On 20/02/12 14:03, Juha Manninen wrote: It is funny how people still think the Debian based package system is the best. It was so maybe 10 or 15 years ago but not any more. These problems have nothing to do with Debian packages. You need

Re: [fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Juha Manninen
2012/2/20 Mattias Gaertner nc-gaert...@netcologne.de Linux Mint: That's what I did: sudo apt-get install lazarus subversion build-essential Now you have some old Lazarus, FPC and all needed libs. Download the fpc+lazarus svn or zip and build the latest and greatest. Can you build FPC

Re: [fpc-pascal] Re: TLinkedList

2012-02-15 Thread Juha Manninen
2012/2/15, Jorge Aldo G. de F. Junior jagf...@gmail.com: i once read a textbook about generics (C++ generics) showing how C++ C++ does not have generics, it has templates. Templates syntax is complex, you can do actual programming with it. IMO, using all its capacity leads to over-engineered and

Re: [fpc-pascal] Re: TLinkedList

2012-02-14 Thread Juha Manninen
2012/2/14, Sven Barth pascaldra...@googlemail.com: Am 14.02.2012 06:45, schrieb Carver413: doesn't generics more or less duplicate the class every time you use it with different type, and if so would this not cause alot of bloating ? Yes it does. So for embedded systems use with care ;) Oh,

Re: [fpc-pascal] Re: TLinkedList

2012-02-11 Thread Juha Manninen
2012/2/11, Jorge Aldo G. de F. Junior jagf...@gmail.com: I believe generics makes faster code due to having no need to test types during runtime... i maybe wrong. It is true only if you use the type-safe as casting. Normal casting does not check types at runtime. It does make the code more

Re: [fpc-pascal] FPC for ARM

2011-12-22 Thread Juha Manninen
2011/12/19 Marco van de Voort mar...@stack.nl FreeBSD and Linux x86 and x86_64 have internal assembler, but not linker. Though the FreeBSD/x86_64 internal assembler is only enable in trunk afaik. Be careful with binutils on ARM though, there are multiple ABIs, and the installed ones must

Re: [fpc-pascal] FPC for ARM

2011-12-19 Thread Juha Manninen
2011/11/28 Henry Vermaak henry.verm...@gmail.com There is an arm release for 2.6.0rc1, but it was built using old binutils (last time I checked, at least): ftp://freepascal.stack.nl/pub/**fpc/beta/2.6.0-rc1/arm-linux/ftp://freepascal.stack.nl/pub/fpc/beta/2.6.0-rc1/arm-linux/ I finally got

[fpc-pascal] Generics and Mac

2011-12-17 Thread Juha Manninen
I used generics in Lazarus code base for the first time, in TreeFilter component: TTreeNodeList = specialize TFPGListTTreeNode; and TBranchList = specialize TFPGObjectListTBranch; I works for me on Windows and Linux, with FPC 2.4.4 and 2.6.0 RC1. Now Zeljan reported it does not compile on

[fpc-pascal] Re: Generics and Mac

2011-12-17 Thread Juha Manninen
2011/12/17 Juha Manninen juha.mannine...@gmail.com I used generics in Lazarus code base for the first time, in TreeFilter component: TTreeNodeList = specialize TFPGListTTreeNode; and TBranchList = specialize TFPGObjectListTBranch; I works for me on Windows and Linux, with FPC 2.4.4

Re: [fpc-pascal] Re: Generics and Mac

2011-12-17 Thread Juha Manninen
2011/12/17 Jonas Maebe jonas.ma...@elis.ugent.be On 17 Dec 2011, at 18:22, Juha Manninen wrote: Fatal: Syntax error, expected but CLASS found Works on 64-bit Linux. How can OSX affect generics syntax? There are no Mac OS X-specific failures of generics tests in the testsuite (64

Re: [fpc-pascal] FPC for ARM

2011-11-29 Thread Juha Manninen
2011/11/29 Thomas Schatzl tom_at_w...@gmx.at There is an arm release for 2.6.0rc1, but it was built using old binutils (last time I checked, at least): ftp://freepascal.stack.nl/pub/**fpc/beta/2.6.0-rc1/arm-linux/ftp://freepascal.stack.nl/pub/fpc/beta/2.6.0-rc1/arm-linux/ What OS/version

[fpc-pascal] FPC for ARM

2011-11-28 Thread Juha Manninen
Hi Is FPC 2.2.2 really the latest native release for ARM processors? I guess it can build the more recent versions. (?) In school we have an interesting project Developing Open Source Systems where the idea is to make an internet router out of small DreamPlug computer by Globalscale

[fpc-pascal] Re: FPC for ARM

2011-11-28 Thread Juha Manninen
2011/11/28 Juha Manninen juha.mannine...@gmail.com 1.2 GHz CPU and half a GB memory ... The gadget also has two Gigabit Ethernet interfaces (!) which makes it suitable for a router project. Juha ___ fpc-pascal maillist - fpc-pascal

[fpc-pascal] (no subject)

2011-11-24 Thread Juha Manninen
I try to learn to use generics properly. First, this is a class definition without generics: TMyDerived = class(TObjectList) private MyInt: integer; public constructor Create(FreeObjects: Boolean=True); end; It works. Now I try to derive a class with generics: TMyGen =

[fpc-pascal] Inheriting from generics specialized classes

2011-11-24 Thread Juha Manninen
... Sorry, forgot subject first I try to learn to use generics properly. First, this is a class definition without generics: TMyDerived = class(TObjectList) private MyInt: integer; public constructor Create(FreeObjects: Boolean=True); end; It works. Now I try to derive a

[fpc-pascal] Re: Inheriting from generics specialized classes

2011-11-24 Thread Juha Manninen
Now, if I do: myV := TMyDerived.Create(False); if myV is TFPGObjectList then ... it gives: unit1.pas(67,10) Error: Class or Object types TMyDerived and TFPGObjectList are not related In my opinion they are related. Maybe generics are good only for situations where you don't need to

Re: [fpc-pascal] Re: Inheriting from generics specialized classes

2011-11-24 Thread Juha Manninen
2011/11/24 Sven Barth pascaldra...@googlemail.com Thanks for the explanations. In mode Delphi and my generic branch (I hope ^^) you are able to do it like this as well: myV := TMyDerived.Create(False); if myV is TFPGObjectListTMyGen then ... Under the condition that TMyDerived is

[fpc-pascal] Generic syntax that compiles with FPC 2.4.4 but not with FPC 2.6.0-0.rc1

2011-11-23 Thread Juha Manninen
Regarding this issue: http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=20713 The following does not compile any more with FPC 2.6.0-0.rc1. --- generic TGen_T = class type public T_TArray = array of _T; var private w: T_TArray; public constructor

[fpc-pascal] Re: Generic syntax that compiles with FPC 2.4.4 but not with FPC 2.6.0-0.rc1

2011-11-23 Thread Juha Manninen
I tested FPC 2.6.0 on Linux and FPC 2.4.4 on Windows but it shouldn't matter in this case. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generic syntax that compiles with FPC 2.4.4 but not with FPC 2.6.0-0.rc1

2011-11-23 Thread Juha Manninen
2011/11/24 Jonas Maebe jonas.ma...@elis.ugent.be The syntax is now: type generic TGen_T = class public type T_TArray = array of _T; private var w: T_TArray; public constructor Create(Value: _T); end; TSpecial = specialize TGeninteger; I.e., type, var etc

[fpc-pascal] EnumToString

2011-11-01 Thread Juha Manninen
Hi I remember there is a way to get a string representation of an enumerated type directly without using a lookup string array, but I forgot the syntax. Lazarus uses only lookup arrays, maybe because the other syntax is new. How is the syntax? Juha

Re: [fpc-pascal] Delphi's anonymous functions in Free Pascal

2011-10-22 Thread Juha Manninen
2011/10/22 Gregory M. Turner g...@malth.us Taking these terms in the broadest sense possible, wouldn't we say that OOP is mostly a functional development paradigm? Not a rhetorical question, I seriously am not sure. OP's somewhat idiosyncratic requirement to put all the OOP metadata in a

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-21 Thread Juha Manninen
2011/10/21 Jürgen Hestermann juergen.hesterm...@gmx.de Florian Klämpfl schrieb: If anybody does not see why increasing complexity without a good reason should be avoided, I recommend: I agree wholeheartly. In the past Pascal was a simple still powerfull language but meanwhile it has

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Juha Manninen
this pattern--parameterizing of algorithms and data structures using code--far easier. Regards, Juha Manninen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Using array of xxx in function call, Delphi compatibility

2011-08-13 Thread Juha Manninen
Hi While reading a bug report I made the following experiment with Delphi 2009 and then with Lazarus + FPC 2.4.4. TMainMenu.Items is of type TMenuItem. TMenuItem has only one version of Add method and it takes another TMenuItem as parameter (checked from VCL source). Still, to my surprise, the

Re: [fpc-pascal] Using array of xxx in function call, Delphi compatibility

2011-08-13 Thread Juha Manninen
2011/8/13 Jonas Maebe jonas.ma...@elis.ugent.be It is always best to isolate such things in a self-contained example that does not depend on external code. Does this compile with your Delphi version? Yes, I should have done that. The code you gave does not compile. If not, the issue is

Re: RE : [fpc-pascal] Using array of xxx in function call, Delphi compatibility

2011-08-13 Thread Juha Manninen
2011/8/13 Ludo Brands ludo.bra...@free.fr Delphi has a procedure TMenuItem.Add(const AItems: array of TMenuItem); overload; which isn't implemented in Lazarus. It existed already in Delphi6. So, not a compiler issue. Ludo, you are right. Somehow I missed it. Uhhh... Ctrl-Click leads to the

Re: [fpc-pascal] Installing FPC 2.4.4 for Ubuntu / Mint + other thoughts

2011-06-16 Thread Juha Manninen
2011/6/16 Rainer Stratmann rainerstratm...@t-online.de Am Thursday 16 June 2011 00:34:15 schrieb Juha Manninen: Linux is still a superior platform for open-source software. Unfortunately for commercial software it is not. That's not true. Look at http://www.cadsoft.de Interesting. I

Re: [fpc-pascal] Installing FPC 2.4.4 for Ubuntu / Mint + other thoughts

2011-06-15 Thread Juha Manninen
Thanks, there are many ways to install. I used the Bart's system which is easy although it bypasses the package manager. I believe the Linux installation could be improved with build-servers like Suse has and other distros, too. There is no fundamental problem with it. Linux is still a superior

[fpc-pascal] Installing FPC 2.4.4 for Ubuntu / Mint + other thoughts

2011-06-14 Thread Juha Manninen
I found the packages for Debian / Ubuntu / Mint : ftp://ftp.hu.freepascal.org/pub/fpc/dist/2.4.4/i386-linux/deb/ How to install it? Am I really supposed to download those ~40 packages separately and then install them in some specific order? Other people have brougt this up, too, and I understand

Re: [fpc-pascal] Function to know if WIN is 32 or 64

2011-03-16 Thread Juha Manninen
Marcos Douglas kirjoitti keskiviikko 16 maaliskuu 2011 13:18:41: On Wed, Mar 16, 2011 at 12:56 AM, Robert Wolfe wolfe.robwo...@gmail.com wrote: WriteLn ; {$IFDEF WIN32} WriteLn ('This is a 32-bit version of Windows.') ; {$ENDIF$} {$IFDEF WIN64} WriteLn ('This is a

Re: [fpc-pascal] interested in building a library for functions?

2011-02-25 Thread Juha Manninen
. The Superficies v.1 seems to have much more of them, so the code has become more portable. What are the 64-bit problems you faced? Regards, Juha Manninen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman

Re: [fpc-pascal] interested in building a library for functions?

2011-02-24 Thread Juha Manninen
Angel Montesinos kirjoitti torstai 24 helmikuu 2011 20:54:48: This is a call for people willing to relieve me in the task of maintaining a library for parsing, evaluating and differentiating real functions with almost optimal speed and precision without recourse to using multiprecision real

Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Juha Manninen
Sven Barth kirjoitti sunnuntai 06 helmikuu 2011 16:24:49: FPreInitialisedSList.Text := StringsToUse; Note: You can also define StringsToUse as a typeless constant, e.g.: const StringsToUse = 'Line 1' + LineEnding + 'Line 2' + LineEnding + // +

Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Juha Manninen
Mark Morgan Lloyd kirjoitti sunnuntai 06 helmikuu 2011 17:50:05: Is it possible to set up the text as an attribute (I'm avoiding the word property here for obvious reasons) of the entire class rather than of an instance? The const array could be outside of any class. It is global if declared

Re: [fpc-pascal] Connection reset by peer http://svn.freepascal.org

2011-02-04 Thread Juha Manninen
ik kirjoitti perjantai 04 helmikuu 2011 16:36:20: I've recently started to have the subject's error message on every attempt to use the svn for update or to access the svn using a web browser. Is there a known issue with the server, or should I be looking for something on my

[fpc-pascal] Visitor pattern (was: Weird interface behavior)

2011-01-24 Thread Juha Manninen
Michael Van Canneyt kirjoitti sunnuntai 23 tammikuu 2011 17:41:13: On Sun, 23 Jan 2011, leledumbo wrote: WARNING: it won't be simple I'm using visitor pattern in my project and to the best of my knowledge, the visitor should be implemented as an interface. Why ? tiOPF uses the

[fpc-pascal] The new Delphi compatible unicode string

2011-01-04 Thread Juha Manninen
There are now 2 projects working on the same HTML component, one is HtmlPort by Phil Hess, one is HtmlViewer maintained in Google Code. I am trying to figure out the right way to modernize the code. There is an idea to support all string types in old Delphis and new Delphis and 3rd party Delphi

Re: [fpc-pascal] The new Delphi compatible unicode string

2011-01-04 Thread Juha Manninen
michael.vancann...@wisa.be kirjoitti tiistai 04 tammikuu 2011 12:42:44: On Tue, 4 Jan 2011, Juha Manninen wrote: This component would really benefit from the Delphi2009 default string type. All string encoding problems would be solved automatically. That is simply not correct. I am

Re: [fpc-pascal] The new Delphi compatible unicode string

2011-01-04 Thread Juha Manninen
michael.vancann...@wisa.be kirjoitti tiistai 04 tammikuu 2011 15:08:01: Not so here. Off the top of my mind: - Explicit encodings run awry - Some Components that used explicit Windows DoSomeThingA calls no longer functioned. (TProcess for instance suffers) - Database fields change type. -

Re: [fpc-pascal] The new Delphi compatible unicode string

2011-01-04 Thread Juha Manninen
Marco van de Voort kirjoitti tiistai 04 tammikuu 2011 17:57:43: No, my whole idea is to modernize the code and NOT support old versions. And what if it doesn't work? That is the whole problem. You can't as with other versions first migrate the code to roughly work on the new delphi (fix

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Juha Manninen
Jonas Maebe kirjoitti tiistai 28 joulukuu 2010 12:31:08: Delphi's UnicodeString supports holding strings with arbitrary encodings (not just UTF-16), along with transparent re-coding of strings when assigning them to unicodestrings whose codepage has been statically defined at compile time.

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Juha Manninen
Marco van de Voort kirjoitti perjantai 31 joulukuu 2010 13:04:27: In our previous episode, Jonas Maebe said: Delphi's UnicodeString supports holding strings with arbitrary encodings (not just UTF-16), along with transparent re-coding of strings when assigning them to unicodestrings whose

[fpc-pascal] Unicode strings

2010-12-28 Thread Juha Manninen
support for converting between 70 different encodings. Juha Manninen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] SIGSEGV in SYSTEM_TOBJECT_$__CLEANUPINSTANCE when calling from C app

2010-12-13 Thread Juha Manninen
Matthias Klumpp kirjoitti maanantai 13 joulukuu 2010 18:50:46: if obj^ = nil then exit; FreeAndNil(obj^); Shouldn't it be: // if obj = nil then exit; -- not really needed FreeAndNil(obj); Juha ___ fpc-pascal maillist -

Re: [fpc-pascal] IntList

2010-10-19 Thread Juha Manninen (gmail)
On Tuesday 19 October 2010 19:10:39 Luiz Americo Pereira Camara wrote: Yes it's ready in fpc 240: uses Fgl; type TIntegerList = specialize TFPGList Integer; Well, yes. It is almost as good as a dedicated class. It has a Sort method but you must feed the compare function for it. It

[fpc-pascal] IntList

2010-10-18 Thread Juha Manninen (gmail)
Hi In Lazarus project jcf2 component has an IntList class which is poorly implemented. It depends on integer and pointer being the same size. I will later suggest to replace it. I have a better IntList. See: http://github.com/JuhaManninen/Pascal/blob/master/IntList/intlist.pas It is similar

[fpc-pascal] TInterfacedObject memory management

2010-10-17 Thread Juha Manninen (gmail)
Hi I have a program that creates a TInterfacedObject and nothing else. program project1; {$mode objfpc}{$H+} uses Classes; var io: TInterfacedObject; begin io := TInterfacedObject.Create; end. I compile it with -gh (heap trace) and get the following output: [DBGTGT] Heap dump by

Re: [fpc-pascal] TInterfacedObject memory management

2010-10-17 Thread Juha Manninen (gmail)
On Sunday 17 October 2010 15:01:37 Paul Ishenin wrote: Try the same but replace io type to IUnknown. Thanks Marco and Paul. I should have known this one. Regards, Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] How to get to Range Check Error location

2010-10-03 Thread Juha Manninen (gmail)
On Saturday 02 October 2010 17:47:27 José Mejuto wrote: The assembly window in Lazarus is shown when no backtrace line is available to point the cursor in, so open callstack View - Debug - Callstack and you will see that there is no available backtrace, maybe except the fpc sources without

Re: [fpc-pascal] How to get to Range Check Error location

2010-10-03 Thread Juha Manninen (gmail)
On Sunday 03 October 2010 19:48:22 C Western wrote: Please report the bug. Yes the result is integer and in 64 bits, this looks like a problem. I think this is an issue I reported back in March, though I can now see I uploaded the wrong patch for it Sorry - meant to add:

Re: [fpc-pascal] How to get to Range Check Error location

2010-10-03 Thread Juha Manninen (gmail)
On Sunday 03 October 2010 23:20:05 Juha Manninen (gmail) wrote: Anyway this is a good example of a valid Lazarus patch that is ignored, again. :-( Ok, sorry Lazarus guys, I must take this one back. The valid patch was uploaded only today so it was not really ignored. Now there are 2 valid

[fpc-pascal] How to get to Range Check Error location

2010-10-02 Thread Juha Manninen (gmail)
Hi I asked this on Lazarus list but it belongs better here. So, how to get to the source line that gives a range check error? I built the whole Lazarus with -Cr and debug it. When the range error happens, it only shows a RunError or similar and doesn't show me the faulty source line. When

Re: [fpc-pascal] How to get to Range Check Error location

2010-10-02 Thread Juha Manninen (gmail)
On Saturday 02 October 2010 12:21:20 Jonas Maebe wrote: Compile with -gl, or set a breakpoint on FPC_RANGEERROR Forgot to tell, I compiled with -gw -gh. -gw should be as good as -gl. Now I tried with -gl but no luck. I get an Assembly window:

Re: [fpc-pascal] How to get to Range Check Error location

2010-10-02 Thread Juha Manninen (gmail)
On Saturday 02 October 2010 16:22:02 Honza wrote: I just tried and can confirm that a LCL app running inside Lazarus (r27491), having turned on range checks is able to perfectly catch and show the place of an range check error (Ubuntu 10.04/AMD64). What I've not tried, but suggest to try, is

Re: [fpc-pascal] How to get to Range Check Error location

2010-10-02 Thread Juha Manninen (gmail)
On Saturday 02 October 2010 16:45:51 Jonas Maebe wrote: Forgot to tell, I compiled with -gw -gh. -gw should be as good as -gl. It has nothing to do with being as good as, they do different things (just like -gw and -gh do different things). I have used only -gw and debugging works fine.

Re: [fpc-pascal] Fwd: Delphi incompatible conditionals?

2010-10-01 Thread Juha Manninen (gmail)
On Friday 01 October 2010 19:33:48 Mark Daems wrote: ... And it's a weird behaviour, because it's all within an {$IFDEF FPC} construct. Why does delphi even try to interprete it? Somebody knows how to avoid the problem? Try this instead: {$IFNDEF FPC} // Can be empty {$ELSE} ...

[fpc-pascal] heap size free heap

2010-09-14 Thread Juha Manninen (gmail)
Hi Maybe someone here knows... I built Lazarus with -gh, started it and closed without doing anything else. --- Heap dump by heaptrc unit 717866 memory blocks allocated : 81646458/83984784 717866 memory blocks freed : 81646458/83984784 0 unfreed memory blocks : 0 True heap size : 851968

[fpc-pascal] Nesting

2010-09-13 Thread Juha Manninen (gmail)
A new Lazarus review : http://delphimax.wordpress.com/2010/09/13/freepascal-and-lazarus-success-or- failure/ has this comment about Lazarus source: --- Abundant use of the Exit() command instead of nesting code in If/then/else. It has been proven (last time in Delphi Informant Magazine) that

Re: [fpc-pascal] TreeView and Nonrecursion

2010-09-02 Thread Juha Manninen (gmail)
On Thursday 02 September 2010 00:47:23 José Mejuto wrote: You must know at which node a new node must be inserted... If your input data contains a string which always identifies the parent node then you can map the string - parent node and find it later for adding a child node. Pseudo code

[fpc-pascal] Hashmap for integers

2010-08-22 Thread Juha Manninen (gmail)
Hi Is there an implementation of a hash map where the keys are integers. It is needed when the integers are too big for a lookup array. I only need check the existence of keys so the data type is not important. About like this: var Len: integer; SeenLen: TIntMap; // or whatever the type is

Re: [fpc-pascal] Hashmap for integers

2010-08-22 Thread Juha Manninen (gmail)
On Sunday 22 August 2010 18:45:04 Jeppe Johansen wrote: I don't think the name map is misleading. It does exactly what a map does. It maps a type Key to another type Value. A list maps an integer(index) to a type Value The search is of course based on a list. Hash tables, as far as I know, are

Re: [fpc-pascal] Hashmap for integers

2010-08-22 Thread Juha Manninen (gmail)
On Sunday 22 August 2010 18:51:21 Andreas Schneider wrote: Afaik, inserting items into a sorted List is done via InsertSort, which is the fastest way (O(n))to go (IMHO), so you do /not/ have to resort the list. True. I could optimize the current implementation a little. Now I insert and then

Re: [fpc-pascal] Hashmap for integers

2010-08-22 Thread Juha Manninen (gmail)
On Sunday 22 August 2010 17:34:55 Andreas Schneider wrote: uses fgl; type TIntMap = specialize TFPGMapInteger, Integer; //Maps Int -- Int I compared the performance of this generics map to a simple integer list. The map was much slower and it also ate huge amouts of memory, 1.5 GB.

Re: [fpc-pascal] OFF TOPIC - how I can migrate of Delphi to FPC

2010-08-14 Thread Juha Manninen (gmail)
On Saturday 14 August 2010 20:04:33 Marcos Douglas wrote: 3- Do exists something I can do with Delphi but not do with FPC? Especialy on Windows. ... 7- Is there any other factors we should consider before making this migration, which was not written above? 1. Are you targeting for

Re: [fpc-pascal] regex vs synregexpr unit

2010-06-06 Thread Juha Manninen
I also chose SynEdit for Lazarus Delphi converter for some reason. (I think it was the first hit when searching regexp from Lazarus code base). It works well. I would guess the other choices work well, too. About the speed difference: I don't believe there is any huge difference. Please remember

Re: [fpc-pascal] regex vs synregexpr unit

2010-06-06 Thread Juha Manninen
Hi Speed is important to me, but reg-expr features is important as well. Actually, I want to include reg-expr as an alternative search mode in my general-purpose file search unit. Then the SynEdit's version of regexp should be fast enough. SynEdit editor in Lazarus for example uses it and

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Juha Manninen
Hi! Well, we once had a prof who counted from 0. After he had drewn a large diagram on the board he wanted to make sure that it was indeed 12 states as stated in the caption. So he went: 0, 1, 2, ... , 11. Hmmm... I've seem to have missed one. Let's count again: 0, 1, 2 , 11 He really

Re: [fpc-pascal] linked list to criticize + generics

2010-05-03 Thread Juha Manninen
I'm curious, why didn't you make it a class...wouldn't that have made it nicer/easier to use and program? +1 It should be a class, yes. Now you have loads of global functions. The integer data type doesn't make much sense but your comment says it will be changed to generics type. That sounds

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Juha Manninen
Hi, There are use cases for this. A while ago I thinking about a string-hash table as a cache for strings. I have done that. Then I needed to inspect the reference count for debugging and configuration purposes. I didn't know there is StringRefCount() function so I also counted the string

Re: [fpc-pascal] dynamic array contents and system.move

2010-04-25 Thread Juha Manninen
This is plainly wrong. When indexing a dyn. array, the compiler generates the correct code to access the data, no more no less. It would be possible to allow this syntax : move(data ... in addition to the current : move(data[0] ... There is no fundamental reason why it wouldn't be

Re: [fpc-pascal] constructor as procvar

2010-03-20 Thread Juha Manninen
Hi The essential part is to have virtual constructor like in Florian Klaempfl's example code: t_mammal = class public constructor create (color : byte); virtual; end; and then... t_pig = class(t_mammal) public constructor create (color : byte); override; end;

Re: [fpc-pascal] Is it save to think default value of untouched string is ''?

2010-03-06 Thread Juha Manninen
. Or was it only with function's string return value, I am not sure. Anyway, after that I was careful to always assign my strings. Maybe it is not true with FPC. Juha Manninen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

<    1   2   3   >