Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Chris Moody
On 08/15/2015 08:46 PM, Chris Moody wrote: On 08/15/2015 07:40 PM, Karoly Balogh (Charlie/SGR) wrote: Hi, On Sat, 15 Aug 2015, Chris Moody wrote: Is there a better guide on how to do this than: http://wiki.freepascal.org/fpcup#Linux_ARM_cross_compiler ? specifically as far as this senten

Re: [fpc-pascal] Persistent list to store objects

2015-08-17 Thread Luiz Americo Pereira Camara
TCollection with fpjsonrtti unit See examples in packages/fcl-json folder Luiz Em 17/08/2015 14:06, "luciano de souza" escreveu: > Hello all, > > There are several classes which manages lists. TCollection, > TObjectlist, TFPGObjectlist... Does someone know if one of then can be > saved as a fil

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Martin Schreiber
On Monday 17 August 2015 15:42:36 Michael Schnell wrote: > > Remote gdb: > - I had not been able to create the gdb (x85) / gdbserver(ARM) pair > (not an fpc issue at all) > - I read that remote gdb does not allow for manually stopping a > running program under debug if no breakpoint is reached

Re: [fpc-pascal] shift right operation with variables

2015-08-17 Thread Marco van de Voort
In our previous episode, Peter said: > I was going to comment that the 'bitmask example doesn't work, which it > didn?t, but looks like its been recently fixed by adding the needed > QWord cast on the '1's. > > http://wiki.freepascal.org/Bit_manipulation > > Qwords are certainly trickier to use t

Re: [fpc-pascal] Persistent list to store objects

2015-08-17 Thread Graeme Geldenhuys
On 2015-08-17 18:05, luciano de souza wrote: > Does someone know if one of then can be > saved as a file and reloaded again to an object? Use TtiObjectList as defined in the tiOPF (Object Persistence Framework). You can store the containing objects to CSV, TAB, multiple RDBMS or even over a 3-tier

[fpc-pascal] Persistent list to store objects

2015-08-17 Thread luciano de souza
Hello all, There are several classes which manages lists. TCollection, TObjectlist, TFPGObjectlist... Does someone know if one of then can be saved as a file and reloaded again to an object? Regards, -- Luciano de Souza ___ fpc-pascal maillist - fpc

Re: [fpc-pascal] shift right operation with variables

2015-08-17 Thread Peter
I was going to comment that the 'bitmask example doesn't work, which it didn’t, but looks like its been recently fixed by adding the needed QWord cast on the '1's. http://wiki.freepascal.org/Bit_manipulation Qwords are certainly trickier to use the Dwords. _

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Chris Moody
On 08/17/2015 05:15 AM, Karoly Balogh (Charlie/SGR) wrote: Hi, On Mon, 17 Aug 2015, Michael Schnell wrote: Cross compiling with fpc is not for that faint of heard. (Been there some years ago) Well, I do it 8 hours a day for a living, actually... :) I think it's really easy these days, if yo

Re: [fpc-pascal] FreeBSD and fpc messages.

2015-08-17 Thread Graeme Geldenhuys
On 2015-08-17 15:41, Fred van Stappen wrote: > ...changing the background image of desktop, the battery of the > netbook, my haircut, finally it works ... LOL - I've had many such days, so know exactly how you feel. Regards, - Graeme - ___ fpc-pasc

Re: [fpc-pascal] FreeBSD and fpc messages.

2015-08-17 Thread Fred van Stappen
> Well done! I'm glad you finally got it sorted out. > > Regards, > - Graeme - Thanks Graeme. After trying many fpc releases, install all FreeBSD distros that exist, re-compiling fpc, changing the background image of desktop, the battery of the netbook, my haircut, finally it works ... Happ

Re: [fpc-pascal] FreeBSD and fpc messages.

2015-08-17 Thread Graeme Geldenhuys
On 2015-08-17 14:53, fredvs wrote: > I am very happy to have find the solution. Well done! I'm glad you finally got it sorted out. Regards, - Graeme - ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mai

Re: [fpc-pascal] shift right operation with variables

2015-08-17 Thread Marco van de Voort
In our previous episode, Xiangrong Fang said: > var > res: Integer; > mask1, mask2: QWord; > begin > mask1 := $ shr 24; > WriteLn(IntToHex(mask1, 16)); > res := 24; > mask2 := $ shr res; > WriteLn(IntToHex(mask2, 16)); > end. > > Why they are different

Re: [fpc-pascal] FreeBSD and fpc messages.

2015-08-17 Thread fredvs
Hello everybody. Many, many thank to help. I have find the guilty. ;-) This code, in fpc.cfg was the cause of the strange characters: => # path to the messagefile, not necessary anymore but can be used to override # the default language -Fr/usr/local/lib/fpc/$fpcversion/msg/errore.msg -Fr/usr/l

Re: [fpc-pascal] shift right operation with variables

2015-08-17 Thread waldo kitty
On 08/16/2015 09:38 PM, Xiangrong Fang wrote: The output is: 00FF 00FF Why they are different? How can I ensure the result is like SHR with constant. being curious, i tried your program with the same results... then i changed the var name from "res" to "foo" with the

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Michael Schnell
On 08/17/2015 02:15 PM, Karoly Balogh (Charlie/SGR) wrote: Of course, wiring it into an IDE is a different question, that I don't know (and don't use)... That is what I was trying to do. In fact Lazarus provides settings for OS and Arch to be used. But I did not get this to work at that time.

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 17 Aug 2015, Michael Schnell wrote: > Cross compiling with fpc is not for that faint of heard. (Been there some > years ago) Well, I do it 8 hours a day for a living, actually... :) I think it's really easy these days, if you know some basics about the build system (most of which is

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Jonas Maebe
Adriaan van Os wrote on Mon, 17 Aug 2015: So, why not provide an FPC CryptoRandom function, calling into /dev/urandom on UNIX and CryptGenRandom on Windows ? Proper cryptography requires much more than just unpredictable r

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Adriaan van Os
Michael Van Canneyt wrote: In short: People interested in crypto grade randomness should use specialized routines, not the built-ins provided by FPC. So, why not provide an FPC CryptoRandom function, calling into /dev/urandom on UNIX and CryptGenRandom

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Michael Schnell
On 08/17/2015 11:15 AM, Michael Van Canneyt wrote: In short: People interested in crypto grade randomness should use specialized routines, not the built-ins provided by FPC. +1 As said: random numbers are a matter if taste (or of the application) e.g. : I once did a project where we such a

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Michael Van Canneyt
On Mon, 17 Aug 2015, Peter wrote: On 17/08/15 09:05, Michael Schnell wrote: Unfortunately "Randomize" (in Linux in "System") just does randseed:=longint(Fptime(nil)); if it would use /dev/urandom, Perhaps that is worthy of a bug report? Don't bother. It's just a default. You can e

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Peter
On 17/08/15 09:05, Michael Schnell wrote: > Unfortunately "Randomize" (in Linux in "System") just does > randseed:=longint(Fptime(nil)); > > if it would use /dev/urandom, > Perhaps that is worthy of a bug report? ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 08/14/2015 04:38 PM, Mark Morgan Lloyd wrote: It seeds itself with "entropy" from the intervals between LAN packets, intervals between typed characters and so on. Unfortunately "Randomize" (in Linux in "System") just does randseed:=longint(Fptime(nil)); if it wou

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Michael Schnell
On 08/17/2015 10:14 AM, Michael Schnell wrote: I would set randseed via randseed Grrr. I would set randseed via /dev/urandom -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Michael Schnell
On 08/16/2015 08:37 AM, Martin Schreiber wrote: MSEide has a project template for cross-Pi development, Great, Martin ! (As always :-) ) I once unsuccessfully tried to do cross compiling and remote debugging for my ARM based (GUI-less) QNAP NAS. I finally compiled the project locally which

Re: [fpc-pascal] Cross compile from x86 to Pi

2015-08-17 Thread Michael Schnell
Cross compiling with fpc is not for that faint of heard. (Been there some years ago) Please let us know where you get. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pasca

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Michael Schnell
On 08/14/2015 04:27 PM, Xiangrong Fang wrote: Well, practically, how can I get totally unpredictable numbers? Nothing is totally unpredictable :-) I would set randseed via randseed and after this you can just use rand() for at least 2 gig numbers without any perceptible predictability. On

Re: [fpc-pascal] quality of FPC random

2015-08-17 Thread Michael Schnell
On 08/14/2015 04:38 PM, Mark Morgan Lloyd wrote: It seeds itself with "entropy" from the intervals between LAN packets, intervals between typed characters and so on. Unfortunately "Randomize" (in Linux in "System") just does randseed:=longint(Fptime(nil)); if it would use /dev/urandom, the