
Taylor – Swift on bare metal - tambourine_man
https://github.com/klange/taylor
======
klange
I'm the author. This wasn't something anyone was supposed to 'find', it's not
even really a 'project', just a quick hack to demonstrate a point; I don't
even think it's valid to say the project name is "taylor", it's just the name
of the repository - I probably should have just called it "swift-on-baremetal"
or something equally boring. I have a history of my stupid little 'projects'
showing up on HN.

~~~
tempodox
I'm curious as to what kind of bare metal is meant. From the “ elf_i386”
target I infer it's some kind of Linux machine?

~~~
klange
The code in the repository builds a multiboot-compatible x86 "kernel" that can
be booted with GRUB or iPXE or any number of other bootloaders supporting the
format.

------
andrewfromx
whatever, that is the best name I've seen for an OS project all year. Bravo.

~~~
proyb2
I had thought most of us know this video presentation. Still an interesting
video.

[https://realm.io/news/swift-summit-jorge-izquierdo-taylor-
ht...](https://realm.io/news/swift-summit-jorge-izquierdo-taylor-http-server-
library/)

There are a few talks on Swift in Realm conference.

------
paulvs
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.

~~~
gilgoomesh
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

~~~
blkhp19
Without the swift standard library, what can be done? Doesn't the standard
library include all of the basic types, like Array, Int, etc?

~~~
kr7
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](https://github.com/klange/taylor/blob/master/src/main.swift)

~~~
pjmlp
Except it has a stronger type checking and safety.

~~~
posterboy
sounds good, what's the draw back like?

------
veidr

        Horrible Taylor Swift puns in Swift development 
        considered harmful. 
    

It's already been done[1], it makes your project completely un-Googleable, and
it also pollutes the search corpus making it harder for automatons to weed out
Taylor Swift stories even when searching for things like "Swift compiler
intermediate representation".

Please stop!

[1]: [https://github.com/izqui/Taylor](https://github.com/izqui/Taylor)

~~~
reacweb
As a go player, I had the same problem when google has created the go
language.

~~~
volent
Try with baduk :)

------
blazespin
"What's in here right now doesn't need any Swift runtime support. That will
change very quickly as we try to add support for things like arrays, classes,
structs, strings, etc."

------
pjmlp
Didn't get the point of using inline assembly for _outportb_ instead of making
it part of start.s.

Just to prove the point of calling something with C calling convention?

~~~
klange
Yes.

~~~
pjmlp
Ah ok

------
davidrusu
Cool! but you have a name collision:
[https://github.com/izqui/Taylor](https://github.com/izqui/Taylor)

~~~
shurcooL
I can think of at least one other "name" collision.

------
felipesabino
I think the fun ends when most Swift related stuff are named Taylor...

Some examples are

\- the OP's project

\- [https://tailor.sh/](https://tailor.sh/) \- Cross-platform static analyzer
and linter for Swift

\- [https://github.com/izqui/Taylor](https://github.com/izqui/Taylor) \-
lightweight library for writing HTTP web servers with Swift

\- Many many others at
[https://github.com/search?l=Swift&q=taylor&type=Repositories...](https://github.com/search?l=Swift&q=taylor&type=Repositories&utf8=%E2%9C%93)

------
elt0n
Hahahahaha this name is amazing!

------
emmelaich
I don't normally comment like this but ..

That title bothers me a bit.

~~~
ebola1717
But software projects are swarmed with bad puns

------
xk0nsid
I up voted this post just because of the name. Very clever. Kudos.

------
anders098
where is seed?

------
venomsnake
Taylor Swift metal is oxymoron.

------
williamtrask
upvote for the name alone

------
adamnemecek
don't be surprised if people can't find your project with a name like that.

~~~
ajeet_dhaliwal
It was hard enough when Swift 1.0 was released and Google searches kept
bringing up this woman, this will be worse.

~~~
artursapek
Nothing hard about appending "lang" to your queries. Go and C programmers have
to deal with the same thing.

~~~
phamilton
Yeah, long ago I learned the difference between "strings in C" and "C strings"
when searching Google.

~~~
lorenzhs
The Google personalisation filter bubble seems to have me covered, even in
incognito (this is a work machine with its own public IPv4). Nothing but
programming on the first five pages for either query.

"std list" is another good one, with very different meanings to C++
programmers and just about anyone else :)

~~~
phamilton
Singular does the trick.

------
mattbgates
Does anyone see the awesomeness of the title of this post?

Taylor Swift.

Ha.

~~~
bbcbasic
you catch on quick

------
racl101
Bad project name for SEO purposes. Do you really want people to trudge through
SERPs of some popstar who makes vapid music before they get to your project?

~~~
proyb2
The whole story is in this video, nothing related to SEO or whatever.
[https://realm.io/news/swift-summit-jorge-izquierdo-taylor-
ht...](https://realm.io/news/swift-summit-jorge-izquierdo-taylor-http-server-
library/)

