!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
3 Jul 2025
@zhaofeng:zhaofeng.liZhaofeng Lithe more interesting things in "cool" filesystems nowadays being cow, snapshot, checksums, etc01:10:10
@saiko:knifepoint.netKatalin 🔪

speaking of pointer stuff, behold: QString.init(string:)

extension QString {
  public init(string: String?) {
    #if os(macOS)
      self = QString.fromNSString(string)
    #else
      guard let string else {
        self = QString()
        return
      }

      self = string.withCString(encodedAs: UTF16.self) { data in
        QString(
          UnsafeRawPointer(data).bindMemory(to: QChar.self, capacity: string.utf16.count),
          qsizetype(string.utf16.count))
      }
    #endif
  }
}
01:10:16
@saiko:knifepoint.netKatalin 🔪the other way around is actually a lot more ugly01:11:04
@zhaofeng:zhaofeng.liZhaofeng LiQString... qt?01:12:17
@saiko:knifepoint.netKatalin 🔪yeah01:12:24
@reckenrode:matrix.orgRandy EckenrodeIs that using C++ interop?01:12:46
@saiko:knifepoint.netKatalin 🔪yeah01:12:54
@zhaofeng:zhaofeng.liZhaofeng Liand you know what, I also get the use-case for non-macOS...01:13:06
@saiko:knifepoint.netKatalin 🔪the full thing: https://paste.sr.ht/~dblsaiko/ba4810c92637b0e3a3b56076e53b292c778f28ac01:13:24
* @zhaofeng:zhaofeng.liZhaofeng Li went into a rabbit hole with the android client of quassel a while ago, and it had a bespoke qt binding01:13:54
@zhaofeng:zhaofeng.liZhaofeng Libecause the whole thing is based QDataStreams01:14:41
@zhaofeng:zhaofeng.liZhaofeng Li* because the whole thing is based on QDataStreams01:14:51
@saiko:knifepoint.netKatalin 🔪that has an android port? huh01:17:18
@saiko:knifepoint.netKatalin 🔪the IRC client?01:17:24
@zhaofeng:zhaofeng.liZhaofeng Liyeah, but it was the best bouncer that I had used before I tried IRCCloud01:18:05
@saiko:knifepoint.netKatalin 🔪ah, makes sense01:18:36
@zhaofeng:zhaofeng.liZhaofeng Libecause it wasn't actually a bouncer but used its own protocol so it could provide actual scrollback, notifications, etc01:18:48
@saiko:knifepoint.netKatalin 🔪I already have a bouncer so the whole client/server thing it has going on is just really awkward to me01:19:07
@zhaofeng:zhaofeng.liZhaofeng Li* because it's not actually a bouncer but uses its own protocol so it can provide actual scrollback, notifications, etc (let's not use past tense as it's probably still alive :p)01:19:38
@saiko:knifepoint.netKatalin 🔪
In reply to @zhaofeng:zhaofeng.li
QString... qt?
(also, unfortunately anything QObject straight up doesn’t import. RIP)
01:19:51
@saiko:knifepoint.netKatalin 🔪it would have been cool to at least be able to pass them around01:20:37
@saiko:knifepoint.netKatalin 🔪iirc it was something about its constructor or destructor01:20:50
@saiko:knifepoint.netKatalin 🔪oh right, yeah01:35:15
@saiko:knifepoint.netKatalin 🔪they’re immovable types obviously, and as such they have a deleted move constructor, I think that was it01:35:44
@saiko:knifepoint.netKatalin 🔪it would probably be fine if they were marked with the “import_as_ref” swift attr but obviously I can’t do that with foreign library code01:36:14
@reckenrode:matrix.orgRandy Eckenrode When did libc++ get std::span? 01:38:03
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/apple-oss-distributions/ICU/blob/71e88350afd8f8bcbb8a387edafd090de9ff7cca/icu/icu4c/source/i18n/dtptngen.cpp#L51-L5402:22:05
@reckenrode:matrix.orgRandy Eckenrode☹️02:22:13
@reckenrode:matrix.orgRandy EckenrodeI got past that, but a test is failing because Apple did not include the test data. It should be fixable, but I need to get some sleep. I’ll work on it tomorrow.03:41:44
@niklaskorz:matrix.orgniklaskorz oh no 🫠 maybe swift-foundation-icu helps? that does not include a private header there 06:57:44

Show newer messages


Back to Room ListRoom Version: 6