SciCalc
Chris (121) 472 posts |
Anyone currently having a look at this? I’ve started making some changes, mostly presentational, with a view to producing an updated version for ROOL. Any comments, let me know. |
Steve Revill (20) 1361 posts |
We haven’t had any code submissions to SciCalc in the recent past so I think you are probably safe to go ahead. |
Chris (121) 472 posts |
Enough banging on about porting – what RISC OS really needs is a new SciCalc! I’ve had a go at overhauling the interface and tidying up the code. Hopefully it looks a bit smarter now. The key change which may be of interest to others is that SciCalc is now theme-aware. When run, it will check to see if a theme is installed which has a !Sprites and a Sprites file to replace the default set. I’ve created a set for my own theme, Steel, as well as the RISC OS 4 and RISC OS 5 themes that come with my theme manager. I’ve put some screenshots here. Comments welcome. In due course, I’d like to offer the revised app for inclusion in the ROOL sources, as well as publish the system for theming third-party apps (it’s really simple). Before I try and finish it off, I’ve got a couple of questions: - SciCalc is now switchable between simple and scientific views, just like the Windows calculator. What do people think about renaming it !Calc and replacing the very simple calculator currently bundled in Apps? Not a big change, but might simplify the sources a tiny bit and save a few kB. - What’s the preferred method of opening up a revised app for testing? I could increment the version number and host it on my site for testing purposes, but I’d welcome guidance. - Does anyone have any request for features? I’m not planning (or able) to add new mathematical functions, but I will be changing the display field to use outline fonts and adding a Choices window. Cheers, Chris |
Michael Drake (88) 336 posts |
I like that you’ve changed the method of angle and base selection from buttons that cycle to gright menus. I’d make the OR button the same width as all the other buttons. I’d prefer to have one calculator app—that can be maximised/minimised between a simple calculator and the scientific calculator—than two separate apps (a full version and a stripped down one). Maybe one of the Choices could be whether it opens in scientific mode by default? I have a feature idea. How about an “Ans” button. On my graphics calculator it evaluates to the result of the last calculation. E.g. as a trivial example:
But perhaps it’s less useful without the command history being displayed like that. |
Chris (121) 472 posts |
Yes, the OR button does look a bit odd. The reason it’s narrower is to make space for the NAND button on the binary, octal and hex views. See screenshot 4 on the webpage. Might be worth fiddling with the layout a bit more here. One idea I had was to add some small applets with related functionality, such as unit conversion or interest calculations. Very easy to add, won’t bloat the app too much, and might make it a more useful utility. Yes, the idea with the Choices dialog is to control the following options: - Which view to make default (simple/scientific); - Whether or not to blend in with the current theme; - Which base/angle to start up in. The Ans idea, and the corresponding large display, is interesting. I’ll look into it. I suspect it might be quite a bit of work for a relatively esoteric feature, but if there’s demand I’m happy to consider it. Cheers for the feedback. |
Chris (121) 472 posts |
Testers wanted for a new SciCalc app. You can download it from here New features are: - Toggles between standard and scientific views This app offers the functionality of both !Calc (in older versions of RISC OS) and !SciCalc. I’d like to rename the current version to !Calc, as it strikes me as a simpler and nicer name. What are people’s views? Please let me know about any bugs. I’d be particularly interested to know if the menu shortcuts in the Edit menu are correct: to copy the Summary should require Ctrl+Shift+C, yet I’m informed that on the Iyonix the menu just lists ^C (despite what’s in the messages file). If anyone can reproduce this, or let me know what’s going on, I’d be grateful. I’m using RPCEmu/RO 5.17 on a Mac. I’m not likely to add new features, but I’m happy to address comments/criticisms/bugs, etc. If people think it’s an improvement, I’ll submit to ROOL for inclusion in the next ROM. I’ll be away from my computer for a week or so, but will get back to anyone who comments after that. This version has been tested by a couple of people, but I’m sure there are some glitches, so tread with care :) |
Rik Griffin (98) 264 posts |
I don’t think I ever used the old Calc or SciCalc applications! Nonetheless I had a quick play with this new app and it all seems to work well. The only minor fault I could find was that the menus don’t stay open if you Adjust click on an entry. The keyboard shortcuts in the Edit menu were correct on an Iyonix, RO5.17. |
Martin Avison (27) 1494 posts |
I think SciCalc v0.70 is a great improvement over the older Calc & SciCalc. I especially like the simple calculation display. I suggest that Help should be moved from the window menu to the IconBar menu, where most other applications are. The replacement for the single base and Mode buttons is better, but it is still two clicks to change either of them. Can you consider replacing the Base with 4 small buttons, and the Mode with 3 small buttons? These would conveniently be over 7 other buttons, so would look neater, and would enable changes to be made with a single click. The challenge will be designing suitable icons for the functions! They would also need ‘pressed’ versions for the active one. The Base buttons could be in a more logical ascending order than the menu – ie Binary, Octal, Decimal and Hex. I agree it should be renamed back to !Calc – !SciCalc has always been a bit of a mouthful. |
Andrew Conroy (370) 740 posts |
Thanks, that’s a nice program. Think I’ve found a bug though – if you put something into memory, clear the display and then repeatedly click MR, the display just shows the value, but the summary display keeps getting longer. eg. if you put 6 into memory, then press MR three times, the display just says “6”, but the summary says “666”. I’m not too sure I prefer the menu option for changing base though, in the Acorn version you could swap between DEC & HEX or DEC & BIN with a single click, but this one needs two separate clicks. |
Peter van der Vos (95) 115 posts |
Nice. |
W P Blatchley (147) 247 posts |
This looks very nice. I haven’t had time to play with it much, but great work!
Or, perhaps another idea, make a single click on the base toggle between the two previously selected bases? Or cycle through them? Personally, I’d find a toggle action more useful, I think. |
Trevor Johnson (329) 1645 posts |
My old Casio fx-100 (IIRC the name) functioned like this. I found it quicker than the later MODE <followed by a number> to select, but perhaps it’s just because I was used to it. Anyway, replacing the base & mode selection by multiple individual buttons would be quickest for the user IMHO, with the selected function slabbed in (rather than using some combination of |
Martin Avison (27) 1494 posts |
No! The old original method was a single button for Base which cycled through the 4 Base options, which was tedious. Four small buttons, for Binary, Octal, Decimal and Hex would give a one-click change to any Base and an indication of the selected Base, without complicating it with selection mechanisms and a separate display method. And the same applies for the Mode, as its 3 options could become 3 buttons.
Absolutely! |
Martin Bazley (331) 379 posts |
I don’t think I’ve ever seen a copy of this legendary “!Calc” program – all computers I’ve ever used had !SciCalc in Apps, but not !Calc. Whatever happened to it? |
Steve Revill (20) 1361 posts |
Pretty much any screenshot of RISC OS 2 seems to have !Calc running in it. I’m not sure where its source code lives (although it’s almost certainly BASIC so self-sourcing). I looked in our CVS repository (even the closed-source bit) and couldn’t immediately see it. |
Ben Avison (25) 445 posts |
… he says, linking to a scrrenshot of RISC OS 3.11. That said, the calculator looks pretty much identical back as far as Arthur. I’m coming to the conclusion that from RISC OS 3.5 onwards, Acorn only distributed !SciCalc, not !Calc. And since Acorn didn’t start using CVS until RISC OS 3.6, that would explain its absence from the repositories. We’d have to go digging through the RISC OS 3.1 sources to find !Calc, I think, and I’m not sure where they are, they might even still be on floppies! |
Matthew Phillips (473) 721 posts |
I like the new features, by and large. Excellent work! However, I wonder whether the LOG and LN functions and their inverses 10-to-the-x and e-to-the-x could be positioned near each other as they were on the old version, rather than scattered round the calculator? How about putting these on the top row of the yellow block: () nCr pCr x! RND LOG LN then on the second line, put 10-to-the-x and e-to-the-x under the LOG and LN buttons. Put Pi and % on the bottom row where x! and 10-to-the-x currently are. That way the factorial, RND and combinations and permutations are all close together too, which makes a nice grouping of things used in probability (not that serious probability people would use RND, but the thought’s there). The summary line is a great idea, but there is a problem with it if you use the +/- button to swap the sign of the result immediately after pressing equals. If you enter: 7 + 3 = the summary shows 7 + 3 = 10 if you then press +/- we get a summary showing 7 + 3-10 The summary works nicely if you enter 7 + 3 +/- = as it shows 7 + -3 = 4 I was surprised there was no M+ button, but that’s been the case for ages and I’ve never noticed before. On my 24-year-old Casio calculator (still going strong) there is M+ Min and MR but no MC. For clearing memory you have to clear the current number to zero and press Min. I’m not sure which is more useful: probably depends what you’re used to. If the zero button were reduced to normal size instead of double-width, there’s be room for an M+ button in addition to the existing set in the non-scientific view. I’m not sure how best to arrange them though. |
Matthew Phillips (473) 721 posts |
Another problem with the summary display. Press the following buttons: () 10 COS + 5 () the summary shows (cos(10) + 5) Then press SIN and the summary shows (cossin(10) + 5) (To be honest, even if you couldn’t fix it, I would prefer the “slightly faulty in extreme circumstances” summary line to having no summary at all! It’s such an improvement over entering calculations blindly.) |
Matthew Phillips (473) 721 posts |
Another thing that’s always annoyed me about SciCalc: I don’t usually run it on boot, so I only double-click on it when I want to use it. It’s annoying the way it just plonks itself on the iconbar and doesn’t open its window. Could this be made an option in the choices, perhaps? |
Dave Higton (281) 668 posts |
I second that.
Another way of doing it might be to have an optional argument passed to the !Run file; if present, the window wouldn’t open. That gives the possibilities of double-clicking it to get it to load onto the icon bar and open immediately, and Filer_Running it from a Desktop file etc. to get it on the icon bar without opening. |
Steve Revill (20) 1361 posts |
I have no objection to it being renamed to just !Calc, by the way. |
Chris (121) 472 posts |
Thanks for all the comments. I’ll work through all the bug reports. If possible, it would be nice to squash all the Summary Bar glitches, though it’s fairly complicated to account for all possible entries – I’ll do my best.
The new style is to put the Help entry in the main menu as the final entry (see here ). I have to say that this makes sense to me, but happy to go with the majority view. I should probably add an entry to the iconbar menu as well though, in any case.
Dammit – that’s a much more elegant solution, and would have saved me a lot of work :) I’m happy to make this change, unless others strongly object. As others have mentioned, though, going back to the single ‘cycled through’ button would be a mistake.
Yes, I’ll add it to Choices. |
Jess Hampshire (158) 865 posts |
Looks nice, I like the switching between sci and normal . Could cut and paste be implemented? That is the feature I would like most. Could adjust be used for the inverse of the functions to save keys? |
Chris (121) 472 posts |
The result and summary bar can be copied and pasted into other apps. Is that what you meant?
I don’t think that’s a good idea – it’s too non-obvious, IMO. |
Jess Hampshire (158) 865 posts |
I was thinking more of drag and drop (like netsurf’s address bar) and being able to drop numbers into the calculator from other programs.
I had a calculator that had an inverse button that was used before a function to reverse it. (But maybe have it as a configure option) |