Re: [fpc-pascal] CopyFile for FreePascal without Lazarus?
> but that seems to only work with Lazarus. The unit is part of LazUtils package. It has no dependency on other packages but indeed can't be used as a standalone unit, you need other units from the same package but that's all. -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] CopyFile for FreePascal without Lazarus?
Is there a copyfile for Freepascal I can use without installing Lazarus? I found: http://wiki.freepascal.org/CopyFile but that seems to only work with Lazarus. I just want to make a copy of a file into a different directory and maintain it's timestamps etc Any suggestions? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPCJVM Android and libbass.so calling issue
Thank you very much for yours professional advices. So really, if I want to call native .so libraryes, I have to use Lamw or Pandroid. Lamw uses JNI interface perfectly. And t is only sad for Me, that it is not easily possible to create stdcontrols.pas unit, which would be compatible with this project so I could create some simple GUI with no need to specify object position numbers. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPCJVM Android and libbass.so calling issue
On 17/04/2019 20:11, Mgr. Janusz Chmiel wrote: I have decided to join my second question to this thread, because it is also related to problem with libbass.so PPCJVM have problem to compile The following line of code from bass.pas Delphi unit and also from newest bass.pas which is The part of bass zip archive for Windows. STREAMPROC_PUSH = Pointer(-1); // push stream Is it possible to construct this short code so it will have The same purpose and will be compatible with JVMAndroid compilation mode? Calling native code from Java needs to happen through JNI (Java Native Interface). I have no experience with it, but it will never be possible to just take an existing Pascal interface to a library and compile that for the JVM target. Even if it would compile, the result could never work. Additionally, JLSystem.loadLibrary expects the library name without the '.so' extension. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPCJVM Android and libbass.so calling issue
I have decided to join my second question to this thread, because it is also related to problem with libbass.so PPCJVM have problem to compile The following line of code from bass.pas Delphi unit and also from newest bass.pas which is The part of bass zip archive for Windows. STREAMPROC_PUSH = Pointer(-1); // push stream Is it possible to construct this short code so it will have The same purpose and will be compatible with JVMAndroid compilation mode? And I Am very sorry, that I AM sending so much messages, but yours community is so friendly and debates which are here are taking here are correct and kind. I do not have somebody near Me, who would have deep Free Pascal knowledge. So thank you very much for yours patience with Me. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] FPCJVM Android and libbass.so calling issue
Dear specialists, Please does somebody of you know, why is it impossible to call libbass.so in JVM Android mode if external command is being used for this task? Because I Am getting run-time error: error Failed resolution of libbass.so OK I have analysed bass.pas unit and I have found that The following command is being used to call functions and procedures from this .so library. Here is AN example from bass.pas function BASS_SetConfig(option, value: DWORD): BOOL; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; external bassdll; So do I have to replace external command by The command JLSystem.loadLibrary('libbass.so'); But when I have done this, compiler have informed Me about other errors and compilation aborted with fatal warning. bass.pas(725,101) Warning: Calling convention directive ignored: "StdCall" bass.pas(733,102) Warning: Calling convention directive ignored: "StdCall" bass.pas(745,126) Warning: Calling convention directive ignored: "StdCall" bass.pas(757,121) Warning: Calling convention directive ignored: "StdCall" bass.pas(780,79) Warning: Calling convention directive ignored: "StdCall" Fatal: Compilation aborted Bass.pas unit which I try to use in JVM mode and Android emeulation is here. https://github.com/r1me/LAMWBassStreamPlayback/blob/master/jni/bass.pas It is really interesting developers adventure. Because originally The unit have been created for FPC ARMHF or other similar target and cthreads unit is being used by The app, which calls bass.pas unit. So The question is, if I have chance to call libbass.so in JVM mode or if I can only dream about it? Thank you very much for yours help. Libbass.so have been developed by using SSL to play live streams so it do not allocate too much of RAM, it can play live streams 24 hours A day without crashes and author deeply know C language and he is constantly hardly work on this library. So its quality is better and better. It is even possible to use this library for making sound games for visually impaired, because it can load many short sounds without delay and distortion. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions
On 16/04/2019 21:18, Tomas Hajny wrote: > whatever that would be called. Please, stop it (everybody). Sorry, I read messages in the order my email client sorted them. Only saw your message after I posted my reply. I'll not take part in futher off-topic discussions. Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions
On 16/04/2019 19:49, Rainer Stratmann wrote: >> Anyone who seriously develops software, specially desktop applications, >> is/should be using at least two (better 3 monitors). > > That is completely new for me that the amount of monitors is an indication of > how professional someone can write good software. True, there probably is no direct correlation between multiple monitors and professional developers. But G*D damn, having multiple monitors are super useful when it comes to desktop management. I started off with 2 monitors and 3 virtual desktops (same apps always on same virtual desktops), and for the last 5 years have been working on three monitors (hardly ever use virtual desktops these days). 2 monitors were already a massive upgrade and 3 seems to be the sweet spot for me (desk space and peripheral vision). My setup: 21" vertical on the left (1080x1920) 27" landscape in the middle (2560x1440) 21" vertical on the right (1080x1920) All aligned on the top edge of the monitors. e-mail client, web browser, console windows, help files (eg: pdfs, chm or inf) are normally on the outer monitors, and development tools are always in the middle. I absolutely love this setup! Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] problems while compiling androidr14.inc
On 17/04/2019 17:05, Mgr. Janusz Chmiel wrote: Please do you think, that this Free Pascal compiler error indicates, that some part of androidR14.inc unit have been compiled incorrectly? C:\javavcl-code-1007\fpc\units\jvm-android\rtl\androidr14.inc(2750,15) Hint: (3274) Inherited methods can only be overridden in Objective-C and Java, add "override" (inherited method defined in JLObject). Or it is OK and resulting classes will be correct and code will run? It is fine. These are only declarations for external classes. The tool that generates the declarations for the external classes cannot determine whether a method is new or inherited from a parent class, so it always adds "virtual" instead of "override" in case it's an overriding method. That is where the hint comes from. The actual classes are implemented in Java/Dalvik and part of the Android class libraries, and are correct. If you would do the same with a class implemented in Pascal, then the compiler would print an error instead of a hint, because then the compiled code would not work as expected. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] problems while compiling androidr14.inc
Please do you think, that this Free Pascal compiler error indicates, that some part of androidR14.inc unit have been compiled incorrectly? C:\javavcl-code-1007\fpc\units\jvm-android\rtl\androidr14.inc(2750,15) Hint: (3274) Inherited methods can only be overridden in Objective-C and Java, add "override" (inherited method defined in JLObject). Or it is OK and resulting classes will be correct and code will run? Thank you very much for yours explanation. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Really Strange Speed Problems - FPC & Neural Networks
Thank you for your help Jonas. It was a good guess. Unfortunately, adding "spectre_v2=off nopti pti=off" didn't help. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Really Strange Speed Problems - FPC & Neural Networks
On 17/04/2019 10:01, Joao Schuler wrote: # My CPU reports: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf You can try disabling spectre protections in your Linux installs: https://access.redhat.com/articles/3311301 Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Really Strange Speed Problems - FPC & Neural Networks
Am 17.04.2019 um 10:01 schrieb Joao Schuler: Hello, It's better not to reply to an existing mail with a completely new topic, cause now your mail is burrowed deep in the "Lazarus Release 2.0.2" thread. Better write directly to the list without replying. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Really Strange Speed Problems - FPC & Neural Networks
Hello, For the past 10 days, I've seen really strange speed problems at my end. In 2 Ubuntu virtualbox VMs (16.04 and 18.04), my neural networks are running at half speed than usual. The host is a WIN 10 computer. Neural networks are both CPU and memory bound. Therefore, there is something affecting either CPU or memory. Testing on Google Cloud, the speed is normal. This made me think that the speed problem was local to the testing environment. Just for peace of mind, I sent a string concatenation algorithm implemented in FPC to a friend to measure speed. To my shock, the same speed problem I was experiencing at my end is also happening at his end. This makes me believe that my problem isn't isolated. Trying to find why things are slower at my end, I reverted my code to the code I had 4 months ago and also reverted the compiler to the same version I was using before (Stable 3.0.4). There was no luck. Therefore, something really strange is going on: - It's not a compilation problem. I moved binaries from an environment that doesn't have the speed problem to an environment that has the speed problem and I can verify the problem even with a binary built from a good machine. - So far, it affects Ubuntu 16.04 and 18.04 (I haven't tested in other distros). WIN10 is good. - A binary that works well on Google Cloud is slow with my own virtualbox VMs 16.04 and 18.04. - It also affects at least 1 notebook with Ubuntu 16.04 installed as host OS. - My CPU reports: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf - String concatenation is also affected making me to suspect about something wrong at malloc/libc. - Numerical results from neural networks are correct. So far, it's a speed problem. My question to you is: if anyone from you suspects that something might be wrong at OS level affecting either your CPU speed or malloc/libc/memory at your end that might be related to what I'm seeing here, please share. I have algorithms running at my end from a quarter to half of the original speed. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions
On Dienstag, 16. April 2019 22:36:07 CEST Mattias Gaertner via fpc-pascal wrote: > On Tue, 16 Apr 2019 21:13:52 +0200 > > Rainer Stratmann wrote: > > On Dienstag, 16. April 2019 21:02:50 CEST Rainer Stratmann wrote: > > > But how can I install/activate it. > > > > I found an instruction, but I got an error: > > > > lazarus.pp(1,1) Fatal: Kann anchordockingdsgn nicht finden verwendet > > von Lazarus. Check if package AnchorDockingDsgn creates > > anchordockingdsgn.ppu, check nothing deletes this file and check that > > no two packages have access to the unit source.. > > What did you do? > > Packages / Install Packages > Select anchordockingdsgn on the right side and click "Install > selection". > Then "Save and rebuild IDE". Yes. I sent you an email to nc-gaert...@netcologne.de Did you receive the email? > Mattias > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal