Shared posts

04 Dec 23:20

Twitter Favorites: [chenoehart] “automated checkouts have shut down what might be some people’s only chance to talk to someone during the day.” https://t.co/avNoMQLJX4

Chenoe Hart @chenoehart
“automated checkouts have shut down what might be some people’s only chance to talk to someone during the day.” twitter.com/drpaulsalmon/s…
04 Dec 23:09

Pogue's cheap and unexpected gifts: the Soi Handbag Light


Each week until Christmas, I’ll be back on Yahoo Finance’s “Midday Movers” to recommend another holiday tech-gift idea—always cool, cheap, and unexpected!

At a folk festival a few years ago, German engineers Christian Schech and Bastian Wetzel noticed how the women tried to illuminate their purses and handbags when they wanted to find things in there—by turning on their phone flashlights or even lighting their lighters. And a light bulb (heh) went off.

They’ve now invented the Soi Handbag Light ($30). I have no idea what Soi is supposed to mean (is it a typo for SOL?), but the idea is great: It’s a three-inch, featureless flying saucer that you keep in your purse, laptop bag, or backpack. Then, whenever you start rooting around in there, a bright white LED light bathes the proceedings so you can see what you’re doing.

image
In the depths of your darkened bag, all is illuminated.

Everyday jostling doesn’t turn it on; it lights up only when it senses the proximity of your hand. At that point, the light comes on for about 10 seconds. It’s powered by a pair of AAA batteries, which the company says lasts for 6,000 bag-foragings.

image
The Soi bag light has no controls or buttons; the presence of your hand turns it on.

I think the company does itself a disservice by marketing the Soi exclusively to women for their handbags; I’ve tossed one into my Timbuk2 laptop bag and life has never been the same. For starters, since you’re not clutching a phone or a lighter, you now have both hands free to do your exploration.

If there’s a better candidate for the cheap and unexpected high-tech gift idea, I haven’t seen it.

More from David Pogue:

Battle of the 4K streaming boxes: Apple, Google, Amazon, and Roku

iPhone X review: Gorgeous, pricey, and worth it

Inside the Amazon company that’s even bigger than Amazon

The $50 Google Home Mini vs. the $50 Amazon Echo Dot — who wins?

The Fitbit Ionic doesn’t quite deserve the term ‘smartwatch’

Augmented reality? Pogue checks out 7 of the first iPhone AR apps 

David Pogue, tech columnist for Yahoo Finance, is the author of “iPhone: The Missing Manual.” He welcomes nontoxic comments in the comments section below. On the web, he’s davidpogue.com. On Twitter, he’s @pogue. On email, he’s poguester@yahoo.com. You can read all his articles here, or you can sign up to get his columns by email

04 Dec 23:09

Kirsty Mitchell’s Wonderland Series

by Marissa Jasso

In the midst of life’s greatest tragedy, Kirsty Mitchell found peace in creating unforgettable works of art. Kirsty’s mother was an English teacher and storyteller at heart. Her passion for literature was shared with Kirsty from a young age and evoked the strong sense of creativity and imagination evident in Kirsty’s photographs. After Kirsty’s mother passed away from a brain tumor in 2008, Kirsty embarked on a journey to create “The Wonderland Series” which are a collection of photographs inspired by the books, titles and memories Kirsty had of reading with her mother.

Wonderland "Gammelyn's Daughter"

To create the Wonderland book that would hold this collection, Kirsty launched her own Kickstarter campaign that was so successful, it broke the website’s record and became the #1 most funded photography project in the website’s history with $446,524 raised in 28 days. That number pales in comparison to the ground breaking release of the world wide award winning Wonderland book.

One reason why the Wonderland book remains alluring is because of the stunning detail in each photo. Every element is handcrafted and designed by Kirsty herself making every photo a breathtaking masterpiece. Sometimes just creating the elements for one photo alone can take up to 5 months. This is where Kirsty’s background in fashion design and textiles can truly shine.

70_The Stars Of Spring Will Carry You Home .jpg

Today marks Kirsty’s 10 year anniversary on Flickr, where her love of photography was sparked. When she first joined the Flickr community, she was still a fashion designer in London and photography was nothing but a hobby. Kirsty elaborates on Flickr’s influence on her work.

“Honestly, Flickr changed my life. If I hadn’t joined Flickr I would have just carried on as a fashion designer and never discovered this part of me. The reception to my work from the public gave me an insight into how others were emotionally connecting to the photographs and essentially gave me the confidence to realize these pictures had a future. I never imagined 10 years later I would have a bestselling book in it’s second edition, a US museum show and have been published by the likes of Vogue it’s hard to get my head around it all.”

Wonderland "The Ghost Swift"

Kirsty describes her first experiences after joining Flickr as “extraordinary” in that she was exposed to this whole new dimension of enlightenment through other photographers and their work.

“Until this point I’d only ever really had friends in the real world and didn’t know anyone via the internet. Suddenly my world was turned upside down and I was discussing street photography with shooters on the streets of Tokyo, New York, and India, it was truly quite life changing. Everyday I’d switch on Flickr and it was like opening my eyes in 50 different countries. I was seeing the hearts and souls of artists all over the world and within months these people became friends and tutors to me. I learnt everything through my friendships on Flickr. I only progressed through the encouragement I received and the friends I made. A small circle of us even set up our own Flickr group and we’d share images, discuss them, learn from each other and so my photography quickly went from being a hobby to an obsession. I can genuinely say that it was Flickr that launched my passion for photography without a doubt.”

Wonderland - 'She'll Wait For You In The Shadows Of Summer'

As any active community member knows, Flickr can be used as more than a hosting platform, but a place to connect, interact, learn, and grow as a photographer. Flickr is often times the connection between your photography and opportunity.

“I was contacted by film directors, journalists and magazines and publishers [via Flickr]. The enormous attention the series gained on Flickr was what finally gave me the guts to quit my job and pursue a full time career as an independent artist.”

Although it’s difficult choosing your passion over what society tells you is realistic, Kirsty made this decision whole heartedly with the support and prosperity of her strong Flickr following. Without embarking on this inspirational journey to heal the soul, she wouldn’t have a best selling book containing over 640 mesmeric photographs each stunningly unique in their creation. Alongside the photographs are intimate excerpts from Kirsty’s personal journal detailing the meaning, emotion and creation behind specific photographs.

Wonderland 'The Queen's Armada'

One of the many reasons Kirsty’s journey is especially awe-inspiring is that she found elegance and grace in a detrimental period. Her ability to tool her passion in a constructive outlet that may now foster a love for photography, fashion or art in a fellow viewer around the world is what makes this story a rarity. It has been a humbling experience to witness such raw beauty.

If you’re interested in seeing more of her work for free, make sure to view her Flickr. If you’d like to give the best Christmas gift in history, the Wonderland book is available for purchase on Kirsty’s website!


04 Dec 23:09

Twitter Favorites: [MarcDFowler] I stopped going to Portland Variety ages ago for unrelated reasons, but I'm glad I made the right choice. https://t.co/o7WifXORBi

marc fowler @MarcDFowler
I stopped going to Portland Variety ages ago for unrelated reasons, but I'm glad I made the right choice. twitter.com/globeandmail/s…
04 Dec 23:09

“Finite Field Arithmetic.” Chapter 1: Genesis.

by Stanislav

FFA, or the Finite Field Arithmetic library, differs from the typical Open Sores abomination, in that — rather than trusting the author blindly with their lives — prospective users are expected to read and fully understand every single line. In exactly the same manner that you would understand and pack your own parachute.

This article is the first in a series, at the end of which the patient reader will have glued together, with his own hands — and fully fit into his head — a demonstrably-correct set of routines for multiple-precision arithmetic, sufficient for carrying out RSA and many other forms of number-theoretical cryptography.

The “bignum” arithmetic libraries currently in common use were, near as I can tell, all and without exception written by NSA assets and their various “useful idiots”. The conclusion is difficult to avoid, given as every example known to me suffers from one or more of the following ills:

FFA, on the other hand:

  • Written in a heavily-restricted subset of the Ada programming language — the only currently-existing nonproprietary statically-compiled language which permits fully bounds-checked, pointerolade-free code and practically-auditable binaries. We will be using GNAT, which relies on the GCC backend.
  • No external dependencies or libraries are made use of; suitable for embedded systems with limited memory. Language features which bloat the generated binary (e.g. OOP) are avoided.
  • No use of heap allocators. (In fact, wholly allocator-agnostic.) Memory requirement for all operations is readily calculable in advance from the width of the inputs.
  • The total set of components needed for RSA occupies around 3000 lines, incl. comments, of clear and unidiomatic (i.e. containing no “perlisms”) code.
  • Contains no inline assembler and is married to no particular machine (i.e. can be built for microcontrollers, MS-DOS boxes, CPUs of virtually any “bitness”)
  • Does not branch-on-secret-bits
  • Does not address memory by secret values, i.e. is cachebleed-proof
  • Fully unrollable, deterministic (and ergo auditable) control flow. I.e. all RSA modular-exponentiation operations will take exactly the same amount of time, via exactly the same flow of instructions; all algorithmic-complexity attack vectors are ruled out.

FFA will be presented to the reader in small pieces. Each should take more than one hour, but probably fewer than two, to fully study and understand.

You will need:

Just as “theater begins with the coat room”, each FFA article begins with a V-press. Set up your Vtron if you have not already done so, and press the “genesis” — “ffa_ch1_genesis”.

You will end up with two directories, libffa and ffademo. The former contains the subset of FFA discussed in this chapter; the latter — the demo routines for same. The reader is invited to modify the demo routines, experiment, learn.

Each subsequent chapter of the FFA series will contain a V-patch on the previous set, and the next — another, until the final article in the series: where “P” — an FFA-tronic GPG replacement — is introduced.

First, verify that your V-Tron, GNAT, and genesis press are in working order, by compiling the introductory demo:

cd ffademo
gprbuild

The output should resemble:

using project file ffa_demo.gpr
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections ffa_demo.adb
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections
-gnatec=/home/you/ffa/libffa/restrict.adc word_ops.adb
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections
-gnatec=/home/you/ffa/libffa/restrict.adc fz_type.ads
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections
-gnatec=/home/you/ffa/libffa/restrict.adc fz_arith.adb
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections
-gnatec=/home/you/ffa/libffa/restrict.adc w_shifts.ads
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections
-gnatec=/home/you/ffa/libffa/restrict.adc iron.ads
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections
-gnatec=/home/you/ffa/libffa/restrict.adc words.ads
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections demo_ch1.adb
gcc -c -O2 -fdump-scos -gnata -fstack-check -fdata-sections -ffunction-sections ffa_io.adb
gprlib FFA.lexch
ar cr /home/you/ffa/libffa/lib/libFFA.a /home/you/ffa/libffa/obj/word_ops.o
/home/you/ffa/libffa/obj/fz_type.o ...
ranlib libFFA.a
gprbind ffa_demo.bexch
gnatbind ffa_demo.ali
gcc -c b__ffa_demo.adb
gcc ffa_demo.o -Wl,--gc-sections -static -o ffa_demo

