--- title: Polyglot Exploration of Function Overloading author: Jonathan Carroll date: '2023-04-03' categories: - fortran - haskell - julia - rstats - rust tags: - fortran - haskell - julia - rstats - rust slug: polyglot-overloading ---
I’ve been working my way through Exercism exercises in a variety of languages because I strongly believe every language you learn something about teaches you about all the others you know, and makes for useful comparisons between what features they offer. I was Learning Me a Haskell for Great Good (there’s a guide/book by that name) and something about Pattern Matching just seemed extremely familiar.
I’ve been working my way through Exercism exercises in a variety of languages because I strongly believe every language you learn something about teaches you about all the others you know, and makes for useful comparisons between what features they offer. I was1 Learning Me a Haskell for Great Good (there’s a guide/book by that name) and something about Pattern Matching just seemed extremely familiar.
Pattern Matching is sort of like a case
statement, but rather than just comparing literal
values against some enum
, it takes into consideration how the input “looks”. A simple example
is to match against either an empty list []
(just that; an empty list) or a non-empty list denoted
(x:xs)
. In Haskell, :
is a concatenation operator (cons
in lisp) so this is the concatenation
of x
and the rest of a list, xs
. The wildcard pattern _
matching “whatever”.
A map
function definition (from here) is then
map _ [] = []
map f (x:xs) = f x : map f xs
This is two definitions for map
, depending on which pattern is provided as the two arguments. The first
takes “whatever” (doesn’t matter, is ignored) and an empty list and just returns an empty list. The
second takes some function f
and a non-empty list, and concatenates (:
) (f x)
(the first
element of the list x
provided to the function f
) with map f xs
(the result of providing f
and the
rest of the list xs
to map
, recursively).
Since Haskell is strongly typed, I don’t think this can be used to define the same named function for
different types, but it can certainly do something different depending on the pattern of the data.
In this example, if the argument is an empty list, return 0
; if the argument is a length-1 list (arg1
concatenated with an empty list) then return arg1 * 100
, and if the argument is a longer list, return
the product of the first element and the second. This then prints out calling fun 5.0
and fun [5.0, 5.0]
fun :: [Float] -> Float
fun [] = 0.0
fun (arg1:[]) = arg1 * 100.0
fun (arg1:arg2) = arg1 * (head arg2)
main = do
print (fun [5.0])
print (fun [5.0, 5.0])
500.0
25.0
Woo! A different function called depending on the input. I believe it might be possible to actually
have optional arguments via the Data.Maybe
package but I couldn’t get it to compile an example the way
I wanted2.
Rust has something similar but more specific to a case
statement; a match
expression
can take patterns as options and return whichever matches (example from here)
fn main() {
let input = 's';
match input {
'q' => println!("Quitting"),
'a' | 's' | 'w' | 'd' => println!("Moving around"),
'0'..='9' => println!("Number input"),
_ => println!("Something else"),
}
}
Moving around
Another common use of match
is to switch between the enums
Some
and None
or Ok
and Err
(see here).
The familiarity of the Haskell pattern matching / function definition took me back to one of the very first programming ‘tricks’ I learned way back in the late 2000’s working on my PhD, using Fortran; “function overloading”. I wasn’t formally taught programming at all (an oversight, given how important it became to doing my research), so I just had to pick up bits and pieces from people who knew more.
I had a bunch of integration routines3 which were slightly different depending on whether or not
the limits were finite4, so I had to call
the right one with various if
statements. The ‘trick’ I was
taught was to use INTERFACE / MODULE PROCEDURE
blocks to “dispatch” depending on the function
signature, or at least the number of arguments. This meant that I could just call integrate
regardless of
whether it was a signature with 4 arguments, or a signature with an additional argument if a bound was Infty
.
A “small” (Fortran is hardly economical with page real-estate) example of this,
following the Haskell example, defines two functions Fun1arg
and Fun2arg
which
can be consolidated into fun
with the INTERFACE
block. Calling fun(x)
or fun(x, y)
is
routed to the function with the relevant signature.
MODULE exampleDispatch
IMPLICIT NONE
INTERFACE fun
MODULE PROCEDURE Fun1arg, Fun2arg
END INTERFACE fun
CONTAINS
! A function that takes one argument
! and multiplies it by 100
REAL FUNCTION Fun1arg(arg1)
IMPLICIT NONE
REAL, INTENT( IN ) :: arg1
Fun1arg = arg1 * 100.0
END FUNCTION Fun1arg
! A function that takes two arguments
! and multiplies them
REAL FUNCTION Fun2arg(arg1, arg2)
IMPLICIT NONE
REAL, INTENT( IN ) :: arg1, arg2
Fun2arg = arg1 * arg2
END FUNCTION Fun2arg
END MODULE exampleDispatch
PROGRAM dispatch
USE exampleDispatch
IMPLICIT NONE
REAL :: a = 5.0
REAL :: fun
PRINT *, fun(a)
PRINT *, fun(a, a)
END PROGRAM dispatch
500.000000
25.0000000
That takes me back! I’m going to dig out my old research code and get it into GitHub for posterity. I’m also going to do the Fortran exercises in Exercism to reminisce some more.
So, not quite the same as the Haskell version, but it got me thinking about dispatch. R has
several approaches. The most common is S3 in which dispatch occurs based on the class
of the first argument to a function, so you can have something different happen to a data.frame
argument and a tibble
argument, but in both cases the signature has the same “shape” - only the
types vary.
Wiring that up to work differently with a list
and any other value (the default case, which
would break for anything that doesn’t vectorize, but it’s a toy example) looks like
fun <- function(x) {
UseMethod("fun")
}
fun.default <- function(x) {
x * 100
}
fun.list <- function(x) {
x[[1]] * x[[2]]
}
fun(5)
fun(list(5, 5))
[1] 500
[1] 25
Another option is to use S4 which is more complicated but more powerful. Here, dispatch can occur based on the entire signature, though (and I may be wrong) I believe that, too, still needs to have a consistent “shape”. A fantastic guide to S4 is Stuart Lee’s post here.
A S4 version of my example could have two options for the signature; one where both
x
and y
are "numeric"
, and another where y
is "missing"
. "ANY"
would also work and
encompass a wider scope.
setGeneric("fun", function(x, y, ...) standardGeneric("fun"))
setMethod("fun", c("numeric", "missing"), function(x, y) {
x * 100
})
setMethod("fun", c("numeric", "numeric"), function(x, y) {
x * y
})
fun(5)
fun(5, 5)
[1] 500
[1] 25
So, can we ever do what I was originally inspired to do - write a simple definition of a function that calculates differently depending on the number of arguments? Aha - Julia to the rescue!! Julia has a beautifully simple syntax for defining methods on signatures: just write it out!
fun(x) = x * 100
fun(x, y) = x * y
println(fun(5))
println(fun(5, 5))
500
25
That’s two different signatures for fun
computing different things, and a lot less
boilerplate compared to the other languages, especially Fortran. What’s written above
is the entire script. You can even go further
and be specific about the types, say, mixing Int
and Float64
definitions
fun(x::Int) = x * 100
fun(x::Float64) = x * 200
fun(x::Int, y::Int) = x * y
fun(x::Int, y::Float64) = x * y * 2
println(fun(5))
println(fun(5.))
println(fun(5, 5))
println(fun(5, 5.))
500
1000.0
25
50.0
It doesn’t get simpler or more powerful than that!!
I’ve added all these examples to a repo split out by language, and some instructions for running them (assuming you have the language tooling already set up).
Do you have another example from a language that does this (well? poorly?) or similar? Leave a comment if you have one, or find me on Mastodon
## ─ Session info ───────────────────────────────────────────────────────────────
## setting value
## version R version 4.1.2 (2021-11-01)
## os Pop!_OS 22.04 LTS
## system x86_64, linux-gnu
## ui X11
## language (EN)
## collate en_AU.UTF-8
## ctype en_AU.UTF-8
## tz Australia/Adelaide
## date 2023-06-17
## pandoc 3.1.1 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
##
## ─ Packages ───────────────────────────────────────────────────────────────────
## package * version date (UTC) lib source
## blogdown 1.17 2023-05-16 [1] CRAN (R 4.1.2)
## bookdown 0.29 2022-09-12 [1] CRAN (R 4.1.2)
## bslib 0.4.1 2022-11-02 [3] CRAN (R 4.2.2)
## cachem 1.0.6 2021-08-19 [3] CRAN (R 4.2.0)
## callr 3.7.3 2022-11-02 [3] CRAN (R 4.2.2)
## cli 3.4.1 2022-09-23 [3] CRAN (R 4.2.1)
## crayon 1.5.2 2022-09-29 [3] CRAN (R 4.2.1)
## devtools 2.4.5 2022-10-11 [1] CRAN (R 4.1.2)
## digest 0.6.30 2022-10-18 [3] CRAN (R 4.2.1)
## ellipsis 0.3.2 2021-04-29 [3] CRAN (R 4.1.1)
## evaluate 0.18 2022-11-07 [3] CRAN (R 4.2.2)
## fastmap 1.1.0 2021-01-25 [3] CRAN (R 4.2.0)
## fs 1.5.2 2021-12-08 [3] CRAN (R 4.1.2)
## glue 1.6.2 2022-02-24 [3] CRAN (R 4.2.0)
## htmltools 0.5.3 2022-07-18 [3] CRAN (R 4.2.1)
## htmlwidgets 1.5.4 2021-09-08 [1] CRAN (R 4.1.2)
## httpuv 1.6.6 2022-09-08 [1] CRAN (R 4.1.2)
## jquerylib 0.1.4 2021-04-26 [3] CRAN (R 4.1.2)
## jsonlite 1.8.3 2022-10-21 [3] CRAN (R 4.2.1)
## knitr 1.40 2022-08-24 [3] CRAN (R 4.2.1)
## later 1.3.0 2021-08-18 [1] CRAN (R 4.1.2)
## lifecycle 1.0.3 2022-10-07 [3] CRAN (R 4.2.1)
## magrittr 2.0.3 2022-03-30 [3] CRAN (R 4.2.0)
## memoise 2.0.1 2021-11-26 [3] CRAN (R 4.2.0)
## mime 0.12 2021-09-28 [3] CRAN (R 4.2.0)
## miniUI <IP_ADDRESS> 2018-05-18 [1] CRAN (R 4.1.2)
## pkgbuild 1.4.0 2022-11-27 [1] CRAN (R 4.1.2)
## pkgload 1.3.0 2022-06-27 [1] CRAN (R 4.1.2)
## prettyunits 1.1.1 2020-01-24 [3] CRAN (R 4.0.1)
## processx 3.8.0 2022-10-26 [3] CRAN (R 4.2.1)
## profvis 0.3.7 2020-11-02 [1] CRAN (R 4.1.2)
## promises <IP_ADDRESS> 2021-02-11 [1] CRAN (R 4.1.2)
## ps 1.7.2 2022-10-26 [3] CRAN (R 4.2.2)
## purrr 1.0.1 2023-01-10 [1] CRAN (R 4.1.2)
## R6 2.5.1 2021-08-19 [3] CRAN (R 4.2.0)
## Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.1.2)
## remotes 2.4.2 2021-11-30 [1] CRAN (R 4.1.2)
## rlang 1.0.6 2022-09-24 [1] CRAN (R 4.1.2)
## rmarkdown 2.18 2022-11-09 [3] CRAN (R 4.2.2)
## rstudioapi 0.14 2022-08-22 [3] CRAN (R 4.2.1)
## sass 0.4.2 2022-07-16 [3] CRAN (R 4.2.1)
## sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.2)
## shiny 1.7.2 2022-07-19 [1] CRAN (R 4.1.2)
## stringi 1.7.8 2022-07-11 [3] CRAN (R 4.2.1)
## stringr 1.5.0 2022-12-02 [1] CRAN (R 4.1.2)
## urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.1.2)
## usethis 2.1.6 2022-05-25 [1] CRAN (R 4.1.2)
## vctrs 0.5.2 2023-01-23 [1] CRAN (R 4.1.2)
## xfun 0.34 2022-10-18 [3] CRAN (R 4.2.1)
## xtable 1.8-4 2019-04-21 [1] CRAN (R 4.1.2)
## yaml 2.3.6 2022-10-18 [3] CRAN (R 4.2.1)
##
## [1] /home/jono/R/x86_64-pc-linux-gnu-library/4.1
## [2] /usr/local/lib/R/site-library
## [3] /usr/lib/R/site-library
## [4] /usr/lib/R/library
##
## ──────────────────────────────────────────────────────────────────────────────
in part due to a strong representation of Haskell at my local Functional Programming Meetup↩
I’m highly likely doing something wrong - I never wrote any Haskell before last week↩
Numerical Recipes in Fortran 90 was about the most important book we had for writing code, basically nothing else was trusted - getting a digital copy of the code was considered a sign of true power↩
what, you don’t have to integrate up to infinity in your code?↩


Having helped out with Linux From Scratch for a short time, I noticed that we were getting many queries as to how to do things beyond the base LFS system. At the time, the only assistance specifically offered relating to LFS were the LFS hints (http://www.linuxfromscratch.org/hints). Most of the LFS hints are extremely good and well written but I (and others) could still see a need for more comprehensive help to go Beyond LFS - hence BLFS.
BLFS aims to be more than the LFS-hints converted to XML although much of our work is based around the hints and indeed some authors write both hints and the relevant BLFS sections. We hope that we can provide you with enough information to not only manage to build your system up to what you want, whether it be a web server or a multimedia desktop system, but also that you will learn a lot about system configuration as you go.
Thanks as ever go to everyone in the LFS/BLFS community; especially those who have contributed instructions, written text, answered questions and generally shouted when things were wrong!
Finally, we encourage you to become involved in the community; ask questions on the mailing list or news gateway and join in the fun on #lfs at irc.linuxfromscratch.org. You can find more details about all of these in the Introduction section of the book.
Enjoy using BLFS.
Mark Hymers
markh <at> linuxfromscratch.org
BLFS Editor (July 2001–March 2003)
I still remember how I found the BLFS project and started using the instructions that were completed at the time. I could not believe how wonderful it was to get an application up and running very quickly, with explanations as to why things were done a certain way. Unfortunately, for me, it wasn't long before I was opening applications that had nothing more than "To be done" on the page. I did what most would do, I waited for someone else to do it. It wasn't too long before I am looking through Bugzilla for something easy to do. As with any learning experience, the definition of what was easy kept changing.
We still encourage you to become involved as BLFS is never really finished. Contributing or just using, we hope you enjoy your BLFS experience.
Larry Lawrence
larry <at> linuxfromscratch.org
BLFS Editor (March 2003–June 2004)
The BLFS project is a natural progression of LFS. Together, these projects provide a unique resource for the Open Source Community. They take the mystery out of the process of building a complete, functional software system from the source code contributed by many talented individuals throughout the world. They truly allow users to implement the slogan "Your distro, your rules."
Our goal is to continue to provide the best resource available that shows you how to integrate many significant Open Source applications. Since these applications are constantly updated and new applications are developed, this book will never be complete. Additionally, there is always room for improvement in explaining the nuances of how to install the different packages. To make these improvements, we need your feedback. I encourage you to participate on the different mailing lists, news groups, and IRC channels to help meet these goals.
Bruce Dubbs
bdubbs <at> linuxfromscratch.org
BLFS Editor (June 2004–December 2006)
My introduction to the [B]LFS project was actually by accident. I was trying to build a GNOME environment using some how-tos and other information I found on the web. A couple of times I ran into some build issues and Googling pulled up some old BLFS mailing list messages. Out for curiosity, I visited the Linux From Scratch web site and shortly thereafter was hooked. I've not used any other Linux distribution for personal use since.
I can't promise anyone will feel the sense of satisfaction I felt after building my first few systems using [B]LFS instructions, but I sincerely hope that your BLFS experience is as rewarding for you as it has been for me.
The BLFS project has grown significantly the last couple of years. There are more package instructions and related dependencies than ever before. The project requires your input for continued success. If you discover that you enjoy building BLFS, please consider helping out in any way you can. BLFS requires hundreds of hours of maintenance to keep it even semi-current. If you feel confident enough in your editing skills, please consider joining the BLFS team. Simply contributing to the mailing list discussions with sound advice and/or providing patches to the book's XML will probably result in you receiving an invitation to join the team.
Randy McMurchy
randy <at> linuxfromscratch.org
BLFS Editor (December 2006–January 2011)


|
Finite Geometry Notes
|
| Related sites: The 16 Puzzle Bibliography On the author |
Diamond
|
|
Motto of |
Symmetry is often described as invariance under a group of transformations. An unspoken assumption about symmetry in Euclidean 3-space is that the transformations involved are continuous.Diamond theory rejects this assumption, and in so doing reveals that Euclidean symmetry may itself be invariant under rather interesting groups of noncontinuous (and asymmetric) transformations. (These might be called noncontinuous groups, as opposed to so-called discontinuous (or discrete) symmetry groups. See Weyl's Symmetry.)
For example, the affine group A on the 4-space over the 2-element field has a natural noncontinuous and asymmetric but symmetry-preserving action on the elements of a 4x4 array. (Details)
By embedding the 4x4 array in a 4x6 array, then embedding A in a supergroup that acts in a natural way on the larger array, one can, as R. T. Curtis discovered, construct the Mathieu group M24 -- which is, according to J. H. Conway, the "most remarkable of all finite groups."
The proof that A preserves symmetry involves the following elementary, but useful and apparently new, result: Every 4-coloring (i.e., every map into a 4-set) can be expressed as a sum of three 2-colorings. It is conceivable that this result might have applications other than to diamond theory. (Details)
The proof that A preserves symmetry also yields some insight into orthogonality of Latin squares, at least in the 4x4 case. In this case, orthogonality turns out to be equivalent to skewness of lines in a finite projective 3-space. (Details)Diamond theory provides simple ways to visualize
- "the simplest non-trivial model for harmonic analysis,"1 the Walsh functions,
- "the smallest perfect universe,"2 the finite projective space PG(3,2),
- the "distinguished geometry," "remarkable geometric individual," and "gem,"3 the finite projective plane PG(2,4),
- the "remarkable"4 outer automorphisms of S6, and
- the structural equivalence of certain
- factorizations3 of graphs,
- parallelisms5 of partitions,
- spreads6 of lines, and
- sets of mutually orthogonal squares (i.e., n-orthogonal7 nxn matrices).
1. F. Schipp et al., Walsh Series, 1990
2. Burkard Polster, website
3. A. Beutelspacher in the American Mathematical Monthly, January 1986
4. P. J. Cameron and J. H. van Lint, Designs, Graphs, Codes, and their Links, 1991
5. P. J. Cameron, Parallelisms of Complete Designs, 1976
6. J. W. P. Hirschfeld, Finite Projective Spaces of Three Dimensions, 1985
7. J. Denes and A. D. Keedwell, Latin Squares and their Applications, 1974As a bonus, extending the action of A to a 4x4x4 array yields a simple way of generating the 1.3 trillion transformations natural to the 64 hexagrams of the I Ching. (Details)
On Euclid's
Elements:
"In view of... admiration the Elements has
consistently elicited over the years, and of the
prestigious role it concomitantly maintained until the
mid-19th century as scientific archetype, it is not
surprising that we find in the history of philosophy a
concept of truth sustained by the example of the
Elements, whose influence in philosophy runs
parallel to that of the Elements in science. This
concept I will call the 'Diamond Theory' of truth."
-- Richard J. Trudeau in The Non-Euclidean
Revolution, 1987
The image below shows the cover of a booklet I wrote in 1976. The booklet details the implications of what I call the "diamond theorem," after the diamond figure in Plato's Meno dialogue. This website, which updates the booklet, is written for mathematicians and college students of mathematics. For a less technical treatment of philosophical and literary matters related to the diamond theorem, see The Diamond Theory of Truth.
The
Non-Euclidean Revolution.
This 1987 book by Richard J. Trudeau, with a brief
introduction by H. S. M. Coxeter, traces in the recent
history of geometry the conflict between what Trudeau calls
the "Diamond Theory of truth" and the "Story
Theory of truth" -- known to more traditional
philosophers as "realism" and "nominalism."
For more on Trudeau's version of diamond theory, see this site's companion website, The Diamond Theory of Truth.
For more on the story theory, consider the following quotation:
"The moral of my story is: Read Euclid and ask questions. Then teach a course on Euclid and later developments arising out of these questions."
The quotation is from Robin Hartshorne, the author of Algebraic Geometry, in "Teaching Geometry According to Euclid," Notices of the American Mathematical Society, April 2000.
Plato tells how Socrates helped Meno's slave boy "remember" the geometry of a diamond. Twenty-four centuries later, this geometry has a new theorem.
|
|
The 2x2 case In the 2x2 case, D is a one-diamond figure (top left, below) and G is a group of 24 permutations generated by random permutations of the four 1x1 quadrants. Every G-image of D (as below) has some ordinary or color-interchange symmetry. |
|
Example of the 4x4
case In the 4x4 case, D is a four-diamond figure (left, below) and G is a group of 322,560 permutations generated by arbitrarily mixing random permutations of rows and of columns with random permutations of the four 2x2 quadrants. Every G-image of D (as at right, below) has some ordinary or color-interchange symmetry. |
||
|
D |
Let e denote transposition of the first two rows, f denote transposition of the last two columns, g denote transposition of the top left and bottom right quadrants, and h denote transposition of the middle two columns. Then Defgh is as at right. Note that Defgh has rotational color-interchange symmetry like that of the famed yin-yang symbol. |
Defgh |
|
Remarks on the 4x4
case: G is isomorphic to the affine group A on the linear 4-space over GF(2). The 35 structures of the 840 = 35 x 24 G-images of D are isomorphic to the 35 lines in the 3-dimensional projective space over GF(2). Orthogonality of structures corresponds to skewness of lines. We can define sums and products so that the G-images of D generate an ideal (1024 patterns characterized by all horizontal or vertical "cuts" being uninterrupted) of a ring of 4096 symmetric patterns. There is an infinite family of such "diamond" rings, isomorphic to rings of matrices over GF(4). For a movable JavaScript version of these 4x4 patterns, see The Diamond 16 Puzzle. |
The statement of the theorem may be clarified by a research announcement written in 1978 that illustrates the above 4x4 example in reverse... Research Announcement, 1978 (pdf).
For an artist's rendering of some patterns generated as described in the diamond theorem (and many not so generated), see the following new (September 11, 2000) website: Tiling, by Mike Lyon.
For more illustrations and a sketch of the proof, see the following
Hartshorne's principle: "Whenever one approaches a subject from two different directions, there is bound to be an interesting theorem expressing their relation." - Robin Hartshorne, AMS Notices, April 2000, p. 464.
Plato's Diamond in the Meno
Plato as a precursor of Gerard Manley Hopkins's "immortal
diamond." An illustration shows the prototype of the figure
D discussed above.
Plato's
Diamond Revisited
Ivars Peterson's Nov. 27, 2000 column "Square of the
Hypotenuse" which discusses the diamond figure as used by
Pythagoras (perhaps) and Plato. Other references to the use
of Plato's diamond in the proof of the Pythagorean
theorem:
"We may say, roughly, that a mathematical idea is
'significant' if it can be connected, in a natural and
illuminating way, with a large complex of other
mathematical ideas."
- G. H. Hardy, A Mathematician's Apology (1940),
Cambridge University Press, reprinted 1969, page
89
affine geometry, affine planes, affine spaces, automorphisms, binary codes, block designs, classical groups, codes, coding theory, collineations, combinatorial, combinatorics, conjugacy classes, the Conwell correspondence, correlations, Cullinane, R. T. Curtis, design theory, the diamond theorem, diamond theory, duads, duality, error correcting codes, exceptional groups, finite fields, finite geometry, finite groups, finite rings, Galois fields, generalized quadrangles, generators, geometry, GF(2), GF(4), the (24,12) Golay code, group actions, group theory, Hadamard matrices, hypercube, hyperplanes, hyperspace, incidence structures, invariance, Karnaugh maps, Kirkman's schoolgirls problem, Latin squares, Leech lattice, linear groups, linear spaces, linear transformations, Mathieu groups, matrix theory, Meno, Miracle Octad Generator, MOG, multiply transitive groups, octads, the octahedral group, orthogonal arrays, outer automorphisms, parallelisms, partial geometries, permutation groups, PG(3,2), Plato, Platonic, polarities, Polya-Burnside theorem, projective geometry, projective planes, projective spaces, projectivities, Reed-Muller codes, the relativity problem, Singer cycle, skew lines, Socrates, sporadic simple groups, Steiner systems, Sylvester, symmetric, symmetry, symplectic, synthemes, synthematic, tesseract, transvections, Walsh functions, Witt designs
The
Combinatorics Net
The
Open Directory list of combinatorics sites
U. of
London Permutation Groups Resources
U.
of London Design Resources on the Web
Diamond Theory Bibliography |
"It is a good light, then, for those
That know the ultimate Plato,
Tranquillizing with this jewel
The torments of confusion."
- Wallace Stevens,
Collected Poetry and Prose, page 21,
The Library of America, 1997
Page updated July 17, 2004, and again on May 25, 2006. Created June 21, 2000.


---
layout: post
title:
date: '2008-01-19T16:09:00.000-08:00'
author: headius
tags:
modified_time: '2011-01-25T21:44:31.994-08:00'
blogger_id: tag:blogger.com,1999:blog-4704664917418794835.post-2644675963454657094
---
It's frustrating to see language wars in action.
Over the past several days, there's been a firestorm of Groovy versus JRuby posts making the rounds. Some call for Sun to "drop JRuby support" or "leave Ruby out in the cold". Others claim "Groovy's not ready for the enterprise" when the poster's incorrect code doesn't work as expected. "JRuby is not a good thing happening to Java"..."In the LAMP world, Ruby comes dead last"...and so on. What a mess.
I think it's time for a little reality check here.


Class TextToSpeechAsyncClient
Service that implements Google Cloud Text-to-Speech API.
Instantiate the text to speech client.
Inheritance
builtins.object > TextToSpeechAsyncClientMethods
from_service_account_file(filename: str, *args, **kwargs)
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
| Type | Name | Description |
|---|---|---|
| str | filename |
The path to the service account private key json file. |
| args |
Additional arguments to pass to the constructor. |
|
| kwargs |
Additional arguments to pass to the constructor. |
| Type | Description |
|---|---|
| <xref:mailto:{api.name>} | The constructed client. |
from_service_account_json(filename: str, *args, **kwargs)
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
| Type | Name | Description |
|---|---|---|
| str | filename |
The path to the service account private key json file. |
| args |
Additional arguments to pass to the constructor. |
|
| kwargs |
Additional arguments to pass to the constructor. |
| Type | Description |
|---|---|
| <xref:mailto:{api.name>} | The constructed client. |
list_voices(request: google.cloud.texttospeech_v1.types.cloud_tts.ListVoicesRequest = None, *, language_code: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: typing.Sequence[typing.Tuple[str, str]] = ()) -> google.cloud.texttospeech_v1.types.cloud_tts.ListVoicesResponse
list_voices(request: google.cloud.texttospeech_v1.types.cloud_tts.ListVoicesRequest = None, *, language_code: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: typing.Sequence[typing.Tuple[str, str]] = ()) -> google.cloud.texttospeech_v1.types.cloud_tts.ListVoicesResponse
Returns a list of Voice supported for synthesis.
| Type | Name | Description |
|---|---|---|
| cloud_tts.ListVoicesRequest | request |
The request object. The top-level message sent by the client for the ListVoices method. |
| google.cloud.texttospeech_v1.services.text_to_speech.str | language_code |
Optional. Recommended.
BCP-47
language tag. If specified, the ListVoices call will
only return voices that can be used to synthesize this
language_code. E.g. when specifying "en-NZ", you will
get supported "en-" voices; when specifying "no", you
will get supported "no-" (Norwegian) and "nb-"
(Norwegian Bokmal) voices; specifying "zh" will also get
supported "cmn-" voices; specifying "zh-hk" will also
get supported "yue-*" voices.
This corresponds to the |
| google.api_core.retry.Retry | retry |
Designation of what errors, if any, should be retried. |
| float | timeout |
The timeout for this request. |
| Sequence[Tuple[str, str]] | metadata |
Strings which should be sent along with the request as metadata. |
| Type | Description |
|---|---|
| .cloud_tts.ListVoicesResponse | The message returned to the client by the |
synthesize_speech(request: google.cloud.texttospeech_v1.types.cloud_tts.SynthesizeSpeechRequest = None, *, input: google.cloud.texttospeech_v1.types.cloud_tts.SynthesisInput = None, voice: google.cloud.texttospeech_v1.types.cloud_tts.VoiceSelectionParams = None, audio_config: google.cloud.texttospeech_v1.types.cloud_tts.AudioConfig = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: typing.Sequence[typing.Tuple[str, str]] = ()) -> google.cloud.texttospeech_v1.types.cloud_tts.SynthesizeSpeechResponse
synthesize_speech(request: google.cloud.texttospeech_v1.types.cloud_tts.SynthesizeSpeechRequest = None, *, input: google.cloud.texttospeech_v1.types.cloud_tts.SynthesisInput = None, voice: google.cloud.texttospeech_v1.types.cloud_tts.VoiceSelectionParams = None, audio_config: google.cloud.texttospeech_v1.types.cloud_tts.AudioConfig = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: typing.Sequence[typing.Tuple[str, str]] = ()) -> google.cloud.texttospeech_v1.types.cloud_tts.SynthesizeSpeechResponse
Synthesizes speech synchronously: receive results after all text input has been processed.
| Type | Name | Description |
|---|---|---|
| cloud_tts.SynthesizeSpeechRequest | request |
The request object. The top-level message sent by the client for the SynthesizeSpeech method. |
| cloud_tts.SynthesisInput | input |
Required. The Synthesizer requires
either plain text or SSML as input.
This corresponds to the |
| cloud_tts.VoiceSelectionParams | voice |
Required. The desired voice of the
synthesized audio.
This corresponds to the |
| cloud_tts.AudioConfig | audio_config |
Required. The configuration of the
synthesized audio.
This corresponds to the |
| google.api_core.retry.Retry | retry |
Designation of what errors, if any, should be retried. |
| float | timeout |
The timeout for this request. |
| Sequence[Tuple[str, str]] | metadata |
Strings which should be sent along with the request as metadata. |
| Type | Description |
|---|---|
| .cloud_tts.SynthesizeSpeechResponse | The message returned to the client by the
|


Logo
Home
Debug
Plugins
Update
Services
Web Design
Web Development
Graphic Design
Pricing
Portfolio
Web Design
Web Development
Graphic Design
Contact
Information
Version
Chip
Flash
Free Heap
Accessories
HAP Clients


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} Back to your profile Errors to fix Check the following details: Enter a valid email address Re-type email address Emails don’t match Change your e-mail address Change your e-mail address New email address Enter a valid email address Re-type email address Re-type email address Emails don't match Continue {% endblock %}
Check the following details:


International Time Sync Day, How About That?
Yesterday, I went through a stressful situation that happens so frequently that I didn’t notice how irritant it was until much later, and it took me another couple other hours to realized that the incident could have been avoided. It went something like this:
1:20 PM, 40 minutes to my yearly evalution at McDonalds, which happends to take place somewhere roughly 30 minutes away from my place. No stress, I’m posting on some forums and chilling. My dad, aka lift, is trying to clean up the workspace next to my desk. I tell him to get ready, 10 minutes to liftoff, and continue browsing till 1:30. I tell dad to get ready, he responds by informing me that he still has 5 minutes left on his watch. I go upstairs for a glass of orange juice, I look at the microwave for the time, it reads 1:36. I look at my cell, it reads 1: 31. I give another holler to dad, take another glass, and by the time we’re in the car, it’s 1:43 on the car radio, but 1:37 on my cell; either way, I’m sure I’m gonna be late. I arrive at my workplace at 2:04 cell time, only to find out that the time given by the restaurant’s central system is 1:58.
You can call me a moron for stressing about being 4 minutes late, but behind the story, there’s a point. In this world people call frantic, restless, and where every second counts, why can’t we get accurate time reading EVERYWHERE? Until all time telling devices are equipped with atomic precision and automatic daily wireless updating, people need to act.
Wouldn’t it be cool if every first Monday of May, we’d all gather around one of many giant public OLED clocks and sync our watches to THE correct time? Better yet, and less costly, what if everybody took advantage of switch to or from DST to syncronize with an internet timeserver? Any of the latter would make people in general much more punctual, and probably less stressful too.
Just a thought… In the meantime, I encourage you to sync your own time at least twice a year, and invite your friends and relatives to do the same thing. If the world can pass around with mouth to mouth, maybe we can go somewhere with this.


Not Inverted
Normal
Dim
Reduce Contrast Only
Invert Luminance
Smart Invert Images
Invert All Images
Keep Images Normal
Inversion Options
Enable Low Contrast
Aggressively Invert Text Input
Kill Backgrounds
Set as default scheme
Deluminate Settings
Something wrong? Let me know!


Concepts and Events
Table of Contents
1 About This Sprint
This sprint introduces a system analysis view of the real world, and describes how to use the UML use cases as a means for finding out what is relevant to model from the real world for the system you are designing.
2 User Stories covered in this Sprint
- As a software designer I want to document my understanding of the problem domain so that I can easily transform this into an object oriented software system.
- As a software designer I want to understand how users plan on interacting with the system so that I can design the right API endpoints.
- As a product manager I want to make sure that fixed bugs do not re-appear so that I can build the product incrementally.
3 Introduction
A large part of the allure of object oriented programming is because it so closely mimics the real world. We are used to seeing objects around us, and are used to viewing objects in terms of what we can do to them. Another important realisation in object oriented programming is the notion that each object in the real world may carry its own state. The state of a real world object may be many things such as its position, its owner, its colour(s), whether it is whole or broken, how it is broken, and so on. But ultimately all of these properties of one object are unique for that particular object, and we do not expect it to be in any other way. Before object oriented programming, this was quite a challenge to achieve in a programming language.
Object oriented programming enabled software developers to analyse problems in terms of the involved real world entities, or Concepts. This shortens the gap between the software you write and the domain you are representing with this software, since concepts in the real world have a corresponding software representation. If the real world concept can do a certain thing or has a certain property, your software representation should probably also be able to do this functionality or or have this property.
The inverse is not necessarily true, though. You will be adding stuff to your software representations just to make them work together as a software system, and this stuff need not have a corresponding real world representation. A real world rucksack does for example not have any need for an std::set<Junk>
, and Swiper
does not need to be aware that he can form a relation to the rucksack before he actually steals it.
3.1 Concepts, Classes and Objects
An important starting point for building an object oriented system is thus to look at the real world and see what objects there are. From these objects we try to find out what common types they belong to (I will refrain from an excursion to Plato and his idea-world). Those are the Concepts that we should model.
We then look for relations between the concepts and describe them as clearly as we can. These relations will help us later on when we see how concepts (or objects) interact with each other to solve a particular task. This also helps when we decide on the scope of the product, i.e. when we decide what is within what the system should do, and what is outside of what the system should do.
Concepts may have attributes, or properties. For example a Person
may have a name
, and an address
. We add those too.
Concepts are similar to Classes as you are used to them in programming, but they are not the same! As stated earlier, a class contains all sorts of methods and attributes that have to do with being a software entity (such as a print()
method, well defined types of all the attributes, collections of relations to other classes, etc. A Concept, on the other hand, should focus solely on the concepts, attributes, and relations that exist in the real world.
Similarly to classes, a concept can be seen as the archetype of a set of objects. For example, if you have a Volvo 244, a Ford Fiesta, and a Wolkswagen Golf, these are examples of the concept Car
. If you construct software to, say, keep track of these cars, you may also have a class Car
, with the instances Volvo244:Car
, FordFiesta:Car
, and VWGolf:Car
. Of course it will be impractical to keep track of the instances, or objects, like this so you may instead have a carArray:Car[]
or a std::set<car>
to maintain your collection of cars. This would also mean that the car brands will need to be represented as attributes of the car instead of encoded in the name of the software variable:
std::set<Car*> myCars; myCars.insert(new Car("Volvo 244")); myCars.insert(new Car("Ford Fiesta")); myCars.insert(new Car("VolksWagen Golf"));
Because of the similarities to classes there is no need to invent a new type of diagram for the conceptual model. Instead, you will re-use the notation for a Class Diagram to model your concepts, their relations, and their attributes.
As you continue with your analysis, you will learn more about the domain and the concepts in the domain, and will be adding this new knowledge into your conceptual model so that you eventually have a head start on creating your class diagram (but I get ahead of myself: We’re not there yet).
3.2 Don’t bite off more than you can chew!
Remember that this is still early days. You have just started coming to grips with what you should be doing and, above all, you have not produced a single thing which has any value to the customer yet! Therefore you should not try to model the whole world and all the concepts in the world. You should stick to the immediate problem domain (which is why we also refer to the conceptual model as a Domain Model).
What’s more, your requirements will change, you will change how you perceive the domain, and you will learn and want to add more as you go along. Even worse, if you try to model everything and everything perfectly, you will be bogged down in this step forever in a form of writers’ block, which does not deliver value to the customer.
The solution and the agile way is thus to only model what is immediately useful for you. This sounds like simple advice, but what is immediately useful?
A good starting point is your UML use cases. The use cases you have selected for the current iteration represent a subset of the complete domain, and are a reasonaby good place to start. The use cases contains plenty of information about different domain concepts and how users interact with them, and so will give you a good starting point. Going through category lists of common types of concepts you can also easily find such concepts from your use cases.
Personally, I would also suggest that you look ahead a little so that you are at least aware of what you are going to do in the coming iterations as well, so that you don’t paint yourself into a corner. But that’s probably just me being stuck in a plan-driven design philosophy.
3.3 Events and System Events
Another thing which we get from the use cases is our API endpoints. Of all the things that a user may do around the system, what does actually the system have to react to? We call those things System Events. Since they may come in a particular order, we can view them as a sequence of system events, and this we model in a System Sequence Diagram.
Consider the following course of events from a UML use case:
| User | System |
|---|---|
| 1. User approaches replicator. | 2. System bleeps friendlily. |
| 3. User orders Tea. | 4. System asks “which flavour?” |
| 5. User decides “Earl Grey” | 6. System asks “what temperature?” |
| 7. User decides “Hot!” | 8. System bleeps acknowledgingly and delivers the ordered beverage. |
The system events we may generate from this are:
- initiateTransaction()
- orderBeverage(“Tea”)
- setFlavour(“Earl Grey”)
- setTemperature(“Hot!”)
Notice that we express these events as method calls. Also note that the order matters. “Hot Earl Grey Tea” will, in this system, not work.
Expressing this in a system sequence diagram:
Figure 3: System Sequence Diagram
In a System Sequence Diagram we are viewing the system as a black box. We put things into the box, and stuff comes out, but we have no clue what’s going on inside. That’s why we only model actors external to the system and the system itself. We do not open up the :System
box to see what’s going on inside, but are only interested in events to and from the system as a whole.
We will come back to Sequence Diagrams later, where we use the same notation to express what’s going on inside the system.
3.4 Attaching a User Interface
So what’s the point of expressing this as method calls? We’re still just doing analysis, aren’t we?
First, there is no clear-cut line where we can say “this is analysis and that is design”. As you learn more about the problem and the problem domain you begin to realise not only what you should build but also how to build it, and so you will be moving into a design space. But you will just as quickly realise that you need more information, and will go back to analysing the problem. Object-oriented software design is very much this movement back and forth between problem analysis and solution design, made easy in particular because of the intentional similarity between the real world and the paradigm of modelling the objects in the real world.
Second, by modelling the system events as method calls we are creating a powerful entry point for our system. I will need to diverge a bit into software architecture in order to explain this further. Please bear with me. Almost all applications with some form of user interaction can be split into three parts, or layers:
Figure 4: Layered Architecture Style
Each layer has an API, a set of methods which we can call to access it. In the case of the user interface, this may consist of buttons and text boxes, but if you are creating a web application, it may also include the API endpoints such as https://www.your.server/User/userid
to access the User profile for userid
, as well as landing pages for your AJAX calls. The point is that you only focus on the interface of the layer you are going to connect to. So if you are an end-user, you only need to worry about the user interface. If you “are” a user interface, you only need to worry about the API for the Application Logic Layer.
For the Application Logic layer, the methods in the API are the system events from your System Sequence Diagram.
This is what makes it so useful that you have already modelled them as method calls. You have now also documented your API; the methods you may call, the system responses, and the order (if any) that the methods must be called.
Moreover, you have done this without having decided how you are going to build your user interface. You are still free to write a desktop GUI application, a mobile phone app (where you have still left the choice open between IOS and Android – at least in theory), or a web application. You may even write your GUI in something esoteric like Unity, and your system sequence diagrams would still look the same.
3.5 Testing
In this sprint, we have introduced two new models; domain models and system sequence diagrams. Both of these are useful for testing purposes. The domain model shows you how you think the problem domain functions. When constructing your tests, this is a better starting point than what you eventually end up implementing. More importantly, the domain model divides your problem domain into smaller entities, concepts, that are possible to unit test. Later on, you can combine your already tested units and run integration tests to make sure the units work together.
Your system sequence diagrams tell you what API endpoints you have in the system. These are an excellent starting point for writing your regression tests. Consider the Layered architecture model in Figure 4 once more. Remember that we specified the API for the Application Logic in the System Sequence Diagram? So why not just “push” the user interface to one side and attach a testing interface there instead? Why not indeed.
Figure 5: Adding a Testing Interface to the Layered Architecture
In one go you have enabled automated testing of your application. Technically, you can (and should) do this on top of the user interface too, but this is easier to get in place.
3.6 Summary
We are thus able to start building a chain of analysis efforts and UML diagrams, where what we learn in one diagram is put to use when creating the next one, as illustrated in Figure 6. Of course, this chain is equally valuable going backwards: In order to find out more about a particular test case and why it is written the way it is, you go back to the UML use case. If this is not enough, you look at the involved requirements, or – via the requirements – contact the original source of the requirement to ask further questions.
Figure 6: A Chain of Design Elements.
4 Learning Material
4.1 Book Chapters
- C. Larman, Applying UML and Patterns, 3rd Edition, Chapters:
- Iteration 1 – Basics
- Domain Models
- System Sequence Diagrams
4.2 Screencasts
4.3 Further Reading
5 Experiential Learning
5.1 Sprint Test Plan
Go through the user stories for this sprint and make sure you have a clear understanding of how to solve each of them.
Revisit and update your risks and contingencies section.
Add and/or revise the following items to your glossary:
- Concept
- Class
- Instance
- Object
- Object state
- Class Diagram
- Domain Model (Also: Conceptual Model)
- System Sequence Diagram
- System Event
- Black Box
- Software Architecture
- Layered Software Architecture
- Model-View-Controller Software Architecture
- Pipes-and-Filters Software Architecture
- Unit Testing
- Regression Testing
- Integration Testing
Make sure you understand what each item is, the notation for them, and how to use them either in isolation or together with the other concepts.
5.2 Update Course Backlog
What’s the next step? What do you need to do in order to understand how to implement the system based on your system sequence diagrams?
Are there any other questions that you want answered? Add them, along with a brief strategy for how to find an answer.
6 Sprint Acceptance Tests
You are done with this sprint when:
- You understand how to use your UML use cases to identify system events, that will trigger a series of interactions inside the system.
- You understand how to start identifying candidate entities for this internal structure through the use of a Domain Model.
You may also have
- Updated your Sprint Test Plan
- Updated your Course Backlog


A platform that reflects the contemporary and classic duality of the museum.
Frans Hals Museum and KesselsKramer commissioned us to create a platform that reflects the contemporary and classic duality of the museum.
On 29 March 2018, the Frans Hals Museum, with its outstanding collection of Old Masters, ‘marries’ De Hallen Haarlem, the museum for contemporary and modern art in Haarlem.
KesselsKramer main concept was to combine the old with the new in a mirror. This concept is the main theme that we used throughout the website.
The identity has been designed by KesselsKramer. We expanded the visual style in the platform.
We created a custom icon set that mirrors the signage of the museum.


1.4 Environment Variables
- PYTHONPATH
-
Augments the default search path for module files. The format is the
same as the shell's PATH setting: directory pathnames separated
by colons (semicolons on DOS). On module imports, Python searches for
the corresponding file in each listed directory, from left to right.
Merged into sys.path.
- PYTHONSTARTUP
-
If set to the name of a readable file, the Python commands in that
file are executed before the first prompt is displayed in interactive
mode.
- PYTHONHOME
-
If set, the value is used as an alternate prefix directory for
library modules (or sys.prefix,
sys.exec_prefix). The default module search path
uses sys.prefix/lib.
- PYTHONCASEOK
-
If set, ignore case in import statements (Windows, new in 2.1).
- PYTHONDEBUG
-
If nonempty, same as -d option.
- PYTHONINSPECT
-
If nonempty, same as -i option.
- PYTHONOPTIMIZE
-
If nonempty, same as -O option.
- PYTHONUNBUFFERED
-
If nonempty, same as -u option.
- PYTHONVERBOSE
-
If nonempty, same as -v option.
|


[ all classes ]
[ opennlp.tools.util ]
Coverage Summary for Class: BaseToolFactory (opennlp.tools.util)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| BaseToolFactory | 100% (1/ 1) | 85.7% (6/ 7) | 60% (15/ 25) |
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package opennlp.tools.util;
19
20 import java.util.HashMap;
21 import java.util.Map;
22
23 import opennlp.tools.util.ext.ExtensionLoader;
24 import opennlp.tools.util.model.ArtifactProvider;
25 import opennlp.tools.util.model.ArtifactSerializer;
26
27 /**
28 * Base class for all tool factories.
29 *
30 * Extensions of this class should:
31 *

32 *
implement an empty constructor (TODO is it necessary?)
33 *
implement a constructor that takes the {@link ArtifactProvider} and
34 * calls {@code BaseToolFactory(Map)}
35 *
override {@link #createArtifactMap()} and
36 * {@link #createArtifactSerializersMap()} methods if necessary.
37 *

38 */
39 public abstract class BaseToolFactory {
40
41 protected ArtifactProvider artifactProvider;
42
43 /**
44 * All sub-classes should have an empty constructor
45 */
46 public BaseToolFactory() {
47 }
48
49 /**
50 * Initializes the ToolFactory with an artifact provider.
51 */
52 protected void init(ArtifactProvider artifactProvider) {
53 this.artifactProvider = artifactProvider;
54 }
55
56 /**
57 * Creates a {@link Map} with pairs of keys and {@link ArtifactSerializer}.
58 * The models implementation should call this method from
59 * {@code BaseModel#createArtifactSerializersMap}
60 *

61 * The base implementation will return a {@link HashMap} that should be
62 * populated by sub-classes.
63 */
64 @SuppressWarnings("rawtypes")
65 public Map<String, ArtifactSerializer> createArtifactSerializersMap() {
66 return new HashMap<>();
67 }
68
69 /**
70 * Creates a {@link Map} with pairs of keys and objects. The models
71 * implementation should call this constructor that creates a model
72 * programmatically.
73 *

74 * The base implementation will return a {@link HashMap} that should be
75 * populated by sub-classes.
76 */
77 public Map<String, Object> createArtifactMap() {
78 return new HashMap<>();
79 }
80
81 /**
82 * Creates the manifest entries that will be added to the model manifest
83 *
84 * @return the manifest entries to added to the model manifest
85 */
86 public Map<String, String> createManifestEntries() {
87 return new HashMap<>();
88 }
89
90 /**
91 * Validates the parsed artifacts. If something is not
92 * valid subclasses should throw an {@link InvalidFormatException}.
93 *
94 * Note:
95 * Subclasses should generally invoke super.validateArtifactMap at the beginning
96 * of this method.
97 *
98 * @throws InvalidFormatException
99 */
100 public abstract void validateArtifactMap() throws InvalidFormatException;
101
102 public static BaseToolFactory create(String subclassName,
103 ArtifactProvider artifactProvider) throws InvalidFormatException {
104 BaseToolFactory theFactory;
105
106 try {
107 // load the ToolFactory using the default constructor
108 theFactory = ExtensionLoader.instantiateExtension(BaseToolFactory.class, subclassName);
109
110 if (theFactory != null) {
111 theFactory.init(artifactProvider);
112 }
113 } catch (Exception e) {
114 String msg = "Could not instantiate the " + subclassName
115 + ". The initialization throw an exception.";
116 throw new InvalidFormatException(msg, e);
117 }
118 return theFactory;
119 }
120
121 public static BaseToolFactory create(Class<? extends BaseToolFactory> factoryClass,
122 ArtifactProvider artifactProvider) throws InvalidFormatException {
123 BaseToolFactory theFactory = null;
124 if (factoryClass != null) {
125 try {
126 theFactory = factoryClass.newInstance();
127 theFactory.init(artifactProvider);
128 } catch (Exception e) {
129 String msg = "Could not instantiate the "
130 + factoryClass.getCanonicalName()
131 + ". The initialization throw an exception.";
132 throw new InvalidFormatException(msg, e);
133 }
134 }
135 return theFactory;
136 }
137 }


ADMIN BAR
new contact
help
address book
Toggle navigation
All Contacts
Favorites
Vendors
Customers
Harry Potter
Job Title
job here
Address
address
Phone
phone
Notes
Notes
Edit
Delete


Online documentation:
Home
What Sensor Data?
Collecting Sensor Data
Formatting Sensor Data
Store/Transfer Data
Research
Contributing
Project Github Page
This sensor will query the device's call logs and return an anonymised set of call events.
This sensor requires the 'read contacts' and 'read call log' permissions. The JSON format for a sample from this sensor is:
{
"userid":"user-id",
"deviceid":"device-id",
"senseStartTime":"13:51:07:639 30 06 2015 +0100 GMT+01:00",
"senseStartTimeMillis":1435668667639,
"dataType":"CallContentReader",
"contentList":
[
{
"number":"hash-of-number",
"date":"1402587637523",
"local_time_when_sensed":"Thu Jun 12 16:40:37 BST 2014",
"duration":"duration-in-minutes",
"type":"missed | outgoing | incoming"
}
]
}


---
layout: post
title: Piper on Abortion
date: '2008-08-26T08:16:00.001-05:00'
author: Jabell
tags:
- Bible
- Abortion
- Christian Living
modified_time: '2008-08-26T08:18:06.436-05:00'
blogger_id: tag:blogger.com,1999:blog-19739956.post-8587717157067949004
blogger_orig_url: http://theabellsix.blogspot.com/2008/08/piper-on-abortion.html
---
(HT: The Bethlehem Institute)


Is ‘Ricklantis Mixup’ the best ‘Rick and Morty’ episode ever?
The episode tackles themes of police brutality and discrimination via its 'Citadel of Ricks' concept
In season three episode seven of Rick and Morty, known alternately as ‘The Ricklantis Mixup’ and ‘Tales From The Citadel’, the fractures in a divided and unbalanced society grate against one other unbearably. The upshot – a brutal mirroring of America’s woes – earned the show its highest-ever rated episode, with an average score of 9.9/10 on IMDb.
‘The Ricklantis Mixup’ ignores our own Rick and Morty (from dimension C-137), instead heading to The Citadel of Ricks – which was torn apart by Rick C-137’s catastrophic attack in season three, episode one. Here, Mortys from innumerate dimensions play second-class citizens who are constantly under the boot of their corresponding Ricks.
As well as the institutionalised discrimination and police brutality that this scenario entails, the 22-minute episode manages to pack in populist politics, adolescent directionlessness (via Stand By Me) and dissatisfaction, crafting an improbably searing critique of real-world America, and reintroducing a formidable villain – Evil Morty – to set-up season three’s endgame.
It was a classic Rick & Morty episode, containing a beautiful mix of the show’s strongpoints. Wackiness, parody, science-fiction, tragedy, humour – they were all here in spades. In addition to rating the episode an unprecedented 9.8/10, fans have also lavished praise on the writing and voice acting – because 98% of this episode was voiced by Justin Roiland, who played dozens of variations of just two characters.
Kumail Nanjiani, star of The Big Sick, was among the most vocal proponents of the episode:
The show’s treatment of police brutality and corruption struck a chord with thousands of viewers:
Some noted that the show didn’t even need ‘our’ Rick and Morty – the ones from dimension C-137 – to succeed:
And many seem to think it’s one of the best episodes of animated TV ever:
What do you think? Is it the best animation you’ve ever seen? How does it compare to the recently released fifth season of BoJack Horseman? Let us know your thoughts via social media.


---
layout: page
title: SOCIAL
permalink: /social/
---
Social Media
I learned quickly that social media in athletics is very different than corporate social media. In my time at Wake Forest, I gained a lot of experience managing campaigns and daily activity for Twitter and Instagram. At Lockton, I've learned how to find your voice and communicate your business objectives clearly. Here you can see two case studies, the 2018 NCAA Tennis Championships and my 18 month tenure in charge of social for Women's Soccer. I also included a few posts of mine from the Lockton Companies social accounts.
Case Study: 2018 NCAA Tennis Championships
I was chosen for the position of Social Media Coordinator for the 2018 NCAA Men’s and Women’s Division I Tennis Championships. My role was to run the official @NCAATennis account however I saw fit. This account is dormant for approximately 50 weeks out of the year because the NCAA delegates it to a member of the tournament host school right before the Championships begin.
The target audience was simply anyone interested in the NCAA Tennis Championships, whether they’re a casual college tennis fan or they had an interest in a team/participant. Since the account is only active for two weeks during the year, the objective was to inform and entertain fans during the tournament itself.
My approach was to be informational while trying to add in some fun. During the two weeks, I posted a lot of text-only results with scores and bracket updates. We also posted inclement weather updates so that schools, participants and fans had up-to-date information. However, I added in photos of the venue/crowd, reaction videos of teams and individuals winning their matches, GIFs and results graphics for a total of 831 tweets. During the tournament, I also used hashtags that the teams use to expand the reach of these posts while keeping fans and the schools themselves engaged. My goal was to make fans feel as if they were sitting right there at the Wake Forest Tennis Complex, even if they couldn’t attend.
Results
By the end of 14 days (12 days of the tournament plus a day before and a day after), the NCAA Twitter account saw great success analytically.
The Twitter account gained 667 followers in the month of May, specifically 648 followers in the 14 days I had control of the account. This averages out to 46 new followers per day during the tournament.
The 14 days of the NCAA Tournament saw 2.72 million impressions. With over 6,000 followers, we averaged 190.6k impressions per day despite ranging from just four tweets per day to over 110 tweets. Our most successful day came the day after the NCAA Team Championships and the first day of the individual championships that saw over 70 schools represented (419,263 impressions on 91 tweets).
During the tournament, our average engagement was a 2.6%, well above the sporting industry standard of 0.038 and the median across all industries of 0.046% (determined by RivalIQ).
Pinned Tweet
This tweet was pinned to the top of our profile throughout the tournament. Because it was up for 13 total days, it was our highest engagement rate of the tournament. The post was simple and listed everything the fans need as well as a call to action (53,533 Impressions, 14,691 Engagements, 27.4% Engagement Rate). I also posted that same link at the beginning of each day as a reminder to fans.
NCAA Tennis Month
Because the account is only active two weeks out of the year, the 28-day summary and changes were sky high. The account went from almost zero traction to a 3000% increase in profile visits during the month of May. Followers were using the account to connect to video streams and live stats, as well as keeping up to date on results and scores. The impressions also shot up 11000% due to a sharp increase in account activity and followers.
Return to top.
Case Study: Wake Forest Women's Soccer - Postseason and Recruiting
One of the sports I had total social media control over was women’s soccer. In the year I ran the account, Instagram saw the highest increase in followers from 808 to 1,319 (63%). The Facebook account saw a 29% increase (696 to 899) in followers while Twitter saw a 19% increase (3,063 to 3,650).
Women's Soccer Recruiting Campaign
In 2017, the Wake Forest women’s soccer team returned to both the ACC and NCAA Tournament for the first time 2012 and 2013. After the season was over, I decided to capitalize on the great season we had to help appeal to potential recruits and transfers. I met with our women’s soccer multimedia coordinator and we decided to highlight the activities of some of our players that happens of the field. The purpose was to show potential recruits and transfers that you’re more than a soccer player at Wake Forest.
We created two videos highlighting two of our players who are heavily involved in an activity or organization outside of soccer.
The Results
While most of the posts on our page are seen by parents (mainly women 45-54), it was mostly college aged women that viewed this video (18-24), the audience we were hoping to find.
The two posts combined reached over 20,000 users and had over 8,000 views. The videos had over 2,500 post clicks and 700-plus reactions, comments and shares.
The same two posts on Twitter earned nearly 20,000 impressions and almost 5,000 views. With the over 1,000 engagements, the engagement rate ended up being around 5.48%.
Women's Soccer Postseason
In 2017, women’s soccer made it’s first postseason appearance since 2013. I decided to have some fun with the content that was posted. From the day we were selected to the NCAA Tournament (Nov. 6) to the day we lost in the second round (Nov. 17), we earned 82 Twitter followers, 87 Instagram followers and 52 likes on Facebook while having some of our highest engagement rates of the season.
Return to top.
Lockton Companies
Here are a few posts of mine from Lockton.
The first is a LinkedIn post summing up our COVID-19 campaign that raised over $1.1M for local pandemic relief. The next post is a standard Twitter post sharing a Lockton Benefits resource.


STRATEGIC DESIGNER. MAKE IT PRETTY. MAKE IT SMART.
A consistent look and feel for the Engler Agribusiness Entrepreneurship Program across print and digital media.
EXPERIENCE GAINED ||| Strengthened nontraditional creative concepting skills ||| Development of to-do list giveaways, pitched that they should set up a giant jenga game at college fairs to help attract attention. ||| Managed the process of a complete website reorganization and redesign.