153 points · by g0xA52A2A · 8y ago · 117 comments
I’ll have to read more about iSH to learn if it’s a “true” shell, or effectively just emulated or with strict limitations, but either way the potential inspires of how great it would be to have a true shell and/or dev tools for iPads.
Oh and I did this on my iPhone X because I am still undecided on the new iPad. There doesn't seem to be any issue at all, despite the small fonts. The screen is actually large and hi-res enough that it's workable. I can have a NERDTree and a wide buffer with no wrapping, or 2 buffers side by side with a tiny bit of wrapping. Obviously an iPad would totally solve that.
I want this to work for a few different reasons.
1. Be able to do the occasional odd task or put out a fire on the go. On vacation probably, when I am not planning on doing work and leaving my laptop home.
2. Have a consistent development environment which I can reach from anywhere on any device, and pick up right where I left off. (So far tmux sessions have been an awesome lightweight solution for this)
3. Taking it a step further, perhaps leverage a server in the cloud which I can spin up/down as needed, and customized for low cost or stupid power.
4. Rely less on the mouse
5. Divorce myself from IntelliJ. While while awesome, is pricey and bloated, and abstracts away a lot of cool command line tricks behind the GUI.
So far my personal challenge is just getting used to vim + tmux. I've been using IntelliJ mostly for the last few years but have a bit of experience with vim and tmux to get started.
The next hurdle will probably be figuring out how to get a workflow set up that involves a browser loading the code. I expect lots of annoyances around outputting something on the remote machine which I then want to view on the iOS device, like an image or CSV. Working around the lack of a real local file system is going to be like pulling assets out of another dimension.
I was going to go the vim+tmux route, but I never got into tmux and I happened across Modern Vim by Drew Neil. The book describes how to use nvim's terminal emulator mode and the ability to save sessions. I am hoping this will allow me to just use nvim for coding instead of nvim+tmux.
I also intend to have a build flow that pipes it into a server for easy downloading and, if need be, uploading.
While I have the first gen iPadPro (works fine for this, of course), it did occur to me how amusing/stupid it is to think of using one of the most advanced consumer mobile devices as a dumb terminal like it was the 1970s.
Of course I still prefer giant monitors to fit a lot of different panes for inspection and debugging, but it's pretty serviceable.
https://www.amazon.com/Dell-Monitor-43-Multi-Client-P4317Q/d...
(I use this for work, and absolutely love it.)
For portable use though, I think an iPad could very well be superior to modern laptops. The hardware of Apple’s iPad Pro is certainly well beyond that of ultraportable laptops on the market now. The only missing piece is the software.
Or, on newer iPads, directly via the USB C connector. And apps can recognize that you have chosen to plug in a secondary display and suit their content to match on the other screen.
And hilariously enough, I think that would actually be within Apple's license, since an iPad is, after all, Apple branded Hardware.
Fedora/RISC-V is dangerously close to being useful; the only apps I miss are a couple of the big hurdles: Firefox, GHC, and Java.
I was under the impression that emulators were forbidden in the App store (?)
Or does it hold only for software running inside an emulator?
It's in fact "distributed" via TestFlight, legally speaking (and practically) it's not on the App Store.
What I haven't seen mentioned yet is the fact that there is no way to run a browser/javascript debugger on ios. You can do it remotely, but not locally. This is the missing link for me in terms of using an ipad for serious dev work.
https://itunes.apple.com/us/app/inspect-browser/id1203594958...
Honestly? No, absolutely not. My rMBP is 13" and that's the smallest screen I want to program on.
I care about the tools I use to do the work I do and I don't want to compromise (or compromise very little). I don't think I can get serious work done on an iPad without faking it and saying, "um, sure, it's great!", and without honestly feeling claustrophobic.
Apple has recently added an exception to this rule if you’re willing to classify your app as an “educational” app, and allow for the viewing and editing of the source code you download. Since this shell allows for grabbing a copy of the source code of the packages you install, and compiling them yourself, I think it just barely falls within the rules:
> 2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the Application completely viewable and editable by the user.
> is being distributed via Test Flight (which apparently has way more open terms of use than I would ever have expected)
There is no exemption for TestFlight apps; they should comply with the App Store Review Guidelines as usual:
> Any app submitted for beta distribution via TestFlight should be intended for public distribution and should comply with the App Review Guidelines.
Note that any builds that go through TestFlight are subject to a review process.
I mean: this is a great implementation of an emulator. I have downloaded and tried iSH, and it is actually "kind of epic". This isn't exactly what I thought it would be, glancing at the source code: it sounded like it would be running the Linux kernel (so actually be Linux) in console mode, but this is a library operating system and is very similar in many ways to the project I sometimes talk about (which also provided a library operating system, but was going to distribute pre-compiled code as part of the application to avoid needing an emulator), but this is clearly better as an emulator (and is much easier to do, despite this emulator being a slightly harder emulator to build than most).
So, this is a great implementation of this--this is even a "heroic" implementation of this--but, at the end of the day, this is the thing Apple was trying to stop (as much as I hate Apple for that).
Only to the static analysis part, not to human review.
Maybe it isn't App Store compliant, but who cares?
I don't install my dev tools on the desktop via app stores either.
For all I care, someone could port Homebrew for iOS and force me to install it via Xcode.
No. There have been multiple efforts to do something like this before; I seem to recall one app on the App Store that attempted to simulate commands being run by parsing arguments and performing the correct actions as they were entered. Personally, I have an experimental shell that abuses cross-compiled Mach-O ARM64 shell binaries, but there are some limitations to this approach that I need to resolve regarding codesigning, App Store guidelines, and advanced shell features such as piping which are difficult to emulate in the single process that iOS gives you. I might get around to posting it online if I get the time.
Are there any plans to build some kind of connection between the filesystem here and the native ios filesystem-thingy? It would be delightful to be able to edit something in real vim and then save it to icloud...
For now, Nicolas Holzschuch's fork of iVim (https://github.com/holzschu/iVim) is still by far the best solution, but iSH definitely has the potential to take over.
If this software could be developed and installed, cross-compiling a native Unix toolchain, either from the open source code distributed by Apple, or the BSDs, or even GNU, should be just as easy to pull off.
So what gives?
That’s fine for most GUI-driven applications, but it’s kind of problematic for a traditional *nix-style shell. If you were Apple, or you had a jailbroken device and could circumvent the sandbox, you wouldn’t have any problems running a normal shell and command line utilities.
Which Apple has cleverly made sure are not under the control of your process. There really is no way to reliably spawn another process and get it to communicate back to your application.
> If you were Apple, or you had a jailbroken device and could circumvent the sandbox, you wouldn’t have any problems running a normal shell and command line utilities.
Apple does in fact have the ability to spawn a shell on internal devices.
It makes owning such a device even more baffling, sounds incredibly useless to me. I didn't know iOS was such a trash fire.
Can you run bash on your dishwasher?
Fun fact: the kernel has continuously been dropping features that are seen as “unnecessary” on iOS. For example, I recently heard that iOS no longer supports setuid at all; the entire feature has been ripped out of the kernel because it’s not used.
No way Apple will let you put that on the App Store though!
MacOS has a BSD user-land, the kernel isn't anything to do with BSD.
The kernel also includes code from BSD, source is available, including from FreeBSD/NetBSD and OpenBSD. For example, the network stack is BSD code. It also includes OpenBSD's pf(4).
For example, there was a recent ICMP vulnerability in XNU, that later affected FreeBSD. So please reconsider posting misinformation in the future.