[Lazarus] Lazarus IDE not sizeable on Raspbian PIXEL
I don't know if this is a known problem or if there are solutions to it, but here goes: I have just completed installing Lazarus 1.6.2 and FPC 3.0.0 on a pristine Raspbian PIXEL operating system running on an RPi3. When Lazarus starts up the first time the usual dialog about the fpc sources pops up but it auto-fills in correctly so I do not have to do anything. Then the main IDE is shown. Now the problem: The main IDE bar on top of the screen only reaches about 60% of the width of the screen and there is no way to resize it using the mouse. The other Lazarus windows are resizable in the normal way but not the main IDE bar. And the maximize button on this top window is also disabled (grayed out) and cannot be used. I suspect that this has something to do with the new window manager on Raspbian PIXEL, and since it has been out for half a year now I am hoping someone here has a solution to this problem... Is there some extra dependency I have to install into the operating system apart from the usual set I always install? These are the ones I always install before starting the FPC/Lazarus installation: libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev gir1.2-coglpango-1.0 libpangox-1.0-dev xorg-dev libgtk2.0-dev libpango1.0-dev Any ideas welcome! -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3
On Tue, 10 Jan 2017 11:14:51 +0100, Mattias Gaertner via Lazarus wrote: >> For example there is no fpc.cfg file anywhere on my system, should it >> not have appeared when fpc was built? > >No. You have to create it yourself. For example with the tool samplecfg. Just to complete this thread: I used the tool samplecfg to make a new fpc.cfg and used it instead of my earlier one. Now the build system wors OK for Lazarus! Thanks. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On Tue, 10 Jan 2017 15:24:54 +0100 Werner Pamler via Lazarus wrote: > > There are two versions of this AVL trees: The FPC unit avltree and the > > LazUtils unit avglvltree. It is the same tree, but with different > > names to avoid conflicts. > > Does this mean: I can directly replace the TAVLTree by the TAvgLvlTree > and the TAVLTreeNode by the TAvgLvlTreeNode to use the LazUtils tree and > everything works as before? No other changes? Yes. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
There are two versions of this AVL trees: The FPC unit avltree and the LazUtils unit avglvltree. It is the same tree, but with different names to avoid conflicts. Does this mean: I can directly replace the TAVLTree by the TAvgLvlTree and the TAVLTreeNode by the TAvgLvlTreeNode to use the LazUtils tree and everything works as before? No other changes? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On Tue, 10 Jan 2017 14:01:51 +0100 Werner Pamler via Lazarus wrote: >[...]A standard > "Add" of the tree calls "FindInsertPos" which seeks for the correct > position of the new cell. But every time this search starts from the > root which is unnecessary from my pov because the new cell should be at > the end. There is no "Append" or "AddtoEnd" method. An AddHighest can be added. Note that from a theoretical pov it still costs O(log n). > Maybe I should remember the node of the previously added cell, and when > the next cell is to be added I should attach it as a right child of this > node. That's what AddAscendingSequence does. > Unfortunately I am not very experienced with this kind of trees. For > example: Is it necessary to rebalance the AVLtree immediately after each > insertion, Yes, because the Balance factors are only valid for at most one error. > or can I wait until all nodes exist? There is a > "BalanceAfterInsert" method with the new node as a parameter - this > indicates that balancing should occur immediately after insert. But this > method is private and thus cannot be called from a derived tree > implementing an "AddToEnd" method. Well, theoretically you can create an optimized method that creates a fresh tree from a sorted list in O(n). In TAvgLvlTree the BalanceAfterInsert is protected. I will send a new version to FPC. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On Tue, 10 Jan 2017 13:23:46 +0100 Bart via Lazarus wrote: > On 1/10/17, Werner Pamler via Lazarus wrote: > > > If the author if the AVLTree is reading this: Is there a way to add a > > group of nodes to the tree which are already ordered such that they will > > be adjacent? > > I think that may not be possible. Your data may be ordered already, > but that does not guerantee that there is not already data inside the > tree that must be ordered "inside" the group you add? Yes, the optimization only works if you insert a sequence between two nodes. The new AddAscendingSequence checks that. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
I think that may not be possible. Your data may be ordered already, but that does not guerantee that there is not already data inside the tree that must be ordered "inside" the group you add? I am thinking of loading a spreadsheet from file. Initially the sheet (= tree) is empty. The cells in the standard spreadsheet files are arranged by rows, starting at the top; and within each row, the cells are ordered from left to right. So, the reader catches the cells in the correct order (the tree sorts the cells exactly in the same way). A standard "Add" of the tree calls "FindInsertPos" which seeks for the correct position of the new cell. But every time this search starts from the root which is unnecessary from my pov because the new cell should be at the end. There is no "Append" or "AddtoEnd" method. Maybe I should remember the node of the previously added cell, and when the next cell is to be added I should attach it as a right child of this node. Unfortunately I am not very experienced with this kind of trees. For example: Is it necessary to rebalance the AVLtree immediately after each insertion, or can I wait until all nodes exist? There is a "BalanceAfterInsert" method with the new node as a parameter - this indicates that balancing should occur immediately after insert. But this method is private and thus cannot be called from a derived tree implementing an "AddToEnd" method. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On Tue, 10 Jan 2017 12:10:31 +0100 Werner Pamler via Lazarus wrote: >[...] > If the author if the AVLTree is reading this: Is there a way to add a > group of nodes to the tree which are already ordered such that they will > be adjacent? > > The normal "Add" method assumes that the node can be > anywhere, and the tree has to find the correct location for the new > node. I guess that such a "batch mode" could speed up loading the AVLTree. Yes. There are two versions of this AVL trees: The FPC unit avltree and the LazUtils unit avglvltree. It is the same tree, but with different names to avoid conflicts. New features go to the lazutils version and are later merged to the FPC version. I added a function "AddAscendingSequence" to TAvgLvlTree for adding a sequence. Here is an example: var LastNode, Successor: TAvgLvlTreeNode; i: integer; begin LastNode:=nil; Successor:=nil; for i:=1 to 100 do LastNode:=Tree.AddAscendingSequence(TItem.Create(i),LastNode,Successor); end; In this example the number of compares are reduced from about 20 millions to 1 million. The time depends on your compare function. Usually compare functions are pretty quick, so in a simple example adding a sequence might be only twice as fast. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
Am 2017-01-10 um 13:35 schrieb Graeme Geldenhuys via Lazarus: >> I can also apply some more sophisticated functions like attribute change, delete, rename, etc. >> where I would not like to be resticted on the number of files in any way. > You don't need to see those items to apply those attributes. I prefer to see the items before I change them instead of blindly relying on a filter. A filter may include items I did not want to (filters can get complex). I need the abillity to have at least a quick glance over the list before I do the changes. >> Filtering: Yes. But it's not always the first step! > So pulling in 50+ million records into a data grid over a internet > connection (or worse, a dial-up connection) simply for the sake of it, > then only filtering down the data all seems very inefficient. Why pulling records over an internet connection? In this case the list needs to be hold on the server and the client just loads the next page if you scroll. But as said: There are use cases where you may want to start with a filter and there are others where it is not. Just let the user decide and do not force him to do it one way only. > Put another way, lets populate a dropdown combobox with 50 million items > and set the item display limit to 15 items. So if you open that, and > move the scrollbar with the mouse only 1 pixel, you'll probably scroll > the items by 100,000. Absolute pointless behaviour and design. I don't understand your example. When a subset of 15 items is displayed and you scroll down then only the next subset (again 15 items) needs to be displayed. Where is the problem? And when the slider is too sensitive for the large list then don't use it! Instead provide other ways to jump to specific entries. If I have a file list sorted by date I may jump to a specific date and then have the abilitiy to scroll around this date with the cursor keys or page up/down keys. Where is the problem? > I cannot see a single use case where that will be a good idea. I mentioned the case of the file manager. Just look at Xtree/Ztree. The concept exists since decades and I am missing it in many other applications. > If you have the time, read the book "About Face 3: The Essentials of > Interaction Design". You might learn something. These books are just opinions of other people. Nice to reed to get some ideas but they will never have the overall solution for all user interfaces. BTW: In the end there is not much difference between filtering and showing a flat list. You will never see all entries side by side in one window. In both cases a subset is displayed. When showing all entries you only see the first n records that fit on the window. After scrolling down, the next n records are shown. When jumping somewhere, still only n records need to be retrieved and shown. I don't see the problem with this. It's just like applying a new filter with each scroll event. When using a filter as the first step you get a list of all matching entries. But this list can get large too. You do not know before. Then you end up with the same problem: A large list of entries that needs to be displayed to the user. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On 2017-01-10 12:10, Jürgen Hestermann via Lazarus wrote: > I can also apply some more sophisticated functions like attribute change, > delete, rename, etc. > where I would not like to be resticted on the number of files in any way. You don't need to see those items to apply those attributes. Specify some file criteria, specify the attribute changes and apply. The result can be a count of affected files. And if your application is well designed, you can undo that action too. > I hate all these limited (mostly web) applications that split such large > lists into pages > where I have to choose a new page first just to move down a bit. > A rediculous restriction. Indeed, and that is not what I was suggesting. > > > A end-user always knows what they > > are looking for, more or less, (otherwise they wouldn't be in that > > screen). > > I disagree again! > In most cases I (and I think most users) only have a vague imagination of > what I am looking for. > I first need an overview to make further decisions (for example about a > filter). "vague" means you more or less know what you are looking for. My point exactly. NO end-user simply goes into an application screen and randomly browses 50 million data records (which will take years scanning visually), and then only comes up with an idea of what they want to do with that information. Instead they will go into a screen with the intend to find a subset of data - say all electricity suppliers for a region in a town. If they didn't have such an intent (no matter how big or small), they would not be using the application or be in that screen to start with. > Filtering: Yes. But it's not always the first step! So pulling in 50+ million records into a data grid over a internet connection (or worse, a dial-up connection) simply for the sake of it, then only filtering down the data all seems very inefficient. Put another way, lets populate a dropdown combobox with 50 million items and set the item display limit to 15 items. So if you open that, and move the scrollbar with the mouse only 1 pixel, you'll probably scroll the items by 100,000. Absolute pointless behaviour and design. I cannot see a single use case where that will be a good idea. If you have the time, read the book "About Face 3: The Essentials of Interaction Design". You might learn something. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On 1/10/17, Werner Pamler via Lazarus wrote: > If the author if the AVLTree is reading this: Is there a way to add a > group of nodes to the tree which are already ordered such that they will > be adjacent? I think that may not be possible. Your data may be ordered already, but that does not guerantee that there is not already data inside the tree that must be ordered "inside" the group you add? Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
Am 2017-01-10 um 12:03 schrieb Graeme Geldenhuys via Lazarus: > My point was that NO application should display so much data to a > end-user, as it is simply too much. I disagree. I have written an (XTree-like) file manager that can log all directories and files into memory. Then there is a function to display all of them in a flat list. This could be up to millions if you log a large server share. But you can then display a sorted flat list where you find i.e. the newest (or largest) files on top and the oldest (or smallest) files at the end. Of course, you will seldom step through all of them from top to bottom. But you may jump to top (or bottom) and scroll a bit up or down. Or you can jump to a certain entry (by name search or something else) and then scroll around this entry. I can even permanently tag some of these so found entries at top or bottom or in between and then reduce the list to just these tagged files with one keystroke. I can also apply some more sophisticated functions like attribute change, delete, rename, etc. where I would not like to be resticted on the number of files in any way. IMO these are very common use cases and should be made available to the user. I hate all these limited (mostly web) applications that split such large lists into pages where I have to choose a new page first just to move down a bit. A rediculous restriction. > A end-user always knows what they > are looking for, more or less, (otherwise they wouldn't be in that > screen). I disagree again! In most cases I (and I think most users) only have a vague imagination of what I am looking for. I first need an overview to make further decisions (for example about a filter). > So present them with some filtering options first. Basic UI > design principles... but this is another topic to discuss elsewhere. Filtering: Yes. But it's not always the first step! Very often I first need an overview to decide which filters I want to use. To stay with my file manager example: I can set a filter to show all files with the current date (today). But then I will miss all files that have a date in the future (from which very many exists on many machines). When I have an overall list sorted by date I will see them immeditaly on top. Also, when files are misspelled (or not spelled the way you expect them) then they may strike you when shown in an overall list but not when you already filtered by the text you expected. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
Am 2017-01-10 um 12:24 schrieb Michael Schnell via Lazarus: > On 09.01.2017 23:28, Werner Pamler via Lazarus wrote: > What about a two dimensional array of integers pointing to a one dimensional array of strings, and doing some garbage collection cells are set to empty strings ? (Maybe even identical strings can be managed...) What's the difference between a 2 dimensional array of intergers and a 2 dimensional array of pointers (assuming that integers use the same space as a pointers)? Even worse, you would need additional dereferencing and also an additional integer for each string. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On 09.01.2017 23:28, Werner Pamler via Lazarus wrote: I would be tempted to implement such a table in fpspreadsheet, but its problem is that it occupies memory for empty cells while the AVLTree stores only existing cells (at the expense of the cell record which contains row and column indexes). What about a two dimensional array of integers pointing to a one dimensional array of strings, and doing some garbage collection cells are set to empty strings ? (Maybe even identical strings can be managed...) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
Mind you that when you do not know the dimensions of the table AND you have to increase ColCount several times whilst filling the table, then I suspect things will slow down significantly, because each increase of ColCount requires RowCount times a SetLength on each row (which means re-allocating the entire row). Ah - that's the explanation: you did your test with a predimensioned table? Mine started with an empty table, and with every new cell the tree sorts the new cell to the correct location and rebalances itself. It would be interesting to compare with your table in the same way. If the author if the AVLTree is reading this: Is there a way to add a group of nodes to the tree which are already ordered such that they will be adjacent? The normal "Add" method assumes that the node can be anywhere, and the tree has to find the correct location for the new node. I guess that such a "batch mode" could speed up loading the AVLTree. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On 2017-01-10 10:51, Jürgen Hestermann via Lazarus wrote: > Of course, you will not see all the millions of entries at the same time but > putting it into a VirtualTree will allow you to scroll through them without > delay. fpGUI's StringGrid doesn't have any delay on scrolling or jumping to the extreme limits of the data. The all appear instantly. My point was that NO application should display so much data to a end-user, as it is simply too much. A end-user always knows what they are looking for, more or less, (otherwise they wouldn't be in that screen). So present them with some filtering options first. Basic UI design principles... but this is another topic to discuss elsewhere. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
Am 2017-01-10 um 11:06 schrieb Graeme Geldenhuys via Lazarus: > Now if any developers implements an application that actually displays > that amount of data to the end-user without filtering, I'll be first in > line to knock them over the head. :-P I think this is easy with VirtualTreeView as it only display what fits on the window. Of course, you will not see all the millions of entries at the same time but putting it into a VirtualTree will allow you to scroll through them without delay. I use a VirtualTree for millions of entries and it works fine. You only need to make sure that displaying one entry does not require to go through all other entries (i.e. by calculating something that involves all entries). -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3
On Tue, 10 Jan 2017 08:18:13 +0100 Bo Berglund via Lazarus wrote: > On Tue, 10 Jan 2017 13:52:05 +1300, Gordon Findlay via Lazarus > wrote: >[...] > I suspect that while compiling lazarus it needs access to fpc sources > as well No. >[...] > For example there is no fpc.cfg file anywhere on my system, should it > not have appeared when fpc was built? No. You have to create it yourself. For example with the tool samplecfg. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On 2017-01-09 15:28, Werner Pamler via Lazarus wrote: >> > filling a 1000x1000 TStringTable just cost me 76 ms. >> > A 5000x5000 table however cost me 1248 ms. > > Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec > for 1000x1000 and 10.3 sec for 5000x5000. I know you guys are talking about non-gui structures, but just for comparison I included fpGUI's StringGrid results, which uses a custom internal storage mechanism. Creating (setting column count and row count) and populating (every cell has a value written to it) a 5,000 x 5,000 grid takes 1.815 seconds on my system. The same test with a 1,000 x 1,000 takes 0.118 seconds. The same test with 10,000 x 5,000 takes 4.514 seconds. Not to shabby for a GUI component. ;-) Now if any developers implements an application that actually displays that amount of data to the end-user without filtering, I'll be first in line to knock them over the head. :-P Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Small patch for BreakpointDlg
FWIW added it to the bugtracker: http://bugs.freepascal.org/view.php?id=31209 BR On Sun, Jan 8, 2017 at 6:56 PM, Flávio Etrusco wrote: > Hello, > > this patch adds an 'Add' button to toolbar in BreakpointDlg. > > Best regards, > Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On 09/01/17 21:17, Bart via Lazarus wrote: > On 1/9/17, Lukasz Sokol via Lazarus wrote: > >> For such usage, it is rather assumed that NO substring can contain EOL of >> any kind, > > For the intende purpose of TStringTable, this is certainly NOT the case. I understand that :) and I respect that. > >> EOL is assumed to be meaning end of a string here. Not unlike TStringList >> assuming EOL to mean end of a string. > > That makes no sense to me at all. > Sorry should have reiterated EOL is an end of a SUBstring... :) > Bart > -L. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus