-
Archives
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- May 2005
- April 2005
-
Meta
Author Archives: Tenoch
Structs and references (again)
Structs, or value classes, have been a problem since I decided I wanted them. Their only raison d’être has been performance, as functionally they can be entirely replaced by objects. And additionally, the value type semantics is inherent to some … Continue reading →![]()
Continue reading
Posted in sool
Comments Off
Arrays and slices
Arrays in sool, like in many modern languages, should be a little bit smarter than C arrays. C arrays are just a chunk of contiguous memory, with a pointer to the first element. All the rest is pointer arithmetics. The … Continue reading →![]()
Continue reading
Posted in sool
Comments Off
The art of closures
In the previous episode we talked about callbacks, and more generally, of method delegates, which we decided would be only casting to interfaces with remapping of the method names. A concept often associated with callbacks is the anonymous function. In … Continue reading →![]()
Continue reading
Posted in sool
Comments Off
The art of callbacks
I’ve been learning quite a lot of Flash recently, and therefore, of ActionScript 3. It’s an interesting language, and I might make a small review of the features I like. Today however, I’ll focus on the library part of Flash, … Continue reading →![]()
Continue reading
Posted in sool
Comments Off
Sitrep
Formal reference: blah I haven’t done much work on sool lately. However, to try and make things more clear, I started writing down a reference of the language, in its current state. It turns out to be a fairly difficult … Continue reading →![]()
Continue reading
Posted in sool
Comments Off
A few consequences
The last few posts introduced some major changes. Let’s see what fun consequences they might have. Global functions By using the factory functions in classes, we can simulate global functions. One in particular stands out: main. I never had a … Continue reading →
Continue reading
Posted in sool
Comments Off
Selfless vs. selfish and the return of the constructor
A thing came to my mind while writing this about functors. When a class defines a selfless method, object Class selfless no_self() end end it can be called either without an object: Class:no_self() or with one: local instance = Class … Continue reading →
Continue reading
Posted in sool
Comments Off
The expressive power of templates
The current state of things is: interfaces are sets of method prototypes. A class is said to comply with an interface if it implements all the interface’s methods. declaring an interface also creates a so called “generic” class. This generic … Continue reading →
Continue reading
Posted in sool
Comments Off
Syntactic sugar and namespaces
I’ve been playing around more seriously with D lately, and learned a few interesting things about it. By using it in an actual (small) program, I was forced to learn it more thoroughly, and many details that had escaped me … Continue reading →
Continue reading
Posted in sool
Comments Off
Of precision and orders of magnitude
Often in gamedev channels we get questions about what types to use for what kind of data, and most of the time it comes down to “is it going to be precise enough?” In particular, Lua has a single number … Continue reading →
Continue reading
Comments Off
Chickens and eggs
As we know, using nil is a little bit heavy in sool: optional variables must be “casted back” to non optionals using the if as syntax, or the boolean operator or. I was trying to write a simple linked list … Continue reading →
Continue reading
Posted in sool
Comments Off
More about extending templates
For design testing purposes, I was writing a mockup of some future standard classes, and trying to strain the template and interface system. I got into an interesting situation that suggests that we might need to be able to extend … Continue reading →
Continue reading
Posted in sool
Comments Off
Original interface, enhanced interface
One tiny thing bugged me while I was taking a shower this morning, about my big new shiny interface system. Basically, a class implements a few methods. object Foo method bar() end end — call: foo = Foo foo.bar() Then, … Continue reading →
Continue reading
Posted in sool
Comments Off
Generics vs. template, round 2
Sitrep: we have interfaces, which simply define method sets. Interfaces are used: as bounds for template parameters (requiring compliance with the interface) as generic types (to which can be casted any compliant class) The major difference being that in templates, … Continue reading →
Continue reading
Posted in sool
Comments Off
More about generic types
So, with all we said in the last post, sool now has interfaces, which also defines generic classes that can be used to create generic code, which uses dynamic dispatch to work with every class that implements the interface. An … Continue reading →
Continue reading
Posted in sool
Comments Off
sool with interfaces
So, what would sool look like without the classic inheritance mechanism, but with interfaces, embedded subobjects, dynamic interface type, and template with interface-restricted type parameters? As always, we want light but clear and unambiguous syntax, that exposes in a convenient … Continue reading →
Continue reading
Posted in sool
Comments Off
Generics and templates: can we do without?
In short, yes. But that might not be a good idea. First, why would we question their utility? they are a pain to code in the compiler, as I’ve been learning recently. Sure, that’s a compiler-writer problem, but still. they … Continue reading →
Continue reading
Posted in sool
Comments Off
A take on inheritance
Inheritance, we know it, is a cornerstone of object-oriented programming, along with dynamic dispatch, abstraction, encapsulation, and subtype polymorphism (your mileage may vary). In particular, the combination of inheritance, dynamic dispatch and subtype polymorphism allow us to flexibly enjoy: code … Continue reading →
Continue reading
Posted in sool
Comments Off
All talk and no do make soolc a dull compiler
I’ve been a lazy person, and haven’t worked on the compiler’s implementation in a while. I’ve been stuck on some big design problems (namely, template class instantiation) and wandered away to easier activities. And, to make things even more stuck, … Continue reading →
Continue reading
Posted in sool
Comments Off
Mass Effect 3, a review
I just saved the world. Again. Trillions of lives depended on my actions, my sacrifices and my skills, and they were saved. The reapers forever gone, the organics ready to rebuild and live happily ever after. So why do I … Continue reading →
Continue reading
Comments Off