Volant is a general-purpose data-oriented high-level programming language with a focus on speed, power, asynchronicity, and concurrency. Volant is designed with simplicity in mind, allowing both low-level and high-level features with simple and easy to use syntax. Volant is transpiled to c with no or a very thin layer of abstraction over the code you write, which makes it as fast as c in almost all cases.
@AmazingMech2418 Well, no. Unlike CPP, Volant isn't object-oriented. You understand how big of a difference that is, right? I don't even need to say anything more but,
Volant has garbage collection. Volant support for closures is far better than CPP. Volant doesn't have exceptions (errors should be handled by returning a tuple). Volant has an in-built event system and thread-management system (it uses libuv and its not in a usable state yet). Volant has (not yet) async/await and concurrency primitives.
Volant "syntax modifications" aren't just randomly chosen. Every difference from the c syntax has a very specific purpose. For example, Volant's version of CPP's int ((*var[10])(int, int))(int, int) is var: [10] * func(int, int) (func (int, int) int). You can clearly see the superiority of Volant syntax here. Volant syntax is chosen very precisely to be as simple, clean, and readable as possible.
@ApoorvSingal Well, I guess you're right, but it seems kind of like what some people called "fake" languages where you change the syntax and use classes... I kind of expected an interpreter or a full compiler to Assembly...
@AmazingMech2418 Volant uses c as an intermediate representation and there are countless other languages that do the same. No sane person would ever write a compiler to asm if he isn't immortal or doesn't have a team of 20 devs. Also, it would have been an absolute waste of time to write a compiler to asm because Volant does not need any more access to the machine than what c gives.
@AmazingMech2418 An interpreter usually isn't very fast and most people use an intermediary like C or C++. Not everyone knows assembly good enough to generate fast, portable code.
What I call a fake language is when people do this:
class Console:
def writeln(self, str):
print(str)
console = Console()
console.writeln("Woo look at me im a new language based on python")
@ApoorvSingal That makes sense! In my opinion, though, compiling to Assembly is good though since it provides full control and also is more efficient...
@ApoorvSingal No, but BrainF is turing-complete and so is Volant. It still wouldn't be too difficult to make Volant compile to Assembly. I mean, if you use enough macros, it would be really easy actually!
@AmazingMech2418 Because actually I like AT&T better, despite its shortcomings. I like the sigils because I see what I'm working with — a register, an immediate, etc. (And it's builtin to GCC so I don't have to set up NASM :D)
Volant
Volant
Volant is a general-purpose data-oriented high-level programming language with a focus on speed, power, asynchronicity, and concurrency. Volant is designed with simplicity in mind, allowing both low-level and high-level features with simple and easy to use syntax. Volant is transpiled to c with no or a very thin layer of abstraction over the code you write, which makes it as fast as c in almost all cases.
The team
The language was designed and developed solely by me.
Try it out
Step 1: Fork this repl.
Step 2: Edit the file named
main.vo
and press the run button to try it out.You can also try Volant on our online Volant playground here.
Useful links
EDIT: @CSharpIsGud made a complete operating system using Volant. Check it out here.
Any constructive feedback is appreciated and thanks for checking it out.
Nice job, but isn't this really just a modification of the C++ syntax with custom data types?
@AmazingMech2418 Well, no.
Unlike CPP, Volant isn't object-oriented. You understand how big of a difference that is, right? I don't even need to say anything more but,
Volant has garbage collection.
Volant support for closures is far better than CPP.
Volant doesn't have exceptions (errors should be handled by returning a tuple).
Volant has an in-built event system and thread-management system (it uses libuv and its not in a usable state yet).
Volant has (not yet) async/await and concurrency primitives.
Volant "syntax modifications" aren't just randomly chosen. Every difference from the c syntax has a very specific purpose. For example, Volant's version of CPP's
int ((*var[10])(int, int))(int, int)
isvar: [10] * func(int, int) (func (int, int) int)
. You can clearly see the superiority of Volant syntax here. Volant syntax is chosen very precisely to be as simple, clean, and readable as possible.@ApoorvSingal Yeah, but doesn't it use just a C++ library after the syntax modifications?
@AmazingMech2418 What's bad about that? What's the point in rewriting those libraries when we can just use them?
@ApoorvSingal Well, I guess you're right, but it seems kind of like what some people called "fake" languages where you change the syntax and use classes... I kind of expected an interpreter or a full compiler to Assembly...
@AmazingMech2418 Volant uses c as an intermediate representation and there are countless other languages that do the same. No sane person would ever write a compiler to asm if he isn't immortal or doesn't have a team of 20 devs.
Also, it would have been an absolute waste of time to write a compiler to asm because Volant does not need any more access to the machine than what c gives.
@AmazingMech2418 An interpreter usually isn't very fast and most people use an intermediary like C or C++. Not everyone knows assembly good enough to generate fast, portable code.
What I call a fake language is when people do this:
@ApoorvSingal That makes sense! In my opinion, though, compiling to Assembly is good though since it provides full control and also is more efficient...
@CSharpIsGud Okay. I just thought this was kind of like a "fake" language though since it really just uses a C++ library for most of it.
@AmazingMech2418 Some of the languages being submitted to the jam use a parsing library to do the parsing for them, but noone seems to mind.
@CSharpIsGud Yeah...
@ApoorvSingal I guess I'm either:
@fuzzyastrocat Uh... I made a BrainF compiler that compiles to Assembly in like 30 minutes...
@AmazingMech2418 Congrats, you're now either Insane or Immortal!
@fuzzyastrocat LOL! Probably the insane one. It was easy though!
@fuzzyastrocat Are you talking about Curta? It's just transpiled to cpp. It's not like you have written a compiler to asm.
@AmazingMech2418 Do you really think you can compare the complexity of Volant with BrainF?
@ApoorvSingal No, but BrainF is turing-complete and so is Volant. It still wouldn't be too difficult to make Volant compile to Assembly. I mean, if you use enough macros, it would be really easy actually!
@ApoorvSingal No, I'm talking about Sea. Sea is compiled directly to AT&T assembly, which is even harder than asm :D
(And Curta is transpiled to c++ so that it is portable across many systems, or else I would've compiled to AVR-assembly)
@fuzzyastrocat AT&T? Why not just use NASM? LOL!
@AmazingMech2418 Because actually I like AT&T better, despite its shortcomings. I like the sigils because I see what I'm working with — a register, an immediate, etc. (And it's builtin to GCC so I don't have to set up NASM :D)
@AmazingMech2418
nasm bad, at&t godly
I am, it’s actually easier than compiling to C lmao @ApoorvSingal
AT&T has many benefits over NASM for example the builtin .asciz @AmazingMech2418
Yeppers @firefish
@Wuru Yeah, I know that now. But unfortunately, I still can't figure out OS dev in AT&T...
Hm, what seems to be your problem? @AmazingMech2418
@Wuru I can't figure out how to make it bootable.
Like the “times db blah blah blah” at the end? If you want you can paste your code here. @AmazingMech2418
@Wuru Not that. Like this: https://repl.it/@AmazingMech2418/HelloWorldOS-1#Loader.s First, it won't compile. Second, when I did get it to compile before (I forgot how), it wouldn't boot.
I’ll have to take a look at it when I’m on my computer, then I’ll get back to you (if I remember to lmao) @AmazingMech2418
Yo, I honestly have no idea. I do have a question though, is there a way to link with 32-bit libc on replit? @AmazingMech2418
@Wuru how did you... come back from the dead? what happened to @JustAWalrus?
yes @firefish
@Wuru do you still have 15-odd alts?
Na, I dont care about the points anymore. @firefish
@Wuru I can see, not c y c l e s q u e e z i n g anymore.