波報 | Pofat 的 Swift 中文電子報

Share this post

波報 #32 - 降價打擊的 HomePod

pofat.substack.com

波報 #32 - 降價打擊的 HomePod

Swift 大小事 2023/1/30 - 2023/2/5

Pofat
Feb 7
Share this post

波報 #32 - 降價打擊的 HomePod

pofat.substack.com

💬 Pofat 的話

請原諒波報又延遲一日發刊,最近每週都有不同的突發小狀況(絕不是在打電動!),但還是要堅持發刊!

《看前一期 | 所有文章》


🌎 On Swift Community

HomePod

這次在外地依慣例尋訪蘋果直營店時正好是 HomePod 上市的第一天,店員們弄了一間舒服的客廳並把 HomdPod 擺在中間的櫃子上,大聲地放著搖滾樂,看到我在張望便邀請我進去坐著試聽。音質非常地通透清亮(原諒我木耳也沒有第一代 HomePod),單聽這音質我是會想買的,在不大的空間中表現很優秀。在和店員的聊天中得知,二代相較一代的聲音輸出更為精準,這代雖少了兩個單體和麥克風,大部分評測仍給出了音質相等的評價,注意只是相等。

其它差異還包含布料織法的不同、

Twitter avatar for @BasicAppleGuy
Basic Apple Guy @BasicAppleGuy
Left: 2018 HomePod Right: 2023 HomePod
Image
Image
8:01 PM ∙ Feb 4, 2023
695Likes20Retweets

以及可移除的電源線(人民的聲音),

Twitter avatar for @twostraws
Paul Hudson @twostraws
It’s a tiny thing, but thank goodness they introduced a removable power cable. (Okay, the old could technically also be removed, but I doubt most people dared.) An odd choice to have a custom connector, though, particularly given the direction of movement in the EU 👀
A HomePod removable power cable.
12:05 PM ∙ Feb 3, 2023

上述的差異加上減少了 50 美元的價格,你會心動嗎?

最後附上和水果店的合照,大家猜猜這是哪間分店。


The Evolution of Facebook’s iOS App Architecture

程式碼數量在 OS 規模的 iOS App 會採用怎麼的架構,FB iOS 的歷史演化讓你一窺究竟。

如何在 ScrollView 取得 offset

SwiftUI 的 ScrollView 本身並不支援這個很常被使用的功能,這篇文章提供了一種特別的思路來實現這個功能,當然少了不 Color.clear 夾帶 Preference 大法。

Twitter avatar for @danielsaidi
Daniel Saidi @danielsaidi
New blog post 📝 How to add scroll offset tracking to a #SwiftUI ScrollView, so that you can detect the scroll offset as you scroll: danielsaidi.com/blog/2023/02/0…
danielsaidi.comAdding scroll offset tracking to a SwiftUI ScrollViewThe SwiftUI ScrollView is currently pretty limited in functionality, and for instance doesn’t let us detect the current scroll offset. In this post, let’s look at how to add offset tracking to a scroll view, which we’ll then use to build a fun thing on top of the offset tracking.
10:07 AM ∙ Feb 6, 2023
16Likes2Retweets


SwiftUI 炸裂談

苦主的血淚體驗,tvOS 本來就是個艱難的環境,加上 SwiftUI 更雪上加霜。本來我都會說只你支援範圍保持在 iOS n-1 大多都會相安無事,但 iOS 16 各個子版本對 SwiftUI 諸多元件都有各自解讀,百花齊放,現在我也不敢這麼說了。

Twitter avatar for @llqoli
Ronnie W. @llqoli
整理了一下自己的 App 在使用 SwiftUI 時候的血壓 Bug,這是我這麼一年以來使用 SwiftUI 遇到的各種 Fuck SwiftUI 的問題。 SwiftUI = 從入門到放棄。
qoli.notion.siteNotion – The all-in-one workspace for your notes, tasks, wikis, and databases.A new tool that blends your everyday work apps into one. It’s the all-in-one workspace for you and your team
11:13 PM ∙ Jan 31, 2023
222Likes43Retweets


Rust Magazine 第一期

有鑑於 Swift 的 Rust 化,Rust 的事務也可以算是 Swift 社群的事了吧?

Rust Magazine 首期採訪到 Rust package manager 目前的主要維護者 Weihang Lo,關於加入 Rust 的心路歷程與挑戰、以及 Cargo team 如何運作。

Twitter avatar for @_hisriver
Folyd @_hisriver
准备了一个多月的 Rust Magazine 第一期终于发布了,感谢迟先生、yukang、施老师、张老师、Greptime 的贡献,我个人最喜欢的是我采访台湾朋友 Weihang Lo 这篇文章❤️❤️ @weihanglo
rustmagazine.orgInterview with Weihang LoI’m delighted to present the first interview article for Rust Magazine, featuring an insightful conversation with Weihang Lo. We first met at RustCon Asia 2019 in Beijing and have since become good fr
3:58 PM ∙ Feb 6, 2023
62Likes5Retweets


WebKit 也有 hard coding

這三個分別是 Microsoft,Outlook 和 PS。

Twitter avatar for @mhtx
Sam Tsai @mhtx
哇塞,WebKit 針對三個網站,把網址寫死在程式碼裡,特別處理😑
Twitter avatar for @awesomekling
Andreas Kling @awesomekling
Looking at this file from WebKit may change how you think about web browsers 😅 https://t.co/RWYRxDllZ6 https://t.co/N2HYalG5wq
2:10 AM ∙ Feb 6, 2023
22Likes4Retweets

🗣️ On Swift Forum

SE-0387: Cross-Compilation Destination Bundles (Reviewing)

Swift Cross Compile 的體驗仍然很不好,這顯然是 Swift Everywhere 的一大阻礙,而改善的方法自然是有更集中化的介面來管理,而最需要管理的自然是 build-time 與 run-time 的組合(在哪裡編譯 v.s. 在哪裡執行)。這個提案基於 SE-305 對 SPM Binary 對象的改良來繼續發展,會在 .artifactbundle 裡長出樹狀結構,並用頂層的 json 來存放 metadata。


Attached Macros (Pitching)

Swift Macros 的第二步,這個提案可以讓你只要在需要的地方加上標記(需要遵循 AttachedMacro),便能依場所生成不同的程式碼:

  • Peer macros:使用在函數上,能夠改變其宣告介面,例如自動新增 completion handler 的參數。

  • Member macros:使用在物件上,比如為 OptionSet 生成每個 Option 的 rawValue。

  • Accessor macros:使用在 property 上,可以生成 getter setter。

對於整個 Swift Macros 的發展狀況有興趣的可以參考這個統一整理的文件。


🤪 Pofat 選推

很棒的入行心路歷程和實用的建議

Twitter avatar for @yschen25
卡卡跟其他 8051 隻小海豹 🦭 @yschen25
感謝僅僱用前 3% 的 freelancers 的公司 @toptal 分享我之前轉職工程師的文章🙏 有興趣也可以看看我的心路歷程 (1) : 從睡廁所到睡公司的軟體工程師之路yschen25.blogspot.com/2022/07/become…
Twitter avatar for @J_Toptal
Global Tech News 🌍🤖 @J_Toptal
Becoming a programmer is difficult and I really appreciate how this piece breakdown tips and resources to help you start from scratch. Thank you, @ @YiShiuanChen for sharing this https://t.co/XVeXiXiO1s
10:33 AM ∙ Feb 2, 2023
99Likes14Retweets

我常忘

Twitter avatar for @PatrickWolowicz
Patrick Wolowicz @PatrickWolowicz
When you forget to activate an NSLayoutConstraint. 😉
8:28 PM ∙ Jan 30, 2023
130Likes8Retweets

Netflix

Twitter avatar for @TaraOComics
Tara O'Connor ⚡️ @TaraOComics
Pssst, @netflix, maybe you need look inwardly on this one…
Skinner meme: Maybe we’re losing subscribers and money cos we keep cancelling shows that people really love to the point where people won’t actively get invested anymore. 
No, it must be password sharing.
Twitter avatar for @DiscussingFilm
DiscussingFilm @DiscussingFilm
Netflix’s has introduced their anti-password sharing method: Once every 31 days, your device must log in on your home Wi-Fi network or your account will be blocked. (via: https://t.co/53hIxoWujK) https://t.co/AAKZnYUUIG
10:52 AM ∙ Feb 3, 2023
262Likes53Retweets

好圓

Twitter avatar for @twostraws
Paul Hudson @twostraws
Help, my dog is round!
A fluffy white dog is wooing loudly, but with her head tilted back she looks like a ball of fluff with a nose.
4:32 PM ∙ Feb 5, 2023
415Likes9Retweets

迴轉壽司信任危機解方:非對稱加密

Twitter avatar for @rebecca_hoshino
阿米娜・阔伊姆@二代目 @rebecca_hoshino
Image
12:49 PM ∙ Feb 1, 2023
1,260Likes114Retweets
Share this post

波報 #32 - 降價打擊的 HomePod

pofat.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Pofat
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing