* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
@marcov nimral wrote:
Front-end is Browser/Javascript/Bootstrap, backend is PHP on IIS or Apache, protocol is JSON. Of course, a working Internet connection is required.
... if JavaScript is not only used to let buttons disappear, there must be a client logic ;-) In a typical JavaScript application, you also follow a traditional MVP/MVP or MVVM approach - you have a controller, the data and a view.
2
Beginners / Re: [SOLVED] Draw vertical line (TBGRAShape)
« Last post by howardpc on Today at 02:15:12 pm »
i need to draw some vertical lines on a form / panel

Does direct drawing on the form/panel's Canvas using Canvas.Line() not work for you?
3
General / Re: Result variable multiple assignments in function
« Last post by FRex on Today at 02:08:45 pm »
By experimental I meant trying out a piece of code to see what happens not if something is stable or not.
4
General / Re: Error while linking (Ubuntu)
« Last post by molly on Today at 01:19:39 pm »
Simpy dumping your issue into the bugtracker without any further information isn't going to help you.

You said that you installed 3.0.4 compiler and lazarus 1.8.0 correctly. You are able to run lazarus 1.8.0 and when you try to compile a project you get a linking error ?

Compile your project with -va and attach the output. I'm betting that lazarus uses the 2.6.0. compiler instead of the 3.0.4 one. That is either a user error or error on behave of the package manager used by your operating system.

Handoko knows this as he experienced this several times and advised others on the subject. Unfortunately i do not use ubuntu nor do i have the desire to install it to only find out that there simply is a wrong setup.

@Handoko, I'm not familiar with the problem or have informed myself extensively. Do you perhaps know if ubuntu uses wrong (FPC) dependency for lazarus somewhere and tries to (automatically) fix that (wrongly)  for end-user ?
5
General / Re: Result variable multiple assignments in function
« Last post by Thaddy on Today at 01:17:17 pm »
I know it works experimentally but my background is in C and C++ so I wanted to ask in case it's platform or options dependent feature like many in C and C++ often are.
My example is not experimental at all but main stream in the FPC/Delphi Pascal world. It indeed saves a local variable and an assignment.
Some - like me - prefer it over a superfluous local. It is also fully cross-platform.
As far as the language dialect goes:
It needs {$mode objfpc} or {$mode Delpi} of {$mode Delphiunicode} It can be enabled in other supported dialects by {$modeswitch result} (Which is implied in the first three)
6
General / Re: Large files are passed over unstable networks
« Last post by avra on Today at 01:15:18 pm »
If your FTP server allows you to continue interrupted file transfer, I do not see a need for some other solution.
7
Quote
Maybe it is possible to create an mobile app für iOS and Android with Lazarus/FPC, but why should the developer want to rewrite the whole client logic from JavaScript in any other language (not only Free Pascal), when he can re-use the same code he has in production already?

where did you read anything about client logic in javascript? Am I really confused.

Quote
But if there is a easy way with Free Pascal / Lazarus, I would be very interested! :-)

From the little I know is that FPC does not offer much of shared GUI between iOS and Android. If you don't leverage  large pascal codebases it might not be the best.   Even if you do, you might work with a Pascal or Pascal-JVM library, and do the GUI on top with other tools.

There are umpteen "easy" tools, but the people making the bigger webapps seem to mostly use the vendor tools (Xcode/Android Studio). The "easy" crossplatform tools are mostly just for one-time users that have to crank out a phone app. At least that is what it seems to me.
8
FPC development / Re: AVX and SSE support question
« Last post by dicepd on Today at 12:57:25 pm »
I am getting around to looking at pipeline  optimisations through reordering of naive working code.

It certainly makes a difference reordering and in going through this process I wanted a measure of worse or better that was a little more certain than a 20m x run time.

I read the intel doc here https://www.intel.co.uk/content/www/uk/en/embedded/training/ia-32-ia-64-benchmark-code-execution-paper.html. But a bit of overkill for comparitive timing.

I condensed this down the the following simple code, which is not 'perfect' but for the task of checking if changes make things better or worse I think it will do.
Code: Pascal  [Select]
  1. // hacky we just take the low 32 bits of the cpu counter
  2. // compiler protects regs no need to repilcate here.
  3. // we are only interested in the min value really
  4. // so a loop of 100 will always get us the min
  5. function ASMTick: int64; assembler;
  6. asm
  7. {$ifdef CPU64}
  8.   XOR rax, rax
  9.   CPUID
  10.   RDTSC  //Get the CPU's time stamp counter.
  11.   mov [Result], RAX
  12. {$else}
  13.   XOR eax, eax
  14.   CPUID
  15.   RDTSC  //Get the CPU's time stamp counter.
  16.   mov [Result], eax
  17. {$endif}
  18. end;  
  19.  

Comments please before I release something as quick and dirty as this.
It gives results such as

Proc Tick AverageNormal4:, 203, 316, 205.40

Which is Min, Max, Average. As we are only really interested in seeing code changes which affect the Min the odd bad number from a wrap wround is of no concern.


9
General / Re: Recompile the RTL to debug
« Last post by molly on Today at 12:54:05 pm »
the problem with placing such things in the wiki is that these kind of scripts tend to be very specific to the setup of the user. For instance it wont work on a linux shell, simply because the script is written to work for windows.

I also see that the script is using trunk and svn, and that isn't necessary as you can download/install the sources separately. Script is also modifying path (which is a no go on certain setups). For cross-compiling the distclean does not always work as expected and afaik requires a 2 time call to make clean between builds, etc. etc.

The script is a good starting point though.  :)

ps: perhaps this thread might be of help as well. It has some additional points to note. Also have a look here.
10
"Progressive Web Apps"?
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus