<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Lexical Mistake &#187; Smalltalk</title>
	<atom:link href="http://alexicalmistake.com/tag/smalltalk/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexicalmistake.com</link>
	<description>Languages; Past, Present and Future</description>
	<lastBuildDate>Sun, 06 Sep 2009 22:00:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mention &#8212; An almost new language project.</title>
		<link>http://alexicalmistake.com/2009/07/mention/</link>
		<comments>http://alexicalmistake.com/2009/07/mention/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 01:15:06 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Language Design]]></category>

		<guid isPermaLink="false">http://alexicalmistake.com/?p=215</guid>
		<description><![CDATA[I realize that A Lexical Mistake has been somewhat dark for the last few months so I figured since my current project is starting to look more likely to actually happen I&#8217;d put this post up.
See I&#8217;ve also been reflecting on the last few projects I attempted and the core problems faced while working on [...]]]></description>
			<content:encoded><![CDATA[<p>I realize that A Lexical Mistake has been somewhat dark for the last few months so I figured since my current project is starting to look more likely to actually happen I&#8217;d put this post up.</p>
<p>See I&#8217;ve also been reflecting on the last few projects I attempted and the core problems faced while working on those projects (why I dropped them).</p>
<p>Most of my effort in my personal projects has been focussed over the last couple of years on learning and understanding new programming languages. The problem is that while learning new languages can be very enlightening and quite fun, I found myself wanting to return to my original interest in software development&#8212;that is, game development.</p>
<p>The problem is that, while looking at various project ideas, and even attempting a couple (one of which can be found in an earlier post, although the code has been pulled since), I&#8217;m still faced with a number of inefficiencies that scream right towards my language design interests.</p>
<p>For a start, if you wish to provide a sandboxed game code environment then the only real option is to combine two languages using the bridge between them as the sandbox. This isn&#8217;t really a problem if your interested in simply creating a game now of course, and you don&#8217;t have to use a sandbox unless you want to run downloaded game code, but I don&#8217;t feel that these technologies really respect the time restricted resources of a small-team game developers (hobbyists, Open Source, relevant Independent gamedev companies).</p>
<p>Respectively, this is also what killed my Haskell gamedev project. That doesn&#8217;t mean I don&#8217;t intend to look into Haskell further&#8212;just not for gamedev tasks in the near future.</p>
<p>And furthermore, both conventional languages and embedded languages almost always require a restart before new code can be tested. I think that by reducing the turnaround time on new game code (or even engine code), the game programming process could be made significantly more accessible to smaller development teams for both smaller ideas or bigger, possibly open source projects.</p>
<p>So what have I actually been doing then?</p>
<p>I&#8217;ve actually been putting together a collection of notes and though experiments designed to push my understanding of Smalltalk and programming language design in general enough to put together a cohesive conceptual design for a decendant of Smalltalk, not to mention brushing up on my understanding of existing Smalltalks and the what the various Smalltalk related communities are working on.</p>
<p>Until recently however, I wasn&#8217;t convinced that there was an existing language that suited my somewhat unusual requirements for implementing this Smalltalk (or should that be preferences?) Recently I finally figured it out.</p>
<p>As it turns out, I believe that the best language for the early prototypes is The Java Programming Language!</p>
<p>I realize of course that Java won&#8217;t give me the best performance, nor will it be the simplest implementation, but when it comes right down to it, I&#8217;m just not familiar enough with another language with the necessary UI capabilities that actually conform to the conventions of the underlying operating system. I should even be able to take advantage of several library bindings before tackling C!</p>
<p>So there you have it, a post almost devoid of any real content, announcing my new programming language and both the interpreter and the design in general are coming along nicely so far, so you can look forward to more interesting details in the near future (like the core principles of the language design or the purpose of the language).</p>
<p>Oh, and one thing before I forget, I&#8217;ve named it The Mention Programming Language.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2009/07/mention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smalltalk is a DSL</title>
		<link>http://alexicalmistake.com/2009/04/smalltalk-is-a-dsl/</link>
		<comments>http://alexicalmistake.com/2009/04/smalltalk-is-a-dsl/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 05:43:25 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Object Oriented]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Squeak]]></category>

		<guid isPermaLink="false">http://alexicalmistake.com/?p=183</guid>
		<description><![CDATA[After reading Torsten&#8217;s nugget of truth in Planet Smalltalk recently I couldn&#8217;t help but be reminded of a Smalltalk based language I&#8217;ve been throwing around lately. Not because my language is interesting yet&#8212;I don&#8217;t even have a prototype concrete syntax&#8212;I&#8217;m actually referring to my immediate reaction when he wrote:
  &#8220;Smalltalk is not a language [...]]]></description>
			<content:encoded><![CDATA[<p>After reading Torsten&#8217;s nugget of truth in Planet Smalltalk recently I couldn&#8217;t help but be reminded of a Smalltalk based language I&#8217;ve been throwing around lately. Not because my language is interesting yet&#8212;I don&#8217;t even have a prototype concrete syntax&#8212;I&#8217;m actually referring to my immediate reaction when he wrote:</p>
<p>  <a href="http://astares.blogspot.com/2009/04/reserved-keyword-conflicts.html">&#8220;Smalltalk is not a language &#8212; it&#8217;s a dynamic object system with the language built in&#8230; [sic]</a></p>
<p>This is, in my opinion, more cautious than it needed to be. Smalltalk really is just a dynamic object system, but beyond that, I would argue that the language is really just a collection of DSLs.</p>
<p>The first, method definitions is kind of the core DSL of Smalltalk. While not necessarily as small as a simple DSL it provides all of the behavioral elements that make Smalltalk code actually do stuff, all of which can be replicated by generating AST objects, programatically.</p>
<p>More obvious however, is the class definition syntax. This quasi-message-send actually causes so many hacks and side effects that suggesting that it resembles any kind of message programmers would be comfortable sending normally is just outrageous! Really it describes the structure of a class and allows us to manage that structure. Oh, we can also file-out that sucker, too!</p>
<p><em>(The OMeta parser generator can also be used to write methods. The tool support was iffy last time I looked at it though.)</em></p>
<p>My point is, Smalltalk is really just a collection of DSLs that allow us to effectively program with a pure object system, and it&#8217;s this phenomenon that I believe will allow us to dramatically improve both the appeal of the language as well as its usefulness in the future.</p>
<p>&#8212; Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2009/04/smalltalk-is-a-dsl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smalltalk and Fire</title>
		<link>http://alexicalmistake.com/2009/01/smalltalk-and-fire/</link>
		<comments>http://alexicalmistake.com/2009/01/smalltalk-and-fire/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 03:02:58 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Gamedev]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[Fire]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://alexicalmistake.com/?p=117</guid>
		<description><![CDATA[This project is no longer in development.
Of all the programming languages I&#8217;m proficient in, not even Haskell is so curiously fun and exciting (in my mind) as the Smalltalk programming language. See the idea behind Smalltalk is deceptively simple, you have objects, which you send messages to. Those messages are handled by methods and finally, [...]]]></description>
			<content:encoded><![CDATA[<p><em style="color: #880000;">This project is no longer in development.</em></p>
<p>Of all the programming languages I&#8217;m proficient in, not even Haskell is so curiously fun and exciting (in my mind) as the Smalltalk programming language. See the idea behind Smalltalk is deceptively simple, you have objects, which you send messages to. Those messages are handled by methods and finally, both messages and objects may maintain and carry references to other objects. This may just sound like any other object-oriented programming language, but all of this happens at run-time, including the creation of those methods, objects and classes!</p>
<p>Given my affinity for computer games, it&#8217;s not surprising then, that I&#8217;ve been eyeing off the usage of some dialect of Smalltalk for programming computer games. Even the performance of Smalltalk is competitive compared to many other high level programming languages. Since most high level game code is easier to program with the increased flexibility scripting/dynamic languages provide Smalltalk has always seemed to me, to be a very attractive counterpart to a C/C++ engine.</p>
<p>The same principle could also be applied to the Lua programming language, which is extraordinarily popular in game development right now, which is more or less <em>designed</em> to be attached to an engine written in the standard engine languages, C and C++.</p>
<p>As I pointed out in my last post, originally I only intended to create a game engine in Haskell, which could then help when developing games or frameworks dealing with the high level game code. But to make this easier I decided to put the conventional game development wisdom to good use, and add to the mix a scripting language instead. Also relevant are Haskell&#8217;s concurrency capabilities which, I believe, are drawing the most attention from more mainstream game developers.</p>
<h3>A Counterpart To Haskell</h3>
<p>It might be interesting to note that, in the early design of Fire, the language wasn&#8217;t actually going to be based on Smalltalk or any language specifically, rather, I was working out some of the design points to help in taking advantage of Haskell&#8217;s concurrency and functional programming capabilities. Eventually I came up with a basic features list along the lines of object-oriented, semi-functional, highly concurrent and prototype based (class-less).</p>
<p>While collecting my thoughts and trying to understand which kinds of syntax would be appropriate I noticed that regardless of which syntax I used, the language would have to almost completely separate the concept of mutable state from the objects themselves, allowing only the use of transaction variables. While I could technically have gone with almost any syntax from there, it&#8217;s a pretty sure thing that regardless of the syntax used, Fire was going to be a somewhat unfamiliar thing to work with. This is where Smalltalk syntax lends itself, not being difficult to adapt and extend, while also known for being easy to learn and unusually expressive.</p>
<p>There were some issues to deal with however. To start with, Smalltalk syntax isn&#8217;t technically a full language syntax, but only provides the syntax for method definitions. By proxy, the construction of objects and message sends is achieved, with a fair bit of help from the development environment (UI). It also helps to point out that <em>image</em> based languages are notoriously difficult to bootstrap, while many game developers these days use text based VCS anyway, it was obvious I would first have to invent the missing syntax.</p>
<p>After (admittedly) more than a few attempts, and the larger part of a notebook full of musings and hypothetical example code, I finally had a complete syntax and at least most of the basic semantics in mind. The resulting syntax now includes a module level notation, an object literal notation, there is a simplified notation for creating lists and everything else is a consequence of sending messages, as expected.</p>
<h3>Difficulties</h3>
<p>There are some issues in combining any object-oriented language with functional programming or concurrency. To make things simpler, and because Fire is designed for game development anyway, I&#8217;ve kept the basic semantics imperative, or more succinctly the language still has the conventional IO semantics of Smalltalk. The main differences, at this point, are the lack of mutable variables within the language itself (beyond TVars) and the extensive use of threads (asynchronous messages).</p>
<p>To make working with transaction variables easier, Fire does provides <em>properties</em>, implemented as objects responding to a &#8216;get&#8217;/&#8217;set:&#8217; property protocol, and a property method syntax which maps a method pair (&#8217;var&#8217;/'var:&#8217;) to another object implementing the property protocol. Any object could theoretically be used here including IORef based objects, but that would generally risk concurrency issues and would probably be a bad idea. This is of course, alongside the usual method definition syntax, and a syntax for creating simply immutable variables, which is syntactic sugar for unary methods.</p>
<p>For those who have worked with Smalltalk, it&#8217;s immediately obvious that the main strength of the design has actually been lost however. That it, the main strength of Smalltalk has always been, at some level, the development environment itself. For those not familiar, the built in development tools allow any object, class or method to be reworked at any point while a program is running, even in the debugger. When developing an application, this level of flexibility is essential to the velocity a Smalltalk programmer can work at.</p>
<p>Such a development environment is probably going to be the most difficult thing to replicate in Fire, since both the UI frameworks as well as the tools themselves must be created from scratch. The VM will also likely require a way to allow programmers to ignore the immutability restrictions.</p>
<p>Luckily I do have something along the lines of a plan. What I believe will do the trick here is a simple dual mode VM, allowing (through the reflection layer) the modification of objects, while the finished games will use a release mode, preventing objects from being accidently scrambled. This solves both the development environment concerns, while keeping the language concurrency safe and hopefully simpler to integrate into the Haskell based engine. As as for the UI, I&#8217;ll get to that in a later post&#8230;</p>
<p>Clearly there&#8217;s a lot of stuff going on here, but for now, most of the work will focus on simply getting the spec written and the VM functioning. After then I can start moving only some of the details like the engine itself, and the libraries on either side of the language bridge. Actually, there&#8217;s the language bridge too, for that matter.</p>
<p>The purpose of this post is really just to give some idea of the reasoning behind a couple of the high level design choices used in Fire. There are plenty of other topics to consider yet, just at the language level, for example, prototypes systems are even more convention based than Smalltalk since the entire class system is replaced simply by methods for cloning and modifying the definition of objects. In any case, I think it should be interesting to see Smalltalk finally being applied to some serious game development, especially paired up to Haskell as well.</p>
<p>&#8211; Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2009/01/smalltalk-and-fire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Game Scripting Language (In Haskell)</title>
		<link>http://alexicalmistake.com/2008/12/a-game-scripting-language-in-haskell/</link>
		<comments>http://alexicalmistake.com/2008/12/a-game-scripting-language-in-haskell/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 08:21:29 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Gamedev]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Mention]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://alexicalmistake.com/?p=88</guid>
		<description><![CDATA[Mention in this post refers to a different project than The Mention Programming Language based on Smalltalk. In fact, name was originally intended for a Smalltalk anyway and got reused twice privately before I was happy with the scope of the project (feasibility).
Also, this project was killed some time ago. I&#8217;ve moved onto other things [...]]]></description>
			<content:encoded><![CDATA[<p><em style="color: #880000;">Mention in this post refers to a different project than The Mention Programming Language based on Smalltalk. In fact, name was originally intended for a Smalltalk anyway and got reused twice privately before I was happy with the scope of the project (feasibility).</em></p>
<p><em style="color: #880000;">Also, this project was killed some time ago. I&#8217;ve moved onto other things and when I look into more Haskell programming I will not be resurrecting this project (I have some more practical ideas in mind).</em></p>
<p>In my last attempt at coding gamedev, Haskell style, I found my true enemy to be my inability to fathom the modeling of high level game objects in basic Haskell records. The problem was pretty simple, I&#8217;m either not yet good enough to figure out how to implement high level game objects in Haskell, or the task requires something closer to the Functional Reactive type frameworks. The same Functional Reactive Programming that I still, to this day, don&#8217;t really understand.</p>
<p>In theory I should probably just keep reading through my copy Real World Haskell, but I always like to have one gamedev project and one language that I&#8217;m working on. This doesn&#8217;t necessarily include any reading or minor experiments of course, but it does help to limit how thinly I spread my free time and it&#8217;s nice to keep the gamedev and language design cravings in check (plus, it&#8217;s kind-of a fun, strange kind of duo, really).</p>
<p>Since my Haskell game project was essentially killed a while back, that left me with some time to work on a some gamedev projects in Python. The premise was, high level language, good for modeling game objects and apparently a solid library lineup. Solid at least, until I realized that almost all of my games require one simple critical feature. Tools.</p>
<p>The odd reality of any serious game development is that, no matter how clever your game is, you still need the tools, in which all of the content is created and developing those tools is, in my experience, a very hardcore UI intensive process, which given the current state of UI frameworks in Python is well&#8230;not good. Actually, perhaps that&#8217;s not fair, GTK may have done the trick nicely, but by the time I&#8217;d figured out how much UI I felt was really necessary, it seemed like I shouldn&#8217;t have to develop yet more UI code for the in-game UI.</p>
<p>Oh&#8230; and the Mention programming language is on temporary hiatus due to the heavy usage of untested extensions to the lambda calculus and type theory. While I slowly learn the math skills involved in learning the type theory (not that there aren&#8217;t other benefits to be had from learning mathematics properly anyway), I figure its going to take me at least a year to get it fully on track again.</p>
<h3>Moving On&#8230;</h3>
<p>So now there I was&#8230; back in Haskell&#8230; the Mention language stalled&#8230; and no game development project in sight&#8230; So I came up with an idea. What if I put some of the ideas I had floating around, and put them all together as a game, a language, and something to keep me working through Haskell. I would be developing a game engine designed specifically to beat the crap out of Haskell&#8217;s concurrency&#8212;and my CPU too, I suppose&#8212;while I also designed a high level game object language to implement the actual, high level game stuff.</p>
<p>It wasn&#8217;t actually until I&#8217;d been working on the language for a couple of weeks, when I realized what I was actually trying to implement, however. This link should probably actually be old news to anyone interested in gamedev, but here it is anyway: Tim Sweeney&#8217;s POPL 2006 talk &#8220;The Next Mainstream Programming Language: A Game Developer&#8217;s Perspective&#8221; (<a href="http://www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt">PPT Slides</a>, <a href="http://www.scribd.com/doc/5687/The-Next-Mainstream-Programming-Language-A-Game-Developers-Perspective-by-Tim-Sweeney">Scribd Slides</a>, I couldn&#8217;t find the video of the talk again.)</p>
<p>In the talk, he covers quite a few of the practical qualities that a modern commercial game contain in lines of code, complexity, and so on, but the point that stuck with me the most was the section on Concurrency. I swear, it literally screams &#8220;HASKELL!,&#8221; and not just because Haskell is mentioned later on, either. What I didn&#8217;t realize at the time, was that I&#8217;d end up trying to pull off a solution to Sweeney&#8217;s challenge, rather than simply using Python or Ruby and keeping the games&#8230; non-concurrent (or semi-concurrent).</p>
<p><em>There is actually a little section on why he doesn&#8217;t like Haskell at the very end of the slides. I&#8217;d just like to point out (for those who don&#8217;t realize this) that they&#8217;re all mostly irrelevant concerns since they&#8217;re all solvable in about five-seconds-flat by anyone who has more than two months of experience with Haskell, or aren&#8217;t significant problems anyway (laziness is not a performance hog, and targeting GHC optimizations isn&#8217;t impossible, <em>et cetera</em>). Honestly, I actually think it&#8217;ll probably be the two months of experience that causes the most problems (i.e. the unpopularity), but that may not be as much of an issue either, as better learning materials emerge.</em></p>
<h3>Three Languages, for a Good Computer Game</h3>
<p>So I&#8217;ve mentioned Haskell, and alluded to a scripting language, and of course we also have our shader language. To start with, I&#8217;d like to point out that the shader language is only partially bound to the game language, and even then it&#8217;s an indirect link, courtesy of the abstraction layer that typically accompanies the rendering code&#8212;that&#8217;s engine side&#8212;thus, the shader language may either be a separate language project, or (as I&#8217;ll be using) a prepackaged solution like GLSL. Regardless, at the moment only the engine and the scripting language are important.</p>
<p>This brings us to the title of the post then, a game scripting language, and it&#8217;s a strange one too. The problem is actually not as simple as just dropping in any kind of scripting language. No, the engine is intended to push Haskell&#8217;s concurrency potential to the limit (even on tomorrow&#8217;s hardware), but for this to happen, the scripting language must not become a bottleneck in the process. Sounds simple, right&#8230; but what happens when you build a game that scales big, really big even&#8212;beyond Supreme Commander big&#8212;and now it&#8217;s the scripting language that&#8217;s trying to handle unreasonable amounts of data (in addition to the engine). I don&#8217;t want to force game programmers to rewrite high level game code back in Haskell, simple to make it fast enough, that&#8217;s the entire purpose of the scripting language.</p>
<p>The solution then is the same as in the engine, make it massively concurrent, just like that Tim Sweeney talk was implying. But, a presumably object-oriented language, with extreme concurrency can only really mean one thing&#8212;it has to be semi-functional, and support either the process-oriented approach (Erlang), or the same Software Transaction Memory as Haskell below it&#8212;I chose the latter.</p>
<h3>From Smalltalk, To Software Transactional Memory</h3>
<p>Given the requirement for a Software Transactional Memory, it might seem obvious to simply write a variant of OCaml or Lua, but my experience with Smalltalk demanded otherwise. I believe that the best design pattern for implementing games is the prototype pattern. There are only really a few languages that make this pattern the global design pattern for the language, and in my opinion, JavaScript isn&#8217;t really the language of choice for writing semi-functional code in.</p>
<p>What I&#8217;ve done then is to start from a basic Smalltalk messaging syntax (that&#8217;s about the only real syntax in Smalltalk anyway) and then extend it to a full, text only syntax, removing all of the class and inheritance features and lastly, removing the main source of side effects, mutable variables. The result is a semi-functional object-oriented programming language, exclusively applying Software Transactional Memory for mutable object state, and making heavy use of prototypes and delegation.</p>
<p>There&#8217;s actually quite a lot, going into the design of <em>Fire</em>, oh yeah, that&#8217;s the name of this little programming language, and it would be quite pointless to go into great detail, at the end of an already lengthy post. What I can promise however, is a complete language specification, for those who are interested in the precise definition of the language and core libraries. And for everyone else, I should be following up this post later with essays covering some of the challenges faced in the unusual design requirements of The Fire Programming Language.</p>
<p>Anyway, that&#8217;s basically the status update, or the plan at least. The Fire Programming Language does actually have a complete syntax already too, and the first draft of said syntax chapter in the spec is also almost complete. Any question or reservations about the project are more than welcome, either in the comments or by email, and lastly&#8230; This is a long term project, one which I suspect may take anywhere up to year or more, before it hits a 1.0. What I do expect though, is some alphas and betas ready within 6 months or so and I&#8217;ll be setting up some git (public) repositories over the next couple of months for anyone who wants to muck about with it or give feedback (and the spec will slowly appear on a pages section of this blog).</p>
<p>&#8211; Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2008/12/a-game-scripting-language-in-haskell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FoNC Wiki</title>
		<link>http://alexicalmistake.com/2008/06/fonc-wiki/</link>
		<comments>http://alexicalmistake.com/2008/06/fonc-wiki/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 01:20:28 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[OMeta]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://krysole.net/2008/06/06/fonc-wiki/</guid>
		<description><![CDATA[If your&#8217;re interested in post-Smalltalk research, or more specifically the implementation of such technologies then you might be interested in keeping an eye out on the work being done by Ian Piumarta, et al.
Well, the good news is that a wiki has been setup for increased public communication about the project.
You can check it out [...]]]></description>
			<content:encoded><![CDATA[<p>If your&#8217;re interested in post-Smalltalk research, or more specifically the implementation of such technologies then you might be interested in keeping an eye out on the work being done by Ian Piumarta, et al.</p>
<p>Well, the good news is that a wiki has been setup for increased public communication about the project.</p>
<p>You can check it out over at&#8230;<a href="http://vpri.org/fonc_wiki/index.php/Main_Page">linky</a></p>
<p>&#8211;Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2008/06/fonc-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evil Schemes to stop the Squeaking</title>
		<link>http://alexicalmistake.com/2008/02/evil-schemes-to-stop-the-squeaking/</link>
		<comments>http://alexicalmistake.com/2008/02/evil-schemes-to-stop-the-squeaking/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 08:54:15 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Scheme]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[MMeta]]></category>
		<category><![CDATA[OMeta]]></category>
		<category><![CDATA[Parsing]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://krysole.net/2008/02/06/evil-schemes-to-stop-the-squeaking/</guid>
		<description><![CDATA[After working on the Squeak based Mention prototype for some time now, I&#8217;ve come to the conclusion that its finally time to put the prototype to rest. Yes, I realize that it have never actually worked yet, but the truth is, Squeak still lacks significant services for language research and development.
The final nail in this [...]]]></description>
			<content:encoded><![CDATA[<p>After working on the Squeak based Mention prototype for some time now, I&#8217;ve come to the conclusion that its finally time to put the prototype to rest. Yes, I realize that it have never actually worked yet, but the truth is, Squeak still lacks significant services for language research and development.</p>
<p>The final nail in this case, goes out to the Transcript window, now defunct for god knows why. I actually considered attempting to find a fix for it, or even fixing it myself, and then I realized the obvious. I don&#8217;t like Squeak. Its always flakey, or broken, or difficult, or anything but genuinely useful!</p>
<p>I&#8217;m sure there are plenty of things it does well if you&#8217;re interested in Seaside, but I&#8217;m not.</p>
<p>Then I considered the last language I was working on (a concept Lisp that was intended to integrate newer Object-Oriented ideas like Traits). The interesting thing about Lisp is that it handles the Virtual Machine work like there&#8217;s no tomorrow. Its also simpler and console based, and you can generate lambdas without even really thinking twice. Hugely important if you want to quickly prototype some high level stuff, that also needs to run reasonably efficiently (not stuff that&#8217;s directly part of the language, but rather the VM&#8217;s implementation itself).</p>
<p>So, I&#8217;ve decided to finally get around to learning the thinking mans Lisp, Scheme. Scheme may not be massively different from other Lisps (i.e. Common Lisp), but it does tend to do things in a somewhat more straightforward fashion. The biggest example I can think of is that it is a Lisp-1 language, which means that there is only one namespace. This is a big plus in my book, for languages that do not provide separate syntaxes for selectors and variables. Mention of course has two namespaces, due to the selector syntax involved in sending messages. On the other hand, selectors in Mention and Smalltalks in general do not always correspond to the same function object.</p>
<p>If all goes well, I should get started writing actual code within a couple of weeks, with a reasonable understanding of Scheme. Since I already know a reasonable amount of Common Lisp I don&#8217;t believe it will take too long to learn, but you never really know with close cousins in the languages world.</p>
<p>I would also like to take the time to note that I&#8217;ll be developing a reworking of the OMeta parsing architecture for PLT-Scheme (or some other dialect if I swap away from PLT, but that seems unlikely). This parser framework is called MMeta, as I&#8217;ve probably mentioned (no pun intended) before, and will serve as the basis for the compiler and parser used throughout the Mention implementation and within the implementation. The PLT-Scheme variation of the actual parsing code (and the S-Expression support), will be referred to as MMeta-L (for Lisp).</p>
<p>&#8211; Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2008/02/evil-schemes-to-stop-the-squeaking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bootstrapping Objects</title>
		<link>http://alexicalmistake.com/2008/01/bootstrapping-objects/</link>
		<comments>http://alexicalmistake.com/2008/01/bootstrapping-objects/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 09:21:59 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Languages]]></category>
		<category><![CDATA[Bootstrapping]]></category>
		<category><![CDATA[Mention/SLP]]></category>
		<category><![CDATA[Object Oriented]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://krysole.net/2008/01/28/bootstrapping-objects/</guid>
		<description><![CDATA[Ok, my prototype is slowly moving along, but one thing still alludes me. What is the best set of objects to bootstrap the system with, and which objects should be written on top of the system after the system is running?
The final version of the language was meant to be based on a concept of [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, my prototype is slowly moving along, but one thing still alludes me. What is the best set of objects to bootstrap the system with, and which objects should be written on top of the system after the system is running?</p>
<p>The final version of the language was meant to be based on a concept of method inlining. Basically, since most memory accesses are <em>more or less</em> constant events within a message, and even when they&#8217;re not, most of the code could be inlined further down the message stack, we could rather than using conventions or making the language very memory neutral/high level, we can instead allow programmers to directly manipulate their objects.</p>
<p>Of course this doesn&#8217;t really help us now (the current prototype is based on Squeak, which lacks the effective memory model to warrant using raw memory layouts yet), but even if we did implement this approach, we would still require a more generalized object layer on top of it. For this reason I believe that implementing a more restricted object model is in order.</p>
<p>To start with, I believe the basic object structure will be needed (Objects must be defined by the external system), and from there I will attempt to describe the general structure of the language using the Multi-Method equivalent of delegation (traits). This will include all of the necessary interfaces required to make the language self sufficient post bootstrap (except the Virtual Machine itself which will be rewritten in C or Haskell until the language can compile itself).</p>
<p>There will also be several objects that need to be constructed right from the word go, which includes, roughly, Integers, Floats, Strings, Symbols, Lists/Arrays, Dictionaries, Classes, Traits, and the base level behavioral interfaces that apply to all objects. These objects will be provided from Squeak directly, or will be implemented on a Generic object Squeak class, which can provide all of the necessary behaviour to bootstrap language level objects.</p>
<p>One last point I&#8217;d like to make. The behavioral interfaces do not actually apply to Mention objects specifically, but rather describe how the programming environment reacts to objects in general. Any object may be added to the Mention system simply by defining the fundamental interfaces required (essentially just some relative typing information for the dispatch engine), and then it can be used anywhere in Mention that actual Mention objects can be! In-fact, this goes so far in the language that there will very likely be components that do not even encode type information into objects for the sake of performance (no object headers or garbage collection). This is possible if the interfaces do not require any dispatching at runtime (otherwise the lack of type information interfaces will cause compilation errors!).</p>
<p>Anyway, hopefully I&#8217;ll have the prototype more or less working soon and you&#8217;ll be able to check it out for yourself, though it won&#8217;t do very much at the moment;)</p>
<p>&#8211; Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2008/01/bootstrapping-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growing Pains &#8211; Bootstrapping a new Language</title>
		<link>http://alexicalmistake.com/2008/01/growing-pains-bootstrapping-a-new-language/</link>
		<comments>http://alexicalmistake.com/2008/01/growing-pains-bootstrapping-a-new-language/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 19:32:05 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Languages]]></category>
		<category><![CDATA[Language Design]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[SLP]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://krysole.net/2008/01/25/growing-pains-bootstrapping-a-new-language/</guid>
		<description><![CDATA[Creating a programming language is hard. I&#8217;m not talking about the kind of hard that&#8217;s involved in math problems or even getting pwned with that rather expensive new internet connection (no, its not the mouse either&#8230; you&#8217;re really just not that good;). No, I&#8217;m talking about the sheer amount of effort required to first come [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a programming language is hard. I&#8217;m not talking about the kind of hard that&#8217;s involved in math problems or even getting pwned with that rather expensive new internet connection (no, its not the mouse either&#8230; you&#8217;re really just not that good;). No, I&#8217;m talking about the sheer amount of effort required to first come up with your amazing, world changing programming language, and then realizing that you actually need to implement the whole thing a few times over, using variations of that language that are in-fact worse than what you started with (unless your using Java, in which case, jump right ahead).</p>
<p>As you might have guessed I&#8217;m mainly writing this out of mere frustration, that even the dumbed down, simplified variation of Mention that I&#8217;m attempting to bootstrap is going, well, slowly. Very slowly.</p>
<p>So far I&#8217;ve come to the conclusion that there may even be some general rules of thumb, which to the enlightened few, might not actually seem all that obvious. Firstly, the current attempt to bootstrap Mention is utilizing the Squeak programming language/tool-chain, in the hopes that it would help to speed up the development process. It didn&#8217;t. Actually, I&#8217;m even wondering if its actually slowing me down&#8230; Which brings me to the obvious question. Why?</p>
<p>The most useful languages that spring to mind after asking this question, probably actually come from the Lisp family, along the lines of some dialect of Scheme + a parsing language to complete the picture. But what would make a language like Lisp, outgun its successors like Smalltalk or perhaps even python. Well, actually, I think python might even work, but Smalltalk has issues&#8230; Namespace issues.</p>
<p>The issues with Smalltalk I&#8217;m referring to are the conventions surrounding the naming of global variables, or at least the lack-there-of. Many scripting languages and most Lisps, allow the programmer to assign to any old variable name, and its simply there, for the entire world to see. But of course, when you have to think in objects, you can&#8217;t expect to have globals. After all, good Object-Oriented software should be based on the interaction of object, and not glorified globals, singletons, or otherwise. Although you could be mistaken for thinking that the Application object is actually a global, but of course its not. Why, well I&#8217;m not sure really, its just not.</p>
<p>I&#8217;d rather not go on any further with this, but the point is simple. We know that software systems evolve, and don&#8217;t simply get designed and then implemented. And we know that software is not actually re-used until at least <em>some</em> refactoring has been performed (generally more than some). So why can&#8217;t we just use our globals while we understand the problem we&#8217;re working on, and if they do the job we can just keep them, and if they really are flakey code smells bend on silicon armageddon then we can simply refactor them once we understand how the problem breaks down into the individual problem level (application, subsystem, <em>et cetera</em>) objects.</p>
<p>&#8211; Lorenz <em>(feeling slightly better ;)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2008/01/growing-pains-bootstrapping-a-new-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Haskell</title>
		<link>http://alexicalmistake.com/2008/01/learning-haskell/</link>
		<comments>http://alexicalmistake.com/2008/01/learning-haskell/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 09:26:53 +0000</pubDate>
		<dc:creator>Lorenz Pretterhofer</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Types]]></category>

		<guid isPermaLink="false">http://krysole.net/2008/01/16/learning-haskell/</guid>
		<description><![CDATA[Well I finally bit the bullet and decided to learn the Haskell programming language. For those in the know, Haskell is a very strictly typed language (like some kind of draconian Java dialect), which uses a type inferencing technique to allow the programmer to write code without excessively typing&#8230; well&#8230; the types really.
What makes the [...]]]></description>
			<content:encoded><![CDATA[<p>Well I finally bit the bullet and decided to learn the Haskell programming language. For those in the know, Haskell is a very strictly typed language (like some kind of draconian Java dialect), which uses a type inferencing technique to allow the programmer to write code without excessively typing&#8230; well&#8230; the types really.</p>
<p>What makes the language interesting however, is that is does this kind of strict typing from within a pure functional syntax (one that is very close to the mathematical lambda notation), and quite literally everything except the bindings themselves are first class values (objects really), and they all have types, which are themselves of some type and all can be fully reasoned with using the full capabilities of the syntax.</p>
<p>What all this means is that unlike Scheme (Lisp), instead of allowing objects of any type as values, all values and expressions must be the the correct type in any given piece of code (or they must be inferred transitively from their surrounding/contained code). Any mismatches are not allowed by the languages semantics and will cause compilation (or interpretation) errors.</p>
<p>This brings me to the point of this post, is a strictly typed language actually less or more capable than a weakly typed language. Also, if this is the case, does is it make the language better, or are other considerations more important (i.e. architectural concerns)?</p>
<p>I find this discussion interesting since it quite effectively contrasts the type system I designed, for Mention. While Mention&#8217;s type-system is effectively not just weakly typed but in many cases not checked at all, it allows arbitrary objects to be used in most situations, as long as they conform to the interfaces requested (in the type annotations or implicitly like Smalltalk).</p>
<p>Already I&#8217;m finding that I miss the more flexible type system when I find the only error messages cryptic type incompatibilities (what do you mean the type &#8216;a -> [a] -> a&#8217; isn&#8217;t compatible with &#8216;Num a&#8217;&#8230; Hell where is that number anyway?). It is slowly getting easier as I understand the impressive type reasoning capabilities of the language, not to mention the ominous Monad magic (think C++ templates on steroids&#8230; although probably very much easier to use effectively)</p>
<p>Presumably as I continue to work with both Haskell, Smalltalk (Squeak), and Mention I can come form a better opinion on the effects of strong vs. weak type systems (in languages with first class function and type objects). Oh&#8230; and they are right&#8230; Haskell does seem to be a language well worth the effort to learn effectively.</p>
<p>&#8211; Lorenz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexicalmistake.com/2008/01/learning-haskell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
