Re: [Lazarus] Fast drawing to canvas

2012-02-26 Thread Reimar Grabowski
On Fri, 24 Feb 2012 22:22:49 +0100
Marco van de Voort mar...@stack.nl wrote:

 It is sufficient indication that one and the same binary must be able to do
 both. Regardless if that is between vendors or not.
If you have to support a range of cards, you are absolutely right. Choosing 
which technique to use is the problem most of the time. Either an invisible 
mini-benchmark at programm startup (render-to-texture but never show it to the 
user, which gives you at least an idea about the real performance) or some 
heuristic based on OpenGL version/vendor/driver version/card name/star 
alignment,
 
 Of course not. You can test OpenGL version and extensions and conditionally
 execute code accordingly.
That's a given.
I think you misunderstood me. I was talking about different ways of using the 
PBO. All of the three mentioned methods will work if PBOs are supported.

 I do. But for me that is the interesting benchmark. And though I readily
 admit that I only started to scratch the surface of testing the various
 performance aspects, I do present realistic benchmarks of about 2 days
 efforts spent on the issue.
I am doing OpenGL programming for over 10 years (nowadays mostly as a hobby, so 
I am not up to date on the current bleeding edge stuff) and I have seen a lot 
in this time. If you tested your stuff on 2 cards and 2 driver versions that's 
all your results are really valid for. It is not unreasonable to draw some 
conlusions from that but they may be wrong nonetheless (not likely in your 
case, but still possible). That does not mean that you are doing anything wrong 
only that I take even my own tests with a grain of salt. OpenGL can be a b*tch 
and from one driver version to the next (one vendor to the other or an X more 
in the name of the card) performance of a give code path may change 
dramatically (at least that's what I have seen). Perhaps the situation got 
better, but I doubt it.
 
 It depends on your purpose. I'm in computer vision, and I want to show my
 frame as soon as possible.
I thought especially in computer vision you would try to create the frame on 
the GPU perhaps using CUDA or OpenCL. At least there is quite some info about 
computer vision algorithms and GPGPU on the net, but you are the expert.
Just uploading one textue, showing an image and doing not much more on the card 
is not a purpose OpenGL is heavily optimized for.

 If you know a way to fire an event after upload
 is finished, don't hesitate to mention it. As long as I don't have that, I
 have no choice than to block on it.
No events in OpenGL, sorry. Only the driver knows what the driver does. That's 
why I mentioned the NVidia SDK. ATI can give you similar information but I 
currently don't know what they call it.
 
 This is not a game where you just fire all textures on level load, and just
 proceed and block at the end, hoping that every paralellizes as much as
 possible.
Your knowledge about game technology seems to be a little outdated.

 Nvidia's border conditions are typically not my own. And in practice only
 real-life (read: average) performance is usuable. Peak performance under
 idealized circumstances is a mere footnote.
It is an SDK. It gives you information from the card/driver that is not 
accessible in any other way. At least I am thankfull that now I can get at 
least some info and am not working with a black box as it used to be. You as 
developer decide what you use it for and most of the time you use it to 
benchmark your own code so I fail to see what you are talking about.
It is for example used by gDebugger which I can recommend.

R.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why the Java became so strong?

2012-02-26 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:


4 Hours later we had a
working product that did everything we required! Another hour later,
the database was loaded with all our existing bug reports, feature
requests, attachments like images, sound clips etc.

I would love to see somebody else do similar with other languages.


Frankly, I think that sort of thing could be done with any of the 
classic 4GLs- in effect, application-specific BASICs.


Object Pascal differs in two ways: first in that it's got a 
well-thought-out underlying language, which despite continued 
enhancement is still somewhat regular, and second in that it's arguably 
complete enough that it can be used as a system programming language. My 
own experience indicates that as soon as you start using a 4GL or 
similar for anything that the implementors didn't think of you're in 
very deep water.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why the Java became so strong?

2012-02-26 Thread Graeme Geldenhuys
2012/2/26 zeljko :

 I just wrote an article on how to write an Android app, using only the
 Android Java APIs.

 Where's link to that article ?


If it is for the same magazine I write for (freeX), then the next
publish date is 1 March, and articles may only be made public (by the
author) one month after the published date. So that would be two
months from now.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OT: Amazing new development tools

2012-02-26 Thread Max Vlasov
On Sat, Feb 25, 2012 at 10:15 PM, ik ido...@gmail.com wrote:

 Hello,

 I found the following amazing lecture that present a new idea of a
 development tool, that I think will interest you all:


Thanks, Worth watching. It's interesting it's not directly connected to
Lazarus, There are some ways where it is )

For example, the first example with the JavaScript tree was very impressive
until I saw the similarities with components and design-time/run-time
metaphore. Delphi and Lazarus developers lived with this change value  -
see instant reaction way of developing for very long time. And components
are supposed to live such life in contrary to arbitrary code fragments of
imperative languages that may require multiple state changes (for example
opening a particular file) until you actually can see and change anything.
Not mentioning that a property is more natural to understand without prior
knowledge than some strange constant in the middle of code fragment.

Other connection is Larry Tesler. Although it was mentioned basically with
his NOMODES motto, for us he is the guy who developed Apple dialect of
Object Pascal (together with Wirth)

Max
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why the Java became so strong?

2012-02-26 Thread Graeme Geldenhuys
On 26 February 2012 10:31, Mark Morgan Lloyd  wrote:
 used as a system programming language. My own experience indicates that as
 soon as you start using a 4GL or similar for anything that the implementors
 didn't think of you're in very deep water.


I guess in my 5 years of Turbo Pascal and 15 years of Object
Pascal/Delphi, I haven't stepped in deep water yet. Or I was very
lucky, or I simply found alternative programming solutions for all my
deep water problems. :-)


Ultimately though, I still say: Use the right tool for the job.
Object Pascal has just been flexible enough, that it could be my tool
of choice for the last 15+ years.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Max Vlasov
On Sun, Feb 26, 2012 at 10:15 AM, zeljko zel...@holobit.net wrote:

 **

 On Saturday 25 of February 2012 20:20:51 Max Vlasov wrote:

  On Sat, Feb 25, 2012 at 6:48 PM, Max Vlasov max.vla...@gmail.com
 wrote:

   On Sat, Feb 25, 2012 at 5:36 PM, zeljko zel...@holobit.net wrote:

   **

  

   On Saturday 25 of February 2012 14:04:17 Juha Manninen wrote:

2012/2/25 Max Vlasov max.vla...@gmail.com

   

 can't make clean all for trunk version under ubuntu with fpc 2.4.5

  

   Yep, ifdef was for fpc  20405 , now it's  20501 so it should work.

  

   Thanks, can't check right now, but hope it will work

  

   Max

 

  Tried make it from scratch on a machine without fpc and lazarus. Download

  both trunk, but 35594 can't compile with

 

  dbgrids.pas(1991,31) Error: Incompatible types: got Pointer expected

  AnsiString



 That have nothing to do with problem you've mentioned. Probably somebody
 commited code which works on 2.6/2.7 but not on 2.4.5.

 Anyway, I'm suspicious about that since Juha tested builds with 2.4.4 and
 it was ok.




Just yesterday this line didn't produce any search results in Google, today
it leads at least to two bug reports in the tracker )

Don't know whether it would lead to anything, but I exlained by steps :
- Installed stocked binary from Ubuntu (2.4.0)
- Downloaded trunk fpc, compiled it (make clean all install
INSTALL_PREFIX=/usr/local)
- Uninstalled stock fpc
- After fpc complaining about ppc386 did a symlink to /usr/local.. ppc386
- Modified /etc/fpc.cfg, three lines pointing now to /usr/local...
- Tried make clean all in lazarus
- (ERROR) Stopped on the following line about dbgrids.
- Tried to recompile fpc using now the only fpc (trunk)
- Tried to rebuild packages (make clean all .., make install... inside
fpc/packages)
- (ERROR) the same error.

Max
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2012 13:38:43 +0300
Max Vlasov max.vla...@gmail.com wrote:

[...]
 Just yesterday this line didn't produce any search results in Google, today
 it leads at least to two bug reports in the tracker )
 
 Don't know whether it would lead to anything, but I exlained by steps :
 - Installed stocked binary from Ubuntu (2.4.0)
 - Downloaded trunk fpc

The mail subject says 2.4.5.
Just making sure: You mean fpc trunk 2.7.1, right?


 , compiled it (make clean all install
 INSTALL_PREFIX=/usr/local)
 - Uninstalled stock fpc
 - After fpc complaining about ppc386 did a symlink to /usr/local.. ppc386
 - Modified /etc/fpc.cfg, three lines pointing now to /usr/local...
 - Tried make clean all in lazarus
 - (ERROR) Stopped on the following line about dbgrids.
 - Tried to recompile fpc using now the only fpc (trunk)
 - Tried to rebuild packages (make clean all .., make install... inside
 fpc/packages)
 - (ERROR) the same error.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why the Java became so strong?

2012-02-26 Thread Frank Church
On 25 February 2012 22:29, Graeme Geldenhuys graemeg.li...@gmail.comwrote:

 2012/2/25 Frank Church :
  who ask themselves If I am starting a new project, is Pascal the right
 one?
  Of course not!

 snip


 In relation to Eclipse above, The minimum 2Gb or even 4Gb or RAM needed to
  run Eclipse is not much these days.

 I still think that is crazy!!! [I don't care how cheap RAM has become]
 MSEide loaded with a large project, and after heavy use and debug
 sessions, uses a mere 30-60Mb RAM. And no, I don't believe MSEide and
 Eclipse are in the same league - I'm just pointing out the HUGE RAM
 usage difference (bloat in Eclipse)! But then, we all know that even a
 Java hello world app is memory hungry.

 If you really want to compare Java vs Java, then compare Eclipse to
 IntelliJ IDEA. The latter uses a fraction of the memory that Eclipse
 requires - and it is much faster too.

  With Pascal I have to repeatedly
  compile to track them down.


This is not so much a criticism of the language, but the facilities within
the available IDEs. Lazarus community has no where near the resources of
the Eclipse community et al, I understand that.

Another point is that Intellisense helps you to understand how everything
hangs together, especially when you are not familiar with the domain.It
gives you a birds-eye view even before you have to compile anything.

Often it is also because most Pascal compilers are so damn fast! You
 don't need to waist development time to make the IDE guess any syntax
 errors while you type. Simply let the compiler tell you - because it
 can compile a project is seconds. Delphi is a case in point.


  How about the reluctance to put documentation in library code?

 Have you ever seen Object Pascal code that is well documented, and
 that uses inline documentation (docs inside the source code units)???
 The documentation obfuscates the code so much, it is damn hard to read
 the actual code. We had this problem with tiOPF, and since moved to
 fpdoc style documentation.



 NOTE:
 When I say documentation, I don't mean a one liner summary, I mean
 clear documentation with at least 3+ paragraphs minimum for every
 procedure, function or identifier. Such long text do not belong mixed
 up inside Object Pascal source code!


When I said 'documentation' I didn't mean the whole nine yards, but
something on the input and output parameters, a short summary of what it
does and how it lnks to others, nota benes or gotchas. Something enough to
understand the code, enough to understand the program state when applied,
for programming by contract etc.This could be used as stub for what goes
into the main fpdoc file.

Apart from input and output parameters less than 5 lines would be enough,
unless there are some additional points to be noted.

 Most of the time when you are programming you just want to know that the
inputs and outputs are correct, you don't need to understand the code
itself or be an expert in that domain. Lazarus and FPCs approach to
documentation cannot be described as support this. Not only that the editor
can fold them out of view and display them when you want them.

You didn't think I was referring to something on the order of the Delphi
docs did you :)

--
 Regards,
  - Graeme -


 ___
 fpGUI - a cross-platform Free Pascal GUI toolkit
 http://fpgui.sourceforge.net

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Frank Church

===
http://devblog.brahmancreations.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why the Java became so strong?

2012-02-26 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:

On 26 February 2012 10:31, Mark Morgan Lloyd  wrote: used as a system programming 
language. My own experience indicates that as soon as you start using a 4GL or 
similar for anything that the implementors didn't think of you're in very deep water.

