21 ms·
Apple’s Guidelines Now Allow Executable Code in Educational Apps and Dev Tools
- fgandiya 9y agoI hope this mean I can easily load scripts onto Pythonista. It's a real pain right now.
- Jyaif 9y agoAh, but now we need to be able to spawn processes (at least one extra), otherwise we app developers can't secure the user's data in our own app...
- manmal 9y agoHow would an extra process protect your app's memory? Also, I'm sure those apps will not be allowed to execute code outside their own process.
- JoshTriplett 9y agoIf you're going to run arbitrary user code, you really want a sandbox, ideally in a separate address space for added protection. An interpreted language has an easier time isolating itself via its runtime (though it's just a bug away from code execution or data access), but any kind of compiled or JITted language desperately wants a completely separate address space.
- 0x0 9y agoI haven't seen anything that indicates iOS apps will be allowed to map memory as executable, though. Traditionally, only a few Apple apps like Mobile Safari have been blessed with these types of code signing entitlements to enable JIT. So I'm assuming applications running code must do so via an interpreter?
- barrkel 9y agoTechnically any program which loads a file is executing loaded code - the file is interpreted as a set of instructions about what data structures to create. This is more explicit for things like vector formats, and reaches its logical conclusion with things like postscript files.
- manmal 9y agoPS and JS are heavily sandboxed though. With this exception an app's user will be able to code up integrations with other apps, additional push notification handlers, or load remote code like native OCR modules or drone controls.
- sudhirj 9y agoAnyone know how Swift Playgrounds work? Do they interpret the Swift code or compile it against a set of mock APIs?
- antfarm 9y agohttps://stackoverflow.com/questions/40593918/how-does-apples-swift-playgrounds-app-for-ipad-execute-code https://stackoverflow.com/questions/40593918/how-does-apples...
- saagarjha 9y agoThe code is compiled on-the-fly and dynamically linked.
- IMcD23 9y agoIt has a full Clang/LLVM built in, and runs Playgrounds in a separate process. Most of this uses private app extensions and XPC, which other developers are not able to use.
- ferdterguson 9y agoI feel like we are inching closer to being able to write code on iOS. Swift storyboards on the iPad kind of opened the door and I hope we can keep chipping away at this. The day I can run and write Python natively on iOS is the day I buy an iPad Pro. Right now there are some good ssh clients and I can write code from a terminal, but pros of the device are not worth that tradeoff right now IMO.
- nreilly 9y agoKeep an eye on Pythonista. I expect there'll be an update based on this change soon making it a lot more usable. http://omz-software.com/pythonista/ http://omz-software.com/pythonista/
- rcarmo 9y agoYou can already do quasi-pip installs on it., provided you're dealing with pure Python modules. (I do that by syncing files from my Dropbox via the API, but there are other ways)
- scrumper 9y agoIt's already really useful. You can create local apps with home-screen icons on it. You can install whatever packages you want (download and run StaSh inside Pythonista to get a command line with pip). You can even use git with it, again through StaSh. For me it's a first-class Python development environment that I can use when away from my main computer. The only shortcoming today is that you can't get code into it except by grabbing it from a git repo or pasting it in from the clipboard. Today's policy change should directly address that limitation.
- simonh 9y agoThere are scripts you can put into Pythonista for pulling files in from Dropbox and a Gist, etc, but if you are working on a multi-file, multi-module app then syncing file by file is just way too painful. The way I do it is to run an FTP server app on the phone/iPad, connect in from my Mac and manually copy the whole directory tree. You can also export and email a zip of a directory. Snapshotting like that is survivable, but proper built-in sync or Git support is the holy grail.
- nolok 9y agoLet me give a courtesy remainder that it is "... until Apple change their mind". Whatever the provider, I really hate those walled gardens where what you can deliver or not is at the whims of a company whose interest is not always aligned with yours. I understand being on them is necessary due to how large their market are, but this is really not where I hoped we would be fifteen years ago. I guess I'm merely venting, and daydreaming about what could have been, "if only"...
- beefsack 9y agoPossibly scarier than the fact that crap like this even exists is the amount of ecosystem aligned zealotry that you see even on places like HN, vehemently defending anti-developer policies purely because of the amount of personal investment in the ecosystem.
- crowbahr 9y agoSunk costs are a real thing.
- nolok 9y agoI think his point wasn't that sunk cost are a myth, but rather that they shouldn't make you blind to the problem of the platform you're bound to. Whether or not that's something that happens here or elsewhere can be argued and I don't necessarily agree with him, but that's where he was going with it I believe
- crowbahr 9y agoMy statement was more a reflection on the reasons than asserting he was saying they weren't. It was a commiseration.
- simonh 9y agoI don't think it's so much the sunk costs that matter. It's the dividend you get back every day from that investment which keeps you hooked. That's what you don't want to lose.
- interpol_p 9y agoI've just submitted an update to Codea[1] that allows for the importing of user projects[2] It has been "In Review" for a suspiciously long time now. So I think it might be testing the application of these updated policies. I have often submitted updates to App Review which include the ability to download and install executable code (along with review notes detailing my reasoning) with the knowledge that they would be rejected. I have also appealed Apple's rejections in order to effect a change in policy for the App Store. At some point during phone calls with the reviewers they told me they were "advocating for policy change internally on my behalf" even if they couldn't approve my app right now. I'm so glad policy has changed now. [1] https://codea.io https://codea.io [2] https://twitter.com/twolivesleft/status/873692454947442688 https://twitter.com/twolivesleft/status/873692454947442688
- kbutler 9y agoThanks - both for the app and for trying to improve the world for users and other developers!
- erikpukinskis 9y agoThis thread is getting beastly but I want to weigh in to comment that The Web is an interesting alternative to this problem. Rather than allowing dangerous apps and requiring them to undergo corporate review, The Web just assumes the app is nefarious, lets anyone at all run anything they want, but architects the runtime so that apps can't do anything unsafe. There is heavy debate about what constitutes "unsafe"... privacy-wise, security-wise. And features like graphics shaders and camera stream take longer to diffuse. And different devices make different choices on these subjects. But choosing to target the browser as The Computer is a vote against app stores. And a vote for bringing the safety and freedom of the sandbox closer to the metal, rather than going straight to the bottom while forfeiting our freedom. Do you accept a class-based system where the privileged class gets "full" device access and hope the class divide gets fairer.... Or do you accept limited device access in exchange for a truly egalitarian distribution landscape, while hoping device access will improve? To me that's the choice for developers, and I choose the latter.
- 9y ago
- sigjuice 9y agoApple should just do a Darwin/macOS ARM VM on the iPad so developers can have ARM Homebrew and other Unix tools they are used to.
- princekolt 9y agoThey don't have to. People have been compiling to arm for years now on macOS. Apple just needs to make the standard + Foundation + Cocoa touch libraries visible and linkable on iOS and then you'll have everything you need to run any unix tools and compile iOS apps on iOS.
- pjmlp 9y agoI rather use XCode and other nice GUI tools.
- JesseWright 9y agoI actually appreciate that Apple stipulated "apps must make the source code... editable by the user". I personally think this helps with the educational spin to this currently, as it assures users are able to see source code but also tinker with it and learn. This is something I wish I would have had when I was in school - there were some editors at the time, but none of them could run any at that time to my knowledge. I think this could really help a lot of students for what it is, and I hope it does well in that regard.
- d08ble 9y agoAmazing! I've been waiting for this. Animation CPU Studio will be published soon. https://twitter.com/AcpuStudio https://twitter.com/AcpuStudio
- jlebrech 9y agoso something like xcode on ipad is now possible, as they won't build it themselves.
- simonh 9y agoI suspect this change is intended to pave the way for Swift Playgrounds, which already has a full LLVM implementation built in, to become a full dev environment. Or to spawn off a professional sibling App. I think they don't want to be accused of favouring their own dev tools too much compared to other options, so are making this possible for the existing dev tools pre-emptively to their own full-sized offering.
- jacquesm 9y agoWhat I find absolutely incredible is that this is accepted at all. You really have to wonder how we went from a computer with a bunch of slots and open schematics to one that is so closed you need permission from the manufacturer to run whatever code you desire. The degree of paternalism is astounding.
- pinum 9y agoIt's better to think of iThings as semi-flexible embedded devices instead of general purpose computers.
- jacquesm 9y agoJust imagine what the PC landscape would look like if the various big entities active in that space had figured out this trick before we - thankfully - got Linux on the server, meaning that if they try to take it away there will be a huge roar. That's roughly what stands between us and losing our ability to compute with whatever hardware we want, whatever we want. Cory Doctorow had it right all along, I'm just surprised with how fast we are getting there. http://opentranscripts.org/transcript/coming-war-general-computation/ http://opentranscripts.org/transcript/coming-war-general-com...
- pjmlp 9y agoEasy, it would be as Atari, Amiga and Apple systems were. The PC landscape only happened thanks to IBM's mistakes.
- pmarreck 9y agoDid they ever consider that any number of web browsers can already execute javascript?
- spacehunt 9y agoOn iOS there's basically only one browser available. Besides, Javascript has been allowed for quite a while for things like React Native.
- noblethrasher 9y agoFunny coincidence: I just downloaded Scratch Jr. for my nephew this past weekend, only to be disappointed that we couldn't view the other projects from within the app, nor could he share his. I hope that we can now expect to get this feature, soon.
- brians 9y agoOne step closer to Emacs on iPad.
- 83457 9y agoyay, pico-8 should be allowed now
- mark_l_watson 9y agoOne of my favorite apps is Raskell, basically Haskell 98 ported to iOS. It uses Dropbox for storage so it is possible to move small Haskell applications in and out of iOS. Pythonista is also very cool. I like the safety of the iOS walled garden but I also see real value in complex IDEs like IntelliJ running on iPad Pros.
- jonknee 9y agoSilly question, but how does WeChat get around this? Does custom code for Official Accounts just work on Tencent's server and basically work in a WebView?
- kccqzy 9y agoI suppose the custom code is just custom JavaScript code. It has always been possible to execute arbitrary JavaScript code, including those downloaded remotely. No WebView needed.
- eecc 9y agoGood: http://haskellformac.com http://haskellformac.com
- paultopia 9y agoHonestly, I try to write code on iOS all the time, and it's not really the absence of tools that can execute that code that really stands in the way. Instead, it's: - The absence of a really good typing story. The 12.9 iPad Pro with smart keyboard is nice for typing text but terrible for moving the cursor around. It's agonizingly slow to do it with keyboard (highlighting is worse, for some reason) and inaccurate to do it with finger/fiddly to do it with Pencil. The only text editor with vim keybindings (an absolute must in an environment where it's hard to move the cursor normally...) of which I'm aware is Buffer, while the only text editor with both good syntax highlighting and good github integration (via Working Copy) is Textastic. Honestly, I really wish one of those two would just buy the other so that I could have both. - The absence of a really good ssh story. Prompt is nice, but for some reason, whenever I try to SSH into anything, there's so much latency that it is really painful to actually do anything. Maybe I just have slow network connections? But anyway, so much for just coding on a linode or something in vim.
- nouveaux 9y agoI'm not sure why Prompt is slow for you but as a suggestion, I really like using Blink. It supports Mosh and it might help with your latency problem
- paultopia 9y agoThanks! I'll totally give it a try.
- yangl1996 9y ago\+1 for this. Mosh solved all problems an iPad ssh client may have. It allows the client to go offline and reconnect in no time when the client is back online, which is a common case on iOS (apps get killed when being in background for a short time). Lower latency (thanks to local echoing) and seamless switch between networks (cellular and wifi roaming) are also definitely nice to have. I tested Blink (a client on iOS with Mosh support) on a high-speed-rail trip from Shanghai to Beijing and it was rock solid.
- 9y ago
- dalacv 9y agoJust an FYI, I use a cheap Android device with a Bluetooth keyboard and mouse and use Termux which is a Linux emulator with support for many packages including vim, python, jupyter, task warrior and much more
- 520794 9y agoAre there any technical or other non-closed-garden-monopoly reasons why Apple requires that all iOS apps be written using a bloated Apple IDE that only runs on Apple computers?
- laughingman2 9y agoThe irony of people defending apple because its "safe" and doesn't let you "shoot yourself in the foot" in a forumn named Hacker news. What is happening to hacker culture? I think as influx of new programmers increase, awareness on the culture's ethos of freedom, liberty, anti-authoritarianism, anti corporatism has to be increased. Or we will have people loving to be jailed by their benevolent overlords in "apple/google/facebook/etc"
- joemi 9y agoNot everyone shares your _exact_ ideals, even amidst those sharing the hacker ethos. In the same way that not everyone sharing the hacker ethos is as extreme as Stallman. In the same way that not everyone here uses linux distros exclusively. Clearly there's a spectrum of beliefs/ethos. Otherwise, you could pedantically point out something that's not purely hacker-focused about almost every single post on HN.
- Aaron1011 9y ago> Apple’s Guidelines Now Allow Executable Code in Educational Apps and Dev Tools This title is somewhat confusing - it makes it sound as though educational apps and dev tools somehow weren't allowed to execute code before, which doesn't make any sense.
- klinquist 9y agoDear VSCode team... now is the time for VSCode for the iPad!
- adm2life 9y agoGood step in right way !