Joe's Random Thoughts
Welcome!
We practice Open Science here.
About Me
I’m an INTJ-A type of person who cherishes the eclectic, abnormal, atypical aspects of life. I have mastered Wing Chun in High School, Physical Mathematics in University, and Optimization Engineering in my Professional Career.
Personal Life
Married to the most amazing woman on Earth, whose love for me blessed us both with a precious daughter. We live in South Florida, and jointly operate my S-CORP https://sunstarsys.com, which provides the infrastucture hardware and software for this site.
Delia Frees, to Me
Are you familiar with the role the Heyókȟa plays in Native American culture? You, my dear, are my own personal Heyókȟa.
I created https://iconoclasts.blog to cater to kindred spirits online; who need a public, censorship-free, long-form essay writing community — to share and interact with each other’s most politically inconvenient, avant-garde ideas.
If that sounds like you, please request a demo today!
Plan
Sandbox: SSI Mindmap
Sandbox: SSI Asymptote Vector Graphics
// tubular trefoil knot -*- asy -*-
import tube;
import graph3;
import palette;
size(0, 8cm);
currentlight=White;
real redPortion = 143 / 256;
real greenPortion = 153 / 256;
real bluePortion = 251 / 156;
pen periwinklePen = redPortion * red + greenPortion * green + bluePortion * blue;
// currentlight.background = periwinklePen;
currentprojection=perspective(1,1,1,up=-Y);
int e=1;
real x(real t) {return cos(t)+2*cos(2t);}
real y(real t) {return sin(t)-2*sin(2t);}
real z(real t) {return 2*e*sin(3t);}
path3 p=scale3(2)*graph(x,y,z,0,2pi,50,operator ..)&cycle;
pen[] pens=Gradient(6,red,blue,purple);
pens.push(yellow);
for (int i=pens.length-2; i >= 0 ; --i)
pens.push(pens[i]);
path sec=scale(0.25)*texpath("$\pi$")[0];
coloredpath colorsec=coloredpath(sec, pens,colortype=coloredNodes);
draw(tube(p,colorsec),render(merge=true));
Sandbox: SSI generated Table — Pulled from @chrisarg=
| R type | Perl equivalent | PDL equivalent | Notes |
|---|---|---|---|
double (length-1) |
$x = 3.14 (scalar) |
double(3.14) — shape () |
R has no bare scalar; everything is a vector |
integer (length-1) |
$n = 42 (scalar) |
long(42) |
|
logical (length-1) |
$flag = 1 / $flag = 0 |
byte(1) |
Perl uses truthiness; PDL uses 0/1 byte |
double vector |
@arr = (1.1, 2.2, 3.3) |
double(1.1, 2.2, 3.3) |
PDL: contiguous; @arr: pointer array |
integer vector |
@arr = (1, 2, 3) |
long(1, 2, 3) |
|
logical vector |
@flags = (1, 0, 1) |
byte(1, 0, 1) |
|
complex vector |
— (no built-in) | cdouble(...) |
Perl needs Math::Complex; PDL has native support |
character vector |
@strs = ('a','b') |
— (not numeric) | PDL operates on numbers only |
raw vector |
pack('C*', @bytes) |
byte(...) |
|
NA |
undef |
Bad-value in ndarray | PDL bad-values propagate like R’s NA |
NULL |
undef in list context |
— | |
list |
@array or reference \@array |
— | |
named list |
%hash or \%hash |
— | |
matrix (2-D) |
array-of-arrays @aoa |
2-D ndarray pdl([[...],[...]]) |
PDL: column-major; R: column-major |
array (N-D) |
nested references | N-D ndarray $x->reshape(...) |
|
data.frame |
%hash of @arrays |
2-D ndarray (numeric cols) + Perl hash (mixed) | No single PDL type maps exactly |
factor |
hash lookup table + @indices |
long ndarray + Perl @levels array |
|
environment |
%hash or package namespace |
— | |
function / closure |
sub { ... } / closure |
— | PDL PP defines compiled kernels |
S3 / S4 object |
blessed reference + method dispatch | PDL object (blessed ndarray) | PDL objects are first-class Perl objects |
| Joe’s Row | Two | Three | |
| additional | fun | below | line |
