[HN Gopher] Swift Playgrounds 4
___________________________________________________________________
Swift Playgrounds 4
Author : tosh
Score : 108 points
Date : 2021-12-15 20:01 UTC (2 hours ago)
(HTM) web link (www.apple.com)
(TXT) w3m dump (www.apple.com)
| garmaine wrote:
| My kids love Swift Playgrounds. It is a wonderful way to
| introduce young kids to programming, in a safe and exciting
| environment.
| ChrisMarshallNY wrote:
| I think that Swift Playgrounds is a really neat idea (especially
| the books thing).
|
| That said, I don't really have much interest in it, for myself. I
| am stuck in the dark world of Xcode.
|
| What I would like (and have submitted the idea to Apple as a
| feature request), is to have a playground as an Xcode project
| target. I want to be able to link in modules and resources,
| without editing the playground file by hand.
| gjsman-1000 wrote:
| The biggest new features with version 4 are (according to Apple):
|
| - Build iPhone and iPad apps with SwiftUI right on your iPad
| (requires iPadOS 15.2 or later)
|
| - App Store Connect integration lets you upload your finished app
| to the App Store
|
| - App Preview shows live updates as you make changes to your app
|
| - Full-screen preview lets you see your app edge-to-edge
|
| - Smart, inline code suggestions help you write code quickly and
| accurately
|
| - App Projects make it easy to move projects to Xcode and back
|
| - Project-wide search finds results across multiple files
|
| - Snippets Library provides hundreds of SwiftUI controls,
| symbols, and colors
|
| - Swift Package support lets you include publicly-available code
| to enhance your apps
| tosh wrote:
| first impressions by Steve Troughton-Smith:
|
| > I can already tell that Swift Playgrounds 4 is a big deal. It
| is pretty much exactly what I was hoping for from an 'Xcode for
| iPad', more than just an upgrade to previously slow & clunky
| Playgrounds app. It dramatically reframes what iPad is capable of
| even in this first offering
|
| https://twitter.com/stroughtonsmith/status/14712166828070502...
|
| https://twitter.com/stroughtonsmith/status/14711965734177587...
| ryeights wrote:
| Why drop the 'the' before iPad? Sounds like someone's drank the
| marketing Kool-Aid
| mcphage wrote:
| Twitter character limits
| gjsman-1000 wrote:
| Twitter limits; and also because it's not just marketing
| Kool-Aid. It's "Word for iPad," "Angry Birds for Android,"
| "Kindle for Windows" and so forth. Not "Word for the iPad,"
| "Angry Birds for the Android," or "Kindle for the Windows."
| Engineering-MD wrote:
| For iPadOS makes sense. For iPad less so.
| throwaway946513 wrote:
| Unfortunately or fortunately depending on your
| perspective, the only method to acquire iPadOS is to use
| an iPad - so the designation seems fitting.
| PhilipVinc wrote:
| So now we can program on the iPad, but only with Apple's approved
| language, on its approved ide. Can't a government go there and
| knock the wall down?
| kmeisthax wrote:
| There's actually a whole host of iPad apps that will give you
| programming environments for Python, JavaScript, and so on. iSH
| will give you a full x86 Linux box and a-Shell supports
| compiling and running WASM/WASI binaries in a simulated shell
| environment. They've been around for some time, too; Apple
| _really_ does not give these things the fanfare they deserve.
|
| The main wall that I can see needing to be knocked down would
| actually be technical, not political. Something like OAMA[0]
| absolutely would not fix the lack of JIT entitlements or
| virtualization support accessible to third-party developers in
| iPadOS. I would not be surprised if Swift Playgrounds is either
| relying on lots of Apple-only entitlements or compromising on
| performance[1]. If we had proper virtualization, then we
| wouldn't need iSH; we could load up a real Linux distro and run
| a LAMP stack or Docker containers on iPads.
|
| [0] Open App Markets Act; similar provisions were in the EU
| Digital Markets Act at one point
|
| [1] The screenshots I'm seeing suggest that, at a minimum, your
| code runs in the same sandbox as the editor. Which means Apple
| hasn't added any sort of private API that would let Swift
| Playgrounds properly provision your app. Without a JIT
| entitlement, the editor would also need to include an AArch64
| emulator inside itself in order to provide the App Preview
| feature. These sorts of things won't matter to casual
| programming use-cases but would kill a lot of the benefits of
| an on-device development environment.
| Koshkin wrote:
| Apple has a natural monopoly on Apple's products.
| mattcwilson wrote:
| Swift Playgrounds has been around for quite some time.
|
| I'd also hesitate to think of it as a way to "program on an
| iPad." It's a slimmed down IDE + visualization pane intended to
| be an educational environment for people wanting to learn
| programming fundamentals, Swift specifically, or how to program
| one of the robots/drones/programmable devices that have a
| companion lessonbook.
| zepto wrote:
| That's what it was before this update.
|
| Now it is a full development tool that lets you release
| commercial apps.
| zepto wrote:
| Why not just buy a tablet from someone else if you don't want a
| managed environment?
|
| Apple is not the only tablet maker.
| wly_cdgr wrote:
| On what grounds? It's their platform
| dangoor wrote:
| https://codea.io and others have been around longer than Swift
| Playgrounds.
| m12k wrote:
| That gem collection game looks like a fairly direct rip-off of
| https://lightbot.com/ If you have kids that you'd like to
| introduce to some programming concepts in a fun way, I highly
| recommend it.
| qwertyuiop_ wrote:
| What happened to Swift on sever ? Looks like Rust sucked the air
| out of Swift in recent years.
| TulliusCicero wrote:
| Used Swift Playgrounds with my then 8 year old, it was neat
| except that it was actually pretty buggy. The game would get into
| a bad state somewhat often.
| gjsman-1000 wrote:
| I've messed with it and my initial impressions are very
| positive... except that I've managed to find one bug, and that's
| that my experimental app appears in Siri App Suggestions and
| can't open because, well, that app isn't actually installed.
|
| Maybe for iPadOS 15.2.1?
| mhh__ wrote:
| Swift playgrounds is really cool and all (I _really_ want to copy
| it for D!) but when can I build GCC on my iPad. The things so
| fucking fast but I basically only watch movies and read pdfs.
| neals wrote:
| How's swift doing as a language? Is it being adopted by
| developers in a way Apple was hoping?
| mrtksn wrote:
| Not too much seems to be happening outside of Apple ecosystem
| but it should because it's brilliant. I don't want to write in
| any other language.
| spyremeown wrote:
| No idea, but the compiler engineers are wizards.
| [deleted]
| Kon-Peki wrote:
| One feature of Swift Playgrounds that really doesn't get as much
| attention as it deserves is the Swift Playground Book [1]
| subscription:
|
| > You create content for the Swift Playgrounds app by writing
| playground books. Like traditional books, playground books are
| made up of chapters and pages. Unlike traditional books, they
| include executable Swift code that displays the results live,
| right on the page.
|
| > Swift Playgrounds subscriptions, like podcasts, are a sequence
| of episodic content arranged in an order that builds knowledge
| while allowing more advanced learners to skip content.
| Subscriptions exist on the internet as feeds--downloadable lists
| of items that apps and websites can deal with. You publish a set
| of playgrounds as a feed that the Swift Playgrounds app can
| download, process, and display.
|
| You publish them on your own website, via a JSON feed. No App
| Store review needed. You could treat it like a Jupyter Notebook,
| or an interactive story world - whatever you want.
|
| [1] https://developer.apple.com/documentation/swift_playgrounds
| elliekelly wrote:
| This is so fun! And you're right, I had no idea even though I
| tinker around in playgrounds a bit. Thanks for sharing!
| AceJohnny2 wrote:
| "A Young Lady's Illustrated Primer", anybody?
|
| https://en.wikipedia.org/wiki/The_Diamond_Age
| haunter wrote:
| Unfortunately Google shelved it but they had a very similar
| project called Game Builder for Windows
|
| Here is the original introduction video
| https://www.youtube.com/watch?v=l9Mf_XEZq-A
|
| And a tutorial https://www.youtube.com/watch?v=L1hpFRztQGY
|
| Got open sourced so you can still download it
| https://github.com/googlearchive/gamebuilder
|
| Works perfectly under Linux with Wine or Proton.
|
| The last full Steam release is also included if you don't want to
| compile it (7z.001-7z.002-7z.003)
| https://github.com/googlearchive/gamebuilder/tree/master/bui...
|
| It's really fun and worth a try if you are looking for something
| similar not on Mac
| slmjkdbtl wrote:
| Does anyone have personal experiences of seeing beginner using
| Swift Playground to learn to code and understanding programming
| ideas? How effect is it? How ready are they to enter "actual
| programming" after completing the playground?
| marstall wrote:
| my 9 year old son loves it - he's learned basic programming
| ideas in it for sure - loops, functions, etc. gives him a sense
| of accomplishment and we do it together which is nice.
| KarlKemp wrote:
| At least the previous iteration so much about "completing"
| anything. It didn't use the gamification-like mechanisms
| ("challenges"). And it was not "not real" programming. It left
| out a lot of the complexity of a project and focused on writing
| source code, the very heart of the definition of programming.
|
| I use them the way I use the REPL in languages that have it: to
| quickly try out an idea, or to improvise some single-purpose
| one-off data munging.
| mattcwilson wrote:
| I worked for an edu tech startup that built a series of
| playgroundbooks for learning robotics programming.
|
| It is a solid, top-tier learning environment for kids and
| beginners. Apple has high standards for content you produce
| in a playgroundbook if you want to be in the main
| subscription set. And that pays off big time in the lesson
| sizes, the consistency, and the accessibility of the material
| no matter which publisher
___________________________________________________________________
(page generated 2021-12-15 23:00 UTC)