Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Still, the theory's there just in case... if the arguments are constant (but unknown) and the pure function is called multiple times, then it can be optimised to only be called once. Gareth aka. Kit On 06/06/2019 01:08, J. Gareth Moreton wrote: Ah, fair enough.  I didn't think to study the

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Ah, fair enough.  I didn't think to study the for-loop that closely yet since I haven't really found a need to check its code.  Sometimes I feel silly blurting out my ideas like this, but at least you stopped me from doing a fool's errand.  Thanks. Gareth aka. Kit On 05/06/2019 22:38, Sven

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 18:06: > > *for *X := 0 *to *Min(BUFFER_SIZE, DataLeft) *- 1 do* > *begin* > { Do some work that doesn't modify DataLeft } > *end*; > > Say that Min is given the *pure *directive, BUFFER_SIZE is a *const *and > DataLeft is a property or some

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Sounds fun.  I'm currently working on a personal project to put into my online Github in order to show off to prospective employers, so it might be a while before I get around to that. On another note, I'm also still waiting on Pierre to approve my XML node dump, since he and I have been

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 14:52: > Sounds fair. I would be trying for a refactoring approach, in that the > API and outward behaviour is identical to before (i.e. a black box), but > the inner workings are better. I noticed that one potential source of > improvement is

Re: [fpc-devel] [fpc-pascal] ENC28J60 Ethernet Controller AVR/ARM Driver

2019-06-05 Thread Jeppe Johansen
On 6/5/19 8:21 AM, Dimitrios Chr. Ioannidis via fpc-devel wrote: Hi Jeppe, Στις 2/6/2019 5:46 μ.μ., ο Jeppe Johansen έγραψε: On 6/1/19 3:37 PM, Dimitrios Chr. Ioannidis via fpc-pascal wrote: < snip >   As I'm not a compiler guy, isthe "volatile" intrinsic supported in AVR platform ( I

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Sounds fair.  I would be trying for a refactoring approach, in that the API and outward behaviour is identical to before (i.e. a black box), but the inner workings are better.  I noticed that one potential source of improvement is changing the Quicksort algorithm, used in most of the sorting,

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Michael Van Canneyt
On Wed, 5 Jun 2019, J. Gareth Moreton wrote: Still, saying all that, maybe there's room for improvement in rtl-generics in the form of refactoring, like I've found in the compiler itself in a few places.  When you say 'heavyweight', do you mean it's a little slow sometimes or just very

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 14:27: > Still, saying all that, maybe there's room for improvement in rtl-generics > in the form of refactoring, like I've found in the compiler itself in a few > places. When you say 'heavyweight', do you mean it's a little slow > sometimes or

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 11:54: > Hah, oh that sounds fun! > > I would develop something more lightweight and efficient, but that would > just make a 4th poison to choose from. > As Ben mentioned there is also LGenerics which is a third party library, so there already is

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Still, saying all that, maybe there's room for improvement in rtl-generics in the form of refactoring, like I've found in the compiler itself in a few places.  When you say 'heavyweight', do you mean it's a little slow sometimes or just very bulky when it comes to code size? (Taking a brief

Re: [fpc-devel] [fpc-pascal] ENC28J60 Ethernet Controller AVR/ARM Driver

2019-06-05 Thread Christo Crause
On Wed, Jun 5, 2019 at 8:21 AM Dimitrios Chr. Ioannidis via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > > Στις 2/6/2019 5:46 μ.μ., ο Jeppe Johansen έγραψε: > > On 6/1/19 3:37 PM, Dimitrios Chr. Ioannidis via fpc-pascal wrote: > > procedure AtomicWnrite(var value: word; new_value: word);

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Hah, oh that sounds fun! I would develop something more lightweight and efficient, but that would just make a 4th poison to choose from. Gareth aka. Kit On 05/06/2019 08:01, Sven Barth via fpc-devel wrote: J. Gareth Moreton > schrieb am Di., 4. Juni 2019,

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Di., 4. Juni 2019, 22:40: > Hi everyone, > > I may be missing the obvious here, but I've noticed that there are some > notable absences in the Free Generics Library. While there's a standard > list and a map and the like, there aren't any of the special lists like >

Re: [fpc-devel] [fpc-pascal] ENC28J60 Ethernet Controller AVR/ARM Driver

2019-06-05 Thread Dimitrios Chr. Ioannidis via fpc-devel
Hi Jeppe, Στις 2/6/2019 5:46 μ.μ., ο Jeppe Johansen έγραψε: On 6/1/19 3:37 PM, Dimitrios Chr. Ioannidis via fpc-pascal wrote: < snip >   As I'm not a compiler guy, isthe "volatile" intrinsic supported in AVR platform ( I didn't find it in intrinsics unit ) ? It's supported, but it does