GUI programming in windows

  • Follow


Hi y'all,

I'm looking for some examples/advice/etc,
on GUI programming using pascal.

I have the FPC compiler in Dev-Pascal.

Doing it raw (plain api) seems way to complicated.

wxWidgets uses a dll that causes applications to
hog 14 MEGS of memory just to put up a window that
says "hello world".

I've noticed a couple of examples that look ok,
using a unit called "forms", but I can't seem to
find one available for download.

Any suggestions?

-- 
Buzzard

(looking to upgrade from the completely
out-of-date, but absolutely easy-to use VB3)

0
Reply Buzzard 9/2/2008 4:52:37 AM

On 2008-09-02, Buzzard <Buzzard@domain.invalid.net> wrote:
> I'm looking for some examples/advice/etc,
> on GUI programming using pascal.
>
> I have the FPC compiler in Dev-Pascal.

(that contains 1.9.2 from 2004)

> Doing it raw (plain api) seems way to complicated.
>
> wxWidgets uses a dll that causes applications to
> hog 14 MEGS of memory just to put up a window that
> says "hello world".

Correct. Worse, you need to distribute that DLL.

> I've noticed a couple of examples that look ok,
> using a unit called "forms", but I can't seem to
> find one available for download.

That is Delphi code mostly. Lazarus supports this more or less (with some
own twists and bends)

> Any suggestions?

Have a look at Lazarus, lazarus.freepascal.org

If you can afford it, wait a few weeks, they are gearing up to release a new
version in the next weeks. (after an year's pause)
0
Reply Marco 9/2/2008 7:40:28 AM


"Buzzard" <Buzzard@domain.invalid.net> wrote in message 
news:C9SdnaWoPtlEWyHVnZ2dnUVZ_t7inZ2d@citizens.coop...
>
> (looking to upgrade from the completely
> out-of-date, but absolutely easy-to use VB3)
>

Try Delphi - it started out as a VB-lookalike but with Object Pascal as its 
language. 'Turbo Explorer' is a free version:

http://www.turboexplorer.com/

--
Chris Burrows
Oberon-07 for ARM Development
http://www.armaide.com


0
Reply Chris 9/2/2008 8:32:44 AM

Marco van de Voort wrote:
> On 2008-09-02, Buzzard <Buzzard@domain.invalid.net> wrote:
> 
>>I'm looking for some examples/advice/etc,
>>on GUI programming using pascal.
>>
>>I have the FPC compiler in Dev-Pascal.
> 
> (that contains 1.9.2 from 2004)
> 
>>Doing it raw (plain api) seems way to complicated.
>>
>>wxWidgets uses a dll that causes applications to
>>hog 14 MEGS of memory just to put up a window that
>>says "hello world".
> 
> Correct. Worse, you need to distribute that DLL.
> 
>>I've noticed a couple of examples that look ok,
>>using a unit called "forms", but I can't seem to
>>find one available for download.
> 
> That is Delphi code mostly. Lazarus supports this more or less (with some
> own twists and bends)
> 
>>Any suggestions?
> 
> Have a look at Lazarus, lazarus.freepascal.org
> 
> If you can afford it, wait a few weeks, they are gearing up to release a new
> version in the next weeks. (after an year's pause)

I may try that one.  The current version is about 50 megs to dnld,
and that is something I can probably handle...

(by contrast, turboexplorer is 320 megs to dnld)

-- 
Buzzard

0
Reply Buzzard 9/2/2008 10:04:01 PM

Marco van de Voort wrote:
> On 2008-09-02, Buzzard <Buzzard@domain.invalid.net> wrote:
> 
>>I'm looking for some examples/advice/etc,
>>on GUI programming using pascal.
>>
>>I have the FPC compiler in Dev-Pascal.
> 
> (that contains 1.9.2 from 2004)
> 
>>Doing it raw (plain api) seems way to complicated.
>>
>>wxWidgets uses a dll that causes applications to
>>hog 14 MEGS of memory just to put up a window that
>>says "hello world".
> 
> Correct. Worse, you need to distribute that DLL.
> 
>>I've noticed a couple of examples that look ok,
>>using a unit called "forms", but I can't seem to
>>find one available for download.
> 
> That is Delphi code mostly. Lazarus supports this more or less (with some
> own twists and bends)
> 
>>Any suggestions?
> 
> Have a look at Lazarus, lazarus.freepascal.org
> 
> If you can afford it, wait a few weeks, they are gearing up to release a new
> version in the next weeks. (after an year's pause)

I went ahead and tried the current version of Lazarus,
which does have a functioning form designer similar to VB;
but even with the simplest blank form with nothing on it, I
couldn't get the size of the exe file it produced to be
less than 1Meg.  (11Meg if any debug info was included).
(Maybe there is an option I am overlooking)

By contrast, Dev-Pascal has as one of its examples an editor
similar to notepad, which compiles to about 22k, but it has
no form designer and is all in raw api.

For the time being, I'm making do with rapidq, since vb3
does not support the new 32-bit DLL's required by the new
hardware and new OS I'm trying to write for.....
Rapidq makes exe's around 220k or so, but there can be no
new rapidq versions as the source code to it has been lost.

I may go ahead fairly soon and dnld TurboDelphi, which is huge
(about 312 MEGS to download).  Perhaps it can make
reasonably-sized executables, and have a functional visual UI.

-- 
Buzzard
'looking for just the right programming tool'

0
Reply Buzzard 9/5/2008 3:25:01 AM

Marco van de Voort wrote:
> On 2008-09-02, Buzzard <Buzzard@domain.invalid.net> wrote:
> 
>>I'm looking for some examples/advice/etc,
>>on GUI programming using pascal.
>>
>>I have the FPC compiler in Dev-Pascal.
> 
> 
> (that contains 1.9.2 from 2004)
> 
> 
>>Doing it raw (plain api) seems way to complicated.
>>
>>wxWidgets uses a dll that causes applications to
>>hog 14 MEGS of memory just to put up a window that
>>says "hello world".
> 
> 
> Correct. Worse, you need to distribute that DLL.
> 
> 
>>I've noticed a couple of examples that look ok,
>>using a unit called "forms", but I can't seem to
>>find one available for download.
> 
> 
> That is Delphi code mostly. Lazarus supports this more or less (with some
> own twists and bends)
> 
> 
>>Any suggestions?
> 
> 
> Have a look at Lazarus, lazarus.freepascal.org
> 
> If you can afford it, wait a few weeks, they are gearing up to release a new
> version in the next weeks. (after an year's pause)
I went ahead and tried the current version of Lazarus,
which does have a functioning form designer similar to VB;
but even with the simplest blank form with nothing on it, I
couldn't get the size of the exe file it produced to be
less than 1Meg.  (11Meg if any debug info was included).
(Maybe there is an option I am overlooking)

By contrast, Dev-Pascal has as one of its examples an editor
similar to notepad, which compiles to about 22k, but it has
no form designer and is all in raw api.

For the time being, I'm making do with rapidq, since vb3
does not support the new 32-bit DLL's required by the new
hardware and new OS I'm trying to write for.....
Rapidq makes exe's around 220k or so, but there can be no
new rapidq versions as the source code to it has been lost.

I may go ahead fairly soon and dnld TurboDelphi, which is huge
(about 312 MEGS to download).  Perhaps it can make
reasonably-sized executables, and have a functional visual UI.

-- 
Buzzard
'looking for just the right programming tool'

0
Reply Buzzard 9/5/2008 3:26:24 AM

> Perhaps it can make
> reasonably-sized executables,

The executables of my four main products are typically about 1.5 Mb in size 
and that's after many man-years of development effort! For sure the initial 
overhead for an executable with a single form is significant (e.g. about 
4-500k?) but don't let that deter you. After that additional components, 
forms, dialog boxes etc. add very little more to the overall size.

> and have a functional visual UI.

All of the components that you would expect to see in a typical Windows GUI 
app are available .... plus many more.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com 


0
Reply Chris 9/5/2008 3:55:37 AM

On 2008-09-05, Buzzard <Buzzard@domain.invalid.net> wrote:
>> 
>> If you can afford it, wait a few weeks, they are gearing up to release a new
>> version in the next weeks. (after an year's pause)
> I went ahead and tried the current version of Lazarus,
> which does have a functioning form designer similar to VB;
> but even with the simplest blank form with nothing on it, I
> couldn't get the size of the exe file it produced to be
> less than 1Meg.  (11Meg if any debug info was included).
> (Maybe there is an option I am overlooking)

That's pretty normal. Rule of thumb is starts at +/- 600k, quickly grows to
1.5MB. 

But what is the problem ? Harddisks are in terabyte magnitude nowadays?

> By contrast, Dev-Pascal has as one of its examples an editor
> similar to notepad, which compiles to about 22k, but it has
> no form designer and is all in raw api.

You can do that too from within Lazarus. Of course then you also have to
work with the raw api, but modern FPCs have a more complete set of headers.

> For the time being, I'm making do with rapidq, since vb3
> does not support the new 32-bit DLL's required by the new
> hardware and new OS I'm trying to write for.....
> Rapidq makes exe's around 220k or so, but there can be no
> new rapidq versions as the source code to it has been lost.

You won't find anything modern with those requirements. Most modern systems
start with installing a 20MB+ runtime.

The requirements on a development system simply have rissen too much. Also
backwards compat (like workarounds for win9x not having unicode) eat up
space.

> I may go ahead fairly soon and dnld TurboDelphi, which is huge
> (about 312 MEGS to download).  Perhaps it can make
> reasonably-sized executables, and have a functional visual UI.

Rule of thumb: Delphi exe size is 3/4 of Lazarus Delphi size. The rough
magnitude is the same, but Delphi is slightly smaller because it doesn't
have to deal with multiplatformness.
0
Reply Marco 9/5/2008 7:33:10 AM

On Sep 2, 2:40=A0am, Marco van de Voort <mar...@stack.nl> wrote:
> On 2008-09-02, Buzzard <Buzz...@domain.invalid.net> wrote:
....
> > wxWidgets uses a dll that causes applications to
> > hog 14 MEGS of memory just to put up a window that
> > says "hello world".
>
> Correct. Worse, you need to distribute that DLL.

Wrong and wrong.   a wxWidget application can dynamically load
libraries or statically link to them.  In the latter case you don't
need to distribute DLLs.

If hello world is 14 megs something is wrong then.  I have an emulator
for the Wang 2200 computer (at wang2200.org) written using wxwidgets
(in c -- I just happen to be perusing pascal lists).  It is a non-
trivial application, consisting of about 20K lines of code.  The
binary is about 1.5 MB, and the run time footprint is under 5 MB.

I just build the "minimal" sample program from the wx 2.8.8 release
(gui equivalent of hello word) and minimal.exe was 1030 KB.

I'm not suggesting you use wxwidgets -- it sounds like you are trying
to find reasons not to use it -- but I wanted to dispel the
misinformation being spread here.
0
Reply Jim 9/6/2008 1:11:23 AM

On 2008-09-06, Jim Battle <frustum@pacbell.net> wrote:
>> > hog 14 MEGS of memory just to put up a window that
>> > says "hello world".
>>
>> Correct. Worse, you need to distribute that DLL.
>
> Wrong and wrong.   a wxWidget application can dynamically load
> libraries or statically link to them.  In the latter case you don't
> need to distribute DLLs.

(I just assumed the 14MB part was statically linked. Probably some
problem with not stripping then.)

Thanks for the info. Didn't know that static linking was an doable (non
huge) option. For which compilers are statically built libraries provided?

Maybe the confusion started by talking with sb that used a not supported
compiler (or at least not out of the box). Since I'm in the Pascal corner,
there is a fat chance that he used Delphi and/or BCB.

> If hello world is 14 megs something is wrong then.  I have an emulator
> for the Wang 2200 computer (at wang2200.org) written using wxwidgets
> (in c -- I just happen to be perusing pascal lists).  It is a non-
> trivial application, consisting of about 20K lines of code.  The
> binary is about 1.5 MB, and the run time footprint is under 5 MB.
> I just build the "minimal" sample program from the wx 2.8.8 release
> (gui equivalent of hello word) and minimal.exe was 1030 KB.

That's about normal for a non trivial OOP framework. (Lazarus is in the same
magnitude, Delphi slightly lower, but non portable)

> I'm not suggesting you use wxwidgets -- it sounds like you are trying
> to find reasons not to use it -- but I wanted to dispel the
> misinformation being spread here.

No problem, the info is appreciated. If you happen to know similar values
for WinCE apps, it would be great. (typically they are slightly slower than
their win32/64 counterparts)
0
Reply Marco 9/6/2008 10:28:10 AM

Marco van de Voort wrote:
> On 2008-09-05, Buzzard <Buzzard@domain.invalid.net> wrote:
> 
>>>If you can afford it, wait a few weeks, they are gearing up to release a new
>>>version in the next weeks. (after an year's pause)
>>
>>I went ahead and tried the current version of Lazarus,
>>which does have a functioning form designer similar to VB;
>>but even with the simplest blank form with nothing on it, I
>>couldn't get the size of the exe file it produced to be
>>less than 1Meg.  (11Meg if any debug info was included).
>>(Maybe there is an option I am overlooking)
> 
> That's pretty normal. Rule of thumb is starts at +/- 600k, quickly grows to
> 1.5MB. 
> 
> But what is the problem ? Harddisks are in terabyte magnitude nowadays?

I have Lazarus installed, and am still looking at using it.
It looks like it could make pretty much any kind of app,
(for windows, mac, and linux... cool)
But I'm looking at a number of other options too.

There is a win32lib for the programming language "euphoria",
but it is a bit slow to start on this old pc here.

If I could get VB4 to work on anything but win95,
I'd be using that, because it is 32-bit; but no such luck.
It crashes on win 98 and later.

I currently have my application about 1/4 done using rapidq,
and I wish that compiler had a version more recent than 2001.
But it doesn't, and in fact, it is now abandoned.

I remember how much easier programming was when it was just
for DOS.  Anyone remember Turbo Pascal 3 ?  back in 1985 or so?
tp5.5 was cool.  it had oop.

Is there a way in Lazarus to use a numbered array of controls?
such as "ch_out: array[0..15] of tcheckbox;"?
(If not, I can still make my app without that, by creating
16 differently-named checkboxes)

Out of curiosity: does the statement "uses some-unit-name"
cause the compiler to link in the ENTIRE unit, or just import
from it the routines that your app actually uses?

I suppose I should have kept up with the times instead of
using VB3 for 15 years, but damn, VB3 was so easy!
Now I'm playing catch-up.

-- 
just an old buzzard

0
Reply Buzzard 9/7/2008 7:20:40 AM

On 2008-09-07, Buzzard <Buzzard@domain.invalid.net> wrote:
>> That's pretty normal. Rule of thumb is starts at +/- 600k, quickly grows to
>> 1.5MB. 
>> 
>> But what is the problem ? Harddisks are in terabyte magnitude nowadays?
>
> I have Lazarus installed, and am still looking at using it.
> It looks like it could make pretty much any kind of app,
> (for windows, mac, and linux... cool)
> But I'm looking at a number of other options too.

(yes, and the next release will improve specially Mac)

> There is a win32lib for the programming language "euphoria",
> but it is a bit slow to start on this old pc here.

I see people advocating it from time to time, but don't really know it, but
the last release is slightly over an year ago, so apparantly still alive.

> If I could get VB4 to work on anything but win95,
> I'd be using that, because it is 32-bit; but no such luck.
> It crashes on win 98 and later.

Also no knowledge there. But I'd pick something that is still alive, and
preferably has at least a roadmap going to 64-bit. Preferably also with some
community behind it. (e.g. compability to something from with you can leech
examples and docs, like Delphi in Lazarus' case)

Getting caught up in dead ends is always frustrating.

> I currently have my application about 1/4 done using rapidq,
> and I wish that compiler had a version more recent than 2001.
> But it doesn't, and in fact, it is now abandoned.
>
> I remember how much easier programming was when it was just
> for DOS.  Anyone remember Turbo Pascal 3 ?  back in 1985 or so?
> tp5.5 was cool.  it had oop.

Note that the compiler part of Lazarus (Free Pascal) contains a TP-like IDE
too. It's pretty much as compatible as a 32/64-bit version of the language
can be. Non-visual code can be mixed with Lazarus.

> Is there a way in Lazarus to use a numbered array of controls?
> such as "ch_out: array[0..15] of tcheckbox;"?
> (If not, I can still make my app without that, by creating
> 16 differently-named checkboxes)

Not at this time while you use the designer. Of course if you program the
forms by hand (by creating objects and stitching them together) you are
totally free. Avoid manual editing in the part that is organized by the
designer.

An often used technique is to start out mostly with the designer, and if it
gets overly complicated or flexible, recreate by hand.
(anything that is done by the designer can be mimiced in code)

There are two workarounds for that that are sometimes
combined:

- using a systematic naming for checkbox that work together, and then
  walking the components array to find them.
- Declaring an array yourself, and filling that in the oncreate event.

Rough skeleton of an example combining the two:

type 
    TForm1 = class 
              ..           // automated part, don't edit.
              cbchoice0 : TCheckBox;
              ..
              cbchoice12 : TCheckBox;
              ..
           public
            // below "private" and "public" you can add own methods and
            // fields
	     mycheckboxes : array of TCheckBox;
	     end;

procedure TForm1.FormCreate;
// a bit more verbose than normal because I do it from memory, and for
// demonstration purposes.
var i,j: integer;
    cb : TCheckBox; 
    cap: String;

begin
 for i := 0 to ComponentCount - 1 do
    if Components[i] is TCheckBox then
      begin
        cb:=TCheckBox(Components[i]);
        if uppercase(copy(cb.name,1,8))='CBCHOICE' Then
          begin
            j:=StrToIntDef(copy(cb.name,9,10),0);
            if j>=Length(mycheckboxes) then
              setlength(mycheckboxes,j+1);
            mycheckboxes[j]:=cb;                  
          end; 
      end;
end;

also demonstrates the variable length array. Note that if you omit numbers,
the corresponding array fields will be nil.  Also note that the indices of a
dynamic array starts at zero, and runs till length(arr)-1.

> Out of curiosity: does the statement "uses some-unit-name"
> cause the compiler to link in the ENTIRE unit, or just import
> from it the routines that your app actually uses?

This depends on a setting called "smartlinking". Look for it in the compiler
options menu. There should be two, one with "-CX", one with -XX next to it.

Note that if e.g. routines are used in the startup code, they will be linked
in.

> I suppose I should have kept up with the times instead of
> using VB3 for 15 years, but damn, VB3 was so easy!
> Now I'm playing catch-up.

Getting caught up in a dead-end also has dillemma's. OTOH, changing every
year will get you nowwhere either.
0
Reply Marco 9/7/2008 10:33:14 AM

"Buzzard" <Buzzard@domain.invalid.net> wrote in message 
news:2-udnT05S62LHF7VnZ2dnUVZ_qrinZ2d@citizens.coop...
>
> I remember how much easier programming was when it was just
> for DOS.

For me the 'good old days' hold different memories. I remember having to 
write my own menu system, having to develop different versions for HP150, 
DEC Rainbow, IBM PC, Compaq, etc. etc. cater for all the different printer 
drivers, video cards and even keyboards! Once I had done all that there 
wasn't much time to spend on the actual application. Windows made it so much 
easier to deal with the enormous variety of PC-compatible peripherals.

However, having said that, I've also recently been seduced by nostalgia. 
I've been working with Oberon-07 on ARM-based embedded systems and I have to 
admit it is refreshing to once again be able to write code that does exactly 
what you want without layer upon layer upon layer of OS and device drivers 
getting in the way. The runtime / startup file is 184 *bytes* and executable 
size of a simple app can be as low as 2K bytes (see 
http://www.armaide.com ). I'm also in the process of recreating my first 
PC - a 1979 8-bit Signetics S2650-based design with a whopping total of 4k 
bytes of memory. Programming can't get much simpler than that!

> Anyone remember Turbo Pascal 3 ?  back in 1985 or so?
> tp5.5 was cool.  it had oop.
>

I remember CDC6000 Pascal and HP Pascal but UCSD Pascal was the last Pascal 
I used before switching to Modula-2 (A few years before TP came on the 
scene). I did dabble a bit with Turbo Pascal 2 but the lasting memory was 
that the Borland samples had so much MS-DOS / 808x-specific code that it 
looked more like assembler than Pascal. It wasn't until Delphi's appearance 
in 1995 and it's ease of use in creating Windows GUI apps that I started to 
make use of Pascal again.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com





0
Reply Chris 9/7/2008 11:57:01 PM

On Sep 7, 7:57=A0pm, "Chris Burrows" <cfbsoftw...@hotmail.com> wrote:

>
> I remember CDC6000 Pascal and HP Pascal but UCSD Pascal was the last Pasc=
al
> I used before switching to Modula-2 (A few years before TP came on the
> scene). I did dabble a bit with Turbo Pascal 2 but the lasting memory was
> that the Borland samples had so much MS-DOS / 808x-specific code that it
> looked more like assembler than Pascal. It wasn't until Delphi's appearan=
ce
> in 1995 and it's ease of use in creating Windows GUI apps that I started =
to
> make use of Pascal again.

Yep. I used to be a "source code" junkie, scooping up a lot of source
for conversion. Biggest waste of time was going through "Turbo Pascal"
programs, which basically were Pascal wrappers around nothing but
inline assembly.

Heck, it'd have been much easier (and easier to read) if they'd just
written an assembly program...

Many of them touted that they'd written such and such in Pascal. If it
is 1% Pascal and 99% assembly, it ain't Pascal!
0
Reply winston19842005 9/8/2008 5:08:31 AM

"winston19842005@yahoo.com" wrote:
> "Chris Burrows" <cfbsoftw...@hotmail.com> wrote:
> 
>> I remember CDC6000 Pascal and HP Pascal but UCSD Pascal was the
>> last Pascal I used before switching to Modula-2 (A few years
>> before TP came on the scene). I did dabble a bit with Turbo
>> Pascal 2 but the lasting memory was that the Borland samples had
>> so much MS-DOS / 808x-specific code that it looked more like
>> assembler than Pascal. It wasn't until Delphi's appearance in
>> 1995 and it's ease of use in creating Windows GUI apps that I
> started to make use of Pascal again.
> 
> Yep. I used to be a "source code" junkie, scooping up a lot of
> source for conversion. Biggest waste of time was going through
> "Turbo Pascal" programs, which basically were Pascal wrappers
> around nothing but inline assembly.
> 
> Heck, it'd have been much easier (and easier to read) if they'd
> just written an assembly program...
> 
> Many of them touted that they'd written such and such in Pascal.
> If it is 1% Pascal and 99% assembly, it ain't Pascal!

If you used Borland products you never really used Pascal.  They
never met the requirements of the ISO standards.  Very annoying was
the lack of f^, put, and get, which prevented using portable
standard i/o conventions.

You can find my addition to Borland for some of these things at:

  <http://cbfalconer.home.att.net/download/txtfiles.zip>

-- 
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: <http://cbfalconer.home.att.net>
            Try the download section.
0
Reply CBFalconer 9/8/2008 6:19:16 AM

On 2008-09-07, Chris Burrows <cfbsoftware@hotmail.com> wrote:
>> Anyone remember Turbo Pascal 3 ?  back in 1985 or so?
>> tp5.5 was cool.  it had oop.
>
> I remember CDC6000 Pascal and HP Pascal but UCSD Pascal was the last Pascal 
> I used before switching to Modula-2 (A few years before TP came on the 
> scene). I did dabble a bit with Turbo Pascal 2 but the lasting memory was 
> that the Borland samples had so much MS-DOS / 808x-specific code that it 
> looked more like assembler than Pascal. It wasn't until Delphi's appearance 
> in 1995 and it's ease of use in creating Windows GUI apps that I started to 
> make use of Pascal again.

(I actually converted a lot of TP code in my M2 days. However TopSpeed was a
bit the TP of the M2 scene)

TP also had good sides, most notably Turbo Vision.  For my trip down memory
lane, I'm now dabbling with it.

To get the feel again, I wrote a little object chart of the FPC textmode IDE
(including TV clone FV and objects unit):

http://www.stack.nl/~marcov/objectchart.ps (the colourcoding is not yet
right).




0
Reply Marco 9/8/2008 8:29:47 AM

On Sep 7, 6:57 pm, "Chris Burrows" <cfbsoftw...@hotmail.com> wrote:
> "Buzzard" <Buzz...@domain.invalid.net> wrote in message
>
> news:2-udnT05S62LHF7VnZ2dnUVZ_qrinZ2d@citizens.coop...
>
>
>
> > I remember how much easier programming was when it was just
> > for DOS.
>
> For me the 'good old days' hold different memories. I remember having to
> write my own menu system, having to develop different versions for HP150,
> DEC Rainbow, IBM PC, Compaq, etc. etc. cater for all the different printer
> drivers, video cards and even keyboards! Once I had done all that there
> wasn't much time to spend on the actual application. Windows made it so much
> easier to deal with the enormous variety of PC-compatible peripherals.
>
> However, having said that, I've also recently been seduced by nostalgia.
> I've been working with Oberon-07 on ARM-based embedded systems and I have to
> admit it is refreshing to once again be able to write code that does exactly
> what you want without layer upon layer upon layer of OS and device drivers
> getting in the way. The runtime / startup file is 184 *bytes* and executable
> size of a simple app can be as low as 2K bytes (seehttp://www.armaide.com). I'm also in the process of recreating my first
> PC - a 1979 8-bit Signetics S2650-based design with a whopping total of 4k
> bytes of memory. Programming can't get much simpler than that!
>
> > Anyone remember Turbo Pascal 3 ?  back in 1985 or so?
> > tp5.5 was cool.  it had oop.
>
> I remember CDC6000 Pascal and HP Pascal but UCSD Pascal was the last Pascal
> I used before switching to Modula-2 (A few years before TP came on the
> scene). I did dabble a bit with Turbo Pascal 2 but the lasting memory was
> that the Borland samples had so much MS-DOS / 808x-specific code that it
> looked more like assembler than Pascal. It wasn't until Delphi's appearance
> in 1995 and it's ease of use in creating Windows GUI apps that I started to
> make use of Pascal again.
>
> --
> Chris Burrows
> CFB Softwarehttp://www.cfbsoftware.com

I wonder why you have not tried linux. It takes a lot of time
learning, but the information is out there. And it is very flexible.
IMHO it is the perfect parent to child embedded systems.
0
Reply Richard 9/9/2008 8:41:46 AM

On 2008-09-09, Richard Engebretson <eng@pinenet.com> wrote:
>> > Anyone remember Turbo Pascal 3 ?  back in 1985 or so?
>> > tp5.5 was cool.  it had oop.
>>
>> I remember CDC6000 Pascal and HP Pascal but UCSD Pascal was the last Pascal
>> I used before switching to Modula-2 (A few years before TP came on the
>> scene). I did dabble a bit with Turbo Pascal 2 but the lasting memory was
>> that the Borland samples had so much MS-DOS / 808x-specific code that it
>> looked more like assembler than Pascal. It wasn't until Delphi's appearance
>> in 1995 and it's ease of use in creating Windows GUI apps that I started to
>> make use of Pascal again.
>
> I wonder why you have not tried linux. It takes a lot of time
> learning, but the information is out there. And it is very flexible.
> IMHO it is the perfect parent to child embedded systems.

Linux was not that far in 1995. Pre 2.0 (1996?) kernels were pain, and
selected hardware only. Even the early 2.0 kernels were not always a
picknick. Not all might have had IDE support even, BSD was even later with
that.
0
Reply Marco 9/9/2008 9:24:46 AM

"Richard Engebretson" <eng@pinenet.com> wrote in message 
news:801bbb83-0846-4eda-86d6-ce640255e6d0@34g2000hsh.googlegroups.com...
>
> I wonder why you have not tried linux. It takes a lot of time
> learning, but the information is out there. And it is very flexible.
> IMHO it is the perfect parent to child embedded systems.

I have tried Linux - I'm keeping a close watch on the development of Mono in 
particular as that will make it possible for me to reuse much of my 
Component Pascal .NET software. Actually my first Unix experience was with a 
PDP-11 in the late 70's and I would have given my right arm to have had the 
equivalent of a personal Linux system in the early 1980s.

However, having later spent more than a decade from the mid 80s's to mid 
90's developing and supporting database software on NCR Unix, IBM Xenix, SCO 
Xenix, SCO Unix, AT&T Unix, SunOS, ICL Unix, HPUX, AIX and Solaris I gave up 
hope of there ever being a 'unified Unix'. The numerous different flavours 
of Linux seem to me too much like history repeating itself.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com


0
Reply Chris 9/9/2008 12:52:12 PM

Chris Burrows wrote:
> "Buzzard" <Buzzard@domain.invalid.net> wrote in message 
> news:2-udnT05S62LHF7VnZ2dnUVZ_qrinZ2d@citizens.coop...
> 
>>I remember how much easier programming was when it was just
>>for DOS.
> 
> For me the 'good old days' hold different memories. I remember having to 
> write my own menu system, having to develop different versions for HP150, 
> DEC Rainbow, IBM PC, Compaq, etc. etc. cater for all the different printer 
> drivers, video cards and even keyboards! Once I had done all that there 
> wasn't much time to spend on the actual application. Windows made it so much 
> easier to deal with the enormous variety of PC-compatible peripherals.

Sounds like you've done a lot more programming than i ever did.
For my old apps, I didn't even bother with menus; just single-key
commands, mostly.  And the only computers available to me at the
time were IBM-PC's, so I hvae no clue if they ran on anything else.

0
Reply Buzzard 9/10/2008 12:09:50 AM

[ discussion of wxWidgets ]

On Sep 6, 5:28=A0am, Marco van de Voort <mar...@stack.nl> wrote:
> On 2008-09-06, Jim Battle <frus...@pacbell.net> wrote:
....
> Thanks for the info. Didn't know that static linking was an doable (non
> huge) option. For which compilers are statically built libraries provided=
?

I don't think statically built libraries are downloadable.  The usual
procedure is to download the source, configure it for your needs (eg,
which libraries you want, eg tiff, png, jpg, xml parsing, html, etc,
as well as static and/or dynamic libs, ascii and/or unicode strings,
etc), then compile the libraries.  Typically you do that once.

After that, write your app and tell your linker which version of the
library your app needs.

> Maybe the confusion started by talking with sb that used a not supported
> compiler (or at least not out of the box). Since I'm in the Pascal corner=
,
> there is a fat chance that he used Delphi and/or BCB.

I was intrigued that wxWidgets came up at all here.  I know there are
bindings to many languages (c++, perl, python, lua, basic, java, ruby,
and some others), but I don't know if a pascal interface exists.

wxWidgets has very active ports for win32, gtk, and osx, and then
somewhat stale or less developed ports for other interfaces: X11,
palm, os2, CE, others?
0
Reply Jim 9/11/2008 2:59:01 PM

On 2008-09-11, Jim Battle <frustum@pacbell.net> wrote:
>> On 2008-09-06, Jim Battle <frus...@pacbell.net> wrote:
> ...
>> Thanks for the info. Didn't know that static linking was an doable (non
>> huge) option. For which compilers are statically built libraries provided?
>
> I don't think statically built libraries are downloadable.  The usual
> procedure is to download the source, configure it for your needs (eg,
> which libraries you want, eg tiff, png, jpg, xml parsing, html, etc,
> as well as static and/or dynamic libs, ascii and/or unicode strings,
> etc), then compile the libraries.  Typically you do that once.

Well, obviously then the question is if BCB build is verified. But maybe I
can answer that myself, since while searching for Felipe's project (see
below) I saw some wxw related BCB projects on sf.net. Didn't investigate
further though.

>> Maybe the confusion started by talking with sb that used a not supported
>> compiler (or at least not out of the box). Since I'm in the Pascal corner,
>> there is a fat chance that he used Delphi and/or BCB.
>
> I was intrigued that wxWidgets came up at all here.  I know there are
> bindings to many languages (c++, perl, python, lua, basic, java, ruby,
> and some others), but I don't know if a pascal interface exists.

Well iirc it was a C++ interface? If so, that might be a/the problem, not
even two different C++ compilers are compatible to each other. (though afaik
on Windows minor use is sometimes possible using hacks that exploit that most
Windows implementation of statically compiled OO languages are somehow
COM compatible)

Pascal therefore usually resorts to flattened versions for such api's.

Moreover, both FreePascal and delphi went the way of porting their own
libraries on top of platform dependant ones themselves, removing the need
for one size fits all.

> wxWidgets has very active ports for win32, gtk, and osx, and then
> somewhat stale or less developed ports for other interfaces: X11,
> palm, os2, CE, others?

I miss QT in the row. Anyway, more importantly for Pascal; there are also
flattened versions like wx.net. 

I believe an limited attempt was been made using wx.net at some point, and
Felipe did some work VMT hacking C++<->fpc compability to directly use QT (
http://sourceforge.net/projects/wxpascal/ is the result). While afaik he had
a basic level working, he got then more involved in QT and Carbon afaik. At
least I haven't heard of any activity in the wxwidgets camp for way more
than an year.

disclaimer: I only remeber these things from quite fragmented discussions on
maillists and irc, so it may be flawed or incomplete. It is meant to help
interested people searching, not to shut out wxwidgets from Pascal or so.
0
Reply Marco 9/11/2008 7:33:23 PM

21 Replies
317 Views

(page loaded in 0.445 seconds)

Similiar Articles:
















7/7/2012 9:26:38 PM


Reply: