This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-23 23:13:06

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

QuickCode: A Simple Programming Language Written in JavaScript

So this is an idea I have been toying with, and now have finally gotten around to.

QuickCode is a very simple object-oriented programming language that I am writing completely in JavaScript and HTML.
Example:

Code:

Set x 0
Point 90
Wait 2
Move 10

Instead of simply having QuickCode call ordinary JavaScript functions, I went even further and made a parser to actually translate QuickCode into JavaScript. This is the algorithm the parser follows.

1. Split the entire script into "blocks" using a regular expression
2. Use other regular expressions to determine which command each block is calling
3. Execute the command based on the inputs (also determined using regular expressions)

What would I do without regular expressions?

QuickCode is aimed at beginner programmers, as the more "natural" feel of

Code:

Change y 10

is much less daunting than the "technical"

Code:

moveObj(sprite, 0, -10)

Any comments, suggestions, feedback of any sort?


Fork Clamor on GitHub!

Offline

 

#2 2011-08-23 23:44:42

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

Re: QuickCode: A Simple Programming Language Written in JavaScript

thats pretty cool


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#3 2011-08-24 00:39:47

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

That's cool


Posts: 20000 - Show all posts

Offline

 

#4 2011-08-24 06:50:17

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

Yeah, regex is so cool!  wish VB had it, would have made my FireScript parser go down 300 lines.

Offline

 

#5 2011-08-24 12:07:46

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: QuickCode: A Simple Programming Language Written in JavaScript

I don't know VB, but now that you say that, I question whether or not I want to learn it!  big_smile


Fork Clamor on GitHub!

Offline

 

#6 2011-08-25 14:51:32

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: QuickCode: A Simple Programming Language Written in JavaScript

Status Update: The parser is now about half way done. I have been hampered by a ton of bugs, but am making (slow) progress.

Currently, QuickCode has 6 motion "block"s and 1 control "block." (A "Block" is actually just a command in the script.)

I would be interested to know if there are any volunteers for beta testing.


Fork Clamor on GitHub!

Offline

 

#7 2011-08-25 15:17:17

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

ohaiderstudios wrote:

Status Update: The parser is now about half way done. I have been hampered by a ton of bugs, but am making (slow) progress.

Currently, QuickCode has 6 motion "block"s and 1 control "block." (A "Block" is actually just a command in the script.)

I would be interested to know if there are any volunteers for beta testing.

I! (btw, i'm working on a very similar project in BYOB  smile  )

Offline

 

#8 2011-08-26 04:14:25

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

ohaiderstudios wrote:

I don't know VB, but now that you say that, I question whether or not I want to learn it!  big_smile

lol
Actually, I love VB. Just it doesn't have regex and it was hard to make my custom language. Other than that you can achieve great great things. For example, see my previous OS!

Offline

 

#9 2011-08-26 08:20:33

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

VB is so awesome....


..but sadly, C++ is still more flexible.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#10 2011-08-26 10:00:46

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

bbbeb wrote:

VB is so awesome....


..but sadly, C++ is still more flexible.

Actually, i just started making large use of API's in VB.
The InteropServices namespace provides a great way of using the Windows functions (that you'd normally use in C++) in my favourite language!

Offline

 

#11 2011-08-26 10:30:11

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: QuickCode: A Simple Programming Language Written in JavaScript

ohaiderstudios wrote:

I would be interested to know if there are any volunteers for beta testing.

Here you are a volunteer. Leave a message in one of my projects to let me know when you are ready.

Offline

 

#12 2011-08-26 11:29:53

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: QuickCode: A Simple Programming Language Written in JavaScript

s_federici wrote:

ohaiderstudios wrote:

I would be interested to know if there are any volunteers for beta testing.

Here you are a volunteer. Leave a message in one of my projects to let me know when you are ready.

Alrighty!


Fork Clamor on GitHub!

Offline

 

#13 2011-08-26 11:56:05

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

I'll beta test.  smile

Offline

 

#14 2011-11-27 17:15:33

ZachAlbrecht
Scratcher
Registered: 2011-01-27
Posts: 37

Re: QuickCode: A Simple Programming Language Written in JavaScript

I can beta test. I understand almost all of scratch and this seems similar to it.
How do you make a scripting language anyway?

Offline

 

#15 2011-11-27 17:32:02

Laternenpfahl
Scratcher
Registered: 2011-06-24
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

I'll beta test. I'm familiar with a bit of c.


http://i46.tinypic.com/6yd4c0.png

Offline

 

#16 2011-11-27 17:55:08

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: QuickCode: A Simple Programming Language Written in JavaScript

That's a really interesting idea.  Might I suggest that you use sprite1.x = 5 instead of Set x 0?  That'd just build some bad habits when every programming language other than Batch and maybe UNIX (I'm bad with Unix; I can compile some languages and open files).  Your choice; it looks more complicated my way.

Offline

 

#17 2011-11-27 18:10:31

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: QuickCode: A Simple Programming Language Written in JavaScript

Curses! This thread resurfaced! Unfortunately, I accidentally deleted quickcode.js a LONG time ago, and haven't had the time to reconstruct it. This is officially discontinued.  hmm


Fork Clamor on GitHub!

Offline

 

Board footer