www.digitalmars.com         C & C++   DMDScript  

D - modified andy friesen's console

reply "Carlos Santander B." <carlos8294 msn.com> writes:
Hi, I translated disp.h and used it as a way to control the console adding
some functions to Andy's Console class. I include the modified console.d
(with formatter.d), disp.d and a fairly simple test.d. Enjoy.

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06
May 06 2003
parent reply "Sean L. Palmer" <palmer.sean verizon.net> writes:
Interesting.  I would have liked this 10 years ago.

I know not everyone is pushing the limits of computing.  I myself am well
behind the forefront.  But DOS is _d_e_a_d_.  CGA, gone.  VGA, gone.  Now
there is PalmPilot, CE, XP, OS/X, and PS/2.

Everyone has to start somewhere, and I wish you the best of luck.  I myself
wrote many of these same classes.

What I am trying to do (probably unsuccessfully) is give you a tip:   Get
out of DOS and learn technology that is useful today.  Learn how to draw
polygons in DirectX or draw TrueType fonts in Windows.  Learn about the
hardware but don't deal with it directly.  Use tools such as dialog editors
that are available to you to make things easier.

We write console tools in my line of work, but *only* batch processors,
nothing interactive, and any output that's not just raw text is gonna be
HTML or XML or something, not ASCII art and blinking block text.  Most of
the tools we make end up with GUI front ends because the artists like it
that way, but we need command line support for making tools be able to
automatically call each other.  But these are only tools;  they don't have
to be pretty.  If you want pretty you make a nice GUI interface, something
pleasing to the eye and easy to use with a mouse.

I'm sorry this probably came off harsh.  Probably elsewhere in the world,
perhaps even parts of US where people are getting old hand-me-down
computers,  DOS might still have a strong following.  I remember the simpler
days of programming where there weren't any "Windows certified" stickers and
you were almost guaranteed to get a program that actually worked when you
bought one.  The days when you had complete control over the machine, and
over what you made the machine do.

Video game console programming is a lot like that nowadays, but much harder
to program and more is expected of you.  You get alot of control but you
still have to make the publisher and the console maker happy before they'll
let you distribute.

Well D is a good choice for language for tinkering.  ;)

Sean



"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:b99nds$11qe$1 digitaldaemon.com...
 Hi, I translated disp.h and used it as a way to control the console adding
 some functions to Andy's Console class. I include the modified console.d
 (with formatter.d), disp.d and a fairly simple test.d. Enjoy.

 -------------------------
 Carlos Santander

May 06 2003
next sibling parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
Ok, no problem at all. In fact, I was expecting something like this.
A couple of comments embedded...

"Sean L. Palmer" <palmer.sean verizon.net> escribiσ en el mensaje
news:b9a4qs$1fiu$1 digitaldaemon.com...
| Interesting.  I would have liked this 10 years ago.
|
| I know not everyone is pushing the limits of computing.  I myself am well
| behind the forefront.  But DOS is _d_e_a_d_.  CGA, gone.  VGA, gone.  Now
| there is PalmPilot, CE, XP, OS/X, and PS/2.
|

PalmPilot: I don't have. CE: I don't have. XP: I have. OS/X: I don't have.
PS/2: I don't have. Past experience in any of those: I don't have.

| Everyone has to start somewhere, and I wish you the best of luck.  I
myself
| wrote many of these same classes.
|
| What I am trying to do (probably unsuccessfully) is give you a tip:   Get
| out of DOS and learn technology that is useful today.  Learn how to draw
| polygons in DirectX or draw TrueType fonts in Windows.  Learn about the
| hardware but don't deal with it directly.  Use tools such as dialog
editors
| that are available to you to make things easier.

Thanks for the tip. Maybe I'm just young and dumb... lol.

|
| We write console tools in my line of work, but *only* batch processors,
| nothing interactive, and any output that's not just raw text is gonna be
| HTML or XML or something, not ASCII art and blinking block text.  Most of
| the tools we make end up with GUI front ends because the artists like it
| that way, but we need command line support for making tools be able to
| automatically call each other.  But these are only tools;  they don't have
| to be pretty.  If you want pretty you make a nice GUI interface, something
| pleasing to the eye and easy to use with a mouse.
|

I know where the world is going, and I myself have done a lot of GUI
interfaces (not with DirectX or things like that), but only using RAD tools.
Now, I want to spend some time in D, but there is no RAD for D yet. I know
how dig works and I understand it, but it seems a bit too complicated yet.
Add that to my heavy DOS past, and you get my particular interest in having
(at least for me) a quite complete set of functions for the console.

| I'm sorry this probably came off harsh.  Probably elsewhere in the world,
| perhaps even parts of US where people are getting old hand-me-down
| computers,  DOS might still have a strong following.  I remember the
simpler

Actually, globalization and all that stuff have made that we do what we do
just like you guys do. I mean, we also use the tools that you have
available. So please, don't say that again.

| days of programming where there weren't any "Windows certified" stickers
and
| you were almost guaranteed to get a program that actually worked when you
| bought one.  The days when you had complete control over the machine, and
| over what you made the machine do.
|
| Video game console programming is a lot like that nowadays, but much
harder
| to program and more is expected of you.  You get alot of control but you
| still have to make the publisher and the console maker happy before
they'll
| let you distribute.
|
| Well D is a good choice for language for tinkering.  ;)
|
| Sean
|
|

—————————————————————————
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-07
May 06 2003
parent reply Helmut Leitner <helmut.leitner chello.at> writes:
"Carlos Santander B." wrote:
 Ok, no problem at all. In fact, I was expecting something like this.
 A couple of comments embedded...

Don't let get anyone in your way. If you want a Console, fine. I think a portable Console should be part of a standard library. Although it won't help D to get the touch of a modern language. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.com
May 07 2003
parent "Carlos Santander B." <carlos8294 msn.com> writes:
"Helmut Leitner" <helmut.leitner chello.at> escribiσ en el mensaje
news:3EB97573.5CCFE8C7 chello.at...
|
|
| "Carlos Santander B." wrote:
| > Ok, no problem at all. In fact, I was expecting something like this.
| > A couple of comments embedded...
|
| Don't let get anyone in your way. If you want a Console, fine.
| I think a portable Console should be part of a standard library.
| Although it won't help D to get the touch of a modern language.
|
| --
| Helmut Leitner    leitner hls.via.at
| Graz, Austria   www.hls-software.com

I thought of some other reason.
Eventually, it's expected for D to become (also) a beginners language.
However, unless a RAD tool is done (and really well done), GUI development
will still be a bit painful (even with dig available. Sorry Burton). So
they'll want to use console functions, at least for a start. You can say
c.stdio is available, but eventually (just before they start to play with
dig) they'll want their programs to look fancy and everything. Well, now
they have just what they need.
I know I must be overlooking some issues, but I still think I have a point.
And Helmut, thanks for that.
BTW, I've repeated it a couple of times: I think a RAD would be very useful.
Anyone has something in their mind?

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06
May 07 2003
prev sibling parent reply John Reimer <jjreimer telus.net> writes:
Sean L. Palmer wrote:
 Interesting.  I would have liked this 10 years ago.
 
 I know not everyone is pushing the limits of computing.  I myself am well
 behind the forefront.  But DOS is _d_e_a_d_.  CGA, gone.  VGA, gone.  Now
 there is PalmPilot, CE, XP, OS/X, and PS/2.

Shame on you, Sean. Since when did writing a console level tool, one of the most ubiquitous of interfaces, ever amount to a waste of time. It certainly isn't so much a waste that it warrants discouraging someone like that. True, DOS is a relic of the past, but the past seems to have a stubborn way of sticking around in the present . Need I mention Linux and the BSDs, decendents of the decades old UNIX, (technology people are still using today *gasp*) where console level interfaces are still a way of life (eg, NCURSES) in installation, setup, and configuration (amoung others). Many interfaces to embedded hardware systems still depend on console level tools, too. You know? Last I checked, I'm still using D from the CLI!
 Everyone has to start somewhere, and I wish you the best of luck.  I myself
 wrote many of these same classes.

 What I am trying to do (probably unsuccessfully) is give you a tip:   Get
 out of DOS and learn technology that is useful today.  Learn how to draw
 polygons in DirectX or draw TrueType fonts in Windows.  Learn about the
 hardware but don't deal with it directly.  Use tools such as dialog editors
 that are available to you to make things easier.
 
 We write console tools in my line of work, but *only* batch processors,
 nothing interactive, and any output that's not just raw text is gonna be
 HTML or XML or something, not ASCII art and blinking block text.  Most of
 the tools we make end up with GUI front ends because the artists like it
 that way, but we need command line support for making tools be able to
 automatically call each other.  But these are only tools;  they don't have
 to be pretty.  If you want pretty you make a nice GUI interface, something
 pleasing to the eye and easy to use with a mouse.

And that is exactly the point: not all systems are GUI based. Computerdom has such a wide ranging field of applications, and game developing is just one little part of it (okay big part of it :-). That happens to be the software development world in which you currently reside. Sure, technology is ever advancing, but the console interface is one common denominator that just doesn't go away.
 I'm sorry this probably came off harsh.  Probably elsewhere in the world,
 perhaps even parts of US where people are getting old hand-me-down
 computers,  DOS might still have a strong following.  I remember the simpler
 days of programming where there weren't any "Windows certified" stickers and
 you were almost guaranteed to get a program that actually worked when you
 bought one.  The days when you had complete control over the machine, and
 over what you made the machine do.
 
 Video game console programming is a lot like that nowadays, but much harder
 to program and more is expected of you.  You get alot of control but you
 still have to make the publisher and the console maker happy before they'll
 let you distribute.
 

Sean, you are a smart fella and definitely someone from whom I could learn much, but, really, you're a little too practical sometimes to see outside your frame of reference ;-). Later, John PS. Carlos, implementing the disp.h interface was one of the first little projects I did years ago when I was learning C. Translating it to D sounds like a fun, educational use of the language. Nice job :-)
May 08 2003
parent reply "Walter" <walter digitalmars.com> writes:
"John Reimer" <jjreimer telus.net> wrote in message
news:b9dg2b$1rsr$1 digitaldaemon.com...
 Since when did writing a console level tool, one of
 the most ubiquitous of interfaces, ever amount to a waste of time.

I've been using the same text editor since 1985. I've ported it to DOS, DOS32, Win32, Amiga, Sun News, Vax, BSDunix, linux, etc. One of the first things I do with a new machine is figure out how the console works so I can port microemacs to it. Disp.h kind of grew out of those ports. Once every couple years or so, I try a new editor. Soon to return to microemacs. The commands run a deep groove in my brain <g>.
May 11 2003
parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
"Walter" <walter digitalmars.com> escribiσ en el mensaje
news:b9m9ur$2v3m$1 digitaldaemon.com...
|
| I've been using the same text editor since 1985. I've ported it to DOS,
| DOS32, Win32, Amiga, Sun News, Vax, BSDunix, linux, etc. One of the first
| things I do with a new machine is figure out how the console works so I
can
| port microemacs to it. Disp.h kind of grew out of those ports.
|

I tried to use my disp.d on linux. However the linker complained about the
functions. Apparently it didn't know where to find their implementations.
Where can I find it?

—————————————————————————
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06
May 11 2003
parent "Walter" <walter digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:b9mecg$2jv$1 digitaldaemon.com...
 "Walter" <walter digitalmars.com> escribiσ en el mensaje
 news:b9m9ur$2v3m$1 digitaldaemon.com...
 |
 | I've been using the same text editor since 1985. I've ported it to DOS,
 | DOS32, Win32, Amiga, Sun News, Vax, BSDunix, linux, etc. One of the

 | things I do with a new machine is figure out how the console works so I
 can
 | port microemacs to it. Disp.h kind of grew out of those ports.
 |

 I tried to use my disp.d on linux. However the linker complained about the
 functions. Apparently it didn't know where to find their implementations.
 Where can I find it?

Under linux, microemacs uses curses. It would be simple to do a disp.d for curses, but I've never done it.
May 11 2003