Welcome, Guest. Please login or register.

Author Topic: Learning C with the Amiga  (Read 32581 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« on: January 25, 2007, 09:43:45 PM »
@Mel

I have the complete set of RKRM's, each book released in each edition.

I don't use them at all these days, I could lend them to you if you promise to take good care of them.
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #1 on: January 29, 2007, 08:27:19 PM »
Quote

mel_zoom wrote:
Hi!

Wow so many ways to start a program in C! I think Ill stick with the basic "int main(int argc, char** argv)" one for now.


Basic?  Shh, you´ll wake the VB dragon. ;-)

int main(void) {} is the basic way anyhow. :-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #2 on: February 08, 2007, 12:09:49 AM »
Quote
C is a language designed for low-memory machines because that's all they had when it was designed.


That´s not strictly true Lou, C is a language designed for control freaks.

[Purely my opinion]
Programmers that are not control freaks, are not very good programmers.
[/Purely my opinion]

ps I use a RAD tool you will never have heard of, and it is far more abstracted than VB.NET even.  I love it, and very rarely use anything else for commercial work but I still say C is God´s own language. ;-)

C++ is just a ¨bida¨ Karlos! :-P
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #3 on: February 08, 2007, 12:33:54 AM »
Quote

Karlos wrote:
Quote

CannonFodder wrote:

C++ is just a ¨bida¨ Karlos! :-P


Yes, a bloody good one too! All the control (and more) you get in C with a thousand times the finesse.


C++ is the Shia to Islam´s C? ;-)


/me runs very very fast!!
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #4 on: February 08, 2007, 11:19:21 AM »
Quote
The knowledge that Mel gains from learning C will be transferable to almost any other mainstream (where mainstream means a language you're likely to encounter in business)


That´s not strictly true in every case, but is a decent enough generalization. ;-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #5 on: February 08, 2007, 11:29:36 AM »
Quote

Karlos wrote:
Quote

CannonFodder wrote:

C++ is the Shia to Islam´s C? ;-)


/me runs very very fast!!


No. C++ was the final revelation that perfected the language. C itself is more like your Torah/Gospel :-P

/surreal


Touche!

So Objective-C is more the Shia then?  Or would that be AmigaE? ;-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #6 on: February 09, 2007, 12:07:40 AM »
Quote

falemagn wrote:
Quote

Your take on C seems a lot like my wife's -- she regards the code as self-documenting, and considers comments to be a distraction. I have a different view, probably colored by my experience with IBM System/370 Assembler. I'd much rather read comments, to know what the programmer meant to do, than play computer and try to execute the code in my head.


I gotta agree with your wife there. The point is, you can write code that is self-documenting without requiring you to "play computer".

C is a language, English is a language too, but C is better at concisely expressing what in English would require verbose sentences.
Code: [Select]

/* Defines an integer variable named 'a' and assigns it the value 2 */
int a = 2;

Yes, it's quite an extreme example, but shows the point.

The only things that require comments are algorithms, but the more self-documenting code you are able to write, the better.


IMNSHO comments should clearly (and only) state the ¨why¨, the code itself should clearly state the ¨what¨ and the ¨how¨.

YMMV :-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #7 on: February 09, 2007, 07:39:49 PM »
Quote

mel_zoom wrote:
Hyperspeed:

"Mel: Are you Karlos' secretary?"

No. Is that the only IT role you can imagine a woman working in?

"Why does your Mazda link take me to a mammogram page?"

It isnt a Mazda link, its a link to a page that generates advertising money from your visits that in turn is used to provide free mammograms for those less well off. There are several other good causes on the same site that you can click on too.


In which country?

Mammograms are free in most ¨1st world¨ countries.
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #8 on: February 09, 2007, 07:58:27 PM »
Quote

lou_dias wrote:
In that case, the USA is not a 1st world country.
Healthcare costs are quite a political debate around here. :(


This is way OT, but ¨It is un-American to have communist healthcare¨
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #9 on: February 13, 2007, 08:51:37 PM »
Quote

lou_dias wrote:
Ok, I've written code that parses a file and replaces one text/byte(s) code with another.  Now in VB6, you can read a 2MB file into a string, in memory, and doing a simple replace all at once and then writing over the old file was much faster than the traditional line by line method of drilling through the file, while writing to another followed by the delete of the old one and rename of the new to match the old.

It came in handy when converting large .CSV files with lines terminated with CR to CR/LF and vice versa.

File access is slow compared to memory access, hence having the entire file in memory was ideal and VB's "Replace" command allows you to use any sequence of bytes.  It's not just limited to 7 bit ascii.

This turned a batch processing job of many large files into one that went from taking over an hour to taking just several minutes.


Why use VB to do the job of PL/SQL(T-SQL etc)?

Anyway, isn't this thread supposed to be about learning C?  What point are you trying to achieve by spamming it with off topic crap about how superior VB is?

Start another thread and discuss it there.
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #10 on: February 13, 2007, 09:27:28 PM »
Quote

mel_zoom wrote:
cannonfodder:

Perhaps he is trying to tempt me into VB coding :-)


Well if we are all playing that game.  Learn PL/SQL, you'll get paid more. ;-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #11 on: February 13, 2007, 09:34:57 PM »
Quote

mel_zoom wrote:
Nobody seems to get this. Im learning for my own interests, to be better qualified to deal with some of the technical jibber jabber I come across in my work and most of all - for fun!

A lot of SQL is used where I currently work - several implementations used across a range of systems. The one thing they all have in common is that they are overwhelmingly boring!


Shall I start another thread?

"Why PL/SQL is not boring" ;-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #12 on: February 13, 2007, 09:38:50 PM »
Quote

mel_zoom wrote:
If you must. I am thinking I will have to start a new thread if I want to ask questions about C coding. This one seems to have gone off all by itself :lol:


What books have you got to read so far?
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #13 on: February 13, 2007, 10:06:05 PM »
Well, I have these Amiga specific "beginners" C books:-

Lattice C Compiler for Amiga Volume 1 (Users Guide, Utilities, Commands, Editor + Disks) (Ring-bound in hard plastic folder)

Lattice C Compiler for Amiga Volume 2 (Debugger, Library Reference, Master Index + Disks) (Ring-bound in hard plastic folder)

The Amiga DOS Manual 2n Edition (Considered the unoffical RKRM) (Ring-bound book)

Lattice AmigaDOS C Compiler: Programmers Reference Manual

All of them are yours if you want them, just make me an offer.

I must add I have a craving for spicey foods too, and can be bribed quite easily with a good curry.

I'm free this Saturday and will be in the north too. ;-)
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)
 

Offline CannonFodder

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 1115
    • Show all replies
Re: Learning C with the Amiga
« Reply #14 on: February 14, 2007, 01:17:56 AM »
Quote

lou_dias wrote:
Quote

CannonFodder wrote:

Why use VB to do the job of PL/SQL(T-SQL etc)?

Anyway, isn't this thread supposed to be about learning C?  What point are you trying to achieve by spamming it with off topic crap about how superior VB is?

Start another thread and discuss it there.


Stop being ignorant, I was giving Karlos an example where string concacting becomes useful and saves time.


Except you didn't.

Can we stick to actually helping Mel now?
People are hostile to what they do not understand - Imam Ali ibn Abi Talib(AS)