Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
97 user(s) are online (78 user(s) are browsing Forums)

Members: 0
Guests: 97

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 3 (4) 5 6 7 ... 9 »
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Daedalus
I'm fairly sure I remember reading the author of Worms disabusing people of the notion that it was written in Blitz Basic (or AMOS), saying only that the original prototype (apparently called Total Wormage according to Wikipedia) was written in it.

I am also very skeptical that Gloom was written in Blitz Basic - there is no way you could achieve 3D texture mapping (it would need to be written using optimised assembler).

OTOH, I can quite believe that *level editors* for Gloom were originally written using Blitz Basic. Same goes for Worms I guess.

Author of the PortablE programming language.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Not too shy to talk
Not too shy to talk


See User information
@ChrisH

Hmmm... That's interesting, cos I'm pretty sure there's a Blitz mention in the credits - though I'll have to check that out. It's possible I guess that the original Total Wormage was in Amos/assembler or whatever, but wasn't Worms the result of a Blitz Basic programming competition? I guess he could have rewritten it from Amos to Blitz for the competition...

Thing is, that Blitz has the inline assembler too, meaning that menus, file access and other non-critical parts can be written in Basic, then you can switch in and out of assembler for the time-critical parts. There's no reason it couldn't be done under Blitz, though I'll admit on Gloom that I'm only going on vague memories...

Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@jahc Quote:
Thats his problem. He expects to know how to use a language without learning it first. It's so stupid. I give up. No more advice from me ever. He's a lost cause.

While Athiest's reactions are a bit extreme (and inflexible), I can at least understand his early impressions:

C does look like a horrid language! However, unlike Athiest, that did not stop me from learning it - and there is certainly something to be said for it's own peculiar simplicity (as long as you treat it as little more than a High Level Assembler, as it was originally intended).

C++ also looks like a horrid language, and after some time trying to use it I came to the conclusion that it WAS a horrid language . However, again, that did not stop me learning the basics of C++ in the first place.


Continuing on this theme of first impressions vs what it is actually like:

ARexx actually looks like quite a nice language, but after some time programming in it I concluded that it was not suitable for large (or even medium) sized programs - most probably because it shares too many of BASIC's flaws.

Pascal also looks like quite a nice language, and has some really nice features, but as it was originally designed for teaching programming (rather than actual use) it has a few incredibly stupid restrictions that render it unusable IMHO. (It is possible that these restrictions have been removed in "modern" Pascal, but that wasn't the version I got to try at University maybe 10 years ago.)

AmigaE is the only language I've found for the Amiga which looks nice initially AND is actually nice to use (barring a few small-ish limitations that I have since removed using PortablE).


I did actually start using Blitz Basic before trying AmigaE, but I found it (or was it the editor?) quite crash prone so I quickly gave up. Presumably that has since been fixed.

Before that I had been using AMOS Pro v1.0, which looks nice, but I found some parts to be incredibly buggy (I understand this was eventually fixed by v2 or something), and so eventually gave that up too.


In summary: Don't be fooled by the looks of a language, because this has little relationship to what a language is actually like to use. The only real way to know is to learn the basics and USE it. Learning different programming languages (and how they do things) will also make you a better programmer.

Author of the PortablE programming language.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Just popping in
Just popping in


See User information
About the BlitzBasic thing:

BlitzBasic, now Amiblitz3, is way to huge to make a statement like "Amiblitz3 is slow/fast/hardware banging/system conform etc.".

It all depends what you do and how you do it.

Anything that can be written in C or ASM can be written in Amiblitz too. I think a good hint about any programming language is to look at what Projects have been done already and how powerful they are. Of course C out-perfromes all, since this is the most common language on Amiga.

But here are some random screenshots of projects of mine (one person, job, family) in Amiblitz3, to show off a bit what's possible (there is much more, but I dont want to bother you loading even more GFX, sorry for the huge pics). Try to do this in other languages in your spare time, or shut up blaming Amiblitz for being slow/lame/hardware banging/complicated/buggy/worse than language <xyz>.

HD-Rec (System friendly, speed critical)
http://www.hd-rec.de/HD-Rec/pics/screenshots/hdrec_spectrum.png

VoxelEngine with post-effect
http://www.amiforce.de/screenshots/test_blur2.jpg

VoxelEngine...
http://www.hd-rec.de/pics/_mirror.jpg

MapEdit (MapEditor, system friendly)
http://www.hd-rec.de/pics/EE_shot.jpg

NTUI Toolkit (system friendly)
http://www.hd-rec.de/pics/ntuistatus6.png

AHI Audio Player with skin GUI (system friendly)
http://www.hd-rec.de/pics/TKPlayerSkins.png

Toadies, Worms Clone, hardware banging
http://www.hd-rec.de/pics/Toadies_Rocks1.png
http://www.hd-rec.de/pics/Toadies_Cheeseland.png
http://www.hd-rec.de/pics/Toadies_Choclate2.png

Edit: Please do not post large images in the forum, they tend to mess up the forum layout.


Edited by orgin on 2009/1/13 18:28:19
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Just popping in
Just popping in


See User information
@Atheist

The basic C is the same, but there are some OS4 specific stuff that changed in between, making "blind-copying" the examples a bad experience.

My advice would be:
1-read a book
2-if you can afford, enlist a live course
3-after getting the ropes, you can gather info from the net

Having said this, I'm NOT a coder, bu any means. Just starting out and facing major stumbling blocks, especially free time. C is very demanding in this respect, unlike BASIC, that I learned in a few days, when I was younger.

Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Just popping in
Just popping in


See User information
@Chris

Every variable needs to be declared in C, which was not the case in BASIC, for example.
But the major confusion is clearly handling pointers.

Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Quite a regular
Quite a regular


See User information
Quote:
Hi ChrisH wrote:

The E equivalent is:

number := 5

Although if you have not declared "number" before, then you need to put this at the start of your procedure:

DEF number

Hi ChrisH,

I have to apologize, but, I'm stupid. (jahc is determined to believe that about me so I'll oblige him.)

I appreciate that you did take the time to explain these, as you put it, off the deep end of the programming pool examples.

Now I'd like to say this, I know from experience that that is NOT sufficient for me to be able to use that command, as your answer is in fact incomplete. You see, I'm stuck in the "monkey see, monkey do" class of person.

Now, is it possible to get the full use of that command because

DEF number
number := 5

is inadeaquate.

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Hans

Quote:
Basic/Amos looks "intuitive" to you because you're used to it, but it is actually a poor programming language when compared to modern ones.


I spend most of my time in Basic, until I switched to C.
I most say some thing about difference in tow languages.

Baisc is a safe language, all commands provided have some kind of error handler, hard to crash, easy to debug, but is limited to tiny subset of commands provided whit basic dialect, and if there is bugs or problems whit the language there is nothing you can do about it, its slow compared to C and other languages because does not give the developer any way to optimize there code, there are many dialects of basic its not always easy to take one source code and make work on Linux and AmigaOS.

C is a bit more low level, it?s designed to be easy to write complex programs, its reads and writes directly to memory, and developer most take responsibility for memory usage, if you do some thing wrong the operating system might crash, you have full access to any OS library?s, so its easy to take advantage of new features in the OS, there are more syntaxes in the language, but this most not be confused as being harder to understand, C is an universal language, and there exists standard commands in glibc or newlib, so you can write one program that will work on Windows, Linux and AmigaOS.

In many cases Basic will do what you need for application development, because it?s easy to debug, and because commands provided are easier to use, there are better examples and documentations and it takes where little time to make a program, but often Basic is too slow, often the language will restrict you in some way, and it?s impossible to write a system libraries or devices in Basic.

C programs are better because the operating system is written in that language, so when you need 64bit DOS support or 64bit file system support, maybe there some new Reaction classes, or some MiniGL commands or some thing and Basic does not support what your tiring to do, then there you have no choice, maybe you found cool program written for Linux you like to rewrite so supports AmigaOS4.x.

As I?m trying to point out is there are disadvantages and advantages to Basic and C.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Atheist

Quote:
how would I go about saying the variable "number" is now "5"?


Provided you write good basic code it more work.

Virtual Basic example:

Rem number is of type integer
Dim number as integer
Rem set number to 5
number = 5

C example:

// number is of type integer
Int number;
// set number to 5
number = 5;

Or if you like the short version:

// Number is of type integer and is default to number 5.
Int number=5;

C requires you to define type of variables; basic does not but if you don?t Virtual Basic programs get slower, if you do define variables in Basic you well not get warning if your destination variables is too small hold number, but under C you will get warnings like that.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Atheist Quote:
Now, is it possible to get the full use of that command because

DEF number
number := 5

is inadeaquate.

I'm not 100% sure what you are asking, but *if* you are asking for a COMPLETE program (rather than just a fragment of one), then this is what you would use:

PROC main()
DEF number
number := 5
ENDPROC


In other words, any code you write must be after a PROC line and before an ENDPROC line. This means that the code is always stored inside a "procedure" (i.e. PROCedure). Procedures are simply a way to group related code together, and give it a meaningful label.

E is like C in that the procedure called "main" is automatically run when your program is started. If you wish any other procedures to run, then you have to call them yourself. Look here if you want Jason Hulance's explanation.

Most vaguely modern programming languages work in a similar fashion to this, so you need to get use to it.


I suggest downloading & installing the AmigaE demo (the full version is now free too), as this is the SIMPLEST way to get started with E. You can try getting to grips with PortablE later. Once it is correctly installed, put the above program into a text file. You can call it anything you like, as long as it ends with ".e" , so "test.e" would be fine.

Then you can compile it by typing this in the Shell:
EC test.e

Then you can run the compiled program by typing this:
test

As you can see, this is somewhat simpler than C requires, although still a little more involved than AMOS.


Of course, this program will not visibly do anything. So I suggest adding the following line before ENDPROC:
PrintF('number = \d\n', number)


Edited by ChrisH on 2009/1/13 18:43:45
Author of the PortablE programming language.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Just popping in
Just popping in


See User information
@LiveForIt

... I can add the following examples

--- LUA ---
number = 5

--- Hollywood ---
number = 5

In Hollywood you can force <number> to be globally or locally declared with:

Global number = 5
or
Local number = 5



In these languages type have not to be declared, you can have:
number = 5 ; <--- numeric type
number = "five" ; <--- string type
number = { "one", "two", 3, 4, "five" } ; <--- table of mixed types

Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Atheist

a working C program for setting value to 5, and display it.

Quote:

/* program should always start whit this two lines. */
#include <stdlib.h>
#include <stdio.h>

/* C requires the program code to be inside a function, main is where the program starts. */
Int main()
{
/* value is of type signed integer (negative and positive values)*/
int value;
/* value is set to 5 */
value=5;
/* formatted print, '%d' is replaced by a decimal value, ?\n? equals ?new line? */
printf(?value is %d\n?,value);
}


save the file as my_prog.c

To compile the program you type this in shell

Stack 500000
gcc my_prog.c ?o my_prog.exe

to start the program type:

Prog.exe

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Allanon

Quote:

In Hollywood you can force <number> to be globally or locally declared with:

Global number = 5
or
Local number = 5


If you declare a variable outside a function it?s a global variable in C.
If you declare it inside a function it?s a local variable.

Quote:

// var is global
int var;

Int main()
{
// var is local
int local_var;
}



Your example:

Quote:

number = 5 ; <--- numeric type
number = "five" ; <--- string type
number = { "one", "two", 3, 4, "five" } ; <--- table of mixed types


C does not allow you to change types, but you can do it anyway.

ULONG number;
number = 5;
number = (ULONG) ?five?; // ask address of ?five? to become a unsigned long value.

I don?t know what you?re trying to do whit the last line; I think a structure might be better.
A structure is a way to group variables.

Struct
{
char *str1;
char *str2;
int value1;
int value2;
char *str3;
} my_value_type;

struct my_value_type my_values={ "one", "two", 3, 4, "five" };

printf(? string 2 = %s\n?,my_values.str2);
printf(? value 1 = %d\n?,my_values.value1);

If you need a table of grouped variables you can do that like this:

struct my_value_type my_values[50];

Let?s say you have 50 objects they all have an x and y coordinate and maybe a name, then a structure is how you organize all variables.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Quite a regular
Quite a regular


See User information
Hi LiveForIt,

Thank you very, very much. You understood precisely and totally what I was talking about.


That is my point exactly. If I look up how to do something, and I don't know all else related to achieving a goal, I'm sorry, but I'm not able to do it.

You see, in Basic
A=5

is a COMPLETE program. I don't need to do any single other thing at all at all. The program won't do anything productive, but it DOES DO what I asked how to DO!

In C, I need all of the extra information that LiveForIt provided.

I ask a VERY SIMPLE question, make a variable and give it a value, and there are all types of hoops and juggling involved. Problem is, I need "The Idiot Moron's Guide to C" to do programming under the way C works.

I'm sorry, but it's the case.



I'll give you another example.

Let's say I want to change the colour of one pixel, what all do I need to type in C to achieve this one very simple request?

In AMOS, as long as I am okay with the initial 320*200 screen, all I need to do is give the colour and position of the desired pixel.

Plot 159,99,7

No brackets, no parenthesis, no {}, no function calls, no opening libraries.....
I have a computer program, and I've achieved my goal.

I not trying to make a device driver or library (I totally don't even understand why I would make one or what it exactly does), etc., etc.

Let me ask you a question, is the argument that I'm not computer programming if I want to use something as "lame" as Basic?

I still take user input, make decisions, have lists of data that gets displayed based on choices people make, make random events happen, etc., etc.

It was not my choice that it was deliberately a twisted method used behind the making of C. And speaking of stupid, heck, I STILL struggle with 0 being used first co-ordinate when plotting where text should be displayed on screen.

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Atheist
I think that I also understood & provided what you asked for too?!? (See post #70)

Author of the PortablE programming language.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Atheist Quote:
Let's say I want to change the colour of one pixel, what all do I need to type in C to achieve this one very simple request?

In AMOS, as long as I am okay with the initial 320*200 screen, all I need to do is give the colour and position of the desired pixel.

Plot 159,99,7

I will answer for E not C, although I suspect that again C will be somewhat more complex:

Quote:

MODULE 'intuition/intuition'

PROC main()
DEF wptr

->open window
wptr := OpenW(20, 50, 320, 200, IDCMP_CLOSEWINDOW,
WFLG_CLOSEGADGET OR WFLG_ACTIVATE,
'Graphics demo window', NIL, 1, NIL)

->check to see we opened a window
IF wptr
Plot(159,99,2)

->wait for user to close window
WHILE WaitIMessage(wptr) <> IDCMP_CLOSEWINDOW
ENDWHILE
CloseW(wptr)
ELSE
PrintF('Error -- could not open window!\n')
ENDIF
ENDPROC


Unfortunately the indentation is lost when I posted this, so it looks REALLY UGLY. Please (temporarily) view the proper program here.

I point you to Jason Hulance again for a longer example, which includes lines, boxes & text.


Further thoughts: Yes, this looks rather more complex than AMOS (never mind what the C version will look like!), but that is because you have to "talk" to AmigaOS yourself, to ask it to open a window, and also to wait for the user to press the close button. But this is "boilerplate" stuff that you can copy & paste easily. Beyond that it is pretty easy to add Plot(), Line(), Box(), TextF(), etc.


Edited by ChrisH on 2009/1/13 19:58:06
Author of the PortablE programming language.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Quite a regular
Quite a regular


See User information
Hi LiveForIt,

I forgot to add about the total waste of time, perpetual semi-colon typing.

Also, the bit about micro stink visual basic:
I was using AmigaBasic on my Amiga when I first got my Amiga in 1989. What a TOTAL piece of trash it was, as my program got longer, Basic kept getting slower and slower!!!! It would seem to be a totally unrelated program (could there POSSIBLY be ANY source code from Amiga Basic in Visual Basic) and YET they suffer the SAME affliction!!!!!! I must conclude that every product of microsoft is appropriate to be placed directly into their recycle bin.

OTOH, AMOS Professional, when my program got to 535K was EXACTLY AS FAST as a 25 line program..... ZERO slow down!!!! I don't think that Amiga Basic could even HANDLE a program that big.

And all that's needed is
A=5

I don't need to "define" the variable.

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Quite a regular
Quite a regular


See User information
Hi ChrisH,

Sorry, I thought that the "include" stuff was missing, as well as the millions of semi-colons, and brackets.

In addition to that, I can't even relate to when to use the brackets and NOT to use them (at least in the "C" code I've looked at). This applies to the semi-colons even.

C code looks like someone who's lost the ability to talk.

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Just popping in
Just popping in


See User information
@Atheist

It is rediculous what you are all argueing about, and the same is too often seen in too many forums.

There are different languages out there to solve different problems.
A beginner might prefer Basic, an expert prefers C. If i do a small project, I have different needs than if I do a large project.

In a large project, defining variables helps me to save a lot of time, whereas it feels to much overhead if I am programming a three-liner.

Do you get this?

Atheist: The choice of language depends on your experience level, on what you want to do and to what extent you can make compromises.

If it is ok for you to set a pixel to pen #7 on an AMOS-screen, that's fine. If you want to set a pixel on any screen, at any colordpeth, on any platofrm, AMOS is useless, or, will result in a comparable amount of code than C, just looking uglier.

You can not put programming languages into an order like

C > Amiblitz > AMOS > AREXX > Perl.

Doesn't make sense without defining your needs.

P.S.: And doesnt make sense to compare languages with a one-liner like "number=5".

Go to top
Re: Doesn't Seem to be Any Programing Languages for AOS4 for the Average Person
Home away from home
Home away from home


See User information
@Atheist
My reply was for E not C, therefore there are no "include" lines nor semi-colons in the basic 4-line example I gave you. E has some functionality built-in (like AMOS but) unlike C.

Author of the PortablE programming language.
Go to top

  Register To Post
« 1 2 3 (4) 5 6 7 ... 9 »

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project