Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Henry Vermaak
On Fri, Apr 01, 2016 at 09:12:10AM +, Mark Morgan Lloyd wrote:
> Henry Vermaak wrote:
> >On Fri, Apr 01, 2016 at 12:39:15AM -0400, Anthony Walter wrote:
> >>My question is can someone look into this issue so that building Lazarus in
> >>environments where free memory is than 700MB does not result in Lazarus
> >>build failures?
> >
> >I've come across ld running out of memory when linking the lazarus
> >executable on my (very) old ARM laptop.  You can try to pass
> >--no-keep-memory and --reduce-memory-overheads to ld, at the cost of
> >performance.  I can't see how the build system has anything to do with
> >it.
> 
> It's always worked fine for me on things like NSLU-2 provided that the
> overall memory (i.e. RAM + swap) is at least 512Mb. It will be unfortunate
> if recent builds of FPC and/or Lazarus have pushed this requirement upwards,
> but so far I've not seen any problems on a Raspberry Pi (both 1 and 2)
> running Raspbian or Debian.

Yes, I remember that the slug needed swap.  Swap is painfully slow,
though, so I'd recommend reducing ld's memory usage instead.  I wonder
if anyone has tried the gold linker.  It was supposed to be faster, I
don't know about memory usage.

Henry

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Henry Vermaak
On Fri, Apr 01, 2016 at 12:39:15AM -0400, Anthony Walter wrote:
> My question is can someone look into this issue so that building Lazarus in
> environments where free memory is than 700MB does not result in Lazarus
> build failures?

I've come across ld running out of memory when linking the lazarus
executable on my (very) old ARM laptop.  You can try to pass
--no-keep-memory and --reduce-memory-overheads to ld, at the cost of
performance.  I can't see how the build system has anything to do with
it.

Henry

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


Re: [Lazarus] Raspberry Pi 3 Now Available

2016-02-29 Thread Henry Vermaak
On Mon, Feb 29, 2016 at 12:53:28PM -0300, Leonardo M. Ramé wrote:
> Does anyone know if this version includes a Gigabit nic? or allows USB
> 3 (to let ethernet-usb conversion) ?. I've read version 2 had slow
> network transfer because of only allowing USB2.

Specs here says no gigabit and no USB3:

http://uk.rs-online.com/web/p/processor-microcontroller-development-kits/8968660/

Henry

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


Re: [Lazarus] How to set defines for a project? Lazarus crashes...

2016-02-09 Thread Henry Vermaak
On Tue, Feb 09, 2016 at 10:10:05AM +0100, Bo Berglund wrote:
> 'man kill' indicates that I need a  value but 'man pid' returns
> nothing.

`killall` takes the name of the process, and tab completion works on
most systems I've tried.

Henry

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


Re: [Lazarus] Safe temp file name

2015-11-25 Thread Henry Vermaak
On Wed, Nov 25, 2015 at 05:51:41AM -0800, Aradeonas wrote:
> Hi,
> 
> I used GetTempFileName in a multi thread system and it causes problems
> as you guess already. So the best way in my mind is using GUID and maybe
> use it in a loop for checking not existing for extra safety. But I want
> to know is there any clean implementation already that I dont know of?

It's pointless to check whether the file exists, since there's a race
between checking whether the file exists and creating/using it.

You need something that creates the file atomically only if it doesn't
exist.  For posix use open(2) with O_CREAT | O_EXCL.  For Windows use
CreateFile() with CREATE_NEW.  When this fails, try again with another
file name.

Henry

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


Re: [Lazarus] Fast file reading using file cache

2015-11-20 Thread Henry Vermaak
On Fri, Nov 20, 2015 at 09:56:19AM +0100, Michael Schnell wrote:
> On 11/19/2015 05:05 PM, Graeme Geldenhuys wrote:
> >Indeed, it is terrible. ;-)
> No problem here. (with Thunderbird) The mails are decently threaded.

This is not about threading but about context, as Michael vC said.  I.e.
which part of the message is he replying to.

Henry

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


Re: [Lazarus] annoying *SPAM* (attn: Michael Schnell)

2015-10-23 Thread Henry Vermaak
On Fri, Oct 23, 2015 at 08:19:53AM -0400, Dmitry Boyarintsev wrote:
> Hello Michael
> 
> It seems like your email client is adding "*SPAM*" to the subject of emails
> coming from lazarus mailing list.
> Could you please add Lazarus@lists.lazarus.freepascal.org to the white list?
> 
> Otherwise getting an email with *SPAM* prefix in the subject ruins the
> whole thread.

If your mail client is threading based on the subject, it's broken or
misconfigured.  My client has no issues with the subject changing.

Henry

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


Re: [Lazarus] fast mathematical matrix operations

2015-06-08 Thread Henry Vermaak
On Mon, Jun 08, 2015 at 10:57:11AM +0200, Andrea Mauri wrote:
 Dear all,
 
 I am looking for units/packages to deal with numerical matrix
 manipulation (typical double type numerical matrices).
 I need code able to perform typical matrix operations (e.g. matrix
 multiplication, inversion, determinant and so on) as fast as
 possible since I deal with big matrices (thousands of rows and
 columns). I need it for both windows and linux (32/64).

I've heard very good things about Eigen:

https://en.wikipedia.org/wiki/Eigen_%28C%2B%2B_library%29

It's C++ only, though, so you'll have to make a wrapper.

Henry

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


Re: [Lazarus] [TIP] LazSqlX!

2015-06-03 Thread Henry Vermaak
On Wed, Jun 03, 2015 at 05:22:06PM +0200, Michael Van Canneyt wrote:
 On Wed, 3 Jun 2015, silvioprog wrote:
 Hello,
 
 Do you know LazSqlX?:
 
 https://lazsqlx.wordpress.com/
 
 I found it yesterday on Google, and now it will be one of my working
 tools, because its quality is very high.
 
 See some print screens here:
 
 http://sourceforge.net/projects/lazsqlx/
 
 Enjoy it!
 
 I would like to, but without source files and/or setup for my platform
 that will be difficult.

Huh, I thought the MySQL client library is GPL, so they need to release
the source?  Maybe you can argue that they're not making a derived work,
since it supports other back-ends.

Henry

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


Re: [Lazarus] ShellExecute and german umlauts

2015-05-21 Thread Henry Vermaak
On Thu, May 21, 2015 at 10:06:28AM +0200, John Landmesser wrote:
 i want to send a mail on windows using shellexecute with german
 Umlauts ( ö,å,ü .. ) in the body of the mail.

 This Code doesn't work:

 var s: string;

 s := 'öö'


 shellexecute(Application.Mainform.handle, 'open',PChar('mailto:' +
 'exam...@gmail.com' + '?subject=' + 'ARJ-ChapterArchiv: ' +
 'amp;body=' + UTF8ToAnsi(s)),nil, nil, sw_normal);

 Good tipps are welcome!    I don't want to use Indy or synapse!

I use something like this:

if Win32MajorVersion  5 then
Ret := ShellExecute(0, 'open', PChar(UTF8ToSys(AProg)), nil, nil, 
SW_SHOWNORMAL)
else
Ret := ShellExecuteW(0, 'open', PWideChar(UTF8Decode(AProg)), nil, nil, 
SW_SHOWNORMAL);

Result := Ret  32;

Henry

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


Re: [Lazarus] Release of Lazarus 1.4

2015-04-23 Thread Henry Vermaak
On Thu, Apr 23, 2015 at 10:28:24AM +, Mark Morgan Lloyd wrote:
 Mattias Gaertner wrote:
 On Wed, 22 Apr 2015 16:40:02 +0200
 Michael Schnell mschn...@lumino.de wrote:
 
 On 04/22/2015 02:07 PM, Mattias Gaertner wrote:
 Why downgrade? You can install both and switch any time in the IDE.
 Thanks !
 
 But how to install most easily on Linux (I always use the svn) .
 
 cd your/fpc/svn
 make install INSTALL_PREFIX=/usr
 
 This is broken on 2.7.1. Mantis 27272.

The bug report concerns INSTALL_BINDIR, not INSTALL_PREFIX?
INSTALL_PREFIX works fine for me, always has done.

Henry

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


Re: [Lazarus] BreakIf

2015-03-27 Thread Henry Vermaak
On Fri, Mar 27, 2015 at 01:45:31PM +0100, JuuS wrote:
 Good morning, all...
 
 From my Delphi days we had the following procedure:
 
 procedure BreakIf( b : Boolean );
 begin
  if b then
  asm
INT 3==debugger would then stop here
 and one could then F8 step to the offending
 routine based on the boolean condition passed
  end;
 end;
 
 I believe this is windows specific (?) and I'm now working on Linux
 machines.

On Windows you can use DebugBreak() instead of the asm.

 The question is:
 
 This does not work in Linux and I wonder if there is a similar way to
 achieve this in Linux environment?

To be more portable, you can send the SIGTRAP signal, just make sure
that your program ignores it so it doesn't die.  Try this with/without
GDB:

program bp;
uses BaseUnix;
begin
FpSignal(SIGTRAP, signalhandler_t(SIG_IGN));
writeln('hi there');
FpKill(FpGetpid, SIGTRAP); { -- breakpoint here }
writeln('exiting');
end.

Henry

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


Re: [Lazarus] Align/Anchor to widest label

2015-03-25 Thread Henry Vermaak
On Wed, Mar 25, 2015 at 10:52:01AM +0100, Torsten Bonde Christiansen wrote:
 Is it possible by using align, anchor, or some third option, to
 always make the two edits and the drop-down box align with the
 widest of the three labels.
 
 Since these labels will be translated to many languages I cannot
 assume that the 2nd labels is the widest, hence anchoring the
 filename edit to that label, and the drop-down and directory edit to
 the filename edit, will make the controls overlap eachother.

This has been quite a big problem for me, too.  The only solution I've
found is to use a container, like a frame or a panel, that has the
ChildSizing property.  Then you can set the ChildSizing.ControlsPerLine
to 2 and the container will take care of making sure that everything is
aligned, as long as you add the controls in the correct order, which
will depend on the ChildSizing.Layout setting.

The pain comes when you need to change the controls, because the child
sizing works on the order that the controls are added to the container.
For this reason I usually do this in code.

Henry

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


Re: [Lazarus] GroupBox AutoSize issues

2015-03-20 Thread Henry Vermaak
On Tue, Mar 17, 2015 at 06:20:32PM +0100, Mattias Gaertner wrote:
 On Tue, 17 Mar 2015 17:05:30 +
 Henry Vermaak henry.verm...@gmail.com wrote:
 
 [...]
   The LCL gtk2 interface computed the preferred size of a groupbox
   including the child controls, which lead to a loop.
   We need another way to compute the size of a groupbox without the child
   controls.
  
  I don't understand, how can you know the size of the groupbox if you
  don't know the size of the children?  How does, e.g., a panel do this?
  Sorry if this is a stupid question, the auto size mechanics confuse me a
  bit.
 
 The gtk2 interface only knows the current size of the child
 control(s). It does not know the preferred size of the child control(s).

So how do we fix this?  If the groupbox code is changed so that it only
evaluates its own minimum size, will the autosize code do the rest, i.e.
loop over the children and take the maximum width/height?

Henry

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


