[fpc-pascal] FCL-JSON: Getting the data into pascal classes

2012-12-07 Thread Reimar Grabowski
Hi, I have a relatively simple JSON object consisting of some integer and string fields and a large (500-50 entries) float array. Following the parsedemo.pp I extract the values from JSON and put them in my pascal class. All works as expected only that I do not seem to find a method to copy

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

2013-02-23 Thread Reimar Grabowski
On Sat, 23 Feb 2013 15:20:12 +0100 Sven Barth wrote: Just a little addition: > In unit GLext you have functions like Load_GL_version_1_3 which will > load all core functions provided in OpenGL 1.3 and lower. So Load_GL_version_2_0 will call Load_GL_version_1_5 which will call Load_GL_Version_

[fpc-pascal] Regression? Problem passing a packed record to a overriden, virtual, abstract method in fpc 2.7.1.

2013-02-24 Thread Reimar Grabowski
Hi, see the following little program: program argumentbug; {$MODE ObjFpc} uses classes; type TVector3 = packed record X, Y, Z: Single; end; TClassA = class protected fVector: TVector3; public procedure SetVector(AVector: TVector3); virtual; abstract; end; { TClassB } TClassB = class(

Re: [fpc-pascal] Regression? Problem passing a packed record to a overriden, virtual, abstract method in fpc 2.7.1.

2013-02-25 Thread Reimar Grabowski
On Mon, 25 Feb 2013 22:59:26 +0100 Mattias Gaertner wrote: > And it works under 2.7.1 rev 23661: > TClassB: 0.0E+00, 0.0E+00, 3.0E+00 Thanks for the info. Updating now. R. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

Re: [fpc-pascal] Regression? Problem passing a packed record to a overriden, virtual, abstract method in fpc 2.7.1.

2013-02-25 Thread Reimar Grabowski
> On Mon, 25 Feb 2013 22:59:26 +0100 > Mattias Gaertner wrote: > > > And it works under 2.7.1 rev 23661: Even with 23662 it does not work for me compiling from Lazarus. But from command line it works. So it is not a FPC problem. Sorry for the noise. Investigating further. R. __

Re: [fpc-pascal] Regression? Problem passing a packed record to a overriden, virtual, abstract method in fpc 2.7.1.

2013-02-25 Thread Reimar Grabowski
On Tue, 26 Feb 2013 00:02:33 +0100 Reimar Grabowski wrote: > But from command line it works. So it is not a FPC problem. I am really sorry for communicating with myself but I have spoken too early. Now I can reproduce the problem using just FPC, no Lazarus involved. It gets triggered w

Re: [fpc-pascal] Regression? Problem passing a packed record to a overriden, virtual, abstract method in fpc 2.7.1.

2013-02-26 Thread Reimar Grabowski
On Tue, 26 Feb 2013 08:58:58 +0100 Mattias Gaertner wrote: > Please submit a bug report. Done. http://mantis.freepascal.org/view.php?id=23962 R. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/f

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-28 Thread Reimar Grabowski
On Thu, 28 Feb 2013 10:56:42 +0100 Sven Barth wrote: > As others already said: There are components or frameworks out there > that use modern Delphi features or frameworks of other languages that > make use of such features. Example: DSpring, which is a Delphi > dependency injection framework.

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-28 Thread Reimar Grabowski
On Thu, 28 Feb 2013 19:46:07 +0100 Sven Barth wrote: > Yes, sorry, I did indeed mean Spring4D. And staying with the real thing > does only help if you use Java... Which was implicit. Choosing the right tool for the job (in this case Spring). If this means using a different language so be it. >

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

2013-03-14 Thread Reimar Grabowski
On Thu, 14 Mar 2013 10:48:58 +0200 Juha Manninen wrote: > You consider it "magnificent" because you have not written anything > complex with it. > Please try it yourself. After haunting all the bugs causing crashes > and memory leaks it may not feel so magnificent any more. No C++ bashing, please

[fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-14 Thread Reimar Grabowski
Hi, I just updated my FPC 2.7.1 from revision 23807 to 24236 and for every project I compile I now get warnings that crti.o and crtn.o are not found. Does anyone know why I suddenly get the warnings? How do I get rid of the warnings? This is on Ubuntu 12.10 AMD64. R. ___

Re: [fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-14 Thread Reimar Grabowski
On Sun, 14 Apr 2013 11:55:14 -0400 waldo kitty wrote: > 2.7.1? that's trunk, right? Yes. > maybe this commit?? > > Commit: 23892 > Author: florian > Date: Sun Mar 17 14:51:19 2013 UTC (4 weeks ago) > Changed paths:4 > Log Message:+ warn if one of the linux

[fpc-pascal] LLVM (again)

2013-04-19 Thread Reimar Grabowski
Hi, I have read the discussions about FPC using LLVM and the reasons against it (which I fully understand and support). But a friend of mine called my attention to this: https://github.com/kripken/emscripten/wiki From what I have seen this is quite an amazing project. And being in the process o

Re: [fpc-pascal] LLVM (again)

2013-04-19 Thread Reimar Grabowski
On Fri, 19 Apr 2013 15:06:38 +0300 Nikolay Nikolov wrote: > Actually, I think you can write an asm.js code generator for FPC. Going > through LLVM isn't necessary. Will look into it ASAP. This would be great. R. ___ fpc-pascal maillist - fpc-pascal@

Re: [fpc-pascal] LLVM (again)

2013-04-19 Thread Reimar Grabowski
On Fri, 19 Apr 2013 14:06:44 +0200 Sven Barth wrote: > > If you would have read the discussion about LLVM you would know that > > emscripten was the reason that it was brought up the last time... ;) > Sorry, it should be "Since you have read ... you should know ..." It should be "If I had read

Re: [fpc-pascal] Error: Duplicate identifier "FarPointer"

2013-05-16 Thread Reimar Grabowski
Same problem here but much funnier FPC message: Makefile:2704: *** The only supported starting compiler version is 2.7.1. You are trying to build with 2.6.2. If you are absolutely sure that the current compiler is built from the exact same version/revision, you can try to use OVERRIDEVERSIONCHECK=

Re: [fpc-pascal] FPC / Lazarus install on Fedora 18

2013-05-23 Thread Reimar Grabowski
Is it just me or is this Fedora stuff hijacking the Android Galaxy S4 thread? If it is not a problem of my mail client, PLEASE stop this sh!t. R. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc

Re: [fpc-pascal] Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-11 Thread Reimar Grabowski
On Fri, 12 Jul 2013 07:07:05 +0100 "vfclists ." wrote: > This attitude which exists in the Pascal community needs to end. Not really. R. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] has anyone successfully written an app for iOS using Free Pascal and got it approved by Apple Appstore?

2013-08-30 Thread Reimar Grabowski
On Fri, 30 Aug 2013 19:23:18 +0800 Dennis Poon wrote: > Frankly, I was unhappy and I replied: > > "It is a FREE App without advertisement or anything. I don't get any > reward from this app. I am mere contributing my time and effort and bore > the Developer License fee of USD100 and yet it see

Re: [fpc-pascal] ExtractFilePath and \ as pathdelim

2013-09-03 Thread Reimar Grabowski
On Tue, 03 Sep 2013 00:24:50 +0200 Michalis Kamburelis wrote: > And I really, really wish this would be changed in FPC too... That is, > AllowDirectorySeparators should be ['/'] on Unix, not ['/','\']. > Backslash is a completely normal character in Unix filenames. The > default value of Allow

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-11 Thread Reimar Grabowski
On Wed, 11 Sep 2013 17:37:36 +0200 Jürgen Hestermann wrote: > And double delimiters *are* ambiguous: > Has a (one letter) file name been forgotten or was an additional > delimiter typed (or appended by bad programmed routines)? Ambiguity is not defined by how the symbol came into being. You just

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-12 Thread Reimar Grabowski
On Thu, 12 Sep 2013 07:10:19 +0200 Jürgen Hestermann wrote: > Ahh, that's the reason: > It's (another) sloppiness in Unix systems and has creeped into Windows from > there. Unfortunately M$ hasn't implemented it correctly (like always) and enriched the experience with their common inconsistenci

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Reimar Grabowski
On Mon, 28 Oct 2013 21:48:33 -0400 Dmitry Boyarintsev wrote: > Is it much different than just extending the prefix "M" to "MFP"? Of course it is not, actually it's about the same, as you know. IMHO it's not even a feature just another horrible idea of the Delphi guys used to get their VCL and F

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Reimar Grabowski
On Tue, 29 Oct 2013 13:22:47 -0200 Marcos Douglas wrote: > Do you (all) use prefix in Procedures and/or Functions too? ;-) Nope, we use classes and methods instead of global procedures and functions. ;) R. ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-11-05 Thread Reimar Grabowski
On Tue, 5 Nov 2013 07:10:21 -0800 (PST) leledumbo wrote: > > The packages are defined using directories. Is Java a mess too?  > > Yes, exactly, that's what makes Java package system messy. It makes > refactoring (or restructurization) extremely difficult for deep package > hierarchy. Java has

Re: [fpc-pascal] Compiling FPC itself with optimization

2009-09-24 Thread Reimar Grabowski
On Thu, 24 Sep 2009 18:15:24 +0200 "graemeg.lists" wrote: > I don't know which "model" mine is. > model name : Intel(R) Core(TM)2 Quad CPUQ9400 @ 2.66GHz Sometimes you are just too funny, Graeme. R. -- A: Because it messes up the order in which people normally read text. Q: Why is

Re: [fpc-pascal] Illogical automatic dereferencing

2009-10-13 Thread Reimar Grabowski
On Tue, 13 Oct 2009 15:10:03 +0200 Jürgen Hestermann wrote: > Pointers are great in Pascal (if the syntax wasn't influenced by C) but > a nightmare in C. No they are not. C/C++ has its problems, no doubt, but I would not like to code C/C++ without them, that would be a nightmare. As everyone sa

Re: [fpc-pascal] Re: Illogical automatic dereferencing

2009-10-13 Thread Reimar Grabowski
On Tue, 13 Oct 2009 09:42:11 +0200 Guillermo Martínez Jiménez wrote: > If you have "p: PINTEGER" then you're assuming you're accessing to ONE > integer. No, YOU assume that. I assume that I am working with a memory address. If it is a single integer or the first element of an array or the second

[fpc-pascal] Queue integer values

2009-12-16 Thread Reimar Grabowski
Hi all, I need a queue that can store integer values. Is there any way to use TQueue for this task or does a generic queue class exist which I can use? If both answers are no what is my next best option? R. -- A: Because it messes up the order in which people normally read text. Q: Why is top-p

Re: [fpc-pascal] Queue integer values

2009-12-17 Thread Reimar Grabowski
> You can extend TQueue to have a method to insert the integer as pointers. Thanks for the answer, but I already found a way of using TQueue directly to solve my problem. R. -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-po

Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Reimar Grabowski
On Fri, 18 Dec 2009 13:39:45 +0100 Lukas Gradl wrote: > I'm not shure about that as I'm not that good at C. The packed record > works at 32bit -so I thought that should be correct. If it works on 32bit it should be correct. > Is there a difference between 64Bit and 32Bit? Yes. Some types have d

Re: [fpc-pascal] Problem compiling DLL for 64Bit Windows - complete example attached

2009-12-18 Thread Reimar Grabowski
On Fri, 18 Dec 2009 14:58:10 +0100 Reimar Grabowski wrote: > On Fri, 18 Dec 2009 13:39:45 +0100 > Lukas Gradl wrote: > > > I'm not shure about that as I'm not that good at C. The packed record > > works at 32bit -so I thought that should be correct. > If it w

Re: [fpc-pascal] power?

2010-05-30 Thread Reimar Grabowski
On Sun, 30 May 2010 15:03:03 +0200 spir ☣ wrote: > PS: is there a round(fractional_size) function? that's the reason why i > needed power. http://community.freepascal.org:1/docs-html/rtl/system/round R. -- A: Because it messes up the order in which people normally read text. Q: Why is top

Re: [fpc-pascal] timing again

2010-06-01 Thread Reimar Grabowski
> If you want to get better than that, you need to get system specific, I'm > afraid. That's not true. As Graeme already mentioned there is EpikTimer which is a cross-plattform, high-resolution timer (which btw works very well for realtime tasks). R. -- A: Because it messes up the order in w

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-07-01 Thread Reimar Grabowski
On Sun, 27 Jun 2010 09:50:35 +0200 Benjamin Jan Alexander Rosseaux wrote: > > Hello, > > I've done a working Free Pascal android JNI example (with working .apk > for current ARM-based Android device of the second device generation > (because with VFPv3, so Motorola Droid/Milestone, HTC Desire

Re: [fpc-pascal] methods of an object to create others objects

2010-07-05 Thread Reimar Grabowski
On Mon, 5 Jul 2010 16:51:54 -0300 Marcos Douglas wrote: > What do you mean "a function has effects is already bad"? > A function/procedure always has effects, don't? IMHO he means that a function should only return a value and not change the state of an object, a variable or any other program s

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Reimar Grabowski
On Tue, 6 Jul 2010 12:05:36 -0300 Marcos Douglas wrote: > We talk about just *functions* or we talk about *methods* too? It is meant for 'method functions', too. But I don't follow that rule strictly and try to use a descriptive name that indicates that a function effects something outside its

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Reimar Grabowski
On Tue, 6 Jul 2010 14:54:29 -0300 Marcos Douglas wrote: > Like obj1.CreateObj() ? =) Sounds a little generic for my liking, but at least you can guess that there is something more going on than just returning a value, so, yes. :) I'd rather use something like obj2 := obj1.CreateSpecialTMyObjectI

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Reimar Grabowski
On Tue, 6 Jul 2010 17:14:38 -0300 Marcos Douglas wrote: > Well... I think use a name as CreateSpecialTMyObjectInstance() is very > especific... but, as you said, in the end it is all about personal > style. Perhaps I have not made myself clear. example (makes not much sense; just to explain my na

Re: [fpc-pascal] "class" methods for objects

2010-07-16 Thread Reimar Grabowski
On Fri, 16 Jul 2010 10:48:19 +0200 (CEST) Michael Van Canneyt wrote: > Var >O : MyObject; > > begin >O.MySomething; > end. Interesting that you can call them on not initialized objects. I always assumed that they had to be called in a static way: begin MyObject.MySomething; end. Alwa

Re: [fpc-pascal] Module or Plugin or similar howto implement?

2010-07-19 Thread Reimar Grabowski
On Mon, 19 Jul 2010 17:13:15 +0200 Eduardo wrote: > I'm developing an app and need to extend its functionality via external > modules or plugins. Currently i'm trying to do it using dll/so but > don't know if there are better methods to do implement it. I don't know if there are better methods,

Re: [fpc-pascal] Ideas for namespace implementation

2010-07-26 Thread Reimar Grabowski
On Mon, 26 Jul 2010 12:14:26 +0200 Graeme Geldenhuys wrote: > Just to show how ugly unit names look with prefixes. > eg: > tiUtils.pas vs tiutils.pas vs utils.pas Is this really a problem that warrants time to develop and test a solution? Two letters? Well, it is your time after al

Re: [fpc-pascal] Re: Ideas for namespace implementation

2010-07-26 Thread Reimar Grabowski
On Mon, 26 Jul 2010 11:23:31 -0300 Marcos Douglas wrote: > IMHO, is better to use the ':' like myspace:sysutils Even better C++ style: uses myspace::sysutils; begin Exception; // no error SysUtils.Exception; // identifier not found MySpace::SysUtils.Exception; // no error end. R. -

Re: [fpc-pascal] Help translating C++ to Object Pascal

2010-09-14 Thread Reimar Grabowski
On Tue, 14 Sep 2010 11:50:31 +0200 Graeme Geldenhuys wrote: > Hi, > > In a C++ method as shown below, does the '... return True;' immediately > exit the HandleClientMessage method Yes. R. -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad

Re: [fpc-pascal] Questions regarding arrays

2010-09-22 Thread Reimar Grabowski
On Thu, 23 Sep 2010 00:49:29 +0200 Michael Müller wrote: > Another problem is often to free memory in Pascal that was allocated by C. Having done some interaction with C libs IMHO the best option is not to free the memory in pascal at all but doing it with the provided C functions (if the lib d

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Reimar Grabowski
On Sat, 9 Oct 2010 14:42:47 +0200 "Bo Berglund" wrote: > Where can I find such functions? > I am not a matematician myself so I don't know what these > functions really do... Take a look here: http://www.j3d.org/matrix_faq/matrfaq_latest.html R. -- A: Because it messes up the order in which p

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Reimar Grabowski
On Sat, 09 Oct 2010 16:40:12 +0200 Adriaan van Os wrote: > Matrix functions can be implemented efficiently using SSE, see e.g. > . FPC can generate the SSE instructions for you on compilation. My tests showed that this is faster than wr

Re: [fpc-pascal] Can variables be declared within a block?

2010-10-18 Thread Reimar Grabowski
On Mon, 18 Oct 2010 19:21:57 +0100 Vannus wrote: > Since then, i would say "If you need vars throughout your code, then > something is wrong with your code" for (int i = 0;...) Can't see anything wrong. I use declaration of variables inside blocks quite often in Java and C++ but have never misse

Re: [fpc-pascal] Can variables be declared within a block?

2010-10-20 Thread Reimar Grabowski
On Tue, 19 Oct 2010 21:18:03 +0100 Vannus wrote: > your example is at the start of a "for loop" block, which is much the same > as having it at the start of a procedure block So much the same that you can do it in pascal? What about variables declared inside this for loop or inside the else block

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-11-06 Thread Reimar Grabowski
On Sat, 6 Nov 2010 18:39:53 +0100 Felipe Monteiro de Carvalho wrote: > Did you try making executables for Android? It is possible to run > native executables from Java. It is not my code but I know a bit about Android. I don't know of any way running native executables from Java on this platform.

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-11-10 Thread Reimar Grabowski
On Sat, 6 Nov 2010 23:43:58 +0100 Felipe Monteiro de Carvalho wrote: > Here is a tutorial: > > http://gimite.net/en/index.php?Run%20native%20executable%20in%20Android%20App > > It just uses standard Android Java API calls AFAIK Thanks for the tutorial, but as you surely have read (see comments)

Re: [fpc-pascal] Problem with OpenGL drawing on Linux

2010-12-10 Thread Reimar Grabowski
On Fri, 10 Dec 2010 00:47:41 +0100 Jeppe Johansen wrote: > A quick search seems to indicate that that one has a persisting > problem with glLineStipple Works as expected with the NVIDIA driver here, so the driver may really be the problem. R. -- A: Because it messes up the order in which peop

Re: [fpc-pascal] fpGUI powered by OpenGL

2010-12-20 Thread Reimar Grabowski
On Mon, 20 Dec 2010 15:50:52 +0100 wrote: > > But why is it not possible to integrate this with the regular fpGUI ? > > Can you explain in a couple of sentences ? > > Thats not all however, there are minusses. By using glut, you limit > yourself to the supported platforms/targets. So if new p

Re: [fpc-pascal] Moving callbackfunctions to class

2010-12-31 Thread Reimar Grabowski
On Fri, 31 Dec 2010 14:03:27 +0100 Darius Blaszyk wrote: > Unfortunately I need a platform independent method to handle this. So > assembler is not really the way I want to go, unless it proves to be the only > way. Now you know why I called glut a major PITA and using platform dependent asse

[fpc-pascal] TDOMElement and multiple attributes

2011-03-18 Thread Reimar Grabowski
Hi all, I want to create a node with multiple attributes. It works by using SetAttribute multiple times but it looks like I cannot specify the order in which the attributes appear in the xml. The order of my SetAttribute calls has no influence on the order in the node. So my question is if ther

Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-18 Thread Reimar Grabowski
On Fri, 18 Mar 2011 16:02:10 +0100 Mattias Gaertner wrote: > Why do you need to order them? I don't need to, I just want to and the reason is simply aesthetics. So no big deal that it is not possible. Btw is there any comprehensible reason behind the order which SetAttribute uses? It is not alp

Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-18 Thread Reimar Grabowski
On Fri, 18 Mar 2011 17:08:49 +0100 (CET) michael.vancann...@wisa.be wrote: > Probably determined by hashvalue or the AVL tree order. That makes sense, thank you for the info. R. -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: To

Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-21 Thread Reimar Grabowski
On Fri, 18 Mar 2011 20:16:08 +0100 Mattias Gaertner wrote: > Maybe Reimar can give an example when it does not work. I am to lazy to attach the code, so here it is (you should know how to get it into Lazarus without too much hassle :) ): program xmlattributes; {$mode objfpc}{$H+} uses {$IFD

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Reimar Grabowski
On Fri, 25 Nov 2011 17:53:13 +0100 Felipe Monteiro de Carvalho wrote: > So far I managed to get this: > > http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/interfaces/customdrawn/customdrawnobject_android.inc?view=markup&root=lazarus After a quick look I have some questions: It looks like

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Reimar Grabowski
On Sat, 26 Nov 2011 16:30:31 +0100 Felipe Monteiro de Carvalho wrote: > What is lit geometry? Google didn't help me here. Geometry is anything you draw in OpenGL (in CG the term mesh is preferred) and lit just means that you use lighting and must therefor provide normals, take care of setting t

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Reimar Grabowski
On Sat, 26 Nov 2011 21:32:45 +0100 Felipe Monteiro de Carvalho wrote: >LOGW('[engine_draw_frame]'); // <<<--- I see this tons of times I hope it is printed every 16ms, else you won't reach 60 fps. ;) R. ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

2011-12-08 Thread Reimar Grabowski
On Thu, 08 Dec 2011 12:51:18 -0500 waldo kitty wrote: > i wouldn't say specifically place it in the maths unit but what's wrong with > having both available via a "fastrandom" boolean parameter that is passed? if > the parameter is not passed, it is defaulted to TRUE... if one wants the MT > r

Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

2011-12-09 Thread Reimar Grabowski
On Fri, 09 Dec 2011 07:27:46 +0100 Jürgen Hestermann wrote: > > > Reimar Grabowski schrieb: > > The parameter should default to FALSE to not break existing code relying on > > FPCs random function > And what about existing code coming from Delphi/Turbo Pascal? This

Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

2011-12-09 Thread Reimar Grabowski
On Fri, 9 Dec 2011 10:47:15 +0200 Graeme Geldenhuys wrote: > Like I said, I didn't write that code, and I don't specialise in > encryption algorithms. That's not your fault. Your fault was to not identify the problem correctly but blame FPCs implementation and later rant about "double standards"

Re: [fpc-pascal] Pass array of record as parameter

2012-02-09 Thread Reimar Grabowski
On Thu, 09 Feb 2012 19:34:06 -0500 Thomas Young wrote: > Howard are you saying FPC has dynamic arrays? Is it documented? http://wiki.freepascal.org/DYNAMIC_ARRAY R. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread Reimar Grabowski
On Sat, 3 May 2014 20:48:02 +0200 YuGiOhJCJ Mailing-List wrote: > I am not looking for learning OpenGL, I just want a minimal example to be > sure that my OpenGL unit is working correctly. > Do you have something like that? There should be some in fpcsrcdir/packages/opengl/examples/. hih R. __

Re: [fpc-pascal] Castle Game Engine 5.0.0 release

2014-05-05 Thread Reimar Grabowski
On Sat, 03 May 2014 21:35:17 +0200 Michalis Kamburelis wrote: > Hi everyone, > > The main engine site, with > detailed list of features, links to downloads and documentation, is on > >http://castle-engine.sourceforge.net/engine.php Hi, I am evaluating your engine for a little project. Fi

Re: [fpc-pascal] Castle Game Engine 5.0.0 release

2014-05-05 Thread Reimar Grabowski
On Mon, 05 May 2014 23:21:46 +0200 Michalis Kamburelis wrote: > Contributions are very, very welcome here of course :) Thought so, but I am looking for a solution not for more work. :) > However, current exporter from Blender->X3D does not export Blender > animations in any way to X3D... As a

Re: [fpc-pascal] EpikTimer v1.0.1 released

2014-05-28 Thread Reimar Grabowski
On Wed, 28 May 2014 10:35:47 +0200 Michael Schnell wrote: > But how to decently provide a fully released version of EpikTimer to not > Lazarus enabled users of fpc ? https://github.com/graemeg/epiktimer/releases Download. Extract. Copy needed file(s). Profit. Where is the f** problem? R.

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Reimar Grabowski
On Sun, 11 Oct 2015 16:36:56 +0700 Ryan Joseph wrote: > is there any more complete examples I could look at? http://sourceforge.net/p/asmoday/code/HEAD/tree/trunk/asmtypes.pas#l203 Not an example but a straightforward texture class implementation based on TFPCustomImage. Should work as is for

Re: [fpc-pascal] GLExt crashing

2016-01-29 Thread Reimar Grabowski
On Fri, 29 Jan 2016 11:30:25 +0700 Ryan Joseph wrote: > Is it available in any version before 2.0 do you know? No. > I don’t know much about OpenGL but there is a 1.5 version also which maybe > has it. Of course it has it but it is OpenGL 1.5 not OpenGL ES 1.5. > I found this page also which

Re: [fpc-pascal] IfThen() intrinsic removed

2016-02-05 Thread Reimar Grabowski
On Fri, 5 Feb 2016 12:08:57 +0100 LacaK wrote: > Why not just reuse C: >x := condition ? truevalue : falsevalue ; > As stated before. > May be only for {$COPERATORS ON} > (So it will not influence Pascal language, but for those who want use > it, can enable this syntax using switch) Are you

Re: [fpc-pascal] Smartphone apps in FPC

2016-03-18 Thread Reimar Grabowski
On Thu, 17 Mar 2016 15:49:50 +0100 (CET) Michael Van Canneyt wrote: > But, I do have an emulator, and plenty of people in the building do have a > smartpone :-) > > Amazing, eh ? :) Not really. But it's amazing that you wrote articles and a real-world application and in the process never stumbl

Re: [fpc-pascal] Smartphone apps in FPC

2016-03-19 Thread Reimar Grabowski
On Thu, 17 Mar 2016 17:29:23 +0100 (CET) Michael Van Canneyt wrote: > Obviously they are not so essential as you seem to think ? You are right, they are not. They are only useful to access strange chars like "0"-"9" or "!@#$%&*?/ etc." which are not often used in passwords or user names. But of

Re: [fpc-pascal] Smartphone apps in FPC

2016-03-19 Thread Reimar Grabowski
On Thu, 17 Mar 2016 11:08:01 +0100 (CET) Michael Van Canneyt wrote: > - Use the Android SDK, using the JVM compiler. > I have written several articles on how to use the latter approach; > I wrote a real-world app with it. But you don't own a smart phone and have never heard of 'long click' like

[fpc-pascal] Does FCL Image support transparency?

2016-09-16 Thread Reimar Grabowski
Hi, I want to put watermarks on images in a command line application. This doesn't do the trick: ScaledImage:=TFPCompactImgRGBA8Bit.Create(Width, Height); Canvas:=TFPImageCanvas.Create(ScaledImage); // TFPImageCanvas Canvas.StretchDraw(0,0,Width,Height,Image); // Image is TFPCompactImgRGB8Bit Ca

Re: [fpc-pascal] Does FCL Image support transparency?

2016-09-16 Thread Reimar Grabowski
On Fri, 16 Sep 2016 17:48:33 +0200 (CEST) Michael Van Canneyt wrote: > > Can FCL Image do this and if not what are my alternatives? > > It should be able to do this, yes. Ok, but what am I missing since it's not working here. R. ___ fpc-pascal mai

Re: [fpc-pascal] Does FCL Image support transparency?

2016-09-19 Thread Reimar Grabowski
On Fri, 16 Sep 2016 20:31:30 +0200 (CEST) Michael Van Canneyt wrote: > I would say it is a bug. Then StretchDraw is bugged, too. Or it's no bug at all and TCustomCanvas is just missing alpha blending functionality. I ended up deriving my own canvas class and implementing the desired functional

Re: [fpc-pascal] Does FCL Image support transparency?

2016-09-19 Thread Reimar Grabowski
On Mon, 19 Sep 2016 20:00:54 +0200 (CEST) Michael Van Canneyt wrote: > Maybe you can share your code, so we can improve the base class ? It's just a trivial change to the Draw function and IMO there is little gain implementing it like this for TFPCustomCanvas, but here you go: -add variables: N

[fpc-pascal] Socket error when shutting down fpHttpServer

