Re: [Lazarus] How to clear screen in console app
Michael Van Canneyt wrote: On Sat, 23 Apr 2016, Bo Berglund wrote: On Sat, 23 Apr 2016 07:32:55 +0200, Bo Berglund <bo.bergl...@gmail.com> wrote: I need to make a console app that can run on Linux. It would be a simple thing I believed, but no... I cannot get the ClrScr command working, it just puts strange characters on the screen instead of clearing it. ... But the console debug window just shows a bunch of control characters (square with 001B inside) plus [6n [H [m [H [2JEnter command: And every command I enter results in a new line being displayed rather than staying on the same line and erasing the previous output. UPDATE: It seems to be caused by the Lazarus debug console window! If I go to the dir where the program resides in my terminal (both local and via SSH) and execute ~/tmp/project1 then it looks OK. So my question now changes to: Why does the debug window show different output than the actual terminal console? I am using Lazarus 1.6 release and fpc 3.0.0 both built from svn sources on a Raspberry Pi3 with Raspbian Jessie if that matters. The console respects the special terminal control characters. The debug window does not respect these characters, and just prints them out to screen. I am not sure this can be properly handled. Maybe there is an option that can be given to xterm to respect the characters. If you are debugging using SSH, then you probably need to add the -t option. The console window in which the shell and app run might have different commands, depending on what's actually being used (i.e. xterm, an SSH session from a remote system and so on). The console window will have an associated $TERM shell description, and strictly speaking the program that wants to clear the screen should refer to this possibly using curses or libtinto. I don't know whether the ClrScr procedure refers to libtinfo, or what properties libtinfo thinks the debug window has. It could probably be argued that the debug window should set TERM to indicate that it doesn't obey commands, but I'd suggest that if the program does a ClrScr then the programmer wants notification of this and it should probably /not/ wipe earlier debug output. After all, the debug window is there for debugging, not for normal interaction. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Bashing the developers
Juha Manninen wrote: users who don't understand the psychology behind the attacks, That makes it sound as though the unpleasantness is orchestrated, or at least premeditated. I thinks that's some way from being proven. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Rapberry Pi 3 performance
Bo Berglund wrote: On Wed, 06 Apr 2016 09:33:45 +0200, Michael Schnell <mschn...@lumino.de> wrote: [fpc-devel] Bug 29760 on FPC 3.0 Win64 OK, so it was on the devel list I do not often check that even though it is in GMANE. Found it now and it looks like it has something to do with operations on variables that are double and currency. Like getting the wrong exponent when multiplying them. I never ever use currency variables so I guess I am good. :) Don't guess. You're not that good. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can some fix this "make" issue? Pi related.
wkitt...@windstream.net wrote: ummm... shouldn't the compiling process use as much swap as needed if real memory it too tight (aka not enough)?? Yes, and that's outside the remit of Lazarus etc. the swap size is what attracted my attention because normally swap is the same or double what installed real memory is... eg: 16G RAM means that 16G to 32G of swap is configured... That's at the discretion of whoever built the distro, it's only a convention. Check the output of swapon -s and monitor console output for kernel messages suggesting there might be a problem. In the case of Raspbian the swap is in a file rather than a separate partition, and I've got a vague recollection that it has to be explicitly enabled the first time the system is run. If swap isn't working then something at the system level is broken. Once I'd hit on the right binaries and sources (initially, a patched 2.6.4) I've had no significant problems on either Raspbian or pukka Debian running on either a RPi 1 or 2 (3 not tested yet), with swap on either card or a USB-connected Flash stick. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can some fix this "make" issue? Pi related.
Henry Vermaak wrote: 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. Lazarus took a week to build, but would do so reliably. That sort of performance takes me back to my mainframe days :-) It does occur to me that this could be something to do with the way that the linker has been built, i.e. not strictly a Lazarus (or makefile etc.) problem. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Raspberry Pi 3 build issues
Florian Klämpfl wrote: Am 25.03.2016 um 11:19 schrieb Mark Morgan Lloyd: Bo Berglund wrote: It should be noted that the default swap file size of Raspbian is only 100MB which combined with a possible GPU memory settings will occasionally cause Lazarus builds to fail mysteriously. I originally had instructions for usage that specifically increased swap to 1000MB to get around this issue. But a forum user repeatedly claimed it was not necessary so I took tha part out and it does work on the RPi3 at least when I tried. Afetr all it has more RAM. But I agree that having bigger swap might not hurt anyway. You'll generally need something like 512Mb of available memory, i.e. RAM + swap, with the linker in particular benefiting from extra. Around here, I'm being firmly discouraged (by other colleagues with an electronics background) from putting swap on the card, but instead putting it on an external USB device with wear levelling. SD cards do wear leveling as well. My understanding is that some do and some don't. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can some fix this "make" issue? Pi related.
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. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Rapberry Pi 3 performance
Michael Van Canneyt wrote: On Tue, 29 Mar 2016, Michael Schnell wrote: On 03/25/2016 12:17 PM, Graeme Geldenhuys wrote: A word of caution, there is a major bug in FPC 3.0 regarding floating point values (see the FPC mailing list), so I wouldn't recommend anybody upgrade to FPC 3.0 at this point - at least until 3.0.2 is out. This issue has been fixed in FPC Trunk already though. They say: "This happens only on Win64 with FPC 3.0 " No, it will also happen on 64-bit arm. Or 32-bit on an RPi2 (Debian "Jessie" rather than Raspbian etc.). -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Rapberry Pi 3 performance
Michael Schnell wrote: On 03/25/2016 12:17 PM, Graeme Geldenhuys wrote: A word of caution, there is a major bug in FPC 3.0 regarding floating point values (see the FPC mailing list), so I wouldn't recommend anybody upgrade to FPC 3.0 at this point - at least until 3.0.2 is out. This issue has been fixed in FPC Trunk already though. They say: "This happens only on Win64 with FPC 3.0 " Happens on all sorts of things, depending on what selection has been made for certain underlying types. /Specifically/ happens on an RPi2, as discussed in the bug report. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Raspberry Pi 3 build issues
Bo Berglund wrote: It should be noted that the default swap file size of Raspbian is only 100MB which combined with a possible GPU memory settings will occasionally cause Lazarus builds to fail mysteriously. I originally had instructions for usage that specifically increased swap to 1000MB to get around this issue. But a forum user repeatedly claimed it was not necessary so I took tha part out and it does work on the RPi3 at least when I tried. Afetr all it has more RAM. But I agree that having bigger swap might not hurt anyway. You'll generally need something like 512Mb of available memory, i.e. RAM + swap, with the linker in particular benefiting from extra. Around here, I'm being firmly discouraged (by other colleagues with an electronics background) from putting swap on the card, but instead putting it on an external USB device with wear levelling. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LCL exports CC-licensed icons to every LCL application
Bart wrote: On 3/23/16, Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: Wandering slightly: I wonder if it would also be possible for the app to get hold of things like the Lazarus and FPC version numbers and SVN revisions? Lazarus version and fpc version is no problem. From my standard AboutDlg: if LazVersion = '' then LazVersion := 'Lazarus '+ LCLVersion; if FpcVersion = '' then FpcVersion := 'FPC ' + {$I %FPCVERSION%}; Agreed. Getting the SVN revision number- useful in particular if you're looking at a binary built with trunk- rather more of a problem. I've hacked together various stuff to retrieve e.g. the build number (optionally) stored by ld which I'd happily contribute if anybody were interested. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LCL exports CC-licensed icons to every LCL application
wkitt...@windstream.net wrote: On 03/23/2016 06:11 AM, Mark Morgan Lloyd wrote: Looking at this a different way, could the TApplication object have provision (not necessarily enabled by default) for displaying a splash form which either had a default set of acknowledgements embedded or could gather them from packages etc.? that's what i was wondering... especially since i'm likely not going to try to track down all icons and other similar code that is bundled in code that i got from somewhere (eg: lazarus) and then try to write some acknowledgement of them in some about screen that i generally don't create... if the code comes from a set of libraries that is included by default, there should also be some sort of automatic acknowledgement included as well... silk icons? tango icons? WFT? is this as bad as all those fonts that no one uses??? :sigh: Displaying a splash or clickthrough while an app is starting, or an about box in a uniform format as part of a help menu, is rather an FAQ, and since the IDE doe it well hopefully it would be easy to implement. Wandering slightly: I wonder if it would also be possible for the app to get hold of things like the Lazarus and FPC version numbers and SVN revisions? I'm currently doing this by fudging paths, but it has the unfortunate side effect that the LCL gets rebuilt on occasion as part of the app project. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Rapberry Pi 3 performance
Graeme Geldenhuys wrote: On 2016-03-23 10:22, Mark Morgan Lloyd wrote: The RPi2 is superior in almost every way. I've got an RPi3 here but won't have time to exercise it for at least a few days. My RPi 1 Model B (the original) is still ticking nicely even after so many years of usage. At one stage I used used it as a web server, then as a media player for over two years, running 24/7. Now I use it to test FPC+fpGUI builds for the ARM target. The RPi1 I've got here wasn't reliable, but it could have been a thermal runaway and I'm supposed to be testing it on a battery. From what I've read online, the RPi2 and RPi3 have way more memory and processing speed than mine. So that should be a nice welcome as a lite desktop / development environment. If we continue this it would be better in -other, but I've got a spare 2 and 3 here and would quite like to explore xdmx as we've already discussed. Potentially, a cluster of those could replace my desktop systems: I think they're entirely adequate for development. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Rapberry Pi 3 performance
Graeme Geldenhuys wrote: On 2016-03-23 04:56, Anthony Walter wrote:> I recorded a very brief video of the performance of Raspberry Pi and> Lazarus is quite usable. For a computer priced at £22, that is incredible value for money! Istill have the original RPi - maybe it's time for an upgrade. The workawesome as little micro-servers too. :) The RPi2 is superior in almost every way. I've got an RPi3 here but won't have time to exercise it for at least a few days. The Raspberry Pi Zero can, I believe, be run as a USB slave (specifically, USB OTG can be enabled by a kernel patch). That opens the possibility of using it to implement special-purpose input peripherals: has anybody used FPC etc. to play with USB Gadget programming? http://hackaday.com/2016/03/02/hack-a-ps2-keyboard-onto-your-pi-zero/ http://isticktoit.net/?p=1383 -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LCL exports CC-licensed icons to every LCL application
Ondrej Pokorny wrote: Corresponding issue report: http://mantis.freepascal.org/view.php?id=29869 Every LCL application includes icons (at least) from the famfamfam (Silk icon set) that are licensed under Creative Commons Attribution 2.5/3.0 license. As a result every LCL application that does not acknowledge them, breaks the CC license. LCL is advertised as "(L)GPL licensed with static linking exception", which is not true because the LCL includes CC-licensed icons. The Lazarus team will solve the issue for 1.6.2. We'll try to get a license exception for LCL applications. If we don't get this exception all CC-licensed icons will be removed from the LCL and will be replaced by public-domain icons. For now, please take into consideration that your LCL application must acknowledge the Silk Icon Set http://www.famfamfam.com/lab/icons/silk/ . Looking at this a different way, could the TApplication object have provision (not necessarily enabled by default) for displaying a splash form which either had a default set of acknowledgements embedded or could gather them from packages etc.? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Bug in FPC 3.0 discovered
LacaK wrote: Hello, this is notification for users, who plan upgrade to latest Lazarus 1.6 with FPC 3.0 from older versions which came with FPC 2.6.x There was discovered bug in FPC 3.0 (already fixed in trunk) when currency and double data types are involved in mathematical operations like addition or multiplication. Bug can be reproduced using simple example: var c: currency; d: double; begin c:=123.45; d:=100; writeln(c*d); // wrong result 12345 instead of 12345 end. Bug does not affects all platforms . For example Win32, Linux64 are not affected. But Win64 IS affected. This bug can cause unpredictable misbehavior. For example in database applications using fcl-db/sqlDB and NUMERIC or DECIMAL data types as described in bug report #29760 Nota bene (Koenraad, Bo): *Does* affect Raspberry Pi. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PWM on raspberry pi
Koenraad Lelong wrote: Hi, I'm trying to configure a PWM-pin on the raspberry pi 2. I'm using pigpio, with the demo-program. I configured pin 12 (GPIO 18) to be a PWM pin. When I click the PWM-button on the demo-program, the pi hangs. I have to power-cycle to "recover". I modified this: REG_GPIO = $3F000; and this : fd := fpopen('/dev/gpiomem', O_RdWr or O_Sync); // Open the master /dev/memory device I'm trying to debug this : delayNanoseconds(200); <-- breakpoint pwmf := Pointer(LongWord(Self.FPwm)+PWM0_RANGE); pwmf^ := $400 ; //max: 1023 delayNanoseconds(200); pwmf := Pointer(LongWord(Self.FPwm)+PWM1_RANGE); pwmf^ := $400 ; //max: 1023 delayNanoseconds(200); Stepping further with F8. When I press F8 on the first pwmf^ := $400; the code "singe steps" automatically, but after a number of steps the application crashes and the pi hangs. This is different from normally running the application where the application just hangs after pressing the PWM-button. Input and output works fine, as user "pi". Two things: first, Bo on 8th Oct mentioned that he'd had to modify pigpio.pas to make it compatible with the RPi2. Second, how are you physically driving the system, my experience is that remote access can be less reliable than using the directly connected screen and keyboard particularly when single-stepping. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Form Resizing
Juha Manninen wrote: I only started writing in this thread because I also fond the same behaviour as the original poster did and it seemed like that report was shunned as being bogus. So I wanted to chip in with my observations to help *the developers* to nail down and fix the problem, but now I find I am being flamed for doing so so I will stop this. No, the complaint was that you ignore replies from other people, then repeat the same issues and questions that were explained and answered already. It is unpolite. In the past, Bo's said that he's not seen all messages that were posted. However I also get the impression that I'm not the only person who's had to repeat himself. Bo: just because you don't understand something that somebody's put in an answer doesn't give you an excuse to skip that bit of his reply. I admit that I used to do that sort of thing during my earliest days of learning maths ("what's this ! supposed to mean? Let's ignore it for the moment") and it didn't exactly make me popular with my teachers. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Form Resizing
Bo Berglund wrote: I have located the release document for Raspbian Jessie here: https://www.raspberrypi.org/blog/raspbian-jessie-is-here/ A little bit down they write the following: the appearance of Raspbian is now based on version 3 of GTK+, the user interface toolkit used for the LXDE desktop environment. The older version 2 of GTK+ is slowly being replaced with version 3 If this means that Raspbian is using LXDE is beyond me but it seems like it is using gtk3 by this wording. Let's try to clarify the overall architecture one last time. i) Underlying the entire system is the Linux kernel which provides at least partial support allowing other libraries and subsystems to access the screen and other peripherals. In general, the precise version of this isn't relevant. ii) Assuming that you get a login dialog(ue) when you power up the system, that is being presented by the display manager running on top of an initial X11 session. the display manager also implements the XDMCP protocol which facilitates remote X11 sessions. iii) Example display managers are xdm, gdm, kdm, LightDM and so on. iv) When you present a valid userID and password, the display manager shuts down the original X11 session and starts up a new one using the identity of the validated user. Programs running in the context of this session are given a DISPLAY shell variable identifying it. v) The new X11 session is immediately available for programs that know the DISPLAY value, but if run like that they won't have title bars and other window "furniture" (note that this is a significant architectural difference from Windows). vi) Each X11 session has special provision for a window manager which is normally started automatically. It is this that displays the title bar etc. vii) These days, it is common for the window manager to also implement (portions of) a desktop environment. Most of these have some sort of menu button or a list of installed programs, and frequently display special entities like a trash can on the desktop background. iix) Example window managers are Gnome, KDE, OpenBox, LXDE and so on. ix) Most programs aren't bothered about what window manager is running. x) The window manager usually uses a widget set for convenience, rather than being coded directly on top of the X11 API. Example widget sets are gtk, gtk2, gtk3 and Qt. xi) You can't easily change the widget set that the window manager (desktop environment) uses, although in most cases it's possible to add alternatives. xii) As a result, you can easily find yourself in a situation where the window manager (AKA desktop environment) and programs supplied with it use one widget set, while programs that you've installed yourself use a different one: this is generally of little consequence. I strongly suggest that you make sure the Qt widget set is installed on your Raspbian, and try using Lazarus to build a program for it. My experience is that there are "rough edges" in the interaction between Lazarus and (the widget set etc. supplied with) Debian and Raspbian "Jessie", I believe that at least some of these have been discussed as bugs. I'll leave somebody else to comment on the current status of GTK3, which I think would be of general interest. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Firefox
Michael Schnell wrote: On 03/04/2016 07:50 PM, Larry Dalton wrote: Is anyone running a lazarus program on a Firefox browser? What is this supposed to mean ? AFAIK, there is an fpc to java script compile somewhere, but I don't know the state Not so closely related to Firefox: there also is an fpc to java byte code compiler (designed for doing Android apps), but I don't know the state either. I assumed he meant writing plugins using some API or other. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Form Resizing
Juha Manninen wrote: On Sun, Mar 6, 2016 at 7:27 PM, Bo Berglund <bo.bergl...@gmail.com> wrote: I have no idea what you mean by this statement... What is LXDE and how do I test Lazarus for LXDE? Bo, I have a strong feeling that you are playing dummy. Why do you do it? You must know the concept of desktop environments since you tested many distributions already. A simple google search would reveal that LXDE is a desktop environment. Assuming that Bo's running Raspbian and going back to my notes, I think that the default desktop (window manager) is OpenBox with KXDE as an alternative. Frankly, I found both to have issues and prefer running pukka Debian with KDE, although it's unclear whether the RPi will ever be a fully-supported target. In this environment the gtk2 is still selected but the form sizing issue is not apparent. Yes, the widgetset is GTK2 unless you have explicitly configured it for QT, as I wrote in my previous mail. Anyway, the problem is quite surely LXDE dependent. When I last tried the combination, Lazarus and Debian "Jessie" were uneasy companions on all platforms. I strongly suggest trying Qt as an alternative target. Then could you please find the revision that broke things under LXDE. Raspberry may be too slow for bisecting, you must do it using a faster computer. Now you are talking mystery again. I do not understand how I could do this... I explained the bisect process in an earlier mail in this same thread. I will not repeat it here. Bo, do you read the replies from other people? Sometimes you seem to ignore them completely. Seconded. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Aarch64 as CPU target for RPi3 with Linux as OS
Florian Klaempfl wrote: Am 03.03.2016 um 14:29 schrieb Alfred: Working ! Thanks very much. I have now an aarch64 fpc(laz)up executable, compiled through Lazarus. If a 64 bit RPi3 distro is available, I will report back !! I ordered also one in the hope using it to play with fpc aarch64. But currently it does not look good as it seems that it is not only a matter of the kernel but also the firmware. At least I didn't unwrap mine yet because of this, without aarch64 support I see no use for me in it. So how's this set up: the same as Debian SPARC with a 64-bit kernel and 32-bit userland? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] conditionals for detecting hardware platforms?
Bo Berglund wrote: I am programming with FreePascal and Lazarus towards a Raspberry Pi2 target platform. Doing so on the RPi2 itself is possible and basically works fine, except that the system is a bit sluggish at times Apologies for OT, but probably relevant to anybody using RPi. There's a known memory leak in irqbalance which will drive it into thrashing, see https://github.com/Irqbalance/irqbalance/issues/5 for patch. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Wiki and docs- where?
Bo Berglund wrote: On Thu, 25 Feb 2016 11:41:20 +, Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: http://www.lazarus-ide.org/ points to http://wiki.lazarus.freepascal.org/ and http://wiki.freepascal.org/Lazarus_Documentation both of which are giving me permanent 403 "Forbidden". All 3 links work OK from here (Sweden) Thanks Bo and everybody else. Jonas had added a rule limiting browser versions that were accepted. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Wiki and docs- where?
Shaun O'Connor wrote: On 25/02/2016 11:41, Mark Morgan Lloyd wrote: http://www.lazarus-ide.org/ points to http://wiki.lazarus.freepascal.org/ and http://wiki.freepascal.org/Lazarus_Documentation both of which are giving me permanent 403 "Forbidden". Anybody know what's going on? no permanent "forbidden" here either and I have some pretty stringent controls on my browser. It's definitely not a browser problem, unless the basic FPC site mandates scripting etc... I've just checked with a wide-open browser and there's no change. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Wiki and docs- where?
http://www.lazarus-ide.org/ points to http://wiki.lazarus.freepascal.org/ and http://wiki.freepascal.org/Lazarus_Documentation both of which are giving me permanent 403 "Forbidden". Anybody know what's going on? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Bo Berglund wrote: I entered the startlazarus command I have set up for Lazarus 1.6 release into the putty console after logging in and following starting XMing on windows. Amazingly I got the lazarus separate panels painted on top of my Win7 desktop but it was not possible to copy/paste or anything and the windows were sluggish at best and could not be moved. Craving managerial indulgence one last time... Try it from a desktop Linux system. I've put a lot of work over the last six months or so into an RPi attached to an HDTV screen for a hacker with sight problems, the RPi didn't work but as soon as I upgraded to an RPi2 everything came to life. That allowed me to put together a desktop system running Debian (not Raspbian) at 3840 x 2160, that can SSH into arbitrary Linux/unix systems and put Lazarus etc. onto the full sized screen (i.e. not limited by the display resolution or size on the server system) with reliable cut-and-paste. I'm also able to run some Windows versions in Qemu hosted on x86-64, and get a desktop as a window on the big display at 2560 x 1600 which is rather better than any physical displays available here, although in this case there's no direct cut-and-paste. So the end result was a damn big screen, able to run Lazarus etc. over SSH on any attached Linux/unix system, and able to run Windows in a Window. The really important thing is the SSH tunneling, and I've... Better closing this discussion before we get purged from the list Thanks for your suggestions. ..been saying that for months :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Bo Berglund wrote: On Wed, 24 Feb 2016 17:44:58 +, Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: Discussion of the remote access side of things might be better continued in either fpc-other or lazarus-other. One of the list managers warned us some while ago that this was off-topic. I know, but I started this again after seeing yet some glitches directlty connected to the Lazarus code editor when using VNC. And this was on the RELEASE version 1.6. So I thought it to be on-topic then. I agree, which is why I suggested that you raise it as a bug. Of course now discussing how to set up various displays on an RPi system might not qualify... ;-/ However, Gmane does not carry the "-other" mail lists on its news mirror and I do all of my talking here through Gmane Can't stand the email interface because I lose totally the overview and threading offered by a news service. Sorry, not my problem. (But I think fpc-other was added a few days ago, for the sake of the ifthen controversy). -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Bo Berglund wrote: On Wed, 24 Feb 2016 15:40:15 +, Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote: On 2016-02-24 15:33, Bo Berglund wrote: Or understand how the Raspbian desktop would land on the Win7 X screen. :( As far as I know you do get a X Server implementation for Windows too. You would simply start that up, use Putty to SSH (with X11 port forwarding enabled) to the RPi, and run the Lazarus executable on the RPi. The Lazarus IDE should then appear on your Windows desktop. Obviously things like "File - Open..." will display the content on the RPi and not your Windows system - but that is normally desired anyway. ;-) At least the above is how it works between my X11 based systems. Regards, - Graeme - I found this tutorial on how to use XMing with RPi: http://www.raspians.com/Knowledgebase/how-to-remote-desktop-with-xming-and-putty/ It is a bit roundabout, occupying the console connection via PuTTY, but it did work to bring up some form of X window on my screen. The displayed RPi desktop Stop right there. What you're describing there is doing a remote X11 login to the display manager [qv] running on the RPi, which starts off a window manager [qv]. The window manager supplied as default by Raspbian assumes that it's running on an RPi, and won't like being accessed over the LAN from XMing which is fairly old code and lacks stuff added comparatively recently to X11. WITH THE IMPORTANT CAVEAT THAT I'VE NOT DONE THIS MYSELF ON WINDOWS: What you should be doing is making sure that your SSH client (Putty or whatever) is set up to tunnel X11 sessions, and that the SSH server on the RPi is set up to make them available (it is on most distreaux). Then SSH into the RPi to get a shell, and run your Lazarus binary. At that point the X11 messages originated by Lazarus are tunneled over the SSH session, and the Lazarus windows/forms /should/ (if Putty+XMing really does behave like SSH etc. does on unix) appear as separate windows on your client system. What's more, /if/ things are working properly, then cut-and-paste should work. AGAIN, THAT'S WHAT HAPPENS ON UNIX. MY UNDERSTANDING IS THAT THE COMBINATION OF PUTTY AND XMING SHOULD GIVE YOU SOMETHING COMPARABLE ON WINDOWS, BUT I'VE NOT DONE IT MYSELF. With apologies to the list managers if this is considered off-topic. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Graeme Geldenhuys wrote: On 2016-02-24 15:33, Bo Berglund wrote: Or understand how the Raspbian desktop would land on the Win7 X screen. :( As far as I know you do get a X Server implementation for Windows too. You would simply start that up, use Putty to SSH (with X11 port forwarding enabled) to the RPi, and run the Lazarus executable on the RPi. The Lazarus IDE should then appear on your Windows desktop. Obviously things like "File - Open..." will display the content on the RPi and not your Windows system - but that is normally desired anyway. ;-) I'm not sure that Putty includes an X server, but it will interwork with (not sure if this name is 100% accurate) XMingw32. That's one reason why I suggested starting off with an X11 (Linux etc.) desktop system as a client. As an additional point but not directly relevant to SSH tunneling, I don't know whether the display manager (Bo, if you don't grok that see Wp) supplied as default with Raspbian allows remote logins. I've started using pukka Debian on an RPi2 with KDE hence KDM etc., which turns out to be better than Raspbian on several fronts. At least the above is how it works between my X11 based systems. Discussion of the remote access side of things might be better continued in either fpc-other or lazarus-other. One of the list managers warned us some while ago that this was off-topic. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Bo Berglund wrote: On Wed, 24 Feb 2016 15:00:42 +, Martin Frb <laza...@mfriebe.de> wrote: On 24/02/2016 13:10, Bo Berglund wrote: I have discovered a strange problem with my Lazarus 1.6 release installation on RPi2 (Raspbian Jessie) concerning keyboard entries. When I connect via VNC from my Windows7 PC I can not enter the characters < or + via the keyboard keys into the Lazarus code editor. http://bugs.freepascal.org/view.php?id=17820 I dont know if the issue is in the LCL, or in VNC. Apparently the data received from VNC does only occur with VNC. Other app may not have the issue, may simply mean that they do not check this particular part of the data, independent of its correctness Too bad then I looked at the VNC client settings but there is nothing about the keyboard. Obviously I could wire the Pi up to my monitor and hook up a different keyboard and mouse for it and work that way. But it is inconvenient since I then lose all of the normal activity on my Win7 desktop plus the ability to copy/paste between the windows. I'd expect the VNC client to use the keyboard etc. settings on that computer. And I don't have the multiple display setup that Graeme and Mark is currently discussing on the fpc-other mail lits Not really relevant, that's more to do with making it look as though multiple screens are attached to the same computer than anything else. Maybe skipping VNC in favour of X could be a solution? But I tried that when starting with the RPi2 dev system back in October and could never even understand how it worked let alone find suitable software for my Wind7 X64 laptop to work as an X server I answered that at some point. Or understand how the Raspbian desktop would land on the Win7 X screen. :( Who cares provided it works? I will go to the RPi forum and ask people there about setting up X for this purpose. As I've said multiple times before, you'd do best tunneling one app over SSH rather than putting the entire desktop over [any of several ways of doing it]. You might find this easiest if you investigated an X11-based system o your desktop, rather than Windows... at least while you're working out what's possible and what suits your working arrangements. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Martin Frb wrote: On 24/02/2016 13:10, Bo Berglund wrote: I have discovered a strange problem with my Lazarus 1.6 release installation on RPi2 (Raspbian Jessie) concerning keyboard entries. When I connect via VNC from my Windows7 PC I can not enter the characters < or + via the keyboard keys into the Lazarus code editor. http://bugs.freepascal.org/view.php?id=17820 There was an issue in that era that keys like # when the systems were set to UK layout weren't getting through. I've not seen that for a while, but that could be because even I upgrade my OS and libraries on occasion :-) I dont know if the issue is in the LCL, or in VNC. Apparently the data received from VNC does only occur with VNC. Other app may not have the issue, may simply mean that they do not check this particular part of the data, independent of its correctness I've definitely seen VNC issues affect (programs written using) Delphi. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor
Graeme Geldenhuys wrote: On 2016-02-24 13:10, Bo Berglund wrote: I have discovered a strange problem with my Lazarus 1.6 release installation on RPi2 (Raspbian Jessie) concerning keyboard entries. I don't believe that is a new issue in Lazarus though, and not limited to only VNC connections. For years I've had issues where if I changed my keyboard layout of X11 via xmodmap, while Lazarus was running, then all (most) keyboard input in Lazarus is screwed. Other running applications continue to work fine, but Lazarus not. I have to close Lazarus down and start it up again before keyboard input works correctly. I don't know if this relates to VNC, but it might - as VNC (and RDP) can do keyboard translations on the fly. eg: Me running Dvorak locally, connecting to a system that has Qwerty setup. VNC and RDP automatically makes the keystrokes for me, without me having to change the keyboard layout of the remotely system. VNC- both the standard xvnc4viewer and krdc as an alternative- has problems with some character mappings and combinations. This has long been an irritiation to me with both Delphi (on Windows) and Lazarus (on Linux or Solaris) since on occasion I've wanted to use a doubleclick plus two shift keys to get into a special "maven mode" for debugging etc., some combinations quite simply don't work with VNC while they're fine with e.g. X11 tunnelled over SSH. I don't see that as necessarily being a Lazarus problem, but Bo's observation that simple text entry fields behave differently from the IDE editor- possibly because they don't have hooks for CodeTools etc.- is arguably a bug and perhaps should be raised as such on Mantis. I think that your (Graeme) point about Dvorak etc. keyboards is really down to what software converts the keyboard (scan) codes into internal X11 codes. I had to dig around a little a few weeks ago when I needed to simulate a "Windows" key on a keyboard that didn't have one, but I don't pretend to really understand how the various tables etc. work. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] ANN: Glibc - Mega bug found
Graeme Geldenhuys wrote: Hi everybody, Better make sure your Linux distro patches Glibc. http://www.bbc.co.uk/news/technology-35592916 I think Graeme could usefully have added that this is believed to affect something like glibc 2.9 through 2.22. I believe that it's possible to get the currently-installed version number using ldd --version However according to Ulrich Drepper the official way is to run the library: $ locate libc.so /lib/i386-linux-gnu/libc.so.6 .. $ /lib/i386-linux-gnu/libc.so.6 GNU C Library (Debian GLIBC 2.19-18+deb8u2) stable release version 2.19, by Roland McGrath et al. .. Compiled on a Linux 3.16.7 system on 2016-01-01. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus on my ancient computer?
Sven Barth wrote: On 14.02.2016 15:14, Bart wrote: Hi, This is a bit off-topic. I have an ancient computer: Intel Celeron 700Mhz, 512MB RAM, 20GB IDE HD. (http://flyingsheep.nl/computer_nostalgie.htm#celeron700) (Hardware upgrades are not in the picture.) [snip] So, do you have tips on which Linux flavour to install on this machine? I'd suggest ArchLinux. It's a very lightweight distro that's based on a rolling release (like Gentoo), but uses binary packages instead. I use it on my two main computers. On one I'm only using Awesome as window manager and on the other OpenBox. Nothing else. Alternatively, I run Debian "Lenny" with KDE on a number of machines of that sort of spec. For later Debians consider XFCE irrespective of system spec. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus on my ancient computer?
Giuliano Colla wrote: But, whichever OS you decide to pick up, if you're used to KDE, you might consider TDE as WM. It's nothing but the old faithful KDE 3.5 (which I've been happily running in a hardware setup similar to the one you mention) ported to the more recent distros, by a group of former KDE developers and maintainers, unhappy with the road taken by KDE 4 (and now KDE 5), which, with the "Plasma" and "plasmoids" things has become too heavy, bloated, and buggy beyond hope. It's good to see that that's come back to life, it had a worrying hiatus a couple of years ago. In any event, watch out for distreaux which mandate systemd and NetworkManager. I normally disable the latter but a few weeks ago something happened which made me suspect that recent KDEs don't like that (full disclosure: I think that was on Debian Jessie on an RPi2, and in this case I /mean/ Debian not Raspbian). -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] bad luck
Marc Santhoff wrote: Good /God/ man, is that all? I opened this expecting to find that a member of the community was in real trouble (frankly, the sort of thing I was almost in over the last week). It's enough. Costs me hour of frustrating work recreating anything, doing nothing fruitful. Moreover I'm sitting on a time bomb, because I really do not know, what other files may have been damaged. Last time this happened I had some failures in other software that was detected weeks(!) after the incident. I'm currently using an elderly Toughbook, because something else in my workroom took the power out sufficiently viciously that the lights flickered 300m away and I've been too busy to go around everything with a PAT tester to find the culprit. And that's been the least of the problems over the last few days... curiously, some of them have been caused by my strident insistence that colleagues should exploit our central servers (which have RAID etc.) rather than relying on the aging hardware and OSes under their desks. So, what know? Taken seriously I have to restore the complete system and data from backup. Seems I deserved some trouble because I'm not running development tools on a dedicated machine or inside a virtual environment... What OS are you running, and how much privilege had you given yourself? FreeBSD 9, simple user having sudo privilges but nothing run as root or by sudo. The session was the same as ever - besides Lazarus. Frankly, I think the suggestion that Lazarus /might/ have caused a system crash is more serious than the discovery that a system crash probably corrupted files. You're right. That's why I told the story as introduction. What I asked for is help locating and understanding Lazarus' file handling. Some standard errors like unneccessarily holding files open when not in use can be avoided easily. Yes, that's a good point although there's also issues about whether the underlying OS, computer and attached peripherals really are syncing data as reliably as expected. The bottom line- of which I was reminded regularly during my unhappy time running OS/2- is that an OS will attempt to preserve the integrity of its filesystems but makes no guarantee about individual files, and that there's no way of determining that a file's been sacrificed. It's interesting to speculate on whether something like Lazarus could benefit from storing projects onto a transaction-aware database server rather than as individual files. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] bad luck
Marc Santhoff wrote: Hi, I really had some bad luck today. When starting Lazarus it worked normally first. Then I created a new unit, saved it having an appropriate name, typed in a class definition without any fields or methods and Hit CTRL-F9. That was the moment when my computer freezed for a while, say 30 seconds, and rebooted. Afterwards Lazarus' configuration was hosed, the open projects .lpi was unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file system had a lot of errors. Good /God/ man, is that all? I opened this expecting to find that a member of the community was in real trouble (frankly, the sort of thing I was almost in over the last week). What OS are you running, and how much privilege had you given yourself? Frankly, I think the suggestion that Lazarus /might/ have caused a system crash is more serious than the discovery that a system crash probably corrupted files. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is porting Delphi program using AsyncPro to fpc/laz possible?
Michael Schnell wrote: On 01/21/2016 11:38 AM, Mark Morgan Lloyd wrote: That of course is a significant issue. I don't see what could prevent this from working. I didn't say anything wouldn't work. The simple method would be to create a new buffer for the data to be transferred to the main thread and copy the data already received in a "static buffer" there. If you want to avoid copying you could transfer the data in the receive buffer (which later would be freed) and allocate a new receive buffer for the next receive. I don't understand the "OS" issue, that you speak of . Copying data tends to introduce a significant performance hit, which is why many OSes try to avoid it by passing pointers. The typical result of passing pointers is to introduce the possibility of buffer overflows, because the lower-level (and more privileged) code doesn't (or can't) apply application-specific tests. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is porting Delphi program using AsyncPro to fpc/laz possible?
Michael Schnell wrote: - Once the appropriate data is collected you *create* a "transfer object" (an instance of a transfer class that allocates and includes buffer for the data (not just a pointer if the buffer could be reused by the thread ! That of course is a significant issue. I've written "bare metal" stuff which moved data around like that with lots of consistency checking which meant it was robust. OTOH "real" OSes tend to move pointers around with minimal hardware protection against overrun etc. when a pointer somehow gets moved outside its (ring) buffer. I wonder whether using something reference counted would be a useful compromise here. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TOracleConnector connect as SYSDBA
Leonardo M. Ramé wrote: El 19/01/16 a las 15:55, Leonardo M. Ramé escribió: Hi, does anyone know how to connect to Oracle as SYSDBA?, I'm getting "ORA-01017: invalid username/password; logon denied" when I set these params: Hostname: 127.0.0.1 Database: MYDB User: sys as SYSDBA Pass: MYPASSWORD Role: SYSDBA (this field is not taken into account -apparently-) If, instead of using "sys as SYSDBA" I use "sys" alone, I get "ORA-28009: connection as SYS should be as SYSDBA or SYSOPER". I've found a solution, instead of using "sys as SYSDBA" I used the username "system", and leave Role empty. Thanks for updating us. I'd imagine that quite a few people are in the position of not using Oracle routinely but being interested in looking at evaluation copies etc. I wonder whether some form of quoting would have made your origianl attempt work. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Building GUI program for RPi1 on RPi2?
Bo Berglund wrote: I have a development system running on a Raspberry Pi2B with fpc 3.0.0 and Lazarus 1.6RC2. It works just fine. :) Today I am faced with a problem regarding compatibility between RPi1 and RPi2... I have this Delphi program I wrote some years ago which is used to show a text dialog on a TV for my mother-in-law. She is deaf and bed-bound and to communicate with her I wrote the program so it could display a huge text on an attached TV so she can read what one types in. Now the XP computer it was running on is dead and I have an old RPi1B with 256M RAM, which I could put in its place. I used Lazarus conversion tool to bring in the Delphi7 project to my Pi2B and it compiled and ran fine. Success here! So the question really is if I have to do something in the configuration of the project to create an executable which will run on the RPi1 hardware? The fpc compiler I have is built using the OPT=-dFPC_ARMHF flag. Will this cause executables compiled in Lazarus to only be working in an RPi2?? I've seen no binary compatibility issues yet. The one thing I would say is that I put a lot of time late last year into getting an RPi+Raspbian working with a large LCD TV as an HDMI-connected monitor for a colleague with poor sight, and found that support of higher resolutions etc. was vastly improved with the RPi2. The one thing that didn't work properly was the protocol that simulated a remote control, but I've not checked that recently. So in my opinion using an older RPi is a false economy here. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cannot find unit lNet when building project
Mattias Gaertner wrote: On Fri, 15 Jan 2016 14:50:35 +0100 Bo Berglund <bo.bergl...@gmail.com> wrote: [...](AFAIK "fppkg install lnet"). Yes. It is a bit confusing, that lnet is in FPC sources, but needs to be installed by fppkg. I agree. Does anybody know the historical reason for this? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Do we really need a PaintSwastika procedure?
Ondrej Pokorny wrote: On 08.01.2016 11:35, Mattias Gaertner wrote: The unit provides example functions for some common symbols, especially drawing flags (e.g. PaintBarbadosTrident, PaintCanadianMaple). It does not support a big amount of flags and symbols. It only supports a few selected flags and one of them was the flag of the Nazis. In that sense it was political and not the intention of Lazarus. In this case please remove PaintCanadianMaple and PaintPentagon as well because of the genocide on native Americans by the U.S. and Canadian government. PaintFivePointStar has to be removed as well because (among others) it is used in the U.S. flag and in the former Soviet Union flag. And there's a long-running campaign against Trident in the UK ;-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Do we really need a PaintSwastika procedure?
Juha Manninen wrote: On Thu, Jan 7, 2016 at 1:41 PM, Terry A. Haimann <te...@haimann.us> wrote: As someone of Jewish heritage I say get rid of it. Mattias actually removed the function, obeying like a good German boy when somebody with "Jewish heritage" tells him. Uhhh, I can't believe he did so! I read what he said as meaning that he had removed it before Terry objected. English tenses can be vague, but let's give them the benefit of the doubt just this once. As somebody who (I believe) lost family, rather than just claiming a certain heritage, could we please drop this. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Reducing output when building bigide?
Bo Berglund wrote: Whenever I build Lazarus 1.6RC1 bigide, using the terminal command make bigide, there is a lot of seemingly unneeded screen output in the form of hints regarding "Sender" not being used and such. Is there any way to block this from being printed to screen? A parameter for make or something similar. Especially when I use a script to install fpc and lazarus it seems like overkill to print all of that info. I'd suggest that it would be very bad practice to suppress warning messages from trunk or an RC build. Apart from that you might be able to do something by by putting one of the -v variants into the OPT shell variable when running the make... I've not tried it. One thing which would be useful at the Lazarus level would be suppression of blank lines emitted by the linker. The FPC team insists that this is not their problem, even when the linker has been invoked automatically by the compiler. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Do we really need a PaintSwastika procedure?
Juha Manninen wrote: From Bart: Current state is that the Swastika now has very strong associations witj the Nazi regime and all the evil it stood for. Then it is time to change that association. Maybe it is a cultural thing but here most people understand the big picture and don't judge the symbol itself. Maybe you and Anthony don't know the history of that symbol? Please study it! To me your opinions seem very narrow-minded, sorry to say. I'm inclined to agree, particularly since the variant that has such unpleasant connotations was usually drawn at a 45 deg angle while almost all other renditions are square (i.e. all elements are either horizontal or vertical). There's a general principle that numbers can't be copyrighted or patented, and that extends to various "illegal numbers" which some trade bodies and even a few jurisdictions insist can't be published and shouldn't even be read outside certain narrows contexts. I think this principle should also extend to simple geometric shapes. So come on chaps. It's not as though we're talking about something completely unambiguous like the Waiblingen triple-headed eagle or even the Penrose Chickens :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus compile project via ssh?
Bo Berglund wrote: The workaround I found is to open an Non-Lazarus edit window on the Pi and after copying text in Lazarus switch to that edit window and paste it (this will work). Now go to the place in Windows where the text needs to go and paste it. This also works! It seems like the Lazarus clipboard is incomplete inasmuch as it only targets the internal Pi clipboard but as soon as one pastes inside another editor application on the pi it rectifies itself and the text is now available also in Windows via VNC. I have reported this here before but got no real solution to it. You didn't mention that particular combination which is... interesting. Does it depend on the widget set being used for Lazarus (incomplete C) and the other programs (which work)? If I use any other Raspbian application to copy text it is immediately available via VNC in Windows, it is just the Lazarus code editor that is broken. Even copying properties from the component property editor in Lazarus works fine, just not the thing one REALLY wants to work i.e. the copy from the code editor does not work through VNC. As previously discussed, VNC is broken in many areas and it's unclear how much this is fixable since newer versions aren't open source: there's been no significant work done on it for something like ten years. If you want to run Lazarus remotely then tunnel it over SSH. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus compile project via ssh?
Bo Berglund wrote: On Mon, 04 Jan 2016 09:41:37 +, Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: As previously discussed, VNC is broken in many areas and it's unclear how much this is fixable since newer versions aren't open source: there's been no significant work done on it for something like ten years. If you want to run Lazarus remotely then tunnel it over SSH. Hi Mark, yes I have seen several times such suggestions and yet I have no idea how to accomplish such a tunneling How could the Lazarus GUI appear in my Windows machine over SSH when Lazarus is running on a Raspberry Pi2? There must be some software running on the Windows box to accomplish that, right? I believe there's a combination of XMing and Putty that will do this http://www.straightrunning.com/xmingnotes/ However if you simply run XMing it will probably just give you a window representing your entire Raspbian (etc.) desktop, which won't help C Also I don't know whether the Display Manager supplied with Raspbian supports remote sessions, and I'd not suggest fiddling with it. I have tried to find various solutions such as an X client on Windows (or is it a server?) Strictly, server since it provides graphical services to the actual program. This is non-intuitive and most people will look uncomfortable if you ask them to justify it :-) to display the desktop of RPi, but it seems like these are extremely difficult to install and are also not opensource. In any case after I installed one of the available X thingies on my Win7 PC I was totally unable to understand how to make it connect to the RPi, so I gave up and uninstalled it. Well stop fscking around with Windows and use your Ubuntu machine as the controlling desktop. As I've said, to the extent that my patience is exhausted, the standard OpenSSH supplied with both Debian/Ubuntu and Raspbian allows you to tunnel X, you'll probably need to change one setting on your desktop system (in /etc/ssh/ssh_config): Host * # ForwardAgent no ForwardX11 yes # ForwardX11Trusted yes after which the SSH client (i.e. your desktop system) will tell the SSH server (Raspbian) that it's prepared to tunnel X traffic, so if you use a shell over SSH to start lazarus the GUI will appear on your desktop system. There's advantages and disadvantages to this that I've described more than once, so I'm afraid that I'm not going to do so again. Now for heavens sake man, if there's something about this that you don't understand then /ask/ rather than just ignoring it. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross Platform SQL Client/Editor
Graeme Geldenhuys wrote: On 2016-01-02 00:11, Mark Morgan Lloyd wrote: I've yet to see a GUI frontend which is remotely usable when attached to a table with a few billion rows. Then I guess you have never seen the setting in most GUI frontends that limit the return result to say 500 records max. All the GUI SQL Editors I've used supports this. In fact, they normally use the feature that already exists in most SQL database servers to accomplish this. Actually yes, I have. And almost always found it broken once one starts trying to give it complex selection criteria. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross Platform SQL Client/Editor
Marcos Douglas wrote: On Fri, Jan 1, 2016 at 8:39 PM, Anthony Walter <sys...@gmail.com> wrote: If the pickings are slim in answer to Question 1, are they many people here who want a simple cross platform SQL client/editor, possibly with both MySQL and MSSQL support? I don't use Linux for development (yet) but I work with MSSQL every day. Would be great if we had such tool. Thanks. Things like this usually stall when the app for some reason needs to either inject backend-specific SQL, or (thinks it) needs to validate an SQL query or command before it can submit it. Without wanting to sound negative, I've yet to see a GUI frontend which is remotely usable when attached to a table with a few billion rows. Having said that and stepping back a little from the problem, it appears that PostgreSQL uses YACC-style tools (i.e. Bison etc.) to parse SQL syntax before executing it. A good starting point might be to make sure that pyacc has the cojones to parse SQL, and then before attempting to support any particular backend writing a fairly complete set of parsing rules. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 on various platforms
Mark Morgan Lloyd wrote: The good news is that it builds with FPC 3.0.0 on: PPC Linux, Debian "Lenny" Raspbian "Jessie" on RPi2 SPARC OpenSXCE 2014 (approx. Solaris 11) SPARC Linux, Debian "Squeeze" x86 linux, Debian "Lenny" and "Jessie" x86_64 linux, Debian "Jessie" Also on straight Raspberry Pi Debian (i.e. not Raspbian) from http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/ An earlier attempt at this wouldn't compile Lazarus, this time I used the notes at https://www.debian.org/releases/jessie/amd64/apds03.html.en as a checklist for what needs to be on the system, I think the really important thing was the console-setup package which looks like it's needed even if the idea is to run the system headless. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 on various platforms
Juha Manninen wrote: On Fri, Dec 25, 2015 at 1:39 PM, Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: Mark Morgan Lloyd wrote: The good news is that it builds with FPC 3.0.0 on: PPC Linux, Debian "Lenny" Raspbian "Jessie" on RPi2 SPARC OpenSXCE 2014 (approx. Solaris 11) SPARC Linux, Debian "Squeeze" x86 linux, Debian "Lenny" and "Jessie" x86_64 linux, Debian "Jessie" Also on straight Raspberry Pi Debian (i.e. not Raspbian) from http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/ An earlier attempt at this wouldn't compile Lazarus, this time I used the notes at https://www.debian.org/releases/jessie/amd64/apds03.html.en as a checklist for what needs to be on the system, I think the really important thing was the console-setup package which looks like it's needed even if the idea is to run the system headless. I am not sure if you saw this : http://forum.lazarus.freepascal.org/index.php/topic,30500.msg194271.html Apparently FPC works with MIPS but Lazarus does not. Do you have experience with MIPS? I've mentioned this problem in the past unfortunately, but I'm slightly hobbled here in that while I've got a couple of SGI systems with IRIX the only MIPS Linux I'm able to run is based on Qemu. Two or three years ago one of the vendors here promised to send me a netbook but it didn't materialise, and quite frankly I have very limited resources when it comes to going out and buying new hardware just in case it turns out to be useful. I may join the effort later and get a MIPS Creator to see why Lazarus does not work. However I am quite a newbie in compiling FPC for different architechtures. Let's see... I think a Creator is definitely worth looking at very carefully, and I'd add that MIPS is aware of FPC even if not currently (as far as I know) on the list or active in the forum. The RPi has some nice features but once one starts to do real work with it some decidedly dodgy ones become apparent, like almost all I/O traffic going through a single USB connection. As a general point, for anything like this it's worth having an FTDI (or whatever) USB -> 5V serial adapter so that if it has a pre-boot menu etc. you can get to it. Anyway, I appreciate your work with unusual platforms and CPU endiannes issues + patches. Thanks :-) The way I look at it is that some architectures- e.g. Linux SPARC- exercise the code generator a bit more than others on account of things like alignment requirements- hence in particular Mantis 22696 that I mentioned a few days ago. Looks like SPARC-64 Debian will be usable imminently... Different gadgets and so called TV-boxes can do personal computing more and more in future. Their CPU and OS selection varies a lot. BTW, I personally have an Intel-based passively cooled ASRock Beebox as my main computer now. I am amazed every day about this gadget! Agreed. Meanwhile I'm still tinkering with my mainframe emulator: 1MHz CPU clock, 4-6 uSec core memory and so on. It really does emphasise how far we've come :-) Waiting for various things to happen here, but meanwhile http://xkcd.com/679/ enjoy. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.4.4 fpc 3.0
Santiago A. wrote: Is it posible to use Lazarus 1.4.4 with fpc 3.0? Will I run into a lot of problems (compiling IDE for new packages etc)? Seems to be OK here. I've used that combination intermittently since about September, but it's not one I run regularly. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.4.4 fpc 3.0
Santiago A. wrote: El 24/12/2015 a las 12:00, Juha Manninen escribió:> On Thu, Dec 24, 2015 at 11:21 AM, Santiago A. <s...@ciberpiula.net> wrote:>> Is it posible to use Lazarus 1.4.4 with fpc 3.0?> Yes but why would you do that? Lazarus 1.6 is almost here.> You may get problems with codepage aware strings when using Lazarus> 1.4.4. Depends on use case of course.>> Juha I am afraid of using Lazarus 1.6. New versions introduce new bugs andproblems. I want to work with stable versions. Well, in fact, with versions thathave been stable since some time. New versions come with new bugs andproblems and I have already enough political problems pushing Lazarus tofight with technical issues. I have come across some bugs in 2.6.4 that I need to solve, so I havedecided to move to 3.0. It is stable since some time ago (They arealready working on 3.1).if they had applied backports to solve them, I would have sticked on2.6.4. Nevertheless, If I run into problems with Lazarus 1.4.4 / FPC 3.0, codepages etc, I will move lazarus 1.6. As I've said before, I keep a combination of Lazarus+FPC versions here and my preferred one isn't necessarily the most recent. *BUT* if you're asking the core developers for help, the first thing that they'll expect is that you're on the current version of IDE and compiler. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 on various platforms
Mark Morgan Lloyd wrote: On a recent Raspbian running on an RPi2, using a directly-connected HDMI screen with USB keyboard and mouse, with OpenBox or LXDE as window manager: GTK2 radio box squashed Qt messagebox button icons garbled. No obvious problems on Debian Jessie running on x86_64, i.e. they're probably Raspbian-specific. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 on various platforms
Mark Morgan Lloyd wrote: The good news is that it builds with FPC 3.0.0 on: PPC Linux, Debian "Lenny" Raspbian "Jessie" on RPi2 SPARC OpenSXCE 2014 (approx. Solaris 11) SPARC Linux, Debian "Squeeze" x86 linux, Debian "Lenny" and "Jessie" x86_64 linux, Debian "Jessie" Minor widget set issues. On a recent Raspbian running on an RPi2, using a directly-connected HDMI screen with USB keyboard and mouse, with OpenBox or LXDE as window manager: GTK2 radio box squashed Qt messagebox button icons garbled. The former case suggests that some form sizing etc. might not be working quite as expected. It's quite possibly a layout error on my part, but so far it only shows up on Raspbian+OpenBox although I've not yet checked OpenBox on other platforms. In the second case, the icons on a "do you really want to quit" type messagebox both contain the same noise pattern. Again, I only see this on Raspbian but in this case it affects both OpenBox and LXDE. In both cases, this has to be a directly-connected screen: executing over SSH etc. looks fine. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 on various platforms
Mattias Gaertner wrote: An annoyance affecting all platforms above is that the timeout in the "Configure Lazarus IDE" -> "Compiler" box is impossibly fast, if the default isn't right about the only way to use it is to paste a prepared name. What timeout? After the compiler name has been changed by the addition or removal of a single character, it goes and checks whether the filename is now valid. The timeout here is something like 10th sec, and displays a dialogue if the name is bad. Fixed. Yippee :-) Hopefully that's something that can get into the release. Slightly more serious from my POV is that a project that created a form early to set up a configuration file from a template is now giving problems on all tested platforms. I'm assuming that http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-A-change-in-LCL-require-your-TCustomForm-descendants-to-have-a-resource-or-to-use-a-CreateNer-td2402646.html is relevant, but at present am struggling. This is a pretty old change. Yes, but has only now become mandatory. The change was already in 1.0. Simply use CreateNew instead of Create. Or set RequireDerivedFormResource to false. The unit/form is outside the project but is predefined (i.e. not constructed at runtime). It's created early (before the main form's constructor has completed) in order to check and if necessary create a configuration file. Please correct me, but since its layout is stored in resources I think CreateNew() doesn't fix anything. I'm still not entirely convinced, but I think the problem was that it had a {$I unitname.lrs} in the initialisation part rather than a {$R *.lfm} at the start of the implementation. So I'm fairly sure this isn't an IDE etc. problem, but since I can't easily say what version created these files it might be one that will bite more people with elderly projects. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obviously I'm missing something.
Donald Ziesig wrote: Hi All! I have been beating my head against the wall trying to get the latest versions of fpc and lazarus installed on an almost plain vanilla Raspberry Pi. The reason I say "almost plain vanilla" is that I have setup TightVNC, ftp, svn, etc. on a 16GB SD card loaded with raspbian-jessie. I have this backed up on my laptop so I can restart from a usable configuration. Up until now, I have fpc 2.9.4 and Lazarus 1.5 working on a NOOBS SD Card (that is too small for what I need to do). That version of Lazarus has a bug that has been fixed in 1.6 so I would like to get 1.6 or 1.7 working. I am using an example tracked down from the FreePascal.org website. The ultimate website is: http://www.tweaking4all.com/hardware/raspberry-pi/install-lazarus-pascal-on-raspberry-pi-2/#getfpc Going step-by-step from this site: It says to install fpc 2.6.4 as the bootstrap compiler. Another place says 3.0.0 is the required bootstrap. I can't find 3.0.0 for Pi so here goes with 2.6.4. # sudo su # mkdir /usr/local/fpc # cd /usr/local/fpc # wget http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar No, that version of the compiler doesn't know about EABIHF. I suggest starting with the one I pointed you at the other day. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus compile project via ssh?
Martin Schreiber wrote: On Sunday 20 December 2015 08:59:35 Anthony Walter wrote: I am wondering, is it possible to configure Lazarus to compile a project on a remote computer running a different platform/architecture through ssh? I've been doing Lazarus development on Linux on a quad core amd64 desktop PC for a while now and it feels comfortable. But I do have a few arm6/7 Raspberry Pi computers with FPC/Lazarus as well. I successfully use cross-compiling and remote debugging from x86 Linux to Raspberry Pi. MSEide has project templates for that purpose in apps/ide/templates/crossarm*.prj, please see README.TXT. http://mseide-msegui.sourceforge.net/pics/crossarm.png It is probably possible to setup Lazarus to to the same. Generally works well, provided that the desktop machine's X11 server fully supports the primitives expected by the target machine's widget set. Working from memory, I think there's a problem with debugging multiple threads over SSH, and for that reason I also like to have VNC available. There's also some versions of Lazarus (which is by no means alone in this defect) that poll the input devices excessively, and again VNC can help out there. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 on various platforms
Mattias Gaertner wrote: On Sat, 19 Dec 2015 19:46:11 + Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: The good news is that it builds with FPC 3.0.0 on: PPC Linux, Debian "Lenny" Raspbian "Jessie" on RPi2 SPARC OpenSXCE 2014 (approx. Solaris 11) SPARC Linux, Debian "Squeeze" x86 linux, Debian "Lenny" and "Jessie" x86_64 linux, Debian "Jessie" Impressive. :) Thanks, I try to exercise things on a fairly regular basis. Help probably won't work on SPARC and PPC Linux due to issue 22696 (FPC), and there might be one unit excluded from Solaris which would be useful... I'll check this. [...] An annoyance affecting all platforms above is that the timeout in the "Configure Lazarus IDE" -> "Compiler" box is impossibly fast, if the default isn't right about the only way to use it is to paste a prepared name. What timeout? After the compiler name has been changed by the addition or removal of a single character, it goes and checks whether the filename is now valid. The timeout here is something like 10th sec, and displays a dialogue if the name is bad. The FPC sources etc. fields are OK, but this one will cause problems for anybody trying to use multiple compilers by specifying e.g. ppcppc-3.0.0 rather than just fpc (there's nowhere to put in a -V option which could be picked up by fpc). I noticed that one a few months ago but assumed somebody else was aware: I know, there's no need to tell me. Slightly more serious from my POV is that a project that created a form early to set up a configuration file from a template is now giving problems on all tested platforms. I'm assuming that http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-A-change-in-LCL-require-your-TCustomForm-descendants-to-have-a-resource-or-to-use-a-CreateNer-td2402646.html is relevant, but at present am struggling. This is a pretty old change. Yes, but has only now become mandatory. Simply use CreateNew instead of Create. I haven't had any success with that yet, but started from a position of suspecting that the problems I was seeing were platform-specific, it was quite a while before I found that some systems worked because they already had the configuration file that was being created. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus compile project via ssh?
Martin Schreiber wrote: Generally works well, provided that the desktop machine's X11 server fully supports the primitives expected by the target machine's widget set. I use remote debugging by gdbserver running on Raspberry Pi. The target uses the Rpi X11 server, so one needs to see the Rpi screen and reach the target keyboard and mouse in order to debug a graphical application with this setup. As one gets older, not having to reach out to an extra keyboard or swivel to concentrate on an extra screen becomes a blessing. Trust me. Until recently, one could debug many embedded systems using a serial (RS232) connection: Logitech did good work on this. These days, one can debug many using telnet or SSH. In either of these cases, debugging sessions can appear in a window on ones main screen: I certainly hope that my days of having to do a Rick Wakeman impersonation, with two computers and a Tektronix logic analyser, are past. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus 1.6RC1 on various platforms
The good news is that it builds with FPC 3.0.0 on: PPC Linux, Debian "Lenny" Raspbian "Jessie" on RPi2 SPARC OpenSXCE 2014 (approx. Solaris 11) SPARC Linux, Debian "Squeeze" x86 linux, Debian "Lenny" and "Jessie" x86_64 linux, Debian "Jessie" I've not tested any other ARM variant since I can only run those on minimal hardware or using Qemu which is infeasibly slow. I've also not tested MIPS where Lazarus is known to be a problem. An annoyance affecting all platforms above is that the timeout in the "Configure Lazarus IDE" -> "Compiler" box is impossibly fast, if the default isn't right about the only way to use it is to paste a prepared name. Slightly more serious from my POV is that a project that created a form early to set up a configuration file from a template is now giving problems on all tested platforms. I'm assuming that http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-A-change-in-LCL-require-your-TCustomForm-descendants-to-have-a-resource-or-to-use-a-CreateNer-td2402646.html is relevant, but at present am struggling. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Syntax error compiling fpc 3.0.0 3.0.0rc1 3.0.0rc2
Donald Ziesig wrote: Hi All, I ran out of room on the raspberry pi's 8GB NOOBS SD card so I just created a new SD 16GB card with the latest version of Raspbian. I got all of the usual tools working in short order (VNC, SSH, FTP,...). Then I decided to build a completely new version of FreePascal and Lazarus from source (just to prove that I can ;-) ), but I can't compile any style of fpc 3.0.0 from: svn co http://svn.freepascal.org/svn/fpc/tags/release_3_0_0_rc2 fpc2 svn co http://svn.freepascal.org/svn/fpc/tags/release_3_0_0_rc1 fpc1 svn co http://svn.freepascal.org/svn/fpc/branches/fixes_3_0 fpc I am using fpc 2.6.4 as the bootstrap compiler. make sure you start off with a binary tailored for the Rpi. I think that the last time I started from scratch I got it from http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ Current Raspbian provides the necessary prerequisites, but you might need to tweak fpc.cfg or provide an explicit -Fl. The compilation then ran to completion but the build failed because "Binary files ppp3 and ppcarm differ". (Why there are two executables and what it means that they are different is beyond me :-[ ). Because the standard build checks that repeated recompilations are substantially the same. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Alfred wrote: In my experience, fpres fails also due to lack of memory ! Just increase your swapsize with 500MB, and try again. Saved me many times. (normally, I use cross-compile ... also saves lots of time ... ) Doing just about anything with Lazarus- particularly a (re)build- has required something like 512Mb RAM+swap for a long time. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Mattias Gaertner wrote: On Wed, 16 Dec 2015 22:48:02 +0100 Bo Berglund <bo.bergl...@gmail.com> wrote: [...] Fatal: (10022) Can't find unit process used by RegisterFCL Does RegisterFCL work differently on Linux x64 than on Linux ARM? No. By the way I found a process.pp file in the fpc 3.0.0 sources: packages/fcl-process/src/process.pp You should have a process.ppu in your FPC install directory. Maybe the lazarus "make bigide" does not search the correct directory so it misses this on an ARM platform? Just guessing now of course... process.ppu is part of every FPC install. It must be in the -Fu search path of your /etc/fpc.cfg. $ fpc -iV 3.0.0 # Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 $ cd lazarus-1.6.0+3.0.0 $ make bigide .. make[1]: Leaving directory ... lazarus-1.6.0+3.0.0/components/chmhelp/lhelp' The result runs, including on Raspbian Jessie's GTK2. The only obvious thing that I'd fault is that the lazarus binary (i.e. specifically referring to the IDE) is poor at handling --help and --version. However $ ./lazbuild --version 1.6RC1 works as expected. So if an inexperienced twit like me can get it running, and can successfully maintain multiple versions of FPC and Lazarus including different combinations of compiler and IDE, why can't anybody? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Koenraad Lelong wrote: Op 17-12-15 om 11:36 schreef Mark Morgan Lloyd: $ fpc -iV 3.0.0 # Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 $ cd lazarus-1.6.0+3.0.0 $ make bigide .. make[1]: Leaving directory ... lazarus-1.6.0+3.0.0/components/chmhelp/lhelp' The result runs, including on Raspbian Jessie's GTK2. The only obvious thing that I'd fault is that the lazarus binary (i.e. specifically referring to the IDE) is poor at handling --help and --version. However Hi, I tried what you said. Lazarus runs indeed, but can't compile a existing project. I get an error stating fpcres could not be found. When I run fpcres on the command-line it starts and gives some output. I also can't compile lazarus itself (e.g. after adding packages). I also get the error that fpcres can not be found. Am I missing something ? I know this sounds silly, but check fpcres is on the path. My experience it that for Lazarus it's the only program that's needed apart from fpc and ppcarm etc. Apart from that... on Raspbian Jessie some projects work and others don't. The one I've got here where I can see a problem also fails on 1.4.4+3.0.0, I think the problem might be when a .lfm is outside the normal project directory. I'm about to take a look at other platforms. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Mark Morgan Lloyd wrote: I tried what you said. Lazarus runs indeed, but can't compile a existing project. I get an error stating fpcres could not be found. When I run fpcres on the command-line it starts and gives some output. I also can't compile lazarus itself (e.g. after adding packages). I also get the error that fpcres can not be found. Am I missing something ? I know this sounds silly, but check fpcres is on the path. My experience it that for Lazarus it's the only program that's needed apart from fpc and ppcarm etc. Apart from that... on Raspbian Jessie some projects work and others don't. The one I've got here where I can see a problem also fails on 1.4.4+3.0.0, I think the problem might be when a .lfm is outside the normal project directory. I'm about to take a look at other platforms. In my case on both armhf and amd64 the problems were caused by a lingering {$I ... .lrs } directive. This wouldn't show up if either an older Lazarus/FPC combination had recently built the project, or if the .lrs file was stored in local Subversion. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Bo Berglund wrote: On Tue, 15 Dec 2015 17:17:47 +0100, Mattias Gaertner <nc-gaert...@netcologne.de> wrote: Is there just a single fpc.cfg? The compiler searches for a config at several places and stops at the first hit. I searched for the cfg files: pi@rpi2-jessie / $ sudo find -name fpc*.cfg ./home/pi/fpc/fpcbuild-2.6.4/install/amiga/fpc.cfg ./var/lib/dpkg/alternatives/fpc.cfg ./etc/alternatives/fpc.cfg ./etc/fpc-2.6.4.cfg ./etc/fpc.cfg I also found out that /etc/fpc.cfg is actually a symlink: /etc/fpc.cfg -> /etc/alternatives/fpc.cfg which in turn is a symlink: /etc/alternatives/fpc.cfg -> /etc/fpc-2.6.4.cfg So in a roundabout way /etc/fpc.cfg is actually: /etc/fpc-2.6.4.cfg Question: Is the fpc version 2.6.4 cfg file any good for fpc 3.0.0? Seems a very involved way of handling this, hard for me to follow in any case. :( With the caveat that this is for a native (i.e. not cross) compiler: you only need one of those. As discussed- several times- about the only thing that needs adjusting is the path to the GCC stuff if you move an existing fpc.cfg to another machine, under normal circumstances it's set up when you run install.sh to install the binary release files. I use the same fpc.cfg for everything from 2.2.4 through 3.0.1, and have not- so far- had to do anything special when building ARM or MIPS cross compilers. Also see Lazarus's --pcp= option. Again, I don't think this is the first time I've pointed you at that. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Release Candidate 1 of Lazarus 1.6
Mattias Gaertner wrote: On Wed, 09 Dec 2015 14:31:20 + Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: [...] Quite frankly I feel that the Lazarus version numbering is progressing faster than is reasonable, and that it would be highly desirable to have a "Long Term Support" v2.0.x or even 3.0.x which could be presented to people outside the project as a robust version to use with FPC 3.0.x. Do you think version is progressing too fast or do you think it should progress faster towards 2.0? [...] ! /usr/local/bin/lazarus-0.9.24+2.2.4 ! /usr/local/bin/lazarus-0.9.26+2.2.4 ! /usr/local/bin/lazarus-0.9.28+2.4.0 ! /usr/local/bin/lazarus-0.9.30+2.4.4 ! /usr/local/bin/lazarus-1.0.0+2.4.4 ! /usr/local/bin/lazarus-1.0.0+2.6.0 ! /usr/local/bin/lazarus-1.0.8+2.6.2 ! /usr/local/bin/lazarus-1.0.14+2.6.4 ! /usr/local/bin/lazarus-1.2.6+2.6.4 Yes. ! /usr/local/bin/lazarus-1.4.2+3.0.0 1.4.2 used FPC 2.6.4. 1.6 will be the first release with FPC 3.0. Those are tested combinations. 1.4.2 (which was the latest 1.4.x when I did the work) works reliably with 3.0.0, and is the first workable combination if you want to avoid the trunk/development revisions. I'm prepared to say to people "you're going to have to build something from source, but it's no big deal". I'm not prepared to say to them "you're going to have to build from bleeding-edge sources, and there's a risk they won't work". -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Release Candidate 1 of Lazarus 1.6
Michael Schnell wrote: Obviously it will not be in the first 1.6 release, but happily the Lazarus releases are scheduled a lot more often than the fpc releases, so I will not have to wait another three years until the code might be published. Quite frankly I feel that the Lazarus version numbering is progressing faster than is reasonable, and that it would be highly desirable to have a "Long Term Support" v2.0.x or even 3.0.x which could be presented to people outside the project as a robust version to use with FPC 3.0.x. It's not at all easy to explain to an outsider- for example a Delphi refugee- that if he wants some version of Lazarus for a particular feature he'll then need an unrelated FPC version as the compiler: ! /usr/local/bin/lazarus-0.9.24+2.2.4 ! /usr/local/bin/lazarus-0.9.26+2.2.4 ! /usr/local/bin/lazarus-0.9.28+2.4.0 ! /usr/local/bin/lazarus-0.9.30+2.4.4 ! /usr/local/bin/lazarus-1.0.0+2.4.4 ! /usr/local/bin/lazarus-1.0.0+2.6.0 ! /usr/local/bin/lazarus-1.0.8+2.6.2 ! /usr/local/bin/lazarus-1.0.14+2.6.4 ! /usr/local/bin/lazarus-1.2.6+2.6.4 ! /usr/local/bin/lazarus-1.4.2+3.0.0 Industry doctrine has it that v3 of a piece of software is usually a sweet spot, and while I'm a very junior member of this community I really feel that we should be trying to hit it. Alternatively, Turbo Pascal v3 was recognised as one of the "greats" of early PC software (I remember when the company I worked with sold what they knew was the last copy they could get), and Delphi v2 was groundbreaking because it was the first Win-32 version (i.e. to run on an OS with decent preemptive multitasking etc.). How about a stable Lazarus v2.0.x, with as many bugs and development quirks as possible worked out of it, based on FPC 3.0.x and with a support commitment from both teams? Or with the number of exciting things that the core developers have on the boil, is promoting the project to outsiders simply irrelevant these days? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Release Candidate 1 of Lazarus 1.6
Mattias Gaertner wrote: On Wed, 09 Dec 2015 14:31:20 + Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: [...] Quite frankly I feel that the Lazarus version numbering is progressing faster than is reasonable, and that it would be highly desirable to have a "Long Term Support" v2.0.x or even 3.0.x which could be presented to people outside the project as a robust version to use with FPC 3.0.x. Do you think version is progressing too fast or do you think it should progress faster towards 2.0? In the interest of making the least amount of work for anybody, my suggestion would be to proceed at the current rate towards 2.0.0, but to make sure that this is still compatible with FPC 3.0.0. After that try to slow down the Lazarus numerical progression a bit by using "hundredths" more. And I'm afraid that I'm not volunteering for anything right now: I've got my hands more than a little full to the extent that I'm finding it difficult to test FPC and Lazarus on some of the odder systems I have around here as often as I'd like. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Release Candidate 1 of Lazarus 1.6
Juha Manninen wrote: On Wed, Dec 9, 2015 at 6:41 PM, Mark Morgan Lloyd make sure that this is still compatible with FPC 3.0.0. After that try to slow down the Lazarus numerical progression a bit by using "hundredths" more. I think the backwards compatibility of LCL is the most important detail. A Long Term Support version of the IDE itself does not make much sense. The compatibility of LCL has been good. Or maybe it had problems which I don't know about. FPC 3.0 + codepage aware strings + our new UTF-8 system however breaks certain code that depends on system codepages, but it also improves things a lot. This kind of changes are necessary sometimes. I don't understand how a slower release cycle would improve it. In fairness, I didn't say a slower release cycle, I said more use of the "hundredths" digits so that once Lazarus is at (say) 2.0.0 it doesn't appear to move away from it so quickly. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Detecting when decompiler is running
Michael Schnell wrote: On 12/04/2015 10:44 AM, Sven Barth wrote: Why do you assume that every software written in Lazarus/Free Pascal is automatically an open source one? I don't assume "is" but I assume "should be", as I consider closed source projects as a fraud against the highly valuated fpc and lazarus The only fraud would be if something was written in contravention of the appropriate licenses (i.e. reused bits of something that was GPLed, or modified something which was LGPLed without offering the changes to the community). However as a lesser fraud I'd suggest something which was closed source and refused to even acknowledge what language etc. had been used. (Object) Pascal needs public support, particularly with what's happening to Delphi, and a few words in the right places that got people to look at it as a high-level language superior to Python et al. could be really valuable. team members. pen source software of course can be payed for customer projects, but any obfuscation of the true working of a program in neither "nice" towards the customer nor sensible, as a decent hacker will crack it, anyway. Maybe, maybe not. But it's not just a case of who's worked out how a program (supplied as a binary or as "shrouded" source) works, but who's got a right to re-use bits of it. And quite frankly, I'd suggest that banging the "anything written using an open source tool *MUST* be open source" drum doesn't help anybody. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Detecting when decompiler is running
Marc Santhoff wrote: On Fr, 2015-12-04 at 08:29 +, Richard Mace wrote: Hi All, I was wondering if there was a way where an application, written in Lazarus, could detect when a compiler is running, perhaps by it's mutex? My idea was, in my application, I could periodically check to see if a decompiler was running and then my app could perform an operation, such as maybe closing. As others said, decompilers and disassemblers are not detectable. But for protection there are other counter measures. 1. Protect your program using checksums. Refuse to run if tampered. The ld linker for ELF can embed a fingerprint, that can be read back fairly easily but I've not attempted to verify an entire binary against it. What I don't know is what part of a binary contribute to this, and whether- as a specific example- stripping symbols changes it. The real problem however is the ease with which an attacker can substitute a hostile library, e.g. using (something like) LD_LIBRARY_PATH on unix. 2. Use varying protection schemes randomly. I did sth. like that by including protection code that is switched from the make process between multiple versions. If some hacker really solves the riddle for one executable, her hack will fail on most others. Same scheme as compiling in a serial number, that is changed for each compilation. 3. Check integrity of the program often, from many placces in the program. If really paranoid, you can combine with randomly selected checking routines. Using a code scanner/parser and injection code for checks is relaitvely simple, e.g. at the start of a procedure insert a check and exit code (or leave out, depending on the moons phase or so). Making random choices can be unwise, because sooner or later you hit a weak combination. Also as a general point I once had a colleague who spent his lunchtimes methodically single stepping through AutoCAD with a view to finding out how the security dongle worked, and he was broadly successful despite professing to know no x86 assembler. So you can obfuscate things as much as you want, but that's no protection against somebody with patience. If you have enough checks, enough randomness between varying mechanisms, hackers will give up for sure. You are in trouble if those programm sould be distributed on DVD from one master, though. Yes, big trouble. And I assume that you've seen yesterday's news about Raspbian being insecure because all copies start with the same (or no) "entropy", so SSH is seeded the same. There is no substitute for a piece of hardware or software being uniquely serialised, and the user's contract (or license, or whatever you want to call it) being tied to that. I'd like to hear from others about their anti hacking tools ... ;) Marc Btw., the licence of the library code permits making closed source programs. Only Lazarus itself and the compiler code are open source. One point I like FPC/Lazarus for and use it. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Detecting when decompiler is running
Michael Schnell wrote: On 12/04/2015 02:09 PM, Marc Santhoff wrote: 1. Protect your program using checksums Don't connect the computer that holds the sources to the Internet. In principle, it should be possible for a binary to be signed in such a way that it can't be rebuilt, even from unmodified sources. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Fast file reading using file cache
Henry Vermaak wrote: 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. Also even on client software which handles threading properly, if somebody has a discussion group etc. sorted by date (to see messages as they arrive, without having to scroll back) threading is not immediately visible: /all/ you have is context. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] File is locked?
Leonardo M. Ramé wrote: Hi, I'm checking the contents of an .ini file every 10 seconds (with a TTimer), the file is modified by another application and I display its contents in my program. The problem is the file is locked while the other program is using it and aparently TIniFile cannot handle this situation, thus raising an "Unable to open file" error. How can I check if the file is locked before reading its contents?. I don't think you can, because it has to be an atomic operation. Also the locking behaviour varies a lot depending on operating system (whatever it is in your case ;-) I think you'd do better monitoring the file timestamp(s) so that you're not reparsing it redundantly, and being prepared to handle cases where IniFile fails. You might be able to request change notifications, but again that depends heavily on OS. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] kill a running program by name
fecske fecske wrote: How can I kill a running program (proces,task) by name? Depends on operating system. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Smooth scrolling label (marquee)
Michael Schnell wrote: On 11/10/2015 12:30 PM, Luca Olivetti wrote: - it is very cpu intensive (I have to put it over a picture, so the invalidate will also force the repainting of the bitmap I guess) The only cure for this is using the graphic processor: only once create a wide pixel array from the text and then use Direct X (Open GL or similar API) to display part of the text "behind" in a rectangle. Using OpenGL etc. risks breaking the program for anybody accessing it over remote X (including SSH) or VNC etc. (either for routine use or remote support). I believe there are ways that OpenGL can be mapped over a LAN, but in practice it would- at present at least- be safest to assume that these aren't reliable and at the very least provide a user option to make sure the program doesn't attempt to use it for anything that is basically cosmetic. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How can I close a Lazarus project and open another?
Bo Berglund wrote: On Sat, 07 Nov 2015 12:35:28 +0100, Bo Berglund <bo.bergl...@gmail.com> wrote: - Now I get a pop-up error box saying: Access violation. Press OK to ignore and risk data corruption. Press Cancel to kill the program. I should have waited a while... If I do not click Cancel but OK then I get to the "Open Project File" dialog and it is located in the path mentioned above. If I now navigate down to /lnet/examples/console/lhttp and try to open the fpget.pp file in there by changing the file type in the dropdown list to "All files", then Lazarus completely locks up In that case raise a bug that the Dire Warning message that points out that you really don't want to press OK isn't adequately intelligible . -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How can I close a Lazarus project and open another?
Bo Berglund wrote: I have a Lazarus project inside the IDE, which uses LNet. Now I want to close that and open one of the LNet examples in order to see how that works. So I did this: - Project/Close project - This pops up a dialog asking me to do one of a list of actions - I select the button Open Project - Now I get a pop-up error box saying: Access violation. Update to latest trunk Lazarus, report as bug if it persists. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to find out the public IP in code?
Bo Berglund wrote: I would like to be able to find out the public IP address of the Pi in a Lazarus program. How can this be accomplished? It is either connected to a wired or WiFi network router. in my browser I can go to http://checkip.dyndns.com/ and it will print a message with my IP address. But how is this done in code? Avoid relying on this in the general case: you can usually use 0.0.0.0 to represent "this host". The problem is that a machine might have multiple physical Ethernet (or other) adapters, and in addition might have aliases set up, and in the general case it's not easy to look at the list of IP addresses and determine which one you want. http://forum.lazarus.freepascal.org/index.php?topic=20556.0 looks like a good starting point, although it's oriented towards Windows. If you're really looking for "/the/" address then I think you might end up parsing the routing table (left as an exercise :-) and finding which local IP address talks to the default gateway... which itself gets messy since there might be multiple prioritised gateways. And then there's IP6 to consider. Word of advise: don't try arithmetic operations on IP addresses, and in particular don't speculate on "next hops" etc. based on what you know about your local network. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using event driven components in console application
JuuS wrote: On 11/05/2015 07:05 PM, JuuS wrote: On 11/04/2015 12:30 PM, Mark Morgan Lloyd wrote: JuuS wrote: On 11/04/2015 09:48 AM, Mark Morgan Lloyd wrote: When building the IDE you'd normally use make bigide or similar which would use the platform defaults, but depending on what libraries etc. were available you could also use e.g. make LCL_PLATFORM=qt bigide Hi, This question / discussion is also very interesting to me (warning possible dumb questions ahead). I am still very vague on the widget type/set in my gnu/linux education. I'm kub14.04, the ide then uses gtk2, all automatic. If that's Kububtu, I'd expect it to be using KDE which implies you've already got Qt. Assuming that you have- or can add- libqt4pas-dev then you can build the Lazarus IDE etc. for Qt. A. Thank you for the insight! Yes, I can now compile qt as well as gtk2. So simple!!...when you know what is needed... Just FYI for others that may be in my position: This insight (using a qt version) just solved the problem I was having with a later install version of kub 14.04 and kub 15.04 and 15.10 where a simple progress bar from the comp. palette showed fine in my development computer (earlier install v. of 14.04) but would NOT show in those other two versions. Ouch. Thanks again, you just solved a headache for me (but one needs to install the libqt4pas5 library on the destination machines, even so problem solved). Having to have that library is unfortunate, but is a fundamental requirement since Qt exposes a C++ API which is not directly usable by FPC. If you start looking too closely at that point, you have to question the wisdom of using non-mainstream tools... I really don't want to go there. In practice, it's also worth installing database -dev packages e.g. libpq-dev on user-level machines, since it is these that typically set up a fixed-name symlink that avoids an app having to search for various possibilities. So on one of the older machines around here I've got /usr/lib/libpq.a /usr/lib/libpq.so -> libpq.so.5.1 /usr/lib/libpq.so.5 -> libpq.so.5.1 /usr/lib/libpq.so.5.1 while on a newer one: /usr/lib/libpq.a /usr/lib/libpq.so -> libpq.so.5.4 /usr/lib/libpq.so.5 -> libpq.so.5.4 /usr/lib/libpq.so.5.4 That's a distro problem, not an FPC or Lazarus one. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extending TRect breaks Lazarus
Luca Olivetti wrote: El 06/11/15 a les 18:10, Martin Schreiber ha escrit: You are joking, no? It has been discussed on fpc-pascal/fpc-devel several times. An IIRC Italian community member then usually shows a syntax description of a safe "with" statement from a maybe more than 20 year old pascal dialect. I don't know if that's me, but, yes, I used a variant of pascal (by texas instruments) that allowed to declare aliases with "with", e.g with a=somerecord, b=someotherrecord do begin a.x:=b.x; end; Just because something is 20+ years old doesn't necessarily make it bad. That syntax looks OK to me (i.e. make a and b look like consts) but I also find myself wondering what the type rules are, i.e. with pod: TTabSheet= Pages.Objects[deleteAt] do vs with pod= TTabSheet(Pages.Objects[deleteAt]) do -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using event driven components in console application
JuuS wrote: Excellent research, I see you've tracked this issue for a long time. Not so much that, but my colleagues and I have a fairly wide range of OS versions etc. and there are one or two programs that I really do want to run on just about anything (e.g. one that handles cut-and-paste over the LAN). I've also written a very small amount of stuff that potentially I want to be able to send to anybody with confidence that any version of Lazarus will be able to read the forms and any version of FPC will be able to compile it. In most cases that's doable, provided that one's careful about exactly what gets put into svn. In addition to form (.lfm etc.) compatibility, there's a couple of "gotchas" that's deserve comment. The first is that TNotebook (and related components) got a major workover somewhere around Lazarus 1.0, in general problems can be sorted by RTTI etc. It's worth noting as a related issue that the introduction of frames required a compiler facility that for a long time was only in a development version: if you put frames in a notebook, you'll have problems supporting really old versions. The second is that SynEdit got some internal changes, and if you want to do anything that involves reaching below the surface I think you have to use compile-time conditionals rather than RTTI. That's one reason that I did the work to find out what compiler versions worked with which LCLs, expect problems around 0.9.28. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using event driven components in console application
JuuS wrote: On 11/04/2015 09:48 AM, Mark Morgan Lloyd wrote: When building the IDE you'd normally use make bigide or similar which would use the platform defaults, but depending on what libraries etc. were available you could also use e.g. make LCL_PLATFORM=qt bigide Hi, This question / discussion is also very interesting to me (warning possible dumb questions ahead). I am still very vague on the widget type/set in my gnu/linux education. I'm kub14.04, the ide then uses gtk2, all automatic. If that's Kububtu, I'd expect it to be using KDE which implies you've already got Qt. Assuming that you have- or can add- libqt4pas-dev then you can build the Lazarus IDE etc. for Qt. But my questions are: Why would I want to use qt, gtk3, etc? Yes, of course for different platforms but which platforms (Fedora? Debian? ?? ). Depends massively on the version of whichever distro you've selected, since these will typically bundle different versions of Gnome and it's this that drives GTK forwards. I'm sure you've seen Torvalds' rants on the issue. It also depends on the version of Lazarus you're using since of necessity this tracks GTK and Qt, and to a much lesser extent on the version of FPC for the same reason. In general, Debian "Lenny" is OK for GTK and GTK2. Debian "Squeeze" and "Wheezy" are OK for GTK2 and Qt. My experience with Lazarus "Jessie" is that Qt is somewhat more reliable than GTK, although I'm sure I'll take flak for saying so. Can't remember where I've got to with "Stretch". Recent versions of Lazarus have started making demands of Qt that are no longer satisfied by the one with "Squeeze". Does this mean then that what I have developed in gtk2 will ==NOT== run properly in some gnu-L flavours? Which ones? How do I tell? Yes. Pass. Badly. I guess setting up VMs for my targets is a good solution to find out if there is a problem but I can't always tell which widgetset is right for which flavour...? I have googled this before but have found nothing that has enlightened me. The first problem to solve is pairing up which version of FPC works best with a given version of Lazarus. After experimentation, I've got /usr/local/bin/lazarus-0.9.24+2.2.4 /usr/local/bin/lazarus-0.9.26+2.2.4 /usr/local/bin/lazarus-0.9.28+2.4.0 /usr/local/bin/lazarus-0.9.30+2.4.4 /usr/local/bin/lazarus-1.0.0+2.4.4 /usr/local/bin/lazarus-1.0.0+2.6.0 /usr/local/bin/lazarus-1.0.8+2.6.2 /usr/local/bin/lazarus-1.0.14+2.6.4 /usr/local/bin/lazarus-1.2.6+2.6.4 /usr/local/bin/lazarus-1.4.2+3.0.0 /usr/local/bin/lazarus-gtk1-compatible The last of those is actually 0.9.24.1 with FPC 2.2.4, which is about as old as is viable. I can't say without significant digging in my build scripts which of those are also good for Qt. I really can't say which are good for different versions of Windows (except that if you really do have to build for NT you'll need something like 0.9.26.2 + 2.2.4) or for OS X. Anybody into SPARC Solaris should find 1.4.2 + 3.0.0 OK. The best thing to do, in my opinion, is to build as many variants of your binary as possible for a given platform, and then find out what doesn't work. To try to keep that doable I've got a script set up which points each of the combinations listed above at its own configuration file, so that I don't find myself chasing shadows because the underlying FPC version is suddenly wrong. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Error SIGILL appearing out of the blue, what does it mean?
Bo Berglund wrote: Yesterday I was testing lnet and the test project was working just fine. Today I came back and hit run again only to find a pop-up error box saying: Project xxx raised exception class 'External: SIGILL'." I have restarted Lazarus and even made a Build Clean but the problem persists. I don't even get to keep what has been written to the console (I see a few lines appearing but they are immediately erased). Yesterday whatever was written to the console remained until the test program was started again. That was very convenient in order to trace what happened against the source. Where should I look for a solution to this? Is this the IDE crashing when doing nothing in particular, the IDE crashing when you try to run your program, or your program crashing when it runs in isolation? In the latter two cases, I'd suggest making sure the program is built with debug info, then running it from a shell session (i.e. not inside Lazarus) and getting a GDB backtrace. http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB#Very_short_how-to -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using event driven components in console application
Graeme Geldenhuys wrote: On 2015-11-04 16:45, Martin Schreiber wrote: On Wednesday 04 November 2015 14:31:34 JuuS wrote: But this is what, ultimately, fpGUI will address I believe? Wiki page Interestingly it is now 16:52 local time, and I haven't seen that message from Juus in my Inbox. Umm... Are there some hick-ups with the mailing list today where message are out of sync? No, it's HMG filtering your email. Who've you upset? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using event driven components in console application
Bo Berglund wrote: On Tue, 3 Nov 2015 18:39:50 +0100, Mattias Gaertner <nc-gaert...@netcologne.de> wrote: you mean that Application.Processmessages is available in this console program? It is available when you use the NoGUI widgetset. How do you change which "widgetset" is used? (I really do not know what you mean by widgetset, but I assume it is some kind of application framework). It's the layer of libraries in between the X11 server (or the Windows API etc.) and the LCL. The widget set implements the standard GUI elements (forms, buttons and so on) while the LCL takes these and provides a standardised set of properties and events that apps can use. Since you're working on a console app this probably isn't something you need to bother about, but it's usually defined somewhere around Project -> Options -> Paths. However this has tended to vary a bit as the IDE has gained things like build modes. When building the IDE you'd normally use make bigide or similar which would use the platform defaults, but depending on what libraries etc. were available you could also use e.g. make LCL_PLATFORM=qt bigide -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Encoding with SDF dataset
Marc Santhoff wrote: Hi, when trying to us a TSdfDataset connected to a TDatasource and a TDBGrid, only some unicode symbols are shown (those little squares holding four tiny numbers) for string data. The data files are encoded iso-8859 but I have found no switch for setting the encoding of TDataSource or TSdfDataset. When loading a TFileStream is used, but I did not find a property or method for changing the encoding on the fly in it, either. How can I fix it? In my limited experience depends critically on the version etc. of the OS you're running. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus implementation of TListView etc?
Michael Schnell wrote: For the record: I verified that with the gtk2 (Linux) Widget type, "PostMessage()" uses a different Event Queue ("TGTKMessageQueue") than "TThread.Queue()" and TThread.Synchronize()". So for this, calling "CheckSynchronize() will not help. You need to use the appropriate GUI-based Widget type. Thanks for that, useful. That's going to impact anybody trying to convert code that uses custom Windows messages to pass events around. Application.QueuAsyncCall() uses yet an additional Event Queue. Here using a WidgetType is not strictly necessary, but calling "CheckSynchronize() will not help, either. Here, TApplication provides "RemoveAsyncCalls()" which in a GUI Bases Widget Type is called in "Forms". As a non-GUI Project does not have Forms, RemoveAsyncCalls() needs to be called by a different functionality. I don't think I've used QueueAsyncCall() in the context of a non-GUI program. Where I do find it useful is when converting an interactive non-GUI (i.e. console) program into a Lazarus GUI app: enqueue an async call in the main form's FormCreate() with the payload being e.g. a looping interactive command interpreter which calls Application.ProcessMessages when it's got nothing to do. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] External SIGSEGV (random) when assigning TBookmark
Leonardo M. Ramé wrote: El 03/11/15 a las 04:40, Michael Van Canneyt escribió: On Mon, 2 Nov 2015, Leonardo M. Ramé wrote: El 01/11/15 a las 09:25, Leonardo M. Ramé escribió: Hi, I don't use data aware controls too often, but as I'm updating a legacy application I have to use them. ... I finally solved this by getting the value of a primary key, then after TSQLQuery.refresh I do a locate for that key, works like a charm. What I don't get is what's the purpouse of TBookmark, I thought it was made for solving the problem I had. Bookmarks are only valid until the dataset closes. I will add this to the documentation. Michael. Ok, but apart from Closing/Opening or Refresh, is there any other way to reload a dataset without closing it? TSqlQuery.Refresh also loses the Bookmark. Even if you could reload it, I'd have thought that the only valid way of positioning would be by locating against a column (preferably known to have an index). After all, the content of the table might have had gross changes due to the actions of other users, and potentially the layout might have changed. I find myself moving away from data-aware controls and instead executing queries in a background thread, to try to avoid UI glitches while the backend's doing its stuff. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus implementation of TListView etc?
Bo Berglund wrote: My most recent investigation is about how to create a TCPIP socket object that has event driven receive functions. I have no use for the problem unit in that quest so this thread is not really valid for those problems. Last I tested Indy10 with the help of Remy Lebeau but in the end I got caught by my inability to use a blocking socket with threads and fire off events into the main code running as the command line program. What does the main thread do? If you can contrive to write that as a loop, then as you've already been told you can call CheckSynchronize() which hands control to whatever's been queued by threads using Synchronize(). Depending on exactly what the program does, you might need to do something like fudging keyboard access using fpSelect(), but basically it works... I've got a mainframe emulator here which responds to keyboard commands and also interleaves output from the various backend processes, I've used Lazarus as the IDE but it's entirely a console app. I cannot use Synchronize because then the events fire off only when the main program code ends and if I don't use Synchronize then I get a SIGSEG exception somewhere. Assume that none of the LCL is thread-safe, i.e. background threads have no safe UI access. Assume that the RTL and FCL are not specifically thread safe except where documented, but that you can use it in conjunction with conventional "cautious" programming techniques. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus implementation of TListView etc?
Bo Berglund wrote: thank you very much for your excellent descriptions and tips! I did not know of CheckSynchronize before but I immediately threw in a number of such calls in the existing code that throws the SIGSEGV exception and Lo-and-behold! I am now getting the event output I was expecting and no SIGSEGV exception! :) I'm pretty sure it was mentioned a couple of days ago, since I had to ask what it was called (despite using it myself). The sending part is a bit of a mystery to me as well because the socket is owned by the reading thread and I don't currently know the best way to actually tell it to transmit some data. I got stuck by the non-appearance of the event execution before... Threads don't own things, things are owned by processes. I'm not entirely sure about this, but I think that you could probably have one thread reading and another writing. HOWEVER... Finally My communications object does not use Synchronize() for the events. Should I add this back now that CheckSynchronize seems to have cured a few "shortcomings"? A lot will depend on whether you decide to use an off-the-shelf library or component suite, which would probably be appropriate if you're implementing a standard protocol. My understanding is that CheckSynchronize() does a significant amount of what the LCL main loop would do, which accounts for much of the difference between program types. Alternatively look at the lnet code that comes with FPC, I'm using the Telnet client from that to talk to things like simulated IBM mainframes. As a general point, if you're implementing a protocol from scratch you might find it appropriate to use UDP rather than TCP. Since UDP is unreliable you'd obviously need to implement your own sequence numbers etc. to detect missed messages, but it has the advantage that messages won't need reassembly if they get fragmented due to e.g. a router having a smaller-than-expected MTU. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus implementation of TListView etc?
Bo Berglund wrote: On Sat, 31 Oct 2015 10:22:08 +, Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: Bo Berglund wrote: What does the main thread do? If you can contrive to write that as a loop, then as you've already been told you can call CheckSynchronize() which hands control to whatever's been queued by threads using Synchronize(). Right now the main thread (you mean the program code itself in the console program DoRun event, right) does this (mostly debug messages into the console): I don't use Indy, but If I'm reading that lot correctly the answer is "outputs a couple of messages and terminates, within a second of startup". Everybody's usage of threads etc. differs, depending on what they're doing and what their background is, so I hope somebody else is checking what I'm saying here (there's a big difference between using something and being competent to explain it- I consider myself in the former category). What I'd do is change the main code to be a loop to output your test messages without starting a background thread, and to loop for say a minute with Sleep() and CheckSynchronize(): if this crashes then you've got bigger problems. Once this runs enable your comms thread and get it to output a couple of messages via Synchronize(), again this should not crash while the main program is running. After that concentrate on- in particular- shutting down in good order, i.e. making sure that background threads are terminated before pulling the process out from under them. Writeln('Freeing FComm at time ' + IntToStr(T2-T1)); finally FComm.Free; end; // stop program loop Terminate; end; And the output into the console is this: Creating TCP client Start communications at time 27 Connecting to www.sunet.se on port 80 Going to sleep 500 at time 27 Event: Socket connected! Time = 71 ms Waking up from sleep 500, at time 527 Going to sleep 300 at time 527 Waking up from sleep 300 at time 827 Terminating thread Freeing FComm at time 827 I hope somebody else will comment about how much housekeeping FPC does here, but I do believe you've got a race condition: what happens if the main thread (i.e. the overall process) terminates faster than the background thread? When I run it in Lazarus there is a pop-up window saying: Project IndyTCPtest raised exception class 'External: SIGSEGV'. At address 3132 Make sure you're compiling with debugging enabled. Depending on exactly what the program does, you might need to do I just wanted to make a test with the TThread child I created, which also contains the TIdTcpClient object, to see if the events fire off. But I only get a single one into my code, then the SIGSEGV error. You need to loop dequeuing events. something like fudging keyboard access using fpSelect(), but basically it works... I've got a mainframe emulator here which responds to keyboard commands and also interleaves output from the various backend processes, I've used Lazarus as the IDE but it's entirely a console app. I will have to figure out a way to make the test code do that loop. I had hoped that while executing sleep() statements the main thread would yield to the TCP thread but it seems like it does not... Definitely not. Think about it for a moment: Sleep() is basically a low-level OS call, it really doesn't want to get involved with the complexity of deciding whether it's already in an event handler or is in a background thread. A good starting point would be having the main loop run for a fixed time- a minute or something like that. In my case I've fudged my own keyboard handler etc. in a way that (hopefully) will allow me to use a GUI frontend, in other words it has to either poll the keyboard (the simpler case) or use fpSelect(). Potentially, for a non-GUI program keyboard handling etc. could simply be moved into its own thread so when it's accumulated a command (e.g. 'quit') it simply enqueues it using Synchronize() and the main thread decides what to do with it. I cannot use Synchronize because then the events fire off only when the main program code ends and if I don't use Synchronize then I get a SIGSEG exception somewhere. Assume that none of the LCL is thread-safe, i.e. background threads have no safe UI access. Assume that the RTL and FCL are not specifically thread safe except where documented, but that you can use it in conjunction with conventional "cautious" programming techniques. I have assumed as much so there is no side access to any data as far as I can tell. Again, this is just a very simple console test program to check the operations of the threaded TCPIP communications, nothing near the final code because there I will have exit conditions and such. Start off with a very simple program to /only/ test a background thread. I'd suggest leaving Indy etc. out of it until you're confident that it works and never throws an exception, /pa
Re: [Lazarus] is scrypt available?
wkitt...@windstream.net wrote: the above link is the license URL... the stuff about patents is off putting to say the least... Apologies for chopping the bulk of that message, but it's coming over unformatted. The patents issue relating to zlib etc. is way out of date, see https://en.wikipedia.org/wiki/LZW#Patents for a summary. What you choose to use depends on what (if anything) you need to be compatible with, but for some password stuff I wrote a couple of years ago I used Tiger2 from DCPcrypt. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] is scrypt available?
wkitt...@windstream.net wrote: On 10/28/2015 01:00 PM, Mark Morgan Lloyd wrote: wkitt...@windstream.net wrote: the above link is the license URL... the stuff about patents is off putting to say the least... Apologies for chopping the bulk of that message, but it's coming over unformatted. no problem... i do take steps to reformat some quotes some times... The patents issue relating to zlib etc. is way out of date, see https://en.wikipedia.org/wiki/LZW#Patents for a summary. it isn't those patent issues... there's something else that the license link page talks about... Go on... The Unisys and BT patents are the ones that have given most people problems, which is why I cited that page. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] *SPAM* Re: annoying (attn: Michael Schnell)
Michael Schnell wrote: On 10/26/2015 11:36 AM, Sven Barth wrote: Your mail today regarding the widgetset initialization added yet another "*SPAM*" for example. I see. The I answered to already did have the addition. So somebody installed an inappropriate spam filter in the mail infrastructure. I'll try to take care to manually delete the nonsense before sending. Take a look at the ML archive. The first *SPAM* message that appears is usually from you, but if- when it gets to you- the message you're commenting to is already annotated that suggests that it's being done by your service provider to your incoming (not outgoing) messages. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Clipboard problem with Lazarus using VNC
Michael Schnell wrote: On 10/26/2015 10:09 AM, Mark Morgan Lloyd wrote: No, as I've said before... Seemingly this mail is not in the List. 22nd October. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus