!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1080 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org164 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
2 Jul 2025
@saiko:knifepoint.netKatalin 🔪 well, they do have availability annotations, so in theory it would be possible to write libraries that strip themselves down when certain features are unavailable. I have no idea how feasible this is though 14:20:40
@saiko:knifepoint.netKatalin 🔪but yeah it’s something that would have to be explicitly done and most people just wouldn't14:21:10
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
do Swift language versions interoperate?
Yes.
14:40:26
@reckenrode:matrix.orgRandy Eckenrode
In reply to @saiko:knifepoint.net

Swift Concurrency Partial, experimental (basics of actors and tasks work in single-threaded concurrency mode)

👀

Yeah, this is what I was thinking of. That’s (more or less) what you would be doing with Rust in an environment like that.
14:43:06
@reckenrode:matrix.orgRandy Eckenrode
In reply to @saiko:knifepoint.net

Swift Concurrency Partial, experimental (basics of actors and tasks work in single-threaded concurrency mode)

👀

*
14:43:21
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
where the ergonomics are likely to be bad and ecosystem support nonexistent
Does D support no-GC types? Swift has value types and move-only in the core
language. The no-allocation subset is banning the types that allocate, which doesn’t seem like the same thing.
14:45:54
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
where the ergonomics are likely to be bad and ecosystem support nonexistent
*

Does D support no-GC types?

Swift has value types and move-only in the core language. The no-allocation subset is banning the types that allocate, which doesn’t seem like the same thing.

14:46:06
@reckenrode:matrix.orgRandy Eckenrode
In reply to @saiko:knifepoint.net
since the main ecosystem uses Foundation and Foundation is huge (and tbh I like that it is), yeah makes sense
This is a problem for non-embedded as well. Until Apple rewrote it and shared the implementation across platforms, Foundation on Linux and Darwin were different and not always compatible. (Never mind those who want to use platform APIs without caring about portability.)
14:47:58
@reckenrode:matrix.orgRandy Eckenrode
In reply to @reckenrode:matrix.org
Does D support no-GC types? Swift has value types and move-only in the core
language. The no-allocation subset is banning the types that allocate, which doesn’t seem like the same thing.
It’s like saying you can’t use Box or Rc in embedded Rust. A crate that uses those obviously won’t be usable in that case.
14:49:10
@reckenrode:matrix.orgRandy EckenrodeThat’s not saying Swift packages are going to be good about avoiding classes when they don’t need to use them. They probably have some work to do if they want to avoid allocations, which is good even in non-embedded to avoid unnecessary ref-counting.14:51:08
@reckenrode:matrix.orgRandy EckenrodeBut Swift Embedded is still pretty new. Apple is using it for firmware, but they’ve not said anything about that experience other than that are. We’ll have to wait and see how things play out and whether Swift turns into a viable language for that purpose.14:54:05
@reckenrode:matrix.orgRandy EckenrodeSwift is also getting a WASM target. I’m going to have to package that too. 😭14:55:30
@reckenrode:matrix.orgRandy EckenrodeThere’s an opportunity for Nix to establish itself as the way to build Swift applications for these targets, but we’ve got ~no maintainers to do it.14:56:23
@reckenrode:matrix.orgRandy Eckenrode * 14:58:06
@reckenrode:matrix.orgRandy Eckenrode * 14:58:22
@zhaofeng:zhaofeng.liZhaofeng Li well, you can, if you implement the allocator interface everything from alloc will become usable. the cool thing about Rust is that it's all done on the library level and there's little compiler magic involved 17:03:08
@zhaofeng:zhaofeng.liZhaofeng Li by the way, is there a way to inspect the swift interfaces generated from -import-objc-header? 17:22:51
@zhaofeng:zhaofeng.liZhaofeng Li all the automatic rewriting from - (void)dostuffWithCompletionHandler:(void (^)(Stuff *))completion; to doStuff(_ withCompletion:) is just too... magical (in a bad way) 17:22:57
@zhaofeng:zhaofeng.liZhaofeng Liand depending on the parameter naming and type, sometimes Swift will automatically give you an async func, sometimes not17:23:52
@zhaofeng:zhaofeng.liZhaofeng Lialso https://developer.apple.com/documentation/swift/calling-objective-c-apis-asynchronously does not tell the whole truth - I have a method that meets all requirements there yet swift does not automatically give me an async version 🤷‍♂️17:25:53
@reckenrode:matrix.orgRandy Eckenrode Is it being throw off by the Handler in the name? 19:22:38
@reckenrode:matrix.orgRandy Eckenrode * Is it being thrown off by the Handler in the name? 19:22:46
@reckenrode:matrix.orgRandy EckenrodeOh, got to the part of the documentation where that should work.19:23:52
@reckenrode:matrix.orgRandy Eckenrode * 19:24:04
@zhaofeng:zhaofeng.liZhaofeng LiYeah, a bit confused at the behavior that I still don't totally get. The end result looks nice and Swift-y but I really dislike the magical aspect of it19:30:01
@saiko:knifepoint.netKatalin 🔪I’m pretty sure there are annotations to manually set the imported name but I can’t find them right now20:45:23
@zhaofeng:zhaofeng.liZhaofeng Li name is one issue, but it's also annoying not to have the async variants automatically implemented for me sometimes 20:46:50
@zhaofeng:zhaofeng.liZhaofeng Li... and not have a way to know when/why it happens 🙃20:48:04
@saiko:knifepoint.netKatalin 🔪aha https://forums.swift.org/t/concurrency-interoperability-with-objective-c/41616#additional-objective-c-attributes-1020:48:55

Show newer messages


Back to Room ListRoom Version: 6