UK diy (uk.d-i-y) For the discussion of all topics related to diy (do-it-yourself) in the UK. All levels of experience and proficency are welcome to join in to ask questions or offer solutions.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #121   Report Post  
Andy Hall
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

On Sat, 17 Jan 2004 00:25:45 -0000, "IMM" wrote:


"John Laird" wrote in message
.. .
On Fri, 16 Jan 2004 23:07:24 -0000, "IMM" wrote:

"Andy Wade" wrote in message
...
"John Laird" wrote in message
...

Correct. Lisp and Algol predated Cobol, too.

Nostalgia: I used to be quite proficient in Algol 60; never could
understand
why anyone could prefer Fortran...

"C" beats em all. operating systems have been written in C.


That's all that should be written in C, in my book (and there are better
languages for that). And even then only by people with at least 0.9 of a
clue.


You obviously don't know about C. The problem with C is that if the
programmer is not educated to write structured code it is awful and
spaghetti like. Pascal is the best language to learn from as it forces the
user into a reasonably structured way. Write all languages like in Pascal
and you can't go wrong.

C is a programers language. It is for getting your hands dirty.

Ah. Thanks for letting us know that.


---


..andy

To email, substitute .nospam with .gl
  #122   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"Andy Hall" wrote in message
...
On Sat, 17 Jan 2004 00:25:45 -0000, "IMM" wrote:


"John Laird" wrote in message
.. .
On Fri, 16 Jan 2004 23:07:24 -0000, "IMM" wrote:

"Andy Wade" wrote in message
...
"John Laird" wrote in message
...

Correct. Lisp and Algol predated Cobol, too.

Nostalgia: I used to be quite proficient in Algol 60; never could
understand
why anyone could prefer Fortran...

"C" beats em all. operating systems have been written in C.

That's all that should be written in C, in my book (and there are

better
languages for that). And even then only by people with at least 0.9 of

a
clue.


You obviously don't know about C. The problem with C is that if the
programmer is not educated to write structured code it is awful and
spaghetti like. Pascal is the best language to learn from as it forces

the
user into a reasonably structured way. Write all languages like in

Pascal
and you can't go wrong.

C is a programers language. It is for getting your hands dirty.

Ah. Thanks for letting us know that.


Pleasure.


---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004


  #123   Report Post  
The Natural Philosopher
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

IMM wrote:

"Andy Wade" wrote in message
...

"John Laird" wrote in message
. ..


Correct. Lisp and Algol predated Cobol, too.

Nostalgia: I used to be quite proficient in Algol 60; never could

understand

why anyone could prefer Fortran...


"C" beats em all. operating systems have been written in C.




C was writen by engineers, as a way if writing assembler faster.

Thats why its good for operating systems.

Hwver you do need a *little* assembler here and there.

I have written an operating system in C and assembler.



---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004





  #124   Report Post  
Owain
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

"IMM" wrote
| You obviously don't know about C. The problem with C is that
| if the programmer is not educated to write structured code it
| is awful and spaghetti like. Pascal is the best language to
| learn from as it forces the user into a reasonably structured
| way.

Well it did until this user found GOTO in the book and whooped with joy. I
also found the sentence that said "always re-use code wherever possible" so
I re-used the code of the chap sitting next to me.

Owain


  #125   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"The Natural Philosopher" wrote in message
...
IMM wrote:

"Andy Wade" wrote in message
...

"John Laird" wrote in message
. ..


Correct. Lisp and Algol predated Cobol, too.

Nostalgia: I used to be quite proficient in Algol 60; never could

understand

why anyone could prefer Fortran...


"C" beats em all. operating systems have been written in C.


C was writen by engineers, as a way if writing assembler faster.


Kernigan and Rickie to be precise. They wrote the UNIX operating system
with it (UNIX was a pun on Multix a Honeywell OS). The centre kernel of
most UNIX versions is in machine code.

Thats why its good for operating systems.

Hwver you do need a *little* assembler here and there.


Depends on the compiler. A compiler only converts ASCII text to whatever.
A written program is only a document, just like a letter.

I have written an operating system in C and assembler.


Do you mean UNIX kernel? Add your bits and re-compile.

For applications C is not the thing as it can be slow to produce programs.
A boss would be better with a 4 GL as it is faster and a slight learning
curve.

C is very powerful.



---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004




  #126   Report Post  
Andy Wade
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

"IMM" wrote in message ...

Kernigan and Rickie to be precise.


That must be some new meaning of the word "precise" with which I was not
previously familiar...

Kernighan and Ritchie must be two of the most famous names in computing.
You spell them both wrong and call it precise. Get back under your stone
and stop digging yourself into a deep hole again.

--
Andy


  #127   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"Andy Wade" wrote in message
...
"IMM" wrote in message ...

Kernigan and Rickie to be precise.


That must be some new meaning of the word "precise" with which I was not
previously familiar...

Kernighan and Ritchie must be two of the most famous names in computing.
You spell them both wrong and call it precise. Get back under your stone
and stop digging yourself into a deep hole again.


So you are good at spelling? What do you know about C and UNIX, oh smarty?
Probably just superficial stuff and then you an expert. Duh!



---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004


  #128   Report Post  
Andy Hall
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

On Sat, 17 Jan 2004 18:30:23 -0000, "IMM" wrote:


"Andy Wade" wrote in message
...
"IMM" wrote in message ...

Kernigan and Rickie to be precise.


That must be some new meaning of the word "precise" with which I was not
previously familiar...

Kernighan and Ritchie must be two of the most famous names in computing.
You spell them both wrong and call it precise. Get back under your stone
and stop digging yourself into a deep hole again.


So you are good at spelling? What do you know about C and UNIX, oh smarty?


Just a small point. If you don't spell correctly, you will run into
trouble with C especially. If you don't punctuate correctly then the
results can be insidiously wrong and the compiler may not report it.



Probably just superficial stuff and then you an expert. Duh!



---


..andy

To email, substitute .nospam with .gl
  #129   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"Andy Hall" wrote in message
...
On Sat, 17 Jan 2004 18:30:23 -0000, "IMM" wrote:


"Andy Wade" wrote in message
...
"IMM" wrote in message ...

Kernigan and Rickie to be precise.

That must be some new meaning of the word "precise" with which I was

not
previously familiar...

Kernighan and Ritchie must be two of the most famous names in

computing.
You spell them both wrong and call it precise. Get back under your

stone
and stop digging yourself into a deep hole again.


So you are good at spelling? What do you know about C and UNIX, oh

smarty?

Just a small point. If you don't spell correctly, you will run into
trouble with C especially.


Since when has Kernighan and Ritchie been reserved words in C. Duh!!



---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004


  #130   Report Post  
Andy Hall
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

On Sat, 17 Jan 2004 22:26:59 -0000, "IMM" wrote:

..

So you are good at spelling? What do you know about C and UNIX, oh

smarty?

Just a small point. If you don't spell correctly, you will run into
trouble with C especially.


Since when has Kernighan and Ritchie been reserved words in C. Duh!!

I was commenting in general as you well know.




---


..andy

To email, substitute .nospam with .gl


  #131   Report Post  
The Natural Philosopher
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

IMM wrote:

"The Natural Philosopher" wrote in message
...

IMM wrote:


"Andy Wade" wrote in message
. ..


"John Laird" wrote in message
m...



Correct. Lisp and Algol predated Cobol, too.


Nostalgia: I used to be quite proficient in Algol 60; never could


understand


why anyone could prefer Fortran...


"C" beats em all. operating systems have been written in C.

C was writen by engineers, as a way if writing assembler faster.


Kernigan and Rickie to be precise.



Yes and no. C was devloped from B, which was developed from BCPL.

kernighan and Ritchie simply wrote tghe official book, there wer others
involved in its design and evolution.


They wrote the UNIX operating system
with it (UNIX was a pun on Multix a Honeywell OS). The centre kernel of
most UNIX versions is in machine code.


Thats why its good for operating systems.

Hwver you do need a *little* assembler here and there.


Depends on the compiler. A compiler only converts ASCII text to whatever.
A written program is only a document, just like a letter.



Yes and no.
You can. of course write 'inline assembler' in 'C' in most complers.

However it is not 'C'

C nbeing a stack based language, and having very little cobncetp of
registers - since the PDP CPU doesn't have many - does not map well or
make efficient use of registers.

Neither has it any concept of using IO space within the language, nor is
it very effeicient in all cases at doing bitmap operations.


To talk to the hardware usinc C alone is not possible. You have to have
at some level at least an assembler coded subroutine to do e.g. an IO
call, and other generic bit twiddling is usuially faster and easier to
implement in assembler, as are interrupt service routines.

It is of couse he fact tghat RISC chops are now being produced that
enavle almost pure C to be used to drive them - the are ooptimised for
teh way it does things. However Intel type architectires do NOT map well
into C and its a tribute to teh complier writers that we get teh
performance we do.




I have written an operating system in C and assembler.


Do you mean UNIX kernel? Add your bits and re-compile.



No, I mean a dedicated operating system for an 8088 microprocessor board.

I have in fact written the equivalent of what a home computer running
FORTH would have run in the early 80's. From scratch.





For applications C is not the thing as it can be slow to produce programs.
A boss would be better with a 4 GL as it is faster and a slight learning
curve.



Horses for courese. Most higher level languages are woefully inefficient.

The problem with C is never speed, it is that it gets very big and hard
to debug on higher level stuff. It is the actual problems of miantaining
control over a huge project written in C that eventually make 4GL type
lkanguase -0 inefficient tho they are speed wise - at least manageable
in terms of software engineering.


C is very powerful.



Its as powerful as teh processor and machine it runs on.

Forth is smaller, but slower. In many respects its smaller than
assembler in terms of the program sizs. Its a bitch to write tho :-)


Stuff like PDL or BASIC is easy to cobble up stuff in, but woefully
slow. AND big.





---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004





  #132   Report Post  
The Natural Philosopher
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

Owain wrote:

"IMM" wrote
| You obviously don't know about C. The problem with C is that
| if the programmer is not educated to write structured code it
| is awful and spaghetti like. Pascal is the best language to
| learn from as it forces the user into a reasonably structured
| way.

Well it did until this user found GOTO in the book and whooped with joy. I
also found the sentence that said "always re-use code wherever possible" so
I re-used the code of the chap sitting next to me.

Owain



Until you have scratched your head over how to get out of 16 level deep
nested subroutines and abort a whole process in Pasacal, an drealised
that - ****, yes, setjmp()and Longjmp() are in fact exactly what you
need to get back to a fresh start when you have detected deep in the
mire that the other end has dropped the line on you...

Pascal is fine for teaching, and that every subroutine has an entrance
as well as an exit, but sometimes you just want to crash through it all
and start over. Pascal means you have to write an explicit error handler
at EVERY level.

You can't write a real time task scheduler in it either. Mind you its
pretty impossible in 'C' as well. You need to do nasty theings like
manipulationg stack pointers - a complete nono in C - for good reasons!







  #133   Report Post  
John Laird
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

On Sat, 17 Jan 2004 00:25:45 -0000, "IMM" wrote:


"John Laird" wrote in message
.. .
On Fri, 16 Jan 2004 23:07:24 -0000, "IMM" wrote:

"Andy Wade" wrote in message
...
"John Laird" wrote in message
...

Correct. Lisp and Algol predated Cobol, too.

Nostalgia: I used to be quite proficient in Algol 60; never could
understand
why anyone could prefer Fortran...

"C" beats em all. operating systems have been written in C.


That's all that should be written in C, in my book (and there are better
languages for that). And even then only by people with at least 0.9 of a
clue.


You obviously don't know about C.


I obviously do.

The problem with C is that if the
programmer is not educated to write structured code it is awful and
spaghetti like. Pascal is the best language to learn from as it forces the
user into a reasonably structured way. Write all languages like in Pascal
and you can't go wrong.


Hmm, first "C beats em all", and then apparently it doesn't :-)

C is a programers language. It is for getting your hands dirty.


They all are, to a greater or lesser extent.

I would guess that 90+% of all security holes have been a result of crappy C
coding, or maybe C++, its ******* offspring. If the language (or perhaps
its "standard library") was as good as you claim, such mistakes wouldn't be
so easy to make. You can't simultaneously applaud a language and deride its
users for not being smart enough to avoid writing bad code in it.

--
This is NOT Burger King. You do not get it YOUR way.

Mail john rather than nospam...
  #134   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"John Laird" wrote in message
...
On Sat, 17 Jan 2004 00:25:45 -0000, "IMM" wrote:


"John Laird" wrote in message
.. .
On Fri, 16 Jan 2004 23:07:24 -0000, "IMM" wrote:

"Andy Wade" wrote in message
...
"John Laird" wrote in message
...

Correct. Lisp and Algol predated Cobol, too.

Nostalgia: I used to be quite proficient in Algol 60; never could
understand
why anyone could prefer Fortran...

"C" beats em all. operating systems have been written in C.

That's all that should be written in C, in my book (and there are

better
languages for that). And even then only by people with at least 0.9 of

a
clue.


You obviously don't know about C.


I obviously do.


Not much.

The problem with C is that if the
programmer is not educated to write structured code it is awful and
spaghetti like. Pascal is the best language to learn from as it forces

the
user into a reasonably structured way. Write all languages like in

Pascal
and you can't go wrong.


Hmm, first "C beats em all", and then apparently it doesn't :-)


It is brilliant for what it was intended, and even more.

C is a programers language. It is for getting your hands dirty.


They all are, to a greater or lesser extent.


Proper in-depth programmers. You could say that someone who puts together a
spreadsheet is a programmer.

I would guess that 90+% of all security holes have been a result of crappy

C
coding, or maybe C++, its ******* offspring. If the language (or perhaps
its "standard library") was as good as you claim, such mistakes wouldn't

be
so easy to make. You can't simultaneously applaud a language and deride

its
users for not being smart enough to avoid writing bad code in it.


You can deride its users. Programmers have to know what the hell they are
programming and that includes know about security.



---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004


  #135   Report Post  
PoP
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

On Sun, 18 Jan 2004 17:06:12 +0000, John Laird
wrote:

I would guess that 90+% of all security holes have been a result of crappy C
coding, or maybe C++, its ******* offspring. If the language (or perhaps
its "standard library") was as good as you claim, such mistakes wouldn't be
so easy to make. You can't simultaneously applaud a language and deride its
users for not being smart enough to avoid writing bad code in it.


I'm not sure your guess is accurate. C is about as close to machine
code as it is possible to get. With Pascal et al the compiler
typically adds error checking to catch situations such as when a
divide by zero occurs - C compilers don't usually add that overhead.

I have programmed in C, C++, Pascal, Fortran, Visual Basic and a
couple of other languages. Of them all, C was the one that was
inherently "unstable" from a programmers point of view. It was far
easier to program a routine to crash the host computer with C than for
other languages.

But at the same time, C was also inherently quite forgiving in terms
of casting and similar situations. I quite liked C because you could
perform desired operations without having to jump thru hoops to either
become compliant with the compilers needs, or deliberately instruct
the compiler to ignore the error caused by the programming need.

PoP

Sending email to my published email address isn't
guaranteed to reach me.


  #136   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"PoP" wrote in message
...
On Sun, 18 Jan 2004 17:06:12 +0000, John Laird
wrote:

I would guess that 90+% of all security holes have been a result of

crappy C
coding, or maybe C++, its ******* offspring. If the language (or perhaps
its "standard library") was as good as you claim, such mistakes wouldn't

be
so easy to make. You can't simultaneously applaud a language and deride

its
users for not being smart enough to avoid writing bad code in it.


I'm not sure your guess is accurate. C is about as close to machine
code as it is possible to get.


I think you mean assembler.

With Pascal et al the compiler
typically adds error checking to catch situations such as when a
divide by zero occurs - C compilers don't usually add that overhead.

I have programmed in C, C++, Pascal, Fortran, Visual Basic and a
couple of other languages. Of them all, C was the one that was
inherently "unstable" from a programmers point of view. It was far
easier to program a routine to crash the host computer with C than for
other languages.

But at the same time, C was also inherently quite forgiving in terms
of casting and similar situations. I quite liked C because you could
perform desired operations without having to jump thru hoops to either
become compliant with the compilers needs, or deliberately instruct
the compiler to ignore the error caused by the programming need.


So, a powerful language that you have to know what you are doing with it-
like assembler and machine code. C wasn't meant to compete with COBOL.


---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004


  #138   Report Post  
Andrew
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

In article , PoP
writes
On Sun, 18 Jan 2004 17:06:12 +0000, John Laird
wrote:

snip

I'm not sure your guess is accurate. C is about as close to machine
code as it is possible to get. With Pascal et al the compiler
typically adds error checking to catch situations such as when a
divide by zero occurs - C compilers don't usually add that overhead.

Any decent compiler or operating system will provide varying and
definable levels of checking.

I have programmed in C, C++, Pascal, Fortran, Visual Basic and a
couple of other languages. Of them all, C was the one that was
inherently "unstable" from a programmers point of view. It was far
easier to program a routine to crash the host computer with C than for
other languages.

What !. There is nothing unstable about 'C' (unless
you are using version 1.0 of the compiler) - it is the way it is used
and how well it is tested that counts. If you insist on using pointers
that don't point to anything, what do you expect. On a decent machine
with memory protection and privileges (like a VAX/Alpha) you should only
be able to crash your own process, never someone else's.
C is after all a high level assembler (anyone used Plan ??), and while
there may be better languages for writing operating systems [1], the
closer you get to the hardware the more useful it is. For bit-twiddling
it is perfect. I wrote the software for an analogue-addessable fire
alarm over 10 years ago. Main board had a trusty Z80 with 32K rAM and
64K bank switched EPROM (Z80 =cheap to buy in quantity and available in
CMOS, which is what you need for extended power fail sits.).
Loop controllers - 8051 with 128 *bytes* of RAM but as much EPROM as you
need, written in assembler and debugged with a 'scope.
Had to do it for a fixed price and the hardware didn't exist at the
time, and hardware guy had been rescued from redundancy at the age of 60
and had never done a digital board in his life. Interesting time - I had
no idea how much information could be obtained just using humble 2
channel 'scope, and not even storage one.
Oh, and I used C because Hitech (Oz company) did a cheap compiler for
the Z80 and provided you avoided bit manipulation on stack items it
generated tolerable code. Also meant I could use an intelligent EPROM
emulator to debug and single step in machine code.

[1] (DEC-Compaq- Now Hewlett Packard ACMS still has modules written
in Bliss32. In fact I think it still their favourite language.
Personally I still think VAX FORTRAN 77 version 3 running VMS V3 was
the best combination, even for 'commercial' work since it had reasonable
character string handling - and if you used a separate database handler
you didn't need to use the languages rudimentary file handling.
PS the London Teching hosp. where I used the latter used to use an
Elliot 803 in the sixties - apparently it used mag tapes with sprocket
holes (so I was told).


But at the same time, C was also inherently quite forgiving in terms
of casting and similar situations. I quite liked C because you could
perform desired operations without having to jump thru hoops to either
become compliant with the compilers needs, or deliberately instruct
the compiler to ignore the error caused by the programming need.

PoP

Sending email to my published email address isn't
guaranteed to reach me.


--
Andrew
  #139   Report Post  
PoP
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.

On Sun, 18 Jan 2004 22:40:28 +0000, Andrew
wrote:

What !. There is nothing unstable about 'C'


Notice I used quotes in my original description

If you insist on using pointers that don't point to anything


But that's the point (pun not intended). C allows you to do such a
thing, and the program will compile. Perhaps modern day C compilers
are more robust than what I was used to (I last used C in earnest
about 5 years ago), but my experience was that the C compiler did not
automatically produce code that did runtime checking. Whereas pascal
(etc) from the same vintage did.

BTW, of all the languages of which I am familiar I think C is/was my
favourite - it was lean and mean. I never liked pascal that much,
never did figure how anyone could like having to write "begin" and
"end" in program constructs (much easier to use curly brackets - less
typing). Fortran is model 'T' Ford vintage. VB is bloatware. And C++
was overloaded (pun intended) with features - very useful most of
them, but my eyes glazed over a bit with some of the buzzwords like
polymorphism, overloading, etc. Nothing wrong with C++, just that it
wasn't for me really.

PoP

Sending email to my published email address isn't
guaranteed to reach me.
  #140   Report Post  
IMM
 
Posts: n/a
Default Digital set-top boxes (slightly O/T) - weak signal area.


"PoP" wrote in message
...
On Sun, 18 Jan 2004 22:40:28 +0000, Andrew
wrote:

What !. There is nothing unstable about 'C'


Notice I used quotes in my original description

If you insist on using pointers that don't point to anything


But that's the point (pun not intended). C allows you to do such a
thing, and the program will compile. Perhaps modern day C compilers
are more robust than what I was used to (I last used C in earnest
about 5 years ago), but my experience was that the C compiler did not
automatically produce code that did runtime checking. Whereas pascal
(etc) from the same vintage did.

BTW, of all the languages of which I am familiar I think C is/was my
favourite - it was lean and mean. I never liked pascal that much,
never did figure how anyone could like having to write "begin" and
"end" in program constructs (much easier to use curly brackets - less
typing).


A good editor puts all the ******** in your you, and in colour too.




---
--

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"