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] 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
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-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] 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] 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] 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, 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

[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] 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] 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] 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

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

[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] 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

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

[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

[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

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

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

[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] 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

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:

[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] 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

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

[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] 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

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

[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] 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] 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] 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

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

[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] 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

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

[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] 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

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

[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 .

[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

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

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-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
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
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
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
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
Marc, Your suggestions only work if a unit declaring the function is in your uses clauses. In the scenario I described that is clearly not the case. Additionally, and in a different scenario, when the identifier IS defined and several units are in the uses clause the goto declaration can jump to

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

2016-02-09 Thread Anthony Walter
Sven, Thanks for clarifying that particular issue. I assumed the functions had been moved to System but wasn't sure when. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2016-02-09 Thread Anthony Walter
Ralf, A couple of points. 1) As I explained there are times when I, and probably other people as well, need to find the declaration of a function, constant, record, or some other identifier. We may not know if the function even exists or has been declared in Pascal, for example when attempting to

[fpc-pascal] Please someone explain this to me

2016-02-09 Thread Anthony Walter
I really don't like the include files with Lazarus and Free Pascal for the following reason: How the am I supposed to know which file is including an include file? Often times I am trying to find a function or class or some other identifier and I search files on disk for the name. Then it tu

Re: [fpc-pascal] Updated Lexical Diagrams

2016-02-02 Thread Anthony Walter
Thanks for the props. I'm working on three new high quality training videos right now. I'll probably edit them at once and post them spaced over the next week. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin

[fpc-pascal] Updated Lexical Diagrams

2016-02-02 Thread Anthony Walter
I've posted the first copy of my pascal lexical diagrams: http://www.getlazarus.org/learn/language/lexical/ It's totally incomplete, there is a heck of a lot missing, but I think it's good start. If you want to make new diagrams or edit the existing one use the edit page feature. You may have to

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread Anthony Walter
Sven, I missed this post when you made it a two days ago. If someone hasn't already asked, does your implementation support short circuit evaluation? For example: BasketCount := IfThen(ShoppingList <> nil, ShoppingList.Count, 0); Where evaluating ShoppingList.Count will cause an exception if Sh

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Anthony Walter
Ewald, Maybe you should go to the forums and enlighten everyone. I provided the link in my last reply. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Anthony Walter
Ewald, If you read the threads on the Lazarus forums you'll see the points people are making while complaining about the documentation, tutorials, and application developer guides, including complaints from some of the top contributors. In a nutshell it has been said that the wikimedia engine is b

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Anthony Walter
Michael, My portal is titled 'Learning Center'. Regarding the label Documenation, I am following along with this topic: Documentation / tutorials need improvement (was: Object Pascal decline?) http://forum.lazarus.freepascal.org/index.php/topic,31272.0.html Where most people are referencing the

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Anthony Walter
Mattias, Noted. Thank you. Ewald, There was/is a big discussion on the forums about the terrible state of the documentation. I already am hosting easy to setup bundles (for example my OSX bundle installed CodeTools and offers you the choice between Homebrew and Macports) which include Free Pasca

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Anthony Walter
I'll consider arrow heads, though I'm unlikely to add them. My layout design is based on the JSON http://json.org/ style with which I believe plenty of people are familiar. Here's an updated diagram with some of the changes you've noted including some new additions and thinner lines and fonts. ht

[fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Anthony Walter
I've been working on writing Javascript to generate lexical language diagrams for the getlazarus.org learning center portal. With my script I'm able to render these diagrams which will be appear under the Free Pascal language Lexical topic: http://cache.getlazarus.org/images/lexical-diagrams.png

Re: [fpc-pascal] Problem with varargs directive

2016-01-11 Thread Anthony Walter
I believe in Delphi only external functions may use varargs. In your case you are declaring a variable, which could be assigned to a local function. function FmtStr(const fmt: PAnsiChar): PAnsiChar; varargs; cdecl; external yourlibname; Note: varargs comes before cdecl, though I am not sure if it

Re: [fpc-pascal] what does fpc make target sourceinstall do?

2016-01-04 Thread Anthony Walter
The compiler has a few parts. The bin folder which is created during "make install". Cross compilers can also be placed there after "make crossinstall" The lib folder which is created during "make install". It contains the rtl, fcl, and other units per architecture (from "make crossinstall") for

Re: [fpc-pascal] FreeGLUT on Windows

2015-12-23 Thread Anthony Walter
I recommend SDL 2.0. https://www.libsdl.org/download-2.0.php I have a complete pascal source code declaration of it here: http://github.com/sysrpl/Bare.Game/blob/master/source/bare.interop.sdl2.pas I also have an object orient wrapper if you want to get straight into OpenGL: immediate mode cu

Re: [fpc-pascal] Where is fpc finding link directories?

2015-12-11 Thread Anthony Walter
Jonas, well the thing is on Raspbian the GLESv2 implementation, which works with the Pi GPU, is at /opt/vc/lib by default. It's owned by root and there is no install. The install I was referring to is building and installing of SDL2 from sources. I already have to tell SDL2 build to find the correc

Re: [fpc-pascal] Where is fpc finding link directories?

2015-12-11 Thread Anthony Walter
Thanks for the explanation. I guess I'll create symlinks in the standard locations (/usr/lib) for these libraries and put that in an install script. Either that or add to fpc.cfg, I'm not sure which is better. Explanation: I'm creating a series of Pi examples for GLES2 and SDL2 along the lines on

[fpc-pascal] Where is fpc finding link directories?

2015-12-11 Thread Anthony Walter
I am having a problem with fpc picking up linking directories on my Raspberry Pi. I have a this lib: /opt/vc/lib/libGLESv2.so When I execute "ldconfig -v" it shows both "/opt/vc/lib/" as a ld link directory, and the file libGLESv2.so as a linkable library. But when I use this code in a unit: p

Re: [fpc-pascal] changes in TThread.OnTerminate in fcp-3.0?

2015-12-10 Thread Anthony Walter
I use a four method pattern with threads, while reusing the same thread class everywhere. 1) define a status method to update your user interface based on feedback from the thread 2) define a terminate method to do clean up when a thread finishes 3) define a work method where the thread does its e

Re: [fpc-pascal] Can fpc 3.0 release be installed using apt-get on Linux Mint?

2015-12-07 Thread Anthony Walter
OR You can goto http://www.getlazarus.org/setup ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] I thought fpc 3.0 would be compilable from fpc 3.0?

2015-12-03 Thread Anthony Walter
Follow up, yes the tags release 3 0 0 worked. Compiled on arm-linux Raspberry Pi 2. Thanks Jonas. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] I thought fpc 3.0 would be compilable from fpc 3.0?

2015-12-03 Thread Anthony Walter
http://svn.freepascal.org/svn/fpc/tags/release_3_0_0/ Ah okay, will try again. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] I thought fpc 3.0 would be compilable from fpc 3.0?

2015-12-02 Thread Anthony Walter
I thought I read on this list somewhere that FPC version 3.0 would be able to compile itself? I just checked out FPC svn branch fixes 3 0 (version 3.0.1), built using FPC 2.6.4, then check out FPC 3.0 again to another directory after setting my compiler environment to my working 3.0. When I try t

Re: [fpc-pascal] FPC fixes 3 0 fails to build on linux arm

2015-12-02 Thread Anthony Walter
A follow up... make all OPT="-dFPC_ARMHF" Works ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC fixes 3 0 fails to build on linux arm

2015-12-01 Thread Anthony Walter
Okay good to know. I'll probably delete my entire fpc tree and rebuild using your notes. Thanks again. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC fixes 3 0 fails to build on linux arm

2015-12-01 Thread Anthony Walter
Jonas, thanks for the reply. I got fpc 3.0 to compiler ad verified it works (by writing a hello world test program) per the solution in my last reply. I'll keep your response in mind, and others should as well, when I attempt to build Lazarus and compile a few more sophisticated tests.

<    1   2   3   4   >