News for hackers. Stuff that matters.
Re:Unix History and the `DC` Calculator by kragen on Monday September 02, 2024 @08:25AM (#41424858)
i see! given your forth comment, i'm sort of surprised you didn't have r> and >r keys to move numbers between the stacks

i feel like on a multitouch screen we ought to be able to tap on numbers to roll them to the top of the stack

Re:Unix History and the `DC` Calculator by lolinder on Monday September 02, 2024 @08:59AM (#41425027)
Yeah, there are definitely things to improve, but it's good enough for my use! Keep in mind that the phone I wrote this for had a 3–4" screen—there was barely room for one three-item stack, and no room at all for a return stack even if I wanted one.

Oh, yeah, what I'm calling Roll is actually Rot in Forth.

Re:Unix History and the `DC` Calculator by kragen on Monday September 02, 2024 @09:56AM (#41425413)
i think for this kind of thing it makes sense to pop up a low-pass-filtered translucent numeric entry keyboard on top of the values being displayed, the way touchscreen controls for games like fortnite and minetest work (check out handcam streamer videos on youtube if you haven't seen this). then you can use the whole display to display the numbers you're working on, so a 3–4" screen (4000mm²?) can display dozens of numbers. maybe the numeric entry keyboard should only be open while you're holding down a numeric-entry button with your other thumb, but anyway it shouldn't occupy screen real estate; it should overlay screen real estate

you called two different things 'roll'; one of them is indeed rot in forth but the other is depth 1- roll