ElectricScript is a "juiced-up" programming language for electrical engineers, aimed to bridge the gap between electrical engineering and computer science. With its electrifying set of terms and tailored features, it "amps" up the understanding for electrical engineers. Get ready to "short-circuit" your way into programming with a familar set of engineering terms that will be sure to cause a "spark" in your brain!
load x = 5
label word = "Hello"
switch lever = on
circuit changeMaker(load payment)
+terminal
load quarters = payment // 25
payment = payment % 25
load dimes = payment // 10
payment = payment % 10
load nickels = payment // 5
payment = payment % 5
out [quarters, dimes, nickels, payment]
-terminal
display("Hello there")
function helloWorld() {
console.log(“Hello World”)
}
circuit helloWorld()
+terminal
display(“Hello World)
-terminal
function factorial(n) {
if (n === 0) {
return 1;
}
return n * factorial(n - 1);
}
console.log(factorial(5)); // Output: 120
circuit factorial(n)
+terminal
zener (n == 0)
+terminal
out 1
-terminal
out n * circuit(n - 1)
-terminal
display(factorial(5)) feedback Output: 120
class Fruit {
constructor(color, weight) {
this.color = color;
this.weight = weight;
}
getColor() {
return this.color;
}
}
class Watermelon extends Fruit {
constructor(weight, seedless) {
super(“red”, weight);
this.seedless = seedless;
}
}
signal Fruit
+terminal
drawing(color,weight)
+terminal
current.color = color
current.weight = weight
-terminal
getColor()
+terminal
out current.color
-terminal
-terminal
signal Watermellon wired to Fruit
+terminal
drawing(weight, seedless)
+terminal
amplify(“red”, weight)
current.seedless = seedless
-terminal
-terminal
for(var i = 0; i <= 10; i++) {
if(i % 2) {
console.log(i);
}
}
sequential(load i = 0; i <= 10; i++)
+terminal
zener(i % 2)
+terminal
display(i)
-terminal
-terminal
Addition: 2 + 3
Subtraction: 2 - 3
Multiplication: 2 * 3
Division: 2 / 3
Integer Division: 2 // 3
Exponents: 2 ^ 3
Modulo: 2 % 3
Parallel Addition: (2*3)/(2+3)
Addition: 2 + 3
Subtraction: 2 - 3
Multiplication: 2 * 3
Division: 2 / 3
Integer division: 2 // 3
Exponents: 2 ^ 3
Modulo: 2 % 3
Parallel Addition: 2 || 3
Jurgis is an international student from Venezuela at Loyola Marymount University, he is a Computer Science major with a minor in Statistics and Data Science. After graduating he plans to get involved with game design, as video games and entertainment bring people together. He hopes to potentially broaden his horizons outside the United States and continue to see more the world.
Kevin is an Electrical Engineering and Computer Science double major at Loyola Marymount University. Upon graduation, he plans on joining Northrop Grumman on their spacecraft design team in their Redondo Beach location as well as pursue a Masters in Computer Engineering. He got the idea for this language after seeing his fellow Electrical Engineering students struggling to connect with CS terminology.
Aryaman is a Computer Science major at Loyola Marymount University. His goals beyond education are to become a game designer and found his own indie game company. He also hopes to use computer science and AI to create engines that could assist game designers that do not have the technical background but still have ideas that could benefit the game-space. One such engine in development is a 'chat-GPT' type engine that will one day allow users to ask it to freely generate objects for whatever game-dev language they use to allow for all persons to create their own 3D library for their games.
Gabriel is a Computer Science major at Loyola Marymount University. He hopes to create tools and apps that have a positive impact on lives of people who use them, whether it be through making difficult tasks easier, or adding convenience to daily life.
Check out these helpful resources to learn more about ElectricScript: