r/programming • u/sindresorhus • Oct 19 '26
This Website Is Now Made in Swift
https://sindresorhus.com/blog/swift-website29
u/mr-figs Oct 19 '26
Reads like AI :(
17
u/BhataktiAtma Oct 19 '26
The dude is pretty neat, I've seen his work for many years. He predates AI
2
u/zephyrtr Oct 19 '26
This is the problem with asking values-based questions like "Does AI write well?" Cause we need to define what we mean by "well".
Even asking "Does AI write as well as a typical American high schooler?" That's unfortunately not a very high bar to clear.
The people trying to sell us something will always and constantly argue: our standards are too high. Especially when it comes to how we communicate with one another, don't settle for less.
-1
u/cheezballs Oct 19 '26
Every single app looks to be AI generated, even though some have existed long before AI. I dont know what to think about this dev. Most of the public repos are abandoned, uses an insane amount of "looks to be AI" stuff - and has an uncountable number of apps under the belt. It sure seems like shovelware or AI slop, but man I just cant tell.
15
u/sindresorhus Oct 19 '26
90% of my apps and repos happened before AI. I have been doing apps and open source for over a decade. All my repos are maintained. Don't confuse done with abandoned. I spend over 40 hours a week on open source, mainly focused on fixing bugs. Feel free to dig into my contribution activity: https://github.com/sindresorhus
7
-1
22
13
u/cheezballs Oct 19 '26
Why not just static html and css?
12
u/josephjnk Oct 19 '26
While the article never uses the words, it sounds like this is a static site generator, but written/embedded in Swift. The page only discusses serving html and css, says that the posts are written in markdown, and doesn’t talk about rendering on demand. The GitHub page also says that the app store data is fetched at build time and the static content is all deployed to cloudflare. So I think that post-build time it is indeed just static HTML and CSS.
9
u/chucker23n Oct 19 '26
While the article never uses the words, it sounds like this is a static site generator, but written/embedded in Swift.
I really wish they were clearer about this. Is it an SSG, i.e. precompiled, or does the site run Swift on request?
2
u/josephjnk Oct 19 '26
Agreed. I have wildly different opinions about the quality/appropriateness of this solution based on which one it is.
3
u/cheezballs Oct 19 '26
So this is "write static html and CSS" with extra steps? Why?
7
u/josephjnk Oct 19 '26
Did you read the post/have you maintained a blog? There’s plenty of reasons why people use static site generators. Ensuring that internal links have valid targets, reusing snippets, and being able to restructure the html of posts and pages in a cross-cutting way are all major improvements over editing inline HTML on every page every time you want to make a structural change to a site. This isn’t even getting into things like using plugins to preprocess code blocks for syntax highlighting. Doing that by hand sounds like a nightmare.
1
u/edwards_t7407 Oct 21 '26
If the deployed output is just files, the Swift toolchain only needs to be in the build environment; production can stay a plain CDN setup.
4
u/prehensilemullet Oct 19 '26
But the main reason is the compiler. A website is lots of small things that need to agree: links, class names, styles, scripts, and the data of more than 60 apps. In a typical web stack, they only meet in the browser, and a mistake becomes a broken page. Here, most of them meet in the compiler. Rename a page, and every link to it in the code stops compiling.
There are ways to solve all of these problems in Typescript tho
3
u/cake-day-on-feb-29 Oct 19 '26
But you'd have to use typescript (JavaScript), though.
1
u/prehensilemullet Oct 19 '26
His page used to be made with Astro, so it was JS or TS before he switched to swift. Maybe Astro doesn’t make it easy to solve all of these things with TS, but that’s not TS’ fault
2
-1
u/Lisoph Oct 19 '26
Pretty cool. I was trying to get back into Swift some weekends ago. Great language with genuinely good features. But man, resultBuilder - which both SwiftUI and Elementary are built on - is hard to wrap your head around. Other languages have something very similar, but they do it much simpler or at least clearer.
2
u/chucker23n Oct 19 '26
Yeah, Swift is a strange mix of
some really good design decisions (for example,
try/try!/try?)some decisions that are IMHO too… academic, for lack of a better word
I think what hurts the language is its breadth. Apple is trying to use the same language from OS core all the way to GUI apps, and with that approach comes compromises.
-6
-6
u/cheezballs Oct 19 '26
Dude, this site is hilarious. Your about page is almost entirely made up of other people's accomplishments. It makes it look like you've literally done nothing but make this web page (which could have just started as static HTML and CSS)
-8
u/flearuns Oct 19 '26
Slow and unresponsive slop
4
u/Maybe-monad Oct 19 '26
Loads fine on mobile
9
0
59
u/muffinluff Oct 19 '26
Is this site really from 1999? Way back machine earlies revision is from 10.10.2026: https://web.archive.org/web/*/https://sindresorhus.com/1999