<?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 Surfen An on Medium]]></title>
        <description><![CDATA[Stories by Surfen An on Medium]]></description>
        <link>https://medium.com/@ansurfen?source=rss-177527e81589------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wplrCyEtKHTxaq2v9iPToA.jpeg</url>
            <title>Stories by Surfen An on Medium</title>
            <link>https://medium.com/@ansurfen?source=rss-177527e81589------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:37:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ansurfen/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[After a Week of Work, My Programming Language Hulo Adds Bash Transpiler and Package Management Tool]]></title>
            <link>https://medium.com/@ansurfen/after-a-week-of-work-my-programming-language-hulo-adds-bash-transpiler-and-package-management-tool-47e39e964ad3?source=rss-177527e81589------2</link>
            <guid isPermaLink="false">https://medium.com/p/47e39e964ad3</guid>
            <category><![CDATA[package]]></category>
            <category><![CDATA[compilers]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Surfen An]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 08:04:24 GMT</pubDate>
            <atom:updated>2025-07-26T08:05:13.985Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey, script developers!</p><p>Remember that modern programming language Hulo I introduced last week that can compile to VBScript? This week it has major updates!</p><h3>🚀 This Week’s Major Updates</h3><h3>1. Bash Transpiler Officially Launched!</h3><p>Yes, you read that right! Hulo now supports not only VBScript but also Bash!</p><p>This means you can use the same modern syntax to generate scripts for both Windows and Linux/macOS:</p><pre>// main.hl<br>class User {<br>    pub name: str<br>    pub age: num<br>    pub fn to_str() -&gt; str {<br>        return &quot;User(name: $name, age: $age)&quot;<br>    }<br>    pub fn greet(other: str) {<br>        MsgBox &quot;Hello, $other! I&#39;m $name.&quot;<br>    }<br>}<br><br>let u = User(&quot;John&quot;, 20)<br>MsgBox $u.to_str();<br>$u.greet(&quot;Jane&quot;);</pre><p>Execute the hulo main.hl command in the working directory where the file is located to get two transpiled files (of course, the Hulo command also supports other features and reads configuration from huloc.yaml, which I won&#39;t list here one by one - you can check with hulo -h or consult the official documentation).</p><p><strong>Generated Bash code:</strong></p><pre>#!/bin/bash<br>function create_user() {<br>  local name=$1<br>  local age=$2<br>  declare -A user<br>  user[&quot;name&quot;]=$name<br>  user[&quot;age&quot;]=$age<br>  echo &quot;$(declare -p user)&quot;<br>}<br>function user_to_str() {<br>  eval &quot;declare -A user=${1}&quot;<br>  echo &quot;User(name: $name, age: $age)&quot;<br>}<br>function user_greet() {<br>  eval &quot;declare -A user=${1}&quot;<br>  local other=$2<br>  MsgBox &quot;Hello, $other! I&#39;m $name.&quot;<br>}<br><br>u=$(create_user &quot;John&quot; 20)<br>MsgBox $(user_to_str $u)<br>user_greet $u &quot;Jane&quot;</pre><p><strong>Generated VBScript code:</strong></p><pre>Class User<br>  Public name<br>  Public age<br>  Public Function to_str()<br>    to_str = &quot;User(name: &quot; &amp; name &amp; &quot;, age: &quot; &amp; age &amp; &quot;)&quot;<br>  End Function<br>  Public Function greet(other)<br>    MsgBox(&quot;Hello, &quot; &amp; other &amp; &quot;! I&#39;m &quot; &amp; name &amp; &quot;.&quot;)<br>  End Function<br>End Class<br>Set u = New User<br>u.name = &quot;John&quot;<br>u.age = 20<br>MsgBox(u.to_str())<br>u.greet(&quot;Jane&quot;)</pre><p>So far, everything looks normal, right? Unfortunately, the code on the Bash platform cannot run normally — it will error due to missing MsgBox, because we’re using MsgBox instead of echo in our Hulo code. Therefore, if you want it to run normally, you need to change MsgBox to echo before transpiling. But doesn’t this conflict with Hulo’s cross-platform promotion? Haha, the reason is that syntax sugar like use MsgBox = If&lt;$platform == &quot;vbs&quot;, MsgBox, If&lt;$platform == &quot;powershell&quot;, Write-Host, echo&gt;&gt; hasn&#39;t been completed yet, causing a disconnect where commands can&#39;t be transpiled. Hulo also doesn&#39;t want to force command conversion in the transpiler through hardcoding, which brings a poor development experience. This feature will be implemented in future versions - please give Hulo some time.</p><p>Ps. Hulo calls this feature “command gymnastics.” To implement this feature, Hulo has absorbed all the advantages of TypeScript’s type gymnastics, which means this system will include powerful type utilities like Omit, Pick, Exclude, etc., to form a powerful command system.</p><h3>2. Package Management Tool HLPM is Here!</h3><p>The core functionality of hlpm is to distribute third-party libraries. Since import doesn&#39;t support module resolution yet, although hlpm&#39;s core functionality is already developed, running modules is still not supported. However, you can use it to initialize projects first and write hulo.pkg.yaml and huloc.yaml files to control the project&#39;s compilation process. This is somewhat similar to the role of package.json and tsconfig.json.</p><pre># Initialize new project<br>hlpm init my-script<br><br># Run script<br>hlpm run test<br><br># Run file, equivalent to hulo main.hl<br>hlpm run main.hl</pre><h3>3. Interactive Development Environment Hulo-REPL</h3><p>Added the hulo-repl command:</p><ul><li>[x] Code completion</li><li>[x] Theme settings</li><li>[ ] Real-time lexical analysis and syntax analysis debugging (coming soon)</li><li>[ ] Real-time transpilation (coming soon)</li></ul><pre>PS C:\hulo&gt; hulo-repl<br><br>  Hulo-REPL dev<br><br>  ➜  Type help for commands, exit to quit<br><br>&gt;&gt;&gt; e<br>      else    Else statement<br>      enum    Enum declaration<br>      extend  Extend declaration<br>      exit    Exit the REPL</pre><h3>🔧 Technical Improvements</h3><h3>Refactored VBScript Transpiler</h3><ul><li>Cleaner code structure, easier to maintain</li><li>Fixed the echo &quot;Hello World&quot; string transpilation issue</li></ul><p>This update is a breaking change — some functionality implemented in v0.1.0 may not work in v0.2.0. Especially regarding import, the module design will be closer in the next update.</p><h3>Configuration System Upgrade</h3><ul><li>The hulo command now supports reading configuration from huloc.yaml in the working directory</li><li>More flexible project configuration management</li></ul><h3>🚧 Next Steps</h3><ol><li><strong>Batch Transpilation Support</strong> — Make Hulo more powerful on Windows</li><li><strong>Package Publishing System</strong> — Let the community share and reuse code</li><li><strong>Import System</strong> — Support third-party library imports</li><li><strong>Command Gymnastics</strong> — Smarter code generation</li></ol><h3>💭 Final Words</h3><p>Project repository: <a href="https://github.com/hulo-lang/hulo">https://github.com/hulo-lang/hulo</a></p><p>If you find this project interesting, feel free to open issues on GitHub or join the discussion! Give it a Star to support the project and let more people see it.</p><p>What do you think about this “write once, run on multiple platforms” script development approach? Any suggestions or ideas?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47e39e964ad3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hulo: Write clean, modern code that compiles to VBScript]]></title>
            <link>https://medium.com/@ansurfen/hulo-write-clean-modern-code-that-compiles-to-vbscript-8e3907469600?source=rss-177527e81589------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e3907469600</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[compilers]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[vbs]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Surfen An]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 16:34:25 GMT</pubDate>
            <atom:updated>2025-07-20T16:34:25.430Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey VBScript enthusiasts! 👋</p><p>So I’ve been working on a compiler/transpiler project and wanted to tackle something that could actually be useful. You know what’s the most frustrating thing about VBScript? Writing complex logic with that verbose syntax and limited features!</p><p>That’s when I thought — what if we could write scripts in a clean, modern language and have it compile to VBScript? Enter Hulo!</p><p><strong>What is Hulo?</strong><br>A modern, type safety programming language that transpiles to VBScript, making it much easier to write complex automation scripts for Windows.</p><p><strong>Quick example:</strong></p><p>Simple message box:</p><pre>MsgBox &quot;Hello, World!&quot;</pre><p>Functions with types:</p><pre>fn sayHello(name: str) -&gt; void {<br>    MsgBox &quot;Hello, $name!&quot;<br>}<br><br>fn add(a: num, b: num) =&gt; $a + $b<br><br>sayHello &quot;Hulo&quot;;<br>MsgBox add(5, 3);</pre><p>Classes and objects:</p><pre>class User {<br>    pub name: str<br>    pub age: num<br>    pub fn greet(other: str) {<br>        MsgBox &quot;Hello, $other! I&#39;m $name.&quot;<br>    }<br>}<br><br>let u = User(&quot;John&quot;, 25)<br>$u.greet(&quot;Jane&quot;)</pre><p>Control flow and user input:</p><pre>let n = InputBox(&quot;Input a number:&quot;)<br>if $n &lt; 0 {<br>    MsgBox(&quot;The number is negative.&quot;)<br>} else {<br>    MsgBox(&quot;The number is positive.&quot;)<br>}</pre><p>Lists and loops:</p><pre>let arr: list&lt;num&gt; = [1, 2, 3, 4, 5]<br><br>loop $item in $arr {<br>    MsgBox $item<br>}<br><br>loop $i in [0, 1, 2] {<br>    MsgBox $i<br>}</pre><p>More examples available in the <a href="https://github.com/hulo-lang/hulo/tree/main/examples">examples/</a> directory!</p><p>No more struggling with VBScript’s verbose syntax or limited features — just write clean code and let Hulo handle the VBScript generation!</p><p>Would love to hear your thoughts on this approach. Is this something you’d find useful for your VBScript development? Any feedback or suggestions are welcome!</p><p>Check it out: <a href="https://github.com/hulo-lang/hulo">https://github.com/hulo-lang/hulo</a></p><p>What do you think?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e3907469600" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Chose Astro After Trying VuePress, Hugo, and Hexo]]></title>
            <link>https://medium.com/@ansurfen/why-i-chose-astro-after-trying-vuepress-hugo-and-hexo-93fd3265bad1?source=rss-177527e81589------2</link>
            <guid isPermaLink="false">https://medium.com/p/93fd3265bad1</guid>
            <category><![CDATA[vuepress]]></category>
            <category><![CDATA[hugo]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[hexo]]></category>
            <category><![CDATA[blog]]></category>
            <dc:creator><![CDATA[Surfen An]]></dc:creator>
            <pubDate>Sat, 24 May 2025 16:42:10 GMT</pubDate>
            <atom:updated>2025-05-24T16:42:10.942Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*GBjXYavPElUfBz8ySwk2Bw.png" /></figure><p>I’m about to graduate recently, and I wanted to organize some of my past experiences.<br>So I came up with the idea of building a personal blog.<br>I also want to document the whole process from choosing the framework to deployment, hoping it can help others who are just starting out like me.</p><h3>🛠️ Framework Selection</h3><p>1. VuePress → Better for documentation, weaker blog ecosystem 📄</p><p>2. Hugo → Complex configuration (extended version requires GCC), breaking changes ⚠️</p><p>3. Hexo → Node.js ecosystem friendly, but limited theme selection 🌀</p><p>4. Astro → Final choice! ✨</p><p>For Astro, actual development mainly involves writing TypeScript mixed with Markdown. When styling is needed, you write the CSS yourself and then apply Markdown content to those styled components.</p><p>The tradeoff? What could have been simple Markdown-based blogging now requires writing Astro files to control UI styling for that flexibility. But for non-coding-newbies, the customization payoff seems worth it. I even wrote Vitest unit tests for my blog’s utility functions :).</p><h3>🎢 Development Journey</h3><p>It took me two full days to build a blog I’m somewhat satisfied with.</p><p>Initially I wanted to use VuePress since it’s my usual go-to, but after browsing themes I realized it’s better suited for documentation. Like using a screwdriver to tighten nuts — it works but isn’t ideal.</p><p>Then I discovered Hugo but found configuration troublesome — the themes I liked required the extended version, which needed GCC toolchain installation.</p><p>After finally setting up the environment, I learned Hugo updates often introduce breaking changes without backward compatibility, making my chosen template fail. Game over.</p><p>Next I tried Hexo. Compared to Hugo, its Node.js foundation made development friendlier, but I still couldn’t find any appealing themes after extensive searching.</p><p>After consulting AI, I discovered Astro. After browsing many free blog templates, I finally found one that was acceptable.</p><p>I was excited at first, but the implementation process proved challenging. I initially thought the --- syntax was just sugar coating for &lt;script&gt;, but later realized it&#39;s Astro&#39;s critical marker separating server-side from client-side code. Server code executes at build time, client code runs in browsers.</p><p>The multilingual implementation also felt unintuitive — instead of having all content under en_us/zh_cn directories, the official demo splits languages across content directories. After much compromise, I ended up with a barely acceptable solution.</p><h3>🚀 Deployment Experience</h3><p>GitHub Workflow and Pages provide great convenience for developers, but writing YAML scripts often feels restrictive and awkward.</p><p>To deploy both my blog and metrics generation, I made over 20 commits of trial-and-error adjustments. The final solution involved creating a separate repository for metrics.</p><p>My requirements were somewhat special — I needed to generate GitHub Metrics images and reference them from my blog, with both deployed under the same URL.</p><p>Initially AI generated two YAML files that would overwrite each other when run together. Merging them with filename declarations somehow broke metrics.svg generation.</p><p>Ultimately I had to split the workflows across two repositories. At least the problem got solved.</p><p>😊Thanks to the original template author (Louai Boumediene) for providing this blog template.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93fd3265bad1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>