<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Helight on Medium]]></title>
        <description><![CDATA[Stories by Helight on Medium]]></description>
        <link>https://medium.com/@helight?source=rss-9e394dc744d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NZcZ_k1e7BmciKvHMB_x2g.png</url>
            <title>Stories by Helight on Medium</title>
            <link>https://medium.com/@helight?source=rss-9e394dc744d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:13:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@helight/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting up Unity3D on openSUSE]]></title>
            <link>https://helight.medium.com/setting-up-unity3d-on-opensuse-bc97a03b3252?source=rss-9e394dc744d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc97a03b3252</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[opensuse-tumbleweed]]></category>
            <category><![CDATA[opensuse]]></category>
            <category><![CDATA[unity3d]]></category>
            <dc:creator><![CDATA[Helight]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 10:14:45 GMT</pubDate>
            <atom:updated>2026-03-30T10:14:45.648Z</atom:updated>
            <content:encoded><![CDATA[<p>While setting up the unity editor on common Debian based systems is fairly trivial ignoring some minor quirks with Linux compatibility, setting it up on openSUSE Tumbleweed has been a little bit less straight forward and requires a few workarround steps to get it properly working.</p><p>I initally tried running the editor using a Flathub unity package but faced the usual issues you get from running the program in a sandbox, primarily having user binaries like /usr/bin/gh not passed through as well as some minor styling issues that stem from my desktop setup. In the end, I decided it would be easier to just install it directly on the host and that’s what I ended up doing.</p><h3>Installing Unity Hub</h3><p>Even though it took me a while to find it because I read over it <a href="https://docs.unity.com/en-us/hub/install-hub-linux">in the docs</a>, Unity does offer a rpm package primarily targeted at RHEL and CentOS. That isn’t a problem for me though and it already means we don’t need to convert deb packages. Converting the repository setup to zypper results in</p><pre>sudo zypper addrepo -f https://hub.unity3d.com/linux/repos/rpm/stable unityhub </pre><p>After that we can install the unity hub with</p><pre>sudo zypper install unityhub</pre><p>This will usually suffice to get the unity hub running in my experience, but if you haven’t installed 7zip already, you should do that since seemingly unity uses it to unpackage editor installations.</p><h3>Getting the Editor Running</h3><p>Initially, opening the editor failed because it was missing a few libraries it needs to run, primarily libxml2–2. Because this versioned library is not present in any of the official repos, I installed it from a home repository I deemed <em>trustworthy</em> (home.alvistack) using</p><pre>sudo opi libxml2-2 </pre><p>Of course you can also create an account for the Open Build Infrastructure and fork / reference the package into your own home repository if you prefer that.</p><p>Additionally you might need to install libopenssl1_1, which you can install from the KDE3 repository with</p><pre>sudo opi libopenssl1_1</pre><p>After that the editor should be starting without many issues and should generally work, but you might notice that web requests to unity services are failing. This is because unity hard references the certificate paths for debian based systems. To fix this, you can simply create a symlink</p><pre>sudo mkdir -p /etc/ssl/certs<br>sudo ln -s /etc/ssl/ca-bundle.pem /etc/ssl/certs/ca-certificates.crt</pre><p>The modification of the file endings isn’t really an issue since both are in the pem format anyways. After this — at least for me — everything was working how I would expect it to work.</p><h3>Issues with Dropdowns</h3><p>Initially I also faced issues with Dropdowns not opening properly and being extremly slow, this was mostly likely because of <a href="https://discussions.unity.com/t/in-120713-context-menus-open-very-slowly/1690076/40">the bug mentioned here in the Unity Discussions</a>, which also references a bugfix in gtk3 that came out just a few days prior to me starting the installation. Seeing how recent the bugfix was I just updated my distribution (zypper dup) which pulled the fixed version and actually fixed the issue, after that I just accepted that it was likely this gtk bug and moved on.</p><h3>Closing Remarks</h3><p>Even though I didn’t face any additional issues yet, in the case I would I’d probably look first at the <a href="https://wiki.archlinux.org/title/Unity3D">arch wikipage for Unity3D</a>, as a lot of things mentioned there may also be adapted to openSUSE or at least present a good starting point. Also unity has <a href="https://docs.unity3d.com/6000.3/Documentation/Manual/linux-editor-troubleshooting.html">a small section in their editor docs for linux editor issues</a> that doesn’t seem to get updated often, but it may be still worth a visit should you face any issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc97a03b3252" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Benchmarking Dart’s json serialization and dataclass ecosystem]]></title>
            <link>https://helight.medium.com/benchmarking-darts-json-serialization-and-dataclass-ecosystem-a49969861d08?source=rss-9e394dc744d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a49969861d08</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Helight]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 09:31:21 GMT</pubDate>
            <atom:updated>2024-01-21T09:31:21.542Z</atom:updated>
            <content:encoded><![CDATA[<p>Being the author of <a href="https://pub.dev/packages/dogs_core">a serialization framework</a> myself, I have always been comparing my package’s performance to other packages it is competing with. Recently, I expanded packages tested by the benchmark project, to include most of the commonly used serialization packages and dataclass generators.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eSwzaBNUxPp3pGeekMYfxg.png" /></figure><h3>Legend</h3><p>dogs: dogs_core<br>json_ser: json_serializable<br>built: built_value<br>mappable: dart_mappable<br>d_j_m: dart_json_mapper</p><h3>Excluded</h3><p>This excludes packages with their own serialization system, since they are hard to compare.</p><h3>Conclusion</h3><p>While most of the popular packages like freezed, json_serializable and built_value (and dogs_core) generally perform similar on serialization benchmarks, dart_mappable and most importantly dart_json_mapper lack behind massively, being 2x and 20x slower than their alternatives.</p><p>Looking at equality implementations, equatable and dart_mappable perform worse than their competitors, with dart_mappable being by far the slowest solution.</p><p>While those benchmarks are interesting, their practical meaningfulness may vary with different data structures and the use-cases. The performance impact on Flutter applications is relatively low, as most time is probably spent on rendering, rather than serialization. Though when choosing a serialization framework for dart backends or applications with high serialization workloads, you may want to choose on of the more performant packages, like built_value, json_serializable, freezed or dogs_core.</p><h4><a href="https://github.com/helightdev/dogs/tree/main/benchmarks">Source</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a49969861d08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Competitive Kotlin: Codesize]]></title>
            <link>https://helight.medium.com/competitive-kotlin-codesize-5b26d254fe8d?source=rss-9e394dc744d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b26d254fe8d</guid>
            <category><![CDATA[competitve-programming]]></category>
            <category><![CDATA[codingame]]></category>
            <category><![CDATA[competitive-coding]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[minify]]></category>
            <dc:creator><![CDATA[Helight]]></dc:creator>
            <pubDate>Fri, 18 Mar 2022 16:39:58 GMT</pubDate>
            <atom:updated>2022-03-18T16:39:58.708Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3ox3to7q9dNmsian" /><figcaption>Photo by <a href="https://unsplash.com/@mreichelt?utm_source=medium&amp;utm_medium=referral">Marc Reichelt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Kotlin is a great language with an even better standard library. Especially the collection and data conversion utilities are really helpful when trying to solve a problem as fast a possible, but when you have a task like <a href="https://www.codingame.com/">CodinGame</a>’s Clash of Code: Shortest category, you are mostly better off with not using Kotlin.</p><pre><em>import </em>java.util.*<br><em>import </em>kotlin.math.*<br><em>fun </em>main(){}</pre><p>This simple application base alone occupies 52 chars, including newlines. In JS, you won’t have any of this, since both imports are part of the core library and main methods are not strictly required, making your code size smaller by nature.</p><blockquote>Comparing code sizes language independently is generally flawed and unfair if you want to treat them equally.</blockquote><p>If you still want use Kotlin for this type of competition because your just more comfortable with it or you are compared on a per-language level: Here are some tips for you.</p><h3>Basics in Minifications</h3><pre><em>import </em>java.util.*<br><em>import </em>java.io.*<br><em>import </em>java.math.*</pre><pre><em>/**<br> * Auto-generated code below aims at helping you parse<br> * the standard input according to the problem statement.<br> **/<br>fun </em>main(args : Array&lt;String&gt;) {<br>    <em>val </em>input = Scanner(System.<em>`in`</em>)<br>}</pre><p>This is the the boilerplate with which you start any CodingGame problem, excluding the problem specific Scanner reads. The simplest and most basic solution to minify this code is to <strong>replace the Scanner declaration with an ‘with’</strong> and <strong>remove comments, empty lines and idents </strong>as well as the<strong> args parameter </strong>and the<strong> java.io.* import</strong> since you mostly likely won’t need it<strong>.</strong></p><blockquote>Generally try to remove anything which clarifies something.<br> Throw all your good patterns over board!</blockquote><p>Applying those rules results in following boilerplate code:</p><pre><em>import </em>java.util.*<br><em>import </em>java.math.*<br><em>fun </em>main()=with(Scanner(System.<em>`in`</em>)){}</pre><h3>Variables</h3><p>If you have any variable assignments, you can safely <strong>remove the spaces before and after the equal sign</strong>. Also consider replacing long variable names with simple <strong>single character names</strong>. The naming conventions you use for those single char variables is totally up to you. I personally have my own system I use for naming short variables as fast as possible while still giving them some meaning:</p><p>[a-h, t-w, o] <em>General use variables</em><br>[i-k, r]<em> Loop variables and indices</em><br>[l] <em>(Single) List</em><br>[m] <em>(Single) Map</em><br>[n,s] <em>(Single) Length, Size value (I.e. “Get everything from X until n”)</em><br>[x-z] <em>Temporary variables inside loops</em><br>[A-Z] <em>Task specific variables/input</em></p><pre><em>// 20 chars<br>val </em>test = nextInt()</pre><pre><em>// 15 chars<br>val </em>t=nextInt()</pre><p>As you can see, even though you can reduce the size of variable declarations, the still require a delimiting semicolon or newline as well as whitespace between val/var and the variable name. The simplest variable assignment will in the end take up at least 7 chars, so try to <strong>avoid unnecessary variables</strong> where possible.</p><h3>Arrays, Lists and Sets</h3><p>Reading a fixed or length prepended array is a common part of many solutions and can, in its lengthy form look something like this:</p><pre><em>// 66 chars<br>val </em>l=<em>mutableListOf</em>&lt;Int&gt;()<br><em>for</em>(i <em>in </em>0 <em>until </em>t){<br>l.add(nextInt())<br>}</pre><pre>// 26 chars <br>(0 <em>until </em>t).<em>map</em>{nextInt()}</pre><pre>// 18 chars<br>List(t){nextInt()}</pre><p>Obviously this can be reduced simply by using map{} on the range, reducing it from 66 chars to 26 chars. But there is an even simpler solution: Using the initial size list constructor and its value initializer further reduces you code size to 18 chars.</p><h3>Harness the stdlib</h3><p>When trying to minimize the main part of your solution, refer to the possible solutions already mentioned and <strong>use <em>stdlib</em> extension functions</strong> where possible, since they are mostly the shortest option.</p><pre>// 142 chars<br>import java.util.*<br>fun main()=<em>with</em>(Scanner(System.<em>`in`</em>))<strong>{</strong>var x = 0<br>for (i in 0 <em>until </em>nextLine().<em>toInt</em>()){<br>x+=nextLine().<em>count</em>()<br>}<br><em>println</em>(x)<br><strong>}</strong></pre><pre>// 117 chars<br>import java.util.*<br>fun main()=<em>with</em>(Scanner(System.<em>`in`</em>))<strong>{</strong><em>println</em>(<em>List</em>(nextLine().<em>toInt</em>())<strong>{</strong>nextLine().<em>count</em>()<strong>}</strong>.<em>sum</em>())<strong>}</strong></pre><p>Here for example we calculate the length sum for N string via two methods. The first method uses a normal<em> for loop</em> and a c<em>ounter variable x</em> and the other approach uses the list initializer and the sum extension. As you can see, even though the first solution is also minified, it still gets beaten by the second solution by 25 chars, which is a lot for such a simple task.</p><h3>Conclusion</h3><p>Kotlin is not optimal for creating the shortest (and most unreadable) code. Ruby, Perl do that way better and even most Scripting Languages like Python and JS are generally shorter. But as you can see, you can still minify your Kotlin code a lot to potentially win against other Kotlin or Java, C++ and C# users. And it really helps you learn more of the language and especially the stdlib.</p><p>I’m probably going to do some follow ups for this rich topic so stay tuned.</p><h3>Further Reading</h3><ul><li><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/">kotlin.collections - Kotlin Programming Language</a></li><li><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/">kotlin.text - Kotlin Programming Language</a></li><li><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/">kotlin.math - Kotlin Programming Language</a></li><li><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.ranges/">kotlin.ranges - Kotlin Programming Language</a></li><li><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.comparisons/">kotlin.comparisons - Kotlin Programming Language</a></li></ul><h3>Reference</h3><ul><li><a href="https://www.codingame.com/">Coding Games and Programming Challenges to Code Better</a></li><li><a href="https://www.codingame.com/multiplayer/clashofcode">Practice your coding skills on short coding contests - Clash of Code</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b26d254fe8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>