GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Jonathan Wight (schwa@mastodon.social)'s status on Wednesday, 23-Apr-2025 00:38:59 JST Jonathan Wight Jonathan Wight

    Reminder that just because you can it doesn’t mean you should.

    “Config as code” is a bug not a feature.

    Config should be easy to reason with and understand. Being forced to run the code to understand what the configuration is, is a huge failure.

    Package.swift should have been something like TOML (or whatever) with a suitably expressive schema instead…
    https://chaos.social/@ole/114381265023437618

    In conversation about 2 months ago from mastodon.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: assets.chaos.social
      Ole Begemann (@ole@chaos.social)
      from Ole Begemann
      Attached: 1 image Reminder that SwiftPM package manifests are Swift code, so you can write loops etc. in them. I use this in some of my packages to enable the same upcoming language features for all targets. Example: https://gist.github.com/ole/c0f4de915a483edb5e6df5f1ad677fb5 This isn’t particularly useful for complex projects where you might want to migrate to Swift 6 mode module-by-module, but for small and simple packages it’s usually easy to stay on the cutting edge of Swift. #SwiftLang
    • Embed this notice
      Jonathan Wight (schwa@mastodon.social)'s status on Wednesday, 23-Apr-2025 00:38:58 JST Jonathan Wight Jonathan Wight
      in reply to

      This is where someone points out `describe --type json`…

      Which *checks notes* converts Package.swift into "something like TOML (or whatever) with a suitably expressive scheme" (in this case JSON but whatever indeed).

      In conversation about 2 months ago permalink
    • Embed this notice
      Jonathan Wight (schwa@mastodon.social)'s status on Wednesday, 23-Apr-2025 00:38:58 JST Jonathan Wight Jonathan Wight
      in reply to

      Dealing with even the most trivial syntax errors in Package.swift is one of the most time consuming and frustrating experiences. Xcode just shits the bed and often gives you little to no information on what failed.

      Even something like an extra comma in your Package.swift would cause inscrutable package resolution errors.

      And they had to rev the _entire_ Swift language to solve that particular problem…

      In conversation about 2 months ago permalink
    • Embed this notice
      Paul Cantrell (inthehands@hachyderm.io)'s status on Wednesday, 23-Apr-2025 00:38:58 JST Paul Cantrell Paul Cantrell
      in reply to

      @schwa
      Agreed. Ruby’s Bundler works so nicely for exactly the same problem space, and I’ve mulled why. It also uses code as config, which agreed is super dicey, but…the code is pretty string-y, and feels much more like config than a SwiftPM manifest does. SwiftPM’s only half-successful attempts to type everything so strongly are one major source of pain.

      In conversation about 2 months ago permalink
    • Embed this notice
      Jonathan Wight (schwa@mastodon.social)'s status on Wednesday, 23-Apr-2025 00:38:59 JST Jonathan Wight Jonathan Wight
      in reply to

      Trivial example of where config as code falls down.

      Ever had to write` platforms: [.macOS("15.0”)]`, instead of `.v15`?

      Congrats, you've just run into a problem directly caused by config as code. The fact that older SPMs can't even compile newer Package.swifts _is_ a problem.

      The fact that you (and you tools) can't validate Package.swift without compiling it is a bigger one of course.

      In conversation about 2 months ago permalink
    • Embed this notice
      Paul Cantrell (inthehands@hachyderm.io)'s status on Wednesday, 23-Apr-2025 03:30:36 JST Paul Cantrell Paul Cantrell
      in reply to

      @schwa Ruby’s look like the one in the screenshot. (A “gem” is the language’s name for a library dependency.) eDSLs are an area of strength for the language — but also note how much of the actual data is just in raw strings.

      In conversation about 2 months ago permalink

      Attachments


      1. https://media.hachyderm.io/media_attachments/files/114/383/037/035/907/586/original/8311ca2cc381359d.png
    • Embed this notice
      Jonathan Wight (schwa@mastodon.social)'s status on Wednesday, 23-Apr-2025 03:30:37 JST Jonathan Wight Jonathan Wight
      in reply to
      • Paul Cantrell

      @inthehands I can’t speak for ruby. But I look at something like Rust’s cargo.toml with envy. A package config that is easy to read, reason with and edit? Why can’t we swift developers have that.

      Instead we have folks putting for loops into Package.swift. Ugh.

      In conversation about 2 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.