Author Archives: Tenoch

Unified member access and interfaces

This last article told us that there is now two ways to read a member (or element in an array): through a method that returns the value directly, or through a method that returns an alias to it. As for … Continue reading
Continue reading

Posted in sool | Comments Off

Unified member access

State of sool An early design decision in sool was that member access ans indexing operations were all method calls behind the scenes. On top of that, method call with no arguments can be written without parentheses, which makes it … Continue reading
Continue reading

Posted in sool | Comments Off

The great overhaul

Keep it simple, stupid. Let’s see if we can do that: core is simple, add a bit of sugar on top. Functions So we have functions. Let’s see how that works. function Foo,Bar do_it(Meh arg) end This makes a function … Continue reading
Continue reading

Posted in sool | Comments Off

sool’s identity crisis

Pun intended. Yes, really. What’s the problem? Not a problem, really, just a time to sit back, and figure out what sool has become, albeit conceptually. It started as “Lua with static typing”. And this lead to a waterfall of … Continue reading
Continue reading

Posted in sool | Comments Off

Yet another Ouya review (spoiler: it’s great!)

Finally, I got my Ouya! I backed the project on Kickstarter and received my Ouya with two controllers. I am not sure exactly what model it is, nor I am actually sure of how many models there actually are (at … Continue reading
Continue reading

Comments Off

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