Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Koenraad Lelong

On 26-02-13 20:07, ik wrote:

Hello,

Is there a Pascal compiler for Ardurino (instead of the existed build
in language or C) ?

Thanks,
Ido


Hi,

Does it have to be Arduino ? Or just the formfactor ? I'm using an 
Olimexino. That has an STM32 cortex-m3 processor in the same formfactor. 
And I'm developping an embedded project with FPC.

There is also the maple, arduino form-factor but also a cortex-m3 processor.

Just my 2 cents ;-)

Koenraad Lelong


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Simon Kissel

This is a terrible idea. The business advantage of Object Pascal
has always been the component market, as it reduces development


Component vendors simply aren't interested in FPC, and those that are,
are bought about by EMBT and made Delphi only.


Component vendors are interested in selling components.

The honest loyality of component vendors to 
Borland/CodeGear/DevCo/Embarcadero is next to non-existant. The reason 
Delphi is the focus

is that they invested into that, and that Embarcadero is using
anti-competitive tactics.

I've been a Borland Technology Partner. Besides my personal experience,
I sure know how component vendors are treated.

Supporting FPC just has be to be attractive enough so that the
component vendors are willing to take the risk of not getting
any more "love" from Embarcadero.

Removing technical obstacles therefore helps. Language compatibility
is something that helps a lot.


We ourselves have to stick with D7 language level because we still
need CrossKylix for our Linux builds because the FPC compiled code
is prohibitively slower than Kylix' one.


I stumbled across this last week too. On the same OS, I compiled the
exact same unit testing test suite using FPC 2.6.0 and Delphi 7. Running
those tests, again on the same system, the Delphi executable completes
the 180 tests in 2 seconds. The FPC binary took 18 seconds for the same
180 tests!!!


From our measures the Delphi and Kylix compilers in most cases
on x86 produces code that is about in the order of 50% faster than FPC. 
So probably there is some issue specific to your test suite that is 
triggering this huge difference, it should not be that big. For some

applications (like ours), still the difference is too big, so we only
use FPC on platforms where there is no compiler from Embarcadero, and
keep all of our source code compatible to Delphi 7 + Kylix + FPC. 
Language compatibility enables us to have a choice. Without this choice,

we would have needed to move to a different programming language.
Choice is good, competition is good, compatibility amongst competitors
is good.

Cheers,

Simon



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Craig Peterson
On 2/27/2013 6:41 PM, Graeme Geldenhuys wrote:
> Component vendors simply aren't interested in FPC, and those that are,
> are bought about by EMBT and made Delphi only.

Eldos added support for Free Pascal to SecureBlackBox within the last
couple of years.  Indy supports it in their main repository.  I added
FPC support to Abbrevia in late 2011.

I know we're not the only commercial software vendor to give up on
Delphi for cross platform work, and Free Pascal's Delphi compatibility
is the only thing that has made that possible.

> If you want to say "delphi compatible", it must be all or nothing.

Why?  It should be driven by user needs and developer interest, just
like it always has.  I'd like to see anonymous methods because it would
make porting the OmniThreadLibrary possible.  The fact that they aren't
supported doesn't make the existing generics and class helper support
unusable.

-- 
Craig Peterson
Scooter Software

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Graeme Geldenhuys
On 2013-02-28 00:18, Andrew Brunner wrote:
> 
> Jascal DOES look cool ;-)

That will probably rid us from some of the Pascal Language stereotyping. :)

RemObjects (with their Oxygene language) tagline says it best:

  "This is not your daddy's pascal"


I love that tagline.


Regards,
  - Graeme -

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Graeme Geldenhuys
On 2013-02-28 00:16, Simon Kissel wrote:
> 
> This is a terrible idea. The business advantage of Object Pascal
> has always been the component market, as it reduces development


Component vendors simply aren't interested in FPC, and those that are,
are bought about by EMBT and made Delphi only.


> We ourselves have to stick with D7 language level because we still
> need CrossKylix for our Linux builds because the FPC compiled code
> is prohibitively slower than Kylix' one.

I stumbled across this last week too. On the same OS, I compiled the
exact same unit testing test suite using FPC 2.6.0 and Delphi 7. Running
those tests, again on the same system, the Delphi executable completes
the 180 tests in 2 seconds. The FPC binary took 18 seconds for the same
180 tests!!!


> FPCs goal to move towards D2009+ language compatibility is a right
> goal - but of course that does not mean that everything needs to be
> copied, but when things on the Delphi side are designed in an OK

If you want to say "delphi compatible", it must be all or nothing. EMBT
is butchering the Delphi name to hell and gone. I don't think FPC should
follow just because.