I guess in my 5 years of Turbo Pascal and 15 years of ObjectPascal/Delphi, I haven't 
stepped in deep water yet. Or I was verylucky, or I simply found alternative programming 
solutions for all mydeep water problems. :-)


Wrong end of stick, Graeme. I meant that the traditional BASICs and 4GLs 
got hairy very fast as soon as you attempted to do anything out of the 
ordinary, I hoped that my


 Object Pascal differs [...] it's arguably complete enough that it can
 be used as a system programming language

was sufficiently unambiguous.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
Hello,

I'm trying to debug a program that I'm writing with Lazarus, and it
require root privileges, but I do not want Lazarus to run as root,
only the program itself for debug.

How can I do that ?

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread zeljko
On Sunday 26 of February 2012 13:49:08 Martin wrote:
 On 26/02/2012 12:38, ik wrote:
  Hello,
  
  I'm trying to debug a program that I'm writing with Lazarus, and it
  require root privileges, but I do not want Lazarus to run as root,
  only the program itself for debug.
  
  How can I do that ?
 
 I have not tried it, but maybe if you replace /usr/bin/gdb (in the IDE
 opions dialog) with sudo /usr/bin/gdb ?
 
 Of course that affects all projects.

Yes, but sudo can ask for password ,so he'll be stucked there I think.

zeljko
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
On Sun, Feb 26, 2012 at 15:05, zeljko zel...@holobit.net wrote:
 On Sunday 26 of February 2012 13:49:08 Martin wrote:

 On 26/02/2012 12:38, ik wrote:

  Hello,

 

  I'm trying to debug a program that I'm writing with Lazarus, and it

  require root privileges, but I do not want Lazarus to run as root,

  only the program itself for debug.

 

  How can I do that ?



 I have not tried it, but maybe if you replace /usr/bin/gdb (in the IDE

 opions dialog) with sudo /usr/bin/gdb ?



 Of course that affects all projects.


 Yes, but sudo can ask for password ,so he'll be stucked there I think.

Treid to use kdesu but got the following:

The debugger /usr/bin/kdesu /usr/bin/gdb
does not exist or is not executable.

See Tools - Options - Debugger options



 zeljko


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android Target GUI

2012-02-26 Thread Marc Santhoff
Am Freitag, den 17.02.2012, 10:23 +0100 schrieb Felipe Monteiro de
Carvalho:
 On Fri, Feb 17, 2012 at 9:11 AM,  michael.vancann...@wisa.be wrote:
  Android uses XML files to specify the layout. This is the recommended way by
  Google. You can build the GUI in code as well, but then you're pretty much
  in uncharted territory.
 
 It is pretty trivial to build the UI without XML. I never used the XML
 part while programming for Android. For example (in pseudo-code):
 
 procedure TMyActivity.OnCreate;
 var
   layout: TAbsoluteLayout;
   params: TAbsoluteLayout_LayoutParams;
   tv: TTextView;
   et: TTextView;
   btn: TButton;
   ClickCount: Integer = 0;
 begin
   // Prepares the UI of the program
   layout := TAbsoluteLayout.Create;
 
   tv := TTextView.Create;

[...]

   params.Free;
 
   btn := TButton.Create;
   btn.setText('Go!');
   btn.setOnClickListener(@buttonClickCallback);
   params := TAbsoluteLayout_LayoutParams.Create(320, 50, 0, 60);
   layout.addView(btn, params);
   params.Free;
 
   Activity.setContentView(layout);
 end;

Very similar to what Java IDEs generate for form building code. ;)

Beautiful, very easy to handle and reagularly looking code. Besides
having to self draw any component that's nice. But by code reuse the
drawing issue will be solved very soon once started, I assume.

Thank you!
Marc

-- 
Marc Santhoff m.santh...@web.de


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread Mark Morgan Lloyd

Martin wrote:

On 26/02/2012 12:38, ik wrote:

Hello,

I'm trying to debug a program that I'm writing with Lazarus, and it
require root privileges, but I do not want Lazarus to run as root,
only the program itself for debug.

How can I do that ?



I have not tried it, but maybe if you replace /usr/bin/gdb (in the IDE 
opions dialog) with sudo /usr/bin/gdb ?


Of course that affects all projects.

But afaik you can't use a starter app , because then gdb will attempt to 
debug the starter app


I've had this sort of requirement in the past, specifically when using 
libusb (i.e. the program needed sufficient privilege to grab the device).


I wonder whether setting either Lazarus or gdb setuid root would help?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Marco van de Voort
On Sun, Feb 26, 2012 at 08:15:13AM +0100, zeljko wrote:
 On Saturday 25 of February 2012 20:20:51 Max Vlasov wrote:
  Tried make it from scratch on a machine without fpc and lazarus. Download
  both trunk, but 35594 can't compile with
  
  dbgrids.pas(1991,31) Error: Incompatible types: got Pointer expected
  AnsiString
 
 That have nothing to do with problem you've mentioned. Probably somebody 
 commited code which works on 2.6/2.7 but not on 2.4.5.

No. 2.7.x changed tbookmark from binary-data-encoded-in-an-ansistring to an
abstract type for compat of D2006+. The idea is to merge this back to 2.6.1
too. (so fix with fullversion20600)

I only noticed the lazarus breakage later, and wanted to wait what the laz
devels thought of it. If needed I can revert it for a while, so they can
work and test first.

I found no way to fix it under the hood.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
On Sun, Feb 26, 2012 at 15:29, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 Martin wrote:

 On 26/02/2012 12:38, ik wrote:

 Hello,

 I'm trying to debug a program that I'm writing with Lazarus, and it
 require root privileges, but I do not want Lazarus to run as root,
 only the program itself for debug.

 How can I do that ?


 I have not tried it, but maybe if you replace /usr/bin/gdb (in the IDE
 opions dialog) with sudo /usr/bin/gdb ?

 Of course that affects all projects.

 But afaik you can't use a starter app , because then gdb will attempt to
 debug the starter app


 I've had this sort of requirement in the past, specifically when using
 libusb (i.e. the program needed sufficient privilege to grab the device).

 I wonder whether setting either Lazarus or gdb setuid root would help?

That's scars me a lot. Because it means that every program that is
using gdb can raise it's privileges to root.
I think that a better way, will be to set per project if the program
should have different privileges for running inside Lazarus, and if
so, then to use tools such as kdesu for example.


 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread zeljko
On Sunday 26 of February 2012 14:41:13 Marco van de Voort wrote:
 On Sun, Feb 26, 2012 at 08:15:13AM +0100, zeljko wrote:
  On Saturday 25 of February 2012 20:20:51 Max Vlasov wrote:
   Tried make it from scratch on a machine without fpc and lazarus.
   Download both trunk, but 35594 can't compile with
   
   dbgrids.pas(1991,31) Error: Incompatible types: got Pointer expected
   AnsiString
  
  That have nothing to do with problem you've mentioned. Probably somebody
  commited code which works on 2.6/2.7 but not on 2.4.5.
 
 No. 2.7.x changed tbookmark from binary-data-encoded-in-an-ansistring to an
 abstract type for compat of D2006+. The idea is to merge this back to 2.6.1
 too. (so fix with fullversion20600)
 
 I only noticed the lazarus breakage later, and wanted to wait what the laz
 devels thought of it. If needed I can revert it for a while, so they can
 work and test first.
 
 I found no way to fix it under the hood.

Yes, but original post is about 2.4.5 NOT about 2.7.1,
also somebody opened issue at lazarus mantis about it.

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread zeljko
On Sunday 26 of February 2012 14:56:19 ik wrote:

 That's scars me a lot. Because it means that every program that is
 using gdb can raise it's privileges to root.
 I think that a better way, will be to set per project if the program
 should have different privileges for running inside Lazarus, and if
 so, then to use tools such as kdesu for example.

workaround is to use gdb from console :)

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Martin Schreiber
On Sunday, 26. February 2012 14.41:13 Marco van de Voort wrote:
 On Sun, Feb 26, 2012 at 08:15:13AM +0100, zeljko wrote:
  On Saturday 25 of February 2012 20:20:51 Max Vlasov wrote:
   Tried make it from scratch on a machine without fpc and lazarus.
   Download both trunk, but 35594 can't compile with
  
   dbgrids.pas(1991,31) Error: Incompatible types: got Pointer expected
   AnsiString
 
  That have nothing to do with problem you've mentioned. Probably somebody
  commited code which works on 2.6/2.7 but not on 2.4.5.

 No. 2.7.x changed tbookmark from binary-data-encoded-in-an-ansistring to an
 abstract type for compat of D2006+. The idea is to merge this back to 2.6.1
 too. (so fix with fullversion20600)

How does the memory release work? With tbookmarkstr it was done automatically 
by the compiler.

Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android Target GUI

2012-02-26 Thread Sven Barth

On 26.02.2012 14:34, Marc Santhoff wrote:

It's probably easier to see it work in code than explain in words :-)

I just wrote an app in this way. It has about 160 lines of code (including
declaration) for a 2-form program that talks to a database to show some
stuff on screen.


Wetting my appetite here, is that program already in some repo or
publicly visible? ;)
Or what magazine or book do I need to buy?


Look for the XFree. The current issue has Felipe's native method as an 
article and maybe the next(?) one will have Michael's article.


The issue before that contained an article about the JVM port of FPC 
(without Android). I don't have the last issue though only the current 
one, so I can't comment on that article. :(


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android Target GUI

2012-02-26 Thread Sven Barth

On 26.02.2012 15:57, Sven Barth wrote:

On 26.02.2012 14:34, Marc Santhoff wrote:

It's probably easier to see it work in code than explain in words :-)

I just wrote an app in this way. It has about 160 lines of code
(including
declaration) for a 2-form program that talks to a database to show some
stuff on screen.


Wetting my appetite here, is that program already in some repo or
publicly visible? ;)
Or what magazine or book do I need to buy?


Look for the XFree. The current issue has Felipe's native method as an
article and maybe the next(?) one will have Michael's article.

The issue before that contained an article about the JVM port of FPC
(without Android). I don't have the last issue though only the current
one, so I can't comment on that article. :(


Small correction: freeX not XFree ;)

Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Tools/Run Parameters storage in .lps/session file instead of lpi?

2012-02-26 Thread Reinier Olislagers
Hi list,

Developing fpcup together using a mercurial repo with Ludo Brands, which
is always a pleasure.

Less of a pleasure is that we frequently have conflicts in fpcup.lpi

One of the changes that we saw in the commits:
-CommandLineParams Value=--verbose/
+CommandLineParams Value=--verbose --help/

which got me wonder.

Wouldn't it make more sense to store the Tools/Run Parameters in the
.lps/session file instead of the lpi file?
Each developer may have their own aspect of the application they're
testing and can therefore have different needs.

Would writing a patch be worthwhile? A quick search on mantis on run
parameters gave no results...

Regards,
Reinier

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Max Vlasov
On Sun, Feb 26, 2012 at 6:14 PM, zeljko zel...@holobit.net wrote:

 **

 Yes, but original post is about 2.4.5 NOT about 2.7.1,

 also somebody opened issue at lazarus mantis about it.


 zeljko




Sorry about the confusion, my initial plan was testing the fix by zeljko
about lazarus behaviar under linux. First I tried this on a machine with
fpc 2.4.5. When this was fixed I had no chance to do this on the same
machine and tried to install fpc/lazarus on a computer without both so
ended up trying installing trunk/trunk that wasn't possible because of this
error.

Max
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tools/Run Parameters storage in .lps/session file instead of lpi?

2012-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2012 16:17:48 +0100
Reinier Olislagers reinierolislag...@gmail.com wrote:

 Hi list,
 
 Developing fpcup together using a mercurial repo with Ludo Brands, which
 is always a pleasure.
 
 Less of a pleasure is that we frequently have conflicts in fpcup.lpi
 
 One of the changes that we saw in the commits:
 -CommandLineParams Value=--verbose/
 +CommandLineParams Value=--verbose --help/
 
 which got me wonder.
 
 Wouldn't it make more sense to store the Tools/Run Parameters in the
 .lps/session file instead of the lpi file?
 Each developer may have their own aspect of the application they're
 testing and can therefore have different needs.

True.

 
 Would writing a patch be worthwhile? A quick search on mantis on run
 parameters gave no results...

Yes. 
Keep in mind:
- Many developers use both the released IDE and the trunk IDE. So
  if possible try to keep backward compatibility. Simply moving a value
  from lpi to lps breaks this.
- Often it is needed to have various sets of run/debug parameters.
  Often these are not the same as build modes, so they should be a
  separate set. Maybe they can be called run modes. 
- All settings in the run parameters dialog should go into that.
- the build modes solves the backward issue, by saving the first build
  mode always at the old place of the lpi. For every other build
  mode the user can choose where to store it - the lpi or lps.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tools/Run Parameters storage in .lps/session file instead of lpi?

2012-02-26 Thread Martin

On 26/02/2012 15:56, Mattias Gaertner wrote:

On Sun, 26 Feb 2012 16:17:48 +0100
Reinier Olislagersreinierolislag...@gmail.com  wrote:


Hi list,

Developing fpcup together using a mercurial repo with Ludo Brands, which
is always a pleasure.

Less of a pleasure is that we frequently have conflicts in fpcup.lpi

One of the changes that we saw in the commits:
-CommandLineParams Value=--verbose/
+CommandLineParams Value=--verbose --help/

which got me wonder.

Wouldn't it make more sense to store the Tools/Run Parameters in the
.lps/session file instead of the lpi file?
Each developer may have their own aspect of the application they're
testing and can therefore have different needs.

True.



Would writing a patch be worthwhile? A quick search on mantis on run
parameters gave no results...

Yes.
Keep in mind:
- Many developers use both the released IDE and the trunk IDE. So
   if possible try to keep backward compatibility. Simply moving a value
   from lpi to lps breaks this.
- Often it is needed to have various sets of run/debug parameters.
   Often these are not the same as build modes, so they should be a
   separate set. Maybe they can be called run modes.
- All settings in the run parameters dialog should go into that.

+1

I really often need to toggle the Host Application, and that does not 
even have a dropdown




- the build modes solves the backward issue, by saving the first build
   mode always at the old place of the lpi. For every other build
   mode the user can choose where to store it - the lpi or lps.


+1



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tools/Run Parameters storage in .lps/session file instead of lpi?

2012-02-26 Thread Reinier Olislagers
On 26-2-2012 16:56, Mattias Gaertner wrote:
 On Sun, 26 Feb 2012 16:17:48 +0100
 Reinier Olislagers reinierolislag...@gmail.com wrote:
 Wouldn't it make more sense to store the Tools/Run Parameters in the
 .lps/session file instead of the lpi file?
 Each developer may have their own aspect of the application they're
 testing and can therefore have different needs.
 
 True.

 Would writing a patch be worthwhile? A quick search on mantis on run
 parameters gave no results...
 
 Yes. 
 Keep in mind:
 - Many developers use both the released IDE and the trunk IDE. So
   if possible try to keep backward compatibility. Simply moving a value
   from lpi to lps breaks this.

 - Often it is needed to have various sets of run/debug parameters.
   Often these are not the same as build modes, so they should be a
   separate set. Maybe they can be called run modes. 

 - All settings in the run parameters dialog should go into that.
 - the build modes solves the backward issue, by saving the first build
   mode always at the old place of the lpi. For every other build
   mode the user can choose where to store it - the lpi or lps.


Thanks, Mattias... seems there's quite some things to take into
account... I'll open an issue for it at least..

Regards,
Reinier


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Tools broken (Win32)

2012-02-26 Thread Hans-Peter Diettrich
Currently the Code Explorer doesn't show anything for controls.pp. 
Navigation in this unit also is impossible, due to an parser error:


D:\git2\lazarus\lcl\controls.pp(28,20) Error: interface expected, but 
end of file found


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tools broken (Win32)

2012-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2012 18:43:05 +0100
Hans-Peter Diettrich drdiettri...@aol.com wrote:

 Currently the Code Explorer doesn't show anything for controls.pp. 
 Navigation in this unit also is impossible, due to an parser error:
 
 D:\git2\lazarus\lcl\controls.pp(28,20) Error: interface expected, but 
 end of file found

Can you reproduce it after restarting the IDE?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Marco van de Voort
On Sun, Feb 26, 2012 at 03:22:32PM +0100, Martin Schreiber wrote:
  No. 2.7.x changed tbookmark from binary-data-encoded-in-an-ansistring to an
  abstract type for compat of D2006+. The idea is to merge this back to 2.6.1
  too. (so fix with fullversion20600)
 
 How does the memory release work? With tbookmarkstr it was done automatically 
 by the compiler.

TDataset.freerecord. That Delphi compatible though in current delphi's that
is probably empty, since tbookmark is tbytes there.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] fcl-stl / thashset question

2012-02-26 Thread John Repucci
I'm attempting to use thashset from the fcl-stl unit.

It appears that fcl-stl is not compiled with the fpc that comes with
Lazarus-0.9.31-35589-fpc-2.6.1-20120225-win32.

While fcl-stl is in the source, it is not found in the units directory
tree.  (this is also true of fpc-2.7.1.i386-win32 that I downloaded
yesterday).

Any suggestions how I might get a version of fpc that includes fcl-stl?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tools broken (Win32)

2012-02-26 Thread Hans-Peter Diettrich

Mattias Gaertner schrieb:

On Sun, 26 Feb 2012 18:43:05 +0100
Hans-Peter Diettrich drdiettri...@aol.com wrote:

Currently the Code Explorer doesn't show anything for controls.pp. 
Navigation in this unit also is impossible, due to an parser error:


D:\git2\lazarus\lcl\controls.pp(28,20) Error: interface expected, but 
end of file found


Can you reproduce it after restarting the IDE?


Only a rebuild of the IDE solved this problem, using FPC trunk. It may 
be an FPC version problem, specific to 2.6 or older?


I suspect a problem in the handling of $I or in the specific content of 
{$I lcl_defines.inc}. The same problem occured with forms.pp, on the 
same include, while (some) other units were not affected.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] fcl-stl / thashset question

2012-02-26 Thread Hans-Peter Diettrich

John Repucci schrieb:

I'm attempting to use thashset from the fcl-stl unit.

It appears that fcl-stl is not compiled with the fpc that comes with 
Lazarus-0.9.31-35589-fpc-2.6.1-20120225-win32. 

While fcl-stl is in the source, it is not found in the units directory 
tree.  (this is also true of fpc-2.7.1.i386-win32 that I downloaded 
yesterday).


I have ghashset.ppu and .o in fcl-stl/units/i386-win32.


Any suggestions how I might get a version of fpc that includes fcl-stl?


IMO it's a Lazarus only problem. The Lazarus *fcl package* includes only 
*very* few fcl units. Try to add the required unit(s) directly to your 
project, and accept adding the recommended unit search path. You 
probably can remove the unit reference afterwards, when the added path 
is sufficient (untested). A proper solution should add all FCL units to 
the Lazarus fcl package, though.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu

2012-02-26 Thread Martin Schreiber
On Sunday, 26. February 2012 19.38:39 Marco van de Voort wrote:
 
  How does the memory release work? With tbookmarkstr it was done
  automatically by the compiler.

 TDataset.freerecord. That Delphi compatible though in current delphi's that
 is probably empty, since tbookmark is tbytes there.

There is no TDataset.freerecord() procedure in FPC trunk  AFAIK.

Please add TDataset.BookmarkStr property:

public
property BookmarkStr: TBookmarkStr read GetBookmarkStr write 
SetBookmarkStr;

so in user code we can have a bookmark type with automatic memory management.

Thanks, Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why the Java became so strong?

2012-02-26 Thread Felipe Monteiro de Carvalho
On Sun, Feb 26, 2012 at 2:17 PM, Marc Santhoff m.santh...@web.de wrote:
 And something more:
 I can hardly close my mouth reading that lazarus and fpc are generating
 java byte code and are having an android widget set. I'll try using that
 as soon as possible.

=) Just one small correction: The Lazarus Android widgetset is
unrelated to the Free Pascal Java support. Android supports Native
code too.

I also expanded the LCL to support various nice features from Android
and other smartphones: Accelerometer, SMS sending, reading the phone
model, GPS positioning. And more to come.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus