Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Thanks everyone for taking notice in the include file problem. I'm note sure about other people, but to me its a problem that sometimes limits me from following the source code. Ideally there should be one file per unit with an interface section and an implementation section and no include files, b

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Juha, Okay then, maybe everyone should make a mental note and remember add the MainUnit directive to the include files they are editing if it doesn't already exist. But to ask again, what's the purpose of using include files for the interface section of units when most everything in the interface

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Oh and when the MainUnit directive is included at the top of an include file, how does this affect include files where the declaration is another include files, or include files which next other include files? ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
What about the interface section includes and {$region} option I described. Does anyone care to discuss that option? Please go back a few messages and read what I wrote. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.o

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
For those who didn't understand what I meant by using regions in the interface section rather than include files, here is an image of what is essentially in SysUtils currently: http://cache.getlazarus.org/images/sysutils-include.gif Notice the unit file is opened the almost none of what it declar

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Michael, a question: How much of the interface section of units differ per platform? Is it 1% of the code? Is it 5% of the code? With the xml2 unit it's 0%, yet all of the declarations are nested in several layers of include files: http://cache.getlazarus.org/images/xml2-unit.gif http://cache.get

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Anthony Walter
> This won't be changed. Period. Sven, not to be argumentative, but you do get that for a long time programmers have learned how to write code and use libraries by examining them? My goal is simply to make it easier for the people who would want to pick up and start using Lazarus. Organizing thing

[fpc-pascal] Nice const array messages. Thanks!

2016-02-12 Thread Anthony Walter
I just noticed this really nice compiler feature. I don't know when it as added but it's really helpful. When defining const array like below the compiler will tell you how many elements are missing: const Food: array[0..7] of string = ( 'Apple', 'Banana', 'Cherry', 'Doughnut', 'Eclair');

Re: [fpc-pascal] Delphi compiler team left Embarcadero/Idera

2016-02-22 Thread Anthony Walter
The problem Delphi ran into a while back comes down to one key factor: PRICE What is the current cost of their professional version now? Something greater than 1000 buck I believe, and it's been that way for quite some time. In this age, when anyone with a ".edu" email address (DreamSpark) or web

[fpc-pascal] Compiler Mode?

2016-02-24 Thread Anthony Walter
On another forum a Free Pascal user opined that {$MODE DELPHI} is wrong and should not be used other than for people or companies trying to convert Delphi code to Free Pascal. What's the official position on this point? ___ fpc-pascal maillist - fpc-pa

[fpc-pascal] Class/Record helpers on genericd?

2016-04-25 Thread Anthony Walter
Sven, Correct me if I'm wrong, but didn't you add support for class/record helpers on generics? For example I'd like to be able to add methods to dynamic arrays: type TArray = array of ; TCompare = function(constref A, B: T): Integer; TArrayHelper = record helper for TArray private .

Re: [fpc-pascal] Class/Record helpers on genericd?

2016-04-26 Thread Anthony Walter
Okay. Thanks. Just FYI here is my use case. { User defined vertex type } type TColorLitVertex = record Position: TVec3; Normal: TVec3; Color: TVec4; end; { Contiguous data to be fed to an opengl vertex shader attribute } var VertexData: TArray; It would be nice to have both o

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Anthony Walter
Maciej, Hey I'm all for your improvements. Good work, keep it up, and I actually appreciate it. If you want, I can write up an overview of your improvements at getlazarus.org and provide precompiled versions for testings/use on all platforms (win, mac, linux, raspbian).. I asked Sven the other da

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Anthony Walter
Maciej, >From your example code, the usage looks exactly like what I'd want. One question though. Would the magic code also work with var and out arguments? That is with (note these functions are generic): procedure Foo1(A: TArray); procedure Foo2(var A: TArray); procedure Foo3(out A: TArray);

Re: [fpc-pascal] What is the difference between case else and case otherwise

2016-06-20 Thread Anthony Walter
In GNU Pascal otherwise is synonymous to else. http://www.getlazarus.org/learn/language/lexical/#case_condition ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Delphi may have Linux support next year

2016-08-29 Thread Anthony Walter
I don't know it's been posted here yet, but over at the Embarcadero community website a new roadmap has been published. http://community.embarcadero.com/article/news/16418-product-roadmap-august-2016 Interestingly it seems like Delphi might support Linux next year. From the wording it would seem

Re: [fpc-pascal] LLVM Backend Support

2016-08-31 Thread Anthony Walter
I'm not too familiar with LLVM so I'll ask, is it at all likely that an LLVM compiler would produce significantly better/faster optimizations than FPC as it stand currently? What range would be talking about 100% faster? Less? More? ___ fpc-pascal maillis

Re: [fpc-pascal] FPC 3.0.0 seed compiler for Rasperry Pi ARM?

2017-01-04 Thread Anthony Walter
Here is a minimal FPC for the Pi: https://www.getlazarus.org/setup/minimal/ It's compact, installs in your home folder, and include a terminal shortcut. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mail

Re: [fpc-pascal] FPC 3.0.0 seed compiler for Rasperry Pi ARM?

2017-01-04 Thread Anthony Walter
Bo, Extract the archive file, then run the setup script. That's all. The script will then take care of the rest, including giving you option to choose the minimal fpc 3.0 arm compiler install location, as well as creating a debian style ".desktop" file to open a terminal with the minimal compiler

Re: [fpc-pascal] Feature announcement: Interface RTTI

2017-01-28 Thread Anthony Walter
This is fantastic news. Thank you for all you work Sven. This has been committed to the main branch? I'll be testing shortly. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Help me find a mp3 -> pcm audio data pascal implementation

2017-05-09 Thread Anthony Walter
Does anyone know if there exists an mp3 to pcm audio data implementation written in pascal? A few days ago the mp3 format became patent free. A such a few OSS people are writing native mp3 decoders, for example Red Hat. Now I am wondering if anyone has written an mp3 decoder (to pcm data) for free

Re: [fpc-pascal] OpenGL and SDL frustrations

2017-05-25 Thread Anthony Walter
You need to tell SDL what OpenGL kind and version before you create a window. For example if you want OpenGLES 2.0 you would write: SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_Se

Re: [fpc-pascal] OpenGL and SDL frustrations

2017-05-25 Thread Anthony Walter
Oh and another note, you cannot load your gl function such as (glClear in my previous reply, this time I use glGenTextures): var glGenTextures: procedure(n: GLsizei; var textures: GLuint); cdecl; Until you create and make current your OpenGL context. SDL_GL_MakeCurrent(window, context); // after

Re: [fpc-pascal] OpenGL and SDL frustrations

2017-05-25 Thread Anthony Walter
Ryan, Are you loading the OpenGL API functions using SDL_GL_GetProcAddress? You really should be doing that or you're asking for problems. Anyways, if you want maximum capability you should probably use ES version 2, as it's supported on the most devices. It requires you to drop the fixed functio

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Anthony Walter
You might want to try using this geometry library I've written to go along with OpenGL, fixed function or otherwise: https://github.com/sysrpl/Bare.Game/blob/master/source/bare.geometry.pas#L317 Basic usage might be like this: var M: TMatrix; V: TVertex; begin M.Identity; M.Translate(10,

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Anthony Walter
I'm curious, what's the problem with fpc and loops? Also, from my OpenGL experience the limiting factor in speed (frames per second) is usually the pixel complexity and not whatever method is used to feed vertex data or shader uniforms. Wet rock example: http://glslsandbox.com/e#20806.1 __

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Anthony Walter
Thanks for posting those LookAt and Perspective routines. They're kind of needed with OpenGL ES 2.0, as it no longer has matrix modes. You need to build your own perspective and model view matrices and pass them to your vertex shaders as uniforms. uniform mat4 modelview; // modelview matrix unifor

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Anthony Walter
Marco, Regarding 2D animation, what I've far far more effective than an orthographic projection is to draw 2D billboard sprite at a distance and size to align exactly with your screen's resolution. That is each width and height of "1" gl world equals "1" screen pixel, and coordinate (0, 0) equals

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Anthony Walter
I've done a bit of assembly programming for IA-32, none recently and zero compiler development other than simple parsers, but from what I know optimizing with newer instructions like SSEx is only part of there story. There's also optimizing for out of order instruction execution (OoOIE), or instruc

[fpc-pascal] for loops performance problems?

2017-07-04 Thread Anthony Walter
I recall earlier this year some people in this mailing list were discussing surprising performance problems with fpc and for loops. I wanted to know if this is still an existing problem as I am experiencing some unusual performance degradation related to a for loop in one of my test applications.

Re: [fpc-pascal] for loops performance problems?

2017-07-05 Thread Anthony Walter
Karloy, I replaced the calls to World.Vertex/.TexCoord/.Color with a local vertex buffer (an array of TColorTexVertex) eliminating the function calls you mentioned. The frames per seconds with vsync off is identical, so I'm pretty sure that's not causing the slow down. It's either that the additio

[fpc-pascal] Semaphores removed from the rtl?

2017-07-19 Thread Anthony Walter
When and why were semaphores removed from the rtl? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Semaphores removed from the rtl?

2017-07-19 Thread Anthony Walter
Thanks for that bit of information Charlie. I should have searched the svn logs. As a note to this, I am using semaphores quite a bit in SDL2 to guard against things like changes to audio banks in the ui thread and reading audio sample bits in the audio mixer thread, which SDL2 sets up whenever yo

Re: [fpc-pascal] Semaphores removed from the rtl?

2017-07-19 Thread Anthony Walter
Nah thanks, I can implement them with native functions on windows, mac, and linux easily enough and with $ifdefs. I am just surprised by the thought process involved in removing them. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://list

[fpc-pascal] Class type to package name?

2017-07-20 Thread Anthony Walter
Assuming the class type has been registered either through RegisterComponent or RegisterNoIcon, what is the most straight forward way to get the package name it is defined in given a class type? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Class type to package name?

2017-07-21 Thread Anthony Walter
When I register a component with the IDE it is installed from a package. The package has a name. I want to know the name of the package, given a class type of a component registered in the IDE. See this issue: https://bugs.freepascal.org/view.php?id=32182 procedure RegisterForm(const Package: st

Re: [fpc-pascal] Semaphores removed from the rtl?

2017-07-22 Thread Anthony Walter
Michael, no I don't. I use https://github.com/sysrpl/Bare.Game/blob/master/source/bare.interop.sdl2.pas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] My bug or rtl bug with TThread and TThreadList?

2017-07-28 Thread Anthony Walter
Could someone please look at this small bit of code and tell me I have a bug or if there is something wrong with the RTL? https://gist.github.com/sysrpl/40505d25fbd38c4404f95225f21fe0a6 SafePostThread is called from the UI thread, but a complete hangs of either thread happens after sometimes one

Re: [fpc-pascal] My bug or rtl bug with TThread and TThreadList?

2017-07-28 Thread Anthony Walter
It fails on both Qt and Gtk2 linux. Please note I am not actually posting messages, that line has always been is commented. Also, I have a different implementation that I will use, but I am still curious why this one fails. For a background on how/when PostMessage failing, please see this issue:

Re: [fpc-pascal] My bug or rtl bug with TThread and TThreadList?

2017-07-28 Thread Anthony Walter
Ugh, it's my fault. FList.LockList; M := FList.LockList.First; // 2nd call to enter critical section ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Check In Interface Type Helpers

2017-08-22 Thread Anthony Walter
I just wanted to point out that revision 37023 Sven added type helper support for interfaces. Good job and thank you Sven! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Anthony Walter
Marco, it doesn't work that way. Type helpers simply allow you to extend an existing type with new methods and/or properties. When you declare a type helper you extend all instances of said type given that: A) You 'use' the unit declaring the type helper in some other unit. B) No other unit you'r

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Anthony Walter
Here is another example: type TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); TDayHelper = record helper for TDay function AsByte: Byte; function ToString: string; end; function TDayHelper.AsByte: Byte; begin Result := Ord(Self); end; function TDayHe

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Anthony Walter
Sven, multiple helpers would be greatly appreciated, especially considering everyone wants to add their own helpers for types like string. Thanks again! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailm

[fpc-pascal] Dynamic Packages

2018-01-22 Thread Anthony Walter
What's the current development status on loading/unloading packages dynamically? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] RTL Thread.ExecuteInThread interface and implementation wrong

2018-03-20 Thread Anthony Walter
A few years ago I posted in this mailing list about my implementation of creating thread through a simple method. I'm not sure who copied it into the RTL, but I was checking on it today and it's wrong. Wrong in the fact that's its just not usable given the copied design. Here is how it should work

Re: [fpc-pascal] RTL Thread.ExecuteInThread interface and implementation wrong

2018-03-20 Thread Anthony Walter
My bad. I think I looked at the declaration of the method signature and no further, so it's my bad. Basically what needs to happen at least is that Status can be set, Synchronize should be accessible, and Terminated should be public. Nicer to have would be the actual thread class is returned such

Re: [fpc-pascal] RTL Thread.ExecuteInThread interface and implementation wrong

2018-03-20 Thread Anthony Walter
A follow up ... I think the best way to handle everything I mentioned is to just create an instance of this thread type, rather than using a class method on TThread. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/c

Re: [fpc-pascal] RTL Thread.ExecuteInThread interface and implementation wrong

2018-03-20 Thread Anthony Walter
Okay, but the problem with the current implementation in Classes.pas is that Status cannot be used, Terminated cannot be checked, and there is no access to Synchronize. As such OnStatus is pointless, and the semantics of checking Terminated doesn't work. If that's how the these ExecuteInThread clas

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread Anthony Walter
If the file is not to big you could simply write: procedure ChangeLastLine(const FileName, NewLine: string); var S: TStrings; begin S := TStringList.Create; try S.LoadFromFile(FileName); if S.Count > 0 then S[S.Count - 1] := NewLine else S.Add(NewLine); finally

Re: [fpc-pascal] Prorammatically sending file using HTTP POST?

2018-04-04 Thread Anthony Walter
Just a follow up, if care you get a response back from your POST, as in the server says okay, you just use the same socket to read. Also, you might need to call connect after you set the host: var Message: string; Response: string; ... // port 80 normally used for http Socket.Connect('example.

Re: [fpc-pascal] Prorammatically sending file using HTTP POST?

2018-04-04 Thread Anthony Walter
HTTP is quite simple actually. You just build a post message (a string), and send it over a socket. I've implemented HTTP client functions in many computer languages. Here are the key take aways if you want to implement it yourself. Build this string filling out the blanks using your own values P

[fpc-pascal] LongBool True = -1

2018-05-17 Thread Anthony Walter
I am working with some a glib library that expects gboolean to be positive 1 for true, yet FPC emits -1 for true. Is there a compiler flag to force boolean types to emit 1 instead of -1? If so, would there possibly be any side effects with other pascal code?

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

2018-05-20 Thread Anthony Walter
Holy crap Sven. This is so awesome! I was going to write a request last week to allow for a simplified array constant declaration, and you've already got it done. Thanks for your work. I'll test it momentarily and report any actual problems to Mantis. By the way, what's the reason for differences

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

2018-05-20 Thread Anthony Walter
I just got fpc from svn trunk (http://svn.freepascal.org/svn/fpc/trunk/) and tested. Before I submit to Mantis, can you tell me if I made a mistake here? program hello; {$mode delphi} procedure Test; var Data: array of Integer = [0, 15, 24]; I: Integer; begin WriteLn('Testing new array fea

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

2018-05-20 Thread Anthony Walter
Never mind, I found the problem. program hello; {$mode delphi} procedure Test; var Data: array of Integer = [0, 15, 24]; I: Integer; begin WriteLn('Testing new array features'); for I in Data do WriteLn(I); // fixed end; begin Test; end. Outputs: Testing new array features 0 15

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

2018-05-24 Thread Anthony Walter
I just wanted to drop this trick to work around problems with record helpers .. If you wanted to create a record helper for a type that is not normally allowed, or perhaps you want to have multiple record helpers for the same type, consider defining your own separate type and make it contain said

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Anthony Walter
Ryan, We all desperately want dynamic packages completed. Perhaps you might have some interest in that? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Anthony Walter
They are the same as Free Pascal packages, that is a collection of units which can be compiled separately, but with the added ability to be loaded and unloaded after a program has started. Presumably there also exists some dynamic package utility functions built into the system unit that also allow

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

2018-06-23 Thread Anthony Walter
Much thanks Sven! I'm note sure when I'll use it, but the option is always nice to have. A small question, since it's available in a class, does "class threadvar" support generics? {$mode delphi} type TAnimal = class public class threadvar Trainer: T; end; For everyone else, threadvar is t

Re: [fpc-pascal] macos make 3.1.1 fails

2018-06-25 Thread Anthony Walter
I don't believe i386 is supported by the newer OSX dev tools. Use x86_64 instead. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Anthony Walter
To the OP: For the sake of brevity, my vote is simply "no" to all your suggestions. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Pascal Neopixels

2018-07-29 Thread Anthony Walter
I'm not sure what would be the correct list for this question since it involves writing Pascal code and not Lazarus, so here goes ... Can anyone offer me any advice or refer me to helpful resources on the subject of using Pascal code to control WS2128 led strips

Re: [fpc-pascal] Pascal Neopixels

2018-07-29 Thread Anthony Walter
Thanks Michael, that's some good information. I'll poke around with Pascal using the information you provided and see if I can turn an LED on/off, set its color and brightness, and whatever else then post back here with the results. If anyone else cares to chime in with advice I'd much appreciate

[fpc-pascal] Free Pascal Language Diagram

2018-09-11 Thread Anthony Walter
I posted this link once before, but I thought I'd remind you guys it exists and ask if anyone would like to take the work from the page, and integrate it into either the official documentation or maintain it somewhere on the free pascal website. https://www.getlazarus.org/learn/language/lexical/

Re: [fpc-pascal] Announcement GLPT

2018-09-24 Thread Anthony Walter
Darius, I read you message and checked the git repository. I didn't find the answers to a few questions I had by browsing you source, so I'll ask them here. Also, I have some comments. First questions: Do you support requesting context types, such as OpenGL ES 2.0 versus OpenGL 3.1? Do you suppo

Re: [fpc-pascal] Free Pascal Language Diagram

2018-09-24 Thread Anthony Walter
Regarding Identifier, in my page the diagram shows it must start with a Letter optionally followed by any Letter or Digit. Letter links to another diagram defining it as any of A-Z a-z _ This seems correct. I just tested and "const _ = 1" compiles fine using a lone _ as an identifier. Try left cl

Re: [fpc-pascal] Announcement GLPT

2018-09-24 Thread Anthony Walter
Darius, Well the big main thing about glut, or sdl, or whatever bare bones framework used to create an OpenGL window are the following things: 1) Abstracting creating a window 2) Abstracting associating of a GL context with the widow 3) Abstracting the event loop 4) Abstracting reading mouse, key

Re: [fpc-pascal] Announcement GLPT

2018-09-25 Thread Anthony Walter
Dennis, If you want to embed OpenGL in your window, then there is already TOpenGLControl. It's included with Lazarus and is in the components folder. More here: http://wiki.freepascal.org/OpenGL_Tutorial This library is not meant for embedding, it is meant as a native toolkit to create a window

Re: [fpc-pascal] GLPT v0.1.1 released

2018-10-10 Thread Anthony Walter
A fallback should not be created if the initialization or requested context type could not be created. It should just fail with a reason, then allow the programmer to decide what or even if there should be a fallback. ___ fpc-pascal maillist - fpc-pasca

Re: [fpc-pascal] GLPT v0.1.1 released

2018-10-11 Thread Anthony Walter
I haven't tried your package yet since I really don't want to boot into Windows, but I looked at your source code in the git repository. Off the top of my head here are just a few questions or suggestions you need to implement to make it useful: 1) I don't see any code to enumerate the supported

Re: [fpc-pascal] GLPT v0.1.1 released

2018-10-11 Thread Anthony Walter
Ryan, 1&2: Typically what happens is the programmer can enumerate the supported exclusive (full screen and dedicated to a graphics context) resolution modes. The available resolution modes is dependent on their monitor, video driver, and operating system. Each mode defines a width and height in p

Re: [fpc-pascal] GLPT v0.1.1 released

2018-10-11 Thread Anthony Walter
Regarding the RTL OpenGL unit working, that is because it assumes the CORE profile is the only OpenGL library. If you request an ES profile, those libraries are no longer valid. In SDL: SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); Which may link to any of: libGLE

Re: [fpc-pascal] Web application framework in Free Pascal

2019-02-14 Thread Anthony Walter
Your documentation looks good, along with the examples, instructions, and general site aesthetics. Beyond providing your own mechanism for implementing a pascal based CGI wrapper, what functionality does or do you plan to expose? That is, what do you imagine doing with it aside from the normal CGI

Re: [fpc-pascal] Class helper properties

2019-02-24 Thread Anthony Walter
Ryan, I am guessing in the declaration you need to read or write from methods on the helper only and not from fields or methods on the type you are extending. type TMyObject = class private FNum: Integer; public property Num1: Integer read FNum; end; TMyObjectHelper = class help

[fpc-pascal] Need Advice: Teaching a Child Programming

2019-03-06 Thread Anthony Walter
I need some advice from you guys. I might soon be teaching a child about computer programming and am considering using Free Pascal as the first language. The problem is the child is a distance away from me and I want a way to see his code as he types and help him along by moving his cursor and sen

Re: [fpc-pascal] Need Advice: Teaching a Child Programming

2019-03-06 Thread Anthony Walter
Thanks for the feedback guys. I have enough experience with IDE extensions that I know I could write something fit the needs I outline except for the VOIP part. Here is an outline of what I could create, and I'd like to get feedback from you guys to add to or alter this plan before I get started:

Re: [fpc-pascal] Need Advice: Teaching a Child Programming

2019-03-06 Thread Anthony Walter
I agree that the hardest part would be detecting project changes. That is files opened, new files added, packages added or removed and so on. I think if I could or someone could write something to synchronize two instances of Lazarus on different computers / platforms, then rest of everything would

Re: [fpc-pascal] Need Advice: Teaching a Child Programming

2019-03-06 Thread Anthony Walter
Thank you all for your feedback. I will be following up with a stand alone demo program very soon based on what we've discussed. I will also be setting up a page or website for the community to continue with this project. If anyone would like to discussion this idea here further please feel free to

Re: [fpc-pascal] how to make a type private to the unit but not defining it in the implementation section?

2019-03-07 Thread Anthony Walter
type _PrivateData = class private type THidden = record Name: string; end; end; ... and later in the implementation section of the same unit ... var H: _PrivateData.THidden; begin H.Name := 'Hello'; end; ___ fpc-pascal maillist - fpc-pascal@li

[fpc-pascal] Registers used by calling conventions

2019-03-08 Thread Anthony Walter
What registers are used by default calling convention and where can I find more information about Free Pascal asm details? When writing code using the asm block on Delphi in Windows, the default calling convention (fastcall) would pass arguments in registers EAX, EDX, ECX then the stack in that or

Re: [fpc-pascal] Registers used by calling conventions

2019-03-08 Thread Anthony Walter
Jonas, thanks I found that information useful. The pdf on page 22 says "If the class is INTEGER, the next available register of the sequence %rdi, %rsi, %rdx, %rcx, %r8 and %r9 is used" Silvio, maybe I was unclear in my second question. The {$asmmode intel} compiler directive changes the asm synta

Re: [fpc-pascal] Registers used by calling conventions

2019-03-08 Thread Anthony Walter
Christo, that did it. Thanks. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Operator overloading collection for vector operation using Intel SIMD SSE instruction

2019-03-13 Thread Anthony Walter
Zam, That's great. Do you have any plans to add a 4x4 matrix type allowing for both SIMD / SSE versions of vector to matrix multiplication transforms, and matrix to matrix multiplication transforms? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

[fpc-pascal] Web Server Written in Free Pascal?

2019-03-27 Thread Anthony Walter
I've been tutoring kids on programming and using Free Pascal as their first computer language. I've been creating example programs to demonstrate different things computer can do and how certain technologies. In that endeavor I've written a basic multi threaded web server as a command line applica

Re: [fpc-pascal] Web Server Written in Free Pascal?

2019-03-27 Thread Anthony Walter
No I haven't. I will check it out thank you. I just thought my implementation and interface was rather clean, simple, and easy to understand. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/

Re: [fpc-pascal] Web Server Written in Free Pascal?

2019-03-27 Thread Anthony Walter
Okay, I will. Thank you. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Helper/function overloads

2019-04-12 Thread Anthony Walter
I'm not sure if this is anything you're interested in but ... You can qualify the of the procedure with the unit or program identifier. program Test; {$mode objfpc} type THelper = class helper for TObject procedure DoThis; end; procedure DoThis(Param: string); begin WriteLn(Param); e

Re: [fpc-pascal] Optional param modifier

2019-04-13 Thread Anthony Walter
What's wrong with ... procedure FreeThis; overload; begin end; procedure FreeThis(var obj: TObject); overload; begin end; There, now you have an optional argument with a var reference. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://

Re: [fpc-pascal] mode switch madness

2019-04-14 Thread Anthony Walter
Someone said: "You can do a {$i mysettings.inc}" I give that a +1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature Announcement: Support for multiple active helpers per type

2019-05-11 Thread Anthony Walter
Wow Sven, thank you and also to the other team members who made this happen. This is a really big deal and IMO helps solve a lot of problems. For me personally I plan to implement this into a lot of projects. I just finished rebuilding FPC 3.04 and Lazarus 2.0.2 as the main versions for myself and

[fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Anthony Walter
I'm am not sure how long I've ignored this problem, but can someone explain to me the proper way to get FPC and Lazarus to allow linking of external shared object files without the need to create "friendly" symbolic link names FPC and Lazarus can see? For example suppose I want to write some pasca

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Anthony Walter
Okay, so I need to install the dev versions of any package I want to link against. But when my program is distributed it will link at load time correctly to the non dev versions. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-15 Thread Anthony Walter
Maybe close out that bug then? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] tiOPF is looking for a new project maintainer

2019-05-30 Thread Anthony Walter
Graeme, What about fpGUI? Are you going to hand that project off as well? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Error? No range checks in mode delphi?

2019-06-03 Thread Anthony Walter
Is the following a bug in the compiler or a feature? Is would seem using {$mode delphi} allows code which clearly violates range bound to compile without error. program Project1; {$mode delphi} type TSuit = (suHeart, suDiamond, suClub, suSpade); TRedSuit = suHeart..suDiamond; var Suit: TR

Re: [fpc-pascal] Error? No range checks in mode delphi?

2019-06-03 Thread Anthony Walter
That fixes it, but then the question is why does {$mode delphi} differ from {$mode objfpc}? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] A new design for a JSON Parser

2019-08-26 Thread Anthony Walter
I know the FCL already has a capable JSON parser, but I am writing some Amazon web service interfacing projects and wanted a smaller easier to use JSON parser to assist. I've create a new design for a JSON parser that is pretty small, yet powerful. If your interested, I've posted the code under GP

Re: [fpc-pascal] A new design for a JSON Parser

2019-08-26 Thread Anthony Walter
Adding a global redefinable separator character is a good idea which I might add. With regards to using the forward slash, I am just reusing the XPath way of doing things and was considering adding a few more XPath like queries. For example: N.Find('/inventory/999/sku'); // search from root if the

[fpc-pascal] Tests results of several pascal based JSON parsers

2019-08-30 Thread Anthony Walter
I've posted a new page that tests the speed and correctness of several pascal based JSON parsers. https://www.getlazarus.org/json/tests/ In full disclosure I am the author of the new open source JsonTools library, and even though my parser seems to a big improvement over the other alternatives, m

<    1   2   3   4   >