Загрузка видео...

Не удалось загрузить видео

На главную

Want to visualize what changes cause your SwiftUI views to update without having to add print statements? ✨ The new SwiftUI Instrument in Xcode 26 shipped with a pretty hidden feature called Cause & Effect Graph. Tap any view and see exactly which state updates triggered each re-render, perfect...

33,293 просмотров • 6 месяцев назад •via X (Twitter)

Комментарии: 0

Нет доступных комментариев

Здесь появятся комментарии из оригинального поста

Похожие видео

I learned this the hard way: do NOT use SwiftUI if you want your app to look and feel amazing. At least when coding with AI. (sorry, Apple colleagues reading this 😅) I'm sharing my process vibe coding this calorie tracker. I get a lot of questions about the fluid transition in the video. Here's the whole story. Initially, Claude built the grid with SwiftUI. It was quick and easy, and looked good! But the transition to the day view was a boring navigation push/pop. No fun. I wanted something custom. I asked Claude to make it a fluid transition that remaps the food tiles from their source to destination positions. All hell broke loose. Claude tried a bunch of horrible things. Initially it used matched geometry effects, which worked OK but didn't lend themselves well to gesture-driven animations. So it resorted to SwiftUI preference keys + geometry readers to figure out the source and destination positions and calculate the interpolated position based on gesture progress, coordinating across grid and day views. But this meant it had to write a custom layout because it couldn't reposition tiles inside the native SwiftUI grid. And it had to do an awkward handoff between views, which always created ugly pops or jumps. And don't get me started on trying to put it on a bouncy spring, that only made the math 10x buggier. Fortunately, Claude Fable was smart enough to see that this was becoming a disaster (and discover most of the issues itself, in the simulator), so it pivoted away from SwiftUI. Opus might not be so wise, so you'll have to pay attention and intervene. Ultimately, it rewrote it in plain UIKit and everything turned out great. After that, we moved from 2D images to 3D assets, which introduced a new set of performance challenges and yet another rewrite to a single Metal layer, which is what you see below. I can write more about the 2D-to-3D saga if anyone's interested. If I were to do it again, I'd just say "Don't use SwiftUI" from the very first prompt, and save a few hours of headaches. SwiftUI can be amazing for a human iterating directly in code. But agents don't benefit from any of its advantages. Plus, agents have seen decades of UIKit training data, so they're great at writing it, and it's far more flexible. Here's hoping we see more agent-friendly iterations of SwiftUI in the future. Till then, I'm probably going to avoid it.

Anshu

107,685 просмотров • 27 дней назад

[Graph Convolutional Network] by hand ✍️ Graph Convolutional Networks (GCNs), introduced by Thomas Kipf and Max Welling in 2017, have emerged as a powerful tool in the analysis and interpretation of data structured as graphs. This exercise demonstrates how GCN works in a simple application: binary classification. -- Goal -- Predict if a node in a graph is X. -- Architecture -- 🟪 Graph Convolutional Network (GCN) 1. GCN1(4,3) 2. GCN2(3,3) 🟦 Fully Connected Network (FCN) 1. Linear1(3,5) 2. ReLU 3. Linear2(5,1) 4. Sigmoid Simplications: • Adjacent matrices are not normalized. • ReLU is applied to messages directly. -- Walkthrough -- [1] Given ↳ A graph with five nodes A, B, C, D, E [2] 🟩 Adjacency Matrix: Neighbors ↳ Add 1 for each edge to neighbors ↳ Repeat in both directions (e.g., A->C, C->A) ↳ Repeat for both GCN layers [3] 🟩 Adjacency Matrix: Self ↳ Add 1's for each self loop ↳ Equivalent to adding the identity matrix ↳ Repeat for both GCN layers [4] 🟪 GCN1: Messages ↳ Multiply the node embeddings 🟨 with weights and biases ↳ Apply ReLU (negatives → 0) ↳ The result is one message per node [5] 🟪 GCN1: Pooling ↳ Multiply the messages with the adjacent matrix ↳ The purpose is the pool messages from each node's neighbors as well as from the node itself. ↳ The result is a new feature per node [6] 🟪 GCN1: Visualize ↳ For node 1, visualize how messages are pooled to obtain a new feature for better understanding ↳ [3,0,1] + [1,0,0] = [4,0,1] [7] 🟪 GCN2: Messages ↳ Multiply the node features with weights and biases ↳ Apply ReLU (negatives → 0) ↳ The result is one message per node [8] 🟪 GCN2: Pooling ↳ Multiply the messages with the adjacent matrix ↳ The result is a new feature per node [9] 🟪 GCN2: Visualize ↳ For node 3, visualize how messages are pooled to obtain a new feature for better understanding ↳ [1,2,4] + [1,3,5] + [0,0,1] = [2,5,10] [10] 🟦 FCN: Linear 1 + ReLU ↳ Multiply node features with weights and biases ↳ Apply ReLU (negatives → 0) ↳ The result is a new feature per node ↳ Unlike in GCN layers, no messages from other nodes are included. [11] 🟦 FCN: Linear 2 ↳ Multiply node features with weights and biases [12] 🟦 FCN: Sigmoid ↳ Apply the Sigmoid activation function ↳ The purpose is to obtain a probability value for each node ↳ One way to calculate Sigmoid by hand ✍️ is to use the approximation below: • >= 3 → 1 • 0 → 0.5 • <= -3 → 0 -- Outputs -- A: 0 (Very unlikely) B: 1 (Very likely) C: 1 (Very likely) D: 1 (Very likely) E: 0.5 (Neutral)

Tom Yeh

46,499 просмотров • 1 год назад

(Yes i know the movement is exaggerated, its just to show the motion, it also doeant move like jello when in vr) -Left is before, Right is after- Ok wall of text time for the nerds Literally everything is the same on both sides except the position of 1 bone (made sure that even after adjusting, the collider would still be in the same spot) The reason for this change is because she wanted to be able to clap her ass in vr, and last time i did this all i did was add a toggle for a hidden bone that moved, and its angle would trigger the sound. Which was because that with my previous position, the cheeks could never really meet in the middle when in motion unless you just pushed them together with your hands, and i wanted to just have the sound actually be triggered by them colliding with each other This is also the first time ive used endbones to help drive the movement, so now thanks to that and all my previous experimenting with squishing as well, I can now get bones to move exactly how i want them to move when in natural motion. And i know a lot of people are gonna ask me to teach them how or explain my thought process but i literally just go off feeling lmao. Like, i just kinda visualize in my head how i want the motion to look, and then i just kinda know where to put everything, so im not even sure how to even start explaining rip. I have the things that artist want where they can just make the shit in their head exactly how they envisioned it lol I have a few more ideas i want to try, so we'll see if theyre good enough to get a tweet lol Thank you for coming to my ted talk

Pixel

27,240 просмотров • 1 год назад

I just built a Meta Ads diagnostic in Claude Code that tells you WHY your account broke, not just what changed 🤯 It spins up a team of agents that each investigate a different reason performance dropped, then argue against each other to kill the wrong answer before it ever reaches you. All inside Claude Code. Perfect for DTC brands and agencies who panic-kill creative the second CPA spikes. If you've watched ROAS fall off a cliff and opened Ads Manager with ten tabs going, you already know what happens next. Your gut says "creative fatigue." You kill your best-performing ad. A week later performance is still broken, because that was never the problem. Guessing wrong is the most expensive move in paid social. This workflow ends the guessing: → One agent investigates each competing theory — creative fatigue, budget and delivery changes, traffic quality, offer and seasonality → Each one is blind to the others, reasoning only from its own slice of the data so they can't bias each other → A refuter agent then attacks every surviving theory and tries to kill it → A theory only stands if the data can't disprove it → You get a ranked diagnosis: the real cause, the evidence for and against it, and the one move to make this week No anchoring on the first obvious answer. No killing winning creative on a hunch. No "here's what happened" reports that never tell you why. What you get: → Every theory tested in parallel instead of one biased guess → An adversarial pass that kills the wrong answer before you act on it → A ranked diagnosis with confidence levels and evidence both ways → A reusable workflow you drop next month's export into and re-run Built 100% in Claude Code with the new dynamic workflows. The first account I ran it on looked like textbook creative fatigue. The workflow disagreed, and traced the real cause to a budget change that had doubled spend and flooded delivery with junk traffic. I put together a full playbook with the exact workflow, the prompt, and how to run it on your own account. Want it for free? > Like this post > Comment "META" And I'll send it over (must be following so I can DM)

Mike Futia

12,670 просмотров • 1 месяц назад

Season 2 of Valiants: Tap-Tap is here!🌟 It’s time to dive into the new and exciting world of Valoria! Here’s everything you need to know: Now available here! 🔥 New Points Store Your efforts in Season 1 have paid off. Now, you can use your store points to redeem amazing rewards. What will you find? Surprise boxes containing exclusive items in Valiants: Tap-Tap and Valiants: Arena, NFTs that you can trade in the future, and a portion of the $VGN Airdrop allocation. Important: For now, the boxes can only be purchased, but soon you’ll be able to open them to discover what’s inside. Stay tuned for updates so you don’t miss anything! 🕒 🎁 Wild Spin - Spin and Win Introducing the new **Wild Spin**, where each spin could change your fate. Spins will be awarded based on the activity and performance of your friends with a good User Score. So, stay active and keep connecting with your teammates to maximize your chances! What can you win? Experience, unlocks, and even USDT prizes that you can withdraw directly to your airdrop wallet. Tip: Use your USDT winnings to purchase additional spins and keep the wheel turning. How far will your luck take you? 🎰 💥New Valiants and Items The battle in Valoria heats up with the arrival of new Valiants and accessories. These exclusive items will allow you to explore new strategies and challenge your opponents like never before. 📋 Patch Notes Not only are we introducing new features, but we’ve also made several improvements and adjustments to provide you with a smoother and more satisfying gaming experience. Here are all the details: - Daily Combo Changes: The combo is now linear, meaning the challenge has increased. Can you keep up the streak? This change is designed to reward the most skilled and dedicated players. - Daily Login Update: Starting from day 10, the rewards get even better. Don’t miss a single day to maximize your benefits! We’ve also adjusted the progression so that each login brings you closer to more significant rewards. - Complete UI Redesign: We’ve revamped the entire user interface to make it more intuitive and visually appealing. Additionally, you can now choose between two visual themes: the serenity of Kai or the energy of Mimi. We’ve even added some music to accompany your adventure! These improvements are designed to make your time in Valoria even more enjoyable. We hope you love them as much as we do! ✨Don’t miss out on this new adventure! Explore all the new features in Season 2 and discover how to dominate the new world of Valoria. Remember, every decision can bring you one step closer to victory. See you in the game!🔥

Valiants

81,606 просмотров • 1 год назад