<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: OWL BASIC produces its first executable</title>
	<atom:link href="http://www.smallshire.org.uk/sufficientlysmall/2009/08/04/owl-basic-produces-its-first-executable/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smallshire.org.uk/sufficientlysmall/2009/08/04/owl-basic-produces-its-first-executable/</link>
	<description>sin(x) = x</description>
	<lastBuildDate>Sat, 12 Jun 2010 02:44:45 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Les May</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/08/04/owl-basic-produces-its-first-executable/comment-page-1/#comment-3030</link>
		<dc:creator>Les May</dc:creator>
		<pubDate>Sat, 13 Feb 2010 19:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=394#comment-3030</guid>
		<description>I&#039;m glad to hear that the BBC Basic/CLR project is going forward and that you have decided to give it a name &#039;Owl Basic&#039; which suggests you are not going to slavishly follow the road to exact compatability with the ARM interpreter.

If I read the last post correctly Owl Basic will permit a space between the keyword &#039;proc&#039; and the procedure name, i.e. def proc DoThis, rather than def proc_DoThis. This is a welcome change and has one very interesting consequence.

I use BBC4W with an external editor, PSPad. This editor allows the use of user produced syntax files and the control over keyword colouring and font. As it operates on whole words it cannot colour the keywork &#039;proc&#039; in proc_DoThis. Allowing a space after proc will allow syntax colouring to be used.

PSPad allows an external compiler (or interpreter) to be called so it will only be a matter of pointing it at the Owl Basic compiler.

If you are willing to go a little bit further in dropping complete compatibility with the ARM interpreter the way functions are defined and called would benefit from a bit of tidying up. In particular an &#039;endfunc&#039; and a specific keyword to return a value from the function would bring it closer to modern ways of doing things. It might mean changing &#039;return&#039; for variables passed by reference to &#039;ref&#039;.</description>
		<content:encoded><![CDATA[<p>I&#8217;m glad to hear that the BBC Basic/CLR project is going forward and that you have decided to give it a name &#8216;Owl Basic&#8217; which suggests you are not going to slavishly follow the road to exact compatability with the ARM interpreter.</p>
<p>If I read the last post correctly Owl Basic will permit a space between the keyword &#8216;proc&#8217; and the procedure name, i.e. def proc DoThis, rather than def proc_DoThis. This is a welcome change and has one very interesting consequence.</p>
<p>I use BBC4W with an external editor, PSPad. This editor allows the use of user produced syntax files and the control over keyword colouring and font. As it operates on whole words it cannot colour the keywork &#8216;proc&#8217; in proc_DoThis. Allowing a space after proc will allow syntax colouring to be used.</p>
<p>PSPad allows an external compiler (or interpreter) to be called so it will only be a matter of pointing it at the Owl Basic compiler.</p>
<p>If you are willing to go a little bit further in dropping complete compatibility with the ARM interpreter the way functions are defined and called would benefit from a bit of tidying up. In particular an &#8216;endfunc&#8217; and a specific keyword to return a value from the function would bring it closer to modern ways of doing things. It might mean changing &#8216;return&#8217; for variables passed by reference to &#8216;ref&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Smallshire</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/08/04/owl-basic-produces-its-first-executable/comment-page-1/#comment-2921</link>
		<dc:creator>Robert Smallshire</dc:creator>
		<pubDate>Tue, 08 Sep 2009 21:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=394#comment-2921</guid>
		<description>&lt;a href=&quot;#comment-2905&quot; rel=&quot;nofollow&quot;&gt;@David Williams &lt;/a&gt; 
Yes, the intent is to cover the new syntax introduced by BBC BASIC for Windows, and much of that is in place already.  Furthermore, there will be small OWL BASIC specific syntax extensions to improve interoperability with .NET.  For example, there will be a new reference type which will hold object references, possibly using a tilde sigil, so A~ would be a reference to a .NET object. Also FN and PROC will need to allow .NET class and namespace qualifiers to allow calls on .NET methods, such as PROC System.Console.Writeline(A$) or theta = FN Math.Tanh(angle) or PROCmethod(object~, arg1%, arg2%). You&#039;ll also notice that a space is permitted between the keyword and the identifier name to aid readability.  I&#039;ve also done some work on how BB4W notion of structs maps onto CLR value types (structs in C#), and I think fairly seamless interop is possible.  Another difference is that strings will be Unicode.

Some BBC BASIC constructs, notably BB4W pointer syntax and also indirection operators may result in the generation of code which is required to be marked as &#039;unsafe&#039; to the runtime.  I&#039;m finding it a fine line between implementing a language compiler and implementing a BBC Micro or RISC OS emulator. I&#039;m trying to stay true to the language whilst still providing something that is in some sense useful and can run real programs.  Right now I&#039;m working on improving the type inferencing system to see if its possible to determine at compile time whether indirection operators index into a pre-allocated DIM block% 1024, which is safe, or whether they just manipulate some system memory directly, which is unsafe.  One of my test programs is Acornsoft Sphinx adventure which seems to store data in the BBC MOS Econet workspace - to support cases such as think I&#039;ll be supporting a compile-time flag or pragma which fakes a BBC Micro 32 kB (or larger!) memory map, which is peanuts these days.  On a related note  PAGE, HIMEM, TOP and LOMEM will probably return dummy but consistent values without much meaning, since I&#039;m not reproducing the BBC BASIC stack or heap structures.

There definitely won&#039;t be an inline assembler for native machine code; however, in the spirit of previous incarnations of BBC BASIC an assembler for the host system will be provided, which in this case will be the stack virtual machine code CIL. In practice assembly will be delegated to the Microsoft or Mono tools for that purpose. That said, if you need to call into native code I think I&#039;ll have SYS doing the equivalent of a CLR P/Invoke.  I&#039;ve already had the compiler running on architectures other than IA-32 - its developed primarily on an amd64 computer but I&#039;ve also had it running on my 64-bit Sunblade SPARC under Mono!  It should, in theory also run unchanged on the ARM or PowerPC CLR implementations...</description>
		<content:encoded><![CDATA[<p><a href="#comment-2905" rel="nofollow">@David Williams </a><br />
Yes, the intent is to cover the new syntax introduced by BBC BASIC for Windows, and much of that is in place already.  Furthermore, there will be small OWL BASIC specific syntax extensions to improve interoperability with .NET.  For example, there will be a new reference type which will hold object references, possibly using a tilde sigil, so A~ would be a reference to a .NET object. Also FN and PROC will need to allow .NET class and namespace qualifiers to allow calls on .NET methods, such as PROC System.Console.Writeline(A$) or theta = FN Math.Tanh(angle) or PROCmethod(object~, arg1%, arg2%). You&#8217;ll also notice that a space is permitted between the keyword and the identifier name to aid readability.  I&#8217;ve also done some work on how BB4W notion of structs maps onto CLR value types (structs in C#), and I think fairly seamless interop is possible.  Another difference is that strings will be Unicode.</p>
<p>Some BBC BASIC constructs, notably BB4W pointer syntax and also indirection operators may result in the generation of code which is required to be marked as &#8216;unsafe&#8217; to the runtime.  I&#8217;m finding it a fine line between implementing a language compiler and implementing a BBC Micro or RISC OS emulator. I&#8217;m trying to stay true to the language whilst still providing something that is in some sense useful and can run real programs.  Right now I&#8217;m working on improving the type inferencing system to see if its possible to determine at compile time whether indirection operators index into a pre-allocated DIM block% 1024, which is safe, or whether they just manipulate some system memory directly, which is unsafe.  One of my test programs is Acornsoft Sphinx adventure which seems to store data in the BBC MOS Econet workspace &#8211; to support cases such as think I&#8217;ll be supporting a compile-time flag or pragma which fakes a BBC Micro 32 kB (or larger!) memory map, which is peanuts these days.  On a related note  PAGE, HIMEM, TOP and LOMEM will probably return dummy but consistent values without much meaning, since I&#8217;m not reproducing the BBC BASIC stack or heap structures.</p>
<p>There definitely won&#8217;t be an inline assembler for native machine code; however, in the spirit of previous incarnations of BBC BASIC an assembler for the host system will be provided, which in this case will be the stack virtual machine code CIL. In practice assembly will be delegated to the Microsoft or Mono tools for that purpose. That said, if you need to call into native code I think I&#8217;ll have SYS doing the equivalent of a CLR P/Invoke.  I&#8217;ve already had the compiler running on architectures other than IA-32 &#8211; its developed primarily on an amd64 computer but I&#8217;ve also had it running on my 64-bit Sunblade SPARC under Mono!  It should, in theory also run unchanged on the ARM or PowerPC CLR implementations&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Williams</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/08/04/owl-basic-produces-its-first-executable/comment-page-1/#comment-2905</link>
		<dc:creator>David Williams</dc:creator>
		<pubDate>Tue, 08 Sep 2009 00:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=394#comment-2905</guid>
		<description>Hi Rob,

Unless you have done so already, do you intend to implement some or all of BBC BASIC for Windows&#039; features (not available in ARM BBC BASIC 5 and certainly not in 8-bit BBC BASIC II) such as structures, the ^ &#039;address of&#039; operator, the function form of the DIM keyword DIM() which - amongst other things - returns the size of an array or structure.  And will it include an inline IA-32/x86 assembler?


Regards,
David.</description>
		<content:encoded><![CDATA[<p>Hi Rob,</p>
<p>Unless you have done so already, do you intend to implement some or all of BBC BASIC for Windows&#8217; features (not available in ARM BBC BASIC 5 and certainly not in 8-bit BBC BASIC II) such as structures, the ^ &#8216;address of&#8217; operator, the function form of the DIM keyword DIM() which &#8211; amongst other things &#8211; returns the size of an array or structure.  And will it include an inline IA-32/x86 assembler?</p>
<p>Regards,<br />
David.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Jones</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/08/04/owl-basic-produces-its-first-executable/comment-page-1/#comment-2646</link>
		<dc:creator>David Jones</dc:creator>
		<pubDate>Thu, 13 Aug 2009 10:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=394#comment-2646</guid>
		<description>If I may speculate about .NET (about which I know essentially nothing) based on my JVM knowledge (a tiny bit more than nothing): In the JVM &#039;$&#039; is perfectly valid in an identifier, but not in Java the language (the compiler uses this to mangle inner class names).  Possibly something similar is going on in .NET?  In any case, I agree it would be embarrassing to have identifiers that one could not access from C#.

Congrats by the way.  The first executable is always a good milestone to reach.</description>
		<content:encoded><![CDATA[<p>If I may speculate about .NET (about which I know essentially nothing) based on my JVM knowledge (a tiny bit more than nothing): In the JVM &#8216;$&#8217; is perfectly valid in an identifier, but not in Java the language (the compiler uses this to mangle inner class names).  Possibly something similar is going on in .NET?  In any case, I agree it would be embarrassing to have identifiers that one could not access from C#.</p>
<p>Congrats by the way.  The first executable is always a good milestone to reach.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
