Wildest programming language idea
h
amasad (3034)

What is your wildest programming language idea? This could be fun (silly) ideas or really cool and useful ones.

Go!

Also on le twatter: https://twitter.com/replit/status/1275525512861900800

You are viewing a single comment. View All
DungeonMaster00 (163)

SplatLang - A Splatoon themed programming language

sorry for terrible joke that could have come from sans himself

Basics:

  • file extension: .splat
  • as much esolang as useful
  • splatoon themed syntax (you could have guessed)
  • safe like C#
  • a few good data types
  • a built in help method
  • and more!

Woomy - Print method

The method for printing something to the console is woomy(). This is a sample of using woomy():

Input:

woomy("Hello, Inkopolis!")
// this is a single line comment comment
/^ this is a squid comment.
goes over multiple lines.
named that because the ^s look kinda like squids.
will end with:
^/

Output:

Hello, Inkopolis!

Veemo - Builtin slowprint method.

veemo() will print something to the console, but wait in between each character printed.

A value for how much time to wait is measured in milliseconds

Input:

veemo("Hello, octo valley!", 60)

Output (with 0.06 seconds in between characters:

Hello, octo valley!

Getting input

The method for input is playAnotherBattle() with the prompt inside the ()s. If you put in nothing, then the prompt will automatically be >>.

Input:

playAnotherBattle("Will you rescue the Great Zapfish?\n>> ")

Output:

Will you rescue the Great Zapfish?
>> (halts until enter key is pressed)

Data Types

SplatLang supports nine data types, most of which are pretty much the same as some Java data types.
Integral:

  • byte - A 1 byte integral value
  • short - A 2-byte integral value
  • int - A 4-byte integral value
  • long - An 8-byte integral value
    Float-point:
  • float - A 4-byte float-point value
  • double - An 8-byte float-point value
    Characters:
  • char - A single ASCII/Unicode character surrounded by two 's
  • string - A sequence of ASCII/Unicode characters surrounded by two "s
    Other:
  • bool A boolean value. SplatLang boolean values are:
    • fresh - equivalent to true in other languages
    • unfresh - equivalent to false in other languages
  • void - No specific type, can be any other type

Variables, Constants, and Lists

Look at the code below (java syntax highlighting (not java code) ):

// integral (variable)
byte thisIsSoShort = 100
short aLittleLonger = 10000
int medium = 1000000000 
long lengthy = 1000000000000000
// float point (list)
float shortFloat[] = {1.11111111, 300.12345, 0.0123}
double longFloat[] = {1.11111111111111, 56633.22134552444}
// characters (constant)
con char delta = 'Δ'
con string message = "SPLATLANG IS AWESOME!!!!"
// other
con bool djOctavo = unfresh
void thingsThatAreCool[] = {120, 10010, 2000000001, 14367424553, 6.54321, 3.13432444246543, 'Ω', "YEET!", fresh} 

That shows variables, lists, and constants in one program.


Operators

Here are the operators:

// basic math
+ // addition
- // subtraction
* // multiplication
/ // division
% // return remainder
// quick basic operations
+= // increase by certain amount
-= // decrease by certain amount
*= // multiply by certain amount
/= // divide by certain amount
%= // divide by certain amount but return remainder
++ // increment by 1
-- // decrement by 1
//comparing
== // equal to
!= // not equal to
< // less than
<= // less than or equal to
> // greater than
>= // greater than or equal to
// boolean logic
&& // and
|| // or
! // not

Conditionals

The conditionals are if, also, and othersUnfresh.

int nklings = 1000
int octolings = 750

if ^inklings == 1001^/^ unfresh ^/ {
    woomy("1001 inkings in inkopolis\n")
}
also ^inklings == 1000 && octolings == 1000^/^ unfresh ^/ {
    woomy("Inkling and octoling numbers equal, they are" + inklings + "\n")
}
othersUnfresh/^ this will run since the others are unfresh ^/ {
    woomy("Unknown.\n")

Loops

And finally, there are loops. There are while, for, and forAllSquids.

// example 1:
while ^fresh^ {
    // infinite loop
    woomy("Booyah!");
}
// example 2:
bool isItFresh = fresh

while ^isItFresh == fresh^ {
    woomy("I WILL ALWAYS BE FRESH!!!")
}
// example 3:
for ^i = 0; i < 6; i++^ {
    woomy(i)
}
// example 4:
aRandomList = {"oof", "yeet", "kobe}"
forAllSquids ^string item in aRandomList^ {
    woomy(item)
}

THAT"S IT!!!


bye remind me of typos and stuff

firefish (878)

@SpicedSpices That's just the name of the language, if there is no reason and he was making up some pseudo-words, that's an acceptable reason.

firefish (878)

@nk1rwc Ah, alright. Yet another, video game I've never heard of.

RahulChoubey1 (89)

@DungeonMaster00 squid. I SUMMON THE ALMIGHTY SQUID

you know who I'm talking about