J Balvin Debuts New "Blanco" Song
J Balvin shares new track.
by Milca P.Blanco
J Balvin
Editor Rating: VERY HOTTTTT
User Rating: make it stop - 13% (2)
J Balvin has returned to deliver on his newest "Blanco" single, penning it as an "ode to Medellin." He previously teased his fanbase with the track via social media ahead of its official drop.
With the new cut, the Colombian superstar drops off a Colin Tilley-directed clip that takes on the track's title to set the mood with an icy video that finds Balvin decked in all-white fits while adorned by a cast of eccentric dancers and a pet cat or two.
It marks only the latest instance of Balvin and Tilley's longstanding relationship as the director previously worked on Blavin's "Que Pretendes," "Yo Le Llego," "Cuidao' Por Ahi," and "La Cancion" clips.
Quotable Lyrics
For real, made in Medellín, eh
Te lo doy sin que tenga' que pedir, eh
Te seguí, me cambié de carril (Wuh), ey
Marea'o, no sé si ir o venir


--- template: example.html title: Drag-and-Drop example shortdesc: Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857. docs: > Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857. tags: "drag-and-drop, gpx, geojson, igc, kml, topojson" cloak: Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---


####Every small modules should has:
1. source code
2. UT
3. example
4. cocoaPods spec
####Some team works:
1. every small module should generate apple doc.
####We need 3 types of repository:
1. (1) Main project
2. (1) Private cocoaPods specs
3. (N) Module project which comes form cocoaPods template project
####What you need to do:
1. create project __cocoaPodsTemplateProject__
2. ```git init```
3. ```git remote add origin 'git repo'``` it should be GitHub or BitBucket
4. ```git pull origin master```
5. add __Podfile__ file and some pod lib you need in this project
6. ```pod install```
7. ```pod repo add PrivateCocoaPodsSpec https://github.com/zorro-long/PrivateCocoaPodsSpec.git``` add private repo
8. ```pod spec create cocoaPodsTemplateProject``` and modify the spec file
9. ```git commit -a```
10. ```git push origin master```
11. ```git tag -a 0.0.1 -m 'version 0.0.1'```
12. ```git push --tags```
13. ```pod spec lint cocoaPodsTemplateProject.podspec``` to check spec file whether correct
14. ```pod push PrivateCocoaPodsSpec cocoaPodsTemplateProject.podspec``` add private lib to private repo
15. open project by *.xcworkplace
16. all the structure is ok, start coding...
**PS:** You can refer to my sample project from
Every small modules should has:
- source code
- UT
- example
- cocoaPods spec
Some team works:
- every small module should generate apple doc.
We need 3 types of repository:
- (1) Main project
- (1) Private cocoaPods specs
- (N) Module project which comes form cocoaPods template project
What you need to do:
- create project cocoaPodsTemplateProject
git init
git remote add origin 'git repo'
it should be GitHub or BitBucket
git pull origin master
- add Podfile file and some pod lib you need in this project
pod install
pod repo add PrivateCocoaPodsSpec https://github.com/zorro-long/PrivateCocoaPodsSpec.git
add private repo
pod spec create cocoaPodsTemplateProject
and modify the spec file
git commit -a
git push origin master
git tag -a 0.0.1 -m 'version 0.0.1'
git push --tags
pod spec lint cocoaPodsTemplateProject.podspec
to check spec file whether correct
pod push PrivateCocoaPodsSpec cocoaPodsTemplateProject.podspec
add private lib to private repo
- open project by *.xcworkplace
- all the structure is ok, start coding...
PS: You can refer to my sample project from https://github.com/zorro-long/cocoaPodsTemplateProject.git


Today’s topic: What is a “data constructor” in languages like Elm, Haskell, F^♯^, OCaml/ReasonML, Grain, etc.?1 When you see syntax like this (taken from the Grain docs2)—
data CabbageColor = Red | Green
data Veggie =
| Squash
| Cabbage(CabbageColor)
| Broccoli
let redCabbage = Cabbage(Red)
—what does it mean, and how can we understand it in terms of things we can do in languages like Java, C^♯^, and TypeScript?
Even to people with quite a bit of experience in a variety of programming languages, the syntax here is different enough from all the C-related languages most working developers use that it can be hard to wrap your head around. In fact, one of the smartest developers I know got stuck on trying to make sense of this syntax recently. So in this post, I’m going to explain it using TypeScript, in the same terms that made it make sense to that developer. If you’re familiar with any modern language with classes, this will likely make sense to you!
We’re going to take this in two steps:
If you get through the first section and still feel a bit confused, that’s okay—in fact, it’s almost the point.
Since I wrote this, Grain has made a change to their syntax which makes this much more familiar-looking to developers used to C-like languages. This sample would now look like this:
enum CabbageColor { Red, Green }
enum Veggie {
Squash,
Cabbage(CabbageColor),
Broccoli
}
let redCabbage = Cabbage(Red)
I have chosen to leave the text of the post as is apart from this footnote because I think it’s helpful in exposing people to ML-ish syntaxes… and it would be an enormous amount of work to rewrite the whole thing at this stage!
First, let’s get some terms defined: each of those type ...
is declaring a type. The name of the two types are CabbageColor
and Veggie
. The items after the =
, separated by |
characters, are the values of the type, sometimes called the variants. This kind of type goes by a lot of names, including “sum types,” “union types,” “user-defined types,” “custom types,” and more. The key is that they define a type—CabbageColor
or Veggie
—where instances of that type are exactly and only one of the named values. So when we see this—
data CabbageColor = Red | Green
—it just means that if you have a CabbageColor
, you know it will be one of the values Red
or Green
. Those values only exist in the context of CabbageColor
If you want to use the names Red
and Green
for values otherwise, you’ll need some way to specify which Red
, like CabbageColor.Red
in some languages. This is very similar to enums in C-descended languages. In at least some C-descended languages, the boolean type is defined pretty much exactly the same way that CabbageColor
is here: an enum with variants named true
and false
.
Using a basic custom type like this is pretty much like you’d expect:
let colorOne = Red // type is CabbageColor
let colorTwo = Green // type is *also* CabbageColor
We could write a type annotation on that to make it extra explicit, even though we don’t need to:
let colorOne: CabbageColor = Red
let colorTwo: CabbageColor = Green
Unlike enums in C-based languages, though, these types have a superpower: they can hold data. We can see this in the second type defined in the opening example:
data Veggie =
| Squash
| Cabbage(CabbageColor)
| Broccoli
The second type, Cabbage
, includes a CabbageColor
. This is not something you can do with a traditional enum in C, Java, C^♯^, or TypeScript. (This is also the point we’re going to spend the rest of the post on!)
Creating an instance of Veggie
looks like this:
let squash = Squash // type is Veggie
let redCabbage = Cabbage(Red) // type is Veggie
let greenCabbage = Cabbage(Green) // type is Veggie
let broccoli = Broccoli // type is Veggie
Each of these is a Veggie
. We could prove it by spelling out the types rather than letting the compiler infer them for us, like this:
let squash: Veggie = Squash
let redCabbage: Veggie = Cabbage(Red)
let greenCabbage: Veggie = Cabbage(Green)
let broccoli: Veggie = Broccoli
But what exactly is happening when we write let squash = Squash
or, perhaps even more surprisingly, let redCabbage = Cabbage(Red)
?
Squash
is a value of type Veggie
, so you can simply write let squash: Veggie = Squash
and everything worksCabbage
is a function (which is still a kind of value!), which accepts a CabbageColor
and returns a Veggie
.That second point means we could also write this:
let color = Red // type is `CabbageColor`
let cabbage = Cabbage // type is `CabbageColor -> Veggie`
let redCabbage = cabbage(color) // type is `Veggie`
For some of you, this might already make sense—but it’s still neat to see how you might reimplement it in another more commonly-used language. For others, this might still be hurting your head, and that’s okay. It took me quite a while for this all to make sense to me when I first encountered it!   Or the rest of the day. Come back after that and read the next section, and things will probably click into place.
People with backgrounds in languages like Java, C^♯^, or TypeScript often find it hard to translate the syntax we’ve just walked through into concepts they know. That’s totally fair: it’s pretty different, and it’s not just new syntax, it’s also new language features tied to that syntax. In this section, we’ll see how we could implement the exact same semantics in a language that’s more familiar, and hopefully that will help make sense of things.
:::note
I’m using TypeScript here because it’s the language in this family I’m most familiar with, but I’m going to keep it to a minimal subset of TypeScript that is extremely close to what you might see in Java or C^♯^. I’ll be using footnotes here to talk about some details around TypeScript itself, where Typescript can let us more directly approximate the things happening in languages like Grain, Elm, etc. However, those are footnotes for a reason: you don’t need to read or understand them to get the point of the rest of this post!
:::
First, let’s see what it would look like to build a type that represents the CabbageColor
. For this we can just use a standard enum
type:
enum CabbageColor {
Red,
Green,
}
That’s it for that particular type. To get an instance of the type, we just do CabbageColor.Red
:
let color = CabbageColor.Red;
As we’d expect, color
is of type CabbageColor
; we could easily have specified it (but don’t need to because of type inference in TypeScript, the same as in Grain):
let color: CabbageColor = CabbageColor.Red;
We can now use the normal switch
statement semantics with this:3
function describe(color: CabbageColor): string {
switch (color) {
case CabbageColor.Red:
return "It's red!";
case CabbageColor.Green:
return: "It's green!";
}
Even better: TypeScript will guarantee we cover all the cases of the enum
in this switch
statement, because it’s directly related to the return
type. If we later added Yellow
to the mix, but didn’t add a case
for it, TypeScript would report:
Function lacks ending return statement and return type does not include ‘undefined’.
We can’t do exactly this for the Veggie
type, though: it would be fine for Squash
and Broccoli
, but Cabbage
needs a CabbageColor
to create it! That’s okay, though: we can still create a type that behaves the same way as the Veggie
type does.
Let’s start with an empty class
definition:4
class Veggie {
}
The first thing we’ll want to do is define the kind of veggie this represents. We can do that with another enum
for the kind
(and notice that the kind
here is marked as readonly
because the kind
of a Veggie
is fixed: squash cannot turn into cabbage, etc.):5
enum VeggieKind {
Squash,
Cabbage,
Broccoli,
}
class Veggie {
readonly kind: VeggieKind;
constructor(kind: VeggieKind) {
this.kind = kind;
}
}
With this in place, we could actually construct a Squash
or a Broccoli
correctly:
let squash = new Veggie(VeggieKind.Squash);
This isn’t exactly what we see in the Grain example, but it’s a step in the right direction.
Next, we need to deal with the extra data associated with the type when we are working with cabbage: the CabbageColor
we defined above. We can put that in the constructor, too:
enum CabbageColor { Red, Green }
enum VeggieKind { Squash, Cabbage, Broccoli }
class Veggie {
readonly kind: VeggieKind;
readonly color?: CabbageColor;
constructor(kind: VeggieKidn, color?: CabbageColor) {
this.kind = kind;
this.color = color;
}
}
Here, we have an optional color
parameter: it can be left undefined
. That makes sense: there is no color
associated with a Squash
. But it’s a problem, too: nothing currently prevents our end users from writing something like this:
let badSquash = new Veggie(VeggieKind.Squash, CabbageColor.Green);
We can solve this problem and get ourselves to something that looks a lot more like the syntax we’re aiming for in one fell swoop: by making our constructor private
and providing other ways to create a Veggie
which are guaranteed to be safe.
:::note
This is the part where people who are already familiar TypeScript with have to wait for the next post. There are ways we can make this much more type-safe. That’s not the point of this post, though! Here, we’re intentionally sticking to a “lowest common denominator” implementation to get at how we can do this in any class-based language.
:::
We’ll start by adding a static
constructor for each of these types.
enum CabbageColor { Red, Green }
enum VeggieKind { Squash, Cabbage, Broccoli }
class Veggie {
readonly kind: VeggieKind;
readonly color?: CabbageColor;
private constructor(kind: VeggieKind, color?: CabbageColor) {
this.kind = kind;
this.color = color;
}
static Squash(): Veggie {
return new Veggie(VeggieKind.Squash);
}
static Cabbage(color: CabbageColor) {
return new Veggie(VeggieKind.Cabbage, color);
}
static Broccoli(): Veggie {
return new Veggie(VeggieKind.Broccoli);
}
}
At this point, we’ve isolated the things needed to make the type behave the way it should in these constructors, so now we can only use it correctly. If we type a version of the same bad code as before—
let badSquash = Veggie.Squash(CabbageColor.Red);
—the compiler will tell us:
Expected 0 arguments, but got 1.
This is a good start! But we can do better.
For one thing, Squash
and Broccoli
don’t need to be methods at all. We don’t actually need to be able to make a new Squash
instance every time, because this class doesn’t actually have any state, or any way to change state. Not having any internal state that can change means it doesn’t actually matter if there is only ever one instance of Squash
and one of Broccoli
anywhere in our system. We can represent having multiple quantities of them by having more than one reference to the single value in a given array or other data structure, and because the type is stateless, that’s totally fine. There will never be any bugs from having the same value used in different spots—because it’s immutable.
Instead of having those individual constructors, then, we can just create a single static value for the Squash
and Broccoli
veggies.
enum CabbageColor { Red, Green }
enum VeggieKind { Squash, Cabbage, Broccoli }
class Veggie {
private kind: VeggieKind;
private color?: CabbageColor;
private constructor(kind: VeggieKind, color?: CabbageColor) {
this.kind = kind;
this.color = color;
}
static Squash = new Veggie(VeggieKind.Squash);
static Cabbage = (color: CabbageColor) =>
new Veggie(VeggieKind.Cabbage, color);
static Broccoli = new Veggie(VeggieKind.Broccoli);
}
The private constructor makes it so the only way to create a Veggie
is using one of its public, static
fields. Critically, all three of of them are just values—yes, including the Cabbage
function. In fact, we could actually use static method syntax for Cabbage
here, but I intentionally used the static property function for Cabbage
to make it more obvious that these are all just values attached to the class! Veggie.Squash
and Veggie.Broccoli
are values whose type is Veggie
. Veggie.Cabbage
is a value whose type is a function which accepts a CabbageColor
and returns a Veggie
. But even though one of those values is a function, they’re still all just values.
Since Squash
, Cabbage
, and Broccoli
are all just values, we can even bind any of them directly to a value in local scope:
let squash = Veggie.Squash; // Veggie
let broccoli = Veggie.Broccoli; // Veggie
let cabbage = Veggie.Cabbage; // (color: CabbageColor) -> Veggie
Again, the difference is simply the type each one has: squash
and broccoli
are already Veggie
here, but cabbage
is a function: (color: CabbageColor) => Veggie
.
This same thing is true back in the ML languages, just with a different syntax:
squash = Squash // Veggie
broccoli = Broccoli // Veggie
cabbage = Cabbage // CabbageColor -> Veggie
The difference here is that, since this is the normal way of constructing these types in languages like Elm, you don’t need to use the scoped class for it. You can imagine that it’s as if we had used capital names for those letters in our bindings and exported them all from a module:
export const { Red, Green } = CabbageColor;
export const { Squash, Cabbage, Broccoli } = Veggie;
Then we could import them and use them elsewhere:
import { Broccoli, Cabbage, Red } from 'veggies';
let broccoli = Broccoli;
let redCabbage = Cabbage(Red);
That’s exactly the same thing we’d see in Grain or any other ML-style language—just with TypeScript syntax instead!
Summarizing so far:
Veggie.Squash
and Veggie.Broccoli
are both already Veggie
s. Veggie.Cabbage
is a function you can use to build a Veggie
if you also supply a CabbageColor
.The only real difference in what we’ve done in TypeScript and what we’d see in that original example from Grain is that Grain has built-in language support for these things because they’re the default instead of something we’re building on top of other language constructs.
There is another difference, though, and it’s related to a downside in the code we’ve written. We can no longer use a switch
statement to check this, because it’s too complicated a type for JavaScript’s very limited switch
capability. All the SML-related languages I mentioned at the top have a feature called pattern-matching which supports working with these richer types:6
let describeColor = (color) => match (color) {
| Red => "red"
| Green => "green"
}
let describe = (veggie) => match (veggie) {
| Squash => "It's a squash"
| Cabbage(color) => "It's a " + describeColor(color) + " cabbage"
| Broccoli => "It's broccoli"
}
While match
is not built into JavaScript, we can build our own using a method on the class, and it’s not actually very hard!
What we want to end up with:
let describeColor = (color: CabbageColor): string => {
switch (color) {
case CabbageColor.Red:
return "red";
case: CabbageColor.Green:
return "green";
}
};
let describe = (veggie: Veggie): string => veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
});
describeColor
can just be exactly this: there’s no reason for us to reinvent the wheel when the built-in language tools JS gives us—here, a switch
statement—will do just fine. For describe
, working with a Veggie
, though, implementing this match
method gives us a lot more expressiveness, and we need something besides the JS switch
to deal with Cabbage
! Happily, the method implementation is fairly straightforward.
enum CabbageColor { Red, Green }
enum VeggieKind { Squash, Cabbage, Broccoli }
type Matcher<T> = {
Squash: T;
Cabbage: (color: CabbageColor) => T;
Broccoli: T;
};
class Veggie {
private kind: VeggieKind;
private color?: CabbageColor;
// SNIP: the constructors are the same!
match<Output>(matcher: Matcher<Output>): Output {
switch (this.kind) {
case VeggieKind.Squash:
return matcher.Squash;
case VeggieKind.Cabbage:
// SAFETY: we guarantee `color` is always defined with `Cabbage`
// in the public constructors.
return matcher.Cabbage(this.color!);
case VeggieKind.Broccoli:
return matcher.Broccoli;
}
}
}
All we’ve done here is require the caller to pass us an object with names which match the names of the VeggieKind
variants. The values on that object are either values of the desired resulting type T
in the case of Squash
and Broccoli
, or a function which takes a CabbageColor
and returns that same resulting type of T
. Within the body of the match
method, we return whichever one corresponds to this.kind
.
:::note
Notice the // SAFETY: ...
comment I added when using the non-null assertion operator !
with this.color
. I borrowed this idea from the Rust community, which marks all uses of unsafe
with these kinds of comments. I use it any time I write a cast in TypeScript, for the sake of whoever is maintaining the code in the future… including future me. It’s important to know what might make a cast unsafe! For a way to not need this comment at all by having better safety, you’ll want to read the next post.
:::
With the match
method in place, we can now use that to work with any of the variants, exactly as I showed above with the describe
function definition:
let describeColor = (color: CabbageColor) => {
switch (color) {
case CabbageColor.Red:
return "red";
case: CabbageColor.Green:
return "green";
}
};
let describe = (veggie: Veggie) => veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
});
Once we have that function, we can do pretty neat things with it! For example, if we have a list of Veggie
s, we can now map
over them in whatever ways we like. And since we have describe
, we don’t even have to explicitly invoke Veggie.match
to describe a list of Veggie
s:
let veggies = [
Veggie.Squash,
Veggie.Cabbage(CabbageColor.Red),
Veggie.Squash,
Veggie.Broccoli,
Veggie.Broccoli,
Veggie.Cabbage(CabbageColor.Green),
];
veggies
.map((veggie) => describe(veggie))
.forEach((desc) => {
console.log(desc);
});
// It's a squash
// It's a red cabbage
// It's a squash
// It's broccoli
// It's broccoli
// It's a green cabbage
Here’s the final version of our class, showing how we can implement the original code from Grain in TS:
enum CabbageColor {
Red,
Green,
}
enum VeggieKind {
Squash,
Cabbage,
Broccoli,
}
type Matcher<T> = {
Squash: T;
Cabbage: (color: CabbageColor) => T;
Broccoli: T;
};
class Veggie {
private kind: VeggieKind;
private color?: CabbageColor;
private constructor(kind: VeggieKind, color?: CabbageColor) {
this.kind = kind;
this.color = color;
}
static Squash = new Veggie(VeggieKind.Squash);
static Cabbage = (color: CabbageColor) =>
new Veggie(VeggieKind.Cabbage, color);
static Broccoli = new Veggie(VeggieKind.Broccoli);
match<Output>(matcher: Matcher<Output>): Output {
switch (this.kind) {
case VeggieKind.Squash:
return matcher.Squash;
case VeggieKind.Cabbage:
// SAFETY: we guarantee `color` is always defined with `Cabbage`
// in the public constructors.
return matcher.Cabbage(this.color!);
case VeggieKind.Broccoli:
return matcher.Broccoli;
}
}
}
let describeColor = (color: CabbageColor) => {
switch (color) {
case CabbageColor.Red:
return "red";
case CabbageColor.Green:
return "green";
}
};
let describe = (veggie: Veggie) => veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
});
let redCabbage = Veggie.Cabbage(CabbageColor.Red);
let description = describe(redCabbage);
And here’s the original Grain code again:
data CabbageColor = Red | Green
data Veggie =
| Squash
| Cabbage(CabbageColor)
| Broccoli
let describeColor = (color) => match (color) {
| Red => "red"
| Green => "green"
}
let describe = (veggie) => match (veggie) {
| Squash => "It's a squash"
| Cabbage(color) => "It's a " + describeColor(color) + " cabbage"
| Broccoli => "It's broccoli"
}
let redCabbage = Cabbage(Red)
let description = describe(redCabbage)
Our TypeScript code is definitely longer, because we had to create the ability to do what Grain does at the language level. However, doing so means we can actually see what Grain is doing quite clearly. In particular, the original syntax Cabbage(Red)
confuses a lot of people who aren’t familiar with the syntax of languages like Grain. Having implemented it in TypeScript, though, we can see that Cabbage
is just a function which takes an argument, CabbageColor
, and returns a Veggie
.
In fact, as we saw above, we can make it possible to write exactly the same thing in TypeScript to construct a Veggie
as we do in Grain, by creating standalone versions of the “data constructors” for Veggie
and CabbageColor
:
const { Red, Green } = CabbageColor;
const Squash = Veggie.Squash; // Veggie
const Cabbage = Veggie.Cabbage; // (color: CabbageColor) => Veggie
const Broccoli = Veggie.Broccoli; // Veggie
Once we have these, building a red cabbage looks exactly the same as it did in Grain:
let redCabbage = Cabbage(Red);
And that’s it! We’ve now seen how you can implement the kinds of data constructors and pattern matching you see in languages like Elm, Grain, Rust, etc. in a language like TypeScript. I hope that helps make data constructors and pattern matching seem a bit less magical. The thing which makes them so great in languages with them built in is that you don’t have to reimplement that functionality yourself for every time: the language handles it for you!
In the next post, we’ll see how we can make this TypeScript implementation safer and cheaper—that is, how I would actually implement things in TypeScript!
One bonus bit of material here—this is totally unnecessary for the rest of the post, but it’s a neat thing I enjoy, so I’m sharing it here.
Sometimes we end up using the same bit of pattern-matching behavior where we map from the Veggie
variant into a particular output type over and over again. In that case, it’s convenient to extract a helper function for it. That can be particularly convenient when we’re working with methods like Array.map
(or utilities like lodash or Ramda).
This is exactly what we did with describe
above:
let describe = (veggie: Veggie) => veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
});
However, this still leaves us with quite a bit of repetition in terms of naming the types, especially if we write it out fully like we did above:
let veggies = [
Veggie.Squash,
Veggie.Cabbage(CabbageColor.Red),
Veggie.Squash,
Veggie.Broccoli,
Veggie.Broccoli,
Veggie.Cabbage(CabbageColor.Green),
];
veggies
.map((veggie) => describe(veggie))
.forEach((desc) => {
console.log(desc);
});
Notice that we have the same pattern of doing (veggie) => <some operation>
more than once. For this, I like to use a style called “point free function application.” The name isn’t all that illuminating, unfortunately, unless you have a specific background in certain fields of mathematical theory. (I happen to think those fields are pretty cool, but realistically most working programmers aren’t familiar with them.) “Point free” really just means passing the function directly to another function by name, without creating another anonymous function in between to invoke it (“pointed”).
// Pointed
let descriptions = veggies.map((veggie) => describe(veggie));
// Point free
let descriptions = veggies.map(describe);
I also like to name my functions in a way that works well in this kind of invocation, so that reading the line almost reads like a sentence. Here, I would pick the name toDescription
instead of describe
. Then the point-free invocation would read like this:
let descriptions = veggies.map(toDescription);
If we were using lodash, it would read even more like a sentence:
import { map } from 'lodash/map';
let descriptions = map(veggies, toDescription);
Now, because I’ve gotten used to this way of doing things, I really enjoy being able to just work with functions like this in general. In fact, I like it so much that I’d really prefer that if I’m only using a given .match
invocation one place, I could just use Veggie.match
directly instead of having to do (veggie) => veggie.match({ ... })
.7
In other words, what if instead of this—
let descriptions = veggies.map((veggie) => veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
}));
—we could skip the creation of the intermediate anonymous function and just write this instead?
let descriptions = veggies.map(Veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
}));
And if we did have this ability, we could skip the (veggie: Veggie) => veggie.match({ ... })
when defining toDescription
, too:
let toDescription = Veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
});
It turns out, this is actually quite easy to implement in modern JavaScript or TypeScript. We just create a static
version of match
, which can live right next to the class method. The key is that we make Veggie.match
return another function which takes a Veggie
and returns the output type from the matcher.
class Veggie {
// SNIP: everything else is the same, and so is `match`; I've
// left it here just so you can see it working right next to
// the static method
match<Output>(matcher: Matcher<Output>): Output {
// SNIP: body is the same as before
}
static match<T>(matcher: Matcher<T>): (veggie: Veggie) => T {
return (veggie) => veggie.match(matcher);
}
}
That’s it: the code samples I wrote above all just work now!
We can actually go one better and use TypeScript’s overloading to make it so you can use this static version of match
in either this “curried” form or a form that accepts a Veggie
as its second parameter, in case you’re in a context where that makes things clearer, with an “overloaded” version of the function:
class Veggie {
// SNIP: everything else is the same
static match<T>(matcher: Matcher<T>): (veggie: Veggie) => T;
static match<T>(matcher: Matcher<T>, veggie: Veggie): T;
static match<T>(
matcher: Matcher<T>,
veggie?: Veggie
): T | ((veggie: Veggie) => T) {
return veggie
? veggie.match(matcher)
: (veggie) => veggie.match(matcher);
}
}
Then we can use it in either mode, and TypeScript will resolve the type correctly:
let longDescFn = (veggie: Veggie) => Veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
}, veggie);
let shortDescFn = Veggie.match({
Squash: "It's a squash",
Cabbage: (color) => `It's a ${describeColor(color)} cabbage`,
Broccoli: "It's broccoli",
});
let descsFromLong = veggies.map(longDescFn);
let descsFromShort = veggies.map(shortDescFn);
assertDeepEqual(descsFromLong, descsFromShort);
In this case, there’s no particular value to adding that functionality, since it’s just the same as calling veggie.match
instead of Veggie.match
with the second argument. It is useful to understand the pattern, though, and the first variant where we don’t require the argument lets us create our toDescription
function much more directly. Functions have become a thing we work with like any other value. While this takes some getting used to, it’s also an incredibly powerful tool to have in your toolbox!
:::callout
Enjoyed this? Check out Part 2, which covers how to reimplement this using more advanced features of TypeScript’s type system, resulting in more type safety and improved performance.
:::
*[SML]: Standard ML *[TS]: TypeScript
Note that pretty much everything I say here goes, with minor differences in details, for Swift’s and Rust’s enum
types as well!
You may notice that I don’t have a default
case here. That’s on purpose. Because I specify the return type of the function as string
, TypeScript will actually tell me if I don’t cover all the cases in the switch statement. TypeScript is smart enough to know that if we don’t cover all the cases, it won’t return a string.
This comes for free in languages like Grain, in all contexts where you’re “matching” on a given item.
You can use classes for all sorts of things, and not all of them have to do with inheritance! In this case, it’s just going to be a convenient tool for building up the data structure (and one that will be familiar to developers from many languages). As a bonus, you could implement an actual language similar to the way I will build up this type in the rest of this post.
Here I’m using the normal JavaScript version of the constructor
syntax, but for scenarios like this TypeScript provides a convenient shorthand:
class Veggie {
constructor(readonly kind: VeggieKind) {}
}
If I were building this data type myself, that’s the declaration I would actually use!
Two things to note about the example of pattern-matching here:
I’m taking a tiny liberty here with the Grain sample code and acting as if +
does string concatenation. It… doesn’t yet. But that’s just because Grain is extremely young; at some point it’ll have something which does this and nicely!
Pattern matching functionality is even deeper and richer than I’m showing here. Matching can deal with nested types, too. In this case, I wouldn’t actually (necessarily) break out describe
and describeColor
this way. Instead, I might just use a richer match
expression:
let describe = (veggie) => match (veggie) {
| Squash => "It's a squash"
| Cabbage(Red) => "It's a red cabbage"
| Cabbage(Green) => "It's a green cabbage"
| Broccoli => "It's broccoli"
}
If the type were further nested, we could further drill down in manually like this, “destructuring” the types as deeply as we need. This makes it much more powerful than a switch
statement from JS/TS/Java/C^♯^ etc.
I admit, that might make me a little weird to some of you. That’s okay! I kind of enjoy being a little weird.
*[JS]: JavaScript


|
|
Chapter 27: Representations and ConversionsIn this chapter we look at various transformations of functions and data.27.1 Classes and TypesIf we are transforming things into other things, it is useful to begin with functions which tell us what sort of thing we are dealing with.27.1.1 ClassesGiven an assignment, name =: something, then something is an expression denoting a noun or a verb or an adverb or a conjunction. That is, there are 4 classes to which something may belong.There is a built-in verb 4!:0 which here we can call class. class =: 4!:0We can discover the class of something by applying class to the argument <'name'. For example,
The result of 0 for the class of n means that n is a noun. The cases are: 0 noun 1 adverb 2 conjunction 3 verband two more cases: the string 'n' is not a valid name, or n is valid as a name but no value is assigned to n. _2 invalid _1 unassignedFor example:
The argument of class identifies the object of interest by quoting its name to make a string, such as 'C'. Why is the argument not simply the object? Because, by the very purpose of the class function, the object may be a verb, noun, adverb or conjunction, and an adverb or conjunction cannot be supplied as argument to any other function. Why not? Suppose the object of interest is the conjunction C. No matter how class is defined, whether verb or adverb, any expression of the form (class C) or (C class) is a bident or a syntax error. In no case is function class applied to argument C. Hence the need to identify C by quoting its name. 27.1.2 TypesA noun may be an array of integers, or of floating-point numbers or of characters, and so on. The type of any array may be discovered by applying the built-in verb 3!:0. For example
The result of 8 means floating-point and the result 2 means character. Some of the possible cases for the result are:
There is also a useful verb datatype in the standard library which produces not a number but a name for the type of its argument.
27.2 ExecuteThere is a built-in verb ". (doublequote dot, called "Execute"). Its argument is a character-string representing a valid J expression, and the result is the value of that expression.". '1+2' 3The string can represent an assignment, and the assignment is executed:
If the string represents a verb or adverb or conjunction, the result is null, because Execute is itself a verb and therefore its results must be nouns. However we can successfully Execute assignments to get functions.
27.3 RepresentationsWhen an expression is entered at the keyboard, a value is computed and displayed on-screen. More precisely, it is a representation of that value which is displayed, as a sequence of characters.For example, if we define a function foo: foo =: +/ % #and then view the definition of foo: foo +-----+-+-+ |+-+-+|%|#| ||+|/|| | | |+-+-+| | | +-----+-+-+we see on the screen some representation of foo. What we see depends on which option is chosen from several possibilities. The default option for the representation of a function is as a boxed structure, as in the example of foo above. There are other possibilities, which we look at next. 27.3.1 Representations of Nouns for DisplayFor a noun of type character, its value can be represented to the user simply by the J interpreter writing its characters to the screen (with line-breaks at appropriate places) .By contrast, for nouns of other datatypes - numbers, or boxes, or symbols, a displayable representation require converting the data value to characters. For this purpose there is a built-in function ": (double-quote colon, called Format). We have already met Format in Chapter 19 where it was used for formatting numbers. The Format verb produces nouns which are character representations looking identical to the argument: ] n1 =: 'toujours' ; 'l''audace' +--------+--------+ |toujours|l'audace| +--------+--------+ ] r1 =: ": n1 NB. a representation of n1 +--------+--------+ |toujours|l'audace| +--------+--------+but n1 and its representation r1 are of different datatypes, and different dimensions.
27.3.2 Drawing Boxes with the Format VerbThe Format ": verb does three things:
We can specify the characters used for drawing boxes. In this book I have drawn boxes with '+ | -' characters because only these can I rely on to be correctly rendered in all web-browsers. However, in a J session, you will probably see boxes drawn with other characters, giving a more pleasing appearance. The box-drawing characters used by the Format verb are specified by a global parameter. The value of this parameter can be inspected with 9!:6 '': 9!:6 '' +++++++++|-and we see the eleven characters currently in effect. The parameter can be set with 9!:7 . Here is a verb which Formats the right argument with box-drawing characters given by the left argument. Notice that it saves and restores the global parameter. fmt =: 4 : 0 assert. 11 = # x t =. 9!:6 '' NB. save current box-draw chars 9 !:7 x NB. set box-draw chars to new value z =. ": y 9 !: 7 t NB. restore original box-draw chars z )To show which of the eleven characters goes where, we can draw boxes with the characters<PHONE_NUMBER>A ] w =: 2 2 $ < ' ' +----+----+ | | | +----+----+ | | | +----+----+ '0123456789A' fmt w 0AAAA1AAAA2 9 9 9 3AAAA4AAAA5 9 9 9 6AAAA7AAAA8Dyadic Format allows control over where the data is placed in the box. For details see the Dictionary 27.3.3 Representations of FunctionsThere are several options for producing representations of functions, that is, representations of verbs, adverbs or conjunctions.By default the current option is the "boxed representation", so we see the verb foo (defined above) depicted graphically as a structure of boxes. foo +-----+-+-+ |+-+-+|%|#| ||+|/|| | | |+-+-+| | | +-----+-+-+Other options are available, described below. To select and make current an option for representing functions on-screen, enter one of the following expressions: (9!:3) 2 NB. boxed (default) (9!:3) 5 NB. linear (9!:3) 6 NB. parenthesized (9!:3) 4 NB. tree (9!:3) 1 NB. atomicThe current option remains in effect until we choose a different option. 27.3.4 Linear RepresentationIf we choose the the linear representation, and look at foo again:(9!:3) 5 NB. linear foo +/ % #we see foo in a form in which it could be typed in at the keyboard, that is, as an expression. Notice that the linear form is equivalent to the original definition, but not necessarily textually identical: it tends to minimize parentheses. bar =: (+/) % # bar +/ % #Functions, that is, verbs, adverbs and conjunctions, are shown in the current representation. By contrast, nouns are always shown in the representation produced by the Format verb, regardless of the current option. Even though linear is current, we see: noun =: 'abc';'pqr' noun +---+---+ |abc|pqr| +---+---+ 27.3.5 Parenthesized RepresentationThe parenthesized representation is like linear in showing a function as an expression. Unlike linear, the parenthesized form helpfully adds parentheses to make the logical structure of the expression more evident.(9!:3) 6 NB. parenthesized zot =: f @: g @: h zot (f@:g)@:h 27.3.6 Tree RepresentationTree representation is another way of displaying structure graphically:(9!:3) 4 NB. tree zot +- f +- @: -+- g -- @: -+- h 27.3.7 Atomic RepresentationFor completeness, the atomic representation is mentioned here. We will come back to it below.Before continuing, we return the current representation option to linear. (9!:3) 5 27.4 Representation FunctionsRegardless of the current option for showing representations on-screen, any desired representation may be generated as a noun by applying a suitable built-in verb.If y is a name with an assigned value, then a representation of y is a noun produced by applying one of the following verbs to the argument <'y' br =: 5!:2 NB. boxed lr =: 5!:5 NB. linear pr =: 5!:6 NB. parenthesized tr =: 5!:4 NB. tree ar =: 5!:1 NB. atomicFor example, the boxed and parenthesized forms of zot are shown by:
We can get various representations of a noun, for example the boxed and the linear:
Representations produced by 5!:n are themselves nouns. The linear form of verb foo is a character-string of length 6.
The 6 characters of s represent an expression denoting a verb. To capture the verb expressed by string s, we could prefix the string with characters to make an assignment, and Execute the assignment.
27.4.1 Atomic RepresentationWe saw in Chapter 10 and Chapter 14 that it is useful to be able to form sequences of functions. By this we mean, not trains of verbs, but gerunds. A gerund, regarded as a sequence of verbs, can for example be indexed to find a verb applicable in a particular case of the argument.To be indexable, a sequence must be an array, a noun. Thus we are interested in transforming a verb into a noun representing that verb, and vice versa. A gerund is a list of such nouns, containing atomic representations. The atomic representation is suitable for this purpose because it has an inverse. None of the other representation functions have true inverses. The atomic representation of anything is a single box with inner structure. For an example, suppose that h is a verb defined as a hook. (A hook is about the simplest example of a verb with non-trivial structure.) h =: + %compare the boxed and the atomic representations of h
The inner structure is an encoding which allows the verb to be recovered from the noun efficiently without reparsing the original definition. It mirrors the internal form in which a definition is stored. It is NOT meant as yet another graphic display of structure. The encoding is described in the Dictionary. We will not go into much detail here. Very briefly, in this example we see that h is a hook (because 2 is an encoding of "hook") where the first verb is + and the second is %. The next example shows that we can generate atomic representations of a noun, a verb, an adverb or a conjunction. N =: 6 V =: h A =: / C =: &
27.4.2 Inverse of Atomic RepresentationThe inverse of representation is sometimes called "abstraction", (in the sense that for example a number is an abstract mathematical object represented by a numeral.) The inverse of atomic representation is 5!:0 which we can call ab.ab =: 5!:0ab is an adverb, because it must be able to generate any of noun, verb, adverb or conjunction. For example, we see that the abstraction of the atomic representation of h is equal to h
and similarly for an argument of any type. For example for noun N or conjunction C
27.4.3 Summary of Representation Functions
27.4.4 Execute RevisitedHere is another example of the use of atomic representations. Recall that Execute evaluates strings expressing nouns but not verbs. Since Execute is itself a verb it cannot deliver verbs as its result.
To evaluate strings expressing values of any class we can define an adverb eval say, which delivers its result by abstracting an atomic representation of it. eval =: 1 : 0 ". 'w =. ' , u (ar < 'w') ab )
27.4.5 The Tie Conjunction RevisitedRecall from Chapter 14 that we form gerunds with the Tie conjunction `. Its arguments can be two verbs.G =: (+ %) ` hIts result is a list of atomic representations. To demonstrate, we choose one, say the first in the list, and abstract the verb.
The example shows that Tie can take arguments of expressions denoting verbs. By contrast, the atomic representation function (ar or 5!:1) must take a boxed name to identify its argument. Here is a conjunction T which, like Tie, can take verbs (not names) as arguments and produces atomic representations. T =: 2 : '(ar <''u.'') , (ar <''v.'')'
27.5 Conversions for Binary DataBinary data is, briefly, values represented compactly as character strings. Here we look at functions for converting between values in J arrays and binary data, with a view to handling files with binary data. Data files will be covered in Chapter 28 .In the following, a 32-bit PC is assumed, so it is assumed that a character occupies one byte and a floating point number occupies 8. A J array, of floating-point numbers for example, is stored in the memory of the computer. Storage is required to hold information about the type, rank and shape of the array, together with storage for each number in the array. Each floating-point number in the array needs 8 bytes of storage. There are built-in functions to convert a floating-point number to a character-string of length 8, and vice versa.
cf8 =: 2 & (3!:5) NB. float to 8 chars c8f =: _2 & (3!:5) NB. 8 chars to floatIn the following example, we see that the number n is floating-point, n is converted to give the string s which is of length 8, and s is converted back to give a floating-point number equal to n.
Characters in the result s are mostly non-printable. We can inspect the characters by locating them in the ASCII character-set: a. i. s 154 153 153 153 153 153 185 63Now consider converting arrays of numbers. A list of numbers is converted to a single string, and vice versa::
The monadic rank of cf8 is infinite: cf8 applies just once to its whole argument.
A floating-point number is convertible to 8 characters. There is an option to convert a float to and from a shorter 4-character string, sacrificing precision for economy of storage. cf4 =: 1 & (3!:5) NB. float to 4 chars c4f =: _1 & (3!:5) NB. 4 chars to floatAs we might expect, converting a float to 4 characters and back again can introduce a small error. p =: 3.14159265358979323
A J integer needs 4 bytes of storage. There are functions to convert between J integers and 4-character strings. ci4 =: 2 & (3!:4) NB. integer to 4 char c4i =: _2 & (3!:4) NB. 4 char to integer
We see that the length of s is 8 because s represents two integers. Suppose k is an integer and c is the conversion of k to 4 characters.
Since characters in c are mostly non-printable, we inspect them by viewing their locations in the ASCII alphabet. We see that the characters are the base-256 digits in the value of k, stored in c in the order least-significant first (on a PC)..
Integers in the range _32768 to 32767 can be converted to 2-character strings and vice versa. ci2 =: 1 & (3!:4) NB. integer to 2 char c2i =: _1 & (3!:4) NB. 2 char to int
Integers in the range 0 to 65535 can be converted to 2-character strings and vice versa. Such strings are described as "16bit unsigned". ui2 =: ci2 NB. integer to 2-char, unsigned u2i =: 0 & (3!:4) NB. 2 char to integer, unsigned
27.6 UnicodeIn this section we look at J support for Unicode.There are three kinds of character data in J.
We have seen that J supports character data. For example C =: 'this is a string'The built-in verb 3 !: 0 shows the type of a data value. 3!:0 C 2The result of 2 indicates that the data type of C is 8-bit characters, called "char". J also provides another data type with 16-bit characters, called "wchar" ("wide character"). The built-in function monadic u: converts char data to wchar. ] W =: u: C this is a stringwchar data is displayed as before, but its data-type is shown as 131072 3!:0 W 131072A 16-bit wchar character can be one of the many characters in the Unicode standard. The built-in function 4&u: produces a wchar character specified by the argument, which is an integer in the range 0-65536, called a Unicode "code point". A code point is often given as 4 hex digits. For example, the code point for the Greek letter alpha is hex 03b1 which we can write as 16b03b1 ] alpha =: 4&u: 16b03b1 αalpha is a wchar: 3!:0 alpha 131072We can build a wchar string including alpha : ] U =: (u: 'the Greek letter alpha looks like this: ') , alpha the Greek letter alpha looks like this: αSuppose now that our wchar data U is to be exported, say by writing it to a data file . We will need to encode our 16-bit wchar data as a sequence of 8-bit bytes, according to some recognised standard encoding scheme. The UTF-8 standard is suitable. The built-in function 8&u: produces a character string which is a UTF-8 encoding of wchar data ] Z =: 8&u: U the Greek letter alpha looks like this: αWe see that Z is of data type 2, (that is 8-bit char) and that the number of bytes in Z is one more than the number of characters in U, because alpha is encoded as two bytes.
The inverse of 8&u: is the built-in function 7&u: which produces wchar characters from a UTF-8 string. ] A =: 7&u: Z the Greek letter alpha looks like this: αWe can view the Unicode code-points of the letters in A. The built-in function 3&u: produces code-point integers from wchar data. If we look at the last few characters of A, we see as we expect that the code-point integer of alpha is decimal 945, that is, hex 03b1. ] L =: _6 {. A NB. last few of A is: α 3 & u: L 105 115 58 32 32 945This is the end of Chapter 27 |
The examples in this chapter
were executed using J version 802 beta.
This chapter last updated 19 May 2015
Copyright © Roger Stokes 2014.
This material may be freely reproduced,
provided that acknowledgement is made.


New sensors are tracking Newcastle's air pollution crisis outside these 22 schools
Children in the city are most at risk from harmful emissions caused by traffic and city bosses hope to uncover the full extent of the pollution problems experienced on the school run
by Daniel HollandPollution sensors have been installed outside 22 Newcastle schools to discover just how dirty the city’s air is for children.
Youngsters are most at risk from the pollution crisis on Tyneside, with emissions from road traffic linked to problems with brain development, stunted growth, respiratory conditions, cancer, and 300,000 child deaths worldwide.
Newcastle University and Newcastle City Council have now placed monitors outside a number of schools close to busy roads throughout the city to give an accurate picture of the number of harmful gases in the air children breathe.
Early data has shown readings of nitrogen dioxide of more than twice the annual average legal limit outside several schools at 9am, including Broadway East First School and Cragside Primary.
It is hoped that giving families a full understanding of the health risks of air pollution will encourage more parents not to take their car on the school run or leave the engine running outside school gates, while also providing climate-conscious youngsters a chance to take action.
Eugene Milne, director of public health at Newcastle City Council, said: “Poor air quality harms everybody’s health – and young people are among those most at risk – so we’re very pleased to be working with the university and young people across the city to address this.
“As well as raising awareness about the issue among pupils, parents and the wider community, the project will also aim to encourage more active travel and fewer car journeys, particularly on the school run.
“This project will help us to monitor just how much pollution is in the air around schools and enable us to get the views of the children who are directly affected on what else could be done to tackle the problem.”
The full list of schools where air pollution is being monitored:
Gosforth Central Middle School
Hawthorn Primary School
Cragside Primary School
St Albans RC Primary School
West Denton Primary School
Gosforth East Middle School
Westerhope Primary School
St Mary's Catholic School
St Gabriel's Children's Day Nursery
Dinnington First School
Atkinson Road Primary Academy
Sacred Heart Catholic High School
West Jesmond Primary School
Wingrove Primary School
St Teresa's Catholic Primary School
Broadway East First School
Archibald First School
Benton Park Primary
Knop Law Primary School
Chillingham Road Primary School
Lemington Riverside Primary School
Throckley Primary School
The sensors, monitored through the university’s Urban Observatory, will show how levels of nitrogen dioxide and particulate matter change depending on time of day, season, temperature and the weather.
Sean Peacock, of Newcastle University’s Open Lab, said: “Children themselves are far from oblivious to the impact air pollution is having on their health and their futures.
“The school climate strikes show that young people are forcing air pollution and the climate crisis to the top of the political agenda.
“The strikes tell us that children demand a platform to challenge pollution in their environment but, unable to voice their concerns in school, they are forced to take radical action.
"What if instead there was a way to work with children in tackling air pollution and climate change?”
Council bosses in Newcastle are planning to impose a ‘Clean Air Zone’ from 2021 to charge some high-polluting vehicles up to £50 per day to drive into the city centre. A public consultation on those plans is now into its final week.


Here is where you'll find more information on our pricing information, including how long each program lasts and any additional information that isn't covered off in the class description.
Duration: 12 Weeks
Cost: $200.00
Duration: 12 Weeks
Cost: $225.00
Cost: $16
Half a day is considered 4 hours or less.
Cost: $24
Cost: $24
Two dogs must be from the same household.
Half a day is considered 4 hours or less.
Cost: $43
Two dogs must be from the same household.
Cost: $160
A package is 11 single-dog half days.
Half a day is considered 4 hours or less.
Cost: $240
A package is 11 single-dog days
* HST is extra on all prices.
80 Joseph Zatzman Drive, Burnside, NS | (902) 468‑0207 | fetchinc.k9@gmail.com


I need police help, how can I contact them directly?
You can call the following numbers to get some help or you can look for a security officer or a Metropolitano de Lisboa employee:
- National emergency number: 112
- 1st Metro police station: (+351) 21 352 1040 (Marquês de Pombal station)
- Gare do Oriente police station: (+351) 21 894 6046 (Oriente station)
- Lisbon Metropolitan Comamnd: (+351) 21 765 4242
- Turism police station: (+351) 21 342 1623 / 21 340 0090


A mine blew you up. Try Again?
Congratulations! you've found all the non-mined areas! Play Another Round
Each of the squares on the board below may or may not contain an exploding mine. The object of this game is to find all the non-mined squares on the board. This can be accomplished using logic and a bit of guessing. If a square you click on is mined, you lose the game. If it isn't mined, that square will reveal how many mines exist in adjacent squares. If there are no adjacent mines, the game will reveal the adjacents cells as if they have been clicked.
When you think that you've revealed all of the non-mined squares, click "Validate" to see if you are right.


VGCHANGE
Section: Maintenance Commands (8)Updated: LVM TOOLS 2.02.95(2)-RHEL6 (2012-10-16)
Index Return to Main Contents
NAME
vgchange - change attributes of a volume groupSYNOPSIS
vgchange [--addtag Tag] [--alloc AllocationPolicy] [-A|--autobackup {y|n}] [-a|--available [e|l] {y|n}] [--monitor {y|n}] [--poll {y|n}] [-c|--clustered {y|n}] [-u|--uuid] [-d|--debug] [--deltag Tag] [-h|--help] [--ignorelockingfailure] [--ignoremonitoring] [--sysinit] [--noudevsync] [-l|--logicalvolume MaxLogicalVolumes] [-p|--maxphysicalvolumes MaxPhysicalVolumes] [--[vg]metadatacopies] NumberOfCopies|unmanaged|all] [-P|--partial] [-s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE]] [--refresh] [-t|--test] [-v|--verbose] [--version] [-x|--resizeable {y|n}] [VolumeGroupName...]DESCRIPTION
vgchange allows you to change the attributes of one or more volume groups. Its main purpose is to activate and deactivate VolumeGroupName, or all volume groups if none is specified. Only active volume groups are subject to changes and allow access to their logical volumes. [Not yet implemented: During volume group activation, if vgchange recognizes snapshot logical volumes which were dropped because they ran out of space, it displays a message informing the administrator that such snapshots should be removed (see lvremove(8)). ]OPTIONS
See lvm for common options.- -A, --autobackup {y|n}
- Controls automatic backup of metadata after the change. See vgcfgbackup (8). Default is yes.
- -a, --available [e|l]{y|n}
- Controls the availability of the logical volumes in the volume group for input/output. In other words, makes the logical volumes known/unknown to the kernel.
- If clustered locking is enabled, add 'e' to activate/deactivate exclusively on one node or 'l' to activate/deactivate only on the local node. Logical volumes with single-host snapshots are always activated exclusively because they can only be used on one node at once.
- -c, --clustered {y|n}
- If clustered locking is enabled, this indicates whether this Volume Group is shared with other nodes in the cluster or whether it contains only local disks that are not visible on the other nodes. If the cluster infrastructure is unavailable on a particular node at a particular time, you may still be able to use Volume Groups that are not marked as clustered.
- -u, --uuid
- Generate new random UUID for specified Volume Groups.
- --monitor {y|n}
- Start or stop monitoring a mirrored or snapshot logical volume with dmeventd, if it is installed. If a device used by a monitored mirror reports an I/O error, the failure is handled according to mirror_image_fault_policy and mirror_log_fault_policy set in lvm.conf(5).
- --poll {y|n}
- Without polling a logical volume's backgrounded transformation process will never complete. If there is an incomplete pvmove or lvconvert (for example, on rebooting after a crash), use --poll y to restart the process from its last checkpoint. However, it may not be appropriate to immediately poll a logical volume when it is activated, use --poll n to defer and then --poll y to restart the process.
- --sysinit
- Indicates that vgchange(8) is being invoked from early system initialisation scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are available. As such, some functionality needs to be disabled and this option acts as a shortcut which selects an appropriate set of options. Currently this is equivalent to using --ignorelockingfailure, --ignoremonitoring, --poll n and setting LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable.
- --noudevsync
- Disable udev synchronisation. The process will not wait for notification from udev. It will continue irrespective of any possible udev processing in the background. You should only use this if udev is not running or has rules that ignore the devices LVM2 creates.
- --ignoremonitoring
- Make no attempt to interact with dmeventd unless --monitor is specified. Do not use this if dmeventd is already monitoring a device.
- -l, --logicalvolume MaxLogicalVolumes
- Changes the maximum logical volume number of an existing inactive volume group.
- -p, --maxphysicalvolumes MaxPhysicalVolumes
- Changes the maximum number of physical volumes that can belong to this volume group. For volume groups with metadata in lvm1 format, the limit is 255. If the metadata uses lvm2 format, the value 0 removes this restriction: there is then no limit. If you have a large number of physical volumes in a volume group with metadata in lvm2 format, for tool performance reasons, you should consider some use of --pvmetadatacopies 0 as described in pvcreate(8), and/or use --vgmetadatacopies.
- --[vg]metadatacopies NumberOfCopies|unmanaged|all
- Sets the desired number of metadata copies in the volume group. If set to a non-zero value, LVM will automatically manage the 'metadataignore' flags on the physical volumes (see pvchange or pvcreate --metadataignore) in order to achieve NumberOfCopies copies of metadata. If set to unmanaged, LVM will not automatically manage the 'metadataignore' flags. If set to all, LVM will first clear all of the 'metadataignore' flags on all metadata areas in the volume group, then set the value to unmanaged. The vgmetadatacopies option is useful for volume groups containing large numbers of physical volumes with metadata as it may be used to minimize metadata read and write overhead.
- -s, --physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE]
-
Changes the physical extent size on physical volumes of this volume group.
A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
is the default if no suffix is present.
The default is 4 MB and it must be at least 1 KB and a power of 2.
Before increasing the physical extent size, you might need to use lvresize, pvresize and/or pvmove so that everything fits. For example, every contiguous range of extents used in a logical volume must start and end on an extent boundary.
If the volume group metadata uses lvm1 format, extents can vary in size from 8KB to 16GB and there is a limit of 65534 extents in each logical volume. The default of 4 MB leads to a maximum logical volume size of around 256GB.
If the volume group metadata uses lvm2 format those restrictions do not apply, but having a large number of extents will slow down the tools but have no impact on I/O performance to the logical volume. The smallest PE is 1KB.
The 2.4 kernel has a limitation of 2TB per block device. - --refresh
- If any logical volume in the volume group is active, reload its metadata. This is not necessary in normal operation, but may be useful if something has gone wrong or if you're doing clustering manually without a clustered lock manager.
- -x, --resizeable {y|n}
- Enables or disables the extension/reduction of this volume group with/by physical volumes.
EXAMPLES
To activate all known volume groups in the system:vgchange -a yTo change the maximum number of logical volumes of inactive volume group vg00 to 128.
vgchange -l 128 /dev/vg00
SEE ALSO
lvchange(8), lvm(8), vgcreate(8)
Index
This document was created by man2html, using the manual pages.
Time: 05:34:31 GMT, December 24, 2015


Márcio Azevedo
There’s a school of thought that says how high performers win in the marketplace is because they out-learn the competition, or as Andrew Shafer said:
You’re either a learning organisation or you’re losing to somebody who is.
Presentation Source Code based on FsReveal
References:
The Phoenix Project book
https://anoblequest.wordpress.com/2018/06/13/the-phoenix-project/
The Three Ways: Principles Underpinning DevOps!


Parade Docs
(100% documented)
Parade Reference
Parade Reference
Classes
ConcurrentOperation
Queue
RequestOperation
– RequestError
SynchronousOperation
Enumerations
HTTPMethod
Structures
Semaphore


This object describes the rotation from a frame 1 into a frame 2. An instance of this type should never be directly accessed but only with the access functions provided in package Modelica.Mechanics.MultiBody.Frames. As a consequence, it is not necessary to know the internal representation of this object as described in the next paragraphs.
"Orientation" is defined to be a record consisting of two elements: "Real T[3,3]", the transformation matrix to rotate frame 1 into frame 2 and "Real w[3]", the angular velocity of frame 2 with respect to frame 1, resolved in frame 2. Element "T" has the following interpretation:
Orientation R; R.T = [ex, ey, ez]; e.g., R.T = [1,0,0; 0,1,0; 0,0,1]
where ex,ey,ez are unit vectors in the direction of the x-axis, y-axis, and z-axis of frame 1, resolved in frame 2, respectively. Therefore, if v1 is vector v resolved in frame 1 and v2 is vector v resolved in frame 2, the following relationship holds:
v2 = R.T * v1
The inverse orientation R_inv.T = R.TT describes the rotation from frame 2 into frame 1.
Since the orientation is described by 9 variables, there are 6 constraints between these variables. These constraints are defined in function Frames.orientationConstraint.
R.w is the angular velocity of frame 2 with respect to
frame 1, resolved in frame 2. Formally, R.w is defined
as:
skew(R.w) =
R.T*der(transpose(R.T)) with
| 0 -w[3] w[2] | skew(w) = | w[3] 0 -w[1] | | -w[2] w[1] 0 |
| Name | Description |
|---|---|
| equalityConstraint | Return the constraint residues to express that two frames have the same orientation |


Biography
Hi! My name is Nathan Barlow and I'm an aspiring software developer. I currently work as a Technology Program Manager at Etsy and specialized in MarTech technologies, Taxonomies, and metadata schemas.
Job Experience
I have over 15+ years of experience across multiple industries including positions in Sales, Customer Support, Program Management, and Technical Program Management. Over the last 5 years I've became a SME in Marketing Technologies with an emphasis in Content Management and Digital Asset Management Platforms.
Education
- Bachelors of Arts Degree in Communications, University of Washington.
Work History
- Technical Program Manager, Etsy
- Technical Program Manager, Accenture @ Microsoft
- Technical Program Manager, Yesler @ Microsoft
My Goals
- Obtain the knowledge of a full-stack web developer
- Build a website focused on Football Analytics
- Work for a company that aligns with my core values
Top-10 Places I Visited While in the Navy
- Hiroshima, Japan
- Itsukushima, Japan
- Guam, Micronesia
- Key West, Florida
- San Diego, California
- Pensacola, Florida
- Baltimore, Maryland
- Fallon, Nevada
- Lemoore, California


The Notebook has support for over 40 programming languages, including those popular in Data Science such as Python, R, Julia and Scala.
Notebooks can be shared with others using email, Dropbox, GitHub and the Jupyter Notebook Viewer.
Code can produce rich output such as images, videos, LaTeX, and JavaScript. Interactive widgets can be used to manipulate and visualize data in realtime.
Leverage big data tools, such as Apache Spark, from Python, R and Scala. Explore that same data with pandas, scikit-learn, ggplot2, dplyr, etc.
A multi-user version of the notebook designed for companies, classrooms and research labs
Manage users and authentication with PAM, OAuth or integrate with your own directory service system. Collaborate with others through the Linux permission model.
Deploy the Jupyter Notebook to all of the users in your organization on centralized servers on- or off-site.
Use Docker containers to scale your deployment and isolate user processes using a growing ecosystem of prebuilt Docker containers.
Deploy the Notebook next to your data to provide unified software management and data access within your organization.
Jupyter Notebooks are an open document format based on JSON. They contain a complete record of the user's sessions and embed code, narrative text, equations and rich output.
Go backThe Notebook communicates with computational Kernels using the Interactive Computing Protocol, an open network protocol based on JSON data over ZMQ and WebSockets.
Go backKernels are processes that run interactive code in a particular programming language and return output to the user. Kernels also respond to tab completion and introspection requests.
Go back


Watcher Class
The application that can be used to monitor your services status. An application overview and detailed configuration instructions and examples can be found at watcher
Item Index
Methods
Properties
Methods
_deleteEndpoint
-
id
-
callback
Deletes the endpoint of the specified id from the persistence storage (the filesystem is used for easy modification).
Parameters:
-
id
Stringthe endpoint id.
-
callback
Functionthe callback(err) of the async process.
_getStoredEndpoints
()
Array
private
Stores endpoint info at persistence storage (at the filesystem for easy modification).
Returns:
the persistent endpoints.
_notify
()
private
Sends notification email if erroneous service status occurs.
_persistEndpointConfig
-
config
-
callback
Stores endpoint at the persistence storage (the filesystem is used for easy modification).
Parameters:
-
config
Objectthe endpoint configuration.
-
callback
Functioncallback function to async write operation.
Throws:
An error when the operation can not be performed (e.g. no write permissions).
_registerEndpoint
-
config
Registers an endpoint.
Parameters:
-
config
Objectthe endpoint configuration.
Returns:
the endpoint.
_restartIfPassive
()
private
Activates the system again if it is passivated.
_setup
()
private
Setup the Watcher.
_updateEndpointConfig
-
id
-
properties
-
callback
Updates the endpoint of the specified id from the persistence storage (the filesystem is used for easy modification).
Parameters:
-
id
Stringthe endpoint id.
-
properties
Objectupdated properties.
-
callback
Functionthe callback(err, properties) of the async process.
addEndpoint
-
config
-
store
-
callback
Adds an endpoint with the specified configuration. For the configuration see at watcher
Parameters:
-
config
Objectthe endpoint configuration (see at create).
-
store
Booleanused to indicate whether or not to store the endpoint.
-
callback
Functionthe callback(err, endpoint) of the async process.
addListener
-
event
-
listener
Add listener specific events of the Watcher.
Parameters:
-
event
Stringthe event.
-
listener
Objectthe listener.
getEndpoint
-
id
Returns the endpoint with the specified id.
Parameters:
-
id
Stringthe endpoint id.
Returns:
the endpoint.
getEndpoints
()
Array
Returns the endpoints.
Returns:
the endpoints.
getHistory
-
qOpts
-
callback
Returns the endpoint/s history status.
Parameters:
-
qOpts
Objectthe query options.
-
callback
Functionthe callback(err, recs) of the async process.
Example:
Query options details.
//Specify the "endpointId" to return the history of the specific endpoint,
//otherwise the history of all endpoints is returned
//Specify both 'from' and 'to' properties to return the history status for
//the specific time period, otherwise the complete history is returned.
{
endpointId: <endpoint id>
from: <from time> //defined in mills
to: <to time> //defined in mills
}
getResolutionStrategies
()
Array
Returns the registered resolution strategies.
Returns:
the strategies.
notifyOnErroneousStatus
-
id
-
notify
-
callback
Enables/disables the notification on erroneous status for the endpoint with the specified id.
Parameters:
-
id
Stringthe endpoint id.
-
notify
Booleantrue or false to enable or disable the notification respectively.
-
callback
Functionthe callback(err, endpoint) of the async process.
removeEndpoint
-
id
-
callback
Removes the endpoint with the specified id.
Parameters:
-
id
Stringthe endpoint id.
-
callback
Functionthe callback(err, id) of the async process.
setEndpointActivationState
-
id
-
active
-
callback
Activate/Deactivates the endpoint with the specified id.
Parameters:
-
id
Stringthe endpoint id.
-
active
Booleantrue or false to activate or deactivate the specific endpoint respectively.
-
callback
Functionthe callback(err, endpoint) of the async process.
Returns:
the endpoint or undefined if the endpoint does not exist.
start
()
Starts the Watcher.
stop
()
Stops the Watcher.
Properties
_registry
Object
private
Holds the registered endpoints.


