News for hackers. Stuff that matters.
Re:Developing with Squeak on a Cellphone by miki123211 on Wednesday October 07, 2020 @06:00AM (#24706724)
I 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?

Re:Developing with Squeak on a Cellphone by tonyg on Wednesday October 07, 2020 @06:04AM (#24706743)
Smalltalk 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/attac...

[2] http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-...

Re:Developing with Squeak on a Cellphone by tonyg on Wednesday October 07, 2020 @06:14AM (#24706790)
Another awesome thing about Squeak Smalltalk: the total amount of code I had to write for the on-screen keyboard was 234 SLOC :-)
Re:Developing with Squeak on a Cellphone by qsort on Wednesday October 07, 2020 @06:32AM (#24706887)
Interesting 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! :)

Re:Developing with Squeak on a Cellphone by ryukafalz on Wednesday October 07, 2020 @09:12AM (#24707791)
>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

Re:Developing with Squeak on a Cellphone by qsort on Wednesday October 07, 2020 @10:23AM (#24708529)
Yes, 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.
Re:Developing with Squeak on a Cellphone by rjsw on Wednesday October 07, 2020 @07:13AM (#24707085)
How about a visual system like Blockly [1], maybe with larger features to work better on a touchscreen.

[1] https://developers.google.com/blockly

Re:Developing with Squeak on a Cellphone by jecel on Wednesday October 07, 2020 @10:25AM (#24708546)
Squeak 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)

Re:Developing with Squeak on a Cellphone by simonh on Wednesday October 07, 2020 @11:27AM (#24709210)
I 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.
Re:Developing with Squeak on a Cellphone by mhd on Wednesday October 07, 2020 @10:02AM (#24708291)
If 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.

Re:Developing with Squeak on a Cellphone by kryptiskt on Wednesday October 07, 2020 @08:31AM (#24707515)
I 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 :-)

Re:Developing with Squeak on a Cellphone by teddyh on Wednesday October 07, 2020 @04:52PM (#24712575)
Something 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).

Re:Developing with Squeak on a Cellphone by agustif on Wednesday October 07, 2020 @09:54AM (#24708207)
Sounds 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.

Re:Developing with Squeak on a Cellphone by wcchoi on Wednesday October 07, 2020 @07:18AM (#24707114)
I develop something (terminal with an in-app keyboard that supports autocomplete) for easier input on mobile:

https://github.com/wcchoi/swell.sh

It is better than using the phone's keyboard but the limited screen estate is definitely a problem

Re:Developing with Squeak on a Cellphone by m463 on Wednesday October 07, 2020 @08:32AM (#24707523)
'Voice Driven Development - Who needs a keyboard anyway' by Emily Shea

https://youtu.be/YKuRkGkf5HU

Re:Developing with Squeak on a Cellphone by thsealienbstrds on Wednesday October 07, 2020 @07:28AM (#24707168)
Microsoft 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.
Re:Developing with Squeak on a Cellphone by Cthulhu_ on Wednesday October 07, 2020 @10:29AM (#24708587)
Close would be the ipad app 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.
Re:Developing with Squeak on a Cellphone by qznc on Wednesday October 07, 2020 @08:25AM (#24707480)
The 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.

Re:Developing with Squeak on a Cellphone by simonh on Wednesday October 07, 2020 @08:52AM (#24707654)
I 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.

Re:Developing with Squeak on a Cellphone by darkerside on Wednesday October 07, 2020 @09:06AM (#24707747)
Environment 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.
Re:Developing with Squeak on a Cellphone by kbr2000 on Wednesday October 07, 2020 @10:34AM (#24708648)
Androwish [0] is worthy of this, and has many batteries included!

[0] http://androwish.org/

Re:Developing with Squeak on a Cellphone by choo-t on Wednesday October 07, 2020 @09:09AM (#24707773)
The ability to use emoji would be really useful, it convey lot of meaning in very little screen space.