Category: Programming

0

Phabstractic: List Data Types

Lists are very important abstract data types, and are used in many many different applications. Stacks are often used with programming languages, and in fact some programming languages depend entirely on a stack, such as Postscript.

0

Binary Negative Space

The four most popular methods for encoding (representing) negative binary numbers are known as “sign and magnitude”, “ones’ complement”, “two’s complement”, and “Excess-K”. There are alternative methods as well that aren’t as popular such as negative binary where the number base itself is actually negative (being negative 2).

1

Magic Hexadecimal and High Octane Octal

That’s all there is to hexadecimal and octal. As you can see, hopefully, it’s not too complicated and is quite a bit like binary. Hexadecimal and octal were introduced to me when I was editing data files in a text editor that displayed the hexadecimal values of each byte as well. It was a pretty useful program.

0

Phabstractic: Restricted Set Data Type

By combining the restrictions predicate and the set we are able to configure a Set that only holds certain objects and types. This means I can make a set of integers, or a set of nodes, or a set of whatever without fear that the set will hold anything else.

1

Algebraic Tron

We’ve discussed how binary representations are fed into a processor which takes that input and goes through a series of steps depending on that input to create an output, but how do we actually make that happen? To do so you would choose a programming language, or create your own, dependent on the desired level of control over the machine.

0

Phabstractic: Structure Data Type

Structures are a data structure supported by many different languages. The usefulness I think of this particular abstract data type is the ability to be accessed as an array, enabling TaggedUnions to act like normal variables.

1

The Computer Tongue

We’ve discussed how binary representations are fed into a processor which takes that input and goes through a series of steps depending on that input to create an output, but how do we actually make that happen? To do so you would choose a programming language, or create your own, dependent on the desired level of control over the machine.

0

Phabstractic: Abstract Factory Pattern

The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes.

0

The Wonderful World Of Binary

I remember learning about binary when I was just an elementary student from a How Stuff Works book. I must have checked out that book five times, re-reading the same material. I was fascinated with it, but pretty soon I wanted to know more. Unfortunately, my reading material was limited for several years before I could advance to higher topics.

0

Phabstractic: Tagged Union Data Type

Many programming techniques and data structures – including rope (data structure), lazy evaluation, class hierarchy (see below), arbitrary-precision arithmetic, CDR coding, the indirection bit and other kinds of tagged pointers, etc. – are usually implemented using some sort of tagged union.

0

What Is A Computer?

This question is technically very broad. Computers have existed ever since the first abacus was invented. A computer is anything that helps you compute, or perform mathematics. This definition has been vastly expanded in recent decades due to technological advances. At the core of it all though, the definition is the same.

0

Phabstractic: Restrictions Predicate (Data Type)

Filters are important and very useful objects, allowing values or other logic to be filtered in and out of a particular set of data. Restrictions.php offers a way to use type checking in PHP, but in a very flexible and dynamic way. This can be useful for defining lists or sets that only accept certain values, which is useful for code cohesiveness and can reduce error checking.

0

Computer, This Is User

The computer itself (the object you plug everything else into) is the core of the whole construction. Without this part, you wouldn’t have a computer set-up at all. It is the piece you plug everything into because it processes and manages everything else.

1

Phabstractic: Set Data Type

Sets are very important mathematical constructions, and enable the computation of many other abstract data types. A set can have singularly exclusive values, or can have multiples of the same value in them. Sets can be compared using algebraic operators, and can exist as subsets of other sets. Set abstract data types can hold references as the data of an element, enabling some interesting behavior.

0

Phabstractic: Array Utilities

These methods are very useful for arrays, and overcomes some limitations that object conversion and array_unique have.  I would recommend using these functions instead of the built-in PHP functions for these purposes.

0

Phabstractic: Identity Trait Feature

The feature defines a static property for the using class.  This static counter remains unique on each poll for a new identity (in this case it’s an integer).  The $identityCounter must be ‘increasable’, that is, every time its accessed or ‘advanced’ it must be unique from all the identity values before it.  Counting up is a very easy way to accomplish this.

0

Adventure Game Tests

I have Unity game engine / creator, and I happen to also have Adventure Creator. This is an anticipation that I make an adventure game. I’ve always been interested in point-and-click adventure games, but I’ve become more so in the last year.

0

Phabstractic: Type Enumeration

With this data ‘type’ we would, for instance, be able to perform our own type check. However, our type check would be entirely dynamic, as opposed to a static typing system where, in short, the variables can’t change their type once they are initialized.

0

Phabstractic: Enumeration Data Type

PHP doesn’t have an enumeration data type, so I built an enumeration generator of my own. It actually won an award on phpclasses.org! It has been refactored to use the Configuration feature, formatted to follow the PSR standards as best it can, and relicensed under the MIT License.

0

Phabstractic: Configuration Trait Feature

The thing about PHP and the mixin’s I’ve developed is that they are not necessarily a class, instead the idea is that they are a trait that offers a particular feature to another class. So you define a feature, something the class can do, such as logging, or being able to hold configurations (see below) and then you can add it to a particular class.