Page 1 of 2

[POLL] Compiler for DM15L ?

Posted: Sun Apr 07, 2019 9:05 pm
by michaelzinn
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?

Re: [POLL] Compiler for DM15L ?

Posted: Mon Apr 08, 2019 8:16 pm
by boessu
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...

Re: [POLL] Compiler for DM15L ?

Posted: Tue Apr 09, 2019 5:50 am
by toml_12953
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.

Re: [POLL] Compiler for DM15L ?

Posted: Tue Apr 09, 2019 11:08 am
by Drchiper
Python is clean, readable, hence maintainable.

Re: [POLL] Compiler for DM15L ?

Posted: Wed Apr 10, 2019 7:33 pm
by e12g
Python makes sense. The language has a large user base and is growing in popularity.

Re: [POLL] Compiler for DM15L ?

Posted: Fri Apr 12, 2019 2:04 am
by toml_12953
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.

Re: [POLL] Compiler for DM15L ?

Posted: Fri Apr 12, 2019 2:16 pm
by michaelzinn
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...

Re: [POLL] Compiler for DM15L ?

Posted: Fri Apr 12, 2019 2:32 pm
by dlachieze
There is already a Python to RPN converter for the 42S, do you plan to do the same for the 15C?

Re: [POLL] Compiler for DM15L ?

Posted: Sat Apr 13, 2019 12:37 pm
by michaelzinn
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.

Re: [POLL] Compiler for DM15L ?

Posted: Wed Apr 17, 2019 8:08 pm
by mezoganet
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.