HP 48G - Reverse Polish Lisp (RPL) Programming

Поделиться
HTML-код
  • Опубликовано: 20 сен 2024

Комментарии • 60

  • @AntonioCavicchioni
    @AntonioCavicchioni 2 года назад +12

    In my opinion, RPL is the best for engineers. It is hard to understand at the beginning, but once you understand it, you don't want to return to anything. Excellent video!

  • @hokiebama1187
    @hokiebama1187 Год назад +4

    HP48 is the peak of calculator greatness

  • @luapluapluap1000
    @luapluapluap1000 3 года назад +8

    Took me a while but found RPL well worth learning.I began with keystroke routines then progressed to RPL.

  • @gaius_marius
    @gaius_marius 2 года назад +4

    That was a very interesting overview of RPL. Thank you!

  • @stevensonnwokenkwo3281
    @stevensonnwokenkwo3281 3 года назад +10

    Ahh for the love of nostalgia and versatility; This is the calculator that did it ALL. I saw the world through it once, I had the GX, Although I was originally introduced to the SX. I eventually bought the GX since it was the newest at the time. I wish RPL was the standard even for today. It pushed the envelope breaking boundaries with machine, assembly or a mix and match; it did ALL. It was my Nintendo, an all... of course with more assignable buttons but most of all, a PC! (personal calculator). It marked the end on an era, nothing is made that way (tactile ergonomics). It used every ounce of that Saturn chip-set Great video!!

    • @kahuna1247
      @kahuna1247 3 года назад +3

      Yeah, I hate that RPL has been abandoned in current gen calculators. For the love of God I cannot understand this decision. HP must surely realise that high school students eventually become university students... the perfect time in life to be introduced to RPL and then use this as working professionals.

    • @stevensonnwokenkwo3281
      @stevensonnwokenkwo3281 3 года назад +2

      @@kahuna1247 Yeah never I went back to the other calcs, unless when using someone else's. The amazing stack and I like how elastic the programming environment; that trims extra spaces, while providing a close bracket for list, sets, bracket and program routines. Yeah speaking of hp that was the start or many many bad decisions. Buying palm OS, Compaq, and all the computers during windows vista they all went down hill. They went from top to near bottom.

    • @channelsixtysix066
      @channelsixtysix066 3 года назад +4

      @@stevensonnwokenkwo3281 It's what happens when engineering is consigned to the scrap heap and the financial types take over. They nearly destroyed the company.

    • @channelsixtysix066
      @channelsixtysix066 3 года назад +4

      @@kahuna1247 "For the love of God I cannot understand this decision." - Sales and money. TI was killing them in the school calculator market because teachers preferred using algebraic. HP wanted that market so it dropped RPL and brought out the monstrosity we see now.

    • @stevensonnwokenkwo3281
      @stevensonnwokenkwo3281 3 года назад +1

      @@channelsixtysix066 I watched it ALL happen. It was sad indeed. Their production quality plummeted, they could not even build a computer anymore; in addition they made a series of horrible decisions. You hit t on the head with the financial types take over, as they tumbled down into the ground, especially during "Carly's time with them. Imagine buying Compaq which really wasn't a true competitor since they lacked quality, to buying palm OS which was DOD, the builds during the Windows Vista period and terrible designs. I could see the crash, they retained nothing worth the while hehe. Oh could go on forever about this. I say take me back to the place where the grass is green and instruction manuals made sense. Like EMP, the financial types nuked it all for decades now.

  • @JeanNezMarre25
    @JeanNezMarre25 3 года назад +8

    best calculator ever, god did I love it :)
    I later bought a HP49 but it was not nearly the same.

    • @channelsixtysix066
      @channelsixtysix066 3 года назад

      Agreed. Electronically the 48G and 48S are brilliant and they look beautiful. But mechanically, that is, the case the electronics are mounted in, is terrible. It flexes too much and it is not meant to be serviced. You are meant to throw it away.

    • @Egzoset
      @Egzoset 3 года назад +1

      @@channelsixtysix066 Mine still works but i understood it wasn't a good idea to open it and much less perform maintenance myself - which i never had a need for anyway.

    • @channelsixtysix066
      @channelsixtysix066 3 года назад

      @@Egzoset - I'm going to get some non-working examples and play around with them. What a pity they were so badly constructed. HP could get away with that construction on the smaller models, but the larger 48 was a problem.

    • @davidg1830
      @davidg1830 2 года назад +2

      @@channelsixtysix066 I have a lot of HP 48 and I find they are very good constructed. In fact later calculators are not built so good. For example HP 49g is horrible with that plastic protector over screen producing reflections, and that horrible soft rubber keyboard. HP 48 keyboard is best in class. Of course the bad point is it can't be serviced.
      Machine is so good electronically battery last for years and years, and there is NO backup coin battery like in other calculators. You can change batteries within 10 minutes without losing memory.

    • @channelsixtysix066
      @channelsixtysix066 2 года назад

      @@davidg1830 Mine is in mint condition, but the unserviceable nature of the construction is a concern. It's a brilliant calculator and I hope to get more examples of it.

  • @skesinis
    @skesinis Год назад

    I still have this calculator in perfect working condition. I used to write programs that would fill its memory when I was at uni, but now I prefer using NCalc Fx on my iPad or iPhone, which does solve some symbolic equations the HP couldn’t.

  • @Egzoset
    @Egzoset 3 года назад +2

    Built to last and last and last... Forever!!

  • @coffeefaves
    @coffeefaves Год назад +3

    The final program is interesting! How does RPL on the 48g treat the reference to the predicate P -- 'IF L HEAD P THEN' where 'P' should be executed versus 'L TAIL P FILT' where P should be an argument? I have tried on my 50g, and found it doesn't work unless I do 'IF L HEAD P EVAL THEN'.

    • @CalculatorCulture
      @CalculatorCulture  Год назад +1

      That's interesting. I actually have no idea, but I'll wildly speculate there that must be some right to left parsing and type checking going on. I guess with IF statements it would have to lookahead to find the ELSE and END tokens anyway. It is surprising the behaviour is different on the 50G though.

    • @trs80model14
      @trs80model14 10 месяцев назад

      Thanks, I needed the EVAL to get to work on my 49+

  • @odarge
    @odarge 3 года назад +1

    Interesting , thanks.!

  • @douro20
    @douro20 2 года назад +1

    I wish I still had my 48G. I lost it a long time ago.

  • @albertstern3006
    @albertstern3006 3 года назад +2

    The program "ISPRIME" as you posted it doesn't consider 2 as a PRIME. What did you do, to make it work in your video?

    • @CalculatorCulture
      @CalculatorCulture  3 года назад +1

      Good spotting. I found the bug you mention after I shot that section of the video. I think I added added an extra IF statement for the 2 case.

  • @EdouardTavinor
    @EdouardTavinor Год назад

    I wonder when infix notation was created. It could be that it has a lot to do with human language. Either if a verb is placed between nouns or maybe a preposition, like in English e.g "you drink water". In other languages the order is different, like in Hindi "you water drink do" or in Irish: "drink you water". Maybe we'd all be programming in forth if mathematical notation had been developed in India?

    • @CalculatorCulture
      @CalculatorCulture  Год назад

      That’s a fascinating question. I think you are right that it came out of abbreviating text descriptions and therefore was affected by the underlying language structure, such as Ancient Greek. I may try to research it more for a video.

    • @gcolombelli
      @gcolombelli Год назад +1

      Probably has to do with the stack machine model of computation, it was used on some early computers and was also popular with interpreters due to the simplicity of implementation and low resource requirement. It's also very natural to go from using RPN interactively for daily use to entering programs like the calculator was a "keystroke programmable" model then to writing function and variable names as needed, for things that aren't directly accessible from a key.
      It makes the learning curve way more bearable than if it used an "easier to understand" modern language. What you lose in terms of complex program readability you gain in ease and speed of use for short programs when you're away from a computer. Sure, the new HP Prime and the TI Nspire are way faster and those BASIC/Pascal variants they use may be better for someone who is used to having portable computers near them all the time, but for it's time, RPL was a strikingly good tradeoff for the technology and use-cases of it's era.
      As much as I love Python, it doesn't feel natural trying to type Python code on a calculator, or C, for that matter. Maybe Lisp, but then, I haven't tried something like the Casio AI-1000 back when it was relevant. I still find the HP 48/49/50 more well suited to an engineering or physics undergrad than those fancy Primes and Nspires. Yeah, the TI-89 has better symbolic computation capabilities than a stock HP-48G, but there are fixes for this on a GX and if you get a 49G+ or 50G, it will probably be a lot more practical to use than a TI-89 or TI-89 Titanium.

    • @samuelwaller4924
      @samuelwaller4924 11 месяцев назад +1

      ​@@gcolombelliI'm actually designing a RPN based calculator program for ti calculators. I'm here looking for inspiration, seems like hp did something right lol.
      I have the ti83+, Ti84+CE, and Nspire CX II (no cas unfortunately) and although it is much faster and nice for graphing, the ui makes it basically unusable for standard calculations. Considering how every button on older ti's has at least 2 functions, it is amazing that they managed to double the amount of keys yet make it take twice as long to type things in. Perhaps it would be more usable with cas where you could return expressions from custom functions.

    • @gcolombelli
      @gcolombelli 11 месяцев назад

      @@samuelwaller4924 Wow, nice. Have you checked something like RPL/2 or newRPL for inspiration yet? Another one of the nice things I always loved about UserRPL was how it was pretty easy to do operations in arrays and matrices with it.

    • @gcolombelli
      @gcolombelli 11 месяцев назад

      @@CalculatorCulture I was taking a peek on the history of mathematical notation on wikipedia and... wow, there's way more about that subject than I anticipated. 😅

  • @matteo4041
    @matteo4041 3 года назад

    Nice video^_^

  • @christernilsson1
    @christernilsson1 8 месяцев назад

    RPL has exactly nothing to do with Lisp.
    No parens, no prefix notation.
    This is Forth, a postfix language.

    • @CalculatorCulture
      @CalculatorCulture  8 месяцев назад

      Yes the syntax of RPL is similar to Forth buI the dynamic type system of RPL takes a lot from Lisp. For example functions as first class citizens and the large range of high level built in types like lists, hashes and complex numbers.

  • @laughingvampire7555
    @laughingvampire7555 Год назад +1

    RPL just means reverse polish language, the L does not stand for lisp

    • @CalculatorCulture
      @CalculatorCulture  Год назад +1

      Not according to Bill Wickes who developed it www.hpcalc.org/hp48/docs/programming/rpl.txt

    • @laughingvampire7555
      @laughingvampire7555 Год назад +2

      @@CalculatorCulture it is according to the printed manual that comes with the calculator. and besides as a Lisper myself and a user of the calculator for decades, is ridiculous to call RPL a Lisp because is not a Symbolic Programming Language.
      At most the RPL supports lambdas with the x y + >> format but other than that, is no Lisp, is more of a Forth + Basic than Forth + Lisp.
      And I also code in Common Lisp, Scheme, Racket, Clojure & Emacs Lisps.
      Wolfram Programming Language is a full blown Lisp, not RPL.

    • @CalculatorCulture
      @CalculatorCulture  Год назад +1

      @@laughingvampire7555 yeah I agree it's a misleading name since RPL is more closely related to forth. Acutally the first RPL implementation was developed out of the FORTH implementaton on the 71B. Have said that it does add a range of data types to FORTH including first-class functions that may have been influenced by Lisp. I read somewhere that the HP engineers who developed it took Abelson and Sussman's scheme programming class at MIT. I could also speculate since RPL was essentially an advanced version of FORTH, whether there was a desire to distance the two to avoid IP issues with FORTH INC.

  • @Mythologos
    @Mythologos 2 года назад

    Hmmm, wonder if you could run Emacs on that? Haha.

    • @CalculatorCulture
      @CalculatorCulture  2 года назад +1

      Apparently someone did make an emacs-like editor for its successor the 49G. www.hpcalc.org/details/3940

  • @frankfirst6863
    @frankfirst6863 3 месяца назад

    Sound is terrible 🤬

    • @CalculatorCulture
      @CalculatorCulture  3 месяца назад

      Yes I’ve improved the sound on my more recent videos.

  • @colinrobert-kv2up
    @colinrobert-kv2up 7 месяцев назад

    Too much battery release in face as red eye lite blindness,careful as eye filters spectrum image in color, my new stuff is mind-reading signals. Eye movement,3d 4d,as 7d image converter is scanned image converter. AI needs printing. See for you overlap color reimage. Staryt sparkly film strip dna finder pharamones,...alien print. John.

  • @youerde
    @youerde Год назад

    Grummel Grummel Mummuel Mummuel not a nice Sound .. i do not understand nothing