Pages: [1] 2 3   Go Down
Author Topic: New arduino language  (Read 5126 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For a course that is part of our Masters degree in Computer Science (university of Delft, Netherlands) we, a team of 3 students, are required to create our own DSL (domain specific language). We are currently brainstorming about a new language for the Arduino.

The current Arduino language is a subset of C++ but we think that with a language specifically build for the Arduino it could help a lot of people. Not only to those that are new to programming but also to make programs more structured and easier to understand for everyone.

We think of things like
  • build-in keywords for writing and reading to pins
  • making the language dynamically typed
  • defining actions (button presses) to execute blocks of code
  • ...

We will implement the language as a plugin for eclipse, so we can give good feedback on the code with specific errors and warnings but it will also be possible to extract the compiler and use it in other editors. The language will compile directly to an executable that can be loaded to the Arduino, possibly compiling it to C first or directly to assembly.

We want to ask the Arduino community to give us some feedback on this idea. We understand that a new language is not really needed and/or it possibly won't be as powerful or fast as C++ but if you could design a new language from scratch, what are things that you would like to see?
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool project.  I look forward to following your progress.

For my opinion on what such a language might look like, please consider Bitlash, which you can find at http://bitlash.net

The Bitlash architectural approach is a little different, but I believe our objectives are similar: to facilitate the development of application-optimized languages that are easy for beginners and highly tuned for the hardware environment.

One key issue is dynamic memory allocation.  So far, Bitlash doesn't use any. This is by design, to avoid heap fragmentation crashes, a debugging nightmare in the embedded environment.  But this also means, so far, no strings or other advanced data types.

Clearly there is room for Bitlash to grow here.  Anyway, you may find this the most challenging part of your project.

Best regards,

-br
http://bitlash.net
http://entropymouse.com



Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, interesting project.

I advice you guys to spend 2 days going through all discussions and check the Original Questions to see what problems people have with Arduino. I think the number one is how to handle communication especially serial - parsing converting etc. A second tip is to check the playground for libraries that were written.

A problem still is that it are traditional programming languages. LOGO was a new concept for graphic programming. The Arduino sketches are most   [ Sensor => process => actuator ]  pipelines with some state in memory. Some things are both sensor and actuator (ethernetshield?)  So maybe the language should be called plumber - a pipe fitting language smiley
PLUMBER could be an acronym for Programming Language Using Metaphors By Example Recursively? (You definitely need to find a better one!  smiley-wink

Have a look at - http://arduino.cc/blog/2010/10/05/visual-programming-arduino-modkit-and-the-others/

Finally Python for Arduino would also be nice.

sofar my 2 cents,
Rob
PS you can contact me in Dutch by PM.

@billroy
Would it be possible for bitlash to read instructions from SD card iso serial? That would enable large automatic scripts ...


Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

London, GB
Offline Offline
Sr. Member
****
Karma: 8
Posts: 332
Nothing works.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to see a DSL such as RAD, except that RAD doesn’t actually work, but if it did, it’d be excellent. The Ruby syntax is friendly and approachable.

Ideally I would like to see a modern Forth on the Arduino, but apparently that’s not possible because it has a Harvard architecture.

Alternatively, I think a DSL built in Lua (which is simple and understandable, but not quite as friendly and approachable as ruby) would be excellent. I don’t mean (of course) running Lua on the chip, I mean using a framework on the Mac that uses Lua syntax to propel a compilation down to atmega binary which ends up on the chip.
Logged

London, GB
Offline Offline
Sr. Member
****
Karma: 8
Posts: 332
Nothing works.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So maybe the language should be called plumber - a pipe fitting language smiley
PLUMBER could be an acronym for Programming Language Using Metaphors By Example Recursively? (You definitely need to find a better one!  smiley-wink

I disagree with the current vogue of creating projects that have names that overlap with existing projects that have the same or highly similar names. Beginners would be highly confused between your “plumber” and the “concurrency” “plumbing” or “occam” language (whichever one it really is called, they apparently haven’t decided which). It’s an avoidable confusion.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ian, regarding a "modern Forth" for Arduino, FORTH, Inc. recently released a SwiftX for Arduino -- you can check for it at http://www.forth.com -- I don't know if they plan to release a demo/evaluation version, but you could ask them!
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 173
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Finally Python for Arduino would also be nice.

This is as close as you can get for now.
http://code.google.com/p/python-on-a-chip/

The support is minimal, but implementing a full python distribution with such little program memory would be
impossible
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would prefer Object Pascal -- like Emabarcadero Delphi.
Logged

Just another Hacker

0
Offline Offline
Full Member
***
Karma: 0
Posts: 173
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't hold your breath.
You would need huge ,bloated Win32 libraries to do that, not to mentions the gigabytes just to install a Delphi like environment
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for responding everyone! We have decided to pick up this project so hopefully you'll hear more from us soon. We are going over the languages and issues discussed here. I think we are going to drop the dynamically typed part but there are a lot of other idea's we can implement.
Logged

Brazil
Offline Offline
Jr. Member
**
Karma: 0
Posts: 68
Xano
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for responding everyone! We have decided to pick up this project so hopefully you'll hear more from us soon. We are going over the languages and issues discussed here. I think we are going to drop the dynamically typed part but there are a lot of other idea's we can implement.

Are you doing that alone? :/
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

from OP
Quote
we, a team of 3 students,
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am working on a Common Lisp compiler. I have a lot of it working. If you interested, check out my project at http://sourceforge.net/projects/arduinolisp/

Dave.
Logged

London, GB
Offline Offline
Sr. Member
****
Karma: 8
Posts: 332
Nothing works.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I actually use what the above link leads to?
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2073
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, my first advise for the community would be to go with atmega1284p as the arduino cpu of choice (the pin compatible with 644p, 16kB ram, 128kB flash, available in DIL40 as well as 44pin smd, price equal to at328p). With such a hw platform you may develop an OS on the chip (e.g. an "Ardos" based on "Bitlash"). Bitlash alone compiles to 14kB w/o a SDcard support. I did assembled Bitlash 2.0RC2, RTC an SDfat libs and it is ~29kB of flash, 90Bytes free ram. And you need a space for your application of course.. No way to go with 328p.
Provided the arduino enthusiast go with an at1284p you will free your hands for a serious development. And for the same price.  smiley-cool
p.
Logged

Pages: [1] 2 3   Go Up
Jump to: