News for hackers. Stuff that matters.
Re:Taylor – Swift on bare metal by paulvs on Monday September 05, 2016 @10:31PM (#12433316)
Could someone please explain what this project is about? I gather it's a new implementation of the Swift language without using Xcode's compiler and Swift standard library, but I find the full readme very undescriptive of what this is and why it's useful.

EDIT: Clicking through the source I found about a dozen files in total, mostly scripts and make files.

Re:Taylor – Swift on bare metal by gilgoomesh on Monday September 05, 2016 @11:20PM (#12433462)
It builds Swift without any standard library, runtime or linkage to other components. This isn't normally possible with the Swift compiler.

The solution doesn't involve changing the compiler or building everything into the executable. Instead, this is a makefile coordinated pipeline (front-end swiftc, back-end clang) plus a start.s and a system.c file that omit any need for typical standard library components in the first place.

i.e. a "bare metal" compilation

Re:Taylor – Swift on bare metal by blkhp19 on Monday September 05, 2016 @11:38PM (#12433512)
Without the swift standard library, what can be done? Doesn't the standard library include all of the basic types, like Array, Int, etc?
Re:Taylor – Swift on bare metal by kr7 on Tuesday September 06, 2016 @12:33AM (#12433682)
Fixed-size integers and UnsafeMutablePointer are supported, so it is basically C with different syntax:

https://github.com/klange/taylor/blob/master/src/main.swift

Re:Taylor – Swift on bare metal by pjmlp on Tuesday September 06, 2016 @02:45AM (#12434028)
Except it has a stronger type checking and safety.
Re:Taylor – Swift on bare metal by posterboy on Thursday September 08, 2016 @08:34AM (#12452366)
sounds good, what's the draw back like?
Re:Taylor – Swift on bare metal by TheHydroImpulse on Monday September 05, 2016 @11:09PM (#12433437)
It's not a new implementation so much as compiling Swift for different architectures and environments not supported by the compiler.

It still uses the Swift compiler but emits LLVM IR and then uses Clang to target to the different environments.

Re:Taylor – Swift on bare metal by kr7 on Tuesday September 06, 2016 @12:30AM (#12433667)
The assembler and Makefile are x86 only. I'm not seeing support for other architectures.
Re:Taylor – Swift on bare metal by kr7 on Tuesday September 06, 2016 @12:24AM (#12433651)
It is for running Swift code without an operating system.

It could be used to write a kernel in Swift.

Re:Taylor – Swift on bare metal by danieleggert on Tuesday September 06, 2016 @03:10AM (#12434138)
You can use swiftc (the Swift compiler) without Xcode just like you can use clang without Xcode. Xcode is just an IDE.