## [POLL] Compiler for DM15L ?

Forum for discussion of the DM10, DM11, DM12, DM15, DM16 and DM41 units

## Which programming language would you prefer?

BASIC
5
17%
C-like
5
17%
Forth
3
10%
Lisp
4
14%
Something else (see comments)
5
17%
None, the native assembly-like language is fine
7
24%

michaelzinn
Posts: 37
Joined: Tue Apr 10, 2018 11:34 pm

### [POLL] Compiler for DM15L ?

I noticed that the DM15L has so much memory that you can have 100 registers and still over 700 lines of program code. This means it might be feasible to write a compiler that compiles to memory images which you could then send to the calculator over USB.

If you could compile programs for your calculator, which source language would you wish for?
boessu
Posts: 15
Joined: Mon Jan 28, 2019 10:40 pm

### Re: [POLL] Compiler for DM15L ?

Basic had his days, but it's a bit outdated... I barely know anyone still using Basic.

To be honest I would prefer to see Python on the list instead.

Alongside with the "Maker" move, Python is one of the languages to choose for the Raspi. So there's the proof that it's already usable on downsized hardware. And as we know: every Maker should have a real calculator on his workplace.

There is even a calculator which already has built-in Python support (Numworks).

However i would love a Swissmicros DM15L or even DM42 style calculator with built-in Python support. It would provide a lot more "Maker-style" and provides already great hardware for things like this. That could be a unique selling point...
toml_12953
Posts: 701
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

### Re: [POLL] Compiler for DM15L ?

I'd vote for Python, Pascal or Lua. I spent 30 years as a professional COBOL programmer and 12 as a BASIC programmer (yes there are such people!) but I like the structure of Python, Pascal and Lua. They seem to work the way I think and I can usually write code that runs the first time with them.
Tom L

If I buy someone a drink to congratulate them, is it a Mazel Tov cocktail?

DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
Drchiper
Posts: 13
Joined: Mon Jun 05, 2017 7:14 pm

### Re: [POLL] Compiler for DM15L ?

Python is clean, readable, hence maintainable.
e12g
Posts: 2
Joined: Sun Apr 07, 2019 11:06 pm

### Re: [POLL] Compiler for DM15L ?

Python makes sense. The language has a large user base and is growing in popularity.
toml_12953
Posts: 701
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

### Re: [POLL] Compiler for DM15L ?

e12g wrote:
Wed Apr 10, 2019 7:33 pm
Python makes sense. The language has a large user base and is growing in popularity.
I'd want a FULL Python, though. Not one of these "MicroPython" implementations.
Tom L

If I buy someone a drink to congratulate them, is it a Mazel Tov cocktail?

DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
michaelzinn
Posts: 37
Joined: Tue Apr 10, 2018 11:34 pm

### Re: [POLL] Compiler for DM15L ?

toml_12953 wrote:
Fri Apr 12, 2019 2:04 am
e12g wrote:
Wed Apr 10, 2019 7:33 pm
Python makes sense. The language has a large user base and is growing in popularity.
I'd want a FULL Python, though. Not one of these "MicroPython" implementations.
How would a full Python with Strings and all be usable on the DM15L? I'd probably not do an exact implementation of a language anyway, e.g. I'd use the native decimal numbers of the calculator instead of integers or IEEE floats.

It's interesting that Python is so popular. The syntax is not that easy to parse...
dlachieze
Posts: 262
Joined: Thu May 04, 2017 12:20 pm
Location: France

### Re: [POLL] Compiler for DM15L ?

There is already a Python to RPN converter for the 42S, do you plan to do the same for the 15C?
DM42: 00425 - DM41X: β00066
michaelzinn
Posts: 37
Joined: Tue Apr 10, 2018 11:34 pm

### Re: [POLL] Compiler for DM15L ?

dlachieze wrote:
Fri Apr 12, 2019 2:32 pm
There is already a Python to RPN converter for the 42S, do you plan to do the same for the 15C?
Thank you for pointing that out, that's basically what I want to do.

To be clear, I'm not yet 100% sure what exactly I want to do next, that's why I started the poll.

What I did last was writing an interpreter for the brainf*ck programming language where you write the code as digits in registers. You can find that there: https://steemit.com/programming/@michae ... calculator. It works and I learned a lot writing it, but it's not really useful. What I want to do now is to implement some sort of compiler where you write code on the computer, compile it to a calculator dump and transfer that to a DM15L.

The idea isn't polished, so far I think:
- useful to me
- learn something
- compiled, to RPN and/or DM15L dumps
- scopes (local variables, stack frames)
- not too difficult to implement (simple syntax?)
- useful to other people

I favor Lisp because it's easy to parse (Just use edn and use your programming language's edn parser), maybe not too hard to implement and okayish high level.

Code: Select all

(defn nth-root (n x)
(pow x (inverse n)))

...but I really haven't decided yet.

Given the complexity of it I might start with BASIC and work my way up from there.
mezoganet
Posts: 124
Joined: Tue Jan 22, 2019 1:54 pm
Location: Tours, France

### Re: [POLL] Compiler for DM15L ?

Hem... and what about FORTH ?

Basic and Python are much too heavy I think, C is awfull.

Just my opinions, not facts.

Then, HP is right as it is, I don’t know why change something every HP user knows from eternity.
HP33E, HP34C, HP41C, HP16C, HP28S, HP42S, HP48S, HP12C, HP35S, DM42, DM41L, DM15L, DM41X (SN#15) and HP3000 @ work during 18 yrs as IT Mgr