<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Scripting on queil.net</title>
    <link>https://queil.net/tags/scripting/</link>
    <description>Recent content in Scripting on queil.net</description>
    <generator>Hugo</generator>
    <language>en-uk</language>
    <lastBuildDate>Fri, 09 Oct 2026 13:15:21 +0200</lastBuildDate>
    <atom:link href="https://queil.net/tags/scripting/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Weir: language impossible</title>
      <link>https://queil.net/2026/10/weir/</link>
      <pubDate>Fri, 09 Oct 2026 13:15:21 +0200</pubDate>
      <guid>https://queil.net/2026/10/weir/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TLDR:&lt;/strong&gt; I&amp;rsquo;ve been making an experimental language: &lt;a href=&#34;https://weir.sh&#34;&gt;weir&lt;/a&gt;. Why? I wanted a fast, typed, functional, cross-platform shell scripting language.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;what-is-weir&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#what-is-weir&#34;&gt;What is weir?&lt;span class=&#34;pilcrow&#34;&gt;&amp;nbsp;¶&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Weir is an interpreted, statically-typed functional language with syntax heavily inspired by F# but with the ergonomics of a shell language (see it in the &lt;a href=&#34;https://weir.sh/showcase/&#34;&gt;showcase&lt;/a&gt;). Its main goal is scripting, but it also has a decent interactive mode. Weir is shipped as a single native binary (no runtime to install; on Linux it only needs glibc). It is available on all major platforms. The binary houses the runtime, the checker, the interactive REPL, the canonical formatter, and the LSP server. Additionally, there are &lt;a href=&#34;https://weir.sh/docs/editors/&#34;&gt;integrations&lt;/a&gt; available for a few editors. &lt;a href=&#34;https://weir.sh&#34;&gt;Try it out&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Evaluate Nu for Scripting: can it beat F#?</title>
      <link>https://queil.net/2025/02/evaluate-nu-for-scripting/</link>
      <pubDate>Sun, 16 Feb 2025 12:26:30 +0000</pubDate>
      <guid>https://queil.net/2025/02/evaluate-nu-for-scripting/</guid>
      <description>&lt;p&gt;TLDR: No, nushell as a scripting language is not strict enough for a functional programming zealot. It seems I am not&#xA;the only one waiting for improvements: &lt;a href=&#34;https://github.com/nushell/nushell/issues/11108&#34;&gt;https://github.com/nushell/nushell/issues/11108&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;the-context&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#the-context&#34;&gt;The context&lt;span class=&#34;pilcrow&#34;&gt;&amp;nbsp;¶&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I am far from the mainstream on my scripting habits. I&amp;rsquo;ve been using F# as a language of choice with a number of custom-built tools to improve the experience. It&amp;rsquo;s mostly ok but recently Nushell got my attention. Not really as a shell but as a scripting language. One can sense a strong Rust influence which is no surprise given the shell itself is indeed written in it. I wanted to determine if it could solve my pain points with F# and what the trade-offs would be.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Embedding F# Compiler: Fsc-Host NuGet</title>
      <link>https://queil.net/2021/10/embedding-fsharp-compiler-fsc-host-nuget/</link>
      <pubDate>Sat, 16 Oct 2021 12:12:10 +0100</pubDate>
      <guid>https://queil.net/2021/10/embedding-fsharp-compiler-fsc-host-nuget/</guid>
      <description>&lt;p&gt;I have created a NuGet package that lets you easily use F# scripting in your apps.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;NuGet: &lt;a href=&#34;https://www.nuget.org/packages/Queil.FSharp.FscHost&#34;&gt;https://www.nuget.org/packages/Queil.FSharp.FscHost&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Source: &lt;a href=&#34;https://github.com/queil/fsc-host&#34;&gt;https://github.com/queil/fsc-host&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2 id=&#34;what-is-this-all-about&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#what-is-this-all-about&#34;&gt;What is this all about?&lt;span class=&#34;pilcrow&#34;&gt;&amp;nbsp;¶&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;In two previous posts (&lt;a href=&#34;https://queil.net/2021/05/embedding-fsharp-compiler/&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://queil.net/2021/06/embedding-fsharp-compiler-nuget-references/&#34;&gt;2&lt;/a&gt;) I showed you how to host the F# compiler in your own applications.&#xA;This time I wanted to reveal the result of those experiments.&#xA;I wanted to enable F# scripting in a few of my apps. This requirement made me create the &lt;a href=&#34;https://github.com/queil/fsc-host&#34;&gt;Fsc Host&lt;/a&gt; project. The goal was to create a light-weight reusable abstraction over &lt;code&gt;FSharp.Compiler.Service&lt;/code&gt; focused on compiling scripts and consuming them by the hosting application. The NuGet package is &lt;a href=&#34;https://www.nuget.org/packages/Queil.FSharp.FscHost&#34;&gt;available here&lt;/a&gt;. The project is still in the experimental phase (version 0) so the API and available features may change, (and the changes may be breaking so bear that in mind before using it in your projects).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Embedding F# Compiler: NuGet References</title>
      <link>https://queil.net/2021/06/embedding-fsharp-compiler-nuget-references/</link>
      <pubDate>Fri, 04 Jun 2021 08:52:26 +0100</pubDate>
      <guid>https://queil.net/2021/06/embedding-fsharp-compiler-nuget-references/</guid>
      <description>&lt;p&gt;UPDATE: If you are looking for a ready to use solution please check out my &lt;a href=&#34;https://github.com/queil/fsc-host&#34;&gt;fsc-host&lt;/a&gt; NuGet package. Also I wrote a &lt;a href=&#34;https://queil.net/2021/10/embedding-fsharp-compiler-fsc-host-nuget/&#34;&gt;blog post&lt;/a&gt; about it.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;intro&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#intro&#34;&gt;Intro&lt;span class=&#34;pilcrow&#34;&gt;&amp;nbsp;¶&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;In the &lt;a href=&#34;https://queil.net/2021/05/embedding-fsharp-compiler/&#34;&gt;previous post&lt;/a&gt; I showed how to extend an F# application with scripting capabilities. This time I want to extend the previous example with the &lt;a href=&#34;https://docs.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/#referencing-packages-in-f-interactive&#34;&gt;#r directive&lt;/a&gt; support and resolving NuGet dependencies.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;how-to&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#how-to&#34;&gt;How to&lt;span class=&#34;pilcrow&#34;&gt;&amp;nbsp;¶&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;On high level we need to extract NuGet packages information from the script and pass it to the compiler as additional arguments. Before compiling we also need to dynamically load the referenced dlls to the host application. I first took the naive approach of parsing and extracting the directives from AST and feeding them into &lt;code&gt;FSharpDependencyManager&lt;/code&gt;. It worked to an extent. Luckily, &lt;code&gt;FsChecker&lt;/code&gt; comes with a built-in solution. We can use &lt;code&gt;GetProjectOptionsFromScript&lt;/code&gt; and subsequently &lt;code&gt;ParseAndCheckProject&lt;/code&gt; methods. That way we can retrieve &lt;code&gt;DependencyFiles&lt;/code&gt; and extract resolved dlls&amp;rsquo; paths.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Embedding F# Compiler</title>
      <link>https://queil.net/2021/05/embedding-fsharp-compiler/</link>
      <pubDate>Sat, 29 May 2021 10:03:24 +0100</pubDate>
      <guid>https://queil.net/2021/05/embedding-fsharp-compiler/</guid>
      <description>&lt;p&gt;UPDATE: If you are looking for a ready to use solution please check out my &lt;a href=&#34;https://github.com/queil/fsc-host&#34;&gt;fsc-host&lt;/a&gt; NuGet package. Also I wrote a &lt;a href=&#34;https://queil.net/2021/10/embedding-fsharp-compiler-fsc-host-nuget/&#34;&gt;blog post&lt;/a&gt; about it.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;motivation&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#motivation&#34;&gt;Motivation&lt;span class=&#34;pilcrow&#34;&gt;&amp;nbsp;¶&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Embedded scripting is one of the ways of providing flexibility to compiled applications. It is not free from problems (performance penalty, security issues, additional tooling is required). But if your goal is a ceremony-free flexibility for the end-user then scripting is a very robust way&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; . F# comes with great capabilities in this area. I want to show you how you can extend your otherwise statically compiled program with scripting.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
