Does anyone else wish they could do real coding on an iPad, Unix style? That would be so awesome; the new iPad Pro’s especially are fantastic pieces of hardware, and it’s a shame that although you can be productive via word processing, media editing, etc on them, coding is not really viable.
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.
I've been thinking a lot about this and decided to try. I just got set up to remote code on my laptop via mosh+nvim (connecting to my MacBook Pro when it is at home). I'm using terminus as a terminal which has a very good free offering. I'm pairing my apple magic keyboard 2 which works as well as you'd expect.
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 use mosh via the Blink client and the Logitech keyboard on my '17 iPad Pro and do a lot of coding on it on remote servers. The lack of an escape key sucks and I had to figure out how to do code folding in vim but it's pretty serviceable.
Of course I still prefer giant monitors to fit a lot of different panes for inspection and debugging, but it's pretty serviceable.
I think what we need is a port of Qemu. If you've ever used JSLinux[0] on an iPad, you know that it's plenty powerful to emulate riscv64 or x86 fast enough (even in JavaScript), so if there would be a proper PC emulation layer on an iPad you could run anything (Linux, *BSD, GNU/Hurd, NT, even full macOS).
iSH is a binary emulator that ships with an almost-Linux-compatible-ish subset "library operating system" that is good enough to make a bunch of common command line apps work. So like, this little operating system has a minimal ELF loader in it, and then runs the executable in its little emulated jail.
Only if Appple came out with a clamshell designed iOS device. I have a third party keyboard attached and I feel it makes my iPad so much more comfortable in a wide variety of positions to work on. Even when I'm not using the keyboard much.
This is an obvious approach that absolutely has been done before (though maybe not as efficiently), but is not App Store complaint (as you can use this to download new functionality that the app did not ship with that is then executed on the device using a virtual machine that is not JavaScriptCore) and so is being distributed via Test Flight (which apparently has way more open terms of use than I would ever have expected). This really isn't that interesting (to some very real extent, "sadly": it sucks that Apple is allowed to say these kinds of apps can't exist).
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.
I booted full Linux (Also Windows 95, albeit very very very slowly) on Bochs using the first gen iPad six or seven years ago, so definitely been done. This just seems more polished and user friendly. With the performance of the latest iPad Pro, I’ve been meaning to dust off that code and see what’s possible now.
I AM RUNNING VIM ON MY IPAD BECAUSE OF THIS. THIS IS THE HAPPIEST DAY.
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...
I tried out iVim for a few hours. It has vimrc support and integration with the files app. It also integrates with The blink shell app so that you can edit files on remote through vim and ssh
This is so, so close to allow me to run a full local vim (with the necessary external tools, like python and git). The only thing I found that was a dealbreaker was the lack of unicode support (https://github.com/tbodt/ish/issues/28), and not being able to map caps-lock to escape.
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.
python3 is breaking my heart. I upgraded my code from py2 to py3, and since then, seems like every 6 months my code will break due to a new python update (I'm on Fedora, fyi). Just last week a bunch of my python3 code stopped working for my IRC bot. I honestly regret switching to python 3 at this point.
I feel like I'm a bit out of the loop here, getting a local shell on an iOS device was one of the immediate benefits from Jailbreaking. It was even a native iOS binary, usually bash or Korn Sell, along with sshd. No need for such an elaborate Linux ABI transposing layer, as the iOS kernel supported enough Unix to run this stuff fine. But even if the iOS SDK/libc has since dropped certain functions or POSIX headers, the kernel undoubtedly still supports it.
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.
The tricky part with an unjailbroken device (for third-party developers) is that apps can’t fork/exec, or any of the equivalents— aside from a couple exceptions around app extensions, the binary that gets run when the user taps the app on the home screen is the only one that ever can be run.
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.
> But even if the iOS SDK/libc has since dropped certain functions or POSIX headers, the kernel undoubtedly still supports it.
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.
Why not use Screens/NoMachine to remote access desktops on iPad Pro? It’s blazing fast on local network, and reasonable via the internet. You could have an on-demand bootable Ubuntu or Windows via Azure quite cheaply.
It works surprisingly well on my old iPad Pro! Thank you for building this. Sure, many tools that require additional privileges (and some syscalls?) do not work, but i’d love to see more progress here. Having a local linux shell on my iPad would be a game changer for me.
I was just thinking about a busybox-like terminal emulator for iOS earlier this weekend that would be App Store compliant. Maybe this will scratch that itch.
[+] [-] electrograv|7 years ago|reply
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.
[+] [-] Hippocrates|7 years ago|reply
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.
[+] [-] jerkstate|7 years ago|reply
Of course I still prefer giant monitors to fit a lot of different panes for inspection and debugging, but it's pretty serviceable.
[+] [-] snazz|7 years ago|reply
[0]: https://bellard.org/jslinux/
[+] [-] jim00338811|7 years ago|reply
https://gocoedit.app
[+] [-] saurik|7 years ago|reply
[+] [-] simon_acca|7 years ago|reply
[+] [-] chadlavi|7 years ago|reply
[+] [-] taude|7 years ago|reply
[+] [-] JustSomeNobody|7 years ago|reply
Honestly? No, absolutely not. My rMBP is 13" and that's the smallest screen I want to program on.
[+] [-] ianwalter|7 years ago|reply
[+] [-] saurik|7 years ago|reply
[+] [-] saagarjha|7 years ago|reply
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.
[+] [-] jsjohnst|7 years ago|reply
[+] [-] paultopia|7 years ago|reply
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...
[+] [-] goerz|7 years ago|reply
[+] [-] emit_time|7 years ago|reply
[1]: https://itunes.apple.com/us/app/ivim/id1266544660?mt=8
[+] [-] drags7er|7 years ago|reply
[+] [-] goerz|7 years ago|reply
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.
[+] [-] Walkman|7 years ago|reply
[+] [-] update|7 years ago|reply
[+] [-] notaplumber|7 years ago|reply
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?
[+] [-] JonathonW|7 years ago|reply
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.
[+] [-] saagarjha|7 years ago|reply
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.
[+] [-] f055|7 years ago|reply
[+] [-] terhechte|7 years ago|reply
[+] [-] rsska|7 years ago|reply
[+] [-] d0mine|7 years ago|reply
[+] [-] newusertoday|7 years ago|reply
[+] [-] saagarjha|7 years ago|reply
[+] [-] RBerenguel|7 years ago|reply
[+] [-] phelmig|7 years ago|reply
[+] [-] jonhohle|7 years ago|reply
[+] [-] dayvough|7 years ago|reply
[+] [-] SeriousM|7 years ago|reply
[+] [-] umanwizard|7 years ago|reply
[+] [-] wilsonnb3|7 years ago|reply
[+] [-] k__|7 years ago|reply