* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
I was installing the sgcWebSokets library but when i try to compile it says that it doesn't found the IdGlobal unit, i installed de Indy library trying to fix this, but it keeps poping the same error, another question, is how i add the indy library in the paths on the package installation, in the routes added to the library there are ../Lazarus/Indy and ../Source but i don't know if this is correct, so please help guys!! Y-Y .
2
General / Re: DBGrid Mouse Wheel "hesitation"
« Last post by bobonwhidbey on Today at 07:47:17 pm »
I discovered an approach which works well for me, although it seems a bit 'kludgy'.
I've added a tDBNavigator [NavBar] to the form with the DBGrid, and wired it up appropriately. I set visible to false because I don't really want to see it.

On FormShow I execute

  NavBar.DataSource.DataSet.First;
  NavBar.DataSource.DataSet.Last;

which establishes the range of the DB and sizes the scroll button correctly.

Then I use a Query.Locate to position the scroll bar in the correct place and make the desired record visible.

YMMV
3
Is there a way between ? Something like class vars but which can be redefined in inherited Classes ?
A class var can be a list....or better a tree..
4
General / Universal Virtual Array Random Generator
« Last post by Nitorami on Today at 06:35:27 pm »
For those interested in pseudo random number generation, Jean Debord's dmath package contains an interesting one I had not been aware of by now.

https://sourceforge.net/projects/dmath/

It is the "universal virtual array generator" in unit uranuvag.pas, which is a pascal adaptation of an algorithm proposed 2013 by Alex Hay on github https://github.com/seehuhn/dieharder/blob/master/libdieharder/rng_uvag.c

The author says his genrator "evolved over years of playing around", and "does not yield easily to mathematical analysis unlike well researched prngs like MT and RC4", so it certainly lacks a solid theoretical basis, and might potentially have flaws. I am also sceptical about the claim in uranuvag.pas that it is suitable for cryptographic purposes. But apart from that it is pretty fast, does not require multiplications, is easily scalable to integers of different size, and passes all statistical tests I tried, even with poor seeding. It looks like this has not become widely known, and except for the links above there is hardly a notion on the Internet. I think it is not bad at all, and may deserve a bit more attention.

 

5
General / Re: delphi and C++ builder community edition is here...
« Last post by Mr.Madguy on Today at 05:33:44 pm »
UTF-8 is part of Unicode, one of its encodings. The issue has been discussed many times, I wonder how you can still have a misunderstanding about it.
Windows uses UTF-16 encoding. Conversion between encodings is lossless, meaning there will be no corrupted data.
LCL-Win32 makes only a reasonable amount of calls to WinAPI, the performance penalty is small. If you make millions such calls in your code, you should use UnicodeString type explicitly. Even then your code is 100% compatible with Delphi.
You can write fully compatible code even if you want to iterate over individual codepoints.
Thus, Unicode is not really an issue!
Everybody tells me, that conversion between UTF-8 and UTF-16 is pretty easy in Lazarus and even automated, while my own experience shows, that I have to use some weird constructions, like PWideChar(UnicodeString(UTF8Decode(X))), to achieve this goal and even in this case I just can't be 100% sure, that everything works correctly and no data corruption happens, i.e. that my program will work for all my users - not just me. Anyway. Currently my target is Windows only and I don't like, that internal string representation differs from external one. I also don't like, that code isn't compatible with Delphi and string processing routines are much more complex for UTF-8. In short. What I need - is free variant of Delphi. Nothing more. Till then Lazarus - is just like C++ for me. Yeah, I can use it to make some small demo projects, but I will never be able to fully migrate to it.

You should understand, that it's all about philosophy. And currently my philosophy doesn't match Lazarus philosophy. I.e., yeah, may be I can make UTF-8 work the same way, as UTF-16, but I just wouldn't like this solution - it would be clunky from my point of view. And if it matches your philosophy, then, ummm, ok. But don't tell me, that Lazarus uses this solution, because it's best possible or something like that.
6
Options / Re: lazarus 1.8.4 groupbox radiobox checkbox huge bug?
« Last post by ASerge on Today at 05:07:23 pm »
lazarus1.8.4 get os default font name procedure  is not right if font name is not english?
Most likely the problem is in the font, but it is difficult for me to check, because I do not have such fonts, and the default is Segoe UI.
7
General / Re: delphi and C++ builder community edition is here...
« Last post by JuhaManninen on Today at 04:49:27 pm »
... my projects have some Windows-related code and Lazarus has some problems with UTF-8->Unicode conversions - they aren't transparent enough and I'm afraid, that it can cause some unexpected side effects, such as performance penalties and corrupted data.
UTF-8 is part of Unicode, one of its encodings. The issue has been discussed many times, I wonder how you can still have a misunderstanding about it.
Windows uses UTF-16 encoding. Conversion between encodings is lossless, meaning there will be no corrupted data.
LCL-Win32 makes only a reasonable amount of calls to WinAPI, the performance penalty is small. If you make millions such calls in your code, you should use UnicodeString type explicitly. Even then your code is 100% compatible with Delphi.
You can write fully compatible code even if you want to iterate over individual codepoints.
Thus, Unicode is not really an issue!
8
General / Re: Any Operating Sytem(OS) written with Freepascal?
« Last post by coradi on Today at 03:56:40 pm »
:-( Idiots
"one recurring theme we see is that the Pascal language is too often cited as a reason not to use Ultibo."
9
General / Re: Java not free anymore
« Last post by sash on Today at 03:38:22 pm »
Not all produced compiled binaries are dependent on third party libraries that subject to licensing issue
Unless if you're writing code for micro-controller without OS, from the point of view of compiled executable even bare minimal OS kernel (filesystem, IO, memory, process management) is already a "third party" library. And please note, there are hardware/os owners that restrict free (unlicensed) development, be it native or interpreted.
10
General / Re: Any Operating Sytem(OS) written with Freepascal?
« Last post by krolikbest on Today at 03:29:45 pm »
not an operating system but close.
https://ultibo.org/

Interesting. have to try.
Pages: [1] 2 3 ... 10

Recent

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