Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:18 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PIC32 interpreter language features

     Page 2 of 2    
Author Message
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 05:33am 25 Oct 2012
Copy link to clipboard 
Print this post

Yes, bit1,bit2 etc is better.

@< and @> are both rotate, this can be usefull for the walkingled or with stepper motors that go through a sequence.
It is not considering sign.
the ->> will shift right and the new bit shifted in will be the same as the highest bit. This is more for doing a quick divide by 2 (or 4,8,16 etc)


[quote]
Maybe things like

Array<int> A = [1..10]
Array<int> A = [1-10,15,30-35]

Maybe associative arrays? Or am I getting carried away :)

A "boolean" data type?

[/quote]

Yeah, the shorthand for the array values is nice. Will have a try.

A dictionary (hash table) is not so difficult, and it is already needed internally.

A "boolean" or "bool" will be other names for a "bit1"


Microblocks. Build with logic.
 
jdh2550
Regular Member

Joined: 16/07/2012
Location: United States
Posts: 62
Posted: 05:43am 25 Oct 2012
Copy link to clipboard 
Print this post

  TZAdvantage said  
Yeah, the shorthand for the array values is nice. Will have a try.

The ruby language has a rich and consistent syntax if you want to get some ideas for how to layout your syntax - not suggesting any particular feature of ruby just that they seem to have done a good job with consistency and readability without being overly verbose.

Just a thought.
 
graynomad

Senior Member

Joined: 21/07/2010
Location: Australia
Posts: 122
Posted: 06:11am 25 Oct 2012
Copy link to clipboard 
Print this post

Looks good, unfortunately I don't use PICs, let me know if you port it to LPCs :)

Rob Gray, AKA the Graynomad, www.robgray.com
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 10:34am 26 Feb 2013
Copy link to clipboard 
Print this post

This interpreter has been on the backburner for a while because i was caught by surprise by the introduction of TypeScript by Microsoft. (And by the decision to design a CMM clone with add-on 'blox')
I like TypeScript a lot, and am now studying hard how it is done.
Everything is open source so if you are curious have a look here .

The way they uses classes,interfaces, modules, datatypes etc is very clean and i would like to do the same but just add more datatypes.
Having an editor to play around in helps me a lot and many things can be tried out.
This project is still active and when i get more familiar with Typescript i have a good base to extend on.
Edited by TZAdvantage 2013-02-27
Microblocks. Build with logic.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 10:16pm 26 Feb 2013
Copy link to clipboard 
Print this post

Oh great, another language.

Let's see if it takes off.

John
 
pito
Newbie

Joined: 09/06/2011
Location:
Posts: 25
Posted: 10:38am 28 Feb 2013
Copy link to clipboard 
Print this post

  TZAdvantage said  I like TypeScript a lot, and am now studying hard how it is done.

Do you know Espruino? Would be nice to get it work on the pic32 too..

http://www.espruino.com/

PS: Lua: long time back I posted a benchmark here - pic32lua had been the second fastest after the C.. And the below port works fine

http://www.askrprojects.net/software/pic32lua/index.html



Edited by pito 2013-03-01
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024