Code Formatting and other Issues

Posted:
in Feedback

Comments

  • Reply 1 of 7
    Yeah, this new forum is very limited -- no code, image upload ...
    They seemed to have added code formatting under the paragraph formatting buttons now
    Yeah, but ...

    In the old forum you could:
    1. add the code tags then paste the code at the cursor
    2. paste the code, select it then add the code tags
    In this forum you can only do the second -- if you do the first. you get this:


    ////  OrderedDictionary.swift//  SwiftDataStructures//// http://timekl.com/blog/2014/06/02/learning-swift-ordered-dictionaries/////  Created by Tim Ekl on 6/2/14.//  Copyright (c) 2014 Tim Ekl. All rights reserved.//
    struct OrderedDictionary<Tk: Hashable, Tv> {    var keys: Array<Tk> = []    var values: Dictionary<Tk,Tv> = [:]        var count: Int {        assert(keys.count == values.count, "Keys and values array out of sync")        return self.keys.count;    }        // Explicitly define an empty initializer to prevent the default memberwise initializer from being generated    init() {}        subscript(index: Int) -> Tv? {        get {            let key = self.keys[index]            return self.values[key]        }        set(newValue) {            let key = self.keys[index]            if (newValue != nil) {                self.values[key] = newValue            } else {                self.values.removeValueForKey(key)                self.keys.removeAtIndex(index)            }        }    }        subscript(key: Tk) -> Tv? {        get {            return self.values[key]        }        set(newValue) {            if newValue == nil {                self.values.removeValueForKey(key)                self.keys.filter {$0 != key}            }                        let oldValue = self.values.updateValue(newValue!, forKey: key)            if oldValue == nil {                //self.keys.filter {$0 > key}                self.keys.append(key)                print("Keys After Adding: \(key) \(keys)")                od.keys = od.keys.sort()                print("Keys After Sorting: \(keys)")            }        }    }        var description: String {        //od.keys = od.keys.sort()        print("==od.keys: \(od.keys)")        var result = "{\n"        for i in 0..<self.count {            result += "[\(i)]: \(od.keys[i]) => \(od[i]!)\n"        }        result += "}"        return result    }}

    var od = OrderedDictionary<String,Int>()print(od.description)od["Tim"] = 19print(od.keys)print(od.description)od["Tim"] = 24print(od.description)od["Alice"] = 12print(od.description)od["Catherine"] = 23print(od.description)od["Becky"] = 3print("od.description--\(od.description)")print("od --\(od)")od["Alice"] = 42print("od.description--\(od.description)")print(od)print(od.keys)print(od.keys[0...2].contains("Tim"))print(od.values)
    //var sortedKeys = sort(&od.keys, <)print(od.description)

  • Reply 2 of 7
    MacProMacPro Posts: 19,382member

    IMO, 5 years from now, open sourcing Swift will prove to be the most significant Apple product release of 2015!



    I'd upvote your post if I could. ;)
    Yeah, this new forum is very limited -- no code, image upload ...
    And as far as I can yet tell no way to tell if a poster is a seasoned, loyal veteran on AI or a newbie spamming with a single post.
  • Reply 3 of 7
    muppetrymuppetry Posts: 3,331member
    And as far as I can yet tell no way to tell if a poster is a seasoned, loyal veteran on AI or a newbie spamming with a single post.
    If you click on the poster's name the profile page shows the post count. Very clunky though. Quite an achievement to find worse forum software than Huddler.
  • Reply 4 of 7
    This is very cool. It even supports Apple's foundation framework. The browser interface is very responsive. This allows any platform with a web browser to try out Swift.
    The following site has been available for several months and works a little better than the new IBM site:

    http://www.swiftstub.com/


    But the IBM site will, certainly, be of greater influence to enterprise.

    Marvin said:
    I always wondered if IBM had an interest in Swift in part because of Java/Oracle:  

    Swift running server-side allows for a replacement for Java and for some businesses replacing Java can cut some costs out:

    Having it able to run server-side means an app developer would only need to know one language to make cloud apps. 



    I love programming in Swift.  It is a full modern language, expressive and safe and very powerful. It makes Java, Objective-C, and C# look dated.  

    I think that this release is about taking on the server side with Swift. I expect to see full server platforms in Swift to replace Python/Django, Javascript/Node.js and Windows solutions in the next three years. 

    That would make a fantastic platform to work with.   Swift on both the client and server side for iOS/OSX apps. 
  • Reply 5 of 7
    Yeah, this new forum is very limited -- no code, image upload ...
    They seemed to have added code formatting under the paragraph formatting buttons now
    Yeah, but ...

    In the old forum you could:
    1. add the code tags then paste the code at the cursor
    2. paste the code, select it then add the code tags
    In this forum you can only do the second -- if you do the first. you get this:

    I didn't say the implementation was good  ;)
  • Reply 6 of 7
    Wait, is this really what the forums look like now? No boxes to visually delineate posts? No user information to determine age (as digitalclips mentioned)? Lowercase names? No HTML post formatting?

    Did they REALLY shift us to a desktop layout built specifically for “mobile devices”? Us? An APPLE website?

    This is probably all my fault. I complain the most about the existence of “mobile” sites since the creation of the iPhone. They just don’t want me to use AI anymore.  p

    EDIT: And you can only edit a post for a single hour after posting?
    edited December 2015
  • Reply 7 of 7
    polymniapolymnia Posts: 1,054member
    Wait, is this really what the forums look like now? No boxes to visually delineate posts? No user information to determine age (as digitalclips mentioned)? Lowercase names? No HTML post formatting?

    Did they REALLY shift us to a desktop layout built specifically for “mobile devices”? Us? An APPLE website?

    This is probably all my fault. I complain the most about the existence of “mobile” sites since the creation of the iPhone. They just don’t want me to use AI anymore.  p

    EDIT: And you can only edit a post for a single hour after posting?
    No need to over explain. You could have left it at "I complain the most."

    ;)
    suddenly newton
Sign In or Register to comment.