Welcome, Guest. Please login or register.

Author Topic: potential PPC Amiga REAL CHEAP  (Read 140446 times)

Description:

0 Members and 3 Guests are viewing this topic.

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: Time to celebrate!
« Reply #599 from previous page: February 01, 2006, 02:26:26 AM »
Quote


Case in point:

a = b++;  /* C/C++ code */

vs.

b += 1   ' VB.Net code
a = b

Back in the 80's when RAM was tight, it would make sense that your source code could only be so big...heck back then they wouldn't have even put the comments in.  The compiler will compile those code snippets the exact same way...why make it ugly?  Also if I had made it:

a = ++b;


Your two snippets are not equivalent. With the c code, you assign the value of b to a first then you add one to b.

Your vbcode adds one to b then assigns that value to a.

Before you start getting into arguments about language semantics, maybe you should learn the language first?


 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: Time to celebrate!
« Reply #600 on: February 01, 2006, 02:31:40 AM »
Quote

lou_dias wrote:
@koftloader,

LOL, now you stand here judging my scholastic ability.
I used to code 8502 assembly in '86 when I considered myself a "hacker" with my trusty 128D.  You can judge me all you want.  I've forgotten more things than kids with CIS degrees today know.

I don't have the patience for any of that stuff anymore.  I'm in my mid 30's.  I have a full-time job.  I have rental property to maintain.

I don't have time to study code for a hobby.  To write my own kernal.  I plain don't want to.  I leave that to the people who are already experts at it because one guy in his bedroom isn't going to re-invent the wheel.  Now given a nice IDE with a proper API for creating applications to do specific tasks that I need done or get paid to do - now that I have time for.


Again, the point i was making went completely over your head.
 

Offline DamageX

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
Re: Time to celebrate!
« Reply #601 on: February 01, 2006, 02:38:26 AM »
I majored in computer science for one semester. What I learned is that no matter my understanding of numbers and CPUs, I will never understand other programmers, and certainly not their source code.
 

Offline Louis DiasTopic starter

Re: Time to celebrate!
« Reply #602 on: February 01, 2006, 03:26:51 AM »
Quote

koaftder wrote:
Quote


Case in point:

a = b++;  /* C/C++ code */

vs.

b += 1   ' VB.Net code
a = b

Back in the 80's when RAM was tight, it would make sense that your source code could only be so big...heck back then they wouldn't have even put the comments in.  The compiler will compile those code snippets the exact same way...why make it ugly?  Also if I had made it:

a = ++b;


Your two snippets are not equivalent. With the c code, you assign the value of b to a first then you add one to b.

Your vbcode adds one to b then assigns that value to a.

Before you start getting into arguments about language semantics, maybe you should learn the language first?


Now others can possibly understand why C/C++ sucks arse.
Logic errors are easy to make and your own eyes can deceive you and your brain can play tricks on you with such a sublte and simple thing as where to put a ++.

When I write
b += 1
a = b

It's pretty hard to not figure out what's going on here.  Thanks for proving my point.  :-D
 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: Time to celebrate!
« Reply #603 on: February 01, 2006, 03:39:51 AM »
Quote

Now others can possibly understand why C/C++ sucks arse.
Logic errors are easy to make and your own eyes can deceive you and your brain can play tricks on you with such a sublte and simple thing as where to put a ++.

When I write
b += 1
a = b

It's pretty hard to not figure out what's going on here.  Thanks for proving my point.  :-D


The only point that was proved is that you dont know c.

The same types of logic errors can be made in your favorite language as well. And if you wanted to you could break up the statement into 2 lines of c like you did with your vb example. Your ignorance of the language does not make a valid argument as to whether or not it's obsolete.
 

Offline Louis DiasTopic starter

Re: Time to celebrate!
« Reply #604 on: February 01, 2006, 03:42:30 AM »
Quote

koaftder wrote:
Quote

Now others can possibly understand why C/C++ sucks arse.
Logic errors are easy to make and your own eyes can deceive you and your brain can play tricks on you with such a sublte and simple thing as where to put a ++.

When I write
b += 1
a = b

It's pretty hard to not figure out what's going on here.  Thanks for proving my point.  :-D


The only point that was proved is that you dont know c.

The same types of logic errors can be made in your favorite language as well. And if you wanted to you could break up the statement into 2 lines of c like you did with your vb example. Your ignorance of the language does not make a valid argument as to whether or not it's obsolete.


OK, so if I can break it up into the same 2 statements then why is it superior in C?

C saved space when that requirement was important.  It's not anymore...and it still requires those accursed semi-colons so when you break it up, it takes up more space in your source code file sizes...
 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: Time to celebrate!
« Reply #605 on: February 01, 2006, 03:56:42 AM »
Quote

lou_dias wrote:
Quote

koaftder wrote:
Quote

Now others can possibly understand why C/C++ sucks arse.
Logic errors are easy to make and your own eyes can deceive you and your brain can play tricks on you with such a sublte and simple thing as where to put a ++.

When I write
b += 1
a = b

It's pretty hard to not figure out what's going on here.  Thanks for proving my point.  :-D


The only point that was proved is that you dont know c.

The same types of logic errors can be made in your favorite language as well. And if you wanted to you could break up the statement into 2 lines of c like you did with your vb example. Your ignorance of the language does not make a valid argument as to whether or not it's obsolete.


OK, so if I can break it up into the same 2 statements then why is it superior in C?

C saved space when that requirement was important.  It's not anymore...and it still requires those accursed semi-colons so when you break it up, it takes up more space in your source code file sizes...


It's not superior, honestly, it doesnt matter. The modern c programmer is not concerned with the size of his source files. But, for most people who know the language, a=++b; just aint a big deal, we all know whats going on there.

And with the semicolon thing, who cares? Makes it easy to break up a long line into multiple ones. I dont hear you complaining that python figures out scope by looking at tabs. You can break up long lines too, via another method, its the _ character isnt it? Who cares? Are you really so bothered by a ; or that you have the option to say a=++b; instead of b++;a=b; ? Why not compain about php and the '=' '==' & '===' operators as well? What language doesnt have something in it that some people find strange? Why not compain about forth and how you have to pass parameters on the stack your self unlike other languages which do this for you behind the scenes?

Lets complain about and tell the world it's '06 and we need to move on? Do you compain about flathead screwdrivers not being good for unscrewing torx screws? My original point was analise the situation, use the right tool for the job. Some times vb.net is the right tool, some times it's c, sometimes it's assembler or php or perl or lua or ruby or objC or java or vbscript or fortran or lisp or ada or smalltalk or ....

 

Offline adolescent

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 3056
    • Show only replies by adolescent
Re: Time to celebrate!
« Reply #606 on: February 01, 2006, 05:34:36 AM »
What came first, the interpreted language, or the interpreter?  :-D

Just saying, you can't have .NET without C/C++.  (Ok, technically, they're not interpreted, but compiled to intermediate code and run via the framework, but what do you think the framework was coded in?)
Time to move on.  Bye Amiga.org.  :(
 

Offline justthatgood

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 579
  • Country: us
    • Show only replies by justthatgood
Re: Time to celebrate!
« Reply #607 on: February 01, 2006, 08:29:55 AM »
@koaftder

Which to me in the case of any device that would have a less then ideal system bus, and a paltry amount of memory, it would be C/C++. Err, or you could use Forth, Sy, Python, REBOL, etc...  (I remember loved Atari Pilot and LOGO)
[color=008000]Pluto[/color]:Amiga4KD- 64040/16megs/1GB WD/PAR 2150/1942/WB3.0,3.1,3.9
[color=800080]Amanda[/color]:Amiga2KHD/A2620/8MegSupraRam2k/A2091/VLab
 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: Time to celebrate!
« Reply #608 on: February 01, 2006, 08:46:18 AM »
Quote

justthatgood wrote:
@koaftder

Which to me in the case of any device that would have a less then ideal system bus, and a paltry amount of memory, it would be C/C++. Err, or you could use Forth, Sy, Python, REBOL, etc...  (I remember loved Atari Pilot and LOGO)


64kb flash in code segment, 8 bit micro @ 16MHz, 2kb ram. Seems pretty limited, but you can do an awful lot with it. I considered forth ( i like forth ) but couldnt go with it for a number of reasons, mainly because nobody is familiar with the language, so code reviews would be really slow. If i left they would have to find a forth guy, which could be hard, and he's probably going to be more expensive than an average c guy.

 

Offline uncharted

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1520
    • Show only replies by uncharted
Re: Time to celebrate!
« Reply #609 on: February 01, 2006, 09:22:20 AM »
Hah!

REAL MEN program in Haskell!

Loops and variables are for girls!  :lol:
 

Offline justthatgood

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 579
  • Country: us
    • Show only replies by justthatgood
Re: Time to celebrate!
« Reply #610 on: February 01, 2006, 10:12:22 AM »
But Forth has been used in the firmware of a lot of microsystems, Apples and Sun systems I know of.  Lots of embedded system goodness.

Eeks, we just need to get good code to run our stuff with as little overhead as possible, not dig into liner second order homogeneous equations with constant cofficients and stuff.

 :roll: Some people get too excited about differential equations, and it scares me.  That's why you catch hardcore geeks and NASA workers in the bathroom with MIT and other technology journals (oh yes, you are a bad bad polynomial with a bad set of  parabolas)
[color=008000]Pluto[/color]:Amiga4KD- 64040/16megs/1GB WD/PAR 2150/1942/WB3.0,3.1,3.9
[color=800080]Amanda[/color]:Amiga2KHD/A2620/8MegSupraRam2k/A2091/VLab
 

Offline Waccoon

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 1057
    • Show only replies by Waccoon
Re: Time to celebrate!
« Reply #611 on: February 01, 2006, 10:40:48 AM »
Quote
DamageX:  I majored in computer science for one semester. What I learned is that no matter my understanding of numbers and CPUs, I will never understand other programmers, and certainly not their source code.

Most programmers seem more interested in saving themselves some typing than doing things properly.  For the best example of this, try looking at almost any random Perl script.  Regex was never meant to be used in such ghastly ways, but since Perl doesn't really support functions, I suppose you have to use what's available.

Quote
Lou:  Now others can possibly understand why C/C++ sucks arse.

I agree that C/C++ is too low-level for most things these days, but criticizing the syntax is hardly helpful.  There's nothing wrong with a=b++ if you know what you are doing, and actually use better variable names than "a" and "b".

A better example:  strings.  Why do we still use arrays of characters in C?  Because C progammers are professionals, and are not stupid enough to do things that will result in gobs of buffer overflows, of course!  If one occurs, we can just blame Windows, because everyone knows that buffer overflows don't happen in Linux.

I've heard similar arguments to support SimbianOS.  Who cares if it's complicated and requires lots of manual low-level control?  The coders are good enough to handle it!

Quote
Lou:  b += 1

Er, C supports this operator.  It might be more useful to complain about something C can't actually do.  ;-)

Quote
C saved space when that requirement was important. It's not anymore...and it still requires those accursed semi-colons so when you break it up, it takes up more space in your source code file sizes...

What's wrong with spacing out your code?

Of course, the size of source code is a terrible thing, considering that it doesn't really affect the size of the compiled program.  :-)

Gee wiz, I notice people are still using spaces instead of tabs to indent their lines.  Do they care that all those spaces add to the file length?  Nah, if they run out of space on their 160GB hard drive, they can always just trim off a comment or two.

Oh yeah, and having to write everything on one line is not an advantage.  I can't even stand to look at any BASIC descendent since I gave up on AMOS and learned a *real* language.  VisualBasic looks so archaic for a high-level language.

Quote
adolescent:  What came first, the interpreted language, or the interpreter?

They were both shipped 6 months late.

Seriously, I find it unfortunate that "old" language are left to rot while people put all the development time into newfangled OOP languages that still don't put logic ahead of syntax and less typing.  The world really could use a good, modern procedural language.  As a person who isn't that fond of OOP, I'm tired of seeing such languages get all the cool features.
 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: Time to celebrate!
« Reply #612 on: February 01, 2006, 11:06:52 AM »
blah blah blah. A thread started about amigaOS on nintendo, morphed into a retarded discussion about language a vs language b.

The language itself is just a tool. Being skilled at writing software has less to do with language, and almost everything to do with design. It all boils down to math, and languages are just ways to express the algorithms. Languages just provide different ways to express the design. To argue one language over the other without any substantial reason is just proving to the world that you dont actually have a clue.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Time to celebrate!
« Reply #613 on: February 01, 2006, 11:24:09 AM »
@lou_dias

I think you misread my post. I am not writing C++ for my current employer, is said that if you think C++ is too a maintenance headache for buisness use then the places you have found this to be true are obviously worse then where I work ;-)

For the record, I typically use C/C++/asm in my own coding projects. At work, it's all web related stuff using PHP/MySQL/JS/Java.

Anyway, obvious flaw about it not being used, I seem to recall that buisness has a lot of heavy use of C/C++. The operating systems and appliations themselves for starters :-P

So far you have not raised a single genuine reason to substantiate your claim that the lanaguage sucks.

If you have code that crashes because you instansiate something, better look into the constructor to see if something failed rather than just blame the language. After all, the language specifies that you can't return an error from a constructor, and in any non trivial (ie resource allocating) class, something might fail. You could wrap it in an exception handler, of course, and catch the problem that way. Or better still, use a factory or builder pattern to creare objects. This can guarentee they are properly constructed before returning them.

Code doesn't have to be unsafe if you know how the language works. As someone else pointed out, char* is fine in the hands of people that know exactly how it works and don't try to misuse it. If you need more, you could use std::string...

Anyway I seem to have totally lost what this had to do with GC :-D
int p; // A
 

Offline Louis DiasTopic starter

Re: Time to celebrate!
« Reply #614 on: February 01, 2006, 01:00:05 PM »
Yes, I know most OS's are written in C and that means C is in the business world - but it's not.  The OS is in the business world and is not maintained by each individual customer.  The OS is an end product.  C/C++ is just not the dominant language in the IT world when companies need quick applications or reports.

Well, the fact that I don't like C is why I'm waiting for someone else to get an OS running on the GC vs. me doing it myself.

I realize games development is done in C/C++ but I'm not games developer and neither are most of you.

@Waccoon
I wasn't trying to look cool by using  b+=1 vs. b=b+1, just pointing out there's less chance of a logic error when the code is split up with one function per line.  It's easier to debug.

@koftldr
Basic has the ':' incase I want to put 2 commands on one like.  I still don't want to put 2 commands on one like.  That's the point.  C was made to be small.
then there's:
{
 {
  {
}
}
}

I mean it's just a fugly language that makes for poor readability and prone to bad indexing, illegal referencing and logic errors.

That's why C/C++ sucks.
I never said it isn't capable of doing anything.  Just that degugging it and maintaining it is harder - that's the disadvantage.  Compilers will compile ideally.  The language it irrelevant, so it might as well be easy to read and use