Noobs use C, real programmers use Basic

Discuss Demos / Games / Applications written by Atari coders

Moderators: Mug UK, Silver Surfer, Moderator Team

User avatar
shoggoth
Nature
Nature
Posts: 952
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Noobs use C, real programmers use Basic

Postby shoggoth » Sun Feb 25, 2018 10:00 pm

Ain't no space like PeP-space.

mikro
Hardware Guru
Hardware Guru
Posts: 1785
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Noobs use C, real programmers use Basic

Postby mikro » Sun Feb 25, 2018 11:09 pm

mrbombermillzy wrote:I never got used to heavy C++ OO programming and find thinking like the machine (i.e. Assembler) easier!

Well, let's talk about this when your assembly code reaches, say, 15 000 lines of code and more. There's a hard limit after which you simply loose control. That is what makes structured / OOP / whatever programming infinitely better because you have a scope. As soon as you can trust one module, you can move on and not to worry whether you overwrite that array with obscure and hard to remember name.

I'm not saying you can't have a structured assembly code but as Jo says, it's much much harder and "thinking like the machine" doesn't really help here (unless you have also a machine-precise memory :))

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Noobs use C, real programmers use Basic

Postby charles » Mon Feb 26, 2018 12:29 am

I love this monty python stuff

why participate in this flame thread.....

its not even directed at one exact c and one exact basic . too open ended

why defend whats not there?
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Noobs use C, real programmers use Basic

Postby Foxie » Mon Feb 26, 2018 4:21 am

mikro wrote:Well, let's talk about this when your assembly code reaches, say, 15 000 lines of code and more. There's a hard limit after which you simply loose control. That is what makes structured / OOP / whatever programming infinitely better because you have a scope. As soon as you can trust one module, you can move on and not to worry whether you overwrite that array with obscure and hard to remember name.


It does depend what you mean by object orientation, but it's possible to do some pretty OO stuff in assembly language. I use structs all the time in assembly, and if you have a group of subroutines for manipulating a struct (including allocating / destroying data structures) then you really have the beginnings of OO. I usually try to keep interfaces to assembly modules well-defined and as clean as possible.

One potential hiccup is that TOS seems to have a limit of about ~200 allocated memory blocks. That makes allocating lots of small objects inefficient. You can work around that with your own memory allocator of course.

Of course it's also possible to write typical spaghetti code in assembly, but that doesn't mean you have to. There are also some advantages in assembly compared to C with handling functions/subroutines. In assembly, it's very tidy to return multiple values in the registers. In C, it's a mess with passing in pointers. You can also return from a subroutine in assembly with the flags set. That can avoid the typical headaches in C where you have to assign a special return code for some situations, like -1 for error. As far as I recall, this was the reason for the 2GB limit in AmigaOS - they return a negative value on failure from the allocation function.

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: Noobs use C, real programmers use Basic

Postby thomas3 » Mon Feb 26, 2018 7:54 am

Foxie wrote:
mikro wrote:Well, let's talk about this when your assembly code reaches, say, 15 000 lines of code and more. There's a hard limit after which you simply loose control. That is what makes structured / OOP / whatever programming infinitely better because you have a scope. As soon as you can trust one module, you can move on and not to worry whether you overwrite that array with obscure and hard to remember name.


It does depend what you mean by object orientation, but it's possible to do some pretty OO stuff in assembly language. I use structs all the time in assembly, and if you have a group of subroutines for manipulating a struct (including allocating / destroying data structures) then you really have the beginnings of OO. I usually try to keep interfaces to assembly modules well-defined and as clean as possible.


Well, I guess technically you *can* build a house out of sand and water. It's just that bricks are a darned sight easier ;)

User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2250
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Noobs use C, real programmers use Basic

Postby calimero » Mon Feb 26, 2018 12:54 pm

thomas3 wrote:
Foxie wrote:It does depend what you mean by object orientation, but it's possible to do some pretty OO stuff in assembly language. I use structs all the time in assembly, and if you have a group of subroutines for manipulating a struct (including allocating / destroying data structures) then you really have the beginnings of OO. I usually try to keep interfaces to assembly modules well-defined and as clean as possible.


Well, I guess technically you *can* build a house out of sand and water. It's just that bricks are a darned sight easier ;)


say again :D

Image
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

joska
Hardware Guru
Hardware Guru
Posts: 4187
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Noobs use C, real programmers use Basic

Postby joska » Mon Feb 26, 2018 8:25 pm

I'm sure the builders of Burj Khalifa chose the most suitable tools and materials. However, lots of people are building structures using nothing but hand tools and old construction techniques. Not because they are the best and easiest, but just because they enjoy the process and the character of the result.

grindbygg.jpg


Pretty much the same as we do when we're making stuff for and/or with our old computers :) If you enjoy BASIC, then use BASIC. If you enjoy assembler, then use assembler. No other reason is needed. However, if you just want the most suitable and efficient tool then C would beat BASIC (classic, not modern stuff like VB.Net) in most circumstances.

Of course, if you want the most suitable and efficient tool then you're probably don't have an ST either ;)
You do not have the required permissions to view the files attached to this post.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
edingacic
Captain Atari
Captain Atari
Posts: 257
Joined: Mon Sep 07, 2015 5:16 pm
Location: Austria
Contact:

Re: Noobs use C, real programmers use Basic

Postby edingacic » Mon Feb 26, 2018 8:39 pm

I am waiting for new programs where are they? :)

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Tue Mar 06, 2018 4:16 pm

since you asked nicely
You do not have the required permissions to view the files attached to this post.

User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2514
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: Noobs use C, real programmers use Basic

Postby spiny » Tue Mar 06, 2018 5:18 pm

MrPixel wrote:since you asked nicely



in case anyone else is having problems with this, it appears to be a Comodore Pet emulator snapshot, which contains the following listing:

Screenshot 2018-03-06 17.16.35.png
You do not have the required permissions to view the files attached to this post.

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: Noobs use C, real programmers use Basic

Postby thomas3 » Tue Mar 06, 2018 9:58 pm

There should be more comedy written in BASIC...

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Tue Mar 06, 2018 10:13 pm

did it work? i tried my best but WinVice is unwilling to save anything as a rom

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: Noobs use C, real programmers use Basic

Postby thomas3 » Wed Mar 07, 2018 12:16 am

It's all fine, except for line 10.

Line 66 is a classic.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Noobs use C, real programmers use Basic

Postby charles » Wed Mar 07, 2018 12:18 am

whats the purpose or intend of this topic?
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Wed Mar 07, 2018 1:04 am

to show how basic is superior to C. anyway, can i save a program to zip somehow? is there an outside extension?

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Wed Mar 07, 2018 3:33 am

charles wrote:I love this monty python stuff

why participate in this flame thread.....

its not even directed at one exact c and one exact basic . too open ended

why defend whats not there?


i never meant it as a flame thread, and am somewhat offended that you think it has become this. i meant it as a comparison of C-C++ in comparison to BASIC, as in two different dialects: Commodore and Atari

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: Noobs use C, real programmers use Basic

Postby thomas3 » Wed Mar 07, 2018 11:00 pm

Let me mix things up here.

What's best - LOGO on the BBC Micro, or hole punching on the IBM 1620?

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Noobs use C, real programmers use Basic

Postby charles » Thu Mar 08, 2018 12:06 am

im certain there are unexplored areas of both dialect
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Thu Mar 08, 2018 2:11 am

thomas3 wrote:Let me mix things up here.

What's best - LOGO on the BBC Micro, or hole punching on the IBM 1620?


the answer is obvious, though i admit some people may have nostalgia for the 1620. i remember Romero having to use the exact same thing when he started out programming, way before doom. never understood how it worked, yet who am i to question the 80's?

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Thu Mar 08, 2018 2:45 am

what is your view?

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: Noobs use C, real programmers use Basic

Postby thomas3 » Thu Mar 08, 2018 9:46 am

MrPixel wrote:what is your view?


Well, to be honest, I think that programming my central heating system is superior to all of the above.

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: Noobs use C, real programmers use Basic

Postby nobox » Thu Mar 08, 2018 10:24 am

Reel programmers are using the imagination force of their minds to change the universe ...

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Thu Mar 08, 2018 7:23 pm

i actually have a bit of an issue. how do you delete a post?

User avatar
Mug UK
Administrator
Administrator
Posts: 11354
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Re: Noobs use C, real programmers use Basic

Postby Mug UK » Thu Mar 08, 2018 7:41 pm

MrPixel wrote:i actually have a bit of an issue. how do you delete a post?


A single post inside a thread, click the X in the top-right of each post that you want to remove.

Deleting a whole thread needs to be done by asking one of the moderators/admin.
My main site: http://www.mug-uk.co.uk - slowly digging up the bits from my past (and re-working a few): Atari ST, Sega 8-bit (game hacks) and NDS (Music ripping guide).

I develop a free Word (for Windows) add-in that's available for Word 2007 upwards. It's a fix-it toolbox that will allow power Word users to fix document errors. You can find it at: http://www.mikestoolbox.co.uk

MrPixel
Captain Atari
Captain Atari
Posts: 191
Joined: Mon Jan 08, 2018 4:31 am

Re: Noobs use C, real programmers use Basic

Postby MrPixel » Thu Mar 08, 2018 9:35 pm

if i were to ask the mods, what item would i put it under?


Social Media

     

Return to “Non Atari Platforms”

Who is online

Users browsing this forum: No registered users and 2 guests