A few issues aside, I honestly believe FPC is a much better product than
Delphi. FPC should build on its strengths - it doesn't need Delphi.

eg: In a recent discussion in the Google+ Delphi Community, they asked
what new language features would Delphi developers like. After about
15-20 replies I had to post a message saying that FPC actually supports
most of the things they had on their wishlist.

As I said, FPC doesn't need Delphi. Innovate on your own and don't
follow Delphi into the grave. Plus, stay true to the Pascal language as
much as possible.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Andrew Brunner

On 02/27/2013 05:50 PM, Graeme Geldenhuys wrote:
FPC now definitely finds itself in the Jascal.NET territory. ;-) 
Regards, - Graeme - 


That's probably needed here.  I think it's a great idea to embrace a new 
name for some future version that includes innovations.  Pascal has been 
forced into a bracket it ought-not-be.


Jascal DOES look cool ;-)

--
Andrew Brunner

Aurawin LLC
15843 Garrison Circle
Austin, TX 78717

https://aurawin.com

Aurawin is a great new way to store, share, and explore all your content
featuring our innovative cloud social computing platform.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Object pascal language compatiblity - was: Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Simon Kissel

I still believe FPC should leave the "delphi compatible" idea, or
clearly state that it means "compatible with Delphi 7 for legacy
purposes" and nothing newer. Then innovate the rest of the language on
its own in a Pascal-like manner.


This is a terrible idea. The business advantage of Object Pascal
has always been the component market, as it reduces development
costs and time to market. Language compatibility between FPC and
Delphi results in more components being available on both sides.

The Object Pascal language is too fragmented already, and depending
on your choice of the Delphi/FPC/Oxygene/whatever flavour, you are
locked out of a hell lot of available source code, documentation,
knowledge and components. Right now pretty much every commercial
component we have to patch inhouse to be compatibile to FPC.

(On a side note: It's one of the goals of CrossFPC to make it
easier for Delphi users and component vendors to also use/support
the FPC compiler.)

Sticking to D7 compatibility has been OK for now as this is what
the masses and component vendors mostly are doing, too, as they
still have to support D7 users.

We ourselves have to stick with D7 language level because we still
need CrossKylix for our Linux builds because the FPC compiled code
is prohibitively slower than Kylix' one.

FPCs goal to move towards D2009+ language compatibility is a right
goal - but of course that does not mean that everything needs to be
copied, but when things on the Delphi side are designed in an OK
manner, are actively used in the field, and FPC wished to do the same, 
aiming for compatibility is a good thing. Should FPCs share of the 
object Pascal ecosystem one day should be *significantly* larger than 
Delphi's, sooner or later Delphi then will try to pick up FPC's 
innovations instead.


In the long run, new object pascal language features optimally
should be discussed by those active in the field BEFORE they get
implemented. Sadly right now Embarcadero still are far too arrogant
and close-minded to understand that FPC actually benefits the
ecosystem they sell products in.

All this being said: I know that FPC is not after business goals.
But not damaging the ecosystem FPC works in helps everyone using
Object Pascal, no matter if they are after commercial goals or not.

Cheers,

Simon

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Graeme Geldenhuys
On 2013-02-27 16:49, Michael Van Canneyt wrote:
> 
> It is better to simply parse 
> /proc/cpuinfo
> and
> /proc/PID/*


 and hope all distros behave the same.  My experience with OnGuard
work is that your mileage will vary.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread Graeme Geldenhuys
On 2013-02-27 22:40, ik wrote:
> For example 1000.to_string ?! I have it on Ruby and Java, but it's not
> Pascal syntax.
> Same goes for array constructors.


Both of those are just hideous to me. Very un-Pascal like. :-(


> I actually starting to ask the same questions of Graeme, do we really
> want to follow Delphi instead of creating a more Pascal like dialect ?

And to make matters worse... FPC isn't very Delphi [2009 and later]
compatible anyway. It copies some features but not all. Then the some it
does copy might not be fully functional yet, or has a different syntax.
I tried multiple times to make a Delphi 2009+ project of mine work with
FPC 2.7.1, and I just can't succeed. I fix or work around one issue,
just to be blocked by another.

I still believe FPC should leave the "delphi compatible" idea, or
clearly state that it means "compatible with Delphi 7 for legacy
purposes" and nothing newer. Then innovate the rest of the language on
its own in a Pascal-like manner.

FPC now definitely finds itself in the Jascal.NET territory. ;-)


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-27 Thread ik
Hello,

I was going over the wiki and looked at
http://wiki.freepascal.org/FPC_New_Features_Trunk .
It looks like some of the features here, actually breaks Pascal, and
create something like Jascal or something, but it's not Pascal in
spirit.
For example 1000.to_string ?! I have it on Ruby and Java, but it's not
Pascal syntax.
Same goes for array constructors.

I actually starting to ask the same questions of Graeme, do we really
want to follow Delphi instead of creating a more Pascal like dialect ?

Thanks,
Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] OOP in FreePascal ARM-Embedded

2013-02-27 Thread Michael Ring
Objects work fine on ARM embedded, the documentation on this topic might 
be a little thin


The minimum thing you need to do is to initialize the heap, after you 
have a valid Heapmanager you can use objects out of the box:



program hellofpc;
{$mode objfpc}
uses
  heapmgr;

begin
  RegisterHeapBlock(pointer($20008000),$1000); //Heap config for STM32F103
...
..



Am 27.02.13 09:28, schrieb Juan Duran:

Hi there,

Is anybody working on being able to uses classes, methods, etc (OOP) in
freepascal compiler for ARM embedded platform?

Cheers

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Krzysztof
Thanks! This is what I needed
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Michael Van Canneyt



On Wed, 27 Feb 2013, Krzysztof wrote:


Hi,
I need system info such CPU (by PID), memory usage (by PID), free memory etc. 
Target platform: Linux.
Linux have command line tools like ps, top, memstat, but I'm just wondering if 
Free Pascal has wrappers for these commands. If
not, then I just get these information by execution external process.


This is becoming a FAQ. :-)

There are no such units AFAIK, and executing an external process for this is 
not recommended.

It is better to simply parse 
/proc/cpuinfo

and
/proc/PID/*

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Ludo Brands
On 02/27/2013 05:25 PM, Krzysztof wrote:
> Hi,
> 
> I need system info such CPU (by PID), memory usage (by PID), free memory
> etc. Target platform: Linux.
> Linux have command line tools like ps, top, memstat, but I'm just
> wondering if Free Pascal has wrappers for these commands. If not, then I
> just get these information by execution external process.
> 

On newer linux kernels, instead of running external processes you can
better read and parse /proc/pid/stat (replace pid with the PID). If you
need per thread info you can read /proc/pid/task/tid/stat. These are
single line pseudo files with space separated values. Much easier than
parsing the free format output from ps, top, etc.
http://www.kernel.org/doc/man-pages/online/pages/man5/proc.5.html

Ludo

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Krzysztof
Hi,

I need system info such CPU (by PID), memory usage (by PID), free memory
etc. Target platform: Linux.
Linux have command line tools like ps, top, memstat, but I'm just wondering
if Free Pascal has wrappers for these commands. If not, then I just get
these information by execution external process.

Regards
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Free Pascal 2.6.2 - 64 - setup

2013-02-27 Thread silvioprog
2013/2/26 Gabor Boros 

> 2013.02.26. 15:20 keltezéssel, silvioprog írta:
>
>> Hello,
>>
>> There are a setup to install FPC 2.6.2 stable 64 bit? In SF
>> (http://sourceforge.net/**projects/freepascal/files)
>> have only 32.
>>
>> Thanks.
>>
>> --
>> Silvio Clécio
>> My public projects - github.com/silvioprog 
>>
>
>
> http://sourceforge.net/**projects/freepascal/files/**
> Win32/2.6.2/fpc-2.6.2.x86_64-**win64.exe/download
>
> Gabor
>

Thank you very much friend! :)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] OOP in FreePascal ARM-Embedded

2013-02-27 Thread Graeme Geldenhuys
On 2013-02-27 08:28, Juan Duran wrote:
> Is anybody working on being able to uses classes, methods, etc (OOP) in
> freepascal compiler for ARM embedded platform?


OOP works fine already on that platform... what specific are you looking
for?


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Mark Morgan Lloyd

ik wrote:

Hello,

Is there a Pascal compiler for Ardurino (instead of the existed build
in language or C) ?


Noting other peoples' responses, but I'm not sure that that's a 
meaningful question. "Arduino" is more a development environment and set 
of runtimes in its own right than a hardware platform and there is no 
direct Pascal equivalent, i.e. there's an AVR target but it won't have 
Arduino-compatible handling of the various I/O capabilities.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] OOP in FreePascal ARM-Embedded

2013-02-27 Thread Mark Morgan Lloyd

Juan Duran wrote:

Hi there,

Is anybody working on being able to uses classes, methods, etc (OOP) in
freepascal compiler for ARM embedded platform?


What are you looking for that isn't already documented as being provided?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Sven Barth

On 27.02.2013 09:58, Ralf A. Quint wrote:

I personally would like to be able to use FPC for some upcoming
Raspberry Pi projects (which is an ARM v6/ARM11) rather than having to
use C (though I am using C for +30 years now as well)


Considering that there are screenshots of Lazarus running on the Pi I 
don't think using FPC there will be a problem :)


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Ralf A. Quint

At 12:44 AM 2/27/2013, Marco van de Voort wrote:

If one is afraid of overhead, I would simply buy the vendor recommended
compiler. Many of the 3rd party alternatives are less optimal too. At least
they are with (ds)pic


Well, as far as the micro controller vendors are concerned, those are 
usually C and to some lesser extend, BASIC compiler's only. 
MikroElectronic has a not half bad Pascal compiler (though with quite 
a few bugs and quirks) for AVR and as I mentioned in my last post, 
for a lot of PIC chips, PMP is a quite decent choice if someone wants 
to stick with Pascal instead of using a different programming language.
Not that anything in general is wrong with those C/BASIC options 
available, but it's simply a matter of preference of the basic 
language/tool to use... ;-)


I personally would like to be able to use FPC for some upcoming 
Raspberry Pi projects (which is an ARM v6/ARM11) rather than having 
to use C (though I am using C for +30 years now as well)


Ralf


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Marco van de Voort
In our previous episode, Ralf A. Quint said:
> > > in language or C) ?
> >
> >FPC has an AVR target (the processor the Arduino is based on), but I 
> >don't know its state... (AFAIK its non working though :( )
> I know there is an entry in the FPC Wiki about that, but that is 
> quite "aged" and I am not sure if FPC in general is a good match at 
> least for the lower end of any micro controller (not only Amtel AVR 
> but PIC's as well), given that some of them are very limited in the 
> amount of usable RAM/stack space and usually do not have any float 
> support either...

If one is afraid of overhead, I would simply buy the vendor recommended
compiler. Many of the 3rd party alternatives are less optimal too. At least
they are with (ds)pic
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Ralf A. Quint

At 12:08 AM 2/27/2013, Sven Barth wrote:
That's another question of course. But e.g. Florian tries to 
minimize the overhead of the embedded RTL and if you are aware that 
you shouldn't use high overhead features they won't be linked in 
either (e.g. if you don't use Variants then the variants unit won't be used).


Also currently there is no PIC support for FPC, but there are some 
that seem to be interested in implementing it.


Those micro controllers aren't easily comparable to "mainstream" 
processors of the x86 line or even ARM(v6/7/8) or M68k, etc...
You need to have quite some kind of knowledge of those little 
buggers, probably causing as many headaches as those CPU targets like 
MIPS, with nothing coming up quick.


I am kind of disappointed to see that there isn't a decent free (not 
necessary Open Source) Pascal compiler for Arduino/Amtel AVR, but at 
least as far as the 8/16bit PIC micro controllers are concerned, 
there is a very nice "Turbo Pascal" like compiler called PIC Micro 
Pascal (PMP) available from a nice French guy called Philippe 
Paternotte at http://www.pmpcomp.fr/


Ralf 


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] OOP in FreePascal ARM-Embedded

2013-02-27 Thread Juan Duran
Hi there,

Is anybody working on being able to uses classes, methods, etc (OOP) in
freepascal compiler for ARM embedded platform?

Cheers

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] pascal compiler for ardurino

2013-02-27 Thread Sven Barth

On 27.02.2013 08:11, Ralf A. Quint wrote:

At 10:27 PM 2/26/2013, Sven Barth wrote:


Am 26.02.2013 20:08 schrieb "ik" mailto:ido...@gmail.com>>:
>
> Hello,
>
> Is there a Pascal compiler for Ardurino (instead of the existed build
> in language or C) ?

FPC has an AVR target (the processor the Arduino is based on), but I
don't know its state... (AFAIK its non working though :( )

I know there is an entry in the FPC Wiki about that, but that is quite
"aged" and I am not sure if FPC in general is a good match at least for
the lower end of any micro controller (not only Amtel AVR but PIC's as
well), given that some of them are _very_ limited in the amount of
usable RAM/stack space and usually do not have any float support either...


That's another question of course. But e.g. Florian tries to minimize 
the overhead of the embedded RTL and if you are aware that you shouldn't 
use high overhead features they won't be linked in either (e.g. if you 
don't use Variants then the variants unit won't be used).


Also currently there is no PIC support for FPC, but there are some that 
seem to be interested in implementing it.


Regards,
Sven

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal