Traveller Store CotI Features New Posts Mark Forums Read Register


Go Back TravellerRPG.com > Citizens of the Imperium > General Traveller Discussions > Software Solutions

Software Solutions Discussions on Traveller related software.

Reply
 
Thread Tools Display Modes
  #1  
Old November 13th, 2014, 11:55 AM
robject's Avatar
robject robject is offline
Marquis
 
Join Date: Mar 2002
Posts: 13,933
Gallery : 9
Visit robject's Blog
robject has disabled reputation
Default Scala (and Swift) and Chargen

I've been meaning to learn Scala. What I need to do is justify it with a Traveller application. Not just a random sector generator.

Maybe a character generator? That's got a rich sort of complexity in it that doesn't exist even in world building (or does it? I wonder if world-building can be boiled down into something akin to character generation?)


Anyway, Scala. I found a website that compares Scala to Swift, and it looks like (superficial) convergence to me, whether intentional or otherwise. They're not the same language, but the syntax overlaps so that some statements are identical in both languages.

I note this because in my experience that tends to only happen in languages which are related -- C and C++, JavaScript and ActionScript, or (to a lesser extent) Java and C#. But look at Pascal and you know you're looking at Pascal. Look at C and you know it's C.


Better to use the phrase that this website uses: Swift is a lot like Scala. No argument there.

They are not the same language, of course. But I thought the comparison was interesting.
__________________
Imperiallines magazine
My Helpful Stuff for Traveller5
IMTU tc+ t5++ 3i(+) au ls+ / OTU 44% an+ dt+ ge- j- jf+ n- pi+ pp+ tr+ tv- uwp+ xb+
Tools Link
Reply With Quote
  #2  
Old November 14th, 2014, 02:13 PM
Adam Dray's Avatar
Adam Dray Adam Dray is offline
Citizen: SOC-13
 
Join Date: Mar 2014
Location: Baltimore
Posts: 828
Gallery : 0
Visit Adam Dray's Blog
Adam Dray Citizen+Adam Dray Citizen+
Default

Swift looks cool -- much cleaner than Scala, in my opinion -- but is it available for any platform other than iOS/MacOS?
__________________
Grand Duke Rhylanor, SPIN 2717 Rhylanor/Rhylanor A434934-F
Viscount Khikaba/Lishun 0829 C524869-9
Count Junidy, SPIN 3202 Junidy/Aramis B434ABD-B
Marquis Tuwayk/Deneb 0339
Marquis Smoug/Lunion 1729
Marquis Rech/Lanth 2112
Baron/ess Rech/Lanth 2112
Knight of Deneb Junidy/Aramis 3202
Reply With Quote
  #3  
Old November 14th, 2014, 03:23 PM
aramis's Avatar
aramis aramis is offline
Administrator
 
Join Date: May 2001
Location: Anchorage, AK, USofA
Posts: 29,463
Gallery : 56
Visit aramis's Blog
aramis has disabled reputation
Send a message via ICQ to aramis Send a message via AIM to aramis Send a message via Yahoo to aramis
Default

Char Gen usually has an interactivity higher than does world/system gen.
__________________
~ Aramis
aramis.hostman.us /trav
Smith & Wesson: The Original Point and Click interface!

Archduke of Sylea (CORE 2118)
Duke of the Third Imperium (SPIN 0534)
Count Terra (SOLO 1827)
Count Gorod (REFT 1302)
Count of the Third Imperium (SPIN 2232)
Viscount of Adabicci (SPIN 1824)
Marquis of the Solomani Rim (SOLO 0606)
Marquis of the Third Imperium (SPIN 2410)
Baron of the Third Imperium (SPIN 2231)
Knight of the Iridium Throne (CORE 1434)
Sir William Hostman (OLDE 0512)
Sir William Hostman (DAGU 0622)
Knight of Deneb (REFT 2239)
Knight of Deneb (Spin 2532)
SEH w/Diamonds for Extreme Heroism - Battle of Boughene
MCG - Battle of Boughene
TAS: William Hostman (CORR 2506)
TAS: Bearer (DAIB 1326)
IMTU ct+ tm++ tne tg-- tt+ tmo+ t4- t20+ to ru+ ge+ 3i+ c+ jt au ls pi+ ta he+ st+
Wil Hostman 0602 C539857-9 S A724
OTU: 95% 3i an+ au+ br- cpu± dt± f+ fs++ ge± ih- inf± j± jf+ jm+ jt+ ls- n= nc+ pi+ pp-- tp+ tr+ tv- vi-- xb+-
Unless there is bold red text, presume my posts to be my personal material only.
Reply With Quote
  #4  
Old November 14th, 2014, 05:25 PM
simonh simonh is offline
Citizen: SOC-12
 
Join Date: Jun 2008
Location: London
Posts: 447
Gallery : 0
simonh Citizen+simonh Citizen+
Default

Quote:
Originally Posted by Adam Dray View Post
Swift looks cool -- much cleaner than Scala, in my opinion -- but is it available for any platform other than iOS/MacOS?
Apparently there is.

Swift uses the same object model and relies on the same frameworks as Objective C. There are cross platform versions of Objective C and also GNU implementations of some of the ancestors of the Mac frameworks called GNUStep (based on NextStep/OpenStep). They've diverged from the versions on the Mac though.

There is an effort to port Swift to that GNU platform, but it's in the early stages. That's hardly surprising as the syntax and even the semantics of Swift itself haven't been completely finalised yet.

Whether or not the GNU version will ever amount to anything is moot. It hasn't yet.

Simon Hibbs
__________________
Check out StarBase, the open source science fiction campaign mapping application.
Reply With Quote
  #5  
Old November 15th, 2014, 12:46 PM
robject's Avatar
robject robject is offline
Marquis
 
Join Date: Mar 2002
Posts: 13,933
Gallery : 9
Visit robject's Blog
robject has disabled reputation
Default

Quote:
Originally Posted by Adam Dray View Post
Swift looks cool -- much cleaner than Scala, in my opinion -- but is it available for any platform other than iOS/MacOS?
As Simon noted, not yet. It's an Apple in-house language to aid app writing. If I recall, it can be intermixed with Objective C.
__________________
Imperiallines magazine
My Helpful Stuff for Traveller5
IMTU tc+ t5++ 3i(+) au ls+ / OTU 44% an+ dt+ ge- j- jf+ n- pi+ pp+ tr+ tv- uwp+ xb+
Tools Link
Reply With Quote
  #6  
Old November 17th, 2014, 01:12 PM
Adam Dray's Avatar
Adam Dray Adam Dray is offline
Citizen: SOC-13
 
Join Date: Mar 2014
Location: Baltimore
Posts: 828
Gallery : 0
Visit Adam Dray's Blog
Adam Dray Citizen+Adam Dray Citizen+
Default

Quote:
Originally Posted by simonh View Post
There is an effort to port Swift to that GNU platform, but it's in the early stages. That's hardly surprising as the syntax and even the semantics of Swift itself haven't been completely finalised yet.
The Apple site says, "With the release of Xcode 6.1 and iOS 8, Swift 1.1 is final."

Are you saying there's still a lot of major stuff in flux, despite 1.1 being "final"? (Stranger things have happened in development tools.)

I'm a Java programmer, mainly, but I have a C background (less so with C++ and no Objective-C experience). I recently purchased my first Mac (though my wife has had various Macs for decades, and I have had an iPad for a while). I'm thinking of getting into Swift development for fun and profit.
__________________
Grand Duke Rhylanor, SPIN 2717 Rhylanor/Rhylanor A434934-F
Viscount Khikaba/Lishun 0829 C524869-9
Count Junidy, SPIN 3202 Junidy/Aramis B434ABD-B
Marquis Tuwayk/Deneb 0339
Marquis Smoug/Lunion 1729
Marquis Rech/Lanth 2112
Baron/ess Rech/Lanth 2112
Knight of Deneb Junidy/Aramis 3202
Reply With Quote
  #7  
Old November 19th, 2014, 11:10 AM
saundby's Avatar
saundby saundby is offline
Citizen: SOC-14
 
Join Date: Oct 2007
Location: Gold Country
Posts: 1,347
Gallery : 0
saundby Citizen
Default

Swift is very easy to learn, especially if you have some Objective-C background. Though coming at it from Java (or Scala) is not difficult.

If your background is Java, the easiest jump to make is C#. I've largely moved on from Java except in places where the customer requires it (it was my primary language for a long time because of the cross-platform support), and using C# with Mono is my norm now (except for all those times when I'm working in another language for a larger project--usually ANSI/ISO C.)

Going to Scala from Java is easy, too, but then going back to Java again will be difficult. Very difficult.
__________________
http://acedev.com/ Welcome to the Rocket Factory (Webcomic)
http://catsonkeyboards.blogspot.com/ My programming and teaching blog.
http://saundby.com/ My personal website.
Reply With Quote
  #8  
Old November 20th, 2014, 07:56 AM
simonh simonh is offline
Citizen: SOC-12
 
Join Date: Jun 2008
Location: London
Posts: 447
Gallery : 0
simonh Citizen+simonh Citizen+
Default

Right now Swift is definitely the way to go for native Mac and OSX development and I'm sorely tempted to give it a try. I'm just having too much fun playing with Pythonista on my iPad at the moment and the only window I have free for spare time programming is on the train anyway.

My understanding of the status of Swift is that yes it is in flux and things will still change, but by saying it's 'final' or whatever it is basically a flag saying this version will be accepted for apps submitted to the App Store.

Simon Hibbs
__________________
Check out StarBase, the open source science fiction campaign mapping application.
Reply With Quote
  #9  
Old November 20th, 2014, 08:42 AM
Shonner Shonner is offline
Citizen: SOC-14
 
Join Date: May 2009
Posts: 1,232
Gallery : 0
Shonner Citizen+Shonner Citizen+
Send a message via Skype™ to Shonner
Default

I was looking through Swift's syntax. Interesting. "Let" is back. I haven't seen it used since ZX81 Basic.

Swift is trying to do what Python already does, but in a compiled fashion like C. So strong typing is necessary. I can't stand C, or other compiled languages. If code doesn't need to be compiled for Apples, I see Python used en masse on them.
__________________
April 28th, 2015 was my last day on this forum.
Reply With Quote
  #10  
Old November 20th, 2014, 01:38 PM
Adam Dray's Avatar
Adam Dray Adam Dray is offline
Citizen: SOC-13
 
Join Date: Mar 2014
Location: Baltimore
Posts: 828
Gallery : 0
Visit Adam Dray's Blog
Adam Dray Citizen+Adam Dray Citizen+
Default

Quote:
Originally Posted by Shonner View Post
I was looking through Swift's syntax. Interesting. "Let" is back. I haven't seen it used since ZX81 Basic.
(let c (+ a b))

__________________
Grand Duke Rhylanor, SPIN 2717 Rhylanor/Rhylanor A434934-F
Viscount Khikaba/Lishun 0829 C524869-9
Count Junidy, SPIN 3202 Junidy/Aramis B434ABD-B
Marquis Tuwayk/Deneb 0339
Marquis Smoug/Lunion 1729
Marquis Rech/Lanth 2112
Baron/ess Rech/Lanth 2112
Knight of Deneb Junidy/Aramis 3202
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Swift voyage, Commander Sinclair. RIP BlackBat242 Random Static 2 September 30th, 2012 12:59 PM

This website and its contents are copyright ©2010- Far Future Enterprises. All rights reserved. Traveller is a registered trademark of Far Future Enterprises .
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2010-2013, Far Future Enterprises. All Rights Reserved.