Observe that the contents of the ‘libffa’ directory build recursively.

If you are an Apple victim, your OS prohibits static linking, and you may see barf instead. You may use the debug (dynamically linked) variant:

gprbuild -Xmode=debug

Do not run the demo yet. (you read programs before running, don’t you?) Instead, let’s take a careful look at what is inside.

Let’s begin with the restriction pragmas. These define a particular, constrained subset of the Ada programming language, by prohibiting the use of certain features. GNAT will balk if it encounters a prohibited feature in FFA or the demo routines.

The logic behind the restrictions was a combination of “guilty until proven innocent” — if we can do without a construct, we will — and “enable all safety features”:

restrict.adc:

pragma Restrictions(Immediate_Reclamation);
pragma Restrictions(Max_Asynchronous_Select_Nesting => 0);
pragma Restrictions(Max_Protected_Entries => 0);
pragma Restrictions(Max_Select_Alternatives => 0);
pragma Restrictions(Max_Task_Entries => 0);
pragma Restrictions(Max_Tasks => 0);
pragma Restrictions(No_Abort_Statements);
pragma Restrictions(No_Access_Parameter_Allocators);
pragma Restrictions(No_Allocators);
pragma Restrictions(No_Asynchronous_Control);
pragma Restrictions(No_Calendar);
pragma Restrictions(No_Coextensions);
pragma Restrictions(No_Default_Stream_Attributes);
pragma Restrictions(No_Delay);
pragma Restrictions(No_Dispatch);
pragma Restrictions(No_Dispatching_Calls);
pragma Restrictions(No_Dynamic_Attachment);
pragma Restrictions(No_Dynamic_Priorities);
pragma Restrictions(No_Entry_Calls_In_Elaboration_Code);
pragma Restrictions(No_Entry_Queue);
pragma Restrictions(No_Enumeration_Maps);
pragma Restrictions(No_Exception_Propagation);
pragma Restrictions(No_Exception_Registration);
pragma Restrictions(No_Finalization);
pragma Restrictions(No_Fixed_Io);
pragma Restrictions(No_Floating_Point);
pragma Restrictions(No_Implementation_Aspect_Specifications);
pragma Restrictions(No_Implementation_Units);
pragma Restrictions(No_Implicit_Aliasing);
pragma Restrictions(No_Implicit_Conditionals);
pragma Restrictions(No_Implicit_Dynamic_Code);
pragma Restrictions(No_Implicit_Heap_Allocations);
pragma Restrictions(No_Implicit_Protected_Object_Allocations);
pragma Restrictions(No_Implicit_Task_Allocations);
pragma Restrictions(No_Initialize_Scalars);
pragma Restrictions(No_Local_Protected_Objects);
pragma Restrictions(No_Local_Timing_Events);
pragma Restrictions(No_Multiple_Elaboration);
pragma Restrictions(No_Nested_Finalization);
pragma Restrictions(No_Protected_Type_Allocators);
pragma Restrictions(No_Protected_Types);
pragma Restrictions(No_Relative_Delay);
pragma Restrictions(No_Requeue_Statements);
pragma Restrictions(No_Secondary_Stack);
pragma Restrictions(No_Select_Statements);
pragma Restrictions(No_Specific_Termination_Handlers);
pragma Restrictions(No_Standard_Allocators_After_Elaboration);
pragma Restrictions(No_Stream_Optimizations);
pragma Restrictions(No_Streams);
pragma Restrictions(No_Task_Allocators);
pragma Restrictions(No_Task_At_Interrupt_Priority);
pragma Restrictions(No_Task_Attributes_Package);
pragma Restrictions(No_Task_Hierarchy);
pragma Restrictions(No_Tasking);
pragma Restrictions(No_Task_Termination);
pragma Restrictions(No_Terminate_Alternatives);
pragma Restrictions(No_Unchecked_Access);
pragma Restrictions(No_Unchecked_Conversion);
pragma Restrictions(No_Unchecked_Deallocation);
pragma Restrictions(No_Wide_Characters);
pragma Restrictions(Pure_Barriers);
pragma Restrictions(Simple_Barriers);
pragma Restrictions(Static_Priorities);
pragma Restrictions(Static_Storage_Size);
pragma Validity_Checks(ALL_CHECKS);

Towards the end of this article series, we will investigate the impact of such “fascism” on program performance, and the possibility of cautiously replacing certain bounds checks with formal proof of nonoverflowability.

Let’s proceed to the builder. Observe that GnuMake was not listed in the list of required programs for this tutorial. Instead we make use of GNAT’s “GprBuild”, a substantially cleaner and better-behaved item:

ffa.gpr:

project FFA is
 
  for Object_Dir use "obj";
 
  type Mode_Type is ("debug", "release");
  Mode : Mode_Type := external ("mode", "release");
 
  for Languages         use ("Ada");
  for Source_Dirs       use (".");
  for Library_Dir       use "lib";
  for Library_Name      use "FFA";
  for Library_Kind      use "static";
 
  package Binder is
     case Mode is
        when "debug" =>
           for Switches ("Ada")
             use ();
        when "release" =>
           for Switches ("Ada")
             use ("-static", "-r");
     end case;
  end Binder;
 
  package Builder is
     for Switches ("Ada")
       use ("-nostdlib");
  end Builder;
 
  package Compiler is
     case Mode is
        when "debug" =>
           for Switches ("Ada")
             use ("-g");
        when "release" =>
           for Switches ("Ada")
             use ("-O2", "-fdump-scos", "-gnata", "-fstack-check",
                  "-fdata-sections", "-ffunction-sections",
                  "-gnatec=" & FFA'Project_Dir & "restrict.adc");
     end case;
  end Compiler;
 
end FFA;

Now let’s proceed to the only machine-dependent section of FFA.

The supplied iron.ads pre-supposes eight-bit bytes, and a 64-bit CPU:

iron.ads:

package Iron is
 
   pragma Pure;
 
   --------------------------------------
   -------- For a 64-bit system: --------
   --------------------------------------
   MachineBitness     : constant Positive := 64;
   MachineBitnessLog2 : constant Positive := 6; -- log2(64)
   --------------------------------------
 
   -- Bits per Byte
   ByteBits           : constant Positive := 8;
 
end Iron;

If this is not what you have, change the constants, e.g.:

   ------------------------------------
   ------ For a 32-bit system: --------
   ------------------------------------
     MachineBitness     : constant Positive := 32;
     MachineBitnessLog2 : constant Positive := 5; -- log2(32)
   ------------------------------------

The purpose of MachineBitnessLog2 will become apparent later; ignore it for now.

Let’s proceed to the most fundamental building block of FFA, the machine Word. A Word, from this point on, is simply a single machine word on your particular machine. It is expressed as an Ada “modular type”.

words.ads:

with Iron;
 
package Words is
 
   pragma Pure;
 
   -- The most fundamental fact about Word: width.
   Bitness     : constant Positive := Iron.MachineBitness;
 
   -- It is possible to calculate BitnessLog2 at elaboration time,
   -- but we will avoid having ~any~ elaboration at all in FFA.
   BitnessLog2 : constant Positive := Iron.MachineBitnessLog2;
 
   -- The Word width, expressed in ~bytes~:
   Byteness    : constant Positive := Bitness / Iron.ByteBits;
 
   -- What kind of words to use. Must be machine-word or smaller.
   type Word is mod 2**Bitness;
   for Word'Size use Bitness;
 
   -- The very same Word, but its only legal values are 0 and 1.
   subtype WBool is Word range 0 .. 1;
 
   -- When we must refer to individual bit positions of a machine word:
   subtype WBit_Index is Natural range 0 .. Bitness - 1;
 
end Words;

A WBool is simply a Word which is permitted to contain strictly Boolean (0, 1) values. The compiler and runtime will enforce this restriction.

GNAT needs a little bit of help in making the full set of bitwise operations available for use on Word.

For some peculiar reason, the Ada standards group made the fundamental Shift and Rotate bitwise ops into optional components.

Fortunately, on GNAT we can force them to exist (On a non-GNAT compiler, you’re on your own) :

w_shifts.ads:

with Words; use Words;
 
package W_Shifts is
 
   pragma Pure;
 
   function Shift_Left
     (Value  : Word;
      Amount : Natural)
     return    Word;
   pragma Import(Intrinsic, Shift_Left);
 
   function Shift_Right
     (Value  : Word;
      Amount : Natural)
     return    Word;
   pragma Import(Intrinsic, Shift_Right);
 
   function Rotate_Left
     (Value  : Word;
      Amount : Natural)
     return    Word;
   pragma Import(Intrinsic, Rotate_Left);
 
   function Rotate_Right
     (Value  : Word;
      Amount : Natural)
     return    Word;
   pragma Import(Intrinsic, Rotate_Right);
 
end W_Shifts;

Now let’s proceed to the most fundamental arithmetic operations on Words:

word_ops.ads:

with Words; use Words;
 
-- Fundamental Operations on Words:
package Word_Ops is
 
   pragma Pure;
 
   -- Branch-free calculation of 'carry' from a machine-word addition.
   function W_Carry(A : in Word; B : in Word; S : in Word)
                   return WBool;
 
   -- Branch-free calculation of 'borrow' from a machine-word subtraction.
   function W_Borrow(A : in Word; B : in Word; D : in Word)
                    return WBool;
 
   -- Without any branching: if Sel == 0, return A; if Sel == 1, return B.
   function W_Mux(A : in Word; B : in Word; Sel : in WBool)
                 return Word;
 
   -- Exchange A and B.
   procedure W_Swap(A : in out Word; B : in out Word);
 
end Word_Ops;

word_ops.adb:

with W_Shifts; use W_Shifts;
 
-- Fundamental Operations on Words:
package body Word_Ops is

But wait.

Ada — like C — does not give us any portable method of determining the over/underflow from output from machine arithmetic. And, it turns out, there existed in the past — and apparently exist today — CPUs made by idiots and wreckers (e.g. ‘RISC-V’) that do not have flags at all!

However, for multi-word addition, subtraction, the inner loop of Comba’s multiplication, and for a handful of other ops, we demand it.

So we derive the Carry or Borrow at the ‘eldest’ binary position, without using any inline assembly or special compiler features:

   -- Find the Carry, from an addition where it is known that A + B == S:
   function W_Carry(A : in Word; B : in Word; S : in Word)
                   return WBool is
   begin
      return WBool(Shift_Right((A and B) or ((A or B) and (not S)),
                               Bitness - 1));
   end W_Carry;
   pragma Inline_Always(W_Carry);
 
   -- Find the Borrow, from a subtraction where it is known that A - B == D:
   function W_Borrow(A : in Word; B : in Word; D : in Word)
                    return WBool is
   begin
      return WBool(Shift_Right(((not A) and B) or (((not A) or B) and D),
                               Bitness - 1));
   end W_Borrow;
   pragma Inline_Always(W_Borrow);

To derive the Carry from the addition S of words A and B, we take the highest bit ( i.e. Shift_Right( … , Bitness – 1) ) of the result of (A and B) or ((A or B) and (not S).

To derive the Borrow from the subtraction D of words A and B, we take the highest bit ( i.e. Shift_Right( … , Bitness – 1) ) of the result of ((not A) and B) or (((not A) or B) and D).

This derivation of the flags, strictly from the inputs and outputs of a machine-word addition or subtraction, is the single most tricky item in this article. Be prepared to spend some time drawing the circuit (of a full adder, with carry-in and carry-out) to verify the offered proof:

A+B+C is the output bit of 1-bit adder; C is carry-in;
A-B-C is the output bit of 1-bit subber; C is borrow-in.
Observe that A+B+C is equal to A-B-C for all A,B,C !
+-+-+-+-----+--------------+-----+----------------+
|           | 'Carry' out: |     | 'Borrow' out:  |
+-+-+-+-----+--------------+-----+----------------+
| | | |     |(a and b) or  |     |(~a and b) or   |
|A|B|C|A+B+C| ((a or b) and|A-B-C| ((~a or b) and |
| | | |     |    ~(A+B+C)) |     |    (A-B-C))    |
+-+-+-+-----+--------------+-----+----------------+
|0|0|0|  0  |      0       |  0  |       0        |
+-+-+-+-----+--------------+-----+----------------+
|1|0|0|  1  |      0       |  1  |       0        |
+-+-+-+-----+--------------+-----+----------------+
|0|1|0|  1  |      0       |  1  |       1        |
+-+-+-+-----+--------------+-----+----------------+
|1|1|0|  0  |      1       |  0  |       0        |
+-+-+-+-----+--------------+-----+----------------+
|0|0|1|  1  |      0       |  1  |       1        |
+-+-+-+-----+--------------+-----+----------------+
|1|0|1|  0  |      1       |  0  |       0        |
+-+-+-+-----+--------------+-----+----------------+
|0|1|1|  0  |      1       |  0  |       1        |
+-+-+-+-----+--------------+-----+----------------+
|1|1|1|  1  |      1       |  1  |       1        |
+-+-+-+-----+--------------+-----+----------------+
--- This base case extends to any N bit register, since
--- both equations depend ~strictly~ on A, B, and C.

Now study how the Mux and Swap operations work. Observe that no transfer-of-control CPU instructions are required:

   -- Without any branching: if Sel == 0, return A; if Sel == 1, return B.
   function W_Mux(A : in Word; B : in Word; Sel : in WBool) return Word is
   begin
      return B xor ((Sel - 1) and (A xor B));
   end W_Mux;
   pragma Inline_Always(W_Mux);
 
   -- Exchange A and B.
   procedure W_Swap(A : in out Word; B : in out Word) is
   begin
      A := A xor B;
      B := A xor B;
      A := A xor B;
   end W_Swap;
   pragma Inline_Always(W_Swap);
 
end Word_Ops;

Now we are finally ready to define FZ — the fundamental FFA type: an unsigned integer of fixed width, i.e. a contiguous array of machine words.

fz_type.ads:

with Words; use Words;
 
package FZ_Type is
 
   pragma Pure;
 
   -- Indices of all indexable items:
   type Indices is new Natural;
 
   -- Index of a particular Word in an FZ:
   subtype Word_Index is Indices;
 
   -- The FZ, in person! I.e. a bignum of permanently fixed bitness.
   type FZ is array(Word_Index range <>) of Word;
 
   -- A count of Words in an FZ (cannot be 0):
   subtype Word_Count is Indices range 1 .. Indices'Last;
 
   -- An index of a particular ~bit~ in an FZ:
   subtype FZBit_Index is Indices;
 
end FZ_Type;

And finally, our first multi-word FFA arithmetical operations: ordinary addition and subtraction, with carry output.

Observe that a program which invokes FFA is expected to allocate memory of the proper size for each FFA integer; and that no such thing as normalization is permitted or permissible in FFA — it would result in branches-on-secrets, i.e. timing side-channels. An addition or a subtraction of a pair of FFA integers with no bits set (i.e. all bits, in each word, equal 0) takes exactly the same amount of time, and is performed via the same sequence of CPU instructions, as of two FFA integers with all bits set (i.e. all bits, in each word, equal 1), or of any other possible integers of the same bitness (i.e. number of words.) In other words, the algorithmic complexity of FFA’s arithmetical operations is always independent of the Hamming weights of the given operands.

fz_arith.ads:

with Words;   use Words;
with FZ_Type; use FZ_Type;
 
-- Fundamental Arithmetic operators on FZ:
package FZ_Arith is
 
   pragma Pure;
 
   -- Sum := X + Y; Overflow := Carry
   procedure FZ_Add(X          : in    FZ;
                    Y          : in    FZ;
                    Sum        : out   FZ;
                    Overflow   : out   WBool);
   pragma Precondition(X'Length = Y'Length and X'Length = Sum'Length);
 
   -- Difference := X - Y; Underflow := Borrow
   procedure FZ_Sub(X          : in  FZ;
                    Y          : in  FZ;
                    Difference : out FZ;
                    Underflow  : out WBool);
   pragma Precondition(X'Length = Y'Length and X'Length = Difference'Length);
 
end FZ_Arith;

Observe that the preconditions for addition and subtraction demand equal bitnesses for pairwise FFA operators. This pattern will likewise hold in the algorithms we will discuss in later articles.

And, now at last, the FZ adder and FZ subtracter:

fz_arith.adb:

with Word_Ops; use Word_Ops;
 
-- Fundamental Arithmetic operators on FZ:
package body FZ_Arith is
 
   -- Sum := X + Y; Overflow := Carry
   procedure FZ_Add(X          : in  FZ;
                    Y          : in  FZ;
                    Sum        : out FZ;
                    Overflow   : out WBool) is
      Carry : WBool := 0;
   begin
      for i in X'Range loop
         declare
            A : constant Word := X(I);
            B : constant Word := Y(I);
            S : constant Word := A + B + Carry;
         begin
            Sum(i) := S;
            Carry  := W_Carry(A, B, S);
         end;
      end loop;
      Overflow := Carry;
   end FZ_Add;
   pragma Inline_Always(FZ_Add);
 
   -- Difference := X - Y; Underflow := Borrow
   procedure FZ_Sub(X          : in  FZ;
                    Y          : in  FZ;
                    Difference : out FZ;
                    Underflow  : out WBool) is
      Borrow : WBool := 0;
   begin
      for i in 0 .. Word_Index(X'Length - 1) loop
         declare
            A : constant Word := X(X'First + i);
            B : constant Word := Y(Y'First + i);
            S : constant Word := A - B - Borrow;
         begin
            Difference(Difference'First + i) := S;
            Borrow := W_Borrow(A, B, S);
         end;
      end loop;
      Underflow := Borrow;
   end FZ_Sub;
   pragma Inline_Always(FZ_Sub);
 
end FZ_Arith;

The alert reader might ask why the iteration schemes differ. This will be discussed in a subsequent chapter, when we walk through multiplication and the peculiarities of Ada’s “array slicing” construct.

Now let’s define a simple mechanism for printing FFA integers to the console:

ffa_io.ads:

with Words;   use Words;
with FZ_Type; use FZ_Type;
 
package FFA_IO is
 
   -- Character representation of a Word
   type WChars is array(1 .. 2 * Byteness) of Character;
 
   -- Obtain the WChars corresponding to the given Word
   function W_To_WChars(N : Word) return WChars;
 
   -- Display a hex representation of W to stdout
   procedure Dump(W : in Word);
 
   -- Display a hex representation of N to stdout
   procedure Dump(N : in FZ);
 
end FFA_IO;

ffa_io.adb:

with Ada.Text_IO; use Ada.Text_IO;
 
with Words;    use Words;
with W_Shifts; use W_Shifts;
with FZ_Type;  use FZ_Type;
 
package body FFA_IO is
 
   -- Obtain the WChars corresponding to the given Word
   function W_To_WChars(N : Word) return WChars is
      H      : constant array(0 .. 15) of Character := "0123456789ABCDEF";
      W      : Word := N;
      Result : WChars;
   begin
      for b in WChars'Range loop               -- From bottom to top:
         Result(B) := H(Natural(W and 16#F#)); -- Get current nibble.
         W         := Shift_Right(W, 4);       -- Get the next nibble.
      end loop;
      return Result;
   end W_To_WChars;
 
   -- Display a hex representation of W to stdout
   procedure Dump(W : in Word) is
      T : WChars := W_To_WChars(W);
   begin
      for i in reverse T'Range loop
         Put(T(i));
      end loop;
   end Dump;
 
   -- Display a hex representation of N to stdout
   procedure Dump(N : in FZ) is
   begin
      for i in reverse N'Range loop
         Dump(N(i));
      end loop;
   end Dump;
 
end FFA_IO;

Nothing particularly complicated here.

Now for Chapter 1’s demo routine itself:

demo_ch1.ads:

package Demo_Ch1 is
 
   procedure Demo_Add_Sub;
 
end Demo_Ch1;

In this Chapter, we do not yet have a means for programmatically setting the value of an FFA integer other than via Ada’s array assignment construct. But it will suffice for now, as we wish to simply explore addition and subtraction:

demo_ch1.adb:

-- From Ada:
with Ada.Text_IO; use Ada.Text_IO;
 
-- From FFA:
with Words;    use Words;
with FZ_Type;  use FZ_Type;
with FZ_Arith; use FZ_Arith;
 
-- From the Demo:
with FFA_IO;   use FFA_IO;
 
package body Demo_Ch1 is
 
   procedure Demo_Add_Sub is
 
      -- We are using 64-bit Words (see iron.ads).
      -- We'll begin with an elementary demo, using 256-bit FZ:
      X : FZ(1 .. 4) := (0,        0, 0, 0);
      Y : FZ(1 .. 4) := (16#5555#, 0, 0, 0);
      Z : FZ(1 .. 4) := (0,        0, 0, 0);
 
      -- Carry.
      C : WBool := 0;
 
   begin
 
      Put_Line("X         =");
      Dump(X);
      New_Line;
 
      Put_Line("Y         =");
      Dump(Y);
      New_Line;
 
      FZ_Add(X, Y, Z, C);
      Put_Line("X + Y     =");
      Dump(Z);
      New_Line;
      Put_Line("C         = " & WBool'Image(C));
 
      FZ_Sub(X, Y, Z, C);
      Put_Line("X - Y     =");
      Dump(Z);
      New_Line;
      Put_Line("C         = " & WBool'Image(C));
 
   end Demo_Add_Sub;
 
end Demo_Ch1;

Our “main” :

ffa_demo.adb:

with Demo_Ch1; use Demo_Ch1;
 
procedure FFA_Demo is
begin
 
   Demo_Add_Sub;
 
end FFA_Demo;

And finally, the “builder” in the ffademo directory.
This illustrates how the static library produced by libffa’s builder is put to use:

ffa_demo.gpr:

with "../libffa/ffa.gpr";
 
project FFA_Demo is
 
  for Object_Dir use "obj";
 
  type Mode_Type is ("debug", "release");
  Mode : Mode_Type := external ("mode", "release");
 
  for Languages   use ("Ada");
  for Source_Dirs use (".");
  for Exec_Dir    use "bin";
  for Main        use ("ffa_demo.adb");
 
  package Compiler is
     case Mode is
        when "debug" =>
           for Switches ("Ada")
             use ("-g");
        when "release" =>
           for Switches ("Ada")
             use ("-O2", "-fdump-scos", "-gnata", "-fstack-check",
                  "-fdata-sections", "-ffunction-sections");
     end case;
  end Compiler;
 
  package Binder is
     case Mode is
        when "debug" =>
           for Switches ("Ada")
             use ();
        when "release" =>
           for Switches ("Ada")
             use ("-static");
     end case;
  end Binder;
 
  package Linker is
     case Mode is
        when "debug" =>
           for Switches ("Ada")
             use ();
        when "release" =>
           for Switches ("Ada")
             use ("-Wl,--gc-sections",
                  "-static");
     end case;
  end Linker;
 
end FFA_Demo;

At this point, the reader should be reasonably confident that the Chapter 1 demo will not format his HDD; and perhaps even has a reasonable supposition as to what the output will be.

Let’s run it:

./bin/ffa_demo

And this is what you should see:

X         =
0000000000000000000000000000000000000000000000000000000000000000
Y         =
0000000000000000000000000000000000000000000000000000000000005555
X + Y     =
0000000000000000000000000000000000000000000000000000000000005555
C         =  0
X - Y     =
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAAAB
C         =  1

Now it should be clear to the reader, that we are simply emulating a “stretched” version of something resembling a typical CPU’s ALU: a mechanism which arithmetizes on registers of fixed physical size.

~To be continued!~

04 Dec 23:09

Sustainable transportation on the rise in Canada, with cycling leading the way

by Average Joe Cyclist

More and more people are getting to work by bike, thanks to decent infrastructureThe 2016 Stats Canada Census data released on Wednesday shows that sustainable transportation is on the rise in Canada, with cycling leading the way. Among cities, Vancouver is leading the way!

The post Sustainable transportation on the rise in Canada, with cycling leading the way appeared first on Average Joe Cyclist.

04 Dec 23:09

Playbase :: Finally

by Volker Weber

ec3d769e8079087798765f986b71474b

I used to give away Sonos players to friends if I wanted to start new households. But this time I traded a couple of them for a new one. The old Samsung TV now speaks through a Playbase instead of a Playbar. The main difference is that it now sits on top of the speaker instead of peeking over it. Since I don’t wallmount anything this has always been a hack as the Playbar is higher than the TV stand.

Does it sound any different? Not in my configuration with Sub and dual Play:3 as surround speakers. Alone it provides more bass than a Playbar. After TruePlay Tuning the differences disappear.

The Playbar has replaced a pair of Play:1 in a different room and that was a huge upgrade. Apple talks about beamforming in the context of their HomePod product. Playbar has always provided that capability since early 2013, a full five years before HomePod starts shipping.

Tomorrow I will be setting up Sonos in a new home, for the second week in a row. And there will be more until the end of the year.

04 Dec 23:06

Note On My Emerging Workflow for Working With Binderhub

files/images/jupyter_notebook_viewer-asym.png

OUseful Info, Dec 05, 2017


Icon

Tony Hirst writes about "the public reboot of Binder / MyBinder (which I first wrote about a couple of years ago here), as reported in The Jupyter project blog post Binder 2.0, a Tech Guide and this practical guide: Introducing Binder 2.0 — share your interactive research environment." The idea is that Binder notebooks can be shared ion GitHub. Hirst writes, "I’d love to see the OU get behind this, either directly or under the banner of OpenLearn, as part of an effort to help make Jupyter powered interactive open educational materials available without the need to install any software."

[Link] [Comment]
04 Dec 23:06

Get Ready for the AWS Serverless Application Repository

files/images/sar_find_app_1.png

Jeff Barr, Amazon Web Services, Dec 05, 2017


Icon

I wanted to address the topic of serverless aplications in my talk on Friday but left the discussion out because of a lack of time. But it's an important dimension to next generation virtual learning. Here is an announcement from AWS that frames the concept nicely: "we followed up with the Serverless Application Model (SAM) to further simplify the process of deploying and managing serverless applications on AWS. We have also published serverless reference architectures for web apps, mobile backends, image recognition & processing, real-time file processing, IoT, MapReduce, real-time stream processing, and image moderation for chatbots." The challenge for developers of open learning is to ensure that these applications (and more) remain accessible. See also AWS Cloud 9, a web-based IDE for application code developers.

[Link] [Comment]
04 Dec 23:06

Develop Your Culture Like Software

by Nick Rockwell

Recently, I tried out a new talk at La Victoria Lab’s innovation festival in Lima where I covered an experiment we have been engaging in, somewhat by chance, at The New York Times: working on our culture like it was software. I’m not sure how the talk went over, but personally, I think we are onto something good and novel at The Times.

Nick Rockwell/The New York Times

The story I told at the FEST was about how my team and I have gone about trying to impact the tech culture at The New York Times. It should be obvious to my readers why we want to work on the culture: we want to be better — better environment, better capability, better talent, better decisions and better results. Focusing on the team is the leverage point for all of those things, and culture is the leverage point on the team. As I put it in my talk, the benevolent laziness of the software engineer led us straight to culture.

Our goals are fairly typical: we want a culture that is open and transparent, objective, risk-taking and ambitious; one that values talent, values inclusion and so on. But our goals is not what this post is about.

So how do you go about changing culture? It’s notoriously difficult, but so is changing complex software systems and we know a lot about how to do that. But we didn’t think of that at first. We didn’t know how to start, so we just picked something that our technology team had asked for: a clearer engineering ladder with a technical track. (There are many reasons why this is a critical plank in the tech platform, but I won’t go into it right now.)

To start, we made an artifact — we (made up and) wrote a description of our technical career track, cribbing — laziness — from Camille Fournier’s work at Rent the Runway. We worked in a Google Doc in “suggesting” mode and added lots of comments. In my weekly direct report meeting, we talked through the contributions, accepting or rejecting changes that had been made in the week before; sometimes we reverted to an earlier version.

Eventually we thought it was pretty good, but we needed more feedback. So we set up a group called the Sounding Board, made up of 30 or so people, intended to be representative across the technology team, and who we thought would provide good perspectives. We asked the Sounding Board to do the same thing we had been doing in our weekly meeting — revise as a group until they thought it was ready. As a side benefit, they were particularly good at pointing out all the things we needed to document next to ensure the technical career tracks make sense, giving particular focus to our promotion process, internal transfers and hiring.

In the process, we made a little bit of our implicit culture explicit. It turns out that when you do this people get anxious, because writing stuff down makes you pretty exposed. I guess that’s why it doesn’t happen often. But the key is habituating your team to talking about these things and to make change; and to the idea that we can make mistakes with culture and process, just as we do with software, and it doesn’t have to be the end of the world.

Next we needed to test our newly written career ladder out, so we sent it to the whole technology team and said, “We are going to start doing this. What do you think?” We didn’t get too much feedback, unsurprisingly. So we surveyed the team using Google Forms and got a decent signal back. As we implemented the ladder, we continued to iterate and improve it, getting more feedback and figuring out what worked and what didn’t.

Then we turned to the adjacent topics: our hiring process, promotions and internal transfers. We went through the same steps with our hiring process, then moved on to the next topic, and so on.

We’ve spent the last year or so doing this and have produced at least 50 documents, each materializing a little piece of our culture, including processes and artifacts like career ladders, hiring, transfers, promotions and training, but also a beliefs and values statement, a code of conduct and meeting guidelines. We’ve produced charters for each team that cover the team’s mission and values, their current goals and who to contact. Each artifact is just a little piece, but taken together, this has had the effect of making the intangible tangible and letting us work collaboratively, iteratively and transparently on our culture.

And this is the central insight — culture is a bit like code. Software systems are hard to see, complex and have emergent effects, just like culture. Using the techniques that we have evolved to change software — creating artifacts, version control, iteration, code review, instrumentation and beta release — can work to change culture too.

This idea, this metaphor, is now directly inspiring our next steps. We’re launching a tracker for “management bugs” to report management responsibilities that are broken. We are going to open source our culture docs, first internally, for revision by all with a pull request like system, and, soon, publicly. And, I’m trying to think of how we could do blue/green deployments… haven’t cracked that yet.

So what are the takeaways? If you want to try this, what should you do? Here’s a start:

  1. Materialize your culture into artifacts. Start with anything. Then, keep going.
  2. Use a collaborative editor, with version control, like Google docs.
  3. Organize your concentric circles of review — in our case, my directs, the Sounding Board, the whole team. Introducing things in this way helps ensure that as you reach a larger group, more eyes have been on the thing, and more people are already up to speed and can explain it.
  4. Don’t skip the surveying. The hardest part is understanding the effect of what you are producing. In reality, it takes months or even years to know for sure, but you can learn a lot by asking.
  5. This might be an uncomfortable process, but that’s OK. Many companies feel safer letting culture remain implicit. As long as you are authentic and mindful, and use language carefully and deliberately, it will probably be OK. Design a good review process and trust it. It’s worth it!

We’ll keep you posted on this experiment. If you have any thoughts or suggestions, or questions, please reach out to me here, on Twitter, via LinkedIn, etc.

This story is published in The Startup, where 266,300+ people come together to read Medium’s leading stories on entrepreneurship.

Subscribe to receive our top stories here.


Develop Your Culture Like Software was originally published in Times Open on Medium, where people are continuing the conversation by highlighting and responding to this story.

04 Dec 23:06

Automate or be Obliterated!

by Ted Shelton
In 1990 MIT computer science professor Michael Hammer started a revolution in management thinking with his HBR article "Reengineering Work: Don't Automate, Obliterate." The basic premise of his article, which put the business process re-engineering movement into high speed, was that organizations were wasting time and money putting technology into organizations to automate existing processes that created little or no value and that instead companies should first try to fix, improve, or even eliminate these processes.
Almost thirty years later most large enterprises continue to have some flavor of business process re-engineering as a part of their ongoing efforts to reduce costs, improve efficiency, increase customer satisfaction, and a myriad of related objectives. In particular the role of business process analysis and improvement has become a cornerstone of the outsourcing industry where it is critical to accurately map and often substantially improve processes before they can be relocated to remote teams.
In 2003 Dr. Hammer published "The Agenda: What Every Business Must Do To Dominate The Decade" and posthumously with co-author Lisa Hershman "Faster, Cheaper, Better." Both books continued to focus on the challenge that organizations face as a result of having inefficient processes that are mis-aligned to a company's objectives. Tragically Dr. Hammer passed away in 2008 at the age of 60 and thus did not live to see the advances in artificial intelligence and robotic process automation that have begun to sweep through the business landscape ten years later.
If Hammer were alive today, I wonder whether he would issue a new challenge in the spirit of his Agenda call --- "What Every Business Must Do To Dominate The Decade." If I can be so presumptuous to channel what he might have said, I would suggest that he would urgently tell companies:
  1. Artificial Intelligence and Automation have the potential to radically and quickly transform the way businesses are managed -- specifically by re-engineering all existing business processes and reducing costs, increasing speed, improving quality, and even changing the way companies deliver their products and services
  2. Most companies are woefully behind in improving business productivity against the speedy transformation of technology (a good analysis can be found in this reportfrom Deloitte University Press) and an urgent focus must be put on learning to manage a workforce and processes that combine people, bots, and AI
  3. The worst mistake businesses are making today on this journey is to adopt technology solutions that are so dependent upon technical experts (data scientists, artificial intelligence experts, IT professionals) that they become disconnected from the company's business objectives and the business leaders who can truly understand the connection of processes to those business objectives.
So the imperative statement, the answer to "what every business must do to dominate THIS decade," is clear to me: Automate or you will be obliterated -- but be sure to go on this journey to use AI and automation in your business with technology solutions that empower the business to transform itself.
Maintain maximum agility -- put the power of AI and automation into the hands of the people who understand your business objectives and beware solutions that lock your business processes into inflexible technologies that require a host of experts to develop, deploy manage and improve.
The next decade will be one of immense and rapid change and transformation. To succeed in this time of change requires that you deploy simultaneously capabilities to exponentially reduce costs while maintaining maximum adaptability. Don't get caught in the trap of cost reduction that locks you into only one way of doing business in a world where your markets, customer expectations, product or service capabilities, and business models may turn upside down overnight.
04 Dec 23:05

State of Mozilla 2016: Annual Report

by Denelle Dixon

The State of Mozilla annual report for 2016 is now available here.

The State of Mozilla includes information about how Mozilla operates along with some highlights and detailed financial reports for 2016.

(We know it’s currently 2017- as a non-profit organization, we release this report when we submit our tax filing for the previous year.)

Mozilla is not your average company. Mozilla was founded nearly 20 years ago with the mission to ensure the internet is a global public resource that is open and accessible to all and the principles of the Mozilla Manifesto still guide our work today. Mozilla exists to protect the health of the internet and maintain the critical balance between commercial profit and public benefit.

Today, we remain dedicated to the mission in all the work we do, products we develop, and the partnerships, allies, and investments we make.

In a world with new and evolving threats to the open internet, innovation, user control, and our privacy and security, the Mozilla mission is more important now than ever before. There are billions of people online today who face these risks and every day thousands of Mozillians (employees, allies, volunteers, donors, supporters) fight to promote openness, innovation and opportunity online. We are proudly taking our place in the world to protect the free and open and open internet at a time when the fight needs a leader more than ever.

We measure our success not only by the adoption of our products, but also by our ability to increase the control people have in their online lives, our impact on the internet, our contribution to standards, and how we work to protect the health of the internet.

None of the work we do or the impact we have would at Mozilla would be possible without the dedication of our global community of contributors and loyal Firefox users. We are incredibly grateful for the support and we will continue to fight for the open internet.

We encourage you to get involved to help protect the future of the internet, join Mozilla.

The post State of Mozilla 2016: Annual Report appeared first on The Mozilla Blog.

04 Dec 23:05

Education Technology and 'Fake News'

This is part one of my annual look at the year’s “top ed-tech stories

Last year, I started this series – my annual review of the year in education technologywith an article on wishful thinking. It was a nod, in part, to Joan Didion’s The Year of Magical Thinking, a book that I’ve found useful in understanding how grief clouds our thinking, how grief makes use want to believe the unbelievable, how it “ruptures the rational,” as I wrote then. 2016 was such a terrible, terrible year, and as I composed my reflections on it for this annual series, I wanted to start by recognizing the pain and the loss.

But I wanted to consider too why the stories we repeatedly tell about education and education technology were so fanciful – stories about impending disruptions and revolutions and robot teachers and brain zappers and so on. Why was so much ed-tech “fake news”?

I didn’t use the phrase “fake news” in that article, although I’d like to think it was implied. The image above from Google Trends helps demonstrate how popular the phrase has become in the intervening months. It’s taken on multiple meanings too: first used to identify the misinformation that had occurred online surrounding the 2016 election, it was later embraced by President Trump to denigrate and dismiss “the mainstream media.”

“Fake news” is partly a crisis of journalism and a crisis of civics; but it is also a crisis of education and technology. It’s a crisis of knowledge and expertise and science. (It’s also an opportunity – surprise, surprise – for lots of folks to try sell us some sort of “digital literacy” product.)

Here Lies the President of the United States


The lying did not start on Inauguration Day – 20 January 2017. Indeed, some 70% of the statements Donald Trump made on the campaign trail, as fact-checked by Politifact , have been deemed to be false; just 4% deemed true. But I suppose we should talk about Inauguration Day nonetheless, since that’s when this administration officially began.

On his first full day in office, the President used a speech at CIA headquarters to call journalists “among the most dishonest human beings on earth,” chastising the media for reports that there had been low turnout at his inauguration. Trump claimed that 1.5 million people had attended the event. And at the new administration’s first press briefing the same day, then Press Secretary Sean Spicer insisted that “it was the largest audience to witness an inauguration, period. Both in person and around the globe.”

The photographic evidence clearly showed otherwise – the crowds on the mall were visibly smaller than those gathered for the inauguration of President Barack Obama in January 2009. And even if those photographs were somehow misleading, the 1.5 million people that Trump claimed would have still been a smaller crowd than Obama’s.

The photographic evidence clearly showed otherwise. And yet the Trump Administration insisted that what we saw and what we knew was untrue.

Gaslight – that wonderful 1944 George Cukor film starring a very very young Angela Lansbury – has resurfaced as part of our vocabulary. To gaslight: to psychologically manipulate someone into doubting the truth that they have seen or experienced first-hand.

Lying and exaggerating has long been a signature tactic of the real estate mogul turned politician. It is now a key feature of his presidency. The New York Times tried to keep track of all the 45th President’s falsehoods this year, but it seems to have abandoned its “definitive list” some time in July. When questioned by reporters from The New York Times and elsewhere, Trump has repeated his accusation that these journalists constitute “fake news.” Their reporting should not be trusted.

Who Do We Trust?


There’s been plenty of ink spilled this year on why Donald Trump won the election. There’s no way I’m going to re-hash that here (even though the length of this article might suggest I’ve tried). But I will say that, among the various appeals that he made to voters, Trump was able to tap into a strain of populism that’s been fomenting in this country for a while – one that seeks to dismiss and dismantle various political and cultural institutions, including the government, science, the media, universities, and the K–12 school system. These institutions – their practices, their research, their statements – cannot be trusted, this story tells us.

This deep mistrust involves a rejection of expertise – something that has emboldened flat earthers and anti-vaxxers and climate change deniers and chemtrail conspiracy theorists and school shooting truthers and “deep state” conspiracy theorists and pizzagate believers, to name a few of the most popular story-lines. And in today’s information environment, all these stories have seemingly become a lot less “fringe.” These beliefs are readily amplified and shared by the very “network effects” baked into the infrastructure of social media platforms.

But blaming social media is too easy and too simplistic.

Blame Schools… “Government Schools”


In July, famed astrophysicist Neil deGrasse Tyson tweeted that “The rise of flat-Earthers in society provides some of the best evidence for the failure of our educational system.” Many educators were angered, insisting that this wasn’t their fault.

Nobody wants to take responsibility, which is fine. I get that. Whatever. But at some point, we have to figure out how to clean up this mess. Teachers. Educators. Journalists. I’m talking to you.

No doubt, there’s long been hand-wringing about Americans’ knowledge of science. “A Nation at Risk” and such. Indeed, Americans don’t actively seek out scientific information, one survey found this year, relying on their general news source – “mainstream journalism,” if you will – to provide them with irregular updates on the latest research.

And that’s a problem right there, no doubt, as journalism regularly gets scientific research wrong, often repeating the synopses from paywalled articles or the stories that industry hopes it will share: Is chocolate good for your health? Are standing desks? Is ESP real? Do cellphones cause brain cancer? Should you ban laptops? What does the science say?!

But, to be fair to journalists, a lot of the time we do get it right. So what happens when, for example, we share the research that demonstrates that vouchers do not improve student achievement? Can we expect that – the science or the journalism – to alter public policy in an administration that does not believe in either science or journalism?

See, what might be even more significant than how frequently (or infrequently) Americans learn about science news (or how well that science is explained) is how their personal beliefs influence whether or not they believe that science to be valid.

That is, accepting science is not necessarily a function of education or scientific knowledge – parents who are anti-vaccine are often affluent and highly-educated, for example. It’s a function of politics. Or rather, according to research from Pew released this year, “how much people know about science only modestly and inconsistently correlates with their attitudes about climate and energy issues, while partisanship is a stronger factor in people’s beliefs.” (Emphasis mine.)

But let’s be honest, industry and political groups do still try mightily to shape the science curriculum in American schools, challenging the teaching of evolution, subsidizing science lessons that promote fracking, suggesting everyone should learn to code, and promoting climate change skepticism, for example. Curriculum battles are going to be increasingly fraught as Americans’ beliefs – and beliefs in academic freedom – are increasingly polarized. (That’s another story for another article.)

But the challenges to the expertise of science and schools are even more insidious than the Heartland Institute or Discovery Institute or Code.org pamphleteering. And Americans don’t just struggle with facts about science. They struggle with facts about social studies. This too has been a long time in the making. As Kristina Rizga wrote in Mother Jones this year,

In 2011, all federal funding for civics and social studies was eliminated. Some state and local funding dropped, too, forcing many cash-strapped districts to prioritize math and English – the subjects most prominently featured in standardized tests. A study by George Washington University’s Center on Education Policy found that between 2001 and 2007, 36 percent of districts decreased elementary classroom time spent on social studies, including civics – a drop that most affected underfunded schools serving working-class, poor, rural, and inner-city kids."

We do not know our rights. We do not understand democracy. Many of us do not understand this moment – how it augurs authoritarianism. “Nearly one in three Americans cannot name a single branch of government,” Timothy Egan lamented in an op-ed in The New York Times this fall. “When NPR tweeted out sections of the Declaration of Independence last year, many people were outraged. They mistook Thomas Jefferson’s fighting words for anti-Trump propaganda.”

It’s hard to know what’s “fake news” if you don’t know what’s “real news.” And many Americans do seemingly lack the content knowledge to tell the difference. Add to that, “content knowledge” is increasingly politicized and up-for-debate, as Americans live in a highly polarized society – a highly polarized information economy, one where one pole blasts public education as irretrievably corrupt and frighteningly collectivist. “Government schools.” Sites of indoctrination, not learning. It’s “fake news” all the way down.

The annual Gallup poll gauging the public’s confidence in public schools did reach its highest level this year since 2009. But even with that uptick, just 36% of Americans polled say they are confident in US public schools. While the Gallup poll found just an 11 point difference between Republicans’ and Democrats’ opinions on K–12 schools, the picture at the university level is quite different. According to a survey released by the Pew Research Center in July, 58% of Republicans now say that higher education has a negative effect on the country. (By comparison, just 19% of Democrats believe that colleges’ and universities’ effect is negative.)

What are the implications – on knowledge-making and knowledge dissemination – of that divide?

And why has public opinion about education shifted in recent years? (The Pew survey shows dramatic downward shifts in Republicans’ opinions on higher ed just since 2015.) Pundits have offered a variety of explanations for the distrust in universities: the rising cost of college (something I’ll examine in a subsequent article in this series); an economy that, according to one poll, has led some workers to feel like a college education is more of “a gamble” than a gain (another forthcoming topic); “identity politics” and protests on campuses (yet another forthcoming topic) and the ongoing “culture wars” that posit that colleges – and public schools at the K–12 level – are bastions of liberal indoctrination.

Those “culture wars” are, of course, not new. Ronald Reagan, for example, ran for Governor of California in 1966 with a promise to “clean up that mess in Berkeley.” That is to say, the anti-college drumbeat has been played for and by conservatives for quite some time.

What Does the FOX Say?


While political polarization might not be new – case in point, Ronald Reagan’s campaign slogans in 1966 – the gap between the beliefs of political parties appears to be widening. This affects beliefs in things we typically think of as “political” – one’s stance on immigration, for example – but it also extends more generally, to our information diets – to the news and information we digest – and to what we know and think we know and who we trust to help us gain and build knowledge.

In the same survey cited above, Pew found this year a pronounced divide between conservatives and liberals when it comes to their stance on how the media affects the country. 85% of Republicans now believe the national news media has a negative effect; 46% of Democrats say that the news media has a negative effect. That’s almost half of both parties. “Fake news” has become a powerful rallying cry among many Americans, 46% of whom believe that the news media invents stories just to make President Trump look bad.

One of the most important media outlets for conservatives, FOX News, has been accused for years now – decades, even – of a right-wing slant that veers towards misinformation. Jon Stewart famously accused FOX of having the most misinformed viewers – something that became even more disconcerting this year as it’s clear the President gets much of his news and information from that outlet.

The CEO of FOX, Roger Ailes, resigned last July amidst a sexual harassment scandal, and Ailes died in May of this year. His death prompted a number of reflections on his role in reshaping (and denigrating) public discourse in America. As Rolling Stone’s Matt Taibbi put it, “Roger Ailes Was One of the Worst Americans Ever.”

The problem of misinformation and “fake news” is not a recent one. And to be fair, nor is it simply the fault of FOX News.

Rolling Stone, for its part, settled a libel lawsuit in April with a former administrator at the University of Virginia who claimed she was portrayed in the now-debunked magazine article about an alleged rape at a UVA fraternity as the “‘chief villain,’ indifferent to sexual assault on campus.” In June, Rolling Stone agreed to pay $1.65 million to the fraternity in question as part of its defamation lawsuit. In September, the magazine announced it was up for sale, but it appears as though the fallout from the retracted article – the ongoing court cases, that is – might stymy efforts to sell.

Journalism is far from perfect. It was far from perfect during the election. (The gendered dimension of the treatment of the first female Presidential candidate to receive a mainstream party’s nomination is particularly noteworthy now that so many high profile male journalists are being accused of sexual assault.) It has been far from perfect in responding to the Trump Administration and “fake news” this year. Indeed, I’d contend that ed-tech journalism in particular – admittedly (supposedly) my focus here – has peddled “fake news” – “the best way to predict the future is to issue a press release,” as I like to say – repeating all sorts of specious marketing claims:

School hasn’t changed in 100 years. Half of American colleges will be bankrupt in 10 to 15 years. Half of high school classes will be taught online by 2019. 65% of primary school students will end up in jobs that don’t exist yet. The college lecture is dying. Flying cars are coming, and you’ll be able to get a nanodegree from Udacity in the subject by 2018. Self-driving cars for everyone! Thermal imaging can now tell how hard you’re thinking. We can monitor students’ brainwaves to see if they’re sufficiently “engaged” in class. Virtual reality will be used to teach empathy. VR will revolutionize education. Second Life will revolutionize education. Khan Academy will revolutionize education. And on and on and on and on and on and on.

Why would you ever trust ed-tech journalism?! (Unless you were politically aligned with the very forces spreading those narratives. Unless, that is, you want desperately for these things to be true.)

Kill Your Television


Our information ecosystem extends well beyond “journalism,” of course – beyond fact-checkers and sources on- or off-the-record and editors and legal departments, all of which ideally make sure the news is truly “fit to print.” It includes documentary filmmaking, for example, and it includes school curriculum. The latter was hardly foolproof this year either when it came to “getting things right.” (Yes, another year, another set of textbooks that had to be retracted because of misinformation and other “inadvertent errors.”)

The History Channel aired a documentary in July – Amelia Earhart: The Lost Evidence – that claimed that the famous aviator, whose disappearance remains (somewhat of) a mystery, had actually been taken prisoner by the Japanese. The film showed a photograph that supposedly showed Earhart and her navigator at a harbor on one of the Marshall Islands. This claim was debunked after a 30-minute search online by military history blogger Kota Yamano. A 30-minute search.

It’s easy to blame social media for the rise of “fake news” – certainly that’s what’s received the most attention this year – but television broadcasting is at least partly responsible for what seems to be this deep societal confusion about “what we know.” (It’s still where most Americans get their news. Although just barely.) The problem with television is not just the propaganda machine of FOX News; it’s also channels like History that show historical and scientific documentaries full of unsubstantiated historical and scientific claims.

I wrote about the history of The Learning Channel a couple of years ago – how it moved away from its roots in educational TV. It’s a much more interesting story than the History Channel’s, which once focused almost exclusively on (US-focused) WWII military documentaries but that pivoted in the last decade or so to ridiculous shows like Ancient Aliens and Bigfoot Captured. The History Channel’s pivot to bullshit would suggest that we’ve been cultivating media misinformation for a very long time. Indeed, Kevin Young’s new book on the history of hoaxes, Bunk, which has just been released, suggests that America might just be, at its core, a post-fact nation. A racist post-fact nation, to be clear.

If there is something profoundly appealing to Americans about P. T. Barnum types – “I’m a bit of a P. T. Barnum,” Donald Trump once claimed – then the media seems to quite keen to capitalize on their message, particularly when the truth can be sacrificed for business models, when it can be bent to generate more eyeballs, more clicks, more advertising revenue, more money.

The Internet as Agitprop


Here’s the Fortune headline from 11 November 2016 – two days after the Presidential election: “Mark Zuckerberg Says Fake News on Facebook Affecting the Election Is a ‘Crazy Idea’.” A year and a bit later, it’s not such a crazy idea after all – even Zuck has admitted as much.

Executives from Google, Facebook, and Twitter testified before Congress in October, responding to questions about the role these Internet companies had played in the election, particularly as related to allegations of Russian interference. Initially Facebook had claimed that fake Russian accounts had purchased just $100,000 in ads on its platform – how bad could that be?! One month later, it admitted that 10 million people had seen the ads. A few weeks later, that figure was adjusted upward again: some 126 million people had been exposed to Russian-linked content via Facebook. Various protests, organized via the social media site, were linked to Russian accounts, including the most popular Texas secession page. Twitter too revealed it had sold ads to Russian accounts and the platform was (is) full of bots promoting and retweeting divisive messaging. Even Pokemon Go was purportedly used in the Russian mis- and disinformation campaign. (Phew. Good thing no one in education has penned stories predicting that any of these platforms are going to “disrupt education forever.”)

To focus solely on Russian interference in the 2016 Presidential election via social media is, in many ways, to misconstrue the problem – its origins, its impact. But to ignore Silicon Valley’s role is also to dismiss its powerful role now, one in which it increasingly controls the public sphere. And to be clear, this isn’t simply about the relationship of these companies to “the news” – although my god, they’re so terrible at handling that. It’s the relationship of these companies to information and to education. (A subsequent article in this series will look at the role – and the power – of platforms in education.)

Google’s motto, remember, is to “organize the world’s information and make it universally accessible and useful.” But its search results repeatedly surface inaccurate information, for starters.

“Google’s featured snippets are worse than fake news,” Adrienne Jeffries wrote in The Outline in March, pointing to highlighted content that was not just wrong but often racist. These search results, as we have seen so clearly this year, have been disastrous. As Safiya Noble wrote in The Chronicle of Higher Education in January,

That misinformation can be debilitating for a democracy – and in some instances deadly for its citizens. Such was the case with the 2015 killings of nine African-American worshipers at Emanuel A.M.E. Church in Charleston, S.C., who were victims of a vicious hate crime. In a manifesto, the convicted gunman, Dylann Roof, wrote that his radicalization on race began following the shooting death of Trayvon Martin, an African-American teen, and the acquittal of his killer, George Zimmerman. Roof typed “black on White crime” in a Google search; he says the results confirmed (a patently false notion) that black violence on white Americans is a crisis. His source? The Council of Conservative Citizens, an organization that the Southern Poverty Law Center describes as “unrepentantly racist.” As Roof himself writes of his race education via Google, “I have never been the same since that day.”

In her GQ profile of Roof this summer, Rachel Kaadzi Ghansah underscores too how much of his “education” – his radicalization is, I suppose, how people would rather frame it – occurred online. But what are Americans learning online? And what are they learning in school to help them make sense of the information they find online?

Buy My Media Literacy Product, Said the Moose Diarrhea Salesman


Facebook and Google both launched (PR) efforts this year to try to address the “fake news” problems on their platforms. Google announced in April it was adding fact-checking sites to search and news results. Of course, it also ran ads for fake news on fact-checking sites. Facebook said it would beef up its content moderation staff and help users identify fake news on its platform. The latter backfired when Facebook’s algorithms simply promoted comments containing the word “fake.”

Facebook also hired journalist Campbell Brown to run its news partnership efforts. (Incidentally, Brown, a former CNN anchor, also founded a pro-education reform publication called The 74. Small world, I guess.)

So Google and Facebook – and a whole raft of other companies – have decided to get into the “digital literacy” business. Google launched a “Be Internet Awesome” digital citizenship campaign. Facebook said it would work with the ed-tech advocacy group Digital Promise to teach digital skills. The promise of all this industry PR: the solution to problems with social media is solved through more social media. Naturally.

In April, Facebook launched what some called the largest media literacy campaign ever, publishing a list of “tips to spot false news.” Pity, the largest was also the worst. Or, as Washington State University’s Mike Caulfield put it, “Facebook’s News Literacy Advice Is Harmful to News Literacy.”

Facebook’s list of tips are readily recognizable from many news literacy curricula: be wary of headlines, investigate the source, and so on. But this model “gets the Web wrong,” Caulfield has argued. And as he points out,

There’s actually no evidence that this approach works. And conversely, there’s quite a lot history that shows this model does not work. We actually already trained a generation of students with variants of this method. Sometimes we called it CRAAP. In K–12, it often went by the name of RADCAB.

Not only has media literacy not worked, it appears these efforts, as danah boyd worried this year, have backfired.

But that sure hasn’t stopped the money flowing into media and information literacy products. “‘Fake News,’ Media Literacy Become Business Opportunities in Rush to Educate Students,” Education Week’s Market Brief reported in February. “Millions of Dollars Pour into New Literacy Initiatives,” Edsurge echoed in April. Various education organizations have released frameworks and guidelines and curricula (and, of course, press releases announcing that they were “on it”): Teaching Tolerance, UNESCO, and the New Media Consortium, for example.

For his part, Mike Caulfield published a (free) textbook in February, Web Literacy for Student Fact- Checkers. But Caulfield’s work is more process than product – that’s a key difference. Writing in the Educause Review this fall, he says that

Now is the time for an info-environmentalism curriculum. It’s true that information pollution has been a longstanding problem in mass media. But unlike the nightly news, the web is still a collectively maintained and produced environment. We can clean it up. We can pull those televisions and shopping carts and plastic bags out of our shared information streams and Google results.

Caulfield’s textbook – and, more broadly, his work with the Digital Polarization Initiative of the American Association of State Colleges and Universities’s American Democracy Project, on his own campus and elsewhere – enlists college students in improving the information environment by not just understanding but by improving information online: editing Wikipedia, annotating news articles, creating video or written content. His guidance is designed for college classrooms, sure, but really the impulse is about an online, information civics in general.

What Do We Believe? (And Why?)


“Critical thinking is at the foundation of information literacy, but those selling it are not necessarily in a position to actually supply it. They may be hampered by an inability to think critically about their own practices and proposals.” That was the provocation from Seattle Pacific University’s Rolin Moe in an article in the publication Real Life. Moe blasts “information literacy” and the larger institutions that it supports – schools, libraries, the media – institutions that purport to want criticality, but only insofar as that criticality creates consumers and producers of content and information.

It’s one of my favorite articles written this year. But it’s complicated…

Real Life (the publication, that is) is funded by the technology company Snapchat. Maybe that helps hint at some of the problems we face with our current information ecosystem: it’s a mess. We’re all deeply implicated in its messiness. Not just students. And not just scholars. All of us. There is no responding to Neil deGrasse Tyson that it’s not your fault there are flat-earthers – particularly if you’re a teacher or a journalist or a person who has ever shared a story online that you didn’t read but really thought the headline was really-right-fucking-on.

If you’re going to decry “fake news,” or the President’s version of “fake news,” then you best not be sharing “fake news” yourself. If you’re going to talk about the importance of digital literacy or information literacy or media literacy or what have you, then you best practice it. Did you share this Raw Story story – “Education officials expect ‘ineffective’ Betsy DeVos to step down as her agenda collapses: report” – or this Salon story – “Expert: Expect DeVos to resign from Trump administration”? Why? Did you read the Politico profile of Betsy DeVos that these (and many other) pieces of clickbait were based on? Did you see evidence in that well-reported story that a resignation was imminent? Or did you just want a story to confirm your gut feelings that she should hit the road? Because, going with your “gut feeling” on a story part of the problem. It’s not just that “fake news,” (or incorrect news) get written. It’s that folks share these stories so quickly and uncritically. Anyway, as Matt Barnum writes, “No, there’s no reason to think DeVos is planning to resign, contrary to viral news stories.”

But that’s what people wanted to believe. That’s how “fake news” works. More facts might not actually save us.

And maybe, just maybe, many of those who peddle education technology products and tell us stories about the future of education are banking on that.

Financial data on the major corporations and investors involved in this and all the trends I cover in this series can be found on funding.hackeducation.com. And yes, this article is over 6000 words. But there are things I left out. You can find them in the supplemental reading section at 2017trends.hackeducation.com.

04 Dec 23:05

What are we going to do about the theatre and the performing arts?

by Helen Keegan
That's the question posed by director, Phelim McDermott, and it will be the question asked in January's annual D&D (Devoted & Disgruntled) open space event. This year, it's being held at the New Diorama Theatre in London on 20-22 January 2018 (that's all day Saturday and Sunday and a half-day on Monday - drop in and out as you please). It's the unconventional convention for everyone who loves, makes and lives theatre and the performing arts.

Who is D&D for? It's for theatre lovers and people passionate about the performing arts. You might work in the theatre, you might not. You might be a teacher or a technician; an administrator or an audience member, all are welcome. A key principle of Open Space is whoever comes are the right people. In fact Open Space works best with a range of people and diverse points of view, so if you want to be there, you ARE the right person to attend.

The weekend event uses the open space format. If you've never done that before, I recommend you give it a go. I think it's a great way to learn, listen and participate. If you've been to a barcamp or unconference before, those are both broadly similar but there's something about open space that I think works even better and allows for all kinds of topics and expertise to emerge and it completely alleviates the need for any kind of Powerpoint slides!

I went along to one of these D&D open space sessions about 3 years ago. The question was something around what an Institute of Improvisation might deliver. It was my first experience of open space and I had no idea what to expect. I also wasn't sure what I could or couldn't contribute since my forays into improvisation were fairly minimal. I was soon won over by the energy and conversations happening all over the building we were in. I'd arrived tired and depleted at the beginning of the session and left more tired, yet energised having had a chance to exercise my brain in a completely different way.

That session then led to myself and Lloyd Davis running various open space sessions covering topics related to artificial intelligence, blockchain and other technologies in relation to the future of work. And very interesting it was too and is something I'd very much like to do again.

I'm thinking of heading down to this event. I've been to 89 shows or concerts this year alone, so I have a point of view of what's happening and some thoughts on what could happen and I'm interested to hear what practitioners are up to in an age of continuing austerity and an impending Brexit. It will also be interesting to stretch my brain in a different way and hang out with a different kind of crowd.

The video below will explain a little more about what's happening, and there's more information and a link to get your tickets on the Devoted & Disgruntled website. See you there?


Phelim McDermott invites you to D&D 13 from Improbable on Vimeo.
A captioned video invitation to Devoted & Disgruntled 13 from Improbable's co-Artistic Director, Phelim McDermott.

Day 2/25 Blogmas #DandD13

04 Dec 23:05

Cross Compiling ATS Programs

A few years ago I wrote a mailing list post on cross compiling ATS to Android. With ATS2 being released the ability to cross compile has been made easier. In this post I'll show how to produce static linux binaries using musl libc and how to build Android and Windows ATS programs by cross compiling on linux.

For these examples I'm using ATS2-0.3.8. I'll use the simplest of 'Hello World' programs in ATS to cross compile. The following is the contents of hello.dats:

implement main0() = print!("Hello World\n")

To compile:

$ cat hello.dats
implement main0() = print!("Hello World\n")

$ patscc -o hello hello.dats
$ ./hello
Hello World

# Static musl libc binaries

musl libc is a lightweight standard library for C programs. I use this instead of glibc because statically linked binaries using glibc have issues using networking functionality. There are no problems using networking routines with musl libc, it's smaller and lightweight and works well statically linked into executables. To build musl libc I used these steps:

$ git clone git://git.musl-libc.org/musl
$ cd musl
$ ./configure
$ make
$ sudo make install
$ export PATH=$PATH:/usr/local/musl/bin/

The ATS compiler, patscc, compiles ATS code to C. It defaults to using gcc but takes an atsccomp command line argument to define an alternative C compiler to use for compiling the generated C code. Unknown command line arguments are passed directly to that C compiler. Given musl libc installed in /usr/local/musl as above, a static binary can be built with musl-gcc like so:

$ patscc -o hello -atsccomp "/usr/local/musl/bin/musl-gcc" -static \
         -I $PATSHOME/ccomp/runtime -I $PATSHOME \
         hello.dats

I pass the -static flag to produce a statically linked binary and two -I include paths to find the ATS runtime. These appear to be required if -atsccomp is used. In this case I use the environment variable PATSHOME to find the installation directory of ATS. Hopefully that was set at ATS installation time. If this command succeeded then we have a static binary:

$ ./hello
Hello World
$ ldd hello
not a dynamic executable
$ strip hello && ls -l hello
-rwxr-xr-x 1 myuser myuser 18224 Dec  2 23:21 hello
$ file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

# Cross compiling Windows binaries

To build Windows compatible binaries on Linux I used mingw-w64. On Ubuntu this is available in the gcc-mingw-w64 package. With that installed a Windows hello binary can be built with:

 $ patscc -o hello.exe -atsccomp "i686-w64-mingw-gcc" \
         -I $PATSHOME/ccomp/runtime -I $PATSHOME \
         hello.dats
 $ file hello.exe
 hello.exe: PE32 executable (console) Intel 80386, for MS Windows

Copying to a Windows machine:

C:\Users\Myuser> .\hello
Hello World

# Cross compiling Android binaries

To build on Android I generated a standalone toolchain using the Android NDK. This produces standard command line compilers that generate Android compatible binaries. Install the Android NDK - I used android-ndk-r16 - and run:

$ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
  --arch=arm --install-dir=$STK_ROOT

Replace ANDROID_NDK with the path to the Android NDK and STK_ROOT with the destination where you want the standalone toolchain installed. Use arm64 instead of arm to build an ARM 64-bit binary.

Now the "Hello World" program can be built using the C compiler from the standalone toolchain. To build on 32-bit using an arm standalone toolchain, use arm-linux-androideabi-clang as the C compiler:

 $ patscc -o hello -atsccomp $STK_ROOT/bin/arm-linux-androideabi-clang \
         -I $PATSHOME/ccomp/runtime -I $PATSHOME \
         hello.dats
 $ file hello
 hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
        dynamically linked, interpreter /system/bin/linker, not stripped

To build on 64-bit ARM using an arm64 standalone toolchain, use aarch64-linux-android-clang as the compiler:

 $ patscc -o hello -atsccomp $STK_ROOT/bin/aarch64-linux-android-clang \
         -I $PATSHOME/ccomp/runtime -I $PATSHOME \
         hello.dats
 $ file hello
 hello64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
          dynamically linked, interpreter /system/bin/linker64, not stripped

Notice the use of clang instead of gcc. I believe gcc support for building native Android executables with the NDK is deprecated - I got link errors when I tried.

Copy the hello executable to an Android phone. It needs to be somewhere writeable on the phone. On a recent non-rooted phone you should be able to use /data/local/tmp. The following adb commands work for me when the device is connected:

$ adb push hello /data/local/tmp
$ adb shell
$ cd /data/local/tmp
$ chmod 0755 hello
$ ./hello
Hello World

Producing an actual Android application would require using the ATS FFI to interface with the Android runtime - given the low level nature of ATS, if it can be done in C, it should be able to be done in ATS.

04 Dec 23:05

DUE PAZZI CANADESI in ITALIA: We are branching out into YouTube!

by James Johnstone

Ciao Ragazzi! Richard and I would like to announce the "soft" launch of a collaborative effort to share more of our experiences and perspectives about our life here in Sabina through videos on YouTube. 

After a lot of careful thought—ha ha!—we have chosen a channel name: 

DUE PAZZI CANADESI in ITALIA 

which, for those of you who do not speak Italian, means: 

TWO CRAZY CANADIANS in ITALY.

There are five very "rough cut" videos uploaded now. Two are about salt and smoke curing Leccino olives and the other concern our adventures foraging for wild greens. 


In the future we will be posting videos introducing Casperia and other amazing hill towns, archeological sites and attractions here in Sabina. We will take you to the Sagras, the local food festivals, and will take you to our favourite restaurants and bars. 
















Together, we will visit L'Ulivone di Canneto, the oldest and largest olive tree in continental Europe. 



We will visit the historic Abbazia di Farfa, once the most powerful Abbeys in Medieval Europe and the inspiration for Umberto Eco's The Name of the Rose.


Interior of Farfa's Abbey Church courtesy of Vagabondo.net

And we will take you on a tour of Europe's second largest garden of roses, the fascinating Vacunae Rosae at Tenuta La Tacita in Roccantica.








We will be posting interviews of some of the key people, the movers and shakers in our region: authors, photographers, historians, writers, film-makers, wine-makers, olive oil experts, ecologists, farmers, activists, teachers, crafts people, artists, poets, gattare—read "cat ladies"... 
















...real estate agents, restaurateurs, bar owners, businessmen, shop owners, dancers, jazz singers, our neighbours and friends.

We will take you hunting for wild asparagus...



...and teach you how to make traditional Italian digestivi—liqueurs made from lemons, wild oranges, walnuts, wild fennel, even bay leaves.














And, of course, we will share videos on how the people here in Sabina make their famous stringozzi...



...fregnacce, pizzicotti and other pastas typical of the region we live in... and we will teach you the recipes we have learned from friends here that go best with these pastas.

And we will include lots of practical information about places to stay, how to maximise your time here...



...and while you are driving around Sabina, how to avoid getting trapped in traffic!



We want our YouTube channel to be fun as well as informative. We have lived more than three years now in this amazing, though still relatively unknown and under-visited region of Italy. Living here has truly changed and enriched our lives. The many wonderful people we have met have given us so much and we hope that through this YouTube channel we will be able to give something back. 



So we would really love for you to subscribe to our channel. You can find Due Pazzi Canadesi in Italia by clicking on the link

Remember, the first few videos are rough cuts. We have never tried to make proper videos before and we still have a lot to learn about filming and editing, so please bear with us.



Thanks in advance for subscribing to and spreading the word about DUE PAZZI CANADESI IN ITALIA.



04 Dec 22:43

The Vancouver Is Near Things Maps

by Brendan Dawe
From my presentation to the Vancouver City Council on Wednesday, November 29






04 Dec 22:42

Stewardship in the “Age of Algorithms”

files/images/algorithmsstock.jpg

Clifford Lynch, First Monday, Dec 06, 2017


Icon

Suppose we wanted to preserve the content in Facebook as it exists right now. What would it take? We might think that if we save the database, that would be sufficient. Not so, argues Clifford Lynch. Without the training data Facebook relies upon, and the algorithms that process that data to show you what you see, we haven't preserved Facebook. But this may be beyond our reach, not simply because Facebook won't release it, but because it may be impossible to capture. The best we can hope to do, maybe, is to document output, via "robotic witnesses", or "new Nielson families." These, though, would be small, labour-intensive, and partial attempts.

[Link] [Comment]
04 Dec 22:42

Forget the whole world and focus on your world

by Mark Watson, author and consultant
Some people dream of “making it big,” dreaming of starting the next Facebook or Google. Poor people fantasize about becoming very wealthy. I think this is misplaced focus.

I prefer to live in and think about a much smaller world:

  • Being of service to family and friends and enjoying their company 
  • Being of value to coworkers and customers
  • Providing value and entertainment to people who read my books
  • Getting a lot of exercise and eating great food, in small portions
  • Enjoy reading great books and watching great movies

Yes, that is enough for me. I leave changing the world for other people.
04 Dec 22:42

Twitter Favorites: [MetroManTO] So much for the #KingStreetPilot Every car is going illegally straight through the intersection. Not a cop in sight… https://t.co/rVsdzYPRAo

Pedro Marques @MetroManTO
So much for the #KingStreetPilot Every car is going illegally straight through the intersection. Not a cop in sight… twitter.com/i/web/status/9…
04 Dec 22:42

Videoempfehlung: Vortrag von Prof Dr Hans-Ingo Radatz ...

mkalus shared this story from Fefes Blog.

Videoempfehlung: Vortrag von Prof Dr Hans-Ingo Radatz über Katalonien und Spanien. Der Einsender erklärt:
Interessant sind die Fragen und die Diskussion am Schluss: Besonders interessant fand ich die Frage nach dem Europa der Regionen. Es ist offenbar so, dass die Nationalstaaten an so einem Europa kein Interesse haben, da die nationalstaatlichen Regierungen das Heft in der Hand behalten wollen. Somit sind sie eigentlich (trotz anderweitiger Lippenbekenntnisse) eher die Bremser bei einem echten europäischen Einigungsprozess.
Der Eindruck hat sich ja schon ein paar Mal eingestellt. Gut, da mal ein bisschen mehr Klarheit zu kriegen.

Das Video ist anderthalb Stunden lang.

04 Dec 22:41

udoq lebt

by Volker Weber

ZZ2C2DF4FD
Foto marwin

Nach der IFA 2016 haben wir die erfolgreiche Kickstarter-Kampagne von udoq begleitet und als ich im Frühjahr in München war, habe ich den sehr sympathischen Designer Marcus Kuchler in seinem Atelier besucht. Dort hat er mir ein paar Dinge gezeigt, die noch in der Entwicklung waren, etwa eine Wandbefestigung und diese Kabelbox. An einer Apple Watch-Halterung und einem Qi-Lader arbeitete er auch. Nun sind einige dieser Dinge im Shop erhältlich. Beim Stöbern merkt man, dass er gelernt hat. So gibt es jetzt vorkonfigurierte Pakete für iPhone-Haushalte.

udoq ist eines dieser Produkte, die gar nicht billig sind, aber sehr durchdacht. Exzellenter WAF. Falls sich noch jemand was zu Weihnachten wünschen will. ;-)

More >

04 Dec 22:41

Good bits of web

by russell davies

Today's newsletter celebrates a nice but small bit of web. Matt's latest blog post is similarly small and good.

Newsletter:

While we're all starting to deal with the fact that much of the web has gone bad I like to try and keep noticing the good bits.

Here's one: thatfootballgame.

It's a very simple, really intriguing football prediction game. Like fantasy league but both simpler and cleverer. It's independent, it's funny, it's enabled by the web but it doesn't exploit your data.

They send a funny email every week that reminds you to do your picking. It adds another dimension to our weekly family fry-up. Anne was leading the league for the first few weeks. Arthur got 'Pick of the Week' for predicting that Huddersfield would beat Manchester United. I am dismal at predicting football things.

I suspect this information will be of no use to you until the next season starts but pop a calendar reminder in and join us in playing some of ThatFootballGame.

04 Dec 22:40

Twitter Favorites: [MetroManTO] #KingStreetPilot is a ghost town. 🙄 https://t.co/C5LSAoNsOb

Pedro Marques @MetroManTO
#KingStreetPilot is a ghost town. 🙄 pic.twitter.com/C5LSAoNsOb
04 Dec 22:40

Twitter Favorites: [MetroManTO] @normsworld I’ve been there for lunch and dinner three times since it started. Had to wait to get a table each time.

Pedro Marques @MetroManTO
@normsworld I’ve been there for lunch and dinner three times since it started. Had to wait to get a table each time.
04 Dec 22:40

Surface Family

by Volker Weber

ZZ1CD5F656

Microsoft just announced that Surface Pro LTE is now available to business customers. And since Nina confused us recently with her "Surface Pro Book", I thought we could straighten things out a bit. From left to right: Pro, Book, Studio and Laptop.

I like Surface Pro because it is small and versatile. It's a notebook and a tablet, but not necessarily a laptop. Very difficult to balance. Surface Laptop is a real laptop with a touch screen. You can use a pen, but I think that won't work so well, since you cannot fold it over. And then there is Surface Book, which is three things: a notebook, a detachable tablet and a laptop. The fulcrum hinge may be a bit wobbly, but despite that it's a miracle. And then there is Studio, the fold down desktop.

Which one would you prefer and why?

04 Dec 22:40

Recently

by Tom MacWright

These photos are from a drive down the coast that I did for no reason, a few days after Thanksgiving. I bought a tree on the trip, saw a few beaches, drank a coffee at Downtown Local in Pescadero. As I usually do on solo aimless trips, I initially felt weird seeing other folks on the beaches. But the more people I saw, the more it seemed that they were doing just the same thing - being in a place to be there.

Reading

Listening

St. Vincent’s New York, off of her new album, MassEducation. I’ve always loved St. Vincent’s non-title tracks and covers a bit more than her hits. Her take on These Days has so much feeling - her Dig a Pony is raw. I first fell in love with her song Now Now, and then her epic solo on the live version of Just The Same But Brand New (3:40).

New York is my favorite track yet.

Photay appeared for a few seconds in the soundtrack of the new Broad City. His album has a few other hits, like The Everyday Push.

Onism by Photay

Xiu Xiu’s cover of Sharp Dressed Man.

Everything Daniel Johnston, and his cultural influence, the Wilco cover and Beach House cover.

Watching

I’m trying, again, to wean myself off of video media, or at least to replace mindless entertainment with something more educational.

That something this month has been the HeavyBit Library. I was lucky enough to score an invite to their conference about pricing and was really impressed with the calibre of the speakers and the rigor of their thinking. Some that have caught my attention in particular:

I never expected to be watching videos about Business in my free time, but here we are.

04 Dec 22:40

Sunday nostalgia…

by michaelkluckner

a

Mixing all forms of transportation at Chilco and Georgia in 1936, a photo from the interesting collection on the Three Quarter Lids blog here.


04 Dec 22:40

Bad Money

by Ken Ohrn

BC Provincial Minister of Justice and Attorney General David Eby reacts to a briefing on bad money sloshing around in BC.  An independent review of casino money-laundering may result in changes to BC Lottery Corp’s agreements with casinos, allowing quicker, tougher penalties.   Look for more info on Tuesday Dec 5.

But there may be more than just casinos attracting attention here.

With thanks to Sam Cooper in PostMedia outlet the Vancouver Sun.

In his speech, Eby said he will never forget the first briefing he received from members of B.C.’s gaming enforcement branch when he became attorney general last summer.

money-laundering“One of the members of the public service said, ‘Get ready. I think we are going to blow your mind.’ While I cannot share all of the details, I can advise you that the briefing outlined for me allegations of serious, large-scale, transnational laundering of the proceeds of crime in British Columbia casinos,” Eby said. “And I was advised that the particular style of money laundering in B.C. related to B.C. casinos is being called, quote, ‘the Vancouver model’ in at least one international intelligence community.”

. . .  Eby added that allegations of transnational money laundering linked to casinos go deeper than that: “I have reason to believe that these matters might be linked to other areas of B.C.’s economy.”

Eby also said that he believes B.C.’s property ownership system — in which true owners of property can hide behind opaque legal mechanisms — could be attracting foreign criminals and corrupt officials seeking to hide wealth in the province. Eby said Finance Minister Carole James is working on reforms to pull back legal veils that cover true ownership of property and corporations.

Money-laundering tutorial HERE.

 


04 Dec 21:19

Samsung W2018 Is a Clamshell Android Phone with a 12MP f/1.5 Aperture Camera

by Rajesh Pandey
Thought clamshell phones were dead? Think again. Samsung today launched the W2018 in China, a clamshell flagship Android smartphone featuring the world’s first smartphone camera with an f1.5 aperture. Continue reading →