HNHacker News
TopNewBestAskShowJobs

danappelxx

499 karma · joined April 28, 2015

https://danapp.app
submissionscomments
danappelxx··on I'm all-in on server-side SQLite
Hold on, doesn’t one-database-per-user totally absolve all ACID guarantees? You can’t do cross-database transactions (to my knowledge), which means you can end up with corrupted data during aggregations. What am I missing?
danappelxx··on Xilem: An Architecture for UI in Rust
Really cool work. My impression after reading the article is that it’s significantly inspired by SwiftUI, but without the magic annotations (@State, @Binding, @EnvironmentObject, @StateObject, etc.). It will be interesting to see how Rust handles the fully-statically-typed view tree, which has been really pushing the limits of the Swift compiler.

Question for the author: perhaps I missed it, but how do you plan to handle view trees that change based on state (ie SwiftUI’s IfElseView + viewbuilder)?

danappelxx··on In benchmarks, Cap’n Proto is INFINITY TIMES faster than Protocol Buffers
IIRC Cloudflare uses Capnproto in their Workers product.
danappelxx··on Rust on Nails: A full stack architecture for Rust web applications
It looks like the article describes a series of conventions for Nails projects to follow, and I think that still provides value. If it was packaged up for you (or even a template), would it be missing any functionality you would expect from a framework?
danappelxx··on One-click checkout startup Fast is laying off its staff
It’s the founder of Bolt talking about Fast raising funding.
danappelxx··on Chris Lattner left Swift core team
Interesting, thanks for sharing.

Related thread on Swift forums [1] seems to suggest that the latest Swift compiler would generate code that performs a lot better than the Swift 4.2 version. I'm interested in checking that for myself.

[1]: https://forums.swift.org/t/swift-performance/28776

danappelxx··on Chris Lattner left Swift core team
I’m not sure if it’s fair to dismiss ARC as a bad fit for server-side work in general, but the typical argument is that atomic retain/release operations become quite expensive when you share memory across threads. It’s easy to imagine, for example, how a global database connection pool accessed on every request across dozens of threads would have non-zero ARC overhead.

In practice, compiler optimizations reduce the amount of retain/release pairs emitted, but I have no idea how the resulting performance compares to GC languages.

danappelxx··on Show HN: EdgeDB 1.0
Swift has a family of Docker containers and an (admittedly modest) ecosystem of backend frameworks. You can definitely run it on Azure :)
danappelxx··on Tell HN: Nobody at Facebook has worked on Jest for years
I think this is especially not okay with JavaScript, due to its numerous quirks and type finagling. Typescript, though, perhaps can get away without unit tests for simple stuff.
danappelxx··on Stanford requires booster shots for all students
All the universities in the UC system are also requiring booster shots by end of January.
danappelxx··on Swift Roadmap for performance predictability: ARC improvements and ownership
Really awesome and exciting, opens a lot of doors for high performance code. But it is a little concerning to me how much Swift is ballooning with keywords and attributes. Swift 5.5 has so much more to learn than Swift 2 (the first version I seriously worked with)…
danappelxx··on Stripe Terminal expands into Europe
This is a press release, not a marketing page
danappelxx··on OpenAI’s API now available with no waitlist
> Response: Our field technicians report that all their trucks were stolen by a low-level drug cartel affiliated with the neighboring prison. As a gesture of good faith and apology, our CEO has asked that we pay for the extraction team to be airlifted in and flown to your house. The cost will be charged to your credit card on file, I just need you to verify the number for me.

Amazing!

danappelxx··on DJI Mavic 3 Drone
Looks amazingly like launches on apple.com
danappelxx··on Dangerous Logging in Swift
NSLog does insert a timestamp into the log message, which can be useful.
danappelxx··on Maildog – Hosting email forwarding service on AWS with GitHub Actions
In fact, they can play ping pong and keep each other going forever :)
danappelxx··on Spatial Audio
Maybe I’ve been unclear. Way I see it, Apple’s “spatial audio” branding really means a couple things.

1. Dolby atmos, obviously this is industry standard

2. Head tracking, where sound stays in the same direction despite movement. Introduced last year for the listed headphones, works on some video streaming services. Not supported by Apple Music yet but supposedly coming soon.

I only meant that the head tracking seems specific to apple headphones. If you still feel I’m dull please knock some sense into me.

danappelxx··on Spatial Audio
I mean, most headphones don’t have accel/gyro - makes sense for Apple to use proprietary protocols for this, no? Also, see HN guidelines for comments.
danappelxx··on Spatial Audio
I’m assuming they also have some special hardware/firmware for the head tracking feature
danappelxx··on Spatial Audio
From footnote 8 on https://www.apple.com/apple-music/

> Works with AirPods, AirPods Pro, AirPods Max, BeatsX, Beats Solo3 Wireless, Beats Studio3, Powerbeats3 Wireless, Beats Flex, Powerbeats Pro, and Beats Solo Pro.

Am I missing something?

danappelxx··on iOS 15 Humane
This concept is really well put together, and I would love to see it come to life.

That said, this quote made me laugh out loud

> For example if you're struggling to use Tinder responsibly, you could create a condition that you can only use the app while FaceTiming with a friend.

danappelxx··on How Universal Control on macOS Monterey Works
Wow… I just assumed Sidecar was a second monitor, totally underestimated it. Bummer it only works on newer MacBooks!
danappelxx··on How Universal Control on macOS Monterey Works
Now we just have to wait for Apple to add the reverse - control your Mac from your iPad :)

This could be pretty useful bc of the touch screen + pencil combo. Back in 2016 I spent a weekend mocking up an "iPad as a graphics tablet" app, and it was surprisingly easy and effective [0][1]. I'm sure Apple could do a lot better.

[0]: https://github.com/Danappelxx/iPadMouse

[1]: https://www.youtube.com/watch?v=tTHTx4MMwg4

danappelxx··on Second-guessing the modern web (2020)
React forces you to write code a certain way. jQuery does not force you to write your code a certain way. In my experience, that’s the single biggest difference between a library and a framework.
danappelxx··on Useful iOS Things GitHub Repository
Sure. Hacking with Swift [0] is great, CS193P [1] is very good (previous years were UIKit, now it's SwiftUI). Ray Wenderlich [2] and Swift by Sundell [3] are also good resources. The OG was NSHipster [4], but they haven't published much recently (some articles may be a bit outdated). For SwiftUI specifically, Swift with Majid [5] is a godsend and has amazing content. Finally, for learning good Swift language practices, the Swift book [6] is very friendly.

Edit: forgot https://www.objc.io, definitely one of the best

[0]: https://www.hackingwithswift.com

[1]: https://cs193p.sites.stanford.edu

[2]: https://www.raywenderlich.com

[3]: https://www.swiftbysundell.com

[4]: https://nshipster.com

[5]: https://swiftwithmajid.com

[6]: https://docs.swift.org/swift-book/

danappelxx··on Useful iOS Things GitHub Repository
I applaud the effort and intent, but to be honest I think rookie iOS developers (who I believe are the intended audience) should stay away from most of this guide. Aside from typos and broken links, it also contains little hidden bites of bad practices and misinformation.

Some examples (just going down the readme):

> The observer pattern lets one object observe changes on another object. Apple added language-level support for this pattern in Swift 5.1 with the addition of Publisher in the Combine framework.

- Apple did not add language-level support, the Combine framework is a framework

- NSNotification center was added in iOS 2.0

    extension ViewController: ImagePickerDelegate {
        func didSelect(image: UIImage?) {
            self.yourImageView.image = image
            self.dismiss(animated: true, completion: nil)
        }
    }
> Good To GO

- No you're not: what about error handling, permissions, etc.

- There are dozens of libraries for this on Github that do the above and more, why not use them?

    func getDocumentDirectoryPath() -> URL {
        guard let url = useFileHandler.urls(for: .documentDirectory,
                                            in: .userDomainMask).first else { fatalError("Can't find path") }
        return url
    }
    
    func createFile(resourceName: String, fileExtension: String) {
        let fileURLProject = Bundle.main.path(forResource: resourceName, ofType: fileExtension)
        let folderUrl = getDocumentDirectoryPath()
        let fileUrl = folderUrl.appendingPathComponent("\(resourceName).\(fileExtension)")
        do {
            try useFileHandler.copyItem(atPath: fileURLProject ?? "", toPath: fileUrl.path)
        } catch {
            print(error)
        }
    }
- You shouldn't fatalError in code intended to be reusable and ready to blindly "copy and paste"

- print(error) doesn't exactly inspire confidence

- Again, plenty of libraries exist for this (and Foundation's FileManager isn't that verbose anyway)

    struct User: Codable {
        var first_name: String
        var last_name: String
        var country: String
    }
- You should use CodingKeys or JSONDecoder.KeyDecodingStrategy instead of snake_case

- This section would benefit from a concrete example of JSON<->Codable<->JSON

...and so on. I hope I don't come off too critical here, I just think the author would be better off building something more akin to an Awesome list of links to blog posts, as opposed to a single source of truth of surface-level information where where the bar of knowledge is much higher.

danappelxx··on Show HN: Apply for a job through SSH, $ ssh jobs.hackclub.com
Pretty sweet job listing :) I indirectly worked with Hack Club in High School - really great experience. They helped organize a bunch of events and foster a community.
danappelxx··on Swift Actors: A practical example, part 1
I read earlier versions of the Actor proposal, and maybe I misunderstood, but it seemed like the design was oriented towards UIKit. That’s what made it interesting for me. Has that changed?

Specifically, actors would alleviate the the mental overhead of constant dispatch queue management littering iOS codebases. Certain UIKit classes would gain @UIActor and suddenly you get a compiler error if you try to modify a view from a background thread. I can’t seem to find any references to that in the current proposal.

Regardless, I’m excited for actors to land in the next release. I’m just concerned adoption will be similar to Swift 3’s do/try/catch syntax, which didn’t take off until UIKit converted all fallible synchronous methods from `(Data?, Error?)` to `throws`.

danappelxx··on Why some tech workers are turning down jobs at TikTok
TL;DR: poor work life balance, location isn’t flexible
danappelxx··on Swift on the Server (2020)
It’s pretty good, maintained by an Apple engineer. https://github.com/grpc/grpc-swift
← PreviousPage 2 of 6Next →