08-19-2025 02:21 PM
tl;dr Challenge: Make this and share your results to compare.
Stemming from a /LabVIEW reddit post I've ran down the creative rabbit hole trying to see how simple and effective I can make a LabVIEW calculator, presuming limited knowledge
AND I THINK YOU SHOULD TOO
Background: I was compelled to see how hard a seemingly simple challenge was for a student that got stuck on a professors homework (as was unethically asking for paid work for his homework)
But it really got me chewing on..."how hard is this really? What if I threw away my knowledge of Event Structures? Could I make it as simple as possible but no simpler?"
I'll post in a response below with my answer, but my challenge to y'all...
Think it's easy enough for a brand new user of LabVIEW to code up?! Show me what you do with the same constraints I put on myself. Let's see what kind of solution you jigger up.
Even something as simple as making the layout reminded me about several features that if you aren't told about, are hard to discover (like setting boolean action en masse)
Remember, as simple as possible but no simpler. 😉
What kind of model did you follow? RPN, TI 85?
I think all these subtle differences make this WAY more complicated than the professor realizes.
also... am I wrong, is this more simple than I'm thinking?
08-19-2025 03:08 PM - edited 08-19-2025 03:50 PM
His image have no apparent relation to the actual problem, i.e. entering three values, choosing A and B and selecting an operation from a ring, them possibly compare with C.
In any case, I think there are plenty of "calculators" here in the forum from the last few decades, so it might be worth doing a search.
Implementing an RPN stack is easy, TI modes need to keep track of operation precedence and my TI-58 still does that wonderfully. 😄
The input should probably be a string (update while typing), so we need to filter non-numerics, but correctly parse minus and E, and edit operation (backspace, delete) etc. The question is also if everything should fit in DBL or of we want to do bignum stuff, e.g. Calc that is part of windows supports 30+ significant digits! We even see a "^" and factorial button here.
08-20-2025 05:52 PM
Hmmm, I'm going for minimal LOC (and effort) here to make a functional calculator 🙂
08-20-2025 07:04 PM
@Jay14159265 wrote:
Hmmm, I'm going for minimal LOC (and effort) here to make a functional calculator 🙂
If you want to resort to something like that, this is simpler:
08-20-2025 09:25 PM
@paul_a_cardinale wrote:
@Jay14159265 wrote:
Hmmm, I'm going for minimal LOC (and effort) here to make a functional calculator 🙂
If you want to resort to something like that, this is simpler:
Indeed, well played. These days I have the uncontrollable urge to use python for anything everything I can get away with 🙂
There was something in the OP about not using event structures.