Is Hyperlambda a "toy programming language"
Tags: cloud, productivity
Published: 2022-08-17 08:11:00

It's easy to dismiss [Hyperlambda](https://aista.com/hyperlambda/) as a _"toy programming language"_. It's got no classes, zero OOP, barely any typing, and it feels like YAML. However, that misses the point, because _its simplicity is what makes it powerful_. If you were to classify Hyperlambda on the index of low versus high level programming languages, it would make stuff like VB6 and FoxPro resemble Assembly. This is its strength too. To understand why, look at the following chart.

![Complexity measurement of modules in Aista](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ljrp25jimm1wkze2hbh.jpg)

What you're looking at above, is actually all of [Aista's](https://aista.com)'s middleware. Roughly 7,000 lines of code, and that's it. Still, with these 7,000 LOC we are able to serve our entire infrastructure. This implies being able to create and destroy cloudlets from [our hub](https://hub.aista.com), having subscription based payments, registering users having them verify their email address, sign up people for our newsletter, serve plugins to Magic cloudlets, calculating affiliate earnings, etc, etc, etc. Basically we're _running our entire company on 7,000 lines of code_. The rest of our code is either off the shelf server infrastructure components, or frontend Angular code.

I can't show you the code, since this is a part of our secret sauce, and what gives us value as a company - But I can show you some general Hyperlambda snippets. For instance, as you're creating a new cloudlet in our hub, you'll have your cloudlet's name populated by a default animal name, such as tiger, lion, eagle, etc. This is 3 lines of code in Hyperlambda.

```
auth.ticket.verify:guest, root, admin
io.file.load:/modules/hub/magic.startup/misc/animals.json
return:x:-
```

The first line verifies the user is authenticated to invoke the endpoint, and the next two lines loads a file and returns its content as JSON to the caller.

## What you don't see in the above Hyperlambda

The stuff you don't see, is that the file will be loaded async, the user will be verified using JWT bearer tokens, the HTTP response will automatically be determined to be JSON, etc, etc, etc. There's practically zero difference between the above Hyperlambda, and the equivalent 50+ lines of code you'd have to write in C# to accomplish the same. The performance is also the same. And speaking about performance, the above snippet probably performs at least one order of magnitude better than its PHP or Python equivalent. What I want you to take away from this though, is the following.

> We built our entire company with exclusively Hyperlambda code ...

... and, we're a cloud service provider, needing subscription based payments, invoicing, ticketing and support systems, notifications, creation and destruction of cloudlets, dynamically installing plugins in said cloudlets, etc. What problem could you possibly have that is more complex than the above? We basically built AWS, Google or Azure if you wish, and we built it exclusively with Hyperlambda.

## Outperforming Google, Azure and AWS with 7,000 LOC

Yup, we basically outperformed all of the above with nothing but 7,000 lines of Hyperlambda code. How you may ask? Because not only do we provide all the basics that the above provides when you want to _"build an app"_, but we also provide it in such a way that the machine creates 80% of your code. The next time you're coding in Hyperlambda and somebody asks you what you're doing, do me a favour please, and answer the following ...

> I'm just outperforming Google with a toy programming language ^_^

Even though Hyperlambda _"feels"_ like a toy programming language, I can guarantee you that it _is not_. If you want to see exactly how much we achieved with these 7,000 lines of code, feel free to create a free demo cloudlet below.

* [Create a low-code full stack app in 5 minute](https://aista.com)