Remix.run Logo
rickstanley 10 hours ago

Toady I used GLM 4.7 to port a C++ project of mine to Rust, so I could read and toy with it, to get into the language: https://codeberg.org/RickStanley/agatetepe-rs.

Really interesting results, not sure how well it is written but works. I was quite found of Rust syntax; it certainly is not as convoluted as C++ (in my opinion).

Then I read this article. Since I was already eye-balling Swift for some time, I decided to give it a try and port to it, using Rust implementation as reference, and this time, without much of A. I. assistance, if I could help it.

I'm using an qcow2 Debian trixie arm image in UTM as playground. I found out that there is no packaging for Debian at the time of this writing: https://github.com/swiftlang/swift/issues/60690. No problem! They have a script for installing: https://www.swift.org/install/linux/

    curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz && \
    tar zxf swiftly-$(uname -m).tar.gz && \
    ./swiftly init --quiet-shell-followup && \
    . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" && \
    hash -r
But, god damn, the size is huge,

    Unsupported Linux platform
    Debian GNU/Linux 13 (trixie) is not an officially supported platform, but the toolchains for another platform may still work on it.
    Please select the platform to use for toolchain downloads:
    
    0) Cancel
    1) Ubuntu 24.04
    2) Ubuntu 22.04
    3) Ubuntu 20.04
    4) Ubuntu 18.04
    5) Fedora Linux 39
    6) RHEL 9
    7) Amazon Linux 2
    8) Debian GNU/Linux 12
    Pick one of the available selections [0-8] : 
    
    8 
    Installing swiftly in /home/debby/.local/share/swiftly/bin/swiftly...
    Creating shell environment file for the user...
    Updating profile...
    Fetching the latest stable Swift release...
    Installing Swift 6.2.3
                      Downloading Swift 6.2.3
    100% [========================================================]
    Downloaded 947.6 MiB of 947.6 MiB
    
    Verifying toolchain signature...
    Extracting toolchain...
    The file `/home/debby/ent/agateteper/.swift-version` has been set to `Swift 6.2.3`
    The global default toolchain has been set to `Swift 6.2.3`
    Swift 6.2.3 is installed successfully!
    There are some dependencies that should be installed before using this toolchain.
    You can run the following script as the system administrator (e.g. root) to prepare
    your system:
    
        apt-get -y install libicu-dev libcurl4-openssl-dev libedit-dev libsqlite3-dev 
        libncurses-dev libpython3-dev libxml2-dev pkg-config uuid-dev libstdc++-12-dev

947.6 MiB ! I wonder why is that...