22 August 2015, 15:20 | #281 |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
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. 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. |
22 August 2015, 16:38 | #282 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
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 ... |
|
22 August 2015, 16:51 | #283 | |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
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... |
|
22 August 2015, 16:54 | #284 | |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
Quote:
Code:
For I in ["Alphabet", "soup", "contains", "vegetables"] print I Next I 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 |
|
22 August 2015, 17:09 | #285 | |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
Code:
FOR I=0 TO 100 |
|
22 August 2015, 17:18 | #286 | |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
Quote:
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. |
|
22 August 2015, 19:48 | #287 | ||
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
Quote:
|
||
22 August 2015, 19:48 | #288 |
Registered User
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,978
|
|
22 August 2015, 20:45 | #289 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
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 |
|
22 August 2015, 20:47 | #290 |
Registered User
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. |
22 August 2015, 20:59 | #291 |
Glastonbridge Software
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 |
22 August 2015, 21:39 | #292 |
Registered User
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) |
22 August 2015, 21:47 | #293 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
|
22 August 2015, 21:58 | #294 |
Phone Homer
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 ...) |
22 August 2015, 22:01 | #295 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,522
|
|
22 August 2015, 22:42 | #296 |
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.
|
23 August 2015, 02:00 | #297 | ||
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
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:
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 |
||
23 August 2015, 11:25 | #298 |
Registered User
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. |
23 August 2015, 14:24 | #299 |
Glastonbridge Software
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. |
23 August 2015, 15:37 | #300 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,522
|
|
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 |
|
|