Discuss Scratch
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Use it online if on Firefox Nightly (or some other great ES6+ browser)
Learn more about Programming Language Thing!
Please give input
It's really, really in-development. Expect lots to change.
Simple demo:
# This is a comment
print('Hello')
# Set a variable
my_var => 15
print(my_var) # 15
# Change a variable (doesn't break past references)
my_var -> add(my_var 12)
print(my_var) # 27
# Super basic function
my_fn => fn() {
print('Hello world!')
}
my_fn() # Hello world!
# Function with return value
add_three => fn(x) {
^ add(x 3)
}
print(add_three(4)) # 7
print(add_three(mul(2 5))) # 13
Last edited by liam48D (Feb. 21, 2016 03:49:05)
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Dylan5797
- Scratcher
1000+ posts
I'm making a programming language
Programming Language Thing!Learn more about Nice big capital letters thing
Please give input
It's really, really in-development. Expect lots to change.
That is a really nice parser you wrote there.
Great job.
I need to share more of my parsing projects
Last edited by Dylan5797 (April 4, 2016 22:19:06)
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Thanks!Programming Language Thing!Learn more about Nice big capitol letters thing
Please give input
It's really, really in-development. Expect lots to change.
That is a really nice parser you wrote there.
Great job.
I need to share more of my parsing projects
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Hardmath123
- Scratcher
1000+ posts
I'm making a programming language
Programming Language Thing!Learn more about Nice big capitol letters thing
Please give input
It's really, really in-development. Expect lots to change.
That is a really nice parser you wrote there.
…but…but…it's not nearley-based!
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Oh noeeeesProgramming Language Thing!Learn more about Nice big capitol letters thing
Please give input
It's really, really in-development. Expect lots to change.
That is a really nice parser you wrote there.
…but…but…it's not nearley-based!
I'm so sorry I wrote it all without using anybody else's code
(except this)
(and this)
202e-202e-202e-202e-202e UNI-CODE~~~~~
- __init__
- Scratcher
1000+ posts
I'm making a programming language
Nice big capitAl letters thingget it right
thisandagain pls explain
- Jonathan50
- Scratcher
1000+ posts
I'm making a programming language
Neat. Is it functional? Is -> assignment?
It makes me think of Smalltalk in syntax.
It makes me think of Smalltalk in syntax.
Not yet a Knight of the Mu Calculus.
- Dylan5797
- Scratcher
1000+ posts
I'm making a programming language
fiNe.Nice big capitAl letters thingget it right
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Well actually we're trying to decide what's assignment and what's changing. Is -> assignment?
I think we've agreed on this:
-> change variable Changes the value of a variable without breaking references. Old references will go to this value.
=> assign variable Creates a new variable with the given value. Old references to this variable will still go to the old one.
(It's actually implemented as -> is assign, -= is change, but that makes no sense and I'll be changing it in the code soon.)
Yep - it's Is it functional?all functions (and of course functions are first class).
It's actually not based at all on Smalltak It makes me think of Smalltalk in syntax.
Last edited by liam48D (Feb. 15, 2016 23:17:07)
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Jonathan50
- Scratcher
1000+ posts
I'm making a programming language
No, it's not based on Smalltalk (what?) it's just some things are syntactically similar to smalltalk.It's actually not based at all on Smalltak It makes me think of Smalltalk in syntax.
Smalltalk also uses an arrow for assignment and a caret for returning values.
Not yet a Knight of the Mu Calculus.
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Smalltalk, sorry, typo.No, it's not based on Smalltalk (what?) it's just some things are syntactically similar to smalltalk.It's actually not based at all on Smalltak It makes me think of Smalltalk in syntax.
Smalltalk also uses an arrow for assignment and a caret for returning values.
Okay
202e-202e-202e-202e-202e UNI-CODE~~~~~
- DrKat123
- Scratcher
1000+ posts
I'm making a programming language
Nize thang
Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun
λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
- thisandagain
- Forum Moderator
500+ posts
I'm making a programming language
Very cool. Great to see folks starting to experiment with designing their own languages / parsers.
- DrKat123
- Scratcher
1000+ posts
I'm making a programming language
Ooh thisandagain says its cool. Very cool. Great to see folks starting to experiment with designing their own languages / parsers.
Nize job liam4
Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun
λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Thanks! Now I feel dedicated (and more motivated) to finishing this again.. Very cool. Great to see folks starting to experiment with designing their own languages / parsers.
Last edited by liam48D (Feb. 20, 2016 00:01:29)
202e-202e-202e-202e-202e UNI-CODE~~~~~
- liam48D
- Scratcher
1000+ posts
I'm making a programming language
Indeed so.Looks like blood, tears, and effort.What parsing technique does this use? but…it's not nearley-based!
It's really basic parsing. Really basic.
202e-202e-202e-202e-202e UNI-CODE~~~~~
- bobbybee
- Scratcher
1000+ posts
I'm making a programming language
That's not a technique from parsing theory that I'm familiar with Looks like blood, tears, and effort.
It's a recently-(re)discovered technique that's only just being taught to freshmen now
“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran