Essays/The Art of Shaving

From J Wiki
Jump to navigation Jump to search

Information.png Not ready yet. /!\

This essay is not yet completed, and has no structure. I'm still using this page to collect ideas. I'll post on the Forum when it's done.

























































goal

{

This essay is not yet completed, and has no structure. I'm still using this page to collect ideas. I'll post on the Forum when it's done.

























































goal

our fortune is / your shaven face / it's our best / advertising space

burma-shave

We seek a blade which cuts both ways: a monad which curtails each axis of its argument. EG, trim the last atom from a vector, the last row and column of a table, the last row, column, and page of a report, etc:

   shave        3  NB.  If you don't know,
3
   shave i.     3  NB.  whose signs these are,
0 1
   shave i.   3 3  NB.  you can't have driven
0 1
3 4
   shave i. 3 3 3  NB.  very far.
 0  1
 3  4

 9 10
12 13

motivation

within this vale / of toil and sin / your head grows bald / but not your chin

burma-shave

(Try to remember when and why I've wanted this. Perhaps ask Tucker his reason. Some discussion of the treatment of scalars, and whether they should be left alone, as in most solutions, or curtailed to produce an empty vector)

The next section discusses the approaches we can take to define our verb. Each approach is headed by a razor, or verb which represents that approach. Subsequently, blades are introduced; these are variations on the theme, or different formulations. Razors and blades are compared; a verb which takes fewer strokes to trim its argument is superior.

razors and blades

in cupid's little / bag of trix / here's the one / that clix / with chix

burma-shave

SAID FARMER BROWN,

WHO'S BALD ON TOP,
"WISH I COULD
ROTATE THE CROP."
BURMA-SHAVE

When we we need to curtail in J, the first idea that comes to mind is the monad }: :

   }: i. 3
0 1

However, }: by itself only curtails the primary axis; somehow, we need to rotate, or reorient, the argument, such that the trailing axes move, in turn, to the front, whence they'll be curtailed with }:.

J provides for moving axes with |:...

A SHAVE THAT'S REAL, NO CUTS TO HEAL, A SOOTHING, VELVET AFTER-FEEL, BURMA-SHAVE

For errors or curves. A man A miss A car--a curve He kissed the miss And missed the curve Burma-Shave

We don't Know how To split an atom But as to whiskers Let us at 'em Burma-Shave

It's not How fast or slow You drive The question is How you arrive Burma-Shave Shave faster without disaster Burma-Shave

50% quicker 100% slicker

No sooner spread than done

Hello

J programmers familiar with the conjunction ;. know that it has a case,m ;.0 which provides for extracting (rectangular) sub-arrays.

<can do this by calculating indices and supressing them from the ravel, then reshaping the result to <:$y>

A verb which meets the

0 #@:$ 0&(|:}:) ] Alistair Tucker? (reseach & link)
0a (0 |: }:)^:(#@$) Derivative of 0. (check originality, discuss powering feature of bonded monads x m&u y)
1 (#@$ $ _1:) }. ] (reseach, link, some exposition on multi-dim }.
2 {~ <@:((<@i.)"0@:<:@:$) Edushka (link)
2a {~ <@:((<@i.)@<:@:$) Derivative of 2
2b {~ [: <@:(i.&.>) _1 + $ Derivative of 2
3 {~ (<<_1) <@#~ #@$ Spin on 2. (check originality, then link, explanation of index exclusion) ("spin on" vs. "(reformulation of)"
4 ];.0~ _1 + $ (check originality, then link) a shave that's real / no cuts to heal / a soothing velvet/ after-feel / burma-shave
5  ; @:(<;._3~ 0 ,: _1 + $) (check originality, link, and describe why ];. is insufficient and <@:(<;. neccesary)
... ... Dig out all solutions posted to thread, along with any others you can find in the archives, documentation/phrases, library/addons, wiki, and svn, if you can search it (try google). Add performance metrics.

They give you the razor, to sell you the blades.

references

"Shave" thread:

Burma shave billboard campaign quotes:

1. Comprehensive Burma Shave billboard collection 1. Wikipedia on Burmashave