version 3.69
Dnamove - Interactive DNA parsimony
© Copyright 1986-2008 by the University of
Washington. Written by Joseph Felsenstein. Permission is granted to copy
this document provided that no fee is charged for it and that this copyright
notice is not removed.
Dnamove is an interactive DNA parsimony program, inspired by Wayne Maddison and
David and Wayne Maddison's marvellous program MacClade, which is written for
Macintosh computers. Dnamove reads in a data set which is prepared in almost
the same format as one for the DNA parsimony program Dnapars. It allows
the user to choose an initial tree, and displays this tree on the screen. The
user can look at different sites and the way the nucleotide states are
distributed on that tree, given the most parsimonious reconstruction of state
changes for that particular tree. The user then can specify how the tree is to
be rearraranged, rerooted or written out to a file. By looking at different
rearrangements of the tree the user can manually search for the most
parsimonious tree, and can get a feel for how different sites are affected
by changes in the tree topology.
This program uses graphic characters that show the tree to best
advantage on some computer systems.
Its graphic characters will work best on MSDOS systems or MSDOS windows in
Windows, and to
any system whose screen or terminals emulate ANSI standard terminals
such as old Digital VT100 terminals,
Telnet programs,
or VT100-compatible windows in the X windowing system.
For any other screen types, (such as Macintosh windows) there is a generic
option which does
not make use of screen graphics characters. The program will work well
in those cases, but the tree it displays will look a bit uglier.
The input data file is set up almost identically to the data files for
Dnapars. The code for nucleotide sequences is the standard one, as
described in the molecular sequence programs document.
The user trees are contained in the input tree file
which is used for input of the starting tree (if desired). The
output tree file is used for the final tree.
The user interaction starts with the program presenting a menu. The
menu looks like this:
Interactive DNA parsimony, version 3.69
Settings for this run:
O Outgroup root? No, use as outgroup species 1
W Sites weighted? No
T Use Threshold parsimony? No, use ordinary parsimony
I Input sequences interleaved? Yes
U Initial tree (arbitrary, user, specify)? Arbitrary
0 Graphics type (IBM PC, ANSI, none)? ANSI
S Width of terminal screen? 80
L Number of lines on screen? 24
Are these settings correct? (type Y or the letter for one to change)
|
The O (Outgroup), W (Weights), T (Threshold), and 0 (Graphics type) options
are the usual
ones and are described in the main documentation file. The I
(Interleaved) option is the usual one and is described in the main
documentation file and the molecular sequences programs documentation file.
The U (initial tree) option allows the user to choose whether
the initial tree is to be arbitrary, interactively specified by the user, or
read from a tree file. Typing U causes the program to change among the
three possibilities in turn. I
would recommend that for a first run, you allow the tree to be set up
arbitrarily (the default), as the "specify" choice is difficult
to use and the "user tree" choice requires that you have available a tree file
with the tree topology of the initial tree, which must be a rooted tree.
Its default name is intree. The program will ask you for its name if
it looks for the input tree file and does not find one of this name.
If you wish to set up some
particular tree you can also do that by the rearrangement commands specified
below.
The W (Weights) option allows only weights of 0 or 1.
The T (threshold) option allows a continuum of methods between parsimony and
compatibility. Thresholds less than or equal to 1.0 do not have any
meaning and should not be used: they will result in a tree dependent only on
the input order of species and not at all on the data!
The S (Screen width) option allows the width in characters of the
display to be adjusted when more than 80 characters can be displayed on
the user's screen.
The L (screen Lines) option allows the user to change the height of the
screen (in lines of characters) that is assumed to be available on the
display. This may be particularly helpful when displaying large trees
on terminals that have more than 24 lines per screen, or on workstation
or X-terminal screens that can emulate the ANSI terminals with more than
24 lines.
After the initial menu is displayed and the choices are made,
the program then sets up an initial tree and displays it. Below it will be a
one-line menu of possible commands, which looks like this:
NEXT? (Options: R # + - S . T U W O F C H ? X Q) (H or ? for Help)
If you type H or ? you will get a single screen showing a description of each
of these commands in a few words. Here are slightly more detailed
descriptions:
- R
- ("Rearrange")
- This command asks for the number of a node which is to be
removed from the tree. It and everything to the right of it on the tree is to
be removed (by breaking the branch immediately below it). The command also
asks for the number of a node below which that group is to be inserted. If an
impossible number is given, the program refuses to carry out the rearrangement
and asks for a new command. The rearranged tree is displayed: it will often
have a different number of steps than the original. If you wish to undo a
rearrangement, use the Undo command, for which see below.
- #
- This command, and the +, - and S commands described below, determine
which site has its states displayed on the branches of
the trees. The initial tree displayed by the program does not show
states of sites. When # is typed, the program does not ask the user which
site is to be shown but automatically shows the states of the next
site that is not compatible with the tree (the next site that does not
perfectly fit the current tree). The search for this site "wraps around"
so that if it reaches the last site without finding one that is not
compatible with the tree, the search continues at the first site; if no
incompatible site is found the current site is shown again, and if no current
site is being shown then the first site is shown. The display takes the form of
different symbols or textures on the branches of the tree. The state of each
branch is actually the state of the node above it. A key of the symbols or
shadings used for states A, C, G, T (U) and ? are shown next to the
tree. State ? means that more than one possible nucleotide could exist at
that point
on the tree, and that the user may want to consider the different
possibilities, which are usually apparent by inspection.
- +
- This command is the same as # except that it goes forward one site,
showing the states of the next site. If no site has been shown, using + will
cause the first site to be shown. Once the last site has been
reached, using + again will show the first site.
- -
- This command is the same as + except that it goes backwards, showing the
states of the previous site. If no site has been shown, using - will
cause the last site to be shown. Once site number 1 has been
reached, using - again will show the last site.
- S ("Show").
- This command is the same as + and - except that it causes
the program to ask you for the number of a site. That site is
the one whose states will be displayed. If you give the site number as 0,
the program will go back to not showing the states of the sites.
- . (dot)
- This command simply causes the current tree to be redisplayed. It is of
use when the tree has partly disappeared off of the top of the screen owing to
too many responses to commands being printed out at the bottom of the screen.
- T ("Try rearrangements").
- This command asks for the name of a node. The
part of the tree at and above that node is removed from the tree. The program
tries to re-insert it in each possible location on the tree (this may take some
time, and the program reminds you to wait). Then it prints out a summary. For
each possible location the program prints out the number of the node to the
right of the
place of insertion and the number of steps required in each case. These are
divided into those that are better than or tied with the current tree. Once
this summary is printed out, the group that was removed is reinserted into its
original position. It is up to you to use the R command to actually carry out
any of the arrangements that have been tried.
- U ("Undo").
- This command reverses the effect of the most recent
rearrangement, outgroup re-rooting, or flipping of branches. It returns to the
previous tree topology. It will be of great use when rearranging the tree and
when a rearrangement proves worse than the preceding one -- it permits you to
abandon the new one and return to the previous one without remembering its
topology in detail.
- W ("Write").
- This command writes out the current tree onto a tree output
file. If the file already has been written to by this run of Dnamove, it will
ask you whether you want to replace the contents of the file, add the tree to
the end of the file, or not write out the tree to the file. The tree
is written in the standard format used by PHYLIP (a subset of the
Newick standard). It is in the proper format to serve as the
User-Defined Tree for setting up the initial tree in a subsequent run of the
program. Note that if you provided the initial tree topology in a tree file
and replace its contents, that initial tree will be lost.
- O ("Outgroup").
- This asks for the number of a node which is to be the
outgroup. The tree will be redisplayed with that node
as the left descendant of the bottom fork. Note that it is possible to
use this to make a multi-species group the outgroup (i.e., you can give the
number of an interior node of the tree as the outgroup, and the program will
re-root the tree properly with that on the left of the bottom fork).
- F ("Flip").
- This asks for a node number and then flips the two branches at
that node, so that the left-right order of branches at that node is
changed. This does not actually change the tree topology (or the number of
steps on that tree) but it does change the appearance of the tree.
- C ("Clade").
- When the data consist of more than 12 species (or more than
half the number of lines on the screen if this is not 24), it may be
difficult to display the tree on one screen. In that case the tree
will be squeezed down to
one line per species. This is too small to see all the interior states of the
tree. The C command instructs the program to print out only that part of the
tree (the "clade") from a certain node on up. The program will prompt you for
the number of this node. Remember that thereafter you are not looking at the
whole tree. To go back to looking at the whole tree give the C command again
and enter "0" for the node number when asked. Most users will not want to use
this option unless forced to.
- H ("Help").
- Prints a one-screen summary of what the commands do, a few
words for each command.
- ? ("huh?").
- A synonym for H. Same as Help command.
- X ("Exit").
- Exit from program. If the current tree has not yet been saved
into a file, the program will first ask you whether it should be saved.
- Q ("Quit").
- A synonym for X. Same as the eXit command.
ADAPTING THE PROGRAM TO YOUR COMPUTER AND TO YOUR TERMINAL
As we have seen, the initial menu of the program allows you to choose
among three screen types (PCDOS, Ansi, and none).
If you want to avoid having to make this choice every time, you can change
some of the constants in the file phylip.h to have the terminal type
initialize itself in the proper way, and recompile. We have tried to
have the default values be correct for PC, Macintosh, and Unix
screens. If the setting is "none" (which is necessary on
Macintosh MacOS 9 screens), the special graphics
characters will not be used to indicate nucleotide states, but only letters
will be used for the four nucleotides. This is less easy to look at.
The constants that need attention are ANSICRT and IBMCRT.
Currently these are both set to "false" on Macintosh MacOS 9 systems,
to "true" on MacOS X and on Unix/Linux
systems, and IBMCRT is set to "true" on Windows systems. If your system
has an ANSI compatible terminal, you might want to find the
definition of ANSICRT in phylip.h and set it to "true", and
IBMCRT to "false".
MORE ABOUT THE PARSIMONY CRITERION
This program carries out unrooted parsimony (analogous to Wagner
trees) (Eck and Dayhoff, 1966; Kluge and Farris, 1969) on DNA
sequences. The method of Fitch (1971) is used to count the number of
changes of base needed on a given tree. The assumptions of this
method are exactly analogous to those of MIX:
- Each site evolves independently.
- Different lineages evolve independently.
- The probability of a base substitution at a given site is
small over the lengths of time involved in
a branch of the phylogeny.
- The expected amounts of change in different branches of the phylogeny
do not vary by so much that two changes in a high-rate branch
are more probable than one change in a low-rate branch.
- The expected amounts of change do not vary enough among sites that two
changes in one site are more probable than one change in another.
That these are the assumptions of parsimony methods has been documented
in a series of papers of mine: (1973a, 1978b, 1979, 1981b,
1983b, 1988b). For an opposing view arguing that the parsimony methods
make no substantive
assumptions such as these, see the papers by Farris (1983) and Sober (1983a,
1983b), but also read the exchange between Felsenstein and Sober (1986).
Change from an occupied site to a deletion is counted as one
change. Reversion from a deletion to an occupied site is allowed and is also
counted as one change.
Below is a test data set, but we cannot show the
output it generates because of the interactive nature of the program.
DATA SET
5 13
Alpha AACGUGGCCA AAU
Beta AAGGUCGCCA AAC
Gamma CAUUUCGUCA CAA
Delta GGUAUUUCGG CCU
Epsilon GGGAUCUCGG CCC
|


Our Father’s Retirement And The Shared Fear Of Uselessness
Our Father’s Retirement And The Shared Fear Of Uselessness
It is not uncommon for boys, earlier in their life, to look at the man who bore them as a tyrant, a dictator, and, for some of us, an enemy. It is, likewise, not uncommon for boys, later in their life, to find the good in their fathers and hold it dear.
I suppose then that it’s no surprise I’m about to do just that.
My father is a man bound by usefulness. His self worth is directly proportional to how much he can do for you. He and my mother share that trait. Maybe everyone does after a certain age.
Nevertheless, in that line of duty, my father derided his boys at every turn. My brother and I were made to feel useless at the expense of our father’s need to feel useful. “You guys will just mess it up,” the echoes of the past ring. “Let me warm up the car. Let me fix that. Let me do it.”
As a result of this tutelage, or lack there of, our entire lives have been defined by the pursuit of a similar purpose — a pursuit which, for both of us, has been characterized by the need to help people.
The irony of my father’s “teachings” was that we would develop the same behaviour, born by a need to be useful, due to a birthright of fostered uselessness.
Of course, it was his attitude which, in my youth, made my father my enemy. And, likely, it was my resulting, unknowingly-imitative attitude that made me my brother’s enemy.
So, in pursuit of usefulness, my brother and I went separate ways, both in opposing trajectories towards different gaps in my father’s domains.
My brother sought to close my father’s academic gap and to help, as our father rarely did, others learn. He’s a teacher, a studied one, and he has both the artistic, linguistic, and literary acumen and context which my father and I lack.
I opted for the trades of business and technology, the confluence of which has become my home: product management—a home wherein I find my value in helping others add value efficiently and effectively. I closed the business and tech gap of my father and brother.
And yet, for our pursuits, my brother and I end up remarkably as our father has.
I have built my career on running around trying to do things for others. Find a little hacky code-shop work-around to enable a stakeholder without dev. Get this favour from one stakeholder to buy us time to build a better product for another. Convince leadership to give us time to buy air cover for tech debt to curry dev favour.
I’m the handyman of software development. But I’m not the architect. I’m not the electrician, nor the plumber, nor the foreman, nor the financer. I am a band-aid covering a healing wound growing resilient to future tears and tears, as my father was.
And so, I fear for my father a future I envision for myself which my father faces before me but not for me: retirement; irrelevance.
On The Eve Of Uselessness
I provide the above context for a reason, as it informs why the events of last Friday gave birth to such fearful introspection.
My father, after 40+ years of working and nearly 30 in a single employ, has finally retired—that, the escarpment before him. He spent this lifetime working for Piedmont-Hawthorne, the primary private airport in the country’s biggest city.
For a man who spent his life in manual labour, “Pa” has had gilded career full of hard-working nights and celebrity-tipping days. His luck in landing at the private airport afforded him years of celebrity meetings which he cherished and looked on fondly.
He has spoken and will gladly speak on chatting with Robin Williams, Chris Rock, Mel Gibson, George Clooney, Tiger Woods. He will speak fonder still of being tipped by Mario Lemieux and Wayne Gretzky. And yet, fonder still will he speak of unloading the Montreal Canadiens and loading their plane back up after a Toronto-afforded victory against his local hatred.
But above all he’d remind me, and tell you, year after year that I’d played with Melanie Griffith’s daughter one “Take Your Kids To Work” day. I still don’t know who she even is.
And my father was lauded in his work by his peers. He was the consummate handyman of the office. He had a lot of answers and helped everyone with everything every day.
Indeed, we grew up with that being our father’s privilege in a life otherwise wrought with cold winters on the unforgiving tarmac, euphemistically called “the ramp”.
But it is only now, later in life, that I see the weary behind the wow that we’d tell others of when they asked “what does your father do”.
30+ years of coming home blistered, bruised, beaten up, bent over backwards, busted, and broken only to feel his children’s ignorant indifference as they whined about bad internet, bad driveway shovelling, bad toys and games and irrelevancies.
30+ years in a marriage that surely started with more passion than it will end with but within which a mutual set of principles kept the bad days from boiling over and a matching set of priorities encouraged the good ones.
30+ years working Christmas and Thanksgiving and Easter and holidays to afford a lifestyle for his children which he couldn’t.
30+ years doing what his two sons have vowed never to do: raise a family.
30+ years of being the handyman but not the pilot nor the mechanical engineer nor the celebrity.
And so when two fire trucks appeared on the ramp to send him off with a cascade of firehose water, and when the C-level suite from Raleigh and Texas and Florida personally called him to wish him luck, and when his work passed a hat to accrue $1000, and his boss bought him a fabled pair of tickets to a Leafs v. Canadiens game in a year when the former is likely to be decimated by the latter, you might understand why all of our family grew teary-eyed.
This is the man’s swan song before our collective fear is realized.
And it is a small porthole into our collective feared future where we will, as he now does, face an immediate, well-founded fear of uselessness.
I’m scared. I’m scared of him feeling useless. I’m scared of him becoming useless. I’m scared of him being useless.
I’m full of genuine fear — an unquestionably privileged fear, but fear nonetheless—for a future which I can neither prevent, nor control, nor avoid.
He has no idea how to retire. We have no idea how to help him. We have no idea how to retire. And we have no idea how to survive in the world thereafter, neither his now nor ours later.