Linux-Development-Apps Digest #528, Volume #6    Sat, 15 Apr 00 20:13:14 EDT

Contents:
  Re: Why don't people write in C++ ("Larry Ebbitt ")
  Re: A beginner's question ("Jean Flinois")
  Re: Color faxing s/w? ("Spehro Pefhany")
  Re: C/C++ developing (Diego Berge)
  Re: printing (/dev/lpd) (Diego Berge)
  Re: Illustrator 4 Linux?!? (Victor Wagner)
  Re: On Interactive Systems, (what it was is not of interest) (Victor Wagner)
  Re: printing (/dev/lpd) (Victor Wagner)
  Re: A beginner's question ([EMAIL PROTECTED])
  Re: Problem with Semaphores (Takeyasu Wakabayashi)
  Re: C/C++ developing (Christopher Browne)
  Re: On Interactive Systems, (what it was is not of interest) (Christopher Browne)

----------------------------------------------------------------------------

From: "Larry Ebbitt " <[EMAIL PROTECTED]>
Date: Sat, 15 Apr 2000 18:33:56 -0400 (EDT)
Reply-To: "Larry Ebbitt" <[EMAIL PROTECTED]>
Subject: Re: Why don't people write in C++

On Sat, 15 Apr 2000 20:47:19 GMT, Jerry Peters wrote:

>How about Object Oriented Cobol?

<Shudder!>


Larry - Atlanta - IBM Global Services



------------------------------

From: "Jean Flinois" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.system
Subject: Re: A beginner's question
Date: Sat, 15 Apr 2000 23:05:22 GMT


Jason Rizer wrote in message <[EMAIL PROTECTED]>...
>Hello.  I am a C/C++ programmer and I have recently installed Linux.
Good.

>I have no experience with Linux.  I installed Redhat 6.0 from the Info
>Magic Developer's Resource CD.  My question is this:  Do I have a C/C++
>Compiler installed?
Yes

> If I don't where on the internet can I find one?
Gcc, but it's there.

>Any suggestions on which to choose?  I'm not, at least initially,
>interested in doing any GUI development.  Finally, the machine on which
>I'm running Linux is not connected to the internet, though I have a
>machine running NT which is.  Will I have a problem downloading files
>onto the NT machine and transferring them to the Unix machine via floppy
>or a zip disk.
Nope. Works great.

>Thanks in advance for any help I get.

You're welcome.

>Jason

Jean




------------------------------

From: "Spehro Pefhany" <[EMAIL PROTECTED]>
Subject: Re: Color faxing s/w?
Crossposted-To: comp.os.linux.development.system
Date: Sat, 15 Apr 2000 23:15:53 GMT

In comp.os.linux.development.system Diego Berge <[EMAIL PROTECTED]> wrote:

>    Not at 9600 (or even 14400) bauds, anyway :) -- are those color
> faxes regular copper-wire phone line stuff, or more like ISDN, DSL,
> etc.?

At most, the color would triple the transmission time, so, at fax
resolution, who cares? They'd work fine on a regular phone line. 

Best regards, 
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
[EMAIL PROTECTED]             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.BlueCollarLinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

------------------------------

From: [EMAIL PROTECTED] (Diego Berge)
Crossposted-To: linux.dev.c-programming
Subject: Re: C/C++ developing
Date: Sat, 15 Apr 2000 04:15:46 GMT

On Fri, 14 Apr 2000 13:00:49 +1300, "Daniel Beer"
<[EMAIL PROTECTED]> wrote:

>On Thu, 13 Apr 2000 12:08:31 +0200, Ralf Mueting <[EMAIL PROTECTED]>
>wrote:
>>Hi Folk's
>>
>>i'm searching for prooved 'professional' developer tools for writing
>>C/C++ applications for linux. Which ide is frequently used. I hope
>>you've any hints for me. (Have someone experiencies in using SNIFF++ or
>>Codewarrior)

>I recommend Emacs.  It's really good once you learn the commands.  One
>of its best features would probably be the automatic
>formatting/indenting.

   I never got to work it the way I like, perhaps it's a good moment
to ask.  What I wanted it to do is indenting like:

int main(void)
{
  int n;
  for(n=0; n<10; n++)
  {
    printf(" % 2d", n);
  }
  return 0;
}

but it insists on formatting like:

int main(void)
  {
    int n;
    for(n=0; n<10; n++)
      {
        printf(" % 2d", n);
      }
    return 0;
  }

   How do I make it behave? TIA

Regards,
Diego Berge.


------------------------------

From: [EMAIL PROTECTED] (Diego Berge)
Subject: Re: printing (/dev/lpd)
Date: Sat, 15 Apr 2000 04:15:49 GMT

On Fri, 14 Apr 2000 00:01:59 GMT, Philip <[EMAIL PROTECTED]> wrote:

>Gordon Warren wrote:
>> 
>> Philip wrote:
>> > where
>> > can I find information on 'generating' postscript files
>> 
>> If you want to learn how to write PostScript, check out "PostScript
>> Language Program Design" by Adobe Systems Inc, published by
>> Addison-Wesley.  The version I have was published in 1988.  There may be
>> newer/better references now, but at the time this book helped me finish
>> an undergrad project that forced me to learn how to generate some basic
>> PostScript files.
>> 
>
>I only need to write a single program that should generate a single
>postscript file over and over again (some things should of course depend
>ont he program). I don't think it's worth buying a book for it ?! Arn't
>there any free resources about postscript files available online?

   In that case, the best way is probably to generate an "example"
file which whatever tools you have available, and then edit the
resulting postscript file.  Quick & dirty, and saves you from having
to learn anything :)

   The Other Way is to grab the PostScript specification, a 7.5Mb PDF,
from the Adobe site -- if you can't find it by browsing, e-mail me and
I'll look up the exact location in my bookmarks.

Regards,
Diego Berge.


------------------------------

From: [EMAIL PROTECTED] (Victor Wagner)
Subject: Re: Illustrator 4 Linux?!?
Date: 15 Apr 2000 20:52:57 +0400

Mike Lawson <[EMAIL PROTECTED]> wrote:
: Hi,

: I'm looking for a vector based drawing application similar to Adobe
: Illustrator. Does anybody know a good application?

I've heard about following apps (try to search freshmeat)

GYVE, Killustrator, Sketch

Another class of drawing programs, oriented primarily to simpler drawing
like flow chart are represented by

tgif, xfig and tkpaint.

And I've heard, but haven't checked it that Micrographs have a version
of their Designer for Linux. And Corel at last start to ship CorelDraw9 


At last Adobe promised to port all range of their product (including
Illustrator of course) during this year.
-- 

------------------------------

From: [EMAIL PROTECTED] (Victor Wagner)
Subject: Re: On Interactive Systems, (what it was is not of interest)
Date: 15 Apr 2000 20:40:45 +0400

Arne Knut Roev <[EMAIL PROTECTED]> wrote:
:> 
:> In my opinion, there is no difference from interprter. Interpreter takes
:> your input and makes it executed. How it makes it - does it bytecode
:> compile first, as Perl, or does native code compile, or just executes
:> word by word - it's its internal design problem.

: "Interpreter takes your input and makes it executed." ????

: Sorry, but that statement is _very_ wrong, and I assume you meant the
: correct statement to be as follows:

: "An interactive system takes your input and makes it executed."

In my opinion main difference between (partially) interpreted language
and complied language is presence of eval operator which can be found
in Lisp, shell, perl and Tcl at least (don't know python enough to say
in which form it presents there), which allows you to write interactive
system on the language itself, and don't let you to ship runtime
environment without full programming support.

: Because an interpreter is _not_ the only possible design choice for the 
: "driving engine" of an interactive system.

I see that you make this disticntion between interpreters, compiliers
and interactive systems based on your Lisp experience. In Lisp world
it is probably right angle of view, but in more modern languages like
Perl Python or Tcl, it is quite internal thing which programmer
typically don't worry about. He just feeds source in form of file or
interactively into certain executable and gets expected results without
boring edit-make-execute-coredump cycle.

Tcl 7.6 was pure interpreter, Tcl 8.0 is byte-compilied. But most of my
scripts run under both without any change.

: AND: Because there _is_ one very important difference between interactive 
: systems containing interpreters and interactive systems containing 
: compilers: The interpreter tends to be slow _each_ _time_ you evaluate 
: a given piece of code, whereas the compiler system is slow _only_ the 
: _first_ time you evaluate a given piece of code.

It is not really matter for simple text processing scripts on Perl or
Tcl, becouse they spend most of the time within builtin regexp engine,
which is equally fast in both cases.

:> : Does C++ contain closures independently of the OO things ?
:> 
:> : (Not that an answer in the affirmative would make me use C++, it is
:> : all idle curiosity...)
:> 
:> Would you also mention promises, apply, map and other nice constructs.
:> (Don't tell me about STL iterators. It was asked "Separateley of OO
:> things")

: Do you work with (Common) Lisp ? It certainly sounds like you know something

No I don't. I just have read a couple of books on it and played with it
for a while. Just like those "C++ programmers" mentioned below. 

I'm a bit more experienced with Scheme, which I'm consider one 
of "big four scripting languages" along with Perl, Python and Tcl.
My favorite is Tcl (and I think that it is impossible to program on it
effectively without knowing something about Lisp and m4), but I earn my
living doing Perl+SQL programming.

: about it (which, incidentally, surprises me a little, given the guffaws
: above).

:> Poor people who believe that after they read one book on C/C++ (and I
:> bet it wasn't Straustroup) they know programing!

: Quite.

-- 
[cookie deleted due to language incompatibility]

------------------------------

From: [EMAIL PROTECTED] (Victor Wagner)
Subject: Re: printing (/dev/lpd)
Date: 15 Apr 2000 20:44:11 +0400

Philip <[EMAIL PROTECTED]> wrote:
:> 

: I only need to write a single program that should generate a single
: postscript file over and over again (some things should of course depend
: ont he program). I don't think it's worth buying a book for it ?! Arn't
: there any free resources about postscript files available online?

Than use language, tool or library which has builtin postscript support
Gnu plotlib is one of them, gnuplot is another and Tcl/Tk third (for it
you'll unfortunately need a DISPLAY variable set, but Xvfb would
suffice)
-- 

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: A beginner's question
Crossposted-To: comp.os.linux.development,comp.os.linux.development.system
Date: Sat, 15 Apr 2000 23:34:19 GMT

In comp.os.linux.development.apps Jason Rizer <[EMAIL PROTECTED]> wrote:
> Hello.  I am a C/C++ programmer and I have recently installed Linux.  I
> have no experience with Linux.  I installed Redhat 6.0 from the Info
> Magic Developer's Resource CD.  My question is this:  Do I have a C/C++
> Compiler installed?  If I don't where on the internet can I find one?

Type locate gcc. If it comes up with a long list of files, then yes, it is
installed. If not, it's an integral part of linux and will be on the RedHat
CD anyway.

> Any suggestions on which to choose? 

gcc is the standard for linux. 

 I'm not, at least initially,
> interested in doing any GUI development.  Finally, the machine on which
> I'm running Linux is not connected to the internet, though I have a
> machine running NT which is.  Will I have a problem downloading files
> onto the NT machine and transferring them to the Unix machine via floppy
> or a zip disk.  Thanks in advance for any help I get.

Linux can read dos/fat/vfat, so you'll have no trouble reading floppies.

-- 
______________________________________________________________________________
|   [EMAIL PROTECTED]   |                                                 |
|   Andrew Halliwell BSc   | "ARSE! GERLS!! DRINK! DRINK! DRINK!!!"          |
|            in            | "THAT WOULD BE AN ECUMENICAL MATTER!...FECK!!!! |
|     Computer Science     | - Father Jack in "Father Ted"                   |
==============================================================================
|GCv3.12 GCS>$ d-(dpu) s+/- a C++ US++ P L/L+ E-- W+ N++ o+ K PS+ w-- M+/++  |
|PS+++ PE- Y t+ 5++ X+/X++ R+ tv+ b+ DI+ D+ G e++ h/h+ !r!|  Space for hire  |
==============================================================================

------------------------------

From: Takeyasu Wakabayashi <[EMAIL PROTECTED]>
Subject: Re: Problem with Semaphores
Date: 15 Apr 2000 16:42:51 +0900

Nenad Steric <[EMAIL PROTECTED]> writes:

> I am using Suse 6.3 , i have a really simple program
> which uses Semaphores
> it has the include <sys/sem.h>
> ...
> union semun sem_union
> ....
> semctl(...,sem_union)
> ...
> 
> and when i try to compile with
> gcc -o test test.c
> 
> the compiler says :
> 
> storage size of 'sem_union' isn't known
> 
> ???
> This did work on different older Version, so what does this mean ?
> 

Declare union semun yourself. 

This is required by UNIX 98, SVID, X/OPEN etc. The older versions 
were realy breaking the standards. FreeBSD is(was?) also breaking 
these standards. This is mentioned in UNP vol.2 by W.R.Stevens.

>From semctl(2) man page:

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>

#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
/* union semun is defined by including <sys/sem.h> */
#else
/* according to X/OPEN we have to define it ourselves */
union semun {
       int val;                    /* value for SETVAL */
       struct semid_ds *buf;       /* buffer for IPC_STAT, IPC_SET */
       unsigned short int *array;  /* array for GETALL, SETALL */
       struct seminfo *__buf;      /* buffer for IPC_INFO */
};
#endif

int  semctl  (int  semid, int semnum, int cmd, union semun arg)


--
    Takeyasu Wakabayashi
    Faculty of Economics, Toyama University
    [EMAIL PROTECTED]


------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: linux.dev.c-programming
Subject: Re: C/C++ developing
Reply-To: [EMAIL PROTECTED]
Date: Sat, 15 Apr 2000 23:47:09 GMT

Centuries ago, Nostradamus foresaw a time when Diego Berge would say:
>On Fri, 14 Apr 2000 13:00:49 +1300, "Daniel Beer"
><[EMAIL PROTECTED]> wrote:
>
>>On Thu, 13 Apr 2000 12:08:31 +0200, Ralf Mueting <[EMAIL PROTECTED]>
>>wrote:
>>>Hi Folk's
>>>
>>>i'm searching for prooved 'professional' developer tools for writing
>>>C/C++ applications for linux. Which ide is frequently used. I hope
>>>you've any hints for me. (Have someone experiencies in using SNIFF++ or
>>>Codewarrior)
>
>>I recommend Emacs.  It's really good once you learn the commands.  One
>>of its best features would probably be the automatic
>>formatting/indenting.
>
>   I never got to work it the way I like, perhaps it's a good moment
>to ask.  What I wanted it to do is indenting like:
>
>int main(void)
>{
>  int n;
>  for(n=0; n<10; n++)
>  {
>    printf(" % 2d", n);
>  }
>  return 0;
>}
>
>but it insists on formatting like:
>
>int main(void)
>  {
>    int n;
>    for(n=0; n<10; n++)
>      {
>        printf(" % 2d", n);
>      }
>    return 0;
>  }

C indentation behaviour is configurable using six variables, as
documented in the manual:

a) c-indent-level
b) c-continued-statement-offset
c) c-brace-offset
d) c-brace-imaginary-offset
e) c-argdecl-indent
f) c-label-offset

The major one that appears to be "set inappropriately" for your
desires appears to be c-brace-offset.

You might add the line 
(setq c-brace-offset 0)
to the file ~/.emacs

Hope this helps...
-- 
DOS: n.,  A small annoying  boot virus that causes  random spontaneous
system crashes, usually just  before saving a massive project.  Easily
cured  by UNIX.   See also  MS-DOS,  IBM-DOS, DR-DOS.   
-- from  David Vicker's .plan
[EMAIL PROTECTED] - - <http://www.hex.net/~cbbrowne/lsf.html>


------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: On Interactive Systems, (what it was is not of interest)
Reply-To: [EMAIL PROTECTED]
Date: Sun, 16 Apr 2000 00:05:24 GMT

Centuries ago, Nostradamus foresaw a time when Victor Wagner would say:
>Arne Knut Roev <[EMAIL PROTECTED]> wrote:
>:> 
>:> In my opinion, there is no difference from interprter. Interpreter takes
>:> your input and makes it executed. How it makes it - does it bytecode
>:> compile first, as Perl, or does native code compile, or just executes
>:> word by word - it's its internal design problem.
>
>: "Interpreter takes your input and makes it executed." ????
>
>: Sorry, but that statement is _very_ wrong, and I assume you meant the
>: correct statement to be as follows:
>
>: "An interactive system takes your input and makes it executed."
>
>In my opinion main difference between (partially) interpreted language
>and complied language is presence of eval operator which can be found
>in Lisp, shell, perl and Tcl at least (don't know python enough to say
>in which form it presents there), which allows you to write interactive
>system on the language itself, and don't let you to ship runtime
>environment without full programming support.

I'll buy that, and yes, Python has a function called eval, which works
much like the Perl eval, treating a string as a piece of Python code.

>: Because an interpreter is _not_ the only possible design choice for the 
>: "driving engine" of an interactive system.
>
>I see that you make this disticntion between interpreters, compiliers
>and interactive systems based on your Lisp experience. In Lisp world
>it is probably right angle of view, but in more modern languages like
>Perl Python or Tcl, it is quite internal thing which programmer
>typically don't worry about. He just feeds source in form of file or
>interactively into certain executable and gets expected results without
>boring edit-make-execute-coredump cycle.

Actually, it _is_ fairly relevant for a wide variety of languages.

Just yesterday, I was critiquing some ABAP/4 code, used to implement
the ERP system, "R/3."  (Many people make the mistake of calling it
"SAP" when that's the _name of the company_ and not the name of the
product...)

Anyhoo, we were trying to tune some database code which is running
gratuitously long.  It _appears_ that this results from not doing
interim database commits, so that you've got this _HUGE_ database
transaction that keeps growing.  50,000 table changes adds up after a
while.

Thought #1: At crucial locations in the code, call a subroutine that
increments a counter.  When counter grows to [some value; probably
200], COMMIT WORK, and reset the counter.

Thought #2: This means tossing in a subroutine call, with associated
context changes and such, all in the middle of some tight loops.
Could be expensive.  Why not use a macro that expands into the
"increment counter, test, commit, reset" at compile time?  That
eliminates subroutine overhead.

The point here is that whether a language is "compiled" or
"interpreted," there are some crucial differences between compile time
and run time, and intelligent code may need to use those differences.

>Tcl 7.6 was pure interpreter, Tcl 8.0 is byte-compilied. But most of my
>scripts run under both without any change.
>
>: AND: Because there _is_ one very important difference between interactive 
>: systems containing interpreters and interactive systems containing 
>: compilers: The interpreter tends to be slow _each_ _time_ you evaluate 
>: a given piece of code, whereas the compiler system is slow _only_ the 
>: _first_ time you evaluate a given piece of code.
>
>It is not really matter for simple text processing scripts on Perl or
>Tcl, becouse they spend most of the time within builtin regexp engine,
>which is equally fast in both cases.

Indeed.  This is actually an example of how Perl/Tcl can be _FASTER_
than their compiled brethren.

After all, in Perl, you make use of some heavily tuned regex code that
you probably _don't_ get at in C without considerable grief.
>:> Poor people who believe that after they read one book on C/C++ (and I
>:> bet it wasn't Straustroup) they know programing!
>
>: Quite.

Indeed.  If someone claims to "know programming," and _doesn't_
reference concepts out of a variety of kinds of languages, they're not
much of a programmer.

Yesterday, I calculated a bill (airline ticket charges) to bounce to a
brother using a bit of code written in Common Lisp.  The
_entertaining_ part was that a crucial portion of the calculation used
the CL REDUCE function which hails quite consciously from APL.
-- 
"Bother,"  said Pooh,  "Eeyore, ready  two photon  torpedoes  and lock
phasers on the Heffalump, Piglet, meet me in transporter room three"
[EMAIL PROTECTED] - - <http://www.ntlug.org/~cbbrowne/languages.html>

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.apps) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-Apps Digest
******************************

Reply via email to