New Language Collab

So I wanna make a coding language called volcano. It can make UI. Just ask if you want to join.
The file extension is going to be .volc

Example

Here’s an example:

<\This a comment/>
<\
This
is
also
a
comment
/>

var <\ This /> chicken_nuggies <\ is \> = <\ bad /> “yummy” <\ practice />
wait(10) <\ waiting 10 seconds/>
chicken_nuggies = “no”

var m1 = True <\ That’s a variable/>

<\ Now for some more stuff/>
if (1 == 1) {
  pass
} else if (2 == 3) {
  pass
} else {
 pass
}

while True {
   var Hello_World = “cringy”
}

for i in range(5) {
  var index = i
}

func myFunc(str: String, other: Any <\ Some parentheses/> ) {
  return join(str, convertToString(other))

<\ Now the actual reason this language is created/>
title(“Hello”)
view = {
  body()
    _backgroundColour =“blue”
  text(“Hello World!”)
    _colour = “lime”
    _size = 48 <\ size is counted in pixels/>
    _font = “pixel”
}

display view

Tokens

String
Integer
Float
var
return
True
False
None
display
Tuple
Dict
func
delete
if
else

IMPORTANT: Tuples can hold multiple types of values

And here are the built-in functions:

convertToString()
convertToInteger()
convertToBoolean()
convertToFloat()
module()
range()
length()
[list].append()
[list].replace()
[list].insert()
[dict].replaceKeyName()
body()
text()
image()
input()
button()
link()

Starter Template

Here’s the template:

title(“New App”)

view = {
  body()
  text(“Hello World!”)
}

display view

More Info

If an UI doesn’t have position information, it will just gather in the top-left corner. Default text size is 15. Default text colour is black. Default background colour is white. Default text font is sans_serif.
More UI:
body() (There will be an error if there’s no body.)
text()
image()
input()
button()
link()

Links

GitHub Rep: GitHub - SnakeyKing/Volcano: Volcano is a programming language that makes UI
Official Website Repl: https://replit.com/@SnakeyKing/Volcano-Website

1 Like

What language is it built from?

1 Like

I’m joining, probably will make some extensions/helper functions in python, or made the entire body in it
How to join?

1 Like

Oh my god I just made a pull request on the volcano github

1 Like

Cool, I’d like to join! How would you use, like, events? Like onClick?


It’s actually “a UI”, because the first sound in the “U” of “UI” is pronounced like a “y”, which is not a vowel.

1 Like

Seeing that made me think of VLC media player, an old, trusted program on multiple operating systems. Apparently they also use this extension. You’ll be fine as long as you avoid VLC media player while running your custom language.

4 Likes

Seems that .voc and .vlc extension is being used long time ago so why not change it to .volc

2 Likes

I’m starting to do it here so that it won’t take too long :+1:

1 Like

are we going to use flask to run volcano, or just convert volcano to html?
Also would you mind explaining what all built-in functions do and what is their arguments

1 Like

You can’t do that since it has a licence. Also it’s a compiler. And you should delete that both on Replit and GitHub.

Sound good.

No webview


@NateDhaliwal @QwertyQwerty88 @QwertyQwerty88 I have things to announce.

  1. The file extension is .volc
  2. I made some changes to the post
  3. What language should be built on?
  • Java (We could do the same thing but easier on Kotlin)
  • C++ (I don’t think it supports keyboards.)
  • HTML (we’re not using webview)
  • Kotlin
  1. Kotlin it is. If you think differently, then suggest what language it should be built on.
  2. To make my life easier, there’s no constants and there’s semicolons.
  3. https://replit.com/@SnakeyKing/Volcano
2 Likes

You know, I have absolutely, 0%, no idea what kotlin is. I’ve never even heard of it!

*Takes one look at how to print ‘Hello World’ and faints.
Aaaah so many errors in

println("Hello world")

So…. I don’t quite understand
Do you mean compile volcano to kotlin using kotlin?
confusing but ok?

1 Like

Kotlin kind of reminds me of APK development with Android Studio

Also, how do you even use the Kotlin compiler to compile another language?

@NateDhaliwal @python660 @TaokyleYT @boston2029
I changed my mind. I’m just gonna do a simple language here
To get invited, show me a piece of python code or even a whole language written in Python that might help. Then I’ll invite you.

code = input(">>> ")
#LOL
from os.path import exists
from sys import argv

class FileExtensionError(Exception):
  pass #creates custom error for no reason

def do_stuff():
  if exists(argv[1]):
    if argv[1].rsplit('.', 1) == 'volc':
      with open(argv[1], 'w') as f:
        continue_code(f)
    else:
      raise FileExtensionError(f'{argv[1]} is not a volcano file, perhaps change the file extension to .volc?')
  else:
    raise FileNotFoundError(f'{argv[1]} doesn’t exist, make sure you entered an existing file through an existing directory')

if __name__ == '__main__':
  if len(argv) < 2:
    argv.append(input('Please input the volcano file you want to compile: '))
  do_stuff()

this entire thing is written by bare hand directly so it has not gone through error tests or syntax checks, if there is error it usually is close to the correct one so please don’t mind

This is a file test code which

  • check if arguments are given from the run command line, take the first argument as file name if yes and ask for input for the name if not
  • check if the file name given exists or not
  • check if the file extension is .volc or not (this can be removed if you want it to run the file as volcano regardless the file extension)

Also feel free to copy some of my code from my esolang here, it may help, and invite me as @s3D27ZHOU if you ever want to invite me, @TaokyleYT is a blank account in replit itself.

also, consider saving the current line in a variable to reduce execution times with large .volc files instead of using f[line] in the if/elif/else block. You can even use a match/case statement instead of if/elif/else.

lang = input("What's the programming language you want to learn? ")

match lang:
    case "JavaScript":
        print("You can become a web developer.")

    case "Python":
        print("You can become a Data Scientist")

    case "PHP":
        print("You can become a backend developer")
    
    case "Solidity":
        print("You can become a Blockchain developer")

    case "Java":
        print("You can become a mobile app developer")
    case _:
        print("The language doesn't matter, what matters is solving problems.")
# Credits to freecodecamp.org

https://replit.com/@QwertyQwerty88/Custom-Language

yes it’s really messy and yes I used a tutorial but I understand how it works

@SnakeyKing I have privately messaged you.