DB48X: HP48-like RPL implementation for DM42
|
09-02-2024, 01:36 AM
Post: #281
|
|||
|
|||
DB48X v0.7.16
Release v0.7.16 has just been published.
The focus of this release is on new commands, notably for matrix and vector operations. This release also ships with a DM48X-specific keymap, which fixes a problem with teh file selector on the DM32. The equation library has been extended with numerous equations, but they are not fully validated yet. - con, idn and ranm matrix generation commands - Array→ and →Array commands to convert array to/from stack - dot product and cross product commands for vectors - DispXY styled text rendering command - DupDup command duplicating top item twice - Add a large number of equations to equation library DB48X,HP,me |
|||
09-03-2024, 12:31 PM
Post: #282
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
Quick questions about the latest version of the firmware for DB48x...
1. I must have missed a few updates because I was still on 0.7.13. I installed the new version today and got a warning message about this program not being targeted for this hardware. Is this normal/expected behavior? I pressed 1 to continue, and it still seems to run OK. I did install the included QSPI file first. 2. Is there anything special that needs to be done with the keymap file that is included in this release? I saw mention in the release notes about a keymap being included but I thought it was to solve an issue on the DM32 hardware. Thanks! WP31S/WP34S, WP43/C47, newRPL (various), and DB48X adhesive and tabbed overlays: https://www.hpmuseum.org/forum/thread-20113.html |
|||
09-03-2024, 12:56 PM
Post: #283
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-03-2024 12:31 PM)spiff72 Wrote: Quick questions about the latest version of the firmware for DB48x... The two problems are related. You simply need to copy the keymap file to your machine, and it will install the DB48X keymap to the file. On DM42, it does not make much of a difference. On DM32, it repairs the file selector, e.g. if you do "new file" and then type a file name and ENTER, it now works. DB48X,HP,me |
|||
09-03-2024, 05:09 PM
Post: #284
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-03-2024 12:56 PM)c3d Wrote:(09-03-2024 12:31 PM)spiff72 Wrote: Quick questions about the latest version of the firmware for DB48x... Got it! I had placed the keymap file in a subfolder on the internal storage where I keep a copy of the QSPI file for DB48x. I moved it to the root folder, and re-ran the db48x program file and no error message this time. I need to learn to trust the locations of the various files in the zipped files :-) WP31S/WP34S, WP43/C47, newRPL (various), and DB48X adhesive and tabbed overlays: https://www.hpmuseum.org/forum/thread-20113.html |
|||
09-04-2024, 03:37 PM
Post: #285
|
|||
|
|||
DOSUBS command
Hello Christophe, do you plan on implementing DOSUBS command? Or is there another command that I can use as alternative?
Thank you |
|||
09-04-2024, 04:58 PM
Post: #286
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-04-2024 03:37 PM)grbrum Wrote: Hello Christophe, do you plan on implementing DOSUBS command? Or is there another command that I can use as alternative? I plan to implement all the non-system features of the HP48. DOSUBS is part of it. As a matter of fact, I was looking at it recently, and started studying how to actually implement it. Having someone asking for it definitely bumps the priority up. Right now, here are some tools you can use that play a similar role: 1/ MAP / REDUCE / FILTER. I used the now traditional terminology for these operations. The HP48 calls REDUCE "STREAM", and that alias is accepted. I don't think that RPL has a direct equivalent to FILTER, which is used to build a list from items for which a predicate is true. For example, to filter only odd values in a list, you can use { 1 2 3 5 6 7 8 11 9 } << 2 MOD >> FILTER, and you get { 1 3 5 7 11 9 }. 2/ FOR loop with a list input. For example 0 { A B C D E } FOR I I 2 * 1 + + NEXT returns 2*A+2*B+2*C+2*D+2*E+5 (assuming none of the variables is defined). Part of the problem I have with DOSUBS and DOLIST is the special treatment they make of commands based on the number of arguments that they take. I have the infrastructure in DB48X to replicate that functionality, but it will take a lot of testing with the HP48 and HP50 to see how that behaves on real HP machines. People who use DOSUBS tend to know what they are doing ;-) DB48X,HP,me |
|||
09-04-2024, 06:14 PM
Post: #287
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-04-2024 04:58 PM)c3d Wrote:(09-04-2024 03:37 PM)grbrum Wrote: Hello Christophe, do you plan on implementing DOSUBS command? Or is there another command that I can use as alternative? Thank you, I use it to perform iterate calculation using consecutive items in the list. I have a program that I use daily where I can add any number of items in the stack, it will make a list and perform a calculation between the numbers. example to calculate circle area reduction if input is sequence of diameter of circle. DRAFT « DEPTH →LIST 2 « / INV 2 ^ 1 - » DOSUBS OBJ→ DROP 4 FIX » I have a series of programs that follows the same idea and performs different calculations. thank you. |
|||
09-04-2024, 07:11 PM
Post: #288
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-04-2024 04:58 PM)c3d Wrote: 1/ MAP / REDUCE / FILTER. I used the now traditional terminology for these operations. The HP48 calls REDUCE "STREAM", and that alias is accepted. I don't think that RPL has a direct equivalent to FILTER, which is used to build a list from items for which a predicate is true. For example, to filter only odd values in a list, you can use { 1 2 3 5 6 7 8 11 9 } << 2 MOD >> FILTER, and you get { 1 3 5 7 11 9 }. DOLIST is relatively straightforward. With a single list argument it is just map. With two or more lists it is essentially zipWith, the difference to other languages being that the arguments (one from each list) appear on the stack, rather than as a sublist or tuple. DOSUBS is rather strange, I don't know of an equivalent in any other language. It sure is useful though, and RPL would be poorer without it. DOSUBS ,with a numerical argument n, gives its function argument an n-element subsequence of the list but again the elements appear on the stack. For instance, Code:
There is no exact equivalent to filter in RPL but it can be faked with DOLIST or DOSUBS. ListExt and LstX do have filter as well as many other list processing functions, most of which come from Haskell, particularly from the package Data.List. While many of these functions can also be reproduced with built-in RPL commands, the ListExt functions are much faster, sometimes by orders of magnitude. Please forgive me if the above is already obvious to you, but i want to make sure that these rather unusual commands are well understood. |
|||
09-06-2024, 07:05 AM
Post: #289
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(08-19-2024 10:21 PM)c3d Wrote:(08-19-2024 07:11 PM)nickapos Wrote: Hi guys, I got the iOS app today and noticed a couple of minor discrepancies. The EEX button mentioned in the manual does not exist in the app. We got 10x button instead. I do a lot of calculations in computing and am trying to figure out how to use this functionality efficiently. An example common computation would be computing how long it would take to transfer 600TB at 10gbit/s. I’m struggling to enter these units directly. The unit menu doesn’t directly support these as you mentioned, and attempting to use alpha mode isn’t working for me “600 TB” ends up showing up as 600 in stack position 2, and TB in position 1. I definitely think having the common units or even just a menu option that cycles through them after selecting the base unit in the unit menu would be wonderful. So in this case it could be 600 - unit - byte <press toggle button to cycle to TB>. The complication would be the need to support both base2 and base10 forms, since both are used. Perhaps one cycle button for each form. If there is a way to do this already I’m not understanding I’d love to know it! Thank you for all of your time and effort on this project! |
|||
09-07-2024, 12:21 AM
(This post was last modified: 09-07-2024 12:22 AM by c3d.)
Post: #290
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-06-2024 07:05 AM)ormandj Wrote: I do a lot of calculations in computing and am trying to figure out how to use this functionality efficiently. An example common computation would be computing how long it would take to transfer 600TB at 10gbit/s. I’m struggling to enter these units directly. The unit menu doesn’t directly support these as you mentioned, and attempting to use alpha mode isn’t working for me “600 TB” ends up showing up as 600 in stack position 2, and TB in position 1. The next release will add several common units directly to the Computing units menu that will make this much easier to enter. Notably, both TB, TiB and Gbit/s are now in the menu. This is tracked in issue #1163 As for entering "600TB", you should use the RPL unit separator, i.e. type 600_TB. The _ characters is F1 in the Units menu (shift 5). It does display on the stack as 600 TB for readability, but when you edit it, you will see that it edits as 600_TB. Quote:I definitely think having the common units or even just a menu option that cycles through them after selecting the base unit in the unit menu would be wonderful. So in this case it could be 600 - unit - byte <press toggle button to cycle to TB>. Agreeing on both counts. However, the Cycle command (the key corresponding to letter O, labeled EEX or x10^n depending on keyboard overlay) preserves the value, so it does not do exactly what you want. If you enter 600_B and cycle, you will get things like 6_hbyte, which is not exactly useful. So I believe that I need to add two new behaviours: - Value-preserving custom cycles for computing units when they are on the stack. Those would be value preserving, since this is generally the behaviour for "Cycle". But cycling through KB/KiB/MB/MiB/GB/GiB seems to make more sense than considering normal SI prefixes like cB or hB. This is a fairly minor change, since the infrastructure supporting custom unit cycles is already in place. - A new behaviour for that same key when editing and after a unit. If you enter 1 and type this key, you get 1E or something equivalent, to enter powers of 10. But if you entered a unit, e.g. you typed 1_B, then it would make sense that it cycles the prefix without changing the associated numerical value, i.e. to get 1_KB or 1_MB. The logic for that is not in the current codebase, and needs to be added. This will take a little longer. Quote: The complication would be the need to support both base2 and base10 forms, since both are used. Perhaps one cycle button for each form. The current keyboard is crowded, so I tend to overload keys based on context. I would probably overload Cycle for that, as indicated above, meaning that the cycle would be something like KB/KiB/MB/MiB/GB/GiB. Question is whether it's better to have that or KB/MB/GB/KiB/MiB/GiB. Maybe the latter corresponds more to common usage. Quote:If there is a way to do this already I’m not understanding I’d love to know it! Thank you for all of your time and effort on this project! There is a way, which is to add a custom cycle to your units.csv. But since I'm likely to have added this for the next release, just asking for it on this list is probably faster ;-) DB48X,HP,me |
|||
09-09-2024, 12:01 AM
Post: #291
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-04-2024 03:37 PM)grbrum Wrote: Hello Christophe, do you plan on implementing DOSUBS command? Or is there another command that I can use as alternative? I implemented `DOSUBS` and `DOLIST`, but I ran into a couple of bugs while testing it that delayed the release I normally try to do on week-ends. Specifically, the test on page 3-67 of the HP50G advanced reference manual exposed two issues: * Parsing algebraic commands that did not take any arguments caused a syntax error. This was exposed by the `NSUB==1` condition in the test case. * The default condition in a `CASE` statement was incorrectly dropped. This was exposed by Example 3, which uses a `CASE` with a default condition. These two problems are now fixed, and the test cases for DOLIST and DOSUBS now seem to pass, but it's 2AM here and I need some sleep, so I don't have time to cut the weekly release. 0.7.17 will have to wait one more week I guess. DB48X,HP,me |
|||
09-12-2024, 04:50 AM
Post: #292
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-02-2024 01:36 AM)c3d Wrote: Release v0.7.16 has just been published. Thank you for sharing DB-48X Christophe! I have already downloaded iPadOS version and it's great! Is it possible to change the font on the DB-40X free app? Should I need to buy the DB-50X app to be able to do that? Thank you again and keep up the good job! |
|||
09-12-2024, 07:03 PM
Post: #293
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-12-2024 04:50 AM)JeanMichelFleur Wrote:(09-02-2024 01:36 AM)c3d Wrote: Release v0.7.16 has just been published. It should be possible, yes, in the same way as on the DB-50X app. Go to DISP (SHIFT-O), then UI (SHIFT-SHIFT-F5), then enter a value on the stack (e.g. 0, 1, 2) and select Result (Shift-F2). Result sets the font for the first level of the stack, Stack for the other levels, Edit for the text editor, MLEd for the multi-line text editor. Just tested it, Works For Me™. There are a few alternate fonts (font number above 3) but only fonts 0-3 support the whole Unicode character set, so some text may look funny or miss some glyphs with font 4 and above. The reason is that the other fonts were designed for the DM42, which does not support as many characters. At some point, I will probably make it possible to load fonts dynamically from disk, so that you can customize the look like on recent HP calculators. But it's a relatively low-priority feature. If there are fonts you would like me to consider, please open an issue on GitHub. The constraints are: - The font needs to have a license that allows me to use and distribute it (notably because I have to be able to extend it with RPL-specific glyphs) - It needs to look good with automated variations (e.g. auto-italics and auto-bold) and at very small sizes (for the menus). - It needs "good enough" Unicode support (at least all of European characters, plus basic maths and a few special glyphs). If you found a font you like, you can convert it with the ttf2font that is part of the project. You simply need to rebuild the project after changing that line. But please realize that getting good results is not obvious. Here are a few tests with various fonts: C43 font C43.bmp (Size: 11.13 KB / Downloads: 21) HP48 font HP48.bmp (Size: 10.83 KB / Downloads: 18) A fancy font called Trattatello (I did not even show the menus, which are ugly) Trattatello.bmp (Size: 10.88 KB / Downloads: 14) Rockwell, a rounded serif font, which might be turned into something usable Rockwell.bmp (Size: 11.23 KB / Downloads: 16) Yanone Kafeesatz, a font that has problems at small sizes. Yanone Kafeesatz.bmp (Size: 10.98 KB / Downloads: 15) Quote:Should I need to buy the DB-50X app to be able to do that? No. The difference is that DB-48X and DB-50X will let you save the state, including your font preferences or stack contents. Quote:Thank you again and keep up the good job! Getting feedback from users is the best way to feel like this is useful. DB48X,HP,me |
|||
09-12-2024, 07:54 PM
Post: #294
|
|||
|
|||
v0.7.17: DoSubs, DoList, various other improvements
(09-04-2024 03:37 PM)grbrum Wrote: Hello Christophe, do you plan on implementing DOSUBS command? Or is there another command that I can use as alternative? Pre-release v0.7.17 was just published, which among other things implements DOSUBS and DOLIST. (09-06-2024 07:05 AM)ormandj Wrote: I do a lot of calculations in computing and am trying to figure out how to use this functionality efficiently. An example common computation would be computing how long it would take to transfer 600TB at 10gbit/s. I’m struggling to enter these units directly. Unit entry has been improved to help with such cases:
For example, to enter 10_Gbit/s, you can enter 1 0 UNIT (SHIFT-5) Computing (SHIFT-SHIFT-F5) bit (F1). At this point the editor shows 10_bit, the cursor is after "bit", and in 'unit' mode (U). Type EEX three times to get 10_Gbit. Then type /, which does not apply immediately because you are in unit mode. Instead, you see 10_Gbit/ on the command line. Type s or go to the Time menu (SHIFT-5-SHIFT-F1) and select 's' (F1). The command line now contains 10_Gbit/s. ENTER puts it on the stack. Features
Bug fixes
Improvements
DB48X,HP,me |
|||
09-13-2024, 06:55 AM
Post: #295
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
Love the units improvements cheers Christophe
|
|||
09-15-2024, 11:58 PM
Post: #296
|
|||
|
|||
v0.7.18 - APPLY, SUBST, WHERE
The weekly release is out.
Nothing major (v0.7.17 was late), restarting work on symbolic operations, this time with SUBST, APPLY and WHERE (the | operator). That | operator has a slightly different syntax for multiple substitutions, i.e. where the HP48 would have 'A+B*C|(A=X;B=Y)', DB48X currently only supports 'A+B*C|A=X|B=Y'. I find it easier to type and read. Does anyone really want the HP syntax, or is that used infrequently enough that manually adjusting is justified? DB48X,HP,me |
|||
09-16-2024, 07:37 AM
Post: #297
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
Christophe,
Will DB48x run on the new DM42n? |
|||
09-16-2024, 07:43 AM
Post: #298
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-15-2024 11:58 PM)c3d Wrote: That | operator has a slightly different syntax for multiple substitutions, i.e. where the HP48 would have 'A+B*C|(A=X;B=Y)', DB48X currently only supports 'A+B*C|A=X|B=Y'. I find it easier to type and read. Does anyone really want the HP syntax, or is that used infrequently enough that manually adjusting is justified? Still not a user, just an observer, shame on me, I don't really have a vote then, do I? :-) Anyway... IMHO, whoever needs 100% compatibility can easily get hold of a 50, even 48s in good shape are still available; you shouldn't feel limited by maintaining full compatibility. Fix what you don't like, improve, have fun. I can see "Differences with other RPLs" in the Overview part of the docs, there's nothing else I can wish for. Apart from SM offering a model with your firmware and printed labels :-) |
|||
09-16-2024, 08:38 AM
Post: #299
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-16-2024 07:37 AM)Jase Wrote: Christophe, I've been told by SwissMicros that the hardware is the same as a DM32, so the DB50X variant should run. I have not tried yet. DB48X,HP,me |
|||
09-16-2024, 08:45 AM
Post: #300
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(09-16-2024 07:43 AM)vaklaff Wrote:(09-15-2024 11:58 PM)c3d Wrote: That | operator has a slightly different syntax for multiple substitutions, i.e. where the HP48 would have 'A+B*C|(A=X;B=Y)', DB48X currently only supports 'A+B*C|A=X|B=Y'. I find it easier to type and read. Does anyone really want the HP syntax, or is that used infrequently enough that manually adjusting is justified? Prospective users get two votes ;-) Quote:Anyway... IMHO, whoever needs 100% compatibility can easily get hold of a 50, even 48s in good shape are still available; you shouldn't feel limited by maintaining full compatibility. Full compatibility was never an objective, if only because there is no plan to have a SATURN emulator, nor room to store a copy of the HP ROM, which is what you need if you want to run games or the MetaKernel or libraries using machine code. Quote:Fix what you don't like, improve, have fun. I can see "Differences with other RPLs" in the Overview part of the docs, there's nothing else I can wish for. Apart from SM offering a model with your firmware and printed labels :-) Ping them, again and again. At some point, maybe they will change their mind. DB48X,HP,me |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)