low-level programming, redesigned.

Hydrogen Language is a single-file syntactic layer that reshapes C into a more readable and understandable language. It uses intuitive keywords, functional programming patterns, and seamless cross-platform abstractions, which have all been continously iterated and improved upon.

H is free, open-source, explicit, and accessible.

• • • • • • •

Familiar with how code is read? Take a moment to follow this program:

start
{
	file f = open_file( input_bytes[ 1 ] );
	if_nothing( f.handle )
	{
		print( "Failed to open file\n" );
		out failure;
	}
	
	byte input[ KB( 100 ) ];
	temp byte ref input_ref = input;
	file_load( ref_of( f ), input );
	
	byte output[ KB( 100 ) ];
	temp byte ref output_ref = output;
	
	check_input:
	{
		temp byte val = val_of( input_ref );
		with( val )
		{
			when( '\0' ) jump input_eof;

			when( ' ', '\t', '\n', '\r' ) skip;

			when( 'E', 'e' )
			{
				val_of( output_ref ) = '3';
				output_ref = output_ref + 1;
				skip;
			}

			other
			{
				val_of( output_ref ) = val;
				output_ref = output_ref + 1;
				skip;
			}
		}
		input_ref = input_ref + 1;
		jump check_input;
	}

	input_eof:
	file_close( ref_of( f ) );
	print( output );
	print_newline();
	out success;
}
• • • • • • •

In the program you can see that it loads an input file (maximum of 100KB), iterates through every byte, skips spaces/tabs/newlines, outputs a '3' instead of 'E'/'e', and outputs the rest when it's anything else.
Then it prints the final output.

If you compile this into something like "compr3ss.exe", you can go:

// Inside a terminal/command-prompt
compr3ss test.txt
// If test.txt is:
//  "hello HYDROGEN lang!",
// It will print:
h3lloHYDROG3Nlang!

This could be expanded upon to process compressed files, images, audio, anything that involves reading and processing!

For example one of H's tools, H_format, is built this exact way. The executable is less than 6KB on Windows, and formats your H code extremely quickly and efficiently.

• • • • • • •

The entire language has been continuously iterated on, reviewed by peers, adjusted, and tweaked to ensure that it is as readable as possible, even to people who do not program. If a programming language takes extra effort to decipher while reading then it is more prone to having errors and bugs.
Understanding exactly what the code is doing in the least amount of time is important.

code should be readable!


download H


> source code

the H header itself can be downloaded and used in your C/C++ project setup


> altar installer

altar is a CLI written in H that allows you to download tools and create/compile H projects with ease


> H format tool

to format and clean your H code, there's a tool written in H!


learn H


> official documentation

read how to program in H from the foundational concepts


> tutorials (coming soon!)

learn H through written and video tutorials


the H Discord is coming soon!


in the mean time, follow ENDESGA for the latest H news





H is licensed under CC0, effectively public domain.
It is, was, and always will be free for every being capable of using it.
Credit to ENDESGA is appreciated, not required.

create what you wish existed.