5 ms·
Developing with Squeak on a Cellphone
- miki123211 6y agoI wonder how a mobile-first programming language / environment would be like. I guess something with as little punctuation as possible, so that you wouldn't need that many keys. A good autocomplete would probably be essential too. Would text still be the prefered input method? Is there something better suited to touchscreen input? What about code display? I guess the "lots of little functions" style, which would probably allow for the easiest navigation on a tiny screen. Maybe collapsable/expandable function sections, like in WorkFlowy?
- qsort 6y agoInteresting question. There's probably a tradeoff at play here between 'easy to input' and 'easy to read'. As nothing more than a random guess, I believe a lisp could be appropriate here. Highly flexible syntax means it's easy to make a custom way to input code that works for a phone (you could imagine that touching a form makes a dialog appear or something like that. I'm terrible at UIs), and homoiconicity helps reconciling the input UI and code as it's written. Plus, lisps are fun! :)
- ryukafalz 6y ago>you could imagine that touching a form makes a dialog appear or something like that Fructure might be nice on a phone! Currently makes heavy use of keyboard shortcuts but I bet it could be adapted to a touchscreen. https://github.com/disconcision/fructure https://github.com/disconcision/fructure
- qsort 6y agoYes, that's precisely what I'm talking about. The very structural nature of lisps (you're basically editing the AST directly) makes it easy to make something like that. You'd probably have to make some concessions due to a small screen/slow typing speed, but I could see something like this being actually productive.
- tonyg 6y agoSmalltalk is surprisingly OK to develop on the phone. I've written a little on-screen keyboard in Smalltalk (subject of my next blogpost; [1,2]), and it's just a naive qwerty layout, but it works OK for the short methods common to Smalltalk programming. Very early days, plenty of improvements to be made, but I was surprised that it wasn't an immediate fail. [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201006/cd73839a/attachment-0001.jpg http://lists.squeakfoundation.org/pipermail/squeak-dev/attac... [2] http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-October/212171.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-...
- tonyg 6y agoAnother awesome thing about Squeak Smalltalk: the total amount of code I had to write for the on-screen keyboard was 234 SLOC :-)
- rjsw 6y agoHow about a visual system like Blockly [1], maybe with larger features to work better on a touchscreen. [1] https://developers.google.com/blockly https://developers.google.com/blockly
- jecel 6y agoSqueak includes EToys, which was the inspiration for Scratch (originally written in Squeak, then rewritten in Flash and then rewritten in Javascript) which was the inspiration for most current block languages. https://en.wikipedia.org/wiki/Etoys_(programming_language) https://en.wikipedia.org/wiki/Etoys_(programming_language)
- simonh 6y agoI don't think visual code blocks based systems are particularly efficient at space usage. Code blocks are dragged and dropped in from a panel of blocks, which I would think would work best on as large a screen as possible.
- wcchoi 6y agoI develop something (terminal with an in-app keyboard that supports autocomplete) for easier input on mobile: https://github.com/wcchoi/swell.sh https://github.com/wcchoi/swell.sh It is better than using the phone's keyboard but the limited screen estate is definitely a problem
- thsealienbstrds 6y agoMicrosoft tried this with Touch Develop. The project was shut down last year. The on-screen keyboard layout was context-sensitive. IIRC you could enter complete keywords with a single key, maybe even variable names. It was pretty cool. Perhaps phones just don't have the screen estate for serious programming.
- qznc 6y agoThe APL family is probably most terse. J has an Android app. Unfortunately, i need the documentation all the times and a larger screen makes that much easier. Why would you want to code on mobile though? For serious development a nice desk is also beneficial.
- simonh 6y agoI understand what you mean by serious development, large complex projects youre working on for an extended period of time, but that's not all development. For example a few years ago I needed to do some coding exercises for a job application and I did them all on the train during my commute on my iPad in Pythonista. There are now several excellent coding apps, git clients, decent editors etc available for iOS you can even use to develop apps for publication on the App Store. Until the iPhone 6+ I'd have said coding on a phone was really awkward, but nowadays on the modern large format phones it's quite workable.
- kryptiskt 6y agoI wouldn't do it like a text editor, I'd make it a structure editor aware of the grammar and only present valid alternatives at the point of entry, I would use fuzzy matching and strong types to quickly cut down the alternatives to present to the programmer. The programmer should only need to enter long stretches of text when writing comments and string literals. In fact I may already have started working on this :-)
- agustif 6y agoSounds super cool. I sometimes imagine code as puzzle pieces you can -edit- I'd be cool to make a GUI for programming valid code with drag and drop.
- teddyh 6y agoSomething like Dasher, maybe, with only syntactically valid alternatives displaying? Somewhat akin to the “railway” syntax diagrams used in older programming manuals (still used in the SQLite manual).
- m463 6y ago'Voice Driven Development - Who needs a keyboard anyway' by Emily Shea https://youtu.be/YKuRkGkf5HU https://youtu.be/YKuRkGkf5HU
- darkerside 6y agoEnvironment and language evolving together seems very key, no pun intended. Remove the shift key, and instead of a top line number row, make it symbols instead. Embrace the punctuation instead of running away from it.
- choo-t 6y agoThe ability to use emoji would be really useful, it convey lot of meaning in very little screen space.
- mhd 6y agoIf you're really going for easy data entry and are willing to sacrifice program readability, I'd go with something that just has fewer tokens. The length of them hardly matters, as you can easily find shortcuts to enter them -- even the ZX80 did that, and a modern mobile phone has soo many technical advantages compared to that. The problem comes when introducing names. Those are pretty independent from the language itself, apart from some basic length and character set constraints. But if you have something where you don't need that many variables (point free code, stack-based PL), you don't have to go to full keyboard mode that often, and completion would have to work with fewer possibilities, too. But in the end people manage to type pretty well on screens, as long as you don't have to switch layouts. Which brings us a constraint like many early programming languages had, where you really couldn't depend on anything but alphanumeric characters on a keyboard. That brought us Algol, Fortran and C trigraphs. Now ditch parens and you're good to go, although I guess that displaying a single additional line on your OSK with the necessary few items is easy enough. Now, the editing environment is interesting. Fewer widgets to display on screen and more awkward shortcuts. This could point towards something like vi, or maybe even Oberon/acme, with touch gestures taking the place of mouse button chords.
- Cthulhu_ 6y agoClose would be the ipad app Playgrounds (https://www.apple.com/swift/playgrounds/); https://www.apple.com/swift/playgrounds/); I've never tried it, but it seems to use the keyboard suggestions to suggest code and the like.
- kbr2000 6y agoAndrowish [0] is worthy of this, and has many batteries included! [0] http://androwish.org/ http://androwish.org/
- ansible 6y agoKudos for trying this out! This is a topic that I have pursued on and off over the years: http://partiallyappliedlife.blogspot.com/2010/06/writing-code-on-handhelds.html http://partiallyappliedlife.blogspot.com/2010/06/writing-cod... The phone development environment, even with the excellent physical keyboard on the Samsung Sidekick 4G, was never really all that productive for me. I sure thought it was cool though. These days, I get more done with a light and cheap Chromebook, either inside the Linux environment itself, or just running SSH to my desktop. The size and weight aren't too bad, and I can type much faster with a nearly full-sized keyboard. I'm still in the market for a sub 3lbs convertible Chromebook with a 13in 1080p screen. But I'll make due with what I have for now, at least until the battery dies.
- e12e 6y agoWhich phone? How are you running squeak and sshd?
- tonyg 6y agoSamsung galaxy s7 with bare PostmarketOS. Standard PostmarketOS sshd, and I compiled my own cog VM (on the phone!). It's running on /dev/fb0 without X. I wrote more about it all: https://eighty-twenty.org/tag/squeak-phone/ https://eighty-twenty.org/tag/squeak-phone/
- e12e 6y agoOh, so I guess you can't actually use your phone.. As a phone? I was hoping for something more like: https://simberon.blogspot.com/2017/11/mobile-smalltalk.html https://simberon.blogspot.com/2017/11/mobile-smalltalk.html :-)
- tonyg 6y agoNot yet. I'm working on it. Status is that I can send and receive SMS, and make and take calls (though the audio doesn't work yet). GPRS/LTE is next on the list.