2016-09-29 Thread Reimar Grabowski
Hi, here is the code (FPC 3.0.0): var Server: TMyServer; procedure HandleSig(sig : cint); cdecl; begin writeln('SIGTERM received'); if (Assigned(Server)) then begin Server.Active:=False; end; end; begin FpSignal(SIGTERM, signalhandler(@HandleSig)); Server:=TMyServer.Create(nil)

[fpc-pascal] FPC 3.0.0 and gProf

2016-10-14 Thread Reimar Grabowski
Hi, are there any known problems with gprof? Mantis says no but when enabling gprof support in my Lazarus project I get a segfault in gmon.c when running it. Any compiler switches I should check for that may interfere or other hints? R. ___ fpc-pascal

Re: [fpc-pascal] FPC 3.0.0 and gProf

2016-10-19 Thread Reimar Grabowski
On Wed, 19 Oct 2016 07:39:30 +0200 Jonas Maebe wrote: > Reimar Grabowski wrote: > > are there any known problems with gprof? > > No, but on the other hand it's not something that many people use What do people use to profile their programs? > On which platform? Sor

Re: [fpc-pascal] FPC 3.0.0 and gProf

2016-10-19 Thread Reimar Grabowski
On Wed, 19 Oct 2016 14:36:05 +0200 Jonas Maebe wrote: > On Linux, kcallgrind or oprofile, I guess (make sure to compile your > code with -gv for both). Thanks, will give them a try. R. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Reimar Grabowski
On Tue, 22 Nov 2016 12:41:37 + Graeme Geldenhuys wrote: > hahaha... I love how a con is “fundamentally different concept”. How is > that a con? Fundamentally different to the way current IDEs/editors process their text -> too much work for a feature no one gives a flying f**k about. Got it?

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Reimar Grabowski
On Thu, 16 Mar 2017 11:14:17 + Graeme Geldenhuys wrote: > And I am pleasantly surprised! :) That demo worked perfectly on my > system. Sound, animation, graphics all silky smooth. Impressive indeed. If running a 3 year old iOS Demo in a browser when we have seen Unreal Tournament 3 being p

Re: [fpc-pascal] WebAssembly Target

2017-04-24 Thread Reimar Grabowski
On Wed, 12 Apr 2017 08:49:08 -0500 nore...@z505.com wrote: > Why run webgl through javascript if you could just make something like a > flash plugin object (like youtube videos) that plays opengl scenes using > some native format similar to how flash uses SWF files, or whatever? First of all you

Re: [fpc-pascal] FPC Graphics options?

2017-05-17 Thread Reimar Grabowski
On Wed, 17 May 2017 09:57:11 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: > You still need to calculate all the vertices that you send to the graphics > card, even if the GPU renders then. Can you elaborate? I know you have to *transfer* *most* vertices to the GPU (not the ones that a

Re: [fpc-pascal] FPC Graphics options?

2017-05-17 Thread Reimar Grabowski
On Wed, 17 May 2017 10:57:58 +0100 Graeme Geldenhuys wrote: > On 2017-05-17 06:12, nore...@z505.com wrote: > > But any game ends up using opengl anyway, doesnt' it? > > They shouldn't have too. I love the retro style low-fidelity games. They > are perfectly possible to implement without OpenG

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 09:02:45 +0100 Graeme Geldenhuys wrote: > On 2017-05-17 14:28, Reimar Grabowski wrote: > > But I don't get why you have to *calculate* *all*. > > The CPU (your program) calculates all the 3D vertex points, as objects > (made out of vertex points)

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 09:23:02 +0100 Graeme Geldenhuys wrote: > All this was done using > the software raycaster, and Java gives me 40 FPS very consistently in > 800x600 resolution (actually 320x200 upscaled to 800x600 - giving the > nice pixelated effect). I don't doubt that Java is fast (actua

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 14:52:25 +0200 (CEST) Michael Van Canneyt wrote: > > Why do you have to *calculate* *all*? > > Because you want to create an image ? That's what a ray-tracer does AFAIK. But raytracing isn't the subject here and never was. Graemes raycasting isn't the subject here either.

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 09:59:03 +0100 Graeme Geldenhuys wrote: > The difference: As explained by somebody after I did a quick google > search to save time: > > " > wolfenstein3d used raycasting. Raycasting is based on sending out a > "ray" along each line of sight from the viewer, and incremental

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 14:23:41 +0100 Graeme Geldenhuys wrote: > This thread is getting a bit ridiculous - just like the Lazarus Forum > thread did. Bottom line is, the exact same code (identical, just the > language syntax that differed) produced acceptable results with GCC and > Java. It didn't

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 14:26:18 +0100 Graeme Geldenhuys wrote: > On 2017-05-18 14:21, Reimar Grabowski wrote: > > Yes, I get that, but the interesting point is what does the profiler say? > > Where are the bottlenecks? > > The full source code was posted in the Lazarus Fo

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 20:32:57 +0700 Ryan Joseph wrote: > > On May 18, 2017, at 8:23 PM, Graeme Geldenhuys > > wrote: > The compiler must be doing something really stupid for it mess up like that > but how can we know? By getting the source of Graemes test, using a profiler on it and having a lo

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 20:38:44 +0700 Ryan Joseph wrote: > I only have some game experience but it’s common to need to perform some sort > of viewport culling/sorting before you can send the data to OpenGL. In general there is no sorting needed and culling is better done on mesh level than vertex

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 08:45:59 -0500 nore...@z505.com wrote: > On 2017-05-18 07:42, Reimar Grabowski wrote: > > Camera position? > > OpenGL has no concept of a camera. > > When I toyed around with Andorra3D it had some concept/code for a > Camera, but he may have added i

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 15:53:46 +0200 (CEST) Michael Van Canneyt wrote: > Yes, it was. Don't tell me which mail I replied to, that's just rude. > The complaint of Graeme was that a FPC ray tracer is much slower slower than > an > equivalent raytracer in Java. All the rest are diversions from the

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 21:00:48 +0700 Ryan Joseph wrote: > That’s right. I’d really like to know what the hell FPC is doing to make it > so slow (besides the call to Floor()). The compiler team should be worried > about this also I would think. No, they should not. It's no real world problem, jus

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Reimar Grabowski
On Thu, 18 May 2017 22:04:19 +0700 Ryan Joseph wrote: > > On May 18, 2017, at 9:58 PM, Reimar Grabowski wrote: > > > > No, they should not. > > It's no real world problem, just a test program. A real game would be done > > differently and then FPC is fast.

  1   2   >