Developing AND executing a C# console app from my phone

For years I have struggled with explaining people why we don’t need another platform for developing and distributing our apps than “the web”. In the meantime, developers were running over each other, like headless chickens, shouting “AppStore”, “Xamarin Forms”“Android Market Place”, “Silverlight” and “God knows what”. Well, the shouting stops today. Everything besides “the web” is rubbish, regardless of what your “domain problem is”, unless you’re developing web browsers or drivers.

Can your favourite “x-platform toolkit” do the above? I have a web server running Apache and Linux. On top of that I have developed a web operating system, in C#, running on Mono. In this web operating system, one of 5 apps happens to be a web based IDE, allowing me to literally create C# Console apps from my phone, AND execute it after I have compiled it. Notice, I could also have created GO apps and Python apps for that matter using the same IDE.

If you want to send your money to Apple or Google, and let them control the distribution of your app – You are of course welcome to do that – But don’t come and tell me the reasons are because you can’t create what you want to create using “the web” – Because it’s simply not true! If you’ve got developers in your organisation telling you “The web is inferior, we’ll need to develop native apps” – Then send them a link to this article, and ask them; “OK, great! Can you create an IDE that allows me to do the above in a ‘native app’?”

You can download Phosphorus Five here – It’s 100% Open Source!

Hyperlambda, a better relational file format

XML, although its tooling space is really good, is simply too verbose. I’d argue that XML is so verbose it’s close to being unreadable by the human brain. JSON is better, but suffers from being too tied down to JavaScript, preventing you to (among other things) repeating the same key twice in the same scope. In addition, its syntax doesn’t make it easy to read, without providing tons of formatting to it. In its condensed syntax, JSON is also unreadable by the human brain.

YAML is really good. However, even YAML’s condensed syntax, is too much syntax. Besides, we need a simpler way to declare types. So I invented Hyperlambda. Yup, Hyperlambda is actually just a file format. And although its intrinsically tied to Phosphorus Five, there’s nothing preventing you from simply using it as a file format. Implementing your own parser to parse it is also dead simple – Assuming you don’t want to use my existing (Open Sauce) parser, which you can easily do, without using the rest of Phosphorus Five in fact. In fact, my existing parser is so simple, I didn’t even care to implement a tokeniser, since the format has only two distinct tokens. I think it’s roughly 1-200 lines of code. Below is an example.


The above illustrates 2 nodes, where the first node has two children. The name is to the left of the colon (:), and its value is to the right. So it’s a “name/value/children” file format. This structure happens to easily be able to describe anything that JSON, XML and JSON is capable of describing, only in a much more human readable format. In fact, it’s also a superior way to describe CSV content, since it also supports C# string literals. Below is an example.

foo:"This is a\r\nnew line"

In the above example, we have injected a CR/LF sequence,  allowing us to provide special characters, and even UNICODE literals, the same way we would in a C# string. It also supports multiline C# strings, such as the following illustrates.

foo:@"This is a
new line"

The above of course results in the exact same result as the previous example. And to make x-platform simpler, it *always* serialises a carriage return as a CR+LF sequence. Below is an example of creating a “CSV file”, using Hyperlambda syntax instead.

  name:Thomas Hansen
  name:John Doe

Slightly more verbose, but much more readable. And in fact, it also supports types. Below is an example that illustrates usage of types.

  name:Thomas Hansen
  name:John Doe

Notice the additional entity in between the “age” and its value, declaring the RHS value of “age” to be of type “int” ==> integer. If you’re looking for a simple to implement, and easy to read file format, for storing for instance your configuration settings, or other types of data – You might want to have a look at Hyperlambda. And in fact, you can use my existing parser, at which point you can simply invoke an Active Event, and have my parser do the heavy lifting, having returned a “Node” structure back to caller, that you can easily semantically traverse, almost the same way you’d traverse your XML DOM structure. Below is an example of invoking the Active Event that parses a Hyperlambda string for you.

var node = new Node ("", "your-hyperlambda-goes-here");
var nodeResult = someApplicationContextObject.RaiseEvent("hyper2lambda", node);

The above would make your “nodeResult” contain the nodes from your Hyperlambda, having tons of supporting methods and properties, such as “LastChild”, subscript operator to retrieve children nodes, etc, etc, etc. And in fact, it even allows you to comment your nodes, using C#/Java comments if you wish. Below is an example …

 * This is a record.
  // This is the name of the record.
  name:Thomas Hansen
  name:John Doe

3 days coding challenge – Creating MySQL Admin for ASP.NET

I love MySQL. As to MySQL Workbench and PHPMyAdmin; “no comments” would be my answer. First of all, about 50% of my HTTP requests in my Apache log files on my Linux box, are attempts to exploit holes in PHPMyAdmin. Secondly, I resized the output window of MySQL Workbench “out of existence” about 3 months ago, and I still haven’t been able to figure out how to fix it. So obviously, a good and secure MySQL management tool, allowing you to administrate your databases, preferably over the web, is an area within our profession that could definitely need some “help”. So I spent 3 days implementing a MySQL admin tool for ASP.NET.

Hyper SQL features SQL syntax HighLighting and AutoCompletion. It features the ability to create charts from your datasets (pie charts and column charts). It allows you to load and save SQL snippets for later references, and it’s extremely secure! However, more important I think, is the fact that I conceptualised it, implemented it, and deployed in its initial stable release in 3 days. Watch a video demonstrating it below.

One of my reasons was that a good friend of mine told me I needed to create a “complete system” to showcase what a developer could actually do using Phosphorus Five. This would provide a valuable use-case to attract developers to my platform. Well, I think the proof is literally in the pudding.

Download Phosphorus Five here

Hyperlambda, a scripting language for .Net and C#

Imagine if you could dynamically “orchestrate” your C# plugins and libraries together in a dynamic environment. What would this do for you? Kind of like a “FoxPro plugin” for C#? Something that would allow you to keep all the advantages of C#, yet still have a dynamic scripting language at your disposal?

Well, you don’t have to wait. This is the purpose of Hyperlambda. I wrote an article about Hyperlambda in MSDN Magazine last year, and it actually became one of the top 5 most read articles in the Magazine’s history – So obviously this is something C# developers were waiting for.

The thing about Hyperlambda, is that it allows you to dynamically “mold” CLR assemblies, classes, and methods together, by injecting Yet Another Layer Of Abstraction (YALOA) in between your C# code, and the parts that “configures” your apps together. In a way, it allows you to “configure” your apps, with a syntax resembling that of YAML. So you get to keep all the advantages of C#, including those 10,000 + Open Source .Net libraries at GitHub – Yet still having all the advantages of a dynamic environment, such as PHP or JavaScript, allowing you to orchestrate your apps together, in a dynamic “scripting” environment. Hyperlambda is not intended to replace C#, quite the contrary – It lives in symbiosis with C#, although I tend to use some strong superlatives about OOP every now and then … 😉

In fact, Hyperlambda serves as a bridge; A bridge between the client and the server, a bridge between your C# code and your app, and a bridge between a statically compiled programming language (C#), and the dynamic environment of JavaScript. It becomes the equivalent of the “grease in your car engine”, that allows all of your car’s parts to function smoothly, without things getting stuck to each other, destroying your car.

A month from now, I will get the opportunity to illustrate exactly what this can do, and its benefits. Simply because a month from now, I will enter in front of a live audience, and “compete” with a static and traditional programming language called Lily, and such hopefully illustrate just how much of an advantage having a little bit of “grease” in your car’s engine actually can give you.

If you’d like to be notified, feel free to subscribe to my blog. The event will be properly marketed, and I will announce it here on my blog when we have a date – At which point you can see me compete with a “traditional OOP (only) solution”. In this competition, both of us will be given the same specification, and asked to solve it as fast as possible. The winner is the first guy to finish. If you can’t wait another month, please realise that the following web based IDE was exclusively built using Hyperlambda. Not a single line of C# code was written to create it …

Hyper IDE contains 2429 lines of code, it was built in roughly 2-3 months, by one guy (me), and it contains 649 comments. Its initial page load bandwidth consumption is roughly 100Kb, and it loads on my phone. Hyper IDE supports some 100+ programming language, and I will obviously exclusively use Hyper IDE in the competition, if I can …

I wish my opponent good luck, and may the best man win … 😉

The showdown between OOP and FP

For those who still don’t know, some guy over at Reddit said “Hyperlambda is an amalgamation of buzzwords and paradigms”. I am the creator of Hyperlambda, and the guy who said this is the creator of Lily. I defended Hyperlambda, and as the debate became a little bit “heated up”, the moderators of the sub-reddit “Shitty Programming” contacted both of us, and suggested a “code off” to settle the dispute. Kind of like a “duel” between me and the guy behind Lily. The kind you’d see in the wild west, were two people stand in front of each other, each with their own pistols, where only one guy is leaving alive.

The event will be streamed live, and both me and my opponent will be given a specification, and expected to solve it. The one who solves it fastest is the winner. The loser will be permanently banned from the group Shitty Programming. The winner will have his programming language advocated by the moderator at the sub-reddit. So obviously, the stakes couldn’t possibly be higher … 😉

My opponent is highly skilled. He has single handedly implemented a programming language, with generic support, (single) inheritance OOP, +++. One of its interesting traits, is its ability to “inject” the results of Lily code, directly into HTML. Kind of like “document.write” from JavaScript works, or “echo” from PHP. I suspect this is the technique he will be largely using, and such create an architecture resembling a thing you’d normally create with PHP or C#. However, I am prepared, regardless of his weapon of choice. In fact, I have explicitly informed him that he is allowed to use any programming language, library, or framework he wants to use as far as I am concerned. But I believe he’ll use Lily for obvious reasons …

Lily to a large extent resembles C# or Java. My language is (arguably, although not 100% technically correct) a Functional Programming language. So in a way, this is to some extent the showdown between FP and OOP. I don’t intend to use any “echo constructs”, unless I have to – But rather use Managed Ajax, Active Events and Hyperlambda. And there probably won’t be created as much as a single “class” in my solution, if I can get away with it. Zero inheritance, zero OOP, zero interfaces, zero generics!

In fact, I don’t intend to follow as much as ONE SINGLE “BEST PRACTICE” IN REGARDS TO SYSTEM DEVELOPMENT!

I’ll basically break every single “best practice” that ever existed in system development, and I still believe I’ll create more readable and maintainable code, that is more flexible and reusable, and much more modularised than his solution. Just to throw in some bonus, I’ll even create documentation for my code before I consider myself to be “done”.

I will if possible, exclusively use the main Source Code download of Phosphorus Five, and not add as much as a single library or support function from a 3rd party library or toolkit, unless I have to of course. When I am done, you can see the project’s website at GitHub and download my solution, and install it on your own Phosphorus Five server in seconds. I will consciously “freeze” its code at GitHub, such that it forever will be an exact mirror of what it was at “fight night”.

The event will be streamed live, and the moderator over at ShittyProgramming has promised us a fair competition. Any profits will be given to charity. We still haven’t decided upon a date – However, if you’re interested in following the event, you can subscribe to my blog, since I will publish the date and time immediately once I have it. At which point you can watch the event live if you wish.

The World Heavy Weight Programming Championship contest is GOING DOWN!

FascinatedBox has accepted the terms put forth by one of the moderators over at ShittyProgramming, and Cal (moderator) is as we speak trying to find a date for the event. This implies that in the near future, you will see a shake-down between Lily and Hyperlambda, where we will be given a specification for a software system, which we are to implement. None of us will have seen the specification before entering “the ring”, and the idea is to implement it faster. The one who finishes first, becomes the winner, and the loser is banned from the Reddit group called “shitty programming”.

The event will be streamed live, and I will publish the date, time and the URL, from where you can follow the event *live*, once I have it. Any profits from the contest will be given to charity.

May the best man win!

OK, let’s DO this!

Some guy posted a link to Phosphorus Five and Hyperlambda over at Reddit, in a group called “shitty programming”, implying Phosphorus Five was rubbish. Normally I wouldn’t care about it, if it hadn’t been for the fact that this guy has created his own programming language. As I defended myself and Hyperlambda, I arguably became a little bit “emotional”, so the moderators over at this group, decided to solve the problem. However, instead of banning both of us, which is what they usually do – They have decided to organise a “boxing match” between me an the guy behind the other language. Read their invitation to me below …

I’m game, and I’ll invite all of my friends to watch, and I’ll try to get some media attention around this, inviting Channel 9, MSDN Magazine, and others to stream it live, internationally! The loser will be banned from posting at the group in the future – Implying the winner will basically have “monopoly” on talking shit about the other guy’s programming language on Reddit in the future. I wish “FascinatedBox” good luck.

May the best man win!

Creating a web based IDE

Hyper IDE is an Integrated Development Environment. It consists of 64 Hyperlambda files,  2429 lines of code, in addition to 649 comments. As a bonus, it contains 6 Markdown files, which serves as its entire documentation. Please take some time to diggest these numbers. Then realise that there are DateTimePickers on GitHub having twice as many lines of code as Hyper IDE. A DateTimePicker allows you to, well, “pick dates” – Hyper IDE is a *complete web based IDE*.

How did I find the above numbers you may ask? Well, the meta system of Hyperlambda allows me to automatically extract this type of information from Hyperlambda modules. Check out a screenshot below to understand what I mean.

The meta system (think reflection) also allows me to intelligently extract comments from my source code files, transform these comments to HTML from their Markdown representation, and display these as the documentation for my Active Events (think functions) and source code files. So when I am done coding, I am also largely done with the documentation. Which probably explains why the complete help system for Hyper IDE contains no more than 6 files. As I am browsing the help files for Hyper IDE, I can immediately edit its Active Events, and/or its files – Using Hyper IDE itself paradoxically as my editor. This is because every “function”, when you read its reference documentation, is aware of which file it was declared in, and which major comment it should use as its reference documentation. An example screenshot can be seen below.

Yet again, the above documentation was automatically generated from the source code files, without me having to do anything. If I click on the above “…/launch.hl” file for instance, the file opens immediately in my Hyper IDE editor, as a tab view, and I can start editing the file. At which point I have Syntax HighLighting, AutoComplete, and everything you can imagine from an IDE. To open up the AutoCompleter you can click CTRL+SPACE (CMD+SPACE on an OS X machine). Below is a screenshot.

I also have true AutoCompletion for JavaScript, CSS, HTML and XML files. In addition to “anyword” AutoCompletion for 100 additional programming languages. Editing multiple files at the same time, in separate tab views, is also implemented of course (duuh…!)

Hyper IDE has a rich plugin architecture. Out of the box, it contains 15 plugins, ranging from minifying and beautifying CSS and JavaScript – To a wizard form that allows me to create a new CSS skin, or an AngularJS module for that matter. Creating new plugins, without modifying the source code of the project itself, is as easy as creating a simple Active Event. Below is a plugin that will only be loaded if your currently edited file is an HTML file.

 * Creates our bubble window HTML plugin.
      innerValue:@"<span class=""icon-question""></span>"
      title:Shows an information window
         * Displays an information "bubble" window.
         */ is an HTML file!

Whether or not the plugin is loaded, is decided from its name. Since the name of the above plugin is [], it will be loaded every time an HTML file is opened. If I had called it [], it would only load for Hyperlambda files. I can create any plugin I want to, for any language I wish, including Python or Brain**** for that matter! Yes, Hyper IDE supports Brain****!

Hyper IDE allows me to zip any folder on my server, and download it to my client. It also allows me to download individual files. In addition, it allows me to upload files from my hard drive, and unzip zip files directly on the server. It allows me to evaluate Hyperlambda files, in addition to bash scripts, allowing me to integrate with stuff such as Git or compiler services. Below is an example of how I checkin my changes to GitHub.

And I am still not done! In fact, if I were to tell you about all of its features, I’d arguably have to spend almost as much time as I did implementing these features. However, one nice little detail, I think myself, is that I can actually instantiate Hyper IDE as a “plugin”, loading it on any page I want to load it on, for any reason I would want to do such a thing. Below is a screenshot where I load Hyper IDE from my desktop, by clicking a button in one of my help files. This will load Hyper IDE inside a modal window – Without an iframes or other “sub optimal” technologies – And allow me to use Hyper IDE from any other module I need access to it.

Forgive me for saying this, but being able to do all of the above, with only 2429 lines of code, is actually quite unbelievable! As I said initially, I can show you DateTimePickers, and AngularJS tutorials for that matter, with more lines of code than that which created Hyper IDE. And that’s my point.

Hyper IDE, and Hyperlambda, the language that built it, is pretty “Hyper” to say the least …

Do you think I’m joking? Sorry buddy, there’s no joke coming. If you don’t believe me, feel free to download it yourself, or watch the following video where I demonstrate some of Hyper IDE’s features.

Ohh yeah, I almost forgot – It works from your Phone and your Tablet, and it’s Open Sauce – And you can set it up on a Linux Laptop in 5 minutes, having access to your own secure web based IDE, on your phone, from anywhere you are in this world … 😀

Get Hyper Today!

How to implement GDPR

GDPR means General Data Protection Regulation, and is a EU directive, that as of from the 25th of May 2018, will highly likely wreck havoc with your organisation. It is likely that most of your current software doesn’t comply in accordance to its rules – And yes, I am referring to that piece of code, that was written a decade ago, by a guy who has since quit, and nobody understands how to maintain.

It opens up for class act lawsuits for privacy breaches, and sets standards towards data storage, that most system developers don’t even understand, and that was never implemented in your original application. An example is how it requires you to store sensitive data as a (cryptographic?) hash key, instead of as plain text. Ask your dev guys if he has done that. Unless his knee jerk reaction is “of course”, while smiling from ear to ear – You have a problem!

It focuses on the right to be anonymised in your data, and requires the application to have been “securely implemented”. It gives any user in your dataset the legal right to demand that you send him or her all the data you have on him or her, and that you as soon as possible (1 month), is able to delete *everything* you know about him or her. It explicitly blames YOU, unless you have taken steps to make sure you comply by its rules. This is true for both the software owner, and the sub-contractor you hired a decade ago. For privacy, it’s Heaven on Earth in Europe. For companies with legacy apps, it’s arguably Armageddon.

Some of its articles ties directly into how your original code was written, and demands that it implements security measures to prevent data breaches. For instance, are you storing your passwords as salted hash keys? Are you providing brute force password hacking protection? Is your data transferred over a securely encrypted connection? Questions such as these, if you can’t give the right answer, might make your company the subject of class act lawsuits, by millions of EU citizens, as of from the 25th of May 2018. Now for the record, it doesn’t explicitly mention things such as server-side salted hashed passwords, but a good lawyer might argue that this is a “common best practice security thing to do”. And if you haven’t followed all the “common best practices” in regards to security, you can be liable for having to pay fines, with a VERY large amount of digits. In such a regard, for an actual lawsuit, what is probably most interesting, is its “gray areas”, where it doesn’t explicitly speak about a specific point, but is a place where a good lawyer might argue “it is obviously within the boundaries of the GDPR’s intentions”. Trying to explain a judge what a server-side salted hashed password is, is the equivalent of trying to make a chicken understand quantum mechanics. Believe me, I should know … 😉

If you haven’t implemented every single “best practice” in regards to security – Oops! John Doe just struck a straw into your company, zipping up a couple of millions from your shareholder’s bank accounts …

When you’re in court, what’s important, is what the contract does NOT explicitly talk about – But rather what it “vaguely insinuates”. This is where the Devil hides …


If you’re not panicking now, I haven’t done my job. Simply because “only the paranoid survives”, and a pre-requisite for becoming paranoid, is to go into complete and utter panic first! However, there exists redemption. Now of course, if you’re a fortune 500 company, you probably have an army of lawyers and developers, who have already been working with GDPR for years already. If you’re not a fortune 500 company though, you probably can’t afford an army. Luckily, there are dozens of experts in different fields related to GDPR that are here to help you. People who care about privacy, and people working with extreme security measures (me for instance) – While also seeing the glass as half full, and wanting to help companies to actually comply. Do a quick search for GDPR consultants in your area, or contact a company with expertise in privacy and security. Or send mean email, requesting help from me, if you have no idea where to start. I happen to have the tools and the knowhow necessary to help you, if you don’t know about anybody else from before. I also know security experts and legal experts from all around the world, including EU lawyers in Greece, security experts from South Africa and Norway-  And I can help you get in contact with a guy matching your needs, in your local area.

“Only the paranoid will survive” – Andrew S. Grove,  CEO at Intel

Peace out, and take a deep breath, it will be OK. As long as you take this seriously first though. The first step to comply, is to remember that Security is King! And ask for help. You will need it!

Creating a CRUD web app in a couple of minutes

About a week ago I released a new version of Phosphorus Five. One thing I have been working a lot with for this release, is Camphora Five, which is a “Code Builder”, that allows you to “generate” CRUD apps, by simply declaring what types of fields you want. One thing that sets this CRUD app generator apart from most other CRUD app generators,  is the ability to create alternative “views”, to display among other things statistical charts on your data.

Now combining the CRUD app generator with the other tools in Phosphorus Five, such as Hyper IDE, which is a fully fledged web based IDE – Allows me to do some pretty amazing things with my app. Basically, I can create a rich and highly complex web app, with statistical charts, import data from for instance Excel or any other system that supports CSV files, and deploy my web app into production – All of this in a couple of minutes. I have created a YouTube video series where I demonstrate creating a simple “sales app”, where I do this, from initial idea, to deploying the web app into production – And the entire length of the series is less than 10 minutes.

Some of the things I still haven’t created support for though, is “linked tables”, and the ability to perform joins on tables. The latter you can probably fix yourself by for instance creating a view in your MySQL database. The former requires having to do some coding in Hyperlambda, to modify the datagrid that is automatically generated. However, in future releases, I will try to implement support also for “linked tables” (foreign keys).

However, if all you need is a simple CRUD app, wrapping a single table, with some statistical views on your data – You can do this in the latest release of Phosphorus Five.