English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 20 August 2015, 12:16   #261
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,980
Quote:
Originally Posted by Mrs Beanbag View Post
i know what it stands for, but it means treating arrays as special rather than just a type. also you shouldn't have to fix the size at creation.
That's why I allow

Code:
DIM a()
Which creates a dynamic array - you can read and write to any index you like. Of course, you lose bounds checking on array writes, but them's the breaks.

Quote:
Now i'm just confused. It's a serious fault in AMOS even though it's the same in pretty much every BASIC?
Well, you mentioned AMOS. It's a fault in any BASIC, from the perspective of making things easy for the beginner to grasp.

Quote:
But this is precisely my point. Natural language is no good to computers. That's exactly what's wrong with BASIC. Learning how to use BASIC is not learning how to program. That's why people fail to progress, because it doesn't prepare anyone for the sort of super-pedantic logic that makes computers tick. Rather, it does the opposite, by pandering to fuzzy thinking.
No, it teaches code flow, comparisons and branching. That's what I've been saying for a while now - BASIC is for beginners. People who do not code. People who can code likely should be moving on from BASIC.

Quote:
I'm not sure "Let A=(B=5)" makes any more sense, tbh.
Well, one of the symbols is "equal" and one is "equals". The first is part of an instruction, the other is a comparison. Agreed that it's not a nice expression and likely should be done some other way but that's not a fault of the language per se.

D.
Dunny is offline  
Old 20 August 2015, 12:31   #262
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
Quote:
Originally Posted by Dunny View Post
Can you name a BASIC that doesn't support string concatenation with the "+" operator?
Several. In my previous post was the code from one of those (Wang 2200 BASIC), another is the (still for Wang 2200 - but for later hardware versions) BASIC-2 which used "&" for string concatenation. But there are other BASICs that doesn't support it at all or use yet another symbol/method. Sorry I don't remember the names right now - it was ages ago I used them.
I guess most modern BASICs support "+" for concatenation as it would ease porting from Visual BASIC?

Quote:
In the original Dartmouth BASIC (and indeed any BASIC), the PRINT command requires one of two things as a print-item - either a print separator or an expression. If your BASIC supports such things as

LET a$=b$+c$

Then PRINT will handle inline string concatenation as part of its expression evaluator.

Furthermore, I'd like to see how Blitz, using its commas to separate print items, manages to output a newline or tab? I suspect (I've not investigated though!) that it must use special characters inline in the string arguments?

Dartmouth used the semicolon for concatenation of items (both strings and numerics which by their nature cannot be concatenated using an operator without a conversion function on one of the terms), the comma for tabulation and the apostrophe for newline/carriage return. It's not a "hack", but I agree that it's the only command that uses these conventions - using them with a string variable assignment wouldn't work and would break delineation of the two datatypes.
The hack I referred to would be Blitz specific _if_ it supports semicolon separators for the print statement.
BASIC use of comma/semicolon I don't think of as a hack - they are statement specific formatting specifiers. Like those of print using.

Edit:
How about A:=(B=5) or A=(B==5) ?

Last edited by Megol; 20 August 2015 at 12:48.
Megol is offline  
Old 20 August 2015, 12:39   #263
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
Quote:
Originally Posted by Dunny View Post
Well, you mentioned AMOS. It's a fault in any BASIC, from the perspective of making things easy for the beginner to grasp.
ok well you can take that up with Idrougge...

Quote:
No, it teaches code flow, comparisons and branching.
That too. My worry is that people will come to think that that is what programming is, while unstructured programming is actually a dead duck. Computer science already learnt from those mistakes. Now there is a whole new generation of mistakes to make and i wouldn't want anyone to miss out. There's a party over at Functional Programming right now and everyone's invited.

Quote:
That's what I've been saying for a while now - BASIC is for beginners. People who do not code. People who can code likely should be moving on from BASIC.
But what i've been trying to say is that beginners don't need code to look like English, in fact they would benefit a lot from having that particular bubble burst (within reasonable bounds, of course... i wouldn't start anyone out with Perl).

Quote:
Well, one of the symbols is "equal" and one is "equals". The first is part of an instruction, the other is a comparison. Agreed that it's not a nice expression and likely should be done some other way but that's not a fault of the language per se.
They are both the same symbol. But one instance of it has been hijacked by another symbol on the other side of the variable name, apparently because of English grammar*.

It is a fault of the language, because the language chooses to do it, whereas it could just as easily do it some other way, as most modern languages do (either use == for comparison or := for assignment (or Lisp style: (Let A 5)))

A few tweaks here and there and BASIC could become quite consistent and logical without becoming any more difficult.

*which is also terrible
Mrs Beanbag is offline  
Old 20 August 2015, 13:28   #264
beezle
Banned
 
Join Date: May 2015
Location: Australia
Posts: 67
Not sure who mentioned it, but a newline in a string in blitz, if I recall correctly is much the same as in c (ie. "/n")
beezle is offline  
Old 20 August 2015, 15:56   #265
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
Quote:
Originally Posted by Mrs Beanbag View Post
...
A few tweaks here and there and BASIC could become quite consistent and logical without becoming any more difficult.
Like COMAL? The first implementation of it was based on a hacked BASIC interpreter IIRC - it is like a structured BASIC mixed with some Pascal stuff.
The early versions of it required line numbers, just like early BASICs. BUT (and this is important) one couldn't use them as a target of a GOTO/GOSUB - line numbers were only used for editing.
Megol is offline  
Old 20 August 2015, 17:22   #266
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Question

Quote:
Originally Posted by Mrs Beanbag View Post
haha, well, as someone who DOES code for a living, i know what "TODO" means...

it means "forget about this until you have to explain it to someone else who has to work on the code 5 years later"

anyway i am inventing my own language, and i'll let you know how that goes
What kind of language are you inventing? Text-based or icons? JIT scripted or statically compiling or a combination? OOP, structured or something entirely new?
Samurai_Crow is offline  
Old 20 August 2015, 18:03   #267
waltc
Martian Anachronism
 
waltc's Avatar
 
Join Date: Nov 2014
Location: Railway Station, Mars
Posts: 33
I can't help but hearken back to AmigaVision and the massive potential that it had... (Especially compared with Visual Basic, etc.) I did some amazing stuff with that program & 16 mb's ram... What potential there was! Arexx was another favorite thing of mine, in a scripting program called T-Rexx Professional--the stuff that was possible to cobble together using the Arexx ports in various programs--to effect more or less "real-time" stuff (suitable for tape BetaMax recording) was amazing...! Even to this day with the amazing strides in hardware we've seen I'm not sure these programs really have any equals.

OK, sorry...didn't mean to wax nostalgic here...!
waltc is offline  
Old 20 August 2015, 19:57   #268
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
Quote:
Originally Posted by Megol View Post
Like COMAL? The first implementation of it was based on a hacked BASIC interpreter IIRC - it is like a structured BASIC mixed with some Pascal stuff.
The early versions of it required line numbers, just like early BASICs. BUT (and this is important) one couldn't use them as a target of a GOTO/GOSUB - line numbers were only used for editing.
interesting, i'd never heard of it, but according to Wikipedia there is an implementation for Amiga

Quote:
Originally Posted by Samurai_Crow View Post
What kind of language are you inventing? Text-based or icons? JIT scripted or statically compiling or a combination? OOP, structured or something entirely new?
Text-based (so i don't have to write my own editor, as well). Static compilation at least in its first incarnation, but JIT might be an interesting direction to investigate later. I do intend, at the least, to make the compilation API available from within the language itself so you can JIT "manually" if you like.

It will be multi-paradigm but especially Object Oriented (strongly typed, single-inheritance plus interfaces, like Java, but with dynamic despatch only for interfaces), and functional programming. In fact all functions are anonymous. Kind of a hybrid between D and BETA, with a context-free syntax. There will be inner functions/closures. Loops can be constructed using an anonymous function with tail recursion like so:

Code:
( ()->() if (condition)
{
    ...
    self();
}) ();
I realise that is quite grotesque to look at but "while" and other kinds of loop will be defined as syntactic sugar in a "base module" which is always imported by default (and which would be potentially replaceable).

After this discussion i've been thinking about possible alternative syntaxes. The syntax i have in mind is broadly C-like but with a context-free lexer it might be possible to define many other alternative syntaxes (syntices?).
Mrs Beanbag is offline  
Old 20 August 2015, 20:40   #269
ReadOnlyCat
Code Kitten
 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
Quote:
Originally Posted by Mrs Beanbag View Post
it will be multi-paradigm but especially Object Oriented (strongly typed, single-inheritance plus interfaces, like Java, but with dynamic despatch only for interfaces), and functional programming. In fact all functions are anonymous. Kind of a hybrid between D and BETA, with a context-free syntax. There will be inner functions/closures. Loops can be constructed using an anonymous function with tail recursion like so:

[...]

After this discussion i've been thinking about possible alternative syntaxes. The syntax i have in mind is broadly C-like but with a context-free lexer it might be possible to define many other alternative syntaxes (syntices?).
Why reinvent the wheel when someone many options exist already? Swift, notably provides about all features you listed. There are many people in the functional programming community who laud it's suitability for functional programming (*). Many prominent Haskell developers have selected it as their mainstream language of choice and now that it is going to be open source there no reason it cannot end up on the Amiga.

(*) to the point that it feels like Apple created it by mistake.
ReadOnlyCat is offline  
Old 20 August 2015, 20:42   #270
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
If I may ask: why anonymous functions? IMHO the only advantage of them is reduced typing with the significant disadvantage of making code very hard to read.
Megol is offline  
Old 20 August 2015, 20:47   #271
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
Quote:
Originally Posted by ReadOnlyCat View Post
Why reinvent the wheel when someone many options exist already? ...
Can't get Swift for the Amiga...

Also one design goal is that it should be easy to write a module directly in 68k asm.

And there's always something wrong with already existing programming languages. Maybe that's why i've kept my own idea out of existence for the best part of a decade, best not ruin it now by actually making it.

Strange though, that someone can mention that they are remaking Sinclair BASIC and no-one says they are re-inventing the wheel... i'm practically re-inventing the jet engine, by comparison.

Quote:
Originally Posted by Megol View Post
If I may ask: why anonymous functions? IMHO the only advantage of them is reduced typing with the significant disadvantage of making code very hard to read.
well... you can define functions that take other functions as parameters, and pass them back as return values.

You can, however, create a named reference to an anonymous function. If this seems like a pedantic distinction, it probably is. But it saves having two different syntices, like you have in C++11 and Java 8.

Last edited by Mrs Beanbag; 20 August 2015 at 20:54.
Mrs Beanbag is offline  
Old 21 August 2015, 03:50   #272
beezle
Banned
 
Join Date: May 2015
Location: Australia
Posts: 67
Any chance the last few pages of this thread can get moved?
People trying to out-clever each other while disregarding reality is both getting tedious, and completely off topic.

Once again, basic these days isn't what it once was. A lot of the discussion is moot because its no longer the 80's/early 90's or earlier.
This has been pointed out, and disregarded a few times already.
beezle is offline  
Old 21 August 2015, 08:40   #273
Etze
A3000-Fan
 
Etze's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 321
I quite like Basic (Amos and Blitz).

Want a new screen? Open Screen xxxxxxx
Want an image to be loaded? LoadIFF xxxxxxx
Want to show a Bob? Bob xxxxxxx

Of course this is no "standard" Basic. And Assembler or C could/will be faster. But who cares? As long as I am satisfied with the finished product, there's no point in using Assembler or C or whatever. I like Basic because it gives you quick results.
Etze is offline  
Old 21 August 2015, 09:27   #274
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
I can say C is not an easy thing to master. You need years of studying and practicing to code well. You need to know math too. I think that's why most Amiga productions are coming from people that already know C, Assembly etc or using junk tools like backbone.

From what i have seen so far i am sure that C runs circles around Amos and other basics but it should be harder. It is quite versatile on what you can do with it. In fact you can do anything with C.
nobody is offline  
Old 21 August 2015, 10:36   #275
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
Quote:
Originally Posted by Etze View Post
I quite like Basic (Amos and Blitz).
I "like" AMOS too, i've said that before, for however terrible it is as a language, you can knock something up in it really quickly. We went off topic talking about whether BASIC is "simple and easy" and whether it makes sense to use it to teach programming in this day and age. Well let's put that to rest, i don't want to harsh Dunny's buzz since this is his bread and butter.

Quote:
I like Basic because it gives you quick results.
AMOS does. Maybe Blitz does (i never tried it). But that's because AMOS is AMOS, not because it is BASIC. When i first got an Amiga all there was was AmigaBasic, it was really not very easy to do much more than output text in a window. I remember someone wrote a programme that loaded IFF pictures (was it on a coverdisk?) but it took so long to do so that it was basically useless.

But i don't think we have very much alternative for the novice on the Amiga, who expects to be able to make Amiga games of the sort they expect (as in, taking over all the graphics and sound - mind you, the novice who wants to open windows on the workbench screen is even more stuck since AMOS doesn't do it out of the box, although there are extensions for it). You either get AMOS (or Blitz) with all its bobs and sprites and screens and mod players, or you get some other general purpose language where you basically have to reinvent all those things or wrestle with someone else's source code.

That's why my plan is to produce for my new language, a module that incorporates all the functionality of AMOS... well that's my plan, but i'm better at planning it than actually doing it. I've been in "analysis paralysis" for the best part of a decade already...
Mrs Beanbag is offline  
Old 21 August 2015, 12:28   #276
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
Quote:
Originally Posted by beezle View Post
Any chance the last few pages of this thread can get moved?
People trying to out-clever each other while disregarding reality is both getting tedious, and completely off topic.

Once again, basic these days isn't what it once was. A lot of the discussion is moot because its no longer the 80's/early 90's or earlier.
This has been pointed out, and disregarded a few times already.
And as also been pointed out several times you are completely, fundamentally, wrong!

Just because there are languages that call themselves BASIC that are modern doesn't mean there is A modern BASIC, there are a huge amount of programming languages that shares very little with each other and the standard BASIC language!

Is it trying to out-clever someone to point out this basic fact?!?
Megol is offline  
Old 21 August 2015, 13:25   #277
Etze
A3000-Fan
 
Etze's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 321
Quote:
Originally Posted by Mrs Beanbag View Post
You either get AMOS (or Blitz) with all its bobs and sprites and screens and mod players, or you get some other general purpose language where you basically have to reinvent all those things or wrestle with someone else's source code.
That's what I wanted to say (between the lines...).
Etze is offline  
Old 22 August 2015, 03:25   #278
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Quote:
Originally Posted by Megol View Post
To a certain level it is: it is mostly implemented as an interpreter and support direct execution of statements both of which helps experimenting. Having a lot of stuff predefined without needing some type of including/importing statements helps too.
I agree. The length of a "hello world" program in a beginner's language shouldn't be longer than in BASIC. It's not a funny propositon to try to teach children or students the joys of programming if Java is the language of choice, since you either have to explain a lot of irrelevant code before getting to the "hello world" bit, or tell them "graeca est, non est legendum", hence enforcing their impressions that computers are magical machines that run on incantations.

You can say what you want about BASIC, it might not be the best language, but if it is to be replaced, its replacement must be some other language that doesn't make the beginner feel stupid because he failed to write something the computer could very well have figured out itself, such as a statement terminator.

Quote:
Originally Posted by Megol
IMO one will soon hit a brick wall and have either to switch language or use some extended BASIC dialect. But I repeat myself
What you call extended BASIC dialects are the only BASIC dialects in use today, or even in use twenty years ago.

BASICs may have diverged from the primitive, non-structured language of the sixties, but even though they differ from each other, they tend to all offer the same basic additions only with different spelling. So what AMOS calls a "procedure" is called a "statement" in Blitz, but both support the same kind of structured programming.

Quote:
Originally Posted by Megol
Your fixation with symbol use is strange to me given that BASICs tend to use sigils to indicate type type of a variable which IMHO is much less logical and readable.
Well, I don't agree that it is less logical or readable. It may even serve some pedagogic purpose. But there are certainly languages that do without (ARexx, for example), so why not Basic as well? That's what Blitz Basic does. All variables receive the default type set with the latest DEFTYPE command, unless you add the type suffix on declaration. After the suffix is used in declaration, you needn't use it anymore.
idrougge is offline  
Old 22 August 2015, 04:50   #279
beezle
Banned
 
Join Date: May 2015
Location: Australia
Posts: 67
Quote:
Originally Posted by Megol View Post
And as also been pointed out several times you are completely, fundamentally, wrong!

Just because there are languages that call themselves BASIC that are modern doesn't mean there is A modern BASIC, there are a huge amount of programming languages that shares very little with each other and the standard BASIC language!

Is it trying to out-clever someone to point out this basic fact?!?
Yaaaawn.

Once again, semantics.
Same could be said for c and derivatives.
Things evolve.

Ironic that despite the above even you refer to "modern basics" in some posts ;-)
beezle is offline  
Old 22 August 2015, 12:10   #280
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,980
Quote:
Originally Posted by Mrs Beanbag View Post
I "like" AMOS too, i've said that before, for however terrible it is as a language, you can knock something up in it really quickly. We went off topic talking about whether BASIC is "simple and easy" and whether it makes sense to use it to teach programming in this day and age. Well let's put that to rest, i don't want to harsh Dunny's buzz since this is his bread and butter.
Oh, I'm well aware of what the vast majority of professional (and hobbyist) coders think of BASIC

It's not my place to change their minds - they're not my target audience. It's my job to teach people to code.

D.
Dunny is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the technically most impressive A500 game? mc68060 Amiga scene 67 03 June 2015 22:32
The Tales of Grupp - Another impressive homebrew ZX Spectrum title! Neil79 Retrogaming General Discussion 3 24 February 2015 19:19
New One Of "Homebrew" 68k Amiga Magazine Idea fishyfish Retrogaming General Discussion 6 16 April 2013 08:57
Impressive and Amazing PD Software! Any thoughts? hamster Retrogaming General Discussion 0 18 July 2004 01:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:46.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.20897 seconds with 16 queries