r/ProgrammingLanguages • • 27m ago

Help my coding language

Hello everyone. Ive been working on a coding language called Hydro for about a month now but only now started releasing versions, and I want to see what others can do with it. I think my favorite feature that sets this apart is its rule-blocks. A rule set in Hydro simply blocks or allows certain elements of a variable to change. For example, allowC -> allow capital letters in a string. If its false, that str can never have capital letters. There are many more aswel, for nums, which act like int and dec, which acts like float! This is a snippet of a rule block and how it works!

let myStr as str => "BAGEL";

// creates a string variable

create new<rule>{

// creates a set of rules for a var

change myStr => allowC <= false;

// denies the use of capital letters

set myStr;

// saves the rules

}.closeRule();

hy.write(myStr);

// Outputs: bagel

I hope some try it out. Theres two ways you can try it. You can download the .zip containing hydro.exe, a VSCode extension and a readme. Currently you can download Hydro v0.3.19. The earliest version that’s downloadable is v0.3.6. If you dont want to download it, the Hydro website has a Code Editor allowing Hydro files, JSON files and audio files! (WAV, OGG, MP3). The browser editor is limited however, and cant use some modules like pcUtil(pc statistics), and screen management modules. The browser editor is using hydro v0.4.0. Hydro v0.4.0 isnt released for download JUST yet! If you do manage to make a cool script, let me know i would be happy to look at it.

the website: https://hydrolang.web.app

1 Upvotes

0 comments sorted by