﻿<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text" xml:lang="en">Gtk#</title>
  <link type="application/atom+xml" href="https://d.moonfire.us/tags/gtk-sharp/atom.xml" rel="self" />
  <link type="text/html" href="https://d.moonfire.us/tags/gtk-sharp/" rel="alternate" />
  <updated>2026-03-09T17:42:47Z</updated>
  <id>https://d.moonfire.us/tags/gtk-sharp/</id>
  <author>
    <name>D. Moonfire</name>
  </author>
  <rights>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</rights>
  <entry>
    <title>Author Intrusion for a little while</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2014/07/20/switching-to-author-intrusion/" />
    <updated>2014-07-20T05:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2014/07/20/switching-to-author-intrusion/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="author-intrusion" scheme="https://d.moonfire.us/tags/" label="Author Intrusion" />
    <category term="typescript" scheme="https://d.moonfire.us/tags/" label="TypeScript" />
    <category term="sand-and-ash" scheme="https://d.moonfire.us/tags/" label="Sand and Ash" />
    <category term="sand-and-bone" scheme="https://d.moonfire.us/tags/" label="Sand and Bone" />
    <category term="c-sharp" scheme="https://d.moonfire.us/tags/" label="C#" />
    <category term="gtk-sharp" scheme="https://d.moonfire.us/tags/" label="Gtk#" />
    <summary type="html">Going to work on Author Intrusion a little while waiting on my writing projects. Maybe I can finally get the writing environment I'm looking for.</summary>
    <content type="html">&lt;p&gt;Yesterday, I finished the first draft of the last of my writing obligations. It's taken me a few months, mainly because my output has dropped significantly with me breaking a leg and BAM coming into our lives. It also means that the new few months are probably going to continue to trend and I'm going to be frequently interrupted and not given a lot of contiguous hours to write.&lt;/p&gt;
&lt;p&gt;I could work on &lt;a href="/tags/sand-and-bone/"&gt;Sand and Bone&lt;/a&gt;, the third and final book of the series. I'm about three months from finishing that project.&lt;/p&gt;
&lt;p&gt;&lt;a href="/tags/sand-and-ash/"&gt;Sand and Ash&lt;/a&gt; is currently at the editor, but I honestly don't expect to get it back for another four months (probably my largest frustration at this point).&lt;/p&gt;
&lt;p&gt;The problem comes down to these longer projects. When I write, I keep hoping for features that no program seems to have. My project dictionary has gotten rather cumbersome, which makes it harder since I have to copy/paste it into each new chapter. When it was thirty or so words, it wasn't so bad. At three hundred words (including names, locations, conlang, etc), it is a significant hunk of each document. There are also other little things that would help with writing, but Emacs (or Scrivner or Word) just don't seem to handle.&lt;/p&gt;
&lt;p&gt;Since &lt;em&gt;Ash&lt;/em&gt; is in limbo, I decided to work on Author Intrusion for a month or so. Actually, I &lt;a href="https://github.com/dmoonfire/author-intrusion-dev/"&gt;started over again&lt;/a&gt; because the last five attempts have ended in logical dead-ends. I'm not going to say failures, because they aren't. I learned a lot with each iteration, but when I got far enough into it, I found places where they broke down.&lt;/p&gt;
&lt;p&gt;In the last few months, I actually tried seeing if there was something I can do with another editor, including looking into expanding Emacs or Sublime. Sadly, I don't think I have the skill to do either of those, mainly because of the infrastructure and their associated scripting languages (Lisp and Python respectively).&lt;/p&gt;
&lt;p&gt;I've gone back to a C# implementation, but with a different foundation for the editor. I'm also leaving it a glorious mass of single projects until the 1.0.0 release instead of the first checkpoint release. I think I split the projects too quickly and spent more time shuffling the DLLs around then actually coding.&lt;/p&gt;
&lt;p&gt;I'm also trying to focus on staying with unit tests for longer. I think I know what Gtk# can do at this point. I'm planning on stealing most of the Gtk# GUI code for the project, but integrating the code with the GUI adds a lot of complexity to solving projects. If I can resolve most of them via TDD, then it would be easier to integrate later.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I still plan on writing a WPF and a Mac-specific front end, but Gtk# plays better across the two platforms I use daily.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Sadly, I was hoping Gtk# or Qt# would stabilize after a half year, but they haven't. I found ways of working around them for now, so I'm going to move forward and figure out those problems when I get there.&lt;/p&gt;
&lt;p&gt;I have no clue if this is going to work. But, I'm still going to try. The problem comes down to complexity. A lot of developers can talk about how to create a game, a to do application, or a slew of other applications. But, very few talk about creating an IDE. I think I know why, it is a complex problem. And I'm doing this on my own, so I fully expect there to be stumbling along the way.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>That point where it is no longer easy</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2013/12/31/that-point-where-it-is-no-longer-easy/" />
    <updated>2013-12-31T06:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2013/12/31/that-point-where-it-is-no-longer-easy/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="author-intrusion" scheme="https://d.moonfire.us/tags/" label="Author Intrusion" />
    <category term="gtk-sharp" scheme="https://d.moonfire.us/tags/" label="Gtk#" />
    <category term="typescript" scheme="https://d.moonfire.us/tags/" label="TypeScript" />
    <content type="html">&lt;p&gt;Since I've been ignoring &lt;a href="https://github.com/dmoonfire/author-intrusion-ts"&gt;Author Intrusion TS&lt;/a&gt; for a month and some, I decided to get myself up to speed on what I need to start writing novels with it again.&lt;/p&gt;
&lt;p&gt;The next "biggest rock" was immediate corrections (auto-correct). And this is also the point where suddendly everything became harder. I've noticed this was a lot of libraries, languages, and API. You see it in the "get a store written in ten minutes". The problem is, you can get a shell of a store in ten minutes, you can't really create a full-blown commerce site in ten minutes, day, weeks, or even months.&lt;/p&gt;
&lt;p&gt;Usually what happens is that you try to do something that isn't obvious with the framework (or API, library, whatever). And then, to get that working, you rip out all of that "in ten minutes" and rework it from the ground up.&lt;/p&gt;
&lt;p&gt;When working with TypeScript and Webkit, everything was great with editing until I got to these corrections. In Microsoft Word (and Libreoffice), if you type a double-quote, it will convert it into a fancy quote. But, if you undo (control-z), it will undo the quote to fancy first, and then a second undo will remove the quote. I need the same thing with Author Intrusion, but the undo/redo system build into the contenteditable system didn't allow it.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="https://github.com/dmoonfire/author-intrusion-cil"&gt;Gtk# version&lt;/a&gt; of Author Intrusion, I did a command pattern to handle all of these. However, with the events from Javascript the action has already happened, I just have to keep it in sync. It changes where and how I create commands in the TypeScript version.&lt;/p&gt;
&lt;p&gt;It is also that turning point when this program goes from a toy implementation into something more serious.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>A pile of packages</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2013/07/03/pile-of-package/" />
    <updated>2013-07-03T05:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2013/07/03/pile-of-package/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="author-intrusion" scheme="https://d.moonfire.us/tags/" label="Author Intrusion" />
    <category term="gtk-sharp" scheme="https://d.moonfire.us/tags/" label="Gtk#" />
    <category term="mfgames-cil" scheme="https://d.moonfire.us/tags/" label="MfGames CIL" />
    <category term="mfgames-commands-cil" scheme="https://d.moonfire.us/tags/" label="MfGames Commands CIL" />
    <category term="mfgames-languages-cil" scheme="https://d.moonfire.us/tags/" label="MfGames Languages CIL" />
    <category term="mfgames-gtkext-cil" scheme="https://d.moonfire.us/tags/" label="MfGames.GtkExt CIL" />
    <content type="html">&lt;p&gt;In the process of cleaning up and getting &lt;a href="http://mfgames.com/author-intrusion/"&gt;Author Intrusion&lt;/a&gt; ready for release, I ended up making quite a few distinct libraries and projects. These are very small, focused assemblies, but I think they have the potential of being useful in themselves.&lt;/p&gt;
