Discuss Scratch
- rdococ
-
1000+ posts
Custom Programming Languages
Don't worry about it. Your language actually works quite differently. (after looking at some other languages people have made, I've realized that this kinda resembles another language here…)
Last edited by rdococ (Oct. 14, 2023 01:27:13)
- davidtheplatform
-
500+ posts
Custom Programming Languages
currying, which this language uses a lot. That might make it a highly functional language (which, depending on your defintion of “highly functional”, it might be), but it defines some object-oriented paradigm like the object-like “scopes”. (thus, the corruption on the name)That's probably the most unique language I've seen. Very cool! I had an unfinished proglang that only has the (abstract) interpreter and parser done called Gravy. Its name is a corruption from “curry”, as in
snip
Could you return an atom that does an action? Like this:
fn foo() {
return + "foo";
}
print("abc" foo() !); # prints "abcfoo"
- Carmiller24
-
2 posts
Custom Programming Languages
I'm (poorly) creating a programming language called Elmwood (Written in Scratch). I need to revamp the syntax, but the goal is to keep it simple.
- TheSecondGilbert
-
100+ posts
Custom Programming Languages
There's a syntax for functions on the parser grammar. It accepts a single atom or a line encased in parenthesis (a single word, you might say).currying, which this language uses a lot. That might make it a highly functional language (which, depending on your defintion of “highly functional”, it might be), but it defines some object-oriented paradigm like the object-like “scopes”. (thus, the corruption on the name)That's probably the most unique language I've seen. Very cool! I had an unfinished proglang that only has the (abstract) interpreter and parser done called Gravy. Its name is a corruption from “curry”, as in
snip
Could you return an atom that does an action? Like this:fn foo() {
return + "foo";
}
print("abc" foo() !); # prints "abcfoo"
Some examples:
\a.a; # function \a.(# at MEMLOC)
\a.a 1; # number 1
\a.(print (a));
(By the way, I forgot to mention scopes can also store constant values. Calling it with the keyword `let` allows you to store a variable as is. For example, {let a := 1; print (a)} will print 1 (note that you don't have to give `a` the keyword `!`, since `a` is already a number). The downside of this system really is that it creates redundancy with the names; there's one stored in the scope and one in the field itself.)
There might be special cases for parenthesis and scopes, but what and how I'm not quite sure yet. I need to further work on the interpreter if I had to figure that out.
- Redstone1080
-
1000+ posts
Custom Programming Languages
Sorry for not posting on this. I would normally quote-reply some of these posts but they are way too long lol
I tried making one a while ago, called Thatch. The first version of it, called Linear Thatch, can be found I'm (poorly) creating a programming language called Elmwood (Written in Scratch). I need to revamp the syntax, but the goal is to keep it simple.here
- rdococ
-
1000+ posts
Custom Programming Languages
The easter egg is a nice touch Sorry for not posting on this. I would normally quote-reply some of these posts but they are way too long lolI tried making one a while ago, called Thatch. The first version of it, called Linear Thatch, can be found I'm (poorly) creating a programming language called Elmwood (Written in Scratch). I need to revamp the syntax, but the goal is to keep it simple.here

-
I've got a VM and interface for my language up and running!

The working name for this language is escript. I call it that because “OScript” was taken, and E has the closest object model I could find to it, though the only real similarity is that E and escript both lack classes - instead, objects are essentially records of closures you can create at any time. I'm looking for better name suggestions before release.
Also, any suggestions for better assignment syntax are welcome. Right now it's `<-`, but that blends in with the `->` method/lambda syntax, and while writing the above example I initially typed `:=` by mistake.

Last edited by rdococ (Oct. 18, 2023 13:51:44)
- gilbert_given_189
-
1000+ posts
Custom Programming Languages
Just asking; what is the instruction set of the VM?The easter egg is a nice touch Sorry for not posting on this. I would normally quote-reply some of these posts but they are way too long lolI tried making one a while ago, called Thatch. The first version of it, called Linear Thatch, can be found I'm (poorly) creating a programming language called Elmwood (Written in Scratch). I need to revamp the syntax, but the goal is to keep it simple.here
-
I've got a VM and interface for my language up and running!
The working name for this language is escript. I call it that because “OScript” was taken, and E has the closest object model I could find to it, though the only real similarity is that E and escript both lack classes - instead, objects are essentially records of closures you can create at any time. I'm looking for better name suggestions before release.
Also, any suggestions for better assignment syntax are welcome. Right now it's `<-`, but that blends in with the `->` method/lambda syntax, and while writing the above example I initially typed `:=` by mistake.
(don't be extensive, just explain some notable ones)
- rdococ
-
1000+ posts
Custom Programming Languages
Well… I guess it's more of a straight interpreter. After converting your code to an AST (a data structure for representing programs) it recursively searches the AST, and methods on the syntax tree's nodes tell it what to do. Scratch does basically the same thing and calls it a VM, so I had ‘VM’ on my mind -snip-
Just asking; what is the instruction set of the VM?
(don't be extensive, just explain some notable ones)

- rdococ
-
1000+ posts
Custom Programming Languages
EScript is now available to try here, source code at https://github.com/rdococ/escript. The canvas API is a gigantic work in progress though 

Last edited by rdococ (Oct. 22, 2023 20:15:52)
- uwv
-
1000+ posts
Custom Programming Languages
not at all a programming language but i've been working on a hdl (hardware descriptor language) specifically targeted at minecraft redstone. im not sure im super happy with the syntax (yet) but i am open to suggestions. i am calling it RDL (Redstone Descriptor Language) and unlike the syntax i am really happy with that
8 bit full adder:
observer clock:
silly little lamp example:
8 bit full adder:
import std/logic/*
assembly full_adder(a, b, cin) -> s, cout {
a, b
-> xor
-> (take r -> (
(
a, b -> and,
cin, r -> and
)
-> or
-> cout
)) & ( -> s )
}
assembly eight_bit_adder(a[8], b[8]) {
var last: full_adder
repeat sizeof a {
(
a[i],
b[i],
last[cout] ? 0
)
-> ( fulladder -> last -> )[s]
-> lamp
}
}
observer clock:
assembly clock() -> p {
observer > < observer -> p
}
silly little lamp example:
assembly lamp_example() {
lever -> lamp < observer -> lamp
}
Last edited by uwv (Oct. 30, 2023 07:39:45)
- TheSecondGilbert
-
100+ posts
Custom Programming Languages
Redstone Descriptor Language) and unlike the syntax i am really happy with thatHow would lateral inputs work? (usually called “side inputs”) not at all a programming language but i've been working on a hdl (hardware descriptor language) specifically targeted at minecraft redstone. im not sure im super happy with the syntax (yet) but i am open to suggestions. i am calling it RDL (
8 bit full adder:import std/logic/*
assembly full_adder(a, b, cin) -> s, cout {
a, b
-> xor
-> (take r -> (
(
a, b -> and,
cin, r -> and
)
-> or
-> cout
)) & ( -> s )
}
assembly eight_bit_adder(a[8], b[8]) {
var last: full_adder
repeat sizeof a {
(
a[i],
b[i],
last[cout] ? 0
)
-> ( fulladder -> last -> )[s]
-> lamp
}
}
observer clock:assembly clock() -> p {
observer > < observer -> p
}
silly little lamp example:assembly lamp_example() {
lever -> lamp < observer -> lamp
}
- davidtheplatform
-
500+ posts
Custom Programming Languages
You could do something like this:(#71)i'm not sure yet, theres no way to do it in syntax, i might just skip giving it syntax and let the synthesizer figure it out
How would lateral inputs work? (usually called “side inputs”)
back_input|left_input|right_input -> repeater
- IM-4-U
-
1 post
Custom Programming Languages
It is Possible! TO MAKE A CUSTOM PROGRAMMING LANGUAGE IN Scratch And i had made Print Comments
- LTV2008
-
87 posts
Custom Programming Languages
I created a language based on Windows Batch Script that i nicknamed “Storytellers Batch”. Here is a example:
@talking ON
TITLE “foobar”
say “nope” & REM A remark that does not get executed
timeout 2
label mylabel
choice rc “Press R or C to continue”
if not choicelevel 2 (
say “R key pressed”
say “also nope”
timeout 3
goto mylabel
) else (
say “C key pressed”
timeout 1
say “yes”
)
key q “Press Q to continue”
for i in (10) do (
say “yay”
)
PAUSE
EOF
I plan on writing a SB to .BAT converter for it to work in Windows.
@talking ON
TITLE “foobar”
say “nope” & REM A remark that does not get executed
timeout 2
label mylabel
choice rc “Press R or C to continue”
if not choicelevel 2 (
say “R key pressed”
say “also nope”
timeout 3
goto mylabel
) else (
say “C key pressed”
timeout 1
say “yes”
)
key q “Press Q to continue”
for i in (10) do (
say “yay”
)
PAUSE
EOF
I plan on writing a SB to .BAT converter for it to work in Windows.
Last edited by LTV2008 (Dec. 7, 2023 01:38:55)
- LTV2008
-
87 posts
Custom Programming Languages
Ok so I plan on making a thing called FluffScript. I alreday have the syntax, but can someone here create an FS to Javascript converter?
Here is the syntax:
the syntax
Here is the syntax:
the syntax
- snoopythe3
-
500+ posts
Custom Programming Languages
I'm actually making a scratch extension that trolls the user