Re: [fpc-pascal] Free Pascal - Github

2014-04-23 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 23 Apr 2014, silvioprog wrote: Is Free Pascal from Github updated? I saw last update in: https://github.com/graemeg/freepascal nickysn authored 11 days ago Yes, it's sometimes not updated, sadly. It also doesn't have up to date fixes branch, IIRC. Can I follow normally Free

Re: [fpc-pascal] Free Pascal - Github

2014-04-24 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 23 Apr 2014, Zaher Dirkey wrote: Well, you can consider Charlie as part of the freepascal team ;) ​Ok, Done, he is the owner of https://github.com/orgs/fpc Thank you! In fact the timings were a bit screwed, because I contacted Github about your contact before this issue

Re: [fpc-pascal] Free Pascal - Github

2014-04-24 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 24 Apr 2014, Zaher Dirkey wrote: ​No problem, It is normal way, If you want to work on this org I will remove my self as owner and developer, it is now under your hands, just confirm me. Well, I took over a bit already, and did some minor modifications. :) Or I don't know what

Re: [fpc-pascal] Identifier not found MEMW

2014-05-09 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 9 May 2014, nitinjain wrote: *MEMW[$B800:(width_offset-1)*2 +(height_offset-1)*160]:=current_location^.code;* For the sake of completeness, this piece of code is just writing a character to the text mode memory of the display hardware

Re: [fpc-pascal] replacement of MemAvail and MaxAvail

2014-05-30 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 30 May 2014, mokashe.ram wrote: Thanks For Your This Prompt Reply... but in promgram these functions are already used in my applcation developed in TP7, sonow i am migration this applcation to free pascal. how can i replace using free pascal? Michael is right, there's no *real*

Re: [fpc-pascal] replacement of MARK and RELEASE function in free pascal

2014-06-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 19 Jun 2014, mokashe.ram wrote: Ok thanks, but using untyped pointer how to mention size in GETMEM()? * GETMEM(markexam,'' );* It's detailed in the documentation, it's detailed there along with the rest of the memory management functions, please refer to that:

Re: [fpc-pascal] replacement of MARK and RELEASE function in free pascal

2014-06-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 19 Jun 2014, joha...@nacs.net wrote: I seem to remember being warned in the old days of Turbo Pascal not mix use of getmem()/freemem() and new()/dispose() within a program, due to differences in the memory allocation strategies. Are there still any compatibility or

Re: [fpc-pascal] Using a custom fpc.cfg

2014-07-07 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 7 Jul 2014, luciano de souza wrote: What I want to know is: is there a commandline parameter to specify a new name or, at least, a new directory to fpc.cfg file? There's an environment variable called PPC_CONFIG_PATH you can set to tell the compiler the new config location. It's

Re: [fpc-pascal] Setting execute bit for a Unix file

2014-07-31 Thread Karoly Balogh (Charlie/SGR)
Hi, Naaah, better use FpChmod() in BaseUnix unit: http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html Charlie On Thu, 31 Jul 2014, David Copeland wrote: You could try FpSystem('chmod +x yourfilename'); // assuming the cwd is set Dave. On 07/31/2014 04:18 PM, Juha Manninen

Re: [fpc-pascal] Failed compiling SVN source on Raspi 1 B+

2015-03-03 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 3 Mar 2015, Bee wrote: So, is it not possible to compile FPC trunk using FPC stable (2.6.4) on a Raspberry 1? I just installed Free Pascal 2.6.4 on my RPi 1 Model B+, checked out latest SVN trunk, then issued the following command: make all OPT=-CpARMv6 -dFPC_ARMHF

Re: [fpc-pascal] How to get the permission f a file ?

2015-06-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 17 Jun 2015, fredvs wrote: But how to check if a file has executable permission (and if not, change it with fpchmod(thefile S_IRWXU);) ? From the top of my head: fpStat(), and in the returned stat structure, look for the mode field (or st_mode?). There are more useful bits in

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 17 Aug 2015, Michael Schnell wrote: Cross compiling with fpc is not for that faint of heard. (Been there some years ago) Well, I do it 8 hours a day for a living, actually... :) I think it's really easy these days, if you know some basics about the build system (most of which is

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 15 Aug 2015, Chris Moody wrote: Is there a better guide on how to do this than: http://wiki.freepascal.org/fpcup#Linux_ARM_cross_compiler ? specifically as far as this sentence is concerned: * Linux/Unix build or install the relevant crossbinutils (Linux, unix)

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 15 Aug 2015, Chris Moody wrote: Is there a better guide on how to do this than: http://wiki.freepascal.org/fpcup#Linux_ARM_cross_compiler ? specifically as far as this sentence is concerned: * Linux/Unix build or install the relevant crossbinutils (Linux, unix) With

Re: [fpc-pascal] Issue with Linking

2015-08-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Aug 2015, Chris Moody wrote: I'm not sure how to fix this. If anyone can assist, it would be greatly appreciated. You link against the libc (because of the nature of the source you're compiling) but C development files are not installed on your system. You should probably:

Re: [fpc-pascal] Issue with Linking

2015-08-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Aug 2015, Chris Moody wrote: It seems I have both already: Any other ideas? Yes. Sadly, I was too quick to reply. See what Jonas wrote in his mail. Charlie ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Byte order modification in fpc on ARM?

2015-10-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 19 Oct 2015, Jonas Maebe wrote: > Bo Berglund wrote on Mon, 19 Oct 2015: > > > Is there a function or such to interrogate the byte order of the > > platform FPC runs on? So that I could add a test at the start of > > download to check if swapping is needed? > > Use the

Re: [fpc-pascal] Assembler output

2015-09-12 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 11 Sep 2015, José Mejuto wrote: > There are two motivations, the first one is to learn how to do it manually, > take a .pas, get the .s and assemble them (and link) to geta final executable. IIRC it was arguments: -a -st This won't assemble or link the executable, but generate a

Re: [fpc-pascal] Target Win32 missing

2015-12-06 Thread Karoly Balogh (Charlie/SGR)
Hi On Sun, 6 Dec 2015, Lukas Gradl wrote: > When calling fpc from linux command line -Twin32 is missing. -TWin64 works as > expected. Where did -Twin32 go? Nowhere. Seems you are using a 64bit targeted compiler, which can only output x86_64 code, so Win64 only. You need an i386 compiler or

[fpc-pascal] large project Win32 External Linker Error with 3.0

2015-12-02 Thread Karoly Balogh (Charlie/SGR)
Hi, I have a fairly large project, which links against a number of C-written libraries. With 2.6.0-2.6.4, it compiles fine, but with 3.0, it fails to link with: `___tls_start__' referenced in section `.data.n___tls_used' of C:\FPC\3.0.0\units\i386-win32\rtl\sysinitpas.o: defined in discarded

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 17 Dec 2015, R. Diez wrote: > Maintaining your own independent compiler is hard, and I would have > expected that FreePascal had turned to GCC or LLVM a long time ago. Thank God that never happened (not as the first option anyway), considering the state of the GNU toolchain on some

Re: [fpc-pascal] Bls: Bls: Quick Modern Object Pascal Introduction, for Programmers

2016-06-21 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 21 Jun 2016, Mr Bee wrote: > > Maybe a little bit offtopic, but I have a question regarding the > >compiler directives: is there a way to tell Lazarus to use these > >directives in every new unit? No clue about Lazarus, but one can put -mOBJFPC in his compiler config file (same with

Re: [fpc-pascal] Bls: Bls: Bls: Quick Modern Object Pascal Introduction, for Programmers

2016-06-21 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 21 Jun 2016, Mr Bee wrote: > Keeping backwards compatibility [BC] is great. However, thinking about > forwards compatibility [FC] is also necessary. Keeping BC too tight will > also hold back our forward thinking. We will be stucked in the past > forever. No matter how hard we keep

Re: [fpc-pascal] location modifier

2016-01-18 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 18 Jan 2016, Mattias Gaertner wrote: > I can't find the 'location' modifier in the docs. Is it missing? > > For example: > > function bsd_socket(Domain: LongInt location 'd0'; Type_: LongInt > location 'd1'; Protocol: LongInt location 'd2'): LongInt; syscall > SocketBase 30; > > See

Re: [fpc-pascal] reference-counted function results not initialized to nil

2016-06-25 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 25 Jun 2016, Jürgen Hestermann wrote: > This has definitely changed with Free Pascal 3 as my programs suddenly > did not work anymore and I had to add Setlength() all over my code. > Before we could rely on that managed types where always initialized > (well, that's the purpose of

Re: [fpc-pascal] reference-counted function results not initialized to nil

2016-06-26 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sun, 26 Jun 2016, Jürgen Hestermann wrote: Ok, scrap what I wrote before... :| You are right about the managed types initialization. But then the documentation needs to be corrected there too. But actually, result is not a local var, but in fact a "special" parameter of the function. My

Re: [fpc-pascal] reference-counted function results not initialized to nil

2016-06-26 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sun, 26 Jun 2016, Jürgen Hestermann wrote: > Am 2016-06-26 um 14:27 schrieb Karoly Balogh (Charlie/SGR): > > There's no exception. At least not specifically for Result. It is simply > > variable passed by reference from the caller side, therefore it's not > &g

Re: [fpc-pascal] Pointer hashing

2017-01-29 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 30 Jan 2017, Ryan Joseph wrote: > I?m trying to hash a pointer value and found some example of hash > function but not sure about translations and the process in general. > > 1) Should I cast ?pointer? as PtrUInt to get an integer from a pointer? > I?m looking for the memory address

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 26 Jan 2017, Graeme Geldenhuys wrote: > It seems like it is trying to interpret the field data value like a > C/C++ escape sequence. eg: \n meaning NewLine > > I such escape sequence processing a JSON standard? Yes. See:

Re: [fpc-pascal] LLVM Backend Support

2016-08-31 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 31 Aug 2016, African Wild Dog wrote: > > The code optimizers, yes. The rest, not so much. > > > >> Will the FPC team, somewhere in the future, adopt the LLVM as the > >> backend on all platforms ? > > > > No, for various reasons: > > Again,thanks for the detailed explanation. As this

Re: [fpc-pascal] LLVM Backend Support

2016-08-31 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 31 Aug 2016, Anthony Walter wrote: > 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? We just

Re: [fpc-pascal] FPC 3.0 deb packages?

2016-09-06 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 5 Sep 2016, Jon Foster wrote: > After I banged on it for many hours applying several crude patches it > finally makes packages again. But all of this leads me to believe that > Debian packages for FPC are no longer maintained / supported? If so > what's the story? Maybe my crude

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

2017-01-04 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 5 Jan 2017, Bo Berglund wrote: > I just need the seed compiler to be able to build FPC from sources. > And build Lazarus of course. Then you need "ppcarm" from that archive, and nothing else. Just copy it whereever you want, in your home dir, or something and do: make all install

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

2017-01-07 Thread Karoly Balogh (Charlie/SGR)
Hi On Sat, 7 Jan 2017, Bo Berglund wrote: > I went ahead and tried the command but it failed miserably... > > pi@rpi3-jessie:~/dev/fpc/3.0.2RC1 $ make all install > FPC="/home/pi/bin/fpc/3.0.0" > INSTALL_PREFIX="/home/pi/bin/fpc/3.0.2RC1" OPT="-dFPC_ARMHF" With FPC, You need to specify the

Re: [fpc-pascal] FPC clean room project

2017-01-02 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 2 Jan 2017, Santiago A. wrote: > Well, I think it's evident  that Freepascal and lazarus tries to be > delphi compatible, and that means that must look close to delphi to > imitate it's behavior and syntax. > > Is that reverse engineering? Well, I'm not a lawyer, I don't know where >

Re: [fpc-pascal] Delphi RTTI vs Free Pascal RTTI

2017-03-24 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 24 Mar 2017, Graeme Geldenhuys wrote: > On 2017-03-24 18:55, Michael Van Canneyt wrote: > > They are. There is one dereference on Delphi which is not present in fpc, > > although in fpc trunk > > Another minor difference is data types. From what I remember (and as can > be seen in

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 23 Mar 2017, Graeme Geldenhuys wrote: > Just thought I would mention, yesterday Delphi 10.2 was released which > includes Linux support (I assume a cross-compiler). It is only available > in the Enterprise edition product line though, and only Linux Server > style apps are supported

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 23 Mar 2017, Mattias Gaertner wrote: > > > When did FPC start to run on Linux? 1999? > > > > I got the first "hello world" around 1995-1996, I think, > > together with Mark May. (if memory serves well) > > Well, Delphi didn't start with a "Hello World". So that would be a > little

Re: [fpc-pascal] Threading vs Parallelism ?

2017-03-29 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 29 Mar 2017, fredvs wrote: > > besides hardware parallelism, > > Is it possible, with fpc, to assign one processor (if multi) for a > thread and say to the system to use this one only for the thread ? But > maybe it will gives more problems than solutions. Yes, it's called

Re: [fpc-pascal] WebAssembly Target

2017-03-16 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 16 Mar 2017, Mattias Gaertner wrote: > > which was basically striped down Javascript with some integer/pointer > > type tagging. As far as I know, the main problem with JS from a > > computing point of view, that it handles all numbers as floats for > > "simplicity", but with some

Re: [fpc-pascal] WebAssembly Target

2017-03-16 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 16 Mar 2017, Graeme Geldenhuys wrote: > And this brings me to my next worry. As far as I understand, WebAssembly > is C (for now - other languages to follow) compiled into WebAssembly > bytecode. So now we have C code with all its pointer access, buffer > overflow issues etc running

Re: [fpc-pascal] Threadvar member field

2017-03-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 17 Mar 2017, Michael Schnell wrote: > Accessing threadvars (in fpc) costs a lot more CPU cycles (i.e. involves > an OS call) than accessing normal variables. This is actually entirely platform specific. The underlying implementation of threadvars is very different for each platform,

Re: [fpc-pascal] WebAssembly Target

2017-03-15 Thread Karoly Balogh (Charlie/SGR)
> > WebAssembly > > > <https://www.bleepingcomputer.com/news/software/mozilla-releases-firefox-52-the-first-browser-to-support-webassembly/>") > > [1] . > > Karoly Balogh (Charlie/SGR) is working on this, and as far as I know has > already some degree of success

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 17 Mar 2017, Michael Van Canneyt wrote: > In fact, there is an alternate approach, transpiling pascal to Javascript. > > It's much farther ahead than the webassembly target, already produces > programs running in the browser and the first web-based components are > already being

Re: [fpc-pascal] WebAssembly Target

2017-03-16 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 16 Mar 2017, Graeme Geldenhuys wrote: > I love how they say multiple times in the video: > >"... and completely secure." > > Umm, didn't they say the exact same thing about Java Applets, Flash, > Silverlight etc. :) I guess time will tell, but if history is anything > to go buy,

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 22 Mar 2017, James Richters wrote: > No, it is not only freepascal, but not every program either. I'm no Windows expert, but Windows API seems to have a way do to this directly. CreateFile() API seems to have a flag, which has a value FILE_FLAG_WRITE_THROUGH, which will cause the

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 22 Mar 2017, Karoly Balogh (Charlie/SGR) wrote: > However, please note that transactional file handling on power loss is a > quite delicate scenario, so you might not be able to solve all the related > problems with this - what happens exactly when you get a power lo

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 22 Mar 2017, Giuliano Colla wrote: > Il 22/03/2017 13:20, James Richters ha scritto: > > No, it is not only freepascal, but not every program either. > > A wild guess. The vilain could be the journal logic. Wild indeed. :) > You might try overwriting the old file instead of

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Apr 2017, Ryan Joseph wrote: > yes, I?d like to see that so I know why my example doesn?t work as I > expected. Everything I?m hearing makes me think ?i? should keep > incrementing after I call SetJmp and then return with JongJmp but > there?s something I?m missing obviously.

Re: [fpc-pascal] BlockWrite() version 2.6.4

2017-08-14 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 14 Aug 2017, Brian wrote: > Thanks Charlie. > > I notice the Do_Write() uses repeat .. until where fpWrite() does a direct > call. > > What was the reasoning for the repeat..until in Do_Write() ? Because FpWrite() is just the direct Unix OS call, so the RTL doesn't add extra

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

2017-07-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Jul 2017, Anthony Walter wrote: > When and why were semaphores removed from the rtl? They are removed from trunk since Sept 2016, and I think they were deprecated for a while now, although I cannot confirm this. But what's sure, they were only implemented and used interally for

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

2017-07-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Jul 2017, Anthony Walter wrote: > Thanks for that bit of information Charlie. I should have searched the > svn logs. > > (...) > > It just seems to me like the concept of a semaphore has been well > established in CS for decades and it's a bit weird to remove them from > the rtl.

Re: [fpc-pascal] Running Freepascal programs on other computers

2017-06-28 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 28 Jun 2017, James Richters wrote: > Does anyone know how this is normally achieved, and how to implement > this with my freepascal console applications? I'm not a Windows developer, but You have to code sign your executable, probably, just like any normal Windows app you'd release.

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

2017-07-04 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 4 Jul 2017, Anthony Walter wrote: > I think the code to generate the geometry each frame isn't that complex, > and I pre-allocate room in my buffer for all the geometry just once, so > it seems doing to calculations for the geometry is what's killing the > performance. The

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-06 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 6 Jul 2017, Graeme Geldenhuys wrote: > Imagine if FPC had type inference and multi-line strings, neither very > exotic features. The code then becomes: > > = > var query := '''SELECT Customers.CustomerName, Orders.OrderID > FROM Customers >

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

2017-07-05 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 5 Jul 2017, fredvs wrote: > Please take a look at this: > > https://www.mail-archive.com/fpc-pascal%40lists.freepascal.org/msg46162.html > > and this: > > http://www.mail-archive.com/mseide-msegui-talk@lists.sourceforge.net/msg11078.html > > fpc has a huge problem for float

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-06 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 6 Jul 2017, Graeme Geldenhuys wrote: > On 2017-07-06 15:35, Karoly Balogh (Charlie/SGR) wrote: > > But sure, web devs are well known for their productivity... :P > > Just in case you thought I was a web developer - far from it! > > Anyway, the idea wa

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

2017-07-05 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 5 Jul 2017, Anthony Walter wrote: > 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

Re: [fpc-pascal] BlockWrite() version 2.6.4

2017-08-05 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 5 Aug 2017, Michael Van Canneyt wrote: > > In which file can the source code specific to BlockWrite() version 2.6.4 be > > found ? > > Headers are in rtl/inc/systemh.inc > actual routines are in rtl/inc/file.inc Just an addition, BlockWrite() actually calls the internal RTL function

Re: [fpc-pascal] FPC Graphics options?

2017-05-22 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 22 May 2017, Nikolay Nikolov wrote: > Today, I checked whether we can take advantage of this optimization for > floats, but I didn't see any load-modify-store instructions in the x86 > instruction set (neither x87, nor SSE/AVX). Are there any floating point > instructions on any

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 19 May 2017, Graeme Geldenhuys wrote: > Bottom line is, with the exact same code, NO work-arounds is required > for GCC or Java! So why must we have work-arounds for FPC? It's a > compiler or RTL issue - not being able to understand the code good > enough to generate more efficient

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 19 May 2017, Reimar Grabowski wrote: > Final: The render function takes about 90%, the cast-to-int about 5%. No > other interesting functions shown. So the missing time must be spent > doing floating point math and branching (ifs), as that's all the render > function does. Well, if

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 19 May 2017, Sven Barth via fpc-pascal wrote: > I think Jeppe wanted to add vector support. Though the question here is > whether one wants to optimize/detect this at the AST level and convert > that to implicit vectors or at the CSE level. I think the higher level you can do an

[fpc-pascal] Mantis/Bugtracker registrations fixed

2017-05-31 Thread Karoly Balogh (Charlie/SGR)
Hi, We had numerous reports over the past few weeks, that the FPC/Lazarus Bugtracker registration verification was broken. Thanks to the work of Michael van Canneyt, it should be fixed now. If you had trouble creating a bugtracker account in the last few weeks, please try again now. Charlie

Re: [fpc-pascal] FPC for AVR

2017-06-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: > > mikroPascal (not free) supports AVR and many other chips. > > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license > > Brian > > Yes, but I was asking about the FPC situation. I'm desperately resisting > local pressure to

Re: [fpc-pascal] FPC for AVR

2017-06-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: > At the risk of making myself unpopular: because right now I /don't/ have > time. Sorry, I didn't mean this personal to you. I was just a bit triggered on the fact that people offer competing products on FPC status requests, because I've seen

Re: [fpc-pascal] alternative name fpc cross

2017-10-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 10 Oct 2017, turro75 wrote: > when I create the cross compiler to arm-android and arm-embedded I get the > same compiler name so unable to have both running in the same system. > any workaround? The compiler is *NOT* OS/platform specific, only CPU specific. Use any for both, and

Re: [fpc-pascal] alternative name fpc cross

2017-10-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 10 Oct 2017, Michael Van Canneyt wrote: > > I used to be maintainer on Wine AppDB for several years. Nothing ever > > worked from one release to the next. WINE spent 10y as an alpha > > release and it started to get embarrassing so they called it beta. > > Everything still, broke ,

Re: [fpc-pascal] alternative name fpc cross

2017-10-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 10 Oct 2017, pasc...@piments.com wrote: > > The compiler is *NOT* OS/platform specific, only CPU specific. Use any for > > both, and specify the right target using -Tandroid or -Tembedded when > > invoking. > > Maybe you meant the compiler is not TARGET OS specific in that it can >

Re: [fpc-pascal] FCL-WEB and PostgreSQL Support: Current Status

2017-09-27 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 27 Sep 2017, Michael Van Canneyt wrote: > > 2 - Are they recommended for use in production environments? > > Absolutely. > I use them in very high-load (and we're talking VERY high load) > environments, with 24/7 availability. Can you ellaborate a bit more on this Michael? Like how

Re: [fpc-pascal] Inline ASM code

2017-08-24 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 24 Aug 2017, LacaK wrote: > Thank you! > I have hoped, that there is some kind of direct usage. Because > "fstp a" is compiled into: >fstps -0x24(%ebp) // address of local variable "a" on stack > and "pa^ := a" into: >mov-0x4(%ebp),%eax >mov-0x40(%eax),%edx //

Re: [fpc-pascal] TP compatibility: procedural type

2017-08-29 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 29 Aug 2017, Anton Shepelev wrote: > >> To be used as procedural values, procedures and > >> functions must be declared with a 'far' direc- > >> tive or compiled in the '{$F+}' state. > >> > >>whereas Free Pascal in -Mtp seems to accept any > >>non-system procedure or

Re: [fpc-pascal] getting cross with the cross compiler

2017-10-07 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 6 Oct 2017, pasc...@piments.com wrote: > This builds fine using the stock fpc 3.0.2 with linux target. However, > the supposed cross-compiler seems to be trying to build for linux. The cross compiler binary itself is only CPU specific, not OS specific. And because for the cross CPU

Re: [fpc-pascal] getting cross with the cross compiler

2017-10-07 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 7 Oct 2017, Sven Barth via fpc-pascal wrote: > > So where is my cross compiler ?? > > > > Thanks for any help and suggestions. > > A single compiler binary can always compile for all supported targets of > that processor. So as long as all the units are available you simply > need to

Re: [fpc-pascal] [fpc-devel] FPC 3.0.4 released!

2017-11-30 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 30 Nov 2017, Marco van de Voort wrote: > For Downloads, please use the FTP server at > > ftp://freepascal.stack.nl/pub/fpc/dist/3.0.4/ Not sure why Marco decided to redirect everything to the stack.nl mirror as primary source in his announcement, but everything should be on

Re: [fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 10 Nov 2017, Marc Santhoff wrote: > What is that, is ppc used for bootstrapping the cross compiler > regardless of any other fpc maybe installed? Yes. First that ppc gets built with the "other FPC" installed. Or you can specify a startup compiler explicitly with FPC= argument to the

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 3 Nov 2017, Matias Vara wrote: > Hello,  I think it would be better if I put my question in context. In > order to tell the processor that we are in a loop, the pause instruction > could be used (also I think the "rep nop" produces the same opcode). > This tells the processor that we

Re: [fpc-pascal] Float packing

2017-11-06 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 6 Nov 2017, Ryan Joseph wrote: > I actually got the problem wrong and still haven’t figured it out so > here’s another go. > > I have a number which I need to encode as an RGB value each component > being 4 bytes (12 bytes total) so I need to extract each digit as a byte > (and then

Re: [fpc-pascal] -O2 internal compiler errors

2017-11-08 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 8 Nov 2017, Ryan Joseph wrote: > When I turn on -O2 I get a never ending stream of internal error > 2009112601 which I think is from various inlined operator overloads > (didn’t do much testing though). Is this a bug or are they not > compatible? Example code to trigger it please,

Re: [fpc-pascal] System call ABI problem on ppc Linux

2017-12-05 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 5 Dec 2017, tobiasgie...@gmail.com wrote: > I think the only problem is with fpmake, which doesn't include > FPC_ABI_EABI for powerpc 32-bit processors. > > My use case is running my software on a Synology DS-413 NAS, which has a > PowerPC processor. It's only a few years old.

Re: [fpc-pascal] record alignment

2018-06-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 15 Jun 2018, Ryan Joseph wrote: > I have a struct I need to port from C but the size I’m getting in Pascal > is wrong. From C sizeof(AAPLVertex) = 32 but in Pascal > sizeof(AAPLVertex) = 24. > > The alignment of the struct is on 32 bit bounds I think but how do I > replicate this in

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 22 Jun 2018, Joost van der Sluis wrote: > >> I want to do a pivot away from the macro stuff to ask another question. > >> Since I’ve wanted to contribute to the compiler for so long and I > >> finally have a little understanding I’d like to know if there’s anything > >> minor I could

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 6 Jan 2018, Ryan Joseph wrote: > Also why does @(PMyStruct(nil)^.next not crash? Dereferencing and taking > the addressing of a nil pointer sounds like a bad idea. Because it doesn't do the actual dereferencing, because next's *VALUE* is never used, only it's address (due to the @

Re: [fpc-pascal] Translate C code

2018-01-05 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 6 Jan 2018, Darius Blaszyk wrote: > Again I would like to ask some support on a piece C code that I need to > translate to pascal. The code in question is: > > #define MEMNEXT(x) ((MyStruct *)(((char *) x) - ((char *) & (((MyStruct > *)0)->next > > What exactly is going on here?

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 10 Jan 2018, Matias Vara wrote: > I am getting an exception when I enable the -O2 optimization. More > precisaily, the line that stars with write_portd is corrupting the > data section. This is the pascal code:  > > function PciReadDword(const bus, device, func, regnum: UInt32):

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 10 Jan 2018, Matias Vara wrote: > Hi Karol and thanks you very much! I got confused with the function > names, I feel very sorry.As I said in my previous email, I fixed by > rewriting the assembler function. However, I don't why it worked.  By accident. Simply the

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 10 Jan 2018, Matias Vara wrote: > BTW, this only applies to inline assembler functions rigth? In the case > of normal procedures that contains a block asm end; there is no problem, > Am I right? No, it applies to *ALL* assembler code. Also inline blocks. The only difference is, for

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 10 Jan 2018, Matias Vara wrote: > Thank you very much Karol, I completly missed this point during the > development of my kernel (Or maybe I had in mind sometime ago but I > forgot it)It was only when I decided to play with -02 that all these > issues arrised.  BTW, your code (as

Re: [fpc-pascal] Sleep(30) is not reliable?

2018-01-24 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 24 Jan 2018, AlexeyT wrote: > Details: > Ubuntu 17.4 x64; Lazarus 1.9 trunk, fpc 3.0.2. > I see IDE call stack like this  when i pause app (during loop forever) > Can you run strace on your app, to discover what are the nanosleep syscalls entry values and what are the return values?

Re: [fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 2 Feb 2018, Adriaan van Os wrote: > I have to import the math.h libc functions listed here > . What is the > recommended way to do this for general Linux compatibility ? Simply > declare them external ? Load them from libc

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 22 Jun 2018, Ryan Joseph wrote: > I want to do a pivot away from the macro stuff to ask another question. > Since I’ve wanted to contribute to the compiler for so long and I > finally have a little understanding I’d like to know if there’s anything > minor I could do, that isn’t

Re: [fpc-pascal] A new fpc desirable feature

2018-07-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 17 Jul 2018, Giuliano Colla wrote: > As everybody is suggesting new fpc features, I feel it right to add my > own proposal, to make the language more useful and user friendly. > > I propose the support for the keyword "please". > > The syntax is quite simple: "please:", followed by

Re: [fpc-pascal] The unfortunate deprecation of GetTickCount

2018-04-11 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 11 Apr 2018, Michael Van Canneyt wrote: > >> personally I use this 64 bit emulation: > > > > For my purpose I'm perfectly happy with GetTickCount. I'd understand the > > deprecation if GetTickCount64 would be a reliable substitute. It isn't. > > Only on XP. On all other platforms, it

Re: [fpc-pascal] The unfortunate deprecation of GetTickCount

2018-04-11 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 11 Apr 2018, Alexander Grotewohl wrote: > Just to be clear, the 64 in GetTickCount64 has nothing to do with > whether a machine is 32bit or 64bit. The call itself, doesn't. Except, on a 32bit machine, when you have to do 64bit arithmetic/value handling, it's usually less

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Dec 2018, Ryan Joseph wrote: > > (After reading that old thread we had...) > > > > Actually, it can. The only thing you need to do is to allocate a stack > > first, then make the "coroutine" functions use it, which is basically > > boils down to how you pass your arguments and

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 19 Dec 2018, Ryan Joseph wrote: > > On Dec 19, 2018, at 5:23 PM, Sven Barth via fpc-pascal > > wrote: > > > > A library as first step would be more useful. Later on one can think > > about integrating it into the language itself. > > > > How does that work? I’ve been interested in

[fpc-pascal] libmosquitto headers for FPC

2019-03-14 Thread Karoly Balogh (Charlie/SGR)
Hi, Not sure if anyone have done this already, but I converted the libmosquitto (which is a C-written MQTT client library) header (mosquitto.h) to Free Pascal, so it allows using libmosquitto from Pascal code. I work on some IoT projects lately which transfers data over MQTT, and I wanted to

Re: [fpc-pascal] libmosquitto headers for FPC

2019-03-14 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 14 Mar 2019, Marcos Douglas B. Santos wrote: > > So in case anyone needs this: > > > > http://github.com/chainq/mosquitto-p > > Good job. > > I'm thinking use some like that to split a big desktop application > code into few other applications, maintaining a communication among >

Re: [fpc-pascal] Error: Local variables size exceeds supported limit

2019-03-10 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sun, 10 Mar 2019, Jonas Maebe wrote: > It's always possible to add a hint about efficiency in case the size of > the locals grows beyond offsets that can be embedded in a single > instruction, although this hint would trigger already at 32KB of locals > on e.g. PowerPC. I'm all for such

Re: [fpc-pascal] unexpected termination with no errors

2019-05-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 15 May 2019, Sven Barth via fpc-pascal wrote: >> (Sidenote: I've been pondering for a while if I should report this as a >> bug. I think the RTL should put a try-except around there, to show a >> stacktrace on unhandled exceptions, just like the main thread dying >> does, but who

  1   2   >