&lt;p&gt;&lt;!--more--&gt;&lt;/p&gt;
&lt;h1&gt;Philosophy&lt;/h1&gt;
&lt;p&gt;My influential development came from the Unix world. I like things that "do one thing" that are designed to be chained with other things. In effect, most programs are just a composite of lots of different little things.&lt;/p&gt;
&lt;p&gt;These packages follow much of the same philosophy. While I &lt;em&gt;could&lt;/em&gt; write them as part of Author Intrusion, there were advantages of separating them. The biggest is reuse. A good example is the &lt;em&gt;MfGames CIL&lt;/em&gt; project. It has lots of little C# utilities that I've used in a dozen programs over the years.&lt;/p&gt;
&lt;h1&gt;Drawbacks&lt;/h1&gt;
&lt;p&gt;There are some major drawback of working with separate packages. While I tried to follow the &lt;a href="http://en.wikipedia.org/wiki/Package_Principles"&gt;Stable Dependencies Principle&lt;/a&gt;, the fact is that almost all of this is greenfield development and therefore unstable. Near the end of last week, it got really annoying when I had a bug in one code that required me to cascade the change through five different packages. Fortunately, PowerShell is very useful for handling all these things and I got a pretty solid workflow when it came to those final packages.&lt;/p&gt;
&lt;p&gt;The other is overhead. Projects require overhead. Not just a website on my site or a reposotiroy in GitHub, but (if done right), documentation, examples, and unit tests. What could be a bullet point in one program (implemented a command pattern) becomes something major when it is a command pattern library.&lt;/p&gt;
&lt;h1&gt;Projects&lt;/h1&gt;
&lt;p&gt;These are the projects I worked with or created in the process. I'm using the GitHub links for these, mainly because those pages have more information than the ones on Moonfire Games (documentation takes time).&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://github.com/dmoonfire/mfgames-cil/"&gt;MfGames CIL&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Over the years, I've had a little "catch all" library for the things I happen to write. I released about ten years ago, but mostly had local development since.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Settings management class to handle keeping track of settings for the various plugins, window positions, and everything else.&lt;/li&gt;
&lt;li&gt;A hierarchical path classes. I arrange a lot like a directory tree so I wrote a common framework for working with them. So, the window settings are stored underneath "/GUI/Gtk/Windows/Main Window" where plugin settings are "/Plugins/NHunspell".&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This package was bumped to version 4.0.1.0 in the process of getting Author Intrusion out. The rest of the packages are version 0.1.0.0 since they are very unstable.&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://github.com/dmoonfire/mfgames-languages-cil/"&gt;MfGames Languages CIL&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is actually a new package and created at the last minute. While .NET has a lot of functions for working with languages in general, there are some limitations when it comes to switching locale. More importantly, I'm going to want a system that handles constructed languages (conlangs) which the built-in locale system can't really handle.&lt;/p&gt;
&lt;p&gt;I'm not entirely sure if this will be that useful, but my gut feeling is that it will be needed. Eventually, I plan on including a lot more in there including name generators and word identification.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A rough word tokenizer. I'm using this to handle control-arrow movements, deleting and selecting by word. Eventually, the undo/redo will use it so if you type "word" and undo it will undo the entire word instead of just the "d".&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a href="https://github.com/dmoonfire/mfgames-commands-cil/"&gt;MfGames Commands CIL&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is actually week four of this release. A command pattern basically is a way of handling interactions with the user. Instead of inserting a "w" in a buffer and handling the results, I create an object that says to insert "w". The main reason is that my code becomes more separated in logic (the command object handles inserting "w") but also simplifies code for undoing and redoing.&lt;/p&gt;
&lt;p&gt;Eventually, this will also let me serialize the undo/redo so I can save, quit the program, come back, and still be able to undo where I left off.&lt;/p&gt;
&lt;p&gt;The problem was that both the text editor and Author Intrusion both had command patterns, but they were incompatible with each other. Creating a library meant that I could reuse the logic (a good thing) and just handle the differences.&lt;/p&gt;
&lt;p&gt;I also made a text editing project out of this that takes a core set of commands and wraps them in composite commands. It sounds complicated, but take pressing return in the middle of a paragraph. Instead of having a split paragraph command, it is really a combination of:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Insert a new line below.&lt;/li&gt;
&lt;li&gt;Copy the text to the right of the cursor into the new line.&lt;/li&gt;
&lt;li&gt;Delete the text to the right of the cursor from the first line.&lt;/li&gt;
&lt;li&gt;Position the cursor at the beginning of the new line.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It works out better than I describe it, but mainly I can do a lot with just six core functions. And that makes it easier to implement than every possible keyboard input or action a user could do.&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://github.com/dmoonfire/mfgames-gtkext-cil/"&gt;MfGames GtkExt CIL&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The last project was Gtk# extension for things I use while developing. While Gtk# isn't as pretty as WPF or most Windows, it has something I like: cross-platform support. It also doesn't have as rich of a widget set of most toolkits, so I gathered it here.&lt;/p&gt;
&lt;p&gt;The biggest part is the text editor. I created a text editing widget that doesn't work on a single text buffer (like most editors do). So, the entire novel isn't in a single string. Instead, it is managed line by line. This means I don't have to have an entire 600k word serial in memory at the same time, which is a good thing.&lt;/p&gt;
&lt;p&gt;I expect to see a lot of churn in this last project for a few years.&lt;/p&gt;
</content>
  </entry>
</feed>
