Raspberry BASIC > Swift

Swift RPi

(1/2) > >>

admin:
@hippy,

Download the latest 5.1.2 build below and follow the install instructions.

Great if you would join us here.

John Spikowski:
I submitted an issue on  the Swift for ARM repository and the maintainer said he wasn't seeing the IF compare issue with  the current build (5.12) of the Swift compiler. The posted binaries are 5.11 so I decided to build Swift from source. This repository is a front end  build for the RPi but grabs the source from Apple's release source repositories. I had to move the llvm-project directory of files/directories down to base directory so the build.sh script would run. Since I'm building on the RPi 4B with 4 GB of memory, I passed on the swap file set of instructions.  I'll post the release .tar.gz when it finishes the build, (says a couple hours)

John Spikowski:
The Swift 5.12 build was successful and it built the distribution tar.gz. I screwed up with 5.11 and installed it in /usr/bin instead of /home/pi/user/bin. One should add this directory to their path.

I'll post a link or attach 5.12 once I do some basic testing.

John Spikowski:
I built and uploaded Swift 5.1.2 released on November 7, 2019 and put it on the server. I plan to create a Swift child board under Other Languages that I will added to the forum. The goal to find a mentor for each of the languages.

swift-5.1.2_armv7.tgz Download

Extract to your user directory and add PATH="$HOME/usr/bin:$PATH" to the system path.

Install dependencies.  sudo apt install clang libicu-dev libcurl4-nss-dev curl


I attached a tar -t listing of the release if you want to see what is included.

I'm looking forward to hear your experience with Swift on the RPi.


John Spikowski:
I installed Swift for Windows and ran the 1mil3.swift (compiled) on my new laptop running Windows 10 Pro.


PS C:\Swift\examples> Measure-Command {.\main.exe | Out-Default}
r LEN:  999986
Front: ZYXWVUTSRQPONMLKJIHGFEDCBA
Back:  ZYXWVUTSRQPONMLKJIHGFEDCBA
UBVal:  100000


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 1
Milliseconds      : 305
Ticks             : 13053398
TotalDays         : 1.5108099537037E-05
TotalHours        : 0.000362594388888889
TotalMinutes      : 0.0217556633333333
TotalSeconds      : 1.3053398
TotalMilliseconds : 1305.3398



PS C:\Swift\examples>


No idea why this is so slow on the RPi 4B.

Navigation

[0] Message Index

[#] Next page

Go to full version