<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>ConnectBasic</title>
    
    <link rel="hub" href="http://hubbub.api.typepad.com/" />
    <link rel="alternate" type="text/html" href="http://blog.connectbasic.net/" />
    <id>tag:typepad.com,2003:weblog-1887051</id>
    <updated>2009-06-27T13:41:21+01:00</updated>
    <subtitle>The OpenSource Macro Programming System</subtitle>
    <generator uri="http://www.typepad.com/">TypePad</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Connectbasic" /><feedburner:info uri="connectbasic" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
        <title>Porting to Mac and Other Fun...</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Connectbasic/~3/zA9ZEYq35d8/porting-to-mac-and-other-fun.html" />
        <link rel="replies" type="text/html" href="http://blog.connectbasic.net/2009/06/porting-to-mac-and-other-fun.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00d8341cc40253ef0115707a7e12970c</id>
        <published>2009-06-27T13:41:21+01:00</published>
        <updated>2009-06-27T13:41:21+01:00</updated>
        <summary>So, we've not entirely made the progress on ConnectBasic that we'd wanted to in the last week or so, but despite the lack of checkins it's not for a lack of effort. Rob has been looking at implementing optional parameters which introduced some rather interesting new requirements for the parser - up until now we hadn't needed a look-ahead mechanism but Rob has had to look at implementing one, I'm sure he'll talk more about that in good time. My principal focus over the last week or so has been thinking about how to port ConnectBasic to other systems and...</summary>
        <author>
            <name>Philip Stears</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-GB" xml:base="http://blog.connectbasic.net/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>So, we've not entirely made the progress on ConnectBasic that we'd wanted to in the last week or so, but despite the lack of checkins it's not for a lack of effort.</p><p>Rob has been looking at implementing optional parameters which introduced some rather interesting new requirements for the parser - up until now we hadn't needed a look-ahead mechanism but Rob has had to look at implementing one, I'm sure he'll talk more about that in good time.</p><p>My principal focus over the last week or so has been thinking about how to port ConnectBasic to other systems and as I'd been thinking about taking a look at the world of Apple for a while, I decided to get myself a MacBook Pro and start hacking around.</p><p>I must confess to having unrealistic expectations about the effort that would be involved, I'd seen plenty of posts about IronPython and other DLR projects on Linux/Mac and surmised that my biggest problem was going to be porting the UI - and, while the UI is certainly the biggest problem, it is far from the only one.</p><p>I, perhaps naively, figured I'd be able to grab the code from subversion and just run xbuild (Mono's version of MSBuild) on each of the core projects (i.e. the non UI ones) - I couldn't have been more wrong. Unfortunately it turns out that xbuild is pretty embryonic at best and couldn't locate the CSharp targets files required by the projects, unfortunately the hour or two I spent searching the web was fairly fruitless - this is a project with a lot of promise, but on the Mac at least, it seems to be a long way off usefulness.</p><p>So, I decided to leave xbuild behind for the time being and try out MonoDevelop - now to be fair this is very early days for MonoDevelop on the Mac and I'm pretty impressed with how well it works so far, though the version I'm running doesn't support interactive debugging and various other niceties that Visual Studio has lavishly spoiled me with. That said - it worked, it all compiled! and more importantly the Windows Forms support seems to be pretty good from my limited testing so far.</p><p>Which, brings me on to the next problem, the code editor. As things stand ConnectBasic uses a WPF code editor, something I'd always know would be a problem but I figured it'd just be an (albeit not-easy) case of writing a new text editor from scratch using GDI/GDI+, boy could I couldn't have been more wrong.</p><p>On a side note, it might be possible to use the RichTextBox to build a code editor but there are two major problems with this:</p><p>1) on Windows at least making modifications to the RichTextBox involves selecting the text to be changed and changing it, which is astonishingly appalling abysmally slow, and though you can P/Invoke a Win32 API to suppress drawing of the Window while you do this to speed it up, it's a blunt instrument and very hacky. </p><p>2) It's far too limited, obviously the goal ultimately is to have a good quality code editor with line numbers et al, the RichTextBox, as is characteristic of most WinForms controls, is virtually completely unextensible in any meaningful way.</p><p>So, back to writing a new code editor from scratch. If you remember .NET before v2 you'll probably also recall the various problems around text rendering, this was because v1 and v1.1 both used GDI+ for text rendering, which unfortunately has various problems, e.g. it's slow because unlike GDI it isn't hardware accelerated, it doesn't have good support for other scripts (do a search for Michael Kaplan's discussion of this for more details), and there were various problems with the way it performed kerning. Disclaimer: I'm certainly not an expert on the very difficult topic of text rendering but there's some great discussions about the deficiencies of GDI+ in this regard.</p><p>So, realistically, that left me with GDI - except it doesn't. GDI support for .NET applications is provided by static methods on the TextRenderer class. Of which it provides two, with various overloads of each: DrawText and MeasureText, and MeasureText is the cause of the problems. MeasureText simply returns the bounding size of the input text - there's no information for individual characters, which adds up to a code window which you can't use a mouse with. Not great.</p><p>At the moment I've not really got a solution for this problem, I'm thinking about a few thing:</p><p>1. Writing a prototype using GDI's MeasureText anyway by measuring successively long sequences of text, but it strikes me that this would probably be slow, and I've a gut feeling it'll probably end up not working anyway.</p><p>2. Some how hosting a Silverlight/Moonlight control inside a WinForms control so that we can use WPF instead which would seem to have much better text support. I'm really not sure about this, but it could work well if it's doable.</p><p>3. Having two completely independent UIs on Windows + Mac, one based on WinForms, the other based on Cocoa (something I'm still in the process of learning) and using a Cocoa/.NET binding. The biggest problem with this is it just avoids the problem which I'm going to come across again when we do a Linux port, so I'm really not keen about it.</p><p>4. Giving up on WinForms and trying something like GTK# instead. This seems to be a good possibility but GTK# apps don't seem to play well with Mac user's expectations, they seem to feel very "Linuxy".</p><p>So, I've not really got any concrete answers, I'm still exploring the various options, and there doesn't appear to be much in the way of help/tutorials/information about porting .NET apps to Mac in the Internet at the moment, hopefully that's something that'll change in time. If anyone knows of a .NET on Mac community I'd be very interested in hearing about it.</p><p>So, with that said, I'm going to switch priorities for the time being, I'm still going to be looking into porting to the Mac when I get time here and there, but for now, I'm going to be focusing on the ConnectBasic hosting API - so that host applications can provide their objects to macros effectively, and also so they can control built-in functions such as IO capabilities to allow macros to run in sandboxed environments.</p><br /></div>
</content>


    <feedburner:origLink>http://blog.connectbasic.net/2009/06/porting-to-mac-and-other-fun.html</feedburner:origLink></entry>
    <entry>
        <title>Introductions - Rob Ashton</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Connectbasic/~3/bIrtu_8JFxA/introductions-rob-ashton.html" />
        <link rel="replies" type="text/html" href="http://blog.connectbasic.net/2009/06/introductions-rob-ashton.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-68250835</id>
        <published>2009-06-18T19:46:56+01:00</published>
        <updated>2009-06-18T19:46:56+01:00</updated>
        <summary>Hi, I'm Rob Ashton, a software developer based in Reading, UK. I'm the technical lead of .NET development at the company I work for. While I download Team Foundation Explorer so I can commence development on ConnectBasic development, I thought I'd start off by explaining why I feel that it's worth working on this software in my spare time. I have been exposed to VBA throughout my software development career and while never having had to deal with it directly I have long recognised its importance in providing academics, engineers and suchlike with easy access to the ability to automate...</summary>
        <author>
            <name>Rob Ashton</name>
        </author>
        <category scheme="http://www.sixapart.com/ns/types#category" term="Web/Tech" />
        
        
<content type="xhtml" xml:lang="en-GB" xml:base="http://blog.connectbasic.net/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>Hi,</p><br /><div>I'm Rob Ashton, a software developer based in Reading, UK. I'm the technical lead of .NET development at the company I work for.</div><br /><div>While I download Team Foundation Explorer so I can commence development on ConnectBasic development, I thought I'd start off by explaining why I feel that it's worth working on this software in my spare time.</div><br /><div>I have been exposed to VBA throughout my software development career and while never having had to deal with it directly I have long recognised its importance in providing academics, engineers and suchlike with easy access to the ability to automate the software they work in daily in order to be able to spend the rest of their time more productively.</div><br /><div>It is true that the move towards "proper" project based programming marks a move away from the easy accessability of macro programming and is in essence a disservice to the customer - but to go into this would just lead to repeating what is already written and available on the codeplex page.</div><br /><div>This is not my primary motivation however, and that is simply that I enjoy working with languages as a technology, and the idea of creating an experience that is akin (and indeed even better) to that which VBA developers have long enjoyed on the Windows platform excites me beyond anything.</div><br /><div>Not only that, but creating something that is cross platform and that will ensure the future of macro programming in times to come feels like a truely worthwhile project. Especially if developers decide to utilise ConnectBasic in the projects they have responsibility over as their way of easily providing application extensibility to their ordinary users.</div><br /><div>Anyway, enough blathering for now, the TFS client has downloaded and now demands to be installed - I look forward to blogging on my ongoing progress in this project as times goes on.</div></div>
</content>


    <feedburner:origLink>http://blog.connectbasic.net/2009/06/introductions-rob-ashton.html</feedburner:origLink></entry>
    <entry>
        <title>Welcome</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Connectbasic/~3/E7uzxr0_JvU/welcome.html" />
        <link rel="replies" type="text/html" href="http://blog.connectbasic.net/2009/06/welcome.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-68246117</id>
        <published>2009-06-18T17:34:24+01:00</published>
        <updated>2009-06-18T17:34:24+01:00</updated>
        <summary>Welcome to the ConnectBasic blog, Rob &amp; I are going to be posting here in the near future about the progress of ConnectBasic, the first coordinated development evening is tonight so stay tuned! - Stears</summary>
        <author>
            <name>Philip Stears</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-GB" xml:base="http://blog.connectbasic.net/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>Welcome to the ConnectBasic blog, Rob &amp; I are going to be posting here in the near future about the progress of ConnectBasic, the first coordinated development evening is tonight so stay tuned! </p>  <p>- Stears</p></div>
</content>


    <feedburner:origLink>http://blog.connectbasic.net/2009/06/welcome.html</feedburner:origLink></entry>
 
</feed><!-- ph=1 --><!-- nhm:dynamic-ssi -->
