Reviving Reverse Polish Lisp
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Title of Series | ||
Number of Parts | 542 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/61456 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 2023322 / 542
2
5
10
14
15
16
22
24
27
29
31
36
43
48
56
63
74
78
83
87
89
95
96
99
104
106
107
117
119
121
122
125
126
128
130
132
134
135
136
141
143
146
148
152
155
157
159
161
165
166
168
170
173
176
180
181
185
191
194
196
197
198
199
206
207
209
210
211
212
216
219
220
227
228
229
231
232
233
236
250
252
256
258
260
263
264
267
271
273
275
276
278
282
286
292
293
298
299
300
302
312
316
321
322
324
339
341
342
343
344
351
352
354
355
356
357
359
369
370
372
373
376
378
379
380
382
383
387
390
394
395
401
405
406
410
411
413
415
416
421
426
430
437
438
440
441
443
444
445
446
448
449
450
451
458
464
468
472
475
476
479
481
493
494
498
499
502
509
513
516
517
520
522
524
525
531
534
535
537
538
541
00:00
Reverse engineeringReverse engineeringComputing platformElectronic mailing listOpen sourceComputer animation
00:29
Web pageReverse engineeringDemo (music)NumberOpen sourceData modelObject (grammar)outputOpcodeParsingPrice indexCodeRead-only memoryType theoryGroup actionSequenceFile formatComputer wormSource codeSpeicherbereinigungVolumenvisualisierungOnline helpSoftwareReal numberObject modelCalculationSpeicherbereinigungComputer simulationComputer hardwareFreewareDemo (music)Compact space
01:36
Computer hardwareSimulationDemo (music)Shift operatorAlpha (investment)Mountain passContent (media)Newton's law of universal gravitationLogicKeyboard shortcutDefault (computer science)Directory serviceType theoryAdditionDemo (music)Integrated development environmentLine (geometry)Point (geometry)Sanitary sewerComputer hardwareComputer simulationSoftware testingCalculationSoftwareVariety (linguistics)QR codeCartesian coordinate systemSpacetimeFerry CorstenStructural loadComputer programmingComputer animation
02:24
Computer programComputing platformDynamic Host Configuration ProtocolPhysical systemFirmwareRevision controlData typeMenu (computing)Differenz <Mathematik>HyperlinkStack (abstract data type)Functional (mathematics)Key (cryptography)Multiplication signStandard deviationLevel (video gaming)NumberOperator (mathematics)Integrated development environmentComputational sciencePoisson-KlammerTerm (mathematics)Sign (mathematics)CalculationRepository (publishing)Online helpComputer programmingLine (geometry)SoftwareInterface (computing)ResultantReverse engineeringFormal languageInstance (computer science)Endliche ModelltheorieElectronic mailing list
04:13
Interactive televisionFormal languagePositional notationReverse engineeringWeb pageComputer programmingPhysical systemBefehlsprozessorImplementationCarry (arithmetic)Hybrid computerAddress spaceCalculationFormal languageInteractive televisionReverse engineeringSign (mathematics)Instance (computer science)Extreme programmingPresentation of a groupDressing (medical)Keyboard shortcutBitAddress spacePoint (geometry)Set (mathematics)Beat (acoustics)Nichtlineares GleichungssystemNumberNetwork topologyFreewareSoftwareBuildingForm (programming)Source codeGoodness of fitSeries (mathematics)Theory of relativity40 (number)Semiconductor memoryPhysical systemCellular automatonMoment (mathematics)Different (Kate Ryan album)1 (number)Thermal expansionVirtual machineBus (computing)ImplementationRow (database)Tape driveComplete metric spaceEndliche ModelltheorieNeuroinformatikRight angleWorkstation <Musikinstrument>Real-time operating systemEmulatorType theoryReal numberPositional notationVariety (linguistics)PlastikkarteSineBefehlsprozessorRepresentation (politics)ArmFirmwareField (computer science)Computing platformCodeProgramming paradigmData acquisitionOpen sourceComputer animation
08:39
Computing platformFreewareFirmwareWeb pageReverse engineeringComputing platformSoftwareCalculationForm (programming)Physical lawFreewareNumberFirmwareComputing platformGoogolFlash memoryVideo gameArmTerm (mathematics)Computer animation
09:28
Android (robot)Web pageEmulatorFreewareReverse engineeringComputer hardwareBuildingComputing platformFirmwareService (economics)MathematicsOperator (mathematics)Local ringKeyboard shortcutLine (geometry)Coefficient of determinationCalculationInternet service providerFreewareSoftwareComputer-assisted translationComputer hardware40 (number)Different (Kate Ryan album)NumberLogicLevel (video gaming)EmulatorFirmwareComputing platformTerm (mathematics)Type theoryPhysical systemComputer animation
10:42
Read-only memoryExt functorGame controllerSoftwareComputer simulationResultantRight angleForcing (mathematics)Computing platformSpacetimePrime idealComputer animation
11:21
Web pageReverse engineeringArmVirtual machineLibrary (computing)Floating pointEmulatorTerm (mathematics)DampingPhysical systemCommodore VIC-20Flash memoryNumberComputing platformArmOperating systemFirmwareFloppy diskPower (physics)Electronic mailing listTheory of relativityPoint (geometry)Structural loadComputer animation
12:41
ImplementationRead-only memorySpeicherbereinigungWeb pageReverse engineeringNumberIntegerUsabilityModemArray data structureElectronic mailing listWitt algebraRegulärer Ausdruck <Textverarbeitung>Algebraic numberComputer programFunction (mathematics)Variable (mathematics)Fibonacci numberGEDCOMData modelSequenceComputer wormRepresentation (politics)Negative numberObject (grammar)Data storage deviceCompact spaceProgrammschleifeBlock (periodic table)Data typePrice indexCurve fittingType theoryInterrupt <Informatik>Row (database)Loop (music)Performance appraisalFormal languagePhysical lawMultiplication signObject (grammar)Semiconductor memorySpeicherbereinigungMaxima and minimaTemplate (C++)Library (computing)Decision theoryData storage devicePoint (geometry)Bounded variationShared memoryIntelAddress space40 (number)Set (mathematics)Projective planePhysical systemFood energyMenu (computing)Shift operatorTable (information)Row (database)Directory serviceElectronic mailing listFunctional (mathematics)Series (mathematics)Instance (computer science)ResultantKey (cryptography)ExpressionEndliche ModelltheorieComputer programmingNumberCalculationCategory of beingSquare numberINTEGRALHybrid computerSource codePoisson-KlammerVirtual machineType theory2 (number)Subject indexingQuantum stateComputing platformFitness functionData conversionNetwork topologyMathematicsHash functionAssociative propertyCodecMilitary baseMedical imagingPerformance appraisalStrategy gamePotenz <Mathematik>DigitizingFloating pointLevel (video gaming)Variable (mathematics)Loop (music)Content (media)IntegerCursor (computers)MultilaterationRevision controlSoftwareCartesian coordinate systemTangentOrder (biology)BitFirmwareCodeSign (mathematics)Library catalogAlgebraArray data structureException handlingComputer wormMechanism designData type1 (number)RootReal numberDirection (geometry)Computer animation
21:26
BefehlsprozessorReverse engineeringElectronic visual displayImage resolutionWeb pagePhysical systemMenu (computing)Complete metric spaceLibrary catalogGEDCOMEmailFibonacci numberNumberMatrix (mathematics)Vector spaceFunction (mathematics)Graph (mathematics)Dressing (medical)Multiplication signFunctional (mathematics)Identity managementCalculationPoint (geometry)Menu (computing)Insertion lossPhysical systemUsabilityInstance (computer science)Computer programming1 (number)Uniform resource locatorForcing (mathematics)ResultantState of matterComplete metric spaceDirection (geometry)NumberShift operatorNetwork topologyRow (database)Shared memoryDeterminantPlanningElectronic visual displaySineSemiconductor memoryReal numberOrder (biology)Medical imagingNichtlineares GleichungssystemStudent's t-testCursor (computers)Equivalence relationComplex numberImage resolutionEndliche ModelltheorieType theoryAlpha (investment)Asynchronous Transfer ModeDemo (music)Absolute valueGreatest elementDoubling the cubeOnline helpComputational scienceKey (cryptography)Parity (mathematics)PlotterTrigonometryGraph (mathematics)Spacetime32-bitSymbol tableMatrix (mathematics)Complex (psychology)Set (mathematics)Metric systemVector spaceOrder of magnitudeAlgebraComputer animation
27:24
Presentation of a groupOnline helpMultiplication signComputer animation
28:01
Computer fontStructural load2 (number)Different (Kate Ryan album)Program flowchartMeeting/Interview
28:25
File formatPhysical systemTerm (mathematics)Scripting languageComputer fontFirmwareMereologyComplex (psychology)Artistic renderingRepresentation (politics)Moment (mathematics)Range (statistics)SpacetimePresentation of a groupTouchscreenSparse matrixBitRepository (publishing)Open sourceSet (mathematics)Form (programming)AlgebraInstance (computer science)Video gameEndliche ModelltheorieTraffic reportingForcing (mathematics)Ocean currentBeat (acoustics)Point (geometry)Meeting/Interview
30:40
Computer fontMultiplication signVideo gameMeeting/Interview
31:07
Meeting/Interview
31:35
Program flowchart
Transcript: English(auto-generated)
00:07
Hello, my name is Christophe de Dinochin and today I'm going to talk about DB48X which is my attempt at resurrecting reverse polish lisp or RPL on a modern open source platform.
00:31
So first of all, what are we going to talk about? Why revive RPL and why should you care?
00:40
I'm going to give a demo of what DB48X looks like both on a simulator and on real hardware. The idea is to have a handy calculator that does tons of stuff for you. Then I'm going to give a brief history of RPL and of pocket calculators, notably
01:00
from HP. I'm going to talk about free software on modern calculators. And I'm going, since this is really the topic of this track, to talk about the very minimalist aspects of calculators even today. Here's a quick feature overview.
01:21
I'm going to develop this a little with various examples. And I'm also going to explain how this works inside and notably talk about a very compact C++ object model with garbage collection. So let's start by running DB48X.
01:41
I'm going to give two demos, one running on simulator and the second one on Swiss micro's DM42 hardware. So the demo on simulator can be found online. You can scan this QR code to see the details of the demo.
02:00
The point here is that we have a development environment that simulates at least the user space portion of the application software and will let us perform a variety of online tests automatically that are difficult to do on the physical calculator.
02:26
Now on real hardware, what you do is you have a USB interface. You simply load a DM42 program in it. And that's essentially it. When you exit, you have your new environment and you can switch back and forth between
02:45
this and for instance, the standard DM42 software. So RPL has a common line where you type, for instance, numbers and you hit enter. And you see that the numbers go on a stack that is used for operations.
03:03
When you want to add numbers or subtract them, you will essentially operate on the last two items on the stack and push the result there. Operations like scientific computations operate exactly the same way. They operate on the top level number one of the stack.
03:24
In terms of programming, RPL has this special sign bracket that identifies an RPL program and I push the program on the stack. Then I'm going to give it a name. So one plus increments the first level of the stack. And then to execute the program, I simply hit the soft key and you see that every time
03:44
I push it, I increment the number on the stack. So fairly simple. There is a built-in markdown help if you hit a key and keep it held. So here we are seeing the feature for that function and then we can explore the hyperlinks.
04:03
So it's all markdown based so we can reuse the same help for the GitHub repository and for the calculator itself. Now let me give you a very brief history of RPL. So again, RPL stands for reverse polish lisp and it's an interactive language for calculators
04:24
that has been used by Hewlett-Packard from 1984 until 2015. So RPL has an ancestry called RPN, reverse polish notation. And this started with the HP 35 scientific calculator that introduced this system which
04:45
saves keystrokes and is very similar to the way you think about the computations you're doing. It also leads naturally to a step-by-step programming model where you simply record keystrokes and the calculator is going to replay these keystrokes.
05:04
That was introduced with the HP 65 which was really a marvel for the day. The little slots you see on the side, for instance, are for a card reader so you can actually store your software on little tapes. The last real complete RPN system was the HP 41.
05:23
I'm talking about a system because it could be connected to a variety of expansions. There was a bus, you could connect it to printers, to plotters, to data acquisition tools and so on. But there were later machines that appeared after RPL was introduced and still used RPN,
05:42
so essentially the main difference being a fixed size for the stack and no real type system. And the high end of that series is the HP 42. Now RPL itself was introduced with the HP 28C in 1984 or 5.
06:02
That machine had only two kilobytes of RAM, so that tells you this can run on a very very small system. It also introduced a new Hewlett-Packard CPU called the Salem that I'm going to talk about in a moment. The history code series culminated with the HP 48 series that had equations, larger
06:26
graphics, was extensible, so you had slots where you could put memory, ROM cards, etc. And then there were follow-ups like the 49, etc., that were not very different from the 48. That series was recreated with the HP 50G and other calculators like the 38, the 48G2,
06:47
etc., that are essentially running the original software designed for the Salem CPU under emulation with an ARM CPU that emulates the Salem, and that gives you a significant
07:02
boost in speed, and essentially it executes exactly the same software. Now because the ARM CPU itself is much much faster than Salem, a number of folks started developing software for it, and this series of calculators were based on
07:21
somewhat standard platforms that could be flashed, and so people developed open-source software and free software to replace the built-in firmware. An example shown here is NuRPL, which is an ARM native implementation of RPL that is relatively complete as far as the language itself goes, but is missing a number of
07:44
features from the original calculator, including graphics, equation editor, etc. Now how does RPL work inside? It's very interesting because it's a very smart, minimalist system. So first of all, it's optimized for the HP Salem CPU, which is a descendant from CPUs
08:05
built for earlier calculators, and that's a 4-bit CPU with 64-bit registers designed mostly for floating points. And so you have 4-bit nibbles that you can address individually in memory.
08:20
Addresses are 20 bits, that's 5 nibbles, and the 64 bits in the register can be addressed in a variety of ways that correspond to a BCD representation of floating points. So for instance, the X field is for exponent, the M for mantissa, the S for sine. So there is a number of pieces of free software and free calculator firmware that
08:47
can run either on ARM-based calculator, and then later led to platforms developed specifically to run this kind of software. In terms of available platforms, if you go beyond the HP calculators, so first of all,
09:05
the ARM-based HP calculators can be flashed, so even a lowly HP 20-something can be given new firmware and a new life. You have an example here with something called WP34S, which creates a very advanced
09:22
scientific calculator from a very inexpensive HP calculator. There are also a number of free emulators for iOS, Android, etc. So what you see here is a 42 emulator called 342, and Swiss Micros essentially
09:43
started building the hardware around this software. So they created the DM42, which runs a variant of 342 with some underlying firmware to provide operating system level services. And so they have this platform, and that same platform just with the firmware flashing
10:03
and changes in keyboard can emulate the HP 42, the HP 41, etc. Now third-party firmware has started sprawling like mushrooms, but really large and advanced firmware. There are not that many variants. What you see here is the descendant of WP34S, which is called 43S,
10:26
and has a number of really advanced features, but it's essentially still in the same spirit as the RPN calculators. In other words, it's still using the RPN logic with a fixed-size stack and not much
10:40
in terms of typing. So my first attempt to enter that space was to port a new RPN to DM42. And so I created a simulator, and you can see the results of this experiment there with a side-by-side setup where you have the DM42 on the left, the HP 50G simulator
11:02
in the middle, and the HP Prime simulator on the right. And essentially, my work was to try to make the software more portable, support 1-bit graphics on the DM42, but really take advantage of that platform. And on simulator, it worked pretty well.
11:22
The problem is, as I said, this machine is really minimalist, and it turns out that new RPN, as soon as I started trying to run it on the physical hardware, it just did not fit. Why? Because the platform is built around an ultra-low power ARM Cortex-M4F,
11:42
which has, among other benefits, that the battery life on a battery like this is up to three years, according to the vendor. Now, that machine has only 96K of RAM and only 70K free after the operating system load. How much is 64K?
12:01
Well, that's essentially one Commodore 64 and a half. And a Commodore 64 is not exactly yesterday's machine. There is only two megabytes of flash available. So, again, in terms of old stuff, what remains free once you have loaded standard libraries and the floating-point emulation library from Intel, etc.,
12:22
is about 700K. So, that's about the same size as an original Macintosh floppy disk. So, my conclusion within these numbers is that I had better restart from scratch to create a firmware that was redesigned to fit in such a small system.
12:43
So, how does that work? Well, first of all, I wanted to use C++ on a modern language with templates and various library utilities, etc., but I needed to have garbage collection for the objects, just like the original RPL, and a very, very minimal memory usage.
13:03
Let's start with the features that I implemented today, and that's essentially based on the command set of the whole series from the HP 48SX to the HP 50G. The Intel floating-point library that ships with the platform gives me
13:20
34 decimal places for floating-point. So, you see E and pi here with the number of digits that were computed by running the exponential of one and four times dark tangent of one. The platform, so my application software on top of that also supports large integers
13:44
like the HP 50G, as well as base numbers that today can be in hexadecimal, decimal, octal, or binary, and I plan to support arbitrary bases between two and 36 in a later firmware revision.
14:01
You see here how these numbers are entered in the machine. So, with a hashtag at the beginning, and then when you put this hashtag on the command line, the cursor shifts to B like binary or based, and then I can enter the numbers directly, and the first row of letters
14:24
changes directly to let me enter numbers more practically. So, let me show you that live. So, I bring up the calculator, I click on shift base, and you see that I have the hash sign here, and I can say hash 1 to A, and hash 2 to E plus,
14:52
and I have my hexadecimal conversion here.
15:01
So, as I said, RPL has a number of data types. That includes text, list, and arrays, so the lists are between braces, the arrays are between square brackets, and the text is between quotes. You see a program there on level 2 that takes the hello string,
15:23
the world string, then does a plus, and when you evaluate that program, you get hello world. You have also programs and algebraic expressions, so I just showed what a program looks like, but you can also have algebraic expressions written the usual way.
15:41
You see here, for instance, square root of sinus of X plus 1. There is a plethora of scientific functions. The catalog in the HP 48 series lists something like 1,700 functions total, a little less than some other models, but it's the order of what you have.
16:02
I also already implemented a storage mechanism for persistent values, so variables, directories, etc. And so, what you see here is a three-level menu where, when you hit the key, you evaluate what is inside the variable. When you shift, you will go to the second level in the menu,
16:24
and that will read the content of the variable. And if you shift twice, then you're going to the third level of the menu, and you're going to store something in the variable. So again, I can show that live. I'm going to store the result I just had, so execute is for execute equation.
16:44
I'm going to call that B, and I do stow, sorry, enter stow. And then, if I go to the recall menu that shows me the variable, and you see my B here, and if I just evaluate B, I have the number I had.
17:01
If I shift B, I recall the value, and if I want to store something else in B, I will shift twice, hit that key, and now B is 12. So, as you can see, the system works already at that level.
17:24
So, in order to be able to really have something efficient on such a small machine, I had to design a custom object model, and I based it on RPL itself, the historical RPL, but I tried to make it much more compact,
17:41
and for instance, I used LEB128 to store all the objects in memory. So, LEB128 is this system used, for instance, in DWARF that encodes integers by having only the last, so you have seven bits per byte, and the last one in the series has a bit clear,
18:01
the other has a bit set. So, the type that is the first byte or LEB128 value is an index to the handler table used for evaluation. So, instead of using direct addresses like in RPL, I use an index. And so, that means I can have 128 one-byte types or commands,
18:27
and 1600, 384 fit into bytes, and as a reminder, in RPL, that was 2.5 bytes, five nibbles for each type.
18:42
So, I'm saving a little here. So, you see here the catalog on the HP 450, I think. So, let me compare and contrast the storage of something like the number one. To be precise, it's the internal number one on the HP 48.
19:04
The HP 48 has no real user integers, whereas a DB48X has. So, when you type one, the most compact storage you have for... Sorry, that's actually three.
19:20
I got that wrong on the HP 48. So, the value that you see here, that's the prefix. And so, the 02911 is the address of the evaluation handler for integers, and three, that should actually be one,
19:42
is the payload. The storage in LEB128 is 14, that's the index for integer types, and 01 is the actual value. And because the high bit is not set, that stops here and we're done. If you look at ABC, how the text ABC is stored,
20:00
the prefix in the HP 48 is 02A2C. So, that's the five nibbles address. Then you have the total size, and then you have the ABC encoding itself. Whereas for DB48X, you have the type, which is two, then you have the length, again, encoded as LEB128.
20:26
And so, because it's less than 128, it uses only one byte. And then I have the data itself after that. The name ABC is exactly the same encoding, except that the prefix is not the same. And for DB48X, the type shifts from 02 to 01C.
20:44
The types themselves change with every bit, by the way. So, that means the evaluation loop is extremely simple. It's essentially the way this works, you can see the code here, is that you're going to take for each object,
21:02
you're going to compute its size, skip to the next one, and then call the handler and evaluate that handler. So, it's really evaluating a program in DB48X is extremely fast. And there is a fast simple copying garbage collector. And the picture that was supposed to illustrate that
21:24
was apparently garbage collected as well. So, what is the improvement over existing ESP calculators? Well, moving from 4-bit to 32-bit CPU means that it's much, much faster on various tests like loops, et cetera, and between one, two, or three orders of magnitude faster.
21:44
Scientific computations are even faster. There is a high-resolution monochrome ink display. That means that when you switch off the calculator, it keeps a picture that you displayed there. And so, we have these fancy off images that you can use.
22:02
So, let me show you some examples here. So, you see this is one off image. And if I shift off, then I'm going to see another image. And again, because it's an ink, it doesn't consume any memory. There are three rows for the soft key menu system.
22:22
That's an improvement compared to the original HP calculators. Because of the high-resolution display, we can display the functions associated with base function, shift, and double shift. And as I pointed out earlier, the highlighted portion in black
22:43
moves as you hit the shift key. So, let me show that again. So, you see that if I hit the shift key once, then I get to recalling the value B. And if I hit twice, then I move that and then back to the original location.
23:03
There is a common catalog and auto-completion. So, that's better shown than explained. So, let me type. So, let me go back to my demo system here. So, let's say that, so if I hit the shift key and I hold it, I shift to alpha mode.
23:22
And now I'm going to type, for instance, A. And we are going to see nothing because I was still in the recall menu. I hit plus. And you see that now I have auto-completion at the bottom with the various commands that begin with A. There is a plus here and you might wonder why the plus is here. It's because it also takes the name add.
23:43
So, add contains an A. And I have ABS for instance, and now I can do ABS. And I have evaluated ABS of 12 directly. So, that's pretty neat. That's a good way to quickly access a very, very large number of functions. And it's optimized for the original gm42 key layout.
24:04
I paid a lot of attention to this. So, for instance, I showed earlier how, for instance, when you type execute, which is execute a command in the gm42, there is no real equivalent for the RPL model.
24:23
So, instead, I re-translate that as execute equation. And that does something that is very frequent in RPL, which is to have a symbolic value for something. You can see also that the cursor is moving,
24:40
is changing depending on what I'm doing. So, for instance, here it's A for algebraic. And it's white because I'm in alpha mode. If I leave alpha mode, it's going to turn black, but I'm still in algebraic mode. The row keys are, I have only two. The HP 48 has four. So, on the command line, up and down,
25:01
move left and right. It's an acquired paste. There is also no real run stop for programs. So, RS is instead translated as eval. So, it evaluates the value that you have there.
25:20
And as I said, there is this markdown based online help. So, you saw that in the video, but we can show it live now. So, for instance, if I hit sin and I hold sin, then it's going to show the online help there. You see that there is this home button. So, I can go to home and then I can go down
25:41
and select, for instance, the first entry there. And I'm going to jump to help. And that explains how the help system works. So, there is a lot that remains to be done. The future plans include support for complex numbers
26:03
that are not implemented yet, vector and metrics arithmetic, which is integral to the HP 48 RPL variant that also existed within 28, et cetera. That's a relatively complex set of things in particular because I would like to do it like new RPL does,
26:23
where new RPL does support matrices with symbolic values in there. So, you can have a matrix with an X in there and as the determinant of that matrix, you're going to get the result. Whether I can fit that in the variable space is unclear. As I said, there are about 1,500 functions
26:42
that remain to be implemented in some way, including variants. So, for instance, the same function for sinus, the sine-cosine function, all the trigonometric are implemented for real numbers, but they are not implemented for complex numbers yet or for other data types.
27:01
So, there is some work that remains to be done also even on existing functions. Plotting and graphing is a key feature of these calculators. So, I'd like to have that. The HP50G is quite advanced in that respect and getting to the point where we have feature parity
27:23
is going to take a lot of time. So, that's essentially what I had to show. I hope that you found this interesting and I'm really welcoming contributors if you want to take a look at how this works inside and if you want to help me add many of the new features
27:43
or if it were only just to write or extend the online help, any kind of help is really welcome. And that's about it. Thanks a lot for listening. Now it's time for questions, and the questions will be live and I'll have a calculator available if you want to play with it.
28:12
So, we should be live now. We have only 30 seconds left, yeah. So, how do the fonts work on these calculators? Is it possible to load custom fonts for different scripts?
28:25
Okay, so there are two parts to this question. The first one is the fonts themselves and the second one is non-Latin scripts. So, in terms of fonts, there were multiple formats that I tried.
28:40
The current model, the current firmware supports two formats that I call Dense and Sparse. The Sparse format is more efficient for large fonts that have a lot of space and the Dense format is more compact for smaller fonts that have something like,
29:04
for instance, if you have a five or eight bits of hate for very small fonts, then practically all pixels inside are used and so you have a Dense format for that. So, that's for the representation of fonts. All the wrong presentations
29:22
cover the 16-bit range of Unicode and so they do include most of the known, oh. Yeah, we got cut off. Yeah, so we do cover
29:45
an arbitrary range of non-Latin characters. What the system lacks at the moment is that it doesn't know how to do combining glyphs and it doesn't know how to do right-to-left rendering.
30:00
Those are a bit complex. They are not implemented in the firmware at the moment. The font that, and then I wrote in the GitHub repository there is a tool that lets you convert any TTF font to use as a font in the system.
30:22
The font that I used is derived from an open source font and I forgot what the name is and I changed a few glyphs inside just to make them look better on the screen.
30:40
So, you can look at the GitHub history and you'll see that I tried a dozen fonts till I found one that I thought would look good. Okay, thank you. So, thanks for speaking at first and first up. I'll catch you next time. You can hang out in this room
31:01
if people want to come and chat with you. This is a breakout room just for this talk. Yep. Thanks a lot. Yeah. Bye.
Recommendations
Series of 14 media