User talk:TimToady: Difference between revisions

Content added Content deleted
(→‎On "That Goes Without Saying (or Does It)": Ashes to ashes, dust to dust (or, saying it under your breath))
Line 38: Line 38:
: In effect, '''<tt>f&.g</tt>''' means "do '''<tt>g</tt>''', followed by '''<tt>f</tt>''', then undo '''<tt>g</tt>'''". For example: "fetch some milk" means "walk to the store, buy some milk, and unwalk to the store", except the return trip is implied. In J, we would use '''<tt>&.</tt>''' to express this as '''<tt>buy_milk&.walk_to_store</tt>''' .
: In effect, '''<tt>f&.g</tt>''' means "do '''<tt>g</tt>''', followed by '''<tt>f</tt>''', then undo '''<tt>g</tt>'''". For example: "fetch some milk" means "walk to the store, buy some milk, and unwalk to the store", except the return trip is implied. In J, we would use '''<tt>&.</tt>''' to express this as '''<tt>buy_milk&.walk_to_store</tt>''' .
: This pattern is ubiquitous in real life and in computing. To lay pipe, you dig a trench, lay the pipe, and fill the trench. To wash the dishes, you fill the sink, apply soap, scrub, rinse off the soap, and empty the sink. To perform surgery, you anesthetize the patient, cut him open, fiddle his bits, sew the cuts, and wake him up. To become a Perl programmer, you're born, you learn Perl, and you die. Some [[j:Essays/Under|computational examples]] are available on the J wiki.
: This pattern is ubiquitous in real life and in computing. To lay pipe, you dig a trench, lay the pipe, and fill the trench. To wash the dishes, you fill the sink, apply soap, scrub, rinse off the soap, and empty the sink. To perform surgery, you anesthetize the patient, cut him open, fiddle his bits, sew the cuts, and wake him up. To become a Perl programmer, you're born, you learn Perl, and you die. Some [[j:Essays/Under|computational examples]] are available on the J wiki.
: The anesthesia example suggests a name for this operation: "'''operate<tt>&.</tt>anethesia'''" reads "'''operate <ins>under</ins> anesthesia'''". Analogously, J's RMS algorithm, '''<tt>(+/ % #)&.:*:</tt>''', may be read '''average <ins>under</ins> square''' .
: The anesthesia example suggests a name for this operation: "'''operate<tt>&.</tt>anethesia'''" reads "'''operate <ins>under</ins> anesthesia'''". Analogously, J's RMS algorithm, '''<tt>(+/ % #)&.:*:</tt>''', may be read '''average <ins>under</ins> square''' . And, by the way, the [[Averages/Pythagorean_means#J|harmonic mean]] is "average under reciprocal" and the geometric mean is "average under log".
: So perhaps Goldilocks should consider throwing off her blankets, crossing the room, and getting under the covers with us J guys :) (Or maybe you should implement '''&.''' in Perl6. You stole all our other good ideas anyway ;)
: So perhaps Goldilocks should consider throwing off her blankets, crossing the room, and getting under the covers with us J guys :) (Or maybe you should implement '''&.''' in Perl6. You stole all our other good ideas anyway ;)
: --[[User:DanBron|DanBron]] 23:43, 6 November 2012 (UTC)
: --[[User:DanBron|DanBron]] 23:43, 6 November 2012 (UTC)