<div dir="ltr">I'll make the rant brief: Raku (the new name for Perl 6) is VERY fat.<br>No way in the world it's ready for production.<br><br>I ran these on my main Linux box running Ubuntu Mate 21.10.<br>(i5-8279U@2.40GHz, 4 cores, 2 threads per core, mem 16M, fast SSD)<br><br>Below 'pwsh' is the name of the new cross-platform powershell (from Microsoft).<br><br>RSS size of 'shells' or interactive languages sitting idle at prompt.<br><br> Shell   RSS (M)<br>------- --------<br>raku         109<br>pwsh          90<br>ruby          22<br>python3        8<br>bash           6<br>ksh            4<br>perl5          4<br>dash           3<br>csh            1<br><br>RSS size of trivial Gtk program<br><br> Language    RSS (M)<br>----------  --------<br>raku             279<br>pwsh             143<br>python3          45<br>go                   35<br><br>So, python needs 38 Megs to wrap gtk (it does this by directly querying<br>gobject info) and is thus smaller than the 53 megs pwsh uses [It double<br>wraps, first importing a csharp wrapper, then querying the csharp<br>reflection information.]<br><br>But HOW IN THE WORLD does one explain the 170 megs raku needs?<br><br>When I installed the Gnome::Gtk3 package into raku (using "zef")... it<br>took about 45 minutes!<br><br>One could argue the 90 megs of pwsh is large... but pwsh gives you<br>direct access to the entire .NET CLR core library AND the C# optimizing<br>compiler. A lot of the overhead is simply caching the symbols of that<br>wrapping. It does not particularly grow over time. You might wonder why<br>the compiler... well you can easily extend pwsh by dynamically compiling<br>C# and calling it from pwsh.<br><br>Here's an example:<br><br>```powershell<br>Add-Type -Assembly AtkSharp<br>Add-Type -Assembly CairoSharp<br>Add-Type -Assembly GdkSharp<br>Add-Type -Assembly GioSharp<br>Add-Type -Assembly GLibSharp<br>Add-Type -Assembly GtkSharp<br>Add-Type -Assembly PangoSharp<br><br>function hello($s, $a) {<br>  Write-Host($s.Label)<br> if ($s.Label -eq "Hello World") {<br>           $s.Label = "Hello World Again"<br>      } elseif ($s.Label -eq "Hello World Again") {<br>               $s.Label = "Exit"<br>   } else {<br>              [Gtk.Application]::Quit()<br>     }<br>}<br><br>[Gtk.Application]::Init()<br>$app = New-Object Gtk.Application("org.gtkapp.gtkapp", [GLib.ApplicationFlags]::None)<br>$app.Register([Glib.Cancellable]::Current) | Out-Null<br><br>$btn = New-Object Gtk.Button("Hello World")<br><br>$btn.AddSignalHandler("clicked", [System.EventHandler]${function:hello})<br><br>$win = New-Object Gtk.Window("helloworld")<br><br>$win.AddSignalHandler("delete-event", [Gtk.DeleteEventHandler]{[Gtk.Application]::Quit()}, [Gtk.DeleteEventArgs].asType())<br><br>$win.Add($btn)<br><br>$win.ShowAll()<br><br>[Gtk.Application]::Run()<br>```<br><br>I did not need to write any C# in this case, but did need to do coerce<br>types to get pwsh functions passed as callbacks, etc.<br><br>If it's not clear: I am calling the C# wrapper of Gtk, called GtkSharp<br>from pwsh. Until I wrote that pwsh had no knowledge of GtkSharp. No<br>special code had to be written to interface to it.<br clear="all"><br>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Brian</div><div> <br></div></div></div></div></div></div></div></div></div></div>