-
Handling variables
The third in a series of posts laying out the process, step by step, of building an interpreter in Ruby for working with propositional logic. In this post, we expand the interpreter to work with variable expressions in classical propositional logic, like
Continue reading …~p & q
. Since we are dealing with variable expressions and not fixed expressions (like~T & F
), we need to be able to output full truth tables, and not simply resolve the final boolean output. -
Building Pure CSS Trees (part 5)
After the first 4 parts of our series, we have some flexible (S)CSS that will render nested lists as trees. It can render horizontal trees, vertical trees, trees going from top-to-bottom or bottom-to-top, left-to-right or right-to-left , and even bracket-style centered trees.
Continue reading … -
Building Pure CSS Trees (part 4)
The last we left our pure-CSS tree component, it could render both horizontally oriented as well as vertically oriented as well as the inverse direction for either. With each orientation now capable of being rendered in either direction, might we be able to build a tree component that could put the root node in the center of the graph and have half of the descendant graph render to left and have to the right (for the horizontal orientation) or half to the top and half to the bottom (for the vertical orientation)?
Continue reading … -
Building Pure CSS Trees (part 3)
The last we left our pure-CSS tree component, it could render both horizontally oriented as well as vertically oriented; however, each orientation only worked in one direction—the horizontal tree only rendered left-to-right and the vertical tree only rendered top-to-bottom. What if we wanted to render trees in the inverse orientations?
Continue reading … -
Building Pure CSS Trees (part 2)
In our last post, we built a simple pure-CSS tree from a nested list. That tree was horizontally oriented, but what if we wanted a vertically oriented tree? Today, let’s build that.
Continue reading … -
Building Pure CSS Trees (part 1)
Have you ever wanted to represent some hierarchical data on a webpage as a tree? In this series of posts, we are going to build a CSS-only solution for rendering hierarchical trees.
Continue reading … -
An interlude with minitest/autorun
An interlude in a series of posts laying out the process, step by step, of building an interpreter in Ruby for working with propositional logic. In this small post, we take our hand-rolled "tests" and move the code into an executable test script with
Continue reading …minitest/autorun
. -
Proper Propositional Logic
The second in a series of posts laying out the process, step by step, of building an interpreter in Ruby for working with propositional logic. In this second post, we expand the interpreter to handle the full range of valid expressions in classical propositional logic.
Continue reading … -
Starting Simple
The first in a series of posts laying out the process, step by step, of building an interpreter in Ruby for working with propositional logic. In this first post, we build an interpreter for working with simple logical expressions and dig into the specifics of the parts of an interpreter as well as the basics of propositional logic.
Continue reading … -
A Simple Tree Building Algorithm
It is, unfortunately, not that often that I get the opportunity to devise an algorithm to solve a problem at work. Most work simply doesn’t require that kind of thinking. But I thoroughly enjoy that kind of thinking, and thus thoroughly enjoyed the most recent opportunity I had to employ it. The problem was simple (though I have simplified and abstracted it for this post as well): we have a database table of
Continue reading …things
, and thesethings
have a parent-child hierarchy, and we need to display a tree of thesethings
in our UI. So, let’s dig in.