> going to present at the Language Slapdown (
> http://www.meetup.com/Language-Slapdown/) on Wednesday.
> Please feel free to >take a look and comment.

Are you really forced to use static slides?

If not, I'd rather fire up a J interpreter (a lean jconsole is least
distracting to the audience) and give "a taste of J" by starting
out from your mandatory "hello world" assignment.

The following is tailored for 5 minutes.  17 expressions plus
commentary.  The NB.s would be my spoken comments, introducing or
commenting the inputs and results (the latter are not shown here).

   'hello world'

NB. Variable assignment:

    hw =. 'hello world'
    hw

NB. Everything in J is an n-dimensional array, many facilites exist
NB. to bring things into shape:

   2 4 5 $ hw
   ,. hw
   |. hw
   'hello' , 'world'
   'hello' ,. 'world'
   'hello' ,: 'world'

NB. The above is a very small sampler from  about 120 primitive symbols.
NB. All functions are either prefix or infix [point out above].
NB. Most symbols have both one prefix and one infix meaning [",." above].
NB. This yields roughly 240 primitive functions.  Very rich toolbox,
NB. governed by a small framework of rules.

NB. Not just "everything is an array", all operations extend to arrays, too:

    'hello' = 'world'
    hw = 'o'
    hw e. 'aeiou'
    32 * hw e. 'aeiou'

NB. All internal loops or parallisations --who knows?-- are implicit.
NB  J programmers rarely need explicit loops.
NB.  They "think array" and use SIMD-style programming without fuss.

NB. J offers also ways to set up implicit data flows:

    hw ,: |. hw
    (,: |.)  hw                 NB. parens inhibit prefix-prefix-arg parsing

NB. ... and J is a truly functional language with higher-order functions
NB. to compose complex effects/data flows out of base functions:

   'hello' ,&|. 'world'
NB. "reverse left arg, reverse right arg, catenate the results"

    (e. & 'aeiou'   |. /.   ]) 'thank you for listening!'
NB. [exeunt]

That's WAY enough for five minutes, both with respect to amount and
complexity.  You really need to PRACTICE this over and over to fit
this smoothly into 5 minutes.  Know the sequence of your expressions
and your exact wordings by heart.  Don't mis-type.  Don't be tempted
to add more.  Not even if you or the audience has stray ideas.

I would NEVER EVER type and speak at the same time.  Personally,
I'm just not good enough to manage this.  But even if I could:
the audience can only focus on one channel at a time, too.

Given that there are just five minutes and that the audience will
already be familiar with standard nomenclature, I'd just make use of
that (and not introduce the special language used in the Dictionary).

The "32 + hw e. 'aeiou'" expression is intended to be provocative; if
you get asked to compute a 'hEllO wOrld' from hw, defer that to the
Q&A slot.  The same holds for the closing expression which should
go without further comment during the presentation.   Just let them
figure out what the result might mean, deferring "the solution" to
Q&A time.  You want to have them come back to you then.

The sequence above intentionally glosses over many details.  For
example, no time is lost to explain J tokens.  Spaces guide the
audience.  Expressions are designed so that remarks on J's
precedence/associativity rules are not required.

In case somebody *does* ask on token rules during Q&A, it will bring
a laugh if you have practiced to scratch across the US keyboard
rows to enter an expression like the following expression REALLY
QUICKLY:

   |: { '~...@#$%^&*()_+[]\{}|,./<>?' ; ' .:'
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|~ |! |@ |# |$ |% |^ |& |* |( |) |_ |+ |[ |] |\ |{ |} || |, |. |/ |< |> |? |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|~.|!.|@.|#.|$.|%.|^.|&.|*.|(.|).|_.|+.|[.|].|\.|{.|}.||.|,.|..|/.|<.|>.|?.|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|~:|!:|@:|#:|$:|%:|^:|&:|*:|(:|):|_:|+:|[:|]:|\:|{:|}:||:|,:|.:|/:|<:|>:|?:|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

It is a very effective demo because

 - you'll end up on a light note (the brute force key roll-overs with
   your thumb, along with the admittance "isn't perfect but a close
   match, ignores some 30 letter combos such as  e.  from above"),

 - it obviously just picks up on the previous  'hello' ,: 'world'  style
   sequence of expressions,

 - without an explanation on the details people will see that human
   beings such as you *CAN* be capable to shoot these from the hips,

 - the output prepares anybody interested in more J that these buggers
   are his/her friends, not the enemies.

The stunt requires some preparation.  Practice some string so that
you (a) don't get hung up on the single ' quote character itself
and that (b) the array display doesn't start to wrap lines across
the 80th column if you have such a limit.  (The above are scratches
across top row shifted, 3+3 keys on 2nd and 4th un/shifted.)

Once more: 5 mins is TIGHT.  Everything needs to be well prepared.
Just recently I invested ~15 hours preparation into an effective 30min
presentation of dyadic %. alone.  Your task is much more difficult.

                                                Good luck!
                                                Martin

PS:  I think this was ill-posted to "programming" in the first place;
"general" or "chat" would have been more appropriate in my view.  But
I also hate torn threads so apoologies for my follow-up here, too.

PPS:  If slides *are* mandatory:  Both MS PowerBlunder and Unix's
"MagicPoint' can run live applications as part of a slide.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to