Swift で数学のススメ 〜 プログラミングと数学は同時に学べ17. protocol AdditiveGroup { // static var zero: Self { get } // static func + (a: Self, b: Self) -> Self // prefix static func - (x: Self) -> Self // } extension AdditiveGroup { static func -(a: Self, b: Self) -> Self { return (a + (-b)) // } } 18. protocol AdditiveGroup { // … } protocol Ring: AdditiveGroup { // static var identity: Self { get } // 1 static func *
iOSエンジニアの高(@y_koh)です。 この度トレタではiPadアプリのSwift 3対応を行いました。どんな感じで進めたのかと、ハマったところなど共有できればなと思います。 対応自体は去年末には終えていましたが、年が明けて1/10にリリースしました。 年末は飲食店さま繁忙期のため、トレタではこの時期のアプリアップデートは控えています。例年このタイミングでリファクタリングやKaizenタスクなどを行っています。今回はSwift 3対応をメインに行いました。 先日サーバサイドもRailsを4.2にバージョンアップしています。言語やフレームワークのバージョンアップは機能改善に直接つながるものではないので後回しにしがちですが、将来的に負債になってしまうだけなので出来る限り時間を作って適宜アップデートするようにしています。 今回のSwift 3対応については、昨年のpotatotips#35で
Silver is a free implementation of Apple's Swift programming language. Built on over ten years of solid compiler knowledge and technology, with Silver, you can use Swift to write code directly against a wide range of development targets, from .NET over Java and Android to, of course, Cocoa. And you can also share a lot of non-UI code between platforms. Platforms With Elements, you can use the Swif
About the content This talk was delivered live in March 2017 at try! Swift Tokyo. The video was recorded, produced, and transcribed by Realm, and is published here with the permission of the conference organizers. Do you want to contribute to Swift? Not sure how or where to begin? It can be overwhelming! In this talk from the inaugural try! Swift conference, Jesse will help you explore the differe
こんにちは。リードアーキテクトのItoです。 前に予約していたNuAns NEOが届きました。かなりいい感じです。iPhoneと比べてしまうと、カメラ性能とアプリの少なさが気になりますが。 前回の記事では、Nodeベースのプロジェクト(Webサーバー)をSwiftに置き換えられるかという部分の話をしました。今回は前回からのアップデートや実際に運用してみたSwiftベースのサーバーサイドの話もしたいと思います。 Swift全体の動き、Swift本体(コンパイラ)のlatest build(masterブランチ)はSwift 3系になりました。 Swift(特にオープンソース版)の最新情報を追いたい場合は、以下のソースが参考になりました。 iOS Dev Weekly Swift Weekly Brief This week in Swift little bites of cocoa. Ch
第4回カジュアルSwift勉強会@青葉台に参加していたのですが、その休憩時間中にしていた雑談のなかで、swiftenvというものを教えてもらいました。その名の通り、plenvやpyenvといった複数バージョン切り替えツールのSwift版です。オープンソース版Swiftは定期的にスナップショットビルドが公開されていますが、swiftenvを使えばそれらをコマンド一発でインストールしたり切り替えたりできます。 インストール OSX環境で試したのでHomebrewを使いました。 % brew install kylef/formulae/swiftenv .zshrcに下記の内容を追加します。 path=($HOME/.swiftenv/bin(N-/) $path) if which swiftenv > /dev/null; then eval "$(swiftenv init - zsh)
Swiftがオープンソース化され、Linuxでも動作するようになりました。私はSwiftでアプリ開発を普段行っていますが、これを機にサーバー側も書いていきたいと思いました。 そこで今回はSwift製のWebフレームワークであるVaporを使ってみたので、紹介しようと思います。 Vaporとは 公式URLはこちらです。 https://github.com/tannernelson/vapor A Laravel/Lumen Inspired Web Framework for Swift that works on iOS, OS X, and Ubuntu. と説明が書いています。PHPのWebフレームワークのLaravelに影響を受けたフレームワークのようです。 これを使って、JSONを返すAPIを作成しました。 前提知識 Swiftとサーバーサイドの開発の経験があれば大丈夫です。He
Swift is a general-purpose programming language that's approachable for newcomers and powerful for experts. It is fast, modern, safe, and a joy to write. struct ScientificName: Codable { var genus: String var species: String var subspecies: String? } let momiji = ScientificName(genus: "Acer", species: "palmatum") let jsonData = try JSONEncoder().encode(momiji) // {"genus":"Acer","species":"palmatu
What is Perfect? Perfect is a web server and toolkit for developers using the Swift programming language to build applications and other REST services. It lets developers build using only Swift to program both the client-facing and server-side of their projects. It’s the ideal backbone for cloud and mobile technologies. Developers can be more productive and efficient using Perfect to write less co
こんにちはトレタでiOSエンジニアをしている@y_kohです。 今週はいよいよtry! Swiftカンファレンスですね。 微力ながらお力になれたらと思い、協賛させていただいています。 弊社からはiOSエンジニア二人(@y_koh, @horimislime)とも参加します。たくさんのiOSエンジニアのみなさんとお会いできることを楽しみにしています。 また今回トレタのことを少しでも知ってもらいたいと思い、ちょっとしたチラシを作成してみました。 トレタはB2Bサービスということもあって表面からは中々わかりにくいところが多いと思うんですよね。 内容は見てからのお楽しみですが、目印はこちらになります↓ では、会場で会えることを楽しみにしています!
Swift is now open source. For the latest news, visit the Swift open source blog UPDATE: To make it easier to follow along, we’ve included the code you see pasted in the video. So far the Swift blog has focused on advanced programming topics, including the design principles of the Swift language. We thought it would be helpful to provide content for programmers who are new to Swift and just trying
数日間iOS8/Xcode6/Swiftな環境で色々試してみて、Swiftを使っていて思ったよりがっかりした点が多かったのでちょっとまとめてみようと思います。 動的な処理がSwiftだけでは一切できない [NSObject performSelector:]の類と、NSInvocationがSwiftからは一切呼び出せません。使おうとすると怒られます。objc/runtime.hは試していませんが、同様に直接Swift経由では呼び出せず間にObjective-Cをかます必要があるのではないかと思われます。 @optionalなprotocolが限定的にしか使用できない 具体的には@objc属性を付けないと使えません。しかしながらこのような後方互換性のためだけに存在する属性をいつまでもAppleがサポートするかは疑問が残るというのと、もう一つ以下の様な問題があります。 @objc属性のついた
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く