I fixed all my Dart programs and they will all be on sunamo.cz

Absolutely all (8) of my Dart programs are there now and they should all work; I fixed, tested and improved some of them 🙂 Their new home is 👻 The server has been sent to a retirement home for domains.. Some pages can be viewed on a phone, but others can only run on a PC (for example because a phone does not have a three-button mouse, which is needed for Ants). I will no longer put the original *.dart files on the web; anyone who wants to see them can take a look at my GitHub , where you can easily recognize the Dart programs because their names start with “Dart“.

Related to this, some space has freed up on the home page www.sunamo.cz/ , where I now show a list of the 4 latest posts from my blog blog.sunamo.cz 🙂 There was a bit of a problem with it. I load it in C#, so it slows down page loading because it is synchronous, but only by a few tens of ms. The problem was that I first tried to load it as text, but it came out in the wrong encoding. Then I tried bytes, but I was told that the Stream does not support Seek. So I loaded it as a stream and read the data with a StreamReader, which can correctly detect which encoding is used.

Uploading Dart programs to the hosting To make my work easier, not only now but also in the future, I wrote a small C# console program. Originally I also wanted to use it for compiling with dart2js, but then I realized it would keep compiling programs over and over that had not changed, or that I do not want to compile because they are not ready yet. So it only moves the files from the slozka_dart_programu/build/web folder to slozka_meho_webu/build/nazev_dart_app – of course, before that it deletes the target folder so that no file is left behind that no longer exists in the new build.

At the end it prints how many programs were found / moved. The program reads the paths where the Dart programs are and where you want them copied – you have to enter them yourself, but the program creates a clean file for you and you just paste the paths into it.

Categories

Leave a Reply