Re: [Lazarus] GroupBox AutoSize issues

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 12:57:47PM +0100, Mattias Gaertner wrote:
 On Fri, 20 Mar 2015 11:31:07 +
 Henry Vermaak henry.verm...@gmail.com wrote:
 
 [...]
   The gtk2 interface only knows the current size of the child
   control(s). It does not know the preferred size of the child control(s).
  
  So how do we fix this?  If the groupbox code is changed so that it only
  evaluates its own minimum size, will the autosize code do the rest, i.e.
  loop over the children and take the maximum width/height?
 
 The LCL takes care of the child sizes.

OK, so then the use of GetGTKDefaultWidgetSize() in the groupbox is
wrong, since that's what is looping through all the child controls.
I've attached a patch that works for me, it's basically cribbed from
GetGTKDefaultWidgetSize(), so maybe that needs a NoChildren parameter so
that we don't duplicate the gtk2 size request code.

Henry
Index: gtk2wsstdctrls.pp
===
--- gtk2wsstdctrls.pp	(revision 48429)
+++ gtk2wsstdctrls.pp	(working copy)
@@ -86,7 +86,7 @@
  ): boolean; override;
 class procedure GetPreferredSize(const AWinControl: TWinControl;
 var PreferredWidth, PreferredHeight: integer;
-WithThemeSpace: Boolean); override;
+{%H-}WithThemeSpace: Boolean); override;
 class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
 class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
   end;
@@ -2376,9 +2376,18 @@
 class procedure TGtk2WSCustomGroupBox.GetPreferredSize(
   const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
   WithThemeSpace: Boolean);
+var
+  Widget: PGtkWidget;
+  Requisition: TGtkRequisition;
 begin
-  GetGTKDefaultWidgetSize(AWinControl, PreferredWidth, PreferredHeight,
-  WithThemeSpace);
+  Widget := {%H-}PGtkWidget(AWinControl.Handle);
+  // set size to default
+  gtk_widget_set_size_request(Widget, -1, -1);
+  // ask default size
+  gtk_widget_size_request(Widget, @Requisition);
+  PreferredWidth := Requisition.width;
+  PreferredHeight := Requisition.height;
+  gtk_widget_set_size_request(Widget, AWinControl.Width, AWinControl.Height);
 end;
 
 class procedure TGtk2WSCustomGroupBox.SetFont(const AWinControl: TWinControl;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] suggestion for lazbuild

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 02:53:12PM +0200, FreeMan wrote:
 in osx yosemite
 
 ./lazbuild --quiet  - hints still showing billion sender not used
 massage. Not counting line but with --quit parameter or without this
 parameter not change output lines

What did you add to your compiler options inside the Configure Build
Lazarus... window?

 if not add --max-process-count=8 parameter,
 show this line, and freezing. only one line
 SetPrimaryConfigPath NewValue=/Users/freeman35/.lazarus -
 /Users/freeman35/.lazarus

It freezes for me, too.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 04:28:42PM +0200, FreeMan wrote:
 Thank you Henry, but nothing change on command line result, after
 add -vh -vn in options:

It adds it only to the IDE build command line.  For instance, I use -O2
-g- -Xs -vn-h-i- -l- to build an optimised IDE and this is what I see
after all the packages are built:

/usr/bin/make --assume-new=lazarus.pp lazarus OPT=' -O2 -g- -Xs -vn-h-i- -l- 
@/home/hcv/.lazarus/idemake.cfg -vbq 
-FU/home/hcv/source/lazarus/units/i386-linux/gtk2'
make[2]: Entering directory `/home/hcv/source/lazarus/ide'
/usr/local/lib/fpc/2.6.4/ppc386 -gl -vbqewnhi -Sci -dlclgtk2 -Fu../designer 
-Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager 
-Fu../packager/frames -Fu../components/custom -Fuframes -Fu.  
-Fu/usr/local/lib/fpc/2.6.4/units/i386-linux/rtl 
-Fu/usr/local/lib/fpc/2.6.4/units/i386-linux/paszlib 
-Fu/usr/local/lib/fpc/2.6.4/units/i386-linux/fcl-process 
-Fu/usr/local/lib/fpc/2.6.4/units/i386-linux/h ash 
-Fu/usr/local/lib/fpc/2.6.4/units/i386-linux/fpmkunit 
-Fu/usr/local/lib/fpc/2.6.4/units/i386-linux/regexpr -Fiinclude 
-Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux/gtk2 
-Fl/usr/lib/gcc/i48 6-linux-gnu/4.7 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -O2 
-g- -Xs -vn-h-i- -l- @/home/hcv/.lazarus/idemake.cfg -vbq 
-FU/home/hcv/source/lazarus/units/i386-linux/gtk2 -di386 lazarus.pp
/home/hcv/source/lazarus/ide/keymapping.pp(3588,43) Warning: (4056) Conversion 
between ordinals and pointers is not portable
/home/hcv/source/lazarus/ide/keymapping.pp(3625,43) Warning: (4056) Conversion 
between ordinals and pointers is not portable
/home/hcv/source/lazarus/debugger/processdebugger.pp(110,92) Warning: (5043) 
Symbol CommandLine is deprecated
/home/hcv/source/lazarus/packager/pkglinksdlg.pas(276,19) Warning: (6018) 
unreachable code
/home/hcv/source/lazarus/ide/./frames/project_misc_options.pas(101,43) Warning: 
(6018) unreachable code
/usr/bin/ld: warning: ../link.res contains output sections; did you forget -T?
make[2]: Leaving directory `/home/hcv/source/lazarus/ide'
make[1]: Leaving directory `/home/hcv/source/lazarus/ide'
make: Leaving directory `/home/hcv/source/lazarus'

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


Re: [Lazarus] suggestion for lazbuild

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 03:45:49PM +0200, FreeMan wrote:
 lcl widget type= qtTarget OS : Darwin Target CPU: x86_64
 no options

Well, what do you expect then?  Try to add -vh- -vn- if you don't want
to see hints or notes.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 02:44:02PM +0100, Mattias Gaertner wrote:
 On Fri, 20 Mar 2015 13:29:15 +
 Henry Vermaak henry.verm...@gmail.com wrote:
 
 [...]
  It freezes for me, too.
 
 It freezes only with --quiet?

Without --quiet:

hcv@technical09:~/source/lazarus$ ./lazbuild --verbose --verbose --build-ide=
Parameter: build-ide=
Hint: (lazarus) primary config path: /home/hcv/.lazarus
Hint: (lazarus) [TBuildManager.SetBuildTarget] OS=linux CPU=i386 
CompQueryOptions= DefaultOS=linux DefaultCPU=i386
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-linux-gtk2 
New=i386-linux-gtk2 FPC=True LCL=False
Hint: (lazarus) Building Lazarus IDE with profile Build All
Hint: (lazarus) [TBuildManager.SetBuildTargetIDE] OS= CPU= WS=gtk2
Hint: (lazarus) [TBuildManager.SetBuildTarget] OS=linux CPU=i386 
CompQueryOptions= DefaultOS=linux DefaultCPU=i386
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-linux-gtk2 
New=i386-linux-gtk2 FPC=True LCL=False
Hint: (lazarus) Missing state file of ...
...more missing state file lines..
Hint: (lazarus) TBuildManager.MacroFuncInstantFPCCache /usr/local/bin/instantfpc
RunTool /usr/local/bin/instantfpc --get-cache
Hint: (lazarus) [TBuildManager.MacroFuncInstantFPCCache] 
/home/hcv/.cache/instantfpc/

It just sits there and I have to ctrl-c to get out.  If I add
--max-process-count=9 it works nicely.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 02:00:11PM +, Henry Vermaak wrote:
 On Fri, Mar 20, 2015 at 03:45:49PM +0200, FreeMan wrote:
  lcl widget type= qtTarget OS : Darwin Target CPU: x86_64
  no options
 
 Well, what do you expect then?  Try to add -vh- -vn- if you don't want
 to see hints or notes.

These options don't get passed to the packages, so you'll still see
messages.  I don't know if there's a way to pass the options along to
the packages, too.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-20 Thread Henry Vermaak
On Fri, Mar 20, 2015 at 03:49:49PM +0100, Mattias Gaertner wrote:
 On Fri, 20 Mar 2015 14:16:07 +
 Henry Vermaak henry.verm...@gmail.com wrote:
 
  On Fri, Mar 20, 2015 at 02:00:11PM +, Henry Vermaak wrote:
   On Fri, Mar 20, 2015 at 03:45:49PM +0200, FreeMan wrote:
lcl widget type= qtTarget OS : Darwin Target CPU: x86_64
no options
   
   Well, what do you expect then?  Try to add -vh- -vn- if you don't want
   to see hints or notes.
  
  These options don't get passed to the packages, so you'll still see
  messages.  I don't know if there's a way to pass the options along to
  the packages, too.
 
 How to pass options to all packages:
 
 http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Add_a_flag_to_project_and_all_packages

I'm building the IDE, though, and the options I add in the Configure
Build Lazarus dialog don't get passed to packages.  It would be good to
shut up e.g. the hints and notes when packages get built, too.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-18 Thread Henry Vermaak
On 18 March 2015 at 21:18, Mattias Gaertner nc-gaert...@netcologne.de wrote:
 On Tue, 17 Mar 2015 14:39:59 +
 Henry Vermaak henry.verm...@gmail.com wrote:

[...]
 What annoys me is the TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile
 messages, despite the --quiet option passed.

 Fixed in trunk.
 I also reduced the default verbosity level of lazbuild.

Fantastic, thanks!

Henry

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


Re: [Lazarus] lazbuild parameter --max-process-count

2015-03-18 Thread Henry Vermaak
On 18 March 2015 at 22:14, Mattias Gaertner nc-gaert...@netcologne.de wrote:
 Hi,

 I added a new parameter to lazbuild.

 --max-process-count=count
   Maximum number of threads for compiling in
   parallel. Default is 0, which guesses the number of
   cores in the system.

 When you have trouble reading the output of lazbuild you can for
 example use --max-process-count=1 .

Great feature, thanks!

 I heard that on some Windows machines FPC locks some files, so that
 parallel compilation fails. I could not reproduce it, but if you have
 the problem, you know have a workaround.

I fire a pile of lazbuild commands off from a Makefile, but I've had
to prevent make from running them in parallel, due to an fpc file
(some link file, I can't remember), that always has the same name,
getting created in the output directory.  I should file a bug report,
temporary files belong somewhere else and at the very least should
have unique names.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-17 Thread Henry Vermaak
On Tue, Mar 17, 2015 at 05:38:03PM +0200, FreeMan wrote:
 On 17.03.2015 16:39, Henry Vermaak wrote:
 Hide these hints by setting the options in the Verbosity section of the
 compiler options.  You can make a quiet build mode and use --build-mode
 to select it from the command line.  I have a noisy debug mode and a
 quiet release mode, for example.
 Sorry Henry, But I didn't understand clearly. I'm talk about in
 command line, parameter of lazbuild. This is my commandline,
 
 ./lazbuild --pcp=/Users/freeman/.lazarus _*--quiet*_ --build-all
 --skip-dependencies --build-ide= --ws=qt--cpu=x86_64

Yes, this is to tell _lazbuild_ to be quiet (which it doesn't obey
properly, either).  The hints you are talking about is coming from the
_compiler_, so you have to change the compiler options to silence the
warnings.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-17 Thread Henry Vermaak
On Tue, Mar 17, 2015 at 04:28:06PM +0200, FreeMan wrote:
 Is it possible add parameter for hide verbose  not used hint I
 don't need see every build, a lot off sender not used info on
 terminal.
  --quiet  parameter not hide this hints.

Hide these hints by setting the options in the Verbosity section of the
compiler options.  You can make a quiet build mode and use --build-mode
to select it from the command line.  I have a noisy debug mode and a
quiet release mode, for example.

What annoys me is the TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile
messages, despite the --quiet option passed.

Henry

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


Re: [Lazarus] suggestion for lazbuild

2015-03-17 Thread Henry Vermaak
On Tue, Mar 17, 2015 at 02:39:59PM +, Henry Vermaak wrote:
 What annoys me is the TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile
 messages, despite the --quiet option passed.

And TFPCTargetConfigCache... and RunTool... and
TProject.DoLoadStateFile  You can't see the wood from the trees
when you build from the command line.

Henry

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


[Lazarus] GroupBox AutoSize issues

2015-03-17 Thread Henry Vermaak
Hi

A while ago we managed to fix the GroupBox auto sizing not taking the
length of the caption into account.  I've been using the fixes_1_2
branch and that's working OK.

I switched to fixes_1_4 and started seeing some strange behaviour.
Initially it appears that the auto sizing works correctly (see
groupbox1.png) but when you resize the window it changes and cuts the
caption off (see groupbox2.png).  It doesn't resize again after that.
This only happens when you've got some anchors set.

Does anyone know what could have caused this?  If not I'll have to
bisect, which I'd rather avoid!

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


Re: [Lazarus] suggestion for lazbuild

2015-03-17 Thread Henry Vermaak
On Tue, Mar 17, 2015 at 06:03:15PM +0200, FreeMan wrote:
 make -s clean ...
 this my compiler make command line.

Eh?  You're using lazbuild, why are you talking about make?

If you are building lazarus with lazbuild, you can add compiler options,
under Tools-Configure Build Lazarus, see Options.  Add the options
for the build mode that you're using.

Henry

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


Re: [Lazarus] GroupBox AutoSize issues

2015-03-17 Thread Henry Vermaak
On Tue, Mar 17, 2015 at 05:46:01PM +0100, Mattias Gaertner wrote:
 On Tue, 17 Mar 2015 16:12:30 +
 Henry Vermaak henry.verm...@gmail.com wrote:
 
  Hi
  
  A while ago we managed to fix the GroupBox auto sizing not taking the
  length of the caption into account.  I've been using the fixes_1_2
  branch and that's working OK.
  
  I switched to fixes_1_4 and started seeing some strange behaviour.
  Initially it appears that the auto sizing works correctly (see
  groupbox1.png) but when you resize the window it changes and cuts the
  caption off (see groupbox2.png).  It doesn't resize again after that.
  This only happens when you've got some anchors set.
  
  Does anyone know what could have caused this?  If not I'll have to
  bisect, which I'd rather avoid!
 
 The LCL gtk2 interface computed the preferred size of a groupbox
 including the child controls, which lead to a loop.
 We need another way to compute the size of a groupbox without the child
 controls.

I don't understand, how can you know the size of the groupbox if you
don't know the size of the children?  How does, e.g., a panel do this?
Sorry if this is a stupid question, the auto size mechanics confuse me a
bit.

Henry

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


Re: [Lazarus] Embedded/small database

2015-02-17 Thread Henry Vermaak
On Tue, Feb 17, 2015 at 07:54:00AM -0700, leledumbo wrote:
 Tested, it can't even manage 50,000 rows efficiently. Searching a
 string takes minutes, while it takes a fraction of second in real
 dbms.

Interesting.  I've seen benchmarks where sqlite query times for a
full-text search on 12+ rows is less than 20ms.  Did you use FTS4
for your search index?

Lucene was the only embedded database that could beat sqlite for
full-text search, IIRC.

Henry

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


Re: [Lazarus] Examples of CairoCanvas usage

2015-02-10 Thread Henry Vermaak
On Tue, Feb 10, 2015 at 03:19:23PM +0100, Michael Van Canneyt wrote:
 On Tue, 10 Feb 2015, Juha Manninen wrote:
 On Tue, Feb 10, 2015 at 2:27 PM, Michael Van Canneyt
 mich...@freepascal.org wrote:
 It is a completely reworked version of the one in fpGUI, without
 external dependencies but with serious improvements: the font
 embedding in the fpgui version is, well, rudimentary, so that has
 been completely reworked, it can now embed fonts on-the-fly, without
 external tools :)
 
 I also made a start of improving memory usage, page caching and made
 the start for compression.
 
 I haven't committed the reworked version yet, but it is nearly
 complete, so you can expect this soon.
 
 Sounds very good! This will be included in some future FPC release.
 Even better!  I will be following the trunk commits.
 
 BTW, does anybody know how to create PDFs with embedded fonts in a
 server without X or any other GUI?  What libs are needed?
 
 You can check libharu.

The only snag is that the Unicode support hasn't been released last time
I checked, so you'll have to build the development version from source.
We embed the Liberation TrueType fonts and that works quite well.

Henry

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


Re: [Lazarus] Alt + tab IDE Windows

2014-09-26 Thread Henry Vermaak
On Fri, Sep 26, 2014 at 05:11:58PM +0200, Michael Van Canneyt wrote:
 
 
 On Fri, 26 Sep 2014, Leonardo M. Ramé wrote:
 
 El 26/09/14 a las 10:52, William Ferreira escibió:
 On IDE Options, try to enable 'Show single button in TaskBar'. Maybe
 could help...
 
 
 Yes, I tried that before asking, but sadly it does exactly the same.
 
 I can confirm that. Kubuntu 14.04 and 12.04, using GTK2+ widgetset.

It works here, fixes_1_2, GTK2, Debian stable.

Henry

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


Re: [Lazarus] StrToDate and DefaultFormatSettings

2014-09-12 Thread Henry Vermaak
On Fri, Sep 12, 2014 at 08:18:36AM -0300, Leonardo M. Ramé wrote:
 Hi, I need to convert strings with format d-mmm-y to TDateTime.
 
 For example: '12-Sep-14'
 
 Here's my code:
 
 DefaultFormatSettings.DateSeparator:='-';
 DefaultFormatSettings.ShortDateFormat:='D-MMM-Y';
 DefaultFormatSettings.ShortMonthNames[1] := 'Jan';
 DefaultFormatSettings.ShortMonthNames[2] := 'Feb';
 DefaultFormatSettings.ShortMonthNames[3] := 'Mar';
 DefaultFormatSettings.ShortMonthNames[4] := 'Apr';
 DefaultFormatSettings.ShortMonthNames[5] := 'May';
 DefaultFormatSettings.ShortMonthNames[6] := 'Jun';
 DefaultFormatSettings.ShortMonthNames[7] := 'Jul';
 DefaultFormatSettings.ShortMonthNames[8] := 'Aug';
 DefaultFormatSettings.ShortMonthNames[9] := 'Sep';
 DefaultFormatSettings.ShortMonthNames[10] := 'Oct';
 DefaultFormatSettings.ShortMonthNames[11] := 'Nov';
 DefaultFormatSettings.ShortMonthNames[12] := 'Dec';
 lStr := DateToStr(now); // This works Ok.
 lDate := StrToDate(lStr); // Here I get EConvert exception.
 
 Am I missing something?.

Have you tried ScanDateTime()?  Then you don't need to fiddle with the
format settings.

Henry

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


Re: [Lazarus] Cannot find -lpthread

2014-08-22 Thread Henry Vermaak
On Thu, Aug 21, 2014 at 03:52:10PM -0300, Leonardo M. Ramé wrote:
 El 21/08/14 a las 14:44, Péter Gábor escibió:
 Hello!
 
 If you try static linking with a library you need the development
 package of it which contains the required binary
 statements/codes/records for the static linking.
 For example: libpthread-stubs0-dev or libpthread-dev or something similar...
 
 
 Yes I have installed libpthread-stubs0-dev (libpthread-dev does not
 exists here), but the error persists. I need to know what is that
 something similar package needed by fpc...

The pthread stubs package won't help you.  Where is libpthread.so on
your system?  Back in the early days of multilib I had to add a search
path to fpc with -XR, but that's worked for a long time now.

Henry

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


Re: [Lazarus] Cannot find -lpthread

2014-08-21 Thread Henry Vermaak
On Thu, Aug 21, 2014 at 12:22:45PM -0300, Leonardo M. Ramé wrote:
 Hi, I'm trying to build fpc and lazarus from sources in XUbuntu
 14.04. While trying to link fpc I get this:
 
 /usr/bin/ld: aviso: link.res contiene secciones de salida. ¿Olvidó -T?
 /usr/bin/ld: no se puede encontrar -lpthread
 /usr/bin/ld: no se puede encontrar -ldl
 /usr/bin/ld: no se puede encontrar -lc
 fpmake.pp(44,1) Error: Error while linking

These are generally in libc6-dev, but that should be pulled in by
build-essential.

Try installing apt-file and using:

apt-file search libpthread.so

Henry

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


Re: [Lazarus] Cannot find -lpthread

2014-08-21 Thread Henry Vermaak
On Thu, Aug 21, 2014 at 04:34:03PM +0100, Henry Vermaak wrote:
 On Thu, Aug 21, 2014 at 12:22:45PM -0300, Leonardo M. Ramé wrote:
  Hi, I'm trying to build fpc and lazarus from sources in XUbuntu
  14.04. While trying to link fpc I get this:
  
  /usr/bin/ld: aviso: link.res contiene secciones de salida. ¿Olvidó -T?
  /usr/bin/ld: no se puede encontrar -lpthread
  /usr/bin/ld: no se puede encontrar -ldl
  /usr/bin/ld: no se puede encontrar -lc
  fpmake.pp(44,1) Error: Error while linking
 
 These are generally in libc6-dev, but that should be pulled in by
 build-essential.
 
 Try installing apt-file and using:
 
 apt-file search libpthread.so

P.S.  If you already have the files, you may need to update the ld
cache:

sudo ldconfig

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


Re: [Lazarus] Cannot find -lpthread

2014-08-21 Thread Henry Vermaak
On Thu, Aug 21, 2014 at 12:38:02PM -0300, Leonardo M. Ramé wrote:
 Here's the result, apparently it is already installed:
 
 libc6: /lib/x86_64-linux-gnu/libpthread.so.0
 libc6-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so.0
 libc6-armel-armhf-cross: /usr/arm-linux-gnueabihf/libsf/libpthread.so.0
 libc6-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so.0
 libc6-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so.0
 libc6-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so.0
 libc6-dev: /usr/lib/x86_64-linux-gnu/libpthread.so
 libc6-dev-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so
 libc6-dev-armel-armhf-cross: /usr/arm-linux-gnueabihf/libs/libpthread.so
 libc6-dev-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so
 libc6-dev-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so
 libc6-dev-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so
 libc6-dev-i386: /usr/lib32/libpthread.so
 libc6-dev-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so
 libc6-dev-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib6/libpthread.so
 libc6-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so
 libc6-dev-x32: /usr/libx32/libpthread.so
 libc6-i386: /lib32/libpthread.so.0
 libc6-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so.0
 libc6-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib64/libpthread.so.0
 libc6-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so.0
 libc6-x32: /libx32/libpthread.so.0

apt-file searches all available packages in the repo, which is why it's
useful to find which package you need to install to get a specific file.
You'll have to check with your package manager (or just use locate).

Henry

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-06 Thread Henry Vermaak
On Sat, Jul 05, 2014 at 01:03:19PM +0100, Henry Vermaak wrote:
 On Sat, Jul 05, 2014 at 02:05:10PM +0300, Juha Manninen wrote:
  I applied the patch from Henry. I hope we get LCL-Win fixed, too.
 
 Thanks.  I'll look into lcl-win, it'll need a GetPreferredSize with
 MeasureText and some more magic to take the borders into account.

I've uploaded a patch to the bug report.  The hard coded numbers don't
feel very good, but I haven't found a better way of doing it.  The other
GetPreferredSize implementations in the file also seem to do that.

Henry

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-05 Thread Henry Vermaak
On Sat, Jul 05, 2014 at 02:05:10PM +0300, Juha Manninen wrote:
 I applied the patch from Henry. I hope we get LCL-Win fixed, too.

Thanks.  I'll look into lcl-win, it'll need a GetPreferredSize with
MeasureText and some more magic to take the borders into account.

Henry

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


[Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
Hi

The GroupBox auto size doesn't work very well, because it doesn't take
the label width into account.  If the label is wider than all of the
children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?

I attach a patch that uses GetGTKDefaultWidgetSize.

Henry
Index: lcl/interfaces/gtk2/gtk2wsstdctrls.pp
===
--- lcl/interfaces/gtk2/gtk2wsstdctrls.pp	(revision 45769)
+++ lcl/interfaces/gtk2/gtk2wsstdctrls.pp	(working copy)
@@ -2365,32 +2365,9 @@
 class procedure TGtk2WSCustomGroupBox.GetPreferredSize(
   const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
   WithThemeSpace: Boolean);
-var
-  Widget: PGtkWidget;
-  border_width: Integer;
 begin
-  Widget := PGtkWidget(GetFrameWidget({%H-}PGTKEventBox(AWinControl.Handle)));
-
-  if Assigned(PGtkFrame(Widget)^.label_widget) then
-  begin
-PreferredWidth := gtk_widget_get_xthickness(Widget) * 2 +
-gtk_widget_get_xthickness(PGtkFrame(Widget)^.label_widget);
-PreferredHeight := Max(gtk_widget_get_ythickness(Widget),
- gtk_widget_get_ythickness(PGtkFrame(Widget)^.label_widget)) +
- gtk_widget_get_ythickness(Widget);
-  end else
-  begin
-PreferredWidth := gtk_widget_get_xthickness(Widget) * 2;
-PreferredHeight := gtk_widget_get_ythickness(Widget) * 2;
-  end;
-
-  if WithThemeSpace then
-  begin
-border_width := (PGtkContainer(Widget)^.flag0 and bm_TGtkContainer_border_width) shr
-bp_TGtkContainer_border_width;
-inc(PreferredWidth, border_width);
-inc(PreferredHeight, 2 * border_width);
-  end;
+  GetGTKDefaultWidgetSize(AWinControl, PreferredWidth, PreferredHeight,
+  WithThemeSpace);
 end;
 
 class procedure TGtk2WSCustomGroupBox.SetFont(const AWinControl: TWinControl;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 12:39:12PM +0100, Henry Vermaak wrote:
 Hi
 
 The GroupBox auto size doesn't work very well, because it doesn't take
 the label width into account.  If the label is wider than all of the
 children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
 wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?
 
 I attach a patch that uses GetGTKDefaultWidgetSize.

http://bugs.freepascal.org/view.php?id=20447

Henry

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 01:03:56PM +0100, Henry Vermaak wrote:
 On Fri, Jul 04, 2014 at 12:39:12PM +0100, Henry Vermaak wrote:
  Hi
  
  The GroupBox auto size doesn't work very well, because it doesn't take
  the label width into account.  If the label is wider than all of the
  children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
  wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?
  
  I attach a patch that uses GetGTKDefaultWidgetSize.
 
 http://bugs.freepascal.org/view.php?id=20447

Same happens on Windows.  There isn't even a GetPreferredSize() member,
so that probably needs to be added containing MeasureText() and some
code to calculate border widths.  I don't really know how the win32
widgetset works, though.

Henry

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 03:13:19PM +0200, Vojtěch Čihák wrote:
 Hi,
  
 Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.

I really don't care about Delphi.  If I did I would be using it.

 When I put children on Panel, set very long Panel.Caption and
 Panel.AutoSize:=True then panel shrinks to the smallest possible size
 (around children) ignoring its own Caption.

I haven't seen anyone use a Panel with a caption and children.  The
caption is useless for exactly the reason you point out.  You can at
least get around it by putting a label inside the panel.

 So it seems more a feature than a bug to me.

I have software that's translatable, I've set my TRadioGroup size
manually (because AutoSize doesn't work) to accommodate the English
translation.  Now I change the translation to another language, but the
caption is now longer, so it gets clipped.  You call this a feature?  My
users don't agree with you.

Now I need to manually calculate the minimum size of the control based
on the length of the text in the current translation.  I also need to
factor in borders, themes, etc.  That's exactly the type of problem that
AutoSize sets out to solve, since all this information is already in the
widget set.

The same happens if the theme changes and the font size gets increased.
Delphi has this massive design flaw because it's based on absolute
positions and dimensions.  Lazarus goes a long way to fix this by the
AutoSize and anchoring mechanisms.

Henry

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 03:19:33PM +0200, zeljko wrote:
 On 07/04/2014 03:13 PM, Vojtěch Čihák wrote:
 Hi,
 
 Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.
 
 When I put children on Panel, set very long Panel.Caption and
 Panel.AutoSize:=True then panel shrinks to the smallest possible size
 (around children) ignoring its own Caption.
 
 So it seems more a feature than a bug to me.
 
 +1

See my reply to Vojtěch.

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


Re: [Lazarus] EpikTimer v1.0.1 released

2014-06-20 Thread Henry Vermaak
On Fri, Jun 20, 2014 at 12:38:22PM +0100, Lukasz Sokol wrote:
 On 20/06/14 11:53, Michael Schnell wrote:
  On 06/18/2014 04:03 PM, Lukasz Sokol wrote:
  I think this vdso time thing is so fresh, it'll be great if you contact 
  the maintainer (Andy Lutomirski) or the guy that wrote it (Stefani Seibold)
  
  I wrote to Andy and he replied very quickly.
  
  Unfortunately it seems that ubiquitous availability for vDSO based timing 
  (and other) functions is not expected in near future.
  So I supposedly have to give up on that issue for the moment :-( .
  
  -Michael
  
 
 Is it possible to call about any syscall (timing included) through (32bit) 
 exising vdso ? 

No, only the ones that are exported via the VDSO.  __kernel_vsyscall()
is used to find the fastest way to make a syscall on your processor
(i.e. sysenter vs int 0x80).

Henry

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


Re: [Lazarus] EpikTimer v1.0.1 released

2014-06-18 Thread Henry Vermaak
On Wed, Jun 18, 2014 at 12:27:03PM +0200, Michael Schnell wrote:
 On 06/06/2014 12:25 PM, Michael Van Canneyt wrote:
 
 
 if you do a vDSO implementation, please do not limit the
 implementation to the clock_gettime, but implement all calls that
 support it.
 
 
 First testing results:
 
 On Kernel 3.1.10 (32 bit):
  -  I do find the vDSO ELF structure (always at  E000)
  -  it seems to provide __kernel_sigreturn,
 __kernel_rt_sigreturn , and __kernel_vsyscall
 
 
 On Kernel 3.2.0 64 bit, using a 32 Bit testing program:
  -  I do find the vDSO ELF structure at (e.g. at F774300, the
 location varies for any program start. This behavior is documented
 for vDSO)
  -  it also seems to provide just __kernel_sigreturn,
 __kernel_rt_sigreturn , and __kernel_vsyscall
 
 So I seem to be out of luck hoping for vDSO support for the
 performance counter or similar arch depending time-source access
 with 32 bit systems :-(

This is as documented in the vdso man page.  i386 only exports those 3
functions.  If your testing program is 32 bit, it won't give you the 64
bit vdso image, obviously.

Try with a 64 bit test program.

Henry

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


Re: [Lazarus] EpikTimer v1.0.1 released

2014-06-18 Thread Henry Vermaak
On Wed, Jun 18, 2014 at 02:53:21PM +0200, Michael Schnell wrote:
 Checking with a 64 Bit program (after overcoming the shock that with
 64 fpc Integer is 32 bit =-O ):
 
 On Kernel 3.2.0 64 bit, using a 64 Bit testing program:
  -  I do find the vDSO ELF structure at (e.g. at 7FFF5D2C9000,
 the location varies for any program start. This behavior is
 documented for vDSO)
  -  it seems to provide __vdso_clock_gettime,
 __vdso_gettimeofday, __vdso_time, __vdso_getcpu
 
 
 but not __kernel_sigreturn, __kernel_rt_sigreturn , and
 __kernel_vsyscall
 
 funny

Why do you think this is funny?  Those functions are not needed for x64,
and presumably no-one cared enough to add the time functions to x86
(until recently).

Henry

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


Re: [Lazarus] How to program with time in milliseconds?

2014-05-15 Thread Henry Vermaak
On Thu, May 15, 2014 at 09:40:44AM +0200, Michael Schnell wrote:
 At best, fpgettimeofday itself should be improved (maybe using
 Performance counter register if the Arch allows for or vDSO if the
 OS allows for).

Only the speed can be improved by calling into the vDSO, not the
precision.  You need to use clock_gettime() for nanosecond precision
(and to be unaffected by discontinuous clock changes).

Henry

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


Re: [Lazarus] How to program with time in milliseconds?

2014-05-15 Thread Henry Vermaak
On Thu, May 15, 2014 at 12:12:06PM +0200, Michael Schnell wrote:
 On 05/15/2014 11:43 AM, Henry Vermaak wrote:
 Only the speed can be improved by calling into the vDSO, not the
 precision. You need to use clock_gettime() for nanosecond
 precision
 
 I see.
 
 Is clock_gettime not available via vDSO ? To me this seems even more
 viable than for fpGetTimeOfDay.

Yes, as I said earlier.  It's in the man page, too.  And in the kernel
source I pointed to.

Henry

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


Re: [Lazarus] How to program with time in milliseconds?

2014-05-15 Thread Henry Vermaak
On Thu, May 15, 2014 at 11:41:32AM +0200, Michael Schnell wrote:
 On 05/15/2014 11:18 AM, Michael Van Canneyt wrote:
 
 
 fpGetTimeOfDay is used to implement Now(). This should not be changed.
 
 Why not, If there are better ways ?

Better needs to be defined here.  If you mean faster, then you need
to call through the vDSO, so just link to the C library and use their
implementation.  Chances are that you are linking to the C library
anyway (we're on the lazarus list after all).  There isn't much reason
for fpc to implement this, but perhaps it warrants a comment in the
documentation (e.g. glibc may have a much faster implementation that
doesn't use a syscall, if you're worried about performance).

gettimeofday() is the correct way to get the real wall clock time, there
is no better way for fpc to implement it (except for using
clock_gettime() with CLOCK_REALTIME, since technically gettimeofday() is
obsolete).

gettimeofday() is not what you want to use for a timer, though, since it
will change when someone sets the time on the system.  In that case you
want to use clock_gettime() with CLOCK_MONOTONIC, or even
CLOCK_MONOTONIC_RAW (linux only).  GetTickCount64 will use this on
linux, but it reduces the precision to milliseconds.

You seem a bit confused about some of these things, and people are
talking at cross purposes, so I'll end my part in the discussion
here.

Henry

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


Re: [Lazarus] How to program with time in milliseconds?

2014-05-13 Thread Henry Vermaak
On Tue, May 13, 2014 at 09:51:39AM +0200, Michael Schnell wrote:
 On 05/12/2014 10:37 PM, Henry Vermaak wrote:
 On linux, glibc (and others) will route gettimeofday() (and
 clock_gettime() for certain clock IDs) via vDSO and no syscall
 will be called, so it's very fast. I don't think the fpc rtl does
 this, though?
 
 I checked with X86 32 Bit Linux: you are right.

This doesn't happen on x86 for me (with Debian stable, at least).  I
can't find the implementation in glibc, either.

 e.g. http://x86.renejeschke.de/html/file_module_x86_id_277.html
 
 talks about the ASM instruction RDPMC:
 
 When in protected or virtual 8086 mode, the performance-monitoring
 counters enabled (PCE) flag in register CR4 restricts the use of
 the RDPMC instruction as follows. When the PCE flag is set, the
 RDPMC instruction can be executed at any privilege level; when the
 flag is clear, the instruction can only be executed at privilege
 level 0.
 
 Hence, I don't know if accessing the  performance-monitoring
 counter this is possible / viable in the fpc RTL.

If you really want to use the performance counters, you'll have to use
the perf subsystem.

This doesn't have anything to do with vDSO, though.  The standard
library doesn't use any assembler to read these registers.  It calls
into a page that the kernel makes available to userspace that contains
certain functions where the overhead of a syscall is deemed
excessive/undesirable.  This kernel code will then read the time (using
HPET/TSC to get nanoseconds):

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/vdso/vclock_gettime.c

Henry

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


Re: [Lazarus] How to program with time in milliseconds?

2014-05-12 Thread Henry Vermaak
On Mon, May 12, 2014 at 08:12:45PM +0200, Sven Barth wrote:
 On 12.05.2014 15:33, Michael Schnell wrote:
 On 05/12/2014 02:47 PM, Reinier Olislagers wrote:
 Do you mean direct access to the hardware bypassing the OS? I
 thought that wasn't possible in Windows?
 
 I don't know how the dynamic library call in Windows works.
 
 If in doubt, take a look at ReactOS ;)
 
 QueryPerformanceCounter calls NtQueryPerformanceCounter (which is a
 system call), which in turn calls KeQueryPerformanceCounter (which is
 implemented by the Hardware Abstraction Layer) which is defined here
 at around line 250:
 http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/timer.c?revision=58489view=markup

On linux, glibc (and others) will route gettimeofday() (and
clock_gettime() for certain clock IDs) via vDSO and no syscall will be
called, so it's very fast.  I don't think the fpc rtl does this, though?

More info in the vdso man page for which functions are supported for
which architectures.

Henry

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


Re: [Lazarus] Better implementation of GetTickcount using clock_gettime

2014-04-01 Thread Henry Vermaak
On Tue, Apr 01, 2014 at 12:45:54PM +0200, zeljko wrote:
 On 04/01/2014 12:20 PM, Luca Olivetti wrote:
 
 For linux a more accurate implementation could be
 
 function GetTickCount64: QWord;
 var
tp: timespec;
 begin
clock_gettime(CLOCK_MONOTONIC, @tp);
Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 100);
 end;
 
 
 And I say linux because CLOCK_MONOTONIC is only defined there in fpc,
 though it should be available even in other systems:
 
 CLOCK_MONOTONIC is available only for kernels = 2.6.26.

No, it's been around since before 2.6.

Henry

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


Re: [Lazarus] Compiling on OpenBSD

2014-02-27 Thread Henry Vermaak
On Wed, Feb 26, 2014 at 10:16:01PM -0300, Leonardo Rame wrote:
 Hi, I'm playing with OpenBsd 5.4 amd64 (with XFCE4) and found it has
 an fpc 2.6.2 package, so I tried compiling Lazarus trunk.

 -- 8 --

 4) When I've tried to run ./lazarus, I got this:
 
 (lazarus:14292): GLib-GObject-CRITICAL **: g_object_unref: assertion
 `G_IS_OBJECT (object)' failed [FORMS.PP] ExceptionOccurred
 Sender=EAccessViolation Exception=Access violation Stack trace:
 $00020D8F7A4A TApplication.HandleException Access violation Stack
 trace: $00020D8F7A4A [FORMS.PP] ExceptionOccurred 

If you run ./lazarus --g-fatal-warnings, it will halt on a GTK warning,
so you can get a backtrace under gdb.

Henry

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


Re: [Lazarus] Lazarus Second Release Candidate, 1.2RC2

2014-01-16 Thread Henry Vermaak
On Wed, Jan 15, 2014 at 05:16:56PM +, Martin wrote:
 On 15/01/2014 17:09, Henry Vermaak wrote:
 On Wed, Jan 15, 2014 at 12:45:46PM +, Henry Vermaak wrote:
 That has already been fixed in r43703 in trunk and merged to 1.2.
 I can't see it in fixes_1_2?
 Am I the only one missing this?  I've fixed mine locally, for now.
 
 Actually you were are right. It was supposed to be merged, but
 somehow got lost... Done now, thanks for the persistence

Thanks, it's working well now.

Henry

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


Re: [Lazarus] Lazarus Second Release Candidate, 1.2RC2

2014-01-15 Thread Henry Vermaak
On Wed, Jan 15, 2014 at 12:26:24PM +, Henry Vermaak wrote:
 On Mon, Jan 13, 2014 at 06:34:19PM +0100, Mattias Gaertner wrote:
  The Lazarus team would like to announce the second Release Candidate
  for the upcoming Version 1.2.
 
 Well done!  I'd love to stick to this branch.
 
 lazbuild crashes for me, though:
 
 hcv@technical09:~/source/lazarus$ ./lazbuild --help
 [FORMS.PP] ExceptionOccurred 
   Sender=Exception
   Exception=Unknown Run-Time error : 210
   Stack trace:
   $080483E6  FILTERCONFIGFILECONTENT,  line 190 of lazbuild.lpr
   $08051889  main,  line 1679 of lazbuild.lpr
   $B7590E46
 TApplication.HandleException Unknown Run-Time error : 210
   Stack trace:
   $080483E6
   $08051889
   $B7590E46
 exception at 080483E6:
 Unknown Run-Time error : 210.
 
 GetCfgFileContent() returns nil, since I don't have a lazarus.cfg
 anywhere on my computer.  Code in FilterConfigFileContent() doesn't
 check the return result of GetCfgFileContent(), so it crashes.

I see this has been fixed in trunk (revision 43703).  Can someone merge
this, please.

Henry

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


Re: [Lazarus] Lazarus Second Release Candidate, 1.2RC2

2014-01-15 Thread Henry Vermaak
On Wed, Jan 15, 2014 at 01:34:58PM +0100, Bart wrote:
 On 1/15/14, Henry Vermaak henry.verm...@gmail.com wrote:
 
  lazbuild crashes for me, though:
 
 That has already been fixed in r43703 in trunk and merged to 1.2.

I can't see it in fixes_1_2?

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


Re: [Lazarus] Lazarus Second Release Candidate, 1.2RC2

2014-01-15 Thread Henry Vermaak
On Wed, Jan 15, 2014 at 12:45:46PM +, Henry Vermaak wrote:
 On Wed, Jan 15, 2014 at 01:34:58PM +0100, Bart wrote:
  On 1/15/14, Henry Vermaak henry.verm...@gmail.com wrote:
  
   lazbuild crashes for me, though:
  
  That has already been fixed in r43703 in trunk and merged to 1.2.
 
 I can't see it in fixes_1_2?

Am I the only one missing this?  I've fixed mine locally, for now.

Henry

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


Re: [Lazarus] Lazarus 1.2RC1 Ctrl-F9 not working

2013-11-14 Thread Henry Vermaak
On Wed, Nov 13, 2013 at 11:17:59PM +0100, Bart wrote:
 On 11/13/13, Mattias Gaertner nc-gaert...@netcologne.de wrote:
 
  Check your short cuts in your system settings. They take precedence
  over any normal application like the IDE.
 
 On my Fedora 18 / KDE Ctrl+F9 does something weird to the windows that
 I cannot really describe or give a name.
 I'm too lazy to look it up and disable it.
 
 (On my old Suse 10.0 disabling system setting for Ctrl+F9 took me 2
 days to find...)

In case anyone is struggling to find it in XFCE: Settings-Window
Manager-Keyboard.  Disable the shortcut for Workspace 9.

Henry

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


Re: [Lazarus] Lazarus 1.2RC1 Ctrl-F9 not working

2013-11-13 Thread Henry Vermaak
On Wed, Nov 13, 2013 at 04:38:28PM +0100, Mattias Gaertner wrote:
 On Wed, 13 Nov 2013 15:05:20 +
 Richard Mace richard.m...@gmail.com wrote:
 
  Hi All,
  Running the latest RC in stock Xubutu 12.04 and Ctrl-F9 doesn't work, but
  if you select compile from the menu, it works fine.
  
  Any ides?
 
 Check your short cuts in your system settings. They take precedence
 over any normal application like the IDE.

XFCE use Ctrl-FunctionKey to select workspaces.  For some reason it
works for me (I only have 8 workspaces, though).

Henry

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


Re: [Lazarus] Shell notifications

2013-08-22 Thread Henry Vermaak
On Thu, Aug 22, 2013 at 01:49:28PM +0200, Sven Barth wrote:
 Am 22.08.2013 13:33, schrieb Antonio Fortuny:
 See the code in attachment
 
 I changed the code a little bit adding the OVERLAP parameter and
 events to use the async method.
 Now the same function returns error code 6
 Error code 6 is ERROR_INVALID_HANDLE (would be nice if you'd mention
 the error message as well next time when you're already using
 SysErrorMessage). FindFirstChangeNotification returns a notification
 handle, but ReadDirectoryChanges requires a directory handle (with
 FILE_LIST_DIRECTORY priviledge), so you need to open the directory
 yourself.

To add to this, the remarks section on msdn says this:

To obtain a handle to a directory, use the CreateFile function with the
FILE_FLAG_BACKUP_SEMANTICS flag.

In addition to this you're also passing an OVERLAPPED record to
ReadDirectoryChangesW(), so you'll have to use FILE_FLAG_OVERLAPPED when
you open the directory, too.

Henry

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


Re: [Lazarus] Proposal for changing fpc version on the fly in the IDE

2013-08-22 Thread Henry Vermaak
On Thu, Aug 22, 2013 at 05:12:04PM +0300, patspiper wrote:
 On 22/08/13 16:23, Mark Morgan Lloyd wrote:
 I usually add a couple of symlinks in /usr/local/bin e.g. ppcsparc
 - ppcsparc-2.6.2 and ppcsparc-2.6.2 -
 /usr/local/lib/fpc/2.6.2/ppcsparc. The fpc binary will be the one
 installed by the most recent build.
 
 You are tweaking your system unnecessarily. Just make sure that both
 folder paths are exported and forget about any symlinks. That's by
 far more flexible, easily upgradeable, and less prone to errors.

Executing `fpc -Vversionstr` will call ppcbin-versionstr, so those
symlinks are actually quite useful if you want to use different compiler
versions.

Henry

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


Re: [Lazarus] Shell notifications

2013-08-21 Thread Henry Vermaak
On Wed, Aug 21, 2013 at 12:36:56PM +, Mark Morgan Lloyd wrote:
 Michael Schnell wrote:
 On 08/20/2013 02:56 PM, Henry Vermaak wrote:
 ... together with select()..
 
 In Object Pascal I think this should be encapsulated in a thread
 and same fires a main Thread event (via TThread.Queue,
 TThread.Synchronize, or Application.QueueAsyncCall) to notify the
 user (aka Main Thread).
 
 I know it's the obvious way, but surely there is something more
 elegant than having a thread which exists solely to transfer the
 result of a select() to the main part of the app, and then repeats.

Well, the thread exists only because of the blocking nature of the
wait/select function.  If that's the only task of the application the
thread isn't needed, of course.

It's more portable and self contained than the alternatives I can think
of.  The most efficient way to do this would probably be to plumb it
straight into the event loop that is in use (if there is one).  E.g. you
can add file descriptors to the glib event loop.  I don't know how that
can be done with the Windows message loop, mind you.  This approach
isn't easy to abstract, though.

Henry

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


Re: [Lazarus] Shell notifications

2013-08-20 Thread Henry Vermaak
On Tue, Aug 20, 2013 at 02:22:02PM +0200, Antonio Fortuny wrote:
 Hi Folks.
 
 Do you know any component / tool to allow an application to be
 notified by the host OS when something changes in a disk directory ?
 Both Windows  Linux.

inotify on linux (together with select()).  I'm told
FindFirstChangeNotification() is the thing to use on Windows, but I've
never tried.

Henry

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


Re: [Lazarus] Shell notifications

2013-08-20 Thread Henry Vermaak
On Tue, Aug 20, 2013 at 03:21:01PM +0200, Antonio Fortuny wrote:
 Le 20/08/2013 14:56, Henry Vermaak a écrit :
 On Tue, Aug 20, 2013 at 02:22:02PM +0200, Antonio Fortuny wrote:
 Hi Folks.
 
 Do you know any component / tool to allow an application to be
 notified by the host OS when something changes in a disk directory ?
 Both Windows  Linux.
 inotify on linux (together with select()).  I'm told
 Couldn'f find any inotify.* unit into my FPC/Lazarus installation
 Only an inotify.h

It's in the linux unit, since inotify is linux specific.

 FindFirstChangeNotification() is the thing to use on Windows, but I've
 never tried.
 I did and it runs OK as it is part of the kernel32.dll. But I'll
 have to run into a loop as this shell function is not event driven.
 I'll maybe make a wrapper onto it using a separated thread.

You can use a wait function (e.g. WaitForMultipleObjects) with the
handle that FindFirstChangeNotification() returns.  So start a thread,
get the handle, use wait function and call an event when the wait
function indicated that something happened with the handle.  Repeat.

You'll have to do something similar for the linux implementation: start
a thread, get inotify fd, add that to fpselect(), call some event
when fpselect() indicates that the fd is readable. Repeat.

Henry

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


Re: [Lazarus] Path that .exe file is running from

2013-08-02 Thread Henry Vermaak
On Fri, Aug 02, 2013 at 10:58:02AM +0200, Michael Schnell wrote:
 On 08/02/2013 10:32 AM, Michael Van Canneyt wrote:
 On Fri, 2 Aug 2013, Michael Schnell wrote:
 On 08/01/2013 08:56 PM, Richard Mace wrote:
 Application is only available when using appropriate
 WidgetTypes. Not when doing simple command line tools.
 It is if you use TCustomApplication from custapp.
 This _is_ a (on that behalf)  appropriate WidgetType (for a
 non-GUI Application) :-)

It's not a widget type, it's just a class.  I use it in all my command
line programs, big or small.

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-17 Thread Henry Vermaak
On Wed, Jul 17, 2013 at 09:49:48AM +0200, Reinier Olislagers wrote:
 On 16/07/2013 18:18, Henry Vermaak wrote:
  On Tue, Jul 16, 2013 at 12:23:10PM +0200, Reinier Olislagers wrote:
  On 16-7-2013 11:53, Henry Vermaak wrote:
  Ranting from a position of ignorance seriously dilutes your credibility
  in my book.
 
  I'm just saying the rants may be justified if mysql cannot be configured
  to follow the RDBMS integrity norms.
  Obviously you don't know if that is possible either, so let's give the
  ranters the benefit of the doubt.
  
  Sigh, I thought I was clear on that.  Using Graeme's example:
 
 So, QED: Mysql is not standards-compliant, the ranters have a point?

WTF?  Graeme complained that the insert didn't fail in his example, I
just showed that if you select the traditional sql mode, it does fail.
As documented.  So the ranters don't have a point, since they can set
the sql mode in the configuration of the server, or even per session (as
many people already do).

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-16 Thread Henry Vermaak
On Tue, Jul 16, 2013 at 08:33:45AM +, Mark Morgan Lloyd wrote:
 Reinier Olislagers wrote:
 
 It's not a bug, it's a feature: MySQL accepts data other DBs wouldn't
 touch with a 10 foot pole ;)
 (Don't ask about it proceeding and mangling that data - that's beside
 the point ;) )
 
 If it really is so bad, why have so many developers- in particularly
 web developers- clasped it to their bosom?

Probably not, no, given that it's used by wikipedia, google, twitter,
etc.  It just seems like Graeme and Michael are complaining that it
doesn't default to strict mode (i.e. traditional mode in mysql
parlance).  Lots of credibility lost if people rant about something that
they can actually configure the way they like.

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-16 Thread Henry Vermaak
On Tue, Jul 16, 2013 at 11:22:44AM +0200, Reinier Olislagers wrote:
 On 16-7-2013 11:17, Henry Vermaak wrote:
  On Tue, Jul 16, 2013 at 08:33:45AM +, Mark Morgan Lloyd wrote:
  If it really is so bad, why have so many developers- in particularly
  web developers- clasped it to their bosom?
  
  Probably not, no, given that it's used by wikipedia, google, twitter,
  etc.  It just seems like Graeme and Michael are complaining that it
  doesn't default to strict mode (i.e. traditional mode in mysql
  parlance).  Lots of credibility lost if people rant about something that
  they can actually configure the way they like.
 
 Would you happen to know how those people programmed their backends?
 Using the crummy code mentioned in the thread or code that expects RDBMS
 behaviour?

Sorry, my crystal ball is in for repairs, you'll have to spell out your
point for me.

 There's lots of whacky code out there that still is used in production,
 and patched endlessly whenever the next error pops up. Doesn't mean it's
 a good idea to go down that path.

A universal truth, but I can't see how it's unique to mysql?

 That said, I agree about the configuring+ranting part, but I'm not sure
 to what level of strictness you can actually configure MySQL. And I'm
 not interested enough to find out - Firebird suits me just fine.

Ranting from a position of ignorance seriously dilutes your credibility
in my book.

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-16 Thread Henry Vermaak
On Tue, Jul 16, 2013 at 11:28:38AM +0200, Michael Schnell wrote:
 On 07/16/2013 11:17 AM, Henry Vermaak wrote:
 Probably not, no, given that it's used by ...
 
 I seem to find out that this discussion is about experts making fun
 on each other, just wasting some bandwidth :-) .

They're just paying you back in kind :)

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-16 Thread Henry Vermaak
On Tue, Jul 16, 2013 at 12:23:10PM +0200, Reinier Olislagers wrote:
 On 16-7-2013 11:53, Henry Vermaak wrote:
  Ranting from a position of ignorance seriously dilutes your credibility
  in my book.
 
 I'm just saying the rants may be justified if mysql cannot be configured
 to follow the RDBMS integrity norms.
 Obviously you don't know if that is possible either, so let's give the
 ranters the benefit of the doubt.

Sigh, I thought I was clear on that.  Using Graeme's example:

mysql set sql_mode = TRADITIONAL;
Query OK, 0 rows affected (0.00 sec)

mysql create table a (b int not null, c int not null);
Query OK, 0 rows affected (0.10 sec)

mysql insert into a (b) values (1);
ERROR 1364 (HY000): Field 'c' doesn't have a default value
mysql 

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-16 Thread Henry Vermaak
On 16 Jul 2013 20:39, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk
wrote:

 Henry Vermaak wrote:

 On Tue, Jul 16, 2013 at 12:23:10PM +0200, Reinier Olislagers wrote:

 On 16-7-2013 11:53, Henry Vermaak wrote:

 Ranting from a position of ignorance seriously dilutes your credibility
 in my book.

 I'm just saying the rants may be justified if mysql cannot be configured
 to follow the RDBMS integrity norms.
 Obviously you don't know if that is possible either, so let's give the
 ranters the benefit of the doubt.


 Sigh, I thought I was clear on that.  Using Graeme's example:

 mysql set sql_mode = TRADITIONAL;
 Query OK, 0 rows affected (0.00 sec)

 mysql create table a (b int not null, c int not null);
 Query OK, 0 rows affected (0.10 sec)

 mysql insert into a (b) values (1);
 ERROR 1364 (HY000): Field 'c' doesn't have a default value
 mysql


 I certainly sympathise with your argument Henry, but I'm a bit concerned
if MySQL is prepared to accept a not null constraint that it does not
intend to enforce. So assuming that there is no sql_mode change between
these two commands (using the earlier example):


 mysql create table a (b int not null, c int not null);
 Query OK, 0 rows affected (0.17 sec)


 mysql insert into a (b) values (1);
 Query OK, 1 row affected, 1 warning (0.03 sec)

 one or other of them should at the very least raise a warning.

Not specifying a default is perfectly legitimate, that's why the insert
fails in strict mode (in my example).  You just have to enable the strict
mode, since the default mysql mode uses an implicit default.

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 02:49:06PM +0100, Graeme Geldenhuys wrote:
 On 2013-07-15 13:43, leledumbo wrote:
  
  Or if they insist on using MySQL (compatible alternative): MariaDB
 
 Nope, still not! I'll not touch MySQL, MariaDB or anything based on
 those with a 10 foot pole! If you value your data, stay away from those two.
 
 Another developer enlightened me on how bad MySQL really is, and I
 confirmed what he said on two of my servers (Linux and FreeBSD).
 
 Here is the simple test to show how bad MySQL/MariaDB is...
 
 -[ Forwarded message ]---
 This test was done on a newly setup FreeBSD server - no tweaking to
 MySQL was done - just the default install.
 
 mysql create table a (b int not null, c int not null);
 Query OK, 0 rows affected (0.17 sec)
 
 mysql insert into a (b) values (1);
 Query OK, 1 row affected, 1 warning (0.03 sec)
 
 As if the above was not miraculous enough, then you get:
 
 mysql select * from a;
 +-+-+
 | b | c |
 +-+-+
 | 1 | 0 |
 +-+-+
 1 row in set (0.00 sec)
 
 Unbelievable!

Could you explain why the above is bad for those of us that aren't DB
experts?  To my untrained eye it looks fairly plausible, so I'm
obviously missing something.

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 04:53:25PM +0100, Graeme Geldenhuys wrote:
 The case sensitivity in the table names is also crazy, especially if
 the database gets moved. I had to modify quite a lot of SQL statements
 because of that. For MySQL support I had to look up the table name (as
 MySQL has it), then modify lots and lots of SQL in my application to
 match that case exactly. Crazy stuff!

I understand the case sensitivity problem, since tables are stored in
separate files for some engines (I think).  There's a simple solution,
though, use lower_case_table_names=1, in which case tables will be
stored in lower case and lookups become case insensitive.  No need to
change SQL statements.  You may have to set this before you import the
database on the new system.  Doesn't seem like such a big deal to me,
after a little bit of RTFM.

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 03:44:42PM +0100, Graeme Geldenhuys wrote:
 On 2013-07-15 15:06, Henry Vermaak wrote:
  Could you explain why the above is bad for those of us that aren't DB
  experts?  To my untrained eye it looks fairly plausible, so I'm
  obviously missing something.
 
 I never inserted data into column C, so MySQL decided on its own that it
 should magically contain the value 0 — inventing data! Last time I
 checked 0  null in SQL terms either.

I seem to remember something about table columns having default values
in the definition, so perhaps column C defaults to 0?  0 != NULL, so it
didn't break your definition?

Henry

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


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 04:37:35PM +0200, Michael Van Canneyt wrote:
 On Mon, 15 Jul 2013, Henry Vermaak wrote:
 Could you explain why the above is bad for those of us that aren't DB
 experts?  To my untrained eye it looks fairly plausible, so I'm
 obviously missing something.
 
 Simple. The statement
 
 create table a (b int not null, c int not null);
 
 creates a table called 'a', in which the fields b and c are required.
 that is, they cannot be NULL.
 
  mysql insert into a (b) values (1);
 
 Attempts to insert a record with value NULL for C, which is
 explicitly forbidden by the definition of the table.

0 != NULL, it's inserting the default value for the field, which seems
to be 0 for an integer field.

Does e.g. postgres error on an insert statement like this?

Henry

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


Re: [Lazarus] FPC source index

2013-06-20 Thread Henry Vermaak
On Wed, Jun 19, 2013 at 07:49:27PM +0200, Mattias Gaertner wrote:
 On Wed, 19 Jun 2013 15:16:33 +0100
 Henry Vermaak henry.verm...@gmail.com wrote:
 
  Hi list
  
  Is there a way to force the Rescan FPC Source Directory to not run in
  OnIdle?
  
  I've got an ARM computer with slow storage and I thought I'd leave the
  IDE for a while to wait for this operation to finish, only to realise
  that nothing happens when I'm not moving the mouse around/typing.  The
  IDE is a bit useless without the ability to Ctrl-click my way around,
  but I got tired waving the mouse around after 5 minutes.
 
 Many IDE tasks run on idle. The idle event is crucial for the LCL
 itself.

How does the IDE make sure these things keep running when there's no
activity?  Do you use OnIdleEnd?  Or do you set Done := False in the
OnIdle handler?

 What widgetset?

It's gtk2, on some recent flavour of Ubuntu.  Without the source index,
it seems like I can't even double click on events in the object
inspector to create handlers, since it tells me that Classes can't be
found.  It's happy building existing projects, though.

Henry

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


Re: [Lazarus] FPC source index

2013-06-20 Thread Henry Vermaak
On Thu, Jun 20, 2013 at 10:17:51AM +0100, Henry Vermaak wrote:
 It's gtk2, on some recent flavour of Ubuntu.  Without the source index,
 it seems like I can't even double click on events in the object
 inspector to create handlers, since it tells me that Classes can't be
 found.  It's happy building existing projects, though.

OK, the idle stuff may be a red herring.  If I rebuild lazarus with
VerboseFPCSrcScan defined, rescanning the FPC source takes a couple of
seconds and everything works fine.

I can't see anything obvious that would cause this, but I don't know
about the side effects of calling some of the functions inside those
define blocks.  There may also be threading/memory bugs, of course.

Please let me know what I can do to provide more useful information.

Henry

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


[Lazarus] FPC source index

2013-06-19 Thread Henry Vermaak
Hi list

Is there a way to force the Rescan FPC Source Directory to not run in
OnIdle?

I've got an ARM computer with slow storage and I thought I'd leave the
IDE for a while to wait for this operation to finish, only to realise
that nothing happens when I'm not moving the mouse around/typing.  The
IDE is a bit useless without the ability to Ctrl-click my way around,
but I got tired waving the mouse around after 5 minutes.

Henry

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


Re: [Lazarus] New competition for Lazarus

2013-05-30 Thread Henry Vermaak
On Thu, May 30, 2013 at 11:58:29AM +0100, Graeme Geldenhuys wrote:
 Hi,
 
 I just saw this thread. The PilotLogic guys (creators of the CodeTyphoon
 project) has finally decided to fork Lazarus IDE and go their own route.
 Here are some early days screenshots.
 
 http://www.pilotlogic.com/sitejoom/media/kunena/attachments/63/OpenIntiana64_2013-05-27.jpg
 
 http://www.pilotlogic.com/sitejoom/media/kunena/attachments/63/Screenshot_2013-05-28.jpg
 
 
 They plan to add multi-architecture / dual personalities (32-bit 
 64-bit executables) on a single system, improved cross-compile support
 with easy switching and indicator, C/C++ support, support more platforms
 etc.
 
 
 For the full thread, here is the link.
 
 
 http://www.pilotlogic.com/sitejoom/index.php/forum/ct-lab-news/2509-ct-4-30-lab-new-ide?limitstart=0start=24

This thread doesn't have any information about why they're doing this or
what the improvements are.  Is there any other discussion?

Henry

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


Re: [Lazarus] New competition for Lazarus

2013-05-30 Thread Henry Vermaak
On Thu, May 30, 2013 at 08:40:14AM -0300, William Oliveira Ferreira wrote:
 Seems to be in a good path. They're fork Will be open source?

No choice, the Lazarus IDE is GPL, so all derivative work needs to be
supplied.

Henry

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


Re: [Lazarus] Is Mantis bad as i thought

2013-04-05 Thread Henry Vermaak
On 5 April 2013 10:12, Zaher Dirkey parm...@gmail.com wrote:
 On Thu, Apr 4, 2013 at 11:38 PM, Bart bartjun...@gmail.com wrote:

 I don't want mail from Mantis, but it insists on sending it to me anyway.


 You can stop it from your account options, because it is sending mails for 
 all bugs not just you monitored.

Yes, there are the settings that each user can change.  I'd recommend
that these are all enabled, since the default Mantis behaviour is to
only notify you about bugs that you have reported, commented on, or
monitor.

There are also per-project settings that determine who gets
notifications of new bugs, etc.  Some of these setting were broken,
but they have hopefully been fixed shortly after we've upgraded the
mantis installation, so per-user settings can be enabled again.  If
something doesn't work as expected, report it under the mantis section
in the bug tracker.

Disclaimer:  I'm not an administrator, so I can't check/fix these
settings, but I can hassle Michael :)

Henry

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


Re: [Lazarus] Menu key brings up wrong menu in source code editor

2013-03-14 Thread Henry Vermaak
On Thu, Mar 14, 2013 at 11:03:22PM +0100, Sven Barth wrote:
 On 13.03.2013 19:08, Frank Church wrote:
 
 https://forums.embarcadero.com/message.jspa?messageID=535727
 
 Graeme was rather mild in that discussion, not the usual Graeme :).
 The Embarcadero guys were just laughable, not confidence inspiring at
 all, they are clearly in denial.
 
 He was indeed rather mild. :)

And Rudy came across as frothing-at-the-mouth irrational.  Nice one,
Graeme.

Henry

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


Re: [Lazarus] Signal handling

2013-02-20 Thread Henry Vermaak
On Feb 20, 2013 9:16 AM, Mark Morgan Lloyd 
markmll.laza...@telemetry.co.uk wrote:

 Mark Morgan Lloyd wrote:

 If I want to poll a variable set by an asynchronous unix-style signal,
i.e. that doesn't have an OS-level handle and where the latency should
probably be of the order of 100mSec, what's the most effective technique?


  If I understand correctly, the self pipe trick is probably best, then
  you don't have to poll, just add the handle to select().

 But there's no handle, simply a (global) variable. This continues from an
earlier discussion where Sven was cautioning that about the only thing you
could do safely in a signal handler was set a (global) variable: that bit I
knew, but I don't know how best to deal with the variable once set if
there's no convenient timer etc. (I should have threaded the question onto
that, but I thought it was on a different list).

You create the pipe, add the read end fd to select, write a byte to the
write end fd in the signal handler.  There are a bunch of examples floating
around on the web.

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


Re: [Lazarus] Finding out how a program's being terminated

2013-02-16 Thread Henry Vermaak
On Sat, Feb 16, 2013 at 06:43:51PM +0100, Michael Van Canneyt wrote:
 On Sat, 16 Feb 2013, waldo kitty wrote:
 On 2/16/2013 08:30, Hans-Peter Diettrich wrote:
 Procedures even may be different for Linux and Windows, depending on the
 signal/message types. Even if a program can ignore SIGTERM, can
 it also inform
 the system that it doesn't *want* to close? On Windows a program
 can stop an
 shutdown, maybe not on other platforms.
 
 i have exactly this problem to deal with on *nix... my app needs
 to be allowed to complete its shutdown closeout procedures or
 there are problems on the next boot when it is started up... on
 shutdown, app managed data is removed from a living data file to
 another file for restoration on startup... this takes longer than
 5 seconds and it hurts at times when the system sigkills the app
 :/
 
 Why not just rename the file and do the cleanup on startup ?

Some editors do it like this, e.g. if I edit a file in vim and then kill
it from another terminal:

hcv@hcv-q45:~$ vim test.txt
Vim: Caught deadly signal TERM
Vim: preserving files...
Vim: Finished.

The next time I try to edit that file, it asks me if I want to recover
it.  This has saved me more than once :)

Henry

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


Re: [Lazarus] Converting pence into pounds and then to string

2012-12-12 Thread Henry Vermaak
On Wed, Dec 12, 2012 at 11:23:46AM +, Richard Mace wrote:
 Hi All,
 Got a simple question that has stumped me, which tends to happen if I don't
 do development for a couple of months.
 
 How's the best way of converting an integer number 208 (that is pence)
 into a string value that is in pounds (2.08)

Format('%d.%.2d', [Price div 100, Price mod 100])

Henry

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


Re: [Lazarus] 2nd call (PPC needed for MAc) [Re: Beta testers needed / Lazarus with Editor-Macro-Script]

2012-12-07 Thread Henry Vermaak
On 07/12/12 09:23, Mark Morgan Lloyd wrote:
 Martin wrote:
 - intel/amd : Looks like they should work now.
 - ARM is known NOT to work
 - PPC is known only to compile for Mac (but not tested)

 So I need someone to test on a PPC Mac, please.
 
 Hosted on what OS? I can do Linux but wasn't aware of an alternative.

The code only worked for darwin, unless someone added support for linux
procedure call.  There isn't much difference between the two (iirc).

Henry

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


Re: [Lazarus] 2nd call (PPC needed for MAc) [Re: Beta testers needed / Lazarus with Editor-Macro-Script]

2012-12-07 Thread Henry Vermaak
On 7 December 2012 15:15, Martin laza...@mfriebe.de wrote:
 On 07/12/2012 09:43, Henry Vermaak wrote:
 The code only worked for darwin, unless someone added support for linux
 procedure call.  There isn't much difference between the two (iirc).


 Lets see if it works for darwin.

 Do you have a list (not a huge doc, just a few lines) where the ABI differ?

No, you will have to compare the documents yourself.  I believe linux
follows the sysv abi as specified by IBM, but there may be some
deviations.

When I implemented the ARM version, I only had oabi operating systems
(with softfloat) and fpc didn't even have working eabi support.  That
has changed now, and the code will have to be modified for armhf (with
vfp3) using eabi to support most of the latest arm devices.  This will
be a more invasive change, though

Also note that I never used classes with pascalscript, so that
probably never worked.  I still find this exercise a bit crazy,
though, since all this knowledge is already in the compiler, which
could harness it to implement an invoke function, which would mean
that pascalscript won't need any platform specific code.

Henry

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


Re: [Lazarus] lazbuild changes

2012-12-06 Thread Henry Vermaak
On 6 December 2012 16:29, Mattias Gaertner nc-gaert...@netcologne.de wrote:

 Mattias Gaertner nc-gaert...@netcologne.de hat am 6. Dezember 2012 um 17:26
 geschrieben:

  Hi,

  Two changes to lazbuild:

  1. When compiling a project it does the same check as the IDE. If the 
 project
 is uptodate it does not invoke the compiler.
  2. I added verbosity options to lazbuild:
  Add -v to increase verbosity and -q to decrease. You can pass both multiple
 times.

 Sorry, I meant --verbose and -q or --quiet. The -v is already taken for 
 printing
 the version.

Great, thanks!

Henry

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


Re: [Lazarus] Cross-compiling - MIPS

2012-10-22 Thread Henry Vermaak
On 22/10/12 09:20, Mark Morgan Lloyd wrote:
 SkyDiablo wrote:
 hiho!

 i search a solution to build my hello world source from my windows
 x64 system to a openWRT (linux) with a MIPS CPU system -
 cross-compiling?

 i do not find a working solution :( now i'm trying to build with a
 debian system, but is dosnt work for now :(
 
 First, this is the Lazarus conf and while FPC now works (subject to some
 potential code generation issues) targeting little-endian MIPS it's
 probably some while before Lazarus will. The issue here is that building
 Lazarus requires the current stable version of FPC (2.6.0), while MIPS
 is only available for trunk (2.7.1 from svn).

I built lazarus with fpc 2.7.1 for armhf this weekend.  Why do you say
2.6.0 is needed?

Henry

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


Re: [Lazarus] Cross-compiling - MIPS

2012-10-22 Thread Henry Vermaak
On 22/10/12 10:02, Mark Morgan Lloyd wrote:
 Henry Vermaak wrote:
 I built lazarus with fpc 2.7.1 for armhf this weekend.  Why do you say
 2.6.0 is needed?
 
 Because of the feeling with which most developers insist that 2.6.0 is
 the one true way :-)

Yes, I tend to use 2.6.0, too, but armhf port doesn't exist in 2.6.0
(afaik) :)

 OK, I'll try it for MIPS in a couple of days. I presume you were using
 Lazarus trunk.

Yes.  I remember a rule that lazarus trunk is supposed to compile with
both the latest fpc release and fpc trunk.  Don't know if that's still
the case, though.

Henry

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


Re: [Lazarus] Defeating a screen saver

2012-09-25 Thread Henry Vermaak
On 25/09/12 11:01, Mark Morgan Lloyd wrote:
 I appreciate that there might be no guaranteed portable answer to this
 one, and FWIW I'm primarily interested in the Linux+X+KDE combination.
 
 If a program knows that something's going on that it might later need to
 tell the user about, e.g. that there's serial comms going on in the
 background even if the GUI's not being updated, is it possible to do
 anything that the LCL and lower levels will interpret similarly to
 keyboard and mouse activity in order to prevent a screen saver from
 kicking in?

xdg-screensaver is a script that you can use to control the screensaver
(seems to support all the ones I know).  It's in the xdg-utils package
on my system.  I don't know of a nicer way to do this and cover all the
bases, except to use dbus with org.freedesktop.ScreenSaver, most desktop
environments should work with that, I think.

Henry

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


Re: [Lazarus] Lazarus and Ubuntu 12.10

2012-09-25 Thread Henry Vermaak
On 25/09/12 00:38, Andrew Brunner wrote:
 Is anyone running Lazarus 1.1 on Ubuntu 12.10x64?
 
 I'm having problems getting lazarus to startup.  Is anyone else having
 success or confirmed problems?

Do you have more information?  Back traces?  Maybe unity is causing more
problems (remember liboverlay?).

Henry

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


Re: [Lazarus] Debugging shared libraries

2012-09-19 Thread Henry Vermaak
On 16/09/12 14:26, Mark Morgan Lloyd wrote:
 I've developed a useful convention which allows me to either load a
 library on demand (via Dynlibs) or to link it statically. This
 combination allows me to use standard Lazarus debugging techniques to
 sort out most problems.
 
 However, yesterday's discussion about calling /from/ a
 dynamically-loaded library /into/ a program binary (other than the main
 program) raises an interesting question: can Lazarus+gdb be persuaded to
 trace into a shared library?

Whenever I've tried, Lazarus hasn't had any problems stepping into my
libraries (written in C).  I usually don't use a debugger, though, so my
experience is limited.

Henry

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


Re: [Lazarus] Process ID

2012-09-13 Thread Henry Vermaak
On 13/09/12 17:04, Marco van de Voort wrote:
 On Thu, Sep 13, 2012 at 09:08:19AM +, Mark Morgan Lloyd wrote:
 So be fair, I don't think I have ever come across a Linux distro that 
 doesn't include the ps binary as standard. And I have used Linux since 
 1996. Even *BSD and *Solaris include the ps binary as standard too.

 Yes, but the ps parameters vary. I'm using this stuff in my FPC build 
 script on Linux and Solaris.
  
 Can anybody say what the xBSD situation is? What's in /proc/nnn ?
 
 In BSD /proc/a pid contains 
 
 [marcov@dragon ~]$ ls /proc/44539
 cmdline ctl etype   filemap rlimit  status
 [marcov@dragon ~]$
 
 but afaik BSDs can turn /proc off, and this is commonly done so on servers.
 
 /proc is only a SysV compatibility feature there,
 most BSD-own tools work via other interfaces (like sysctl(3))

It's also possible to do this on linux with sysctl (I've got some c
source somewhere), but use of sysctl is strongly discouraged now (in
favour of /proc).

Henry

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


Re: [Lazarus] PascalScript on Win x64

2012-09-04 Thread Henry Vermaak
On 04/09/12 14:45, Martin wrote:
 
 The point I meant to made is: you still need to get the value into that
 register, or set up the stack. That can only be done in asm

No, you don't need to do anything.  Invoke calls the function with the
supplied Args, which is exactly what the assembler code in
pascalscript does.

Henry

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


Re: [Lazarus] fpWeb long process progress

2012-08-15 Thread Henry Vermaak
On 15 August 2012 09:28, Michael Schnell mschn...@lumino.de wrote:
 On 08/15/2012 12:14 AM, Leonardo M. Ramé wrote:

 in my case, I know in advance the process wouldn't take more than one
 minute,

 I feel that (without some special configuration) a normal web server will
 kill a standard CGI process that takes more than just a few seconds before
 returning.

Apache defaults to 300 seconds for its core timeout (which includes
mod_cgi).  Different modules have their own configuration settings,
e.g. php have a max_execution_time, which defaults to 30 seconds
afaik.

Henry

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


Re: [Lazarus] Inno Setup no longer supports Windows 95, Windows 98, Windows Me

2012-08-03 Thread Henry Vermaak
On 03/08/12 09:43, Graeme Geldenhuys wrote:
 HI,
 
 On 2 August 2012 18:38, Reinier Olislagers reinierolislag...@gmail.com 
 wrote:
 Ehmm.. I'm trying to contain myself, but WHY does Lazarus 1 and 1+ even
 support Win9x/ME anymore?
 
 Because not everybody feels the need to fix what isn't broken. Why

Lol, you owe me a new keyboard.  No updates for 6 years from MS, no
journalling filesystem (no ntfs).  Stop talking out of your backside.

I personally think it's immoral to support these operating systems.
People should be forced away from them for their own good (security
wise), since they obviously know no better.  By supporting them, you
just drag out the process.

Henry

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


Re: [Lazarus] Inno Setup no longer supports Windows 95, Windows 98, Windows Me

2012-08-03 Thread Henry Vermaak
On 03/08/12 10:46, Graeme Geldenhuys wrote:
 Hi,
 
 On 3 August 2012 10:08, Henry Vermaak henry.verm...@gmail.com wrote:

 Lol, you owe me a new keyboard.  No updates for 6 years from MS, no
 journalling filesystem (no ntfs).  Stop talking out of your backside.
 
 
 And how often did updates break an existing system. I have
 experienced this plenty of times! Hence, if my system works, I don't
 bother with updates any more. I'm behind a secure firewall, so no
 issues for me.

A system doesn't work if it corrupts data if you get a power cut.
Power cuts are quite common in South Africa now, I hear.

 I personally think it's immoral to support these operating systems.
 People should be forced away from them for their own good (security
 
 We have clients that run their Win98 systems in a class-room
 environment where they have NO internet access. So security is no
 issue to them either. And if the current system with the latest
 service packs runs there systems perfect, why must they be forced to
 upgrade. You clearly have NO CLUE has to how much time and effort and

Fair enough, I see that cost is an issue for these people (I'm from
Africa too, after all).  This is something they can remedy by moving to
a more open platform, as many organisations have, which will give the
software (and hardware) a much more guaranteed future.  This may also
cost them, in the short term - but it will cost them more if they choose
the easy way out.

 Typical response from a hobby
 programmer with no real clients.

How childish, but I expect no less from you.  This would be a
compliment, actually, but it's not true.  I wish I was a hobby
programmer, then I won't have to make ridiculous concessions to ignorant
customers.  Then I won't have to rush software out the door before I'm
happy with it.  Then I won't get my arm twisted to support platforms
that hurt my industry and profession.

Henry

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


Re: [Lazarus] Inno Setup no longer supports Windows 95, Windows 98, Windows Me

2012-08-03 Thread Henry Vermaak
On 03/08/12 15:26, Sven Barth wrote:
 On 03.08.2012 11:08, Henry Vermaak wrote:
 I personally think it's immoral to support these operating systems.
 People should be forced away from them for their own good (security
 wise), since they obviously know no better.  By supporting them, you
 just drag out the process.
 
 You must see it that way: Win9x systems are so old that nobody even
 wants to write malicious software for them anymore :P (yes, this is ment
 with a bit of irony/sarcasm)

Even malware rely on new Windows functionality :)

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


  1   2   3   4   5   >