terhechte / appventure-blog Goto Github PK
View Code? Open in Web Editor NEWMy Clojure/Static-Based Blog.
My Clojure/Static-Based Blog.
I like the idea very much. One idea for improvement: article might mention that file must be made executable - it took me a while until I realised this (probably not to everyone) obvious fact.
java -jar ./static-app.jar --build
[+] SEVERE: Path to Emacs not valid.
It's possible I'm misunderstanding this code:
for case let (label?, anyValue) in mirror.children {
if let value = anyValue as? AnyObject {
managedObject.setValue(child, forKey: label)
} else {
throw SerializationError.UnsupportedSubType(label: label)
}
}
Shouldn't that be "managedObject.setValue(value, forKey: label)"?
Hi there,
Great article.
Could it be that you made a little mistake here:
guard oldData == newData else { return }
Shouldn't it be:
guard oldData != newData else { return }
For some reason isNone: Bool
and isSome: Bool
don't work. I get error:
Cannot convert value of type 'Optional' to expected argument type '_?'
Tested on Xcode 9.2 (9C40b), Swift 4.0
However, this version compiles without problem:
var isNone: Bool {
switch self {
case .none:
return true
default:
return false
}
}
var isSome: Bool {
switch self {
case .some(_):
return true
default:
return false
}
}
Unfortunately, I don't know the root cause.
In this code example:
typealias Config = (RAM: Int, CPU: String, GPU: String)
// Each of these takes a config and returns an updated config
func selectRAM(_ config: Config) -> Config {return (RAM: 32, CPU: config.CPU, GPU: config.GPU)}
func selectCPU(_ config: Config) -> Config {return (RAM: config.RAM, CPU: "3.2GHZ", GPU: config.GPU)}
func selectGPU(_ config: Config) -> Config {return (RAM: config.RAM, CPU: "3.2GHZ", GPU: "NVidia")}
enum Desktop {
case Cube(Config)
case Tower(Config)
case Rack(Config)
}
let aTower = Desktop.Tower(selectGPU(selectCPU(selectRAM((0, "", "") as Config))))
Why do the select functions (selectRAM, selectCPU, selectGPU) set the value of the associated values? It would make more sense if the functions took in the new value and the config and then set the new value based on the input.
Also, I'm not clear on what "select" means here. The word "set" or "update" make more sense to me based on my understanding of these functions.
Hi,
We are SwiftGG Chinese translation team, we are now translating high quality English swift blogs into Chinese to help native iOS developer better learning the swift language.
Thanks for your high quality blogs, and we've translated most of the blogs into Chinese. I'm wondering if you would like to add the translation link to the blog article. Or if you wish, you can tell us where to insert the link, then we can add the link ourselves and create a pull request.
Here are all the translated blogs: http://swift.gg/tags/APPVENTURE/
Pass tuples as arguments to Enum is deprecated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.