DEV Community

Discussion on: Yet another programming language Unv

Collapse
 
ksengine profile image
Kavindu Santhusa

Hi Camille,

Thanks for your kind words.

I got this idea to create a programming language when I was younger than 10 years. It was similar to HTML.

Some programming languages are static and some of them are dynamic. static ones have unfriendly syntax. But they are easy to maintain. dynamic ones like python have friendly syntax. But they are somewhat buggy due to dynamic nature.

In my point of view, JavaScript is the most universal programming language because it can be used to develop web, mobile(react native...), desktop(electron...), IOT.
Unv combined this three features,

  • static
  • easy syntax
  • universal

Instead of creating own compiler or interpreter. Unv depends on existing programming languages. So it's universal.

Collapse
 
camillerkt profile image
Camille Rakotoarisoa

Great! But did you follow a particular tutorial to learn how to create this programming language?

Thread Thread
 
ksengine profile image
Kavindu Santhusa

I had read tons of tutorials. But no one helped me.

Thread Thread
 
camillerkt profile image
Camille Rakotoarisoa

Did you find them on the Internet?

Thread Thread
 
ksengine profile image
Kavindu Santhusa • Edited
Thread Thread
 
camillerkt profile image
Camille Rakotoarisoa

Okay, thank you very much !! Good luck with your projects ! :)

Thread Thread
 
ksengine profile image
Kavindu Santhusa

I am looking for contributors for this project. Can you join Unv organisation

Thread Thread
 
camillerkt profile image
Camille Rakotoarisoa

I'm really sorry but at the moment I don't have much time to contribute to projects. But I note the proposal! And thanks for this one

Collapse
 
ksengine profile image
Kavindu Santhusa

This is how compiler works.

# input code
if 'Unv is awesome!'
    print('Hello World!')
# keep editing for live results
Enter fullscreen mode Exit fullscreen mode

First remove comments and handle strings

if 'Unv is awesome!'
    print('Hello World!')
Enter fullscreen mode Exit fullscreen mode

First slice the code by newlines

if 'Unv is awesome!'
Enter fullscreen mode Exit fullscreen mode
    print('Hello World!')
Enter fullscreen mode Exit fullscreen mode

Then convert the indention to brackets

if 'Unv is awesome!' {
    print('Hello World!')
}
Enter fullscreen mode Exit fullscreen mode

Then add parentheses when needed

if ('Unv is awesome!') {
    print('Hello World!')
}
Enter fullscreen mode Exit fullscreen mode

Then Its valid JavaScript

Thread Thread
 
ksengine profile image
Kavindu Santhusa

You can contact me via ksengine.github@gmail.com