A Nice Version Numbering System At AdColony we eventually standardized on the following version numbering system for software releases. I'm quite happy with it and it's working out well: Codebase.Feature.Bugfix[.ReleaseCandidate] The most notable feature is that the true version number has four parts but we drop the fourth part for public-facing marketing
Rogue 'select' (AKA Decision/Ternary Operator) One thing that's been missing in Slag/Bard/Rogue over the years is an equivalent to the decision operator AKA ternary operator, e.g. // C++ printf( "The switch is %s.\n", setting ? "ON" : "OFF" ); Today I finally added something comparable to Rogue. It's called the select operator and in its
A Better C++ Vector Wrapper In Rogue When I wrote my first version of this a few days ago I realized that Rogue's inline C++ support was not adequate for working with template types in C++ - there was no way to obtain the C++ name of a Rogue type for templating purposes. I added a few
2DX - Projection Matrix For 2D Graphics With 3D Capabilities The new Rogue Plasmacore I'm working on has 2D and 3D capabilities. The 3D will be typical 3D in many ways but the 2D is something a little different. It's important to me that the 2D graphics be as easy and straightforward to work with and think through as always
Wrapping a C++ Vector in Rogue A consequence of a conversation I was having tonight, here's a brief code sample that demonstrates wrapping the C++ vector class in a Rogue class: VectorWrapper.rogue #================================================================== # VectorWrapper.rogue # # February 29, 2016 by Abe Pralle # # Compile with RogueC v1.0.2+ from # https://github.com/AbePralle/Rogue # # roguec VectorWrapper.rogue
Rogue's Trace Command I finally got around to reimplementing a low-priority, high-utility command that I first made in Bard: the trace command. trace just prints out where in the source code the program is executing and/or the given arguments as a string along with what each one evaluates to. That sounds a
Flag Passing in Rogue I just added a handy feature to Rogue: a named parameter passing mechanism that's focused primarily on the passing and receiving of logical (boolean) flags. It reduces the amount of code that must be written and makes coding more intuitive and self-documenting. I use logical flag parameters quite often to
Table and StringTable Today I encountered the "age-old" problem of wanting to be able to use a StringBuilder as a key in a lookup table keyed to strings. Working on the new Rogue Plasmacore, my message passing system transfers byte arrays containing various strings. Many of the strings are the same every frame,
Rogue Fallback Methods Overview I just added fallback methods to Rogue, where fallback methods are getters and setters that are invoked unless a property of the same name already exists. The Gritty Details Up until now access methods (getters and setters) have always trumped direct access to properties, but fallback methods are a
Git Branch Cheat Sheet Because I can never remember.™ CommandDescription git checkout -b develop Create a new branch develop and switch to it; can be done after local modifications. git push -u origin develop Push the branch (after committing). git branch See existing local branches that have been checked out or created. git remote
Even Better IntX This morning I realized the flaw in my IntX scheme that I presented in my last post [https://abes-codeblog.ghost.io/a-better-intx/]. First I realized that my algorithm wasn't working for non-negative integers that were a multiple of 7 significant bits and that my test cases were sloppy that way.
The Best IntX Yet [Edit: I've changed my mind about all this; see Even Better IntX [http://abes-codeblog.ghost.io/even-better-intx/]]. I've always had some go-to technique I call IntX Encoding for compressing integers into a variable number of bits (fewer on average) but the specifics have changed over the years. Old Ideas Originally
Implementing Rogue's Module/Namespace System I decided to add "modules" (AKA namespaces) to Rogue to be able to start making some auxiliary libraries without worrying about name collisions with end-developer code. Here's the syntax - pretty straightforward and C++-esque: # AlphaBeta.rogue $module Alpha class Value ... endClass class XYZ ... endClass $module Beta class Value ... endClass
Sudoku Board Generator A few weeks lately I caught Sudoku Flu on my Microsoft Surface Pro [https://www.microsoft.com/en-us/store/apps/microsoft-sudoku/9wzdncrfhv60] and it spread to my iPhone [https://itunes.apple.com/us/app/sudoku/id366247306?mt=8] and my Mac [https://itunes.apple.com/us/app/sudoku-deluxe/id410038420?mt=
An Arbitrary List Permutation Algorithm On occasion I find myself needing to be able to take a list of data and generate permutation number n of all possible permutations. I've developed a neat, simple algorithm to do so and I've added two new List methods to the Rogue Standard Library to make generating arbitrary list
Inline Native, Native Properties, and Macro Methods I've made a couple of additional improvements to Rogue's native support. First I came up with an even better way to inline native code. You write native("...")->Type (the return type and parentheses are optional) and the compiler not only throws the string into the output C++ code with
Native Methods in Rogue With Rogue I'm achieving a long-standing dream of being able to embed native method implementations within Rogue source in a simple way. There are now several ways to hook in native code; I'll briefly touch on them all using a series of examples. Rogue's primitives types (Real, Float, Long, Integer,
Rogue Augments Rogue now has a nice new ability in its object-oriented tool-set: the augment. Originally appearing in Slag, I've brushed off the augment and expanded its capabilities. At its simplest you can use an augment to define a single class in several different pieces. Any properties and methods defined in the
Null-Check Waterloo My original ideas for supporting optional values were based around the concept of what I call a "null-checked block" - an 'if' statement or similar structure that would naturally guarantee that a null pointer access would never happen because 1) only optional values could be 'null', and 2) you would
Optional Types in Rogue I've added built-in optional types to Rogue - classes ending with '?' (e.g. "Integer?") have class definitions automatically generated that are analogous to the following: class Optional<<$DataType>> PROPERTIES value : $DataType exists : Logical METHODS method init exists = false method init( value ) exists = true endClass Usage of optional types
contingent I finished implementing the 'contingent' control structure yesterday, which completes the set of Rogue control structures. Contingents allow you to "bail out early" of a logical test, similar to a 'return' or a try/catch/throw but used for local logic instead of cross-method exceptions. The syntax is this: contingent
Rogue Tasks "Tasks" are a neat feature of Rogue. If you tag method with the [task] attribute it becomes an asynchronous method that can be used like a thread. It appears to be concurrent but it is actually executing as a series of updates on the single-threaded main update loop. Two additional
New Year, New Language (or: Back in Black) I've given Unity a pretty fair shot over the last six months. There's some good stuff there to be sure - I've got a nice little Roguelike combat engine going. And yet - I still feel like I'm constantly working against the grain; working around the API to have the
Hello World in Bard v0.3 I've got Hello World working in Bard v0.3! That's what I"m calling the version of the language supported by my new Node.js-based compiler, BTW. Here's the original "Hello.bard" source file (you may notice a few small design changes from my last blog): routine main->Integer println(