5 ms·
Notice the distinct lack of an '=' button --- HP's calculators have been almost exclusively RPN-based. It's funny to watch other (newer) developers reactions w
by userbinator 9y ago
Notice the distinct lack of an '=' button --- HP's calculators have been almost exclusively RPN-based.
It's funny to watch other (newer) developers reactions when they ask to borrow the calculator that's usually on my desk (a 42S) and then give it back several minutes later, with a puzzled look on their faces.
- b5 9y agoAt my last job, which involved a lot of number work, my boss would often pick up my HP-12C to quickly calculate something we were talking about. Every single time, he'd say, "Your calculator is broken," then put it back on my desk. It became a running joke of ours.
- ece 9y agoA 42S that a high school friend had was how I first learned about RPN and HP calculators. Bought a 48G soon after which I still have. I use the prime app on android now which works well when needed.
- agumonkey 9y ago"you've been stacked" -- HP calc owner Last year I finally read the whole manual (as a teen I only used the symbolic differentiator, most useful and magical to my brain at the time). Since I learned about Lisp, so RPN programming features appealed to me. I realized that: 1) RPN has lambda << 2 + >> means (lambda (...) (+ 2 ...)) 2) RPN has a short syntax for them << a -> a 2 + >> Yes, 1990 HP RPN had arrow notation out of the box. Take that ES6 !
- nemoniac 9y agoIf you're enjoying that, you'll find even more connections with Forth, also a very cool programming language. https://en.wikipedia.org/wiki/Forth_(programming_language) https://en.wikipedia.org/wiki/Forth_(programming_language)
- agumonkey 9y agoI love stack languages. Forth, Factor, Joy, Cat .. (all the concatenative crew). ps: there are some Chuck Moore talks on youtube that are worth gold. His CPUs are heaven
- vram22 9y agoCan you please give links for those of his videos that you liked?
- agumonkey 9y agoMy bad, my favorite wasn't on youtube, but infoq (thanks to them) https://www.infoq.com/presentations/power-144-chip https://www.infoq.com/presentations/power-144-chip then https://www.youtube.com/results?search_query=chuck+moore+ga144 https://www.youtube.com/results?search_query=chuck+moore+ga1... https://www.youtube.com/watch?v=odBjuSCX8jE https://www.youtube.com/watch?v=odBjuSCX8jE and Kalny's videos https://www.youtube.com/watch?v=KSTjQA-iz4w https://www.youtube.com/watch?v=KSTjQA-iz4w
- vram22 9y agoSaw the links you posted, thank you.
- agumonkey 9y agoYou're welcome. Enjoy.
- throwaway7645 9y agoHave you used his greenarrays chips? If so I'd love to hear anything you have to say on them and your Forth experience in general.
- agumonkey 9y agooh no, I was far removed from this kind of things, I'm a java/python coder let's say. But I recently dug into low level electronics so I hope I can put my hands on one.
- mvaliente2001 9y agoHP48(S(X)) also came with two excellent manuals with hundreds of pages of documentation. My only regret is that when I was in college, I could have written better programs. I tended to write huge functions with a deep stack, hard to understand, debug and modify. Had I know what I know now, I would have written dozen of small function and relying more in lambdas... And I didn't know I can use named arguments.
- agumonkey 9y agoat least you did write them, I have respect for people suffering complexity when they don't know better
- mschaef 9y ago> 2) RPN has a short syntax for them << a -> a 2 + >> The syntax is slightly different. What it should be is this << -> a << a 2 + >> >> The arrow introduces a binding form that captures the top n levels of the stack into n named local variables. (There's also a lower level implementation that forgoes the names in favor of a lookup-by-ordinal scheme that's a lot faster.) The other notable difference from what you might expect is that the lexical environment is not captured: Consider this function: << -> a << << a 2 + >> >> >> What it returns is a function object that looks like this, except that 'a' is a local variable reference rather than the global variable reference it looks like: << a 2 + >> Evaluating this results in an error, because while 'a' is represented as a local variable reference, the environment containing the local binding for 'a' is no longer available.
- agumonkey 9y agoYou're totally right. I already forgot the deails. I just put out my hp49.. god how I love these things. ps: I just found out the latest attempt I did last years was a var called REC = << -> U << U U EVAL >> >> .. pretty sure I was trying a fixpoint CPS factorial in RPN