English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 22 August 2015, 15:20   #281
ReadOnlyCat
Code Kitten
 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
Quote:
Originally Posted by Mrs Beanbag View Post
Can't get Swift for the Amiga...
Soon you will:
https://developer.apple.com/swift/blog/?id=29

"In addition to new features, the big news is that Apple will be making Swift open source later this year.
[...]
Swift source code will be released under an OSI-approved permissive license.
Contributions from the community will be accepted — and encouraged.
At launch we intend to contribute ports for OS X, iOS, and Linux.
Source code will include the Swift compiler and standard library.
We think it would be amazing for Swift to be on all your favorite platforms."


Swift relies on LLVM for code generation so once the 68k backend is functional it will be able to support the Amiga.

It has anonymous functions, closures, enum types, and allows for much better functional style than C++ while still staying quite close to the metal.

Quote:
Originally Posted by Mrs Beanbag View Post
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.
Writing on BASIC wastes too much of my energy and I fully agree with all your posts on the topic. I am fairly sure that if posts could be voted up yours would be high enough to be counted as representative.

Last edited by ReadOnlyCat; 22 August 2015 at 15:26.
ReadOnlyCat is offline  
Old 22 August 2015, 16:38   #282
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by ReadOnlyCat View Post
The problem of the Amiga community is too many consumers, not enough software producers. . There are very good producers, StingRay, Galhahad, Phx, etc. but we need more and new tools.
Yes, but to become as good a coder as StingRay, Gallahad, phx etc. (whom shall now thereafter be referred to as "semi-gods") takes alot of time and experience, with the semi-gods having atleast 10+ years more experience coding on the Amiga (in assembler) than me. I have only been coding in assembler since around 2007/8, whereas the semi-gods have (as I understand it) been doing so since the early 90's (or longer).

As for new tools, everyone wants something different. There are already some interesting tools (good and bad) on Aminet and other sources on the internet.
I wasn't particularly keen on those I found and ended up coding by own. But whilst I am happy with my tools, I'm sure atleast half of the folks in this thread will see them and go "I'd prefer to have it done this way..."
It takes alot of time coding up new tools, and that is time that the individual might prefer to spend on making the game. However sometimes it is unavoidable as tools can make level (re)designing so much faster and easier


And, for what it's worth, I much prefer the syntax in BASIC just the way it is.
I personally don't understand lines such as:
Code:
For I in A ...
I in A? If I=1 what does A equal? 1?
Lonewolf10 is offline  
Old 22 August 2015, 16:51   #283
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
Quote:
Originally Posted by beezle View Post
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 ;-)
If you fail to understand why this isn't "semantics" this discussion can't lead anywhere.

Also why do you find my use of modern BASICs to represent the superset of BASIC inspired languages ironic? You can't have read what I actually wrote.

BTW I like BASIC, I learned programming in BASIC and think extended BASICs can be useful. That doesn't mean my complaints are mere semantics...
Megol is offline  
Old 22 August 2015, 16:54   #284
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Quote:
Originally Posted by Lonewolf10 View Post
And, for what it's worth, I much prefer the syntax in BASIC just the way it is.
I personally don't understand lines such as:
Code:
For I in A ...
I in A? If I=1 what does A equal? 1?
If it's anything like Javascript, it means that if A is a collection such as a variable-length array or linked-list, each time through the loop it will equal the value that is in the next element of A. Python's For loop is exclusively this type to the point that it doesn't support the old fashioned way at all (or at least not directly)!

Code:
For I in ["Alphabet", "soup", "contains", "vegetables"]
  print I
Next I
Would output:
Alphabet
soup
contains
vegetables

For some mythical BASIC with this type of For loop (more commonly known as ForEach in general or ForAll in AmigaE).

In Python, for example, if you want to count from 1 to 30, you do something like this:
Code:
for x in range(30):
  print x
(Note that anything ending with a colon indicates the start of a block and the indent level marks the extent of the block.)
Samurai_Crow is online now  
Old 22 August 2015, 17:09   #285
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
Quote:
Originally Posted by Lonewolf10 View Post
And, for what it's worth, I much prefer the syntax in BASIC just the way it is.
I personally don't understand lines such as:
Code:
For I in A ...
I in A? If I=1 what does A equal? 1?
So you just doesn't like a BASIC that supports that syntax?

Code:
FOR I=0 TO 100
Using the same logic you applied to the above example this should change the definition of 0 to 1.
Megol is offline  
Old 22 August 2015, 17:18   #286
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Quote:
Originally Posted by waltc View Post
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.
AREXX ports were my favorite use of the Flow Editor in AmigaVision 2 as well, Mainly because there were bugs in almost every other aspect of the program!

Re:Visual languages
I'd rather write a graphical editor as a child class of a BOOPSI tree gadget than to have to write a parser. With a graphical programming environment I'll just say hello to IFFParse.library! Since AmigaVision defined its own private IFF CODE file format, I'd have to come up with a separate IFF PRG0 format with the final digit being the release version of the format.
Samurai_Crow is online now  
Old 22 August 2015, 19:48   #287
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
Soon you will:
https://developer.apple.com/swift/blog/?id=29

"In addition to new features, the big news is that Apple will be making Swift open source later this year.
Well, i still don't like them apples. Anyway i've been developing this idea since refactoring Mr Beanbag, and there's one thing in particular i need to be able to do, which is to load interchangeable modules/classes at runtime, without having to resort to reflection (like Java does). Maybe you can tell me if Swift has anything like this or not, but i've come up with the idea of "statically implemented interfaces" to solve the problem.

Quote:
Writing on BASIC wastes too much of my energy and I fully agree with all your posts on the topic. I am fairly sure that if posts could be voted up yours would be high enough to be counted as representative.
Mrs Beanbag is offline  
Old 22 August 2015, 19:48   #288
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,978
Quote:
Originally Posted by Samurai_Crow View Post
For some mythical BASIC with this type of For loop (more commonly known as ForEach in general or ForAll in AmigaE).
Mythical???

I beg to differ!

D.
Dunny is offline  
Old 22 August 2015, 20:45   #289
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
Quote:
Originally Posted by Lonewolf10 View Post
I personally don't understand lines such as:
Code:
For I in A ...
I in A? If I=1 what does A equal? 1?
just recalling the original example...
Let A=0 To 10 Step 2 For I in A ...A equals "0 To 10 Step 2", or to put it another way, [0, 2, 4, 6, 8, 10]
The suggestion is to allow users to assign ranges to variables (and use type inference to allow different types to be assigned to variables).
One could just as easily write it in-line, of course, like so:
Code:
For I in 0 To 10 Step 2
where the only difference there between that and normal BASIC syntax is the use of "in" instead of "="; because it is not assigning I to the range, but to each element in the range in turn. Thus the symbols "To" and "Step" have meanings of their own, and are not just part of For's special syntax.
Mrs Beanbag is offline  
Old 22 August 2015, 20:47   #290
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,978
Or in SpecBAS:

10 FOR EACH i IN [0 TO 10 STEP 2]: PRINT i: NEXT i



D.
Dunny is offline  
Old 22 August 2015, 20:59   #291
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
how about
Code:
> Let A=0 To 10 Step 2
> Print "Hello world!"(A)
Hlowrd
Mrs Beanbag is offline  
Old 22 August 2015, 21:39   #292
Megol
Registered User
 
Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 377
IMHO such use of ranges makes the code less readable, repetition should always be explicit. How about:
Code:
let A=0 to 10 step 2
do print "Hello world!"(A)
Megol is offline  
Old 22 August 2015, 21:47   #293
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
IMHO such use of ranges makes the code less readable, repetition should always be explicit. How about:
Code:
let A=0 to 10 step 2
do print "Hello world!"(A)
i think you miss the point... it doesn't repeat the "print", it applies the range to the string.
Mrs Beanbag is offline  
Old 22 August 2015, 21:58   #294
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
B=A*2
I always think if you keep it simple and "conform" it should make it easier to port, well thats my theory(probably a load of ...)
Retro1234 is offline  
Old 22 August 2015, 22:01   #295
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,522
Quote:
Originally Posted by Mrs Beanbag View Post
how about
Code:
> Let A=0 To 10 Step 2
> Print "Hello world!"(A)
Hlowrd
This has to be one of the worst syntax mindf*cks I have seen in a while
TCD is offline  
Old 22 August 2015, 22:42   #296
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
It's perfectly valid in C and C++, so it's not exactly new. It's just a consequence of string literals evaluating to arrays.
Leffmann is offline  
Old 23 August 2015, 02:00   #297
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by Megol View Post
Quote:
Originally Posted by Lonewolf10 View Post
Code:
 	For I in A ...
I in A? If I=1 what does A equal? 1?
So you just doesn't like a BASIC that supports that syntax?
I didn't like it because I didn't understand it.


Thanks to Samurai's explanation I think I understand it (though Mrs Beanbags example I find confusing, but it could just be me being sleepy...)

Quote:
Originally Posted by Megol View Post
Code:
FOR I=0 TO 100
Using the same logic you applied to the above example this should change the definition of 0 to 1.
That was not my intention. I completely understand that because I have used FOR... NEXT loops many times when programming in BASIC on the Amiga, Spectrum and (very briefly) Acorn BBC Micro and Acorn Archemedes.

It's the use of "in" that I'm not used to

For I in A ...
and would be much better if you changed the "in" to "="

Unless I'm completely misunderstanding what it does...

I'll have to try some experiments in Visual BASIC tomorrow
Lonewolf10 is offline  
Old 23 August 2015, 11:25   #298
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,978
That's why I use the square brackets.

"FOR i IN a" is pretty bad syntax for a BASIC - it's very non-obvious what it does unless you specify that "a" is a range somehow. The same way we differentiate strings from numbers with the "$" suffix. Hence I would use "FOR i IN [a]" to specify a range, which is more readable so long as the user understands that anything in square braces is a range.

D.
Dunny is offline  
Old 23 August 2015, 14:24   #299
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
but then it will be a range of a range... does it make sense to write [[0 to 10]]?

what you would usually do, in other languages, is give all your variables descriptive names, rather than cryptic things like "A".

Code:
For I in MyRange

Last edited by Mrs Beanbag; 23 August 2015 at 14:36.
Mrs Beanbag is offline  
Old 23 August 2015, 15:37   #300
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,522
Quote:
Originally Posted by Leffmann View Post
It's perfectly valid in C and C++, so it's not exactly new. It's just a consequence of string literals evaluating to arrays.
That's not what I mean, but thank you for your comment nonetheless.
TCD 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 04:43.

Top

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