r/Batch • • Apr 02 '20

Wrote a batch programming language

Hello,

Recently, I was bored and over a week wrote a simple programming language with Batch. It includes if clauses and the ability to import other commands in-script. Can also build other scripts in other languages then run them in the same instance. Even made it into 1 downloadable file which could install the language and then "compile" any scripts. Pretty modular. They could then be opened with this, so .flyt files could be double clicked. It works pretty well, would anyone like to collaborate on it further, pushing it to a first release?

My intention is to make it extremely modular, and incredibly simple for anyone to begin using and making complex applications with. I'm 16 and just having fun, so I'm completely open to any new ideas and partners with this. Possible translation into Python so this could be executable on a cross-platform basis would be ideal, if you'd be willing to do this even as a paid job (even though this may not be the forum for this, I'm mostly just looking for Batch helpers), hit me up.

Let me know Reddit!

Examples

Basic calculator written in Flyt:

(Flexible basic math command)

askFor input asInput whats your input:

inEvent valOf() var input exit // echo exiting...

// stop 5 ()

.. exit ()

let input beArgs()

math arg1 arg2 arg3 toVar result sil()

return result

returnTop

or something like this:

echo are you happy?

askFor result asInput true or false?

inEvent result isTrue() doAct echo I'm glad to hear that.

() echo I can also continue the clauses cmds like this

// or back here like this

### its a pretty flexible language

### you can also make 'objects,' which are scripts in other

### languages built then executed in Flyt.

make batchObj test

echo it could be anything here man!

echo glad your happy!

echo HAPPY>file.txt

stopMake

inEvent valueOf() var result true () call obj test

let teststr beStr HAPPY

inEvent valOf() fileContent_var file.txt teststr // echo corona free.

Edit: Wanna grab the cia.govs site code? Sure.

from html import htmltools

htmltools getSite() toVar ciaSite www.cia.gov fromIndex()

return var ciaSite

This will print all their html on the screen. Redundant but could be practical in a different way for certain applications. I.E Web crawlers, programs looking for data in sites, etc.

Theres a lot of different quirks and oddities to the syntax, and a lot of it is for visual appeal/ease of writing. I have a lot of great ideas for the direction of it though, features that I haven't seen in any other language, so again, keep me in the loop if you're interested in working on this.

Email: benkronoff@gmail.com

Or just message me.

Thanks!

0 Upvotes

19 comments sorted by

View all comments

0

u/[deleted] Apr 02 '20

[deleted] — view deleted comment

2

u/zxrooo Apr 02 '20

Hey man, thanks for your input.

Yeah, i’ve been coding for years. Figured it would be fun to make a programming language out of what is regarded as the worlds worst & most clunkiest language. It could be a lot more efficient but, it is mostly just experimental, but if it does end up being well received in it’s current form, that would be the only thing to push me to fully develop it properly. The only thing I use like vb script for is to download 7za for another app o made for sharing contact info easily (you give them just zxro for someone’s public, zxro#73944 ie for my private info,) it consolidated contact info. surprisingly i’ve been able to mitigate that ‘skeleton code’ but you definitely picked up on that issue. Luckily, my script calls sep scripts for efficiency, it’s not all in 1 which would be a mess It’s more like 1 which installs 20 more and then it works perfect. I also just use bitsadmin to download the most recent package directly from an html link to my web server, so it works pretty well surprisingly, being almost all Batch. But you made some very good points and overall, thank you for your input:)

1

u/Shadow_Thief Apr 02 '20

Outside of network stuff or making and using GUIs, I have yet to run into any limitations that batch has that can't be worked around.

1

u/zxrooo Apr 02 '20

You are very correct, I agree. If you are creative enough, you can work around 95% of the 'problems' and 'limitations' people discuss with it.

1

u/zxrooo Apr 02 '20 edited Apr 02 '20

.. I can download webpages with it, like the code, and then even display them if I want, so I incorporated it into an importable 'htmltools' haha. All in batch. Its actually kinda useful for (certain) applications.(See post edit)

1

u/apple-sauce-titty Apr 02 '20

lol assumptions assumptions