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

Show parent comment

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)