|
From: Ken Tilton on 4 May 2008 13:59 Ah, a child of three can see where this is headed, given that math notation is so much better for math (surprise!): (deftoc order-of-op (category "Algebra I" "Real Numbers") (title "Order of Operations") (factory #+wait (easy (m+- (m* (rr 2 9)(rr 2 9))(rr 2 9)) (m+- (rr 2 9)(m* (rr 2 9)(rr 2 9))) (m+ (rr 2 9)(m^ (rr 2 5)(rr 2 3))) (m- (m^ (rr 2 5)(rr 2 3))(rr 2 9)) (m* (rr 2 9)(mp (m- (rr 2 9)(rr 2 9)))) (m* (mp (m+ (rr 2 9)(rr 2 9)))(rr 2 9))) (avg (m+- (m^ (rr 2 5)(rr 2 3))(m^ (rr 2 5)(rr 2 3))) (m^ (m+- (rr 2 12)(rr 1 8))(rr 2 3)) (m+- (r+- 1 12) (m* (rr 2 12)(rr 2 12)) (r+- 1 12)) (let* ((f (rr 2 5)) (v (rpu 2 (rr 2 9)))) (m/ (* (car v) (r+- 2 5)) (mp (m+ (sp+ (* (car v) f))))) ) (m� (let ((n (rr 2 10)) (cf (rr 2 12))) (list (m+ (sp+ (* n cf))) (m+ (sp+ cf))))) (m+- (m� (let ((n (rr 2 10)) (cf (rr 2 12))) (list (m+ (sp+ (* n cf))) (m+ (sp+ cf))))) (rr 2 20)) ) How about an encoded string? "j=r2-12,k=j*r2-12:(k%+2)�(j%+2)�r2-12" Instead of: (m+- (m� (let ((n (rr 2 10)) (cf (rr 2 12))) (list (m+ (sp+ (* n cf))) (m+ (sp+ cf))))) (rr 2 20)) Instead of -- well, some of you don't have broadband... :) Anyway, perhaps now it is clear why you all are arguing with the K crowd, not The Kenny. Himself (holding off on the nifty string thingy until done with order of operations examples which happen to be unusually big expression-wise and might be the only place they make a difference) -- http://smuglispweeny.blogspot.com/ http://www.theoryyalgebra.com/ ECLM rant: http://video.google.com/videoplay?docid=-1331906677993764413&hl=en ECLM talk: http://video.google.com/videoplay?docid=-9173722505157942928&q=&hl=en
From: Slobodan Blazeski on 5 May 2008 04:38 On May 4, 4:15 am, Ken Tilton <kennytil...(a)optonline.net> wrote: > Slobodan Blazeski wrote: > > On May 2, 1:00 pm, "John Thingstad" <jpth...(a)online.no> wrote: > > >>På Fri, 02 May 2008 05:02:03 +0200, skrev Ken Tilton > >><kennytil...(a)optonline.net>: > > >>>Everyone knows how much I love Arc, I guess it has influenced my Lisp: > > >>>(deftoc |Reducing| > >>> (category "Algebra I" "Fractions") > >>> (genner > >>> (easy > >>> (w (n (rr 2 6)) > >>> (m/ n (* n (rr 2 9))))) > >>> (avg > >>> (dsb (n d cf) > >>> (sort (rpu 3 (rr 2 9)) '<) > >>> (m/ (* n cf) (* d cf)))) > >>> (hard > >>> (dsb (n d cf) > >>> (rpu 3 (rr 2 12)) > >>> (m/ (* n cf) (* d cf))) > >>> (dsb (n1 n2 d1 d2) > >>> (subseq (shuffle (list 2 3 5 7 9 11 13)) 0 4) > >>> (m/ (* n1 n2) (* d1 d2)))))) > > >>>[The neat thing being one DSL within another DSL. (This Algebra > >>>application just screams for DSLs because of the repeated coding of > >>>different Algebraic transformations.)] > > >>>Btw, the "genner" clause hard-codes random problem generation. > > >>>Hmmm. Where'd the prolog go? Ah, different problem (halfway down): > > >>>(deftoc add-real > >>> (title "Adding") > >>> (category "Algebra I" "Real Numbers") > >>> (genner > >>> (easy > >>> (m+ (rp 2 (r+ 12))) > >>> (m+ (rp 2 (r- 12))) > >>> (eo (m+ 0 (r+ 12)) > >>> (m+ (r+ 12) 0)) > >>> (w (n (r+ 12)) > >>> (eo (m+ n (- n)) > >>> (m+ (- n) n)))) > >>> (avg > >>> ;; --- two approaches to same thing, without prolog.. > >>> (w (ns (rpu 2 (r+ 12))) > >>> (eo (m+ (car ns) (- (cadr ns))) > >>> (m+ (- (car ns)) (cadr ns)))) > >>> ;; ---- ...and with prolog > >>> (plogn > >>> (generating ?x (fgen (random 12))) > >>> (generating ?y (fgen (random 12))) > >>> (lispp (/= ?x ?y)) > >>> (eo (m+ ?x (- ?y)) > >>> (m+ (- ?x) ?y)))) > >>> (hard > >>> (plogn > >>> (generating ?ns (fgen (rp (eo 3 4) (eo (r+ 12)(r- 12))))) > >>> (lispp (and (+? (ct-if '+? ?ns)) > >>> (+? (ct-if '-? ?ns)))) > >>> (m+ ?ns))))) > > >>>I highlighted above a for-the-fun-of-it with/without Prolog pair, > >>>fascinating that the prolog variant is so much easier to code and so > >>>much more verbose. Usually goes the other way. > > >>>Anyway, looking ahead I can almost guarantee the prolog approach will > >>>win out -- I have been through this before. In C. Twenty years ago. I > >>>haven't forgotten the agony of enforcing constraints in procedural code.. > > >>>Meanwhile, what a pleasure to be doing /applications/ again with Lisp, > >>>erecting version 1.0 of a random problem generation framework in an easy > >>>day. Noobs, as much as you dig Lisp, have no idea how much fun it will > >>>be three years in when it disappears and you can Just Build Apps. > > >>>kenny > > >>Just in case I am not on your "kill" list. I have sided with Pascal in > >>that full words are better. > > > I vote for full words , though look at a dictionary and try to find > > shortest synonym. > > Very-long-and-descriptive-names sucks. But code that looks like a > > three-year-old with a particular fondness for periods and colons was > > set before the keyboard. (http://www.jsoftware.com/help/jforc/contents.htm) > > This is very disappointing. > > We already have on the table Tilton's Law of Abbreviation, signifying my > concurrence with the general rule, and I have gone to the trouble of > pointing out why this situation is exceptional, yet not not one of you > has said one word addressing the validity of the exception, which is the > only issue on the table given my concurrence with the general rule. > > The earnest dullard can follow rules, the craftsman knows when they do > not apply. This is the thing we cannot teach, to expert systems or even > good students. It requires a meta-understanding of the rule, an > understanding of from where the rule came and then whether the > circumstances at hand come from the same place. > > And what do I hear from You People? A cast in concrete knee-jerk rote > repeating snap-saluting line-toeing mindless recitation of something you > read in chapter 3 of a programming proverbs book. > > Super. You got 5 points from your teacher who was looking for The One > Right Answer and you just flunked out of the U. of Kenny. Kenny I've read your explanation but I still disagree with you it has nothing to do listening some teacher or fallowing some cast in concrete rule. It just the way I feel it's right. Take for example assignment operator: cl setf scheme set! q : j =: c++ = For anybody using the language more than 3 days it would be crystal clear what this do.Because we're getting use to parse those *symbols*. Also in case of c++ we have even different meaning, because = in math means SAME. In case of j we have to understand what's that strange equal. But what if we use ASSIGN like (assign foo 4) <=> (setf foo 4) Assign is already prebuilt in our knowledge of english meaning we don't hog any more of our brain resources to parse the setf set! or : It's longer but tolerable. We have to type 6 characters but we release our brain resources from context switching and symbol lookup. If we are so on shortness maybe using IS is better. Not clear as ASSIGN but still brain resources are lower. Think (is foo 4) or in tradition syntax foo is 4; // looks like cobol? So adding a lot of meaningless abbreviations like above is just not my style. Your brain might function differently, but I have a natural tendency to remove brain hogging coming from long functions, abreviations or shortcuts. I know that each thing takes only a negligeble thing but they quickly add up. This is the reason I don't like Emacs YMMV.
From: GP lisper on 5 May 2008 20:30 On Sat, 03 May 2008 07:25:26 -0400, <kennytilton(a)optonline.net> wrote: > GP lisper wrote: >> On Fri, 02 May 2008 18:26:11 -0400, <kennytilton(a)optonline.net> wrote: >> >>><sigh> You people really don't program all that much, do you? Too bad, >>>you don't know what you are missing. >> >> Guilty as charged. ;-) > > Oh, no! Cells loses a user! Under five now, I think... Hey, I like driving Ferraris...so going back to a horse is out of the question. >> Since I use lisp, I don't need to spend lots of time coding. > > More time for Freecell! Freecell is for tots, Spider is the game! I run lisp code at least 10x as often as I improve it, looks like a few Megs of compiled lisp (on linux, that doesn't include the image) every day. -- One of the strokes of genius from McCarthy was making lists the center of the language - kt ** Posted from http://www.teranews.com **
From: Slobodan Blazeski on 6 May 2008 10:45 On May 6, 4:23 pm, Slobodan Blazeski <slobodan.blaze...(a)gmail.com> wrote: > On May 5, 3:00 pm, Ken Tilton <kennytil...(a)optonline.net> wrote: > > > > > > > Slobodan Blazeski wrote: > > > On May 4, 4:15 am, Ken Tilton <kennytil...(a)optonline.net> wrote: > > > >>Slobodan Blazeski wrote: > > > >>>On May 2, 1:00 pm, "John Thingstad" <jpth...(a)online.no> wrote: > > > >>>>På Fri, 02 May 2008 05:02:03 +0200, skrev Ken Tilton > > >>>><kennytil...(a)optonline.net>: > > > >>>>>Everyone knows how much I love Arc, I guess it has influenced my Lisp: > > > >>>>>(deftoc |Reducing| > > >>>>> (category "Algebra I" "Fractions") > > >>>>> (genner > > >>>>> (easy > > >>>>> (w (n (rr 2 6)) > > >>>>> (m/ n (* n (rr 2 9))))) > > >>>>> (avg > > >>>>> (dsb (n d cf) > > >>>>> (sort (rpu 3 (rr 2 9)) '<) > > >>>>> (m/ (* n cf) (* d cf)))) > > >>>>> (hard > > >>>>> (dsb (n d cf) > > >>>>> (rpu 3 (rr 2 12)) > > >>>>> (m/ (* n cf) (* d cf))) > > >>>>> (dsb (n1 n2 d1 d2) > > >>>>> (subseq (shuffle (list 2 3 5 7 9 11 13)) 0 4) > > >>>>> (m/ (* n1 n2) (* d1 d2)))))) > > > >>>>>[The neat thing being one DSL within another DSL. (This Algebra > > >>>>>application just screams for DSLs because of the repeated coding of > > >>>>>different Algebraic transformations.)] > > > >>>>>Btw, the "genner" clause hard-codes random problem generation. > > > >>>>>Hmmm. Where'd the prolog go? Ah, different problem (halfway down): > > > >>>>>(deftoc add-real > > >>>>> (title "Adding") > > >>>>> (category "Algebra I" "Real Numbers") > > >>>>> (genner > > >>>>> (easy > > >>>>> (m+ (rp 2 (r+ 12))) > > >>>>> (m+ (rp 2 (r- 12))) > > >>>>> (eo (m+ 0 (r+ 12)) > > >>>>> (m+ (r+ 12) 0)) > > >>>>> (w (n (r+ 12)) > > >>>>> (eo (m+ n (- n)) > > >>>>> (m+ (- n) n)))) > > >>>>> (avg > > >>>>> ;; --- two approaches to same thing, without prolog.. > > >>>>> (w (ns (rpu 2 (r+ 12))) > > >>>>> (eo (m+ (car ns) (- (cadr ns))) > > >>>>> (m+ (- (car ns)) (cadr ns)))) > > >>>>> ;; ---- ...and with prolog > > >>>>> (plogn > > >>>>> (generating ?x (fgen (random 12))) > > >>>>> (generating ?y (fgen (random 12))) > > >>>>> (lispp (/= ?x ?y)) > > >>>>> (eo (m+ ?x (- ?y)) > > >>>>> (m+ (- ?x) ?y)))) > > >>>>> (hard > > >>>>> (plogn > > >>>>> (generating ?ns (fgen (rp (eo 3 4) (eo (r+ 12)(r- 12))))) > > >>>>> (lispp (and (+? (ct-if '+? ?ns)) > > >>>>> (+? (ct-if '-? ?ns)))) > > >>>>> (m+ ?ns))))) > > > >>>>>I highlighted above a for-the-fun-of-it with/without Prolog pair, > > >>>>>fascinating that the prolog variant is so much easier to code and so > > >>>>>much more verbose. Usually goes the other way. > > > >>>>>Anyway, looking ahead I can almost guarantee the prolog approach will > > >>>>>win out -- I have been through this before. In C. Twenty years ago. I > > >>>>>haven't forgotten the agony of enforcing constraints in procedural code. > > > >>>>>Meanwhile, what a pleasure to be doing /applications/ again with Lisp, > > >>>>>erecting version 1.0 of a random problem generation framework in an easy > > >>>>>day. Noobs, as much as you dig Lisp, have no idea how much fun it will > > >>>>>be three years in when it disappears and you can Just Build Apps. > > > >>>>>kenny > > > >>>>Just in case I am not on your "kill" list. I have sided with Pascal in > > >>>>that full words are better. > > > >>>I vote for full words , though look at a dictionary and try to find > > >>>shortest synonym. > > >>>Very-long-and-descriptive-names sucks. But code that looks like a > > >>>three-year-old with a particular fondness for periods and colons was > > >>>set before the keyboard. (http://www.jsoftware.com/help/jforc/contents.htm) > > > >>This is very disappointing. > > > >>We already have on the table Tilton's Law of Abbreviation, signifying my > > >>concurrence with the general rule, and I have gone to the trouble of > > >>pointing out why this situation is exceptional, yet not not one of you > > >>has said one word addressing the validity of the exception, which is the > > >>only issue on the table given my concurrence with the general rule. > > > >>The earnest dullard can follow rules, the craftsman knows when they do > > >>not apply. This is the thing we cannot teach, to expert systems or even > > >>good students. It requires a meta-understanding of the rule, an > > >>understanding of from where the rule came and then whether the > > >>circumstances at hand come from the same place. > > > >>And what do I hear from You People? A cast in concrete knee-jerk rote > > >>repeating snap-saluting line-toeing mindless recitation of something you > > >>read in chapter 3 of a programming proverbs book. > > > >>Super. You got 5 points from your teacher who was looking for The One > > >>Right Answer and you just flunked out of the U. of Kenny. > > > > Kenny I've read your explanation but I still disagree with you it has > > > nothing to do listening some teacher or fallowing some cast in > > > concrete rule. It just the way I feel it's right. > > > Take for example assignment operator: > > > cl setf > > > scheme set! > > > q : > > > j =: > > > c++ = > > > > For anybody using the language more than 3 days it would be crystal > > > clear what this do.Because we're getting use to parse those *symbols*. > > > Also in case of c++ we have even different meaning, because = in math > > > means SAME. In case of j we have to understand what's that strange > > > equal. > > > But what if we use ASSIGN like (assign foo 4) <=> (setf foo 4) Assign > > > is already prebuilt in our knowledge of english meaning we don't hog > > > any more of our brain resources to parse the setf set! or : It's > > > longer but tolerable. We have to type 6 characters but we release our > > > brain resources from context switching and symbol lookup. If we are so > > > on shortness maybe using IS is better. Not clear as ASSIGN but still > > > brain resources are lower. Think (is foo 4) or in tradition syntax foo > > > is 4; // looks like cobol? So adding a lot of meaningless > > > abbreviations like above is just not my style. Your brain might > > > function differently, but I have a natural tendency to remove brain > > > hogging coming from long functions, abreviations or shortcuts. I know > > > that each thing takes only a negligeble thing but they quickly add up. > > > This is the reason I don't like Emacs YMMV. > > > Jeez, it's a simple question: > > > This?: > > > (mx-generate #\- > > (mx-generate #\* > > (random-in-range 2 9) > > (random-in-range 2 9)) > > (random-in-range 2 9)) > > > ...or this: > > > (m- (m* (rr 2 9)(rr 2 9)) > > (rr 2 9))) > > > ...or maybe something infixy and even closer to what I am trying to > > express (hint) like this: > > > "r2[9]*r2[9]-r2[9]" > > > ...or some other infix/string scheme? > > In Edi > (hook (create #\-) (create #\* dup) (random 2 9)) > Where: > 1. (hook fn1 fn2 atom) => (fn (fn2 atom) atom)) > 2. If (define create (x &rest args) ...) then > (create #\-) => (lambda (&rest args) (apply create #\- args)) > 3. Dup is a operator that tells how many copies of the argument > should be supplied : > (m* (rr 2 9)(rr 2 9) (rr 2 9)) <=> (m* (dup 2) > 4. (random x y) is ... you know Sorry I forget to give you a credit for in-the-name instructions, edi is polymorhic, so what if there is monadic create then below wouldn't work (create #\-) => (lambda (&rest args) (apply create #\- args)) sp using in-the-name instructions (create\2 #\-) meaning I'm talking about dyadic create. Something they're nifty but I prefer to avoid them so final result (hook (create\2 #\-) (create\2 #\* dup) (random 2 9)) or (hook (dyad create #\-) (dyad create #\* dup) (random 2 9))
From: Ken Tilton on 6 May 2008 11:58
Slobodan Blazeski wrote: > On May 6, 4:23 pm, Slobodan Blazeski <slobodan.blaze...(a)gmail.com> > wrote: > >>On May 5, 3:00 pm, Ken Tilton <kennytil...(a)optonline.net> wrote: >> >> >> >> >> >> >>>Slobodan Blazeski wrote: >>> >>>>On May 4, 4:15 am, Ken Tilton <kennytil...(a)optonline.net> wrote: >> >>>>>Slobodan Blazeski wrote: >> >>>>>>On May 2, 1:00 pm, "John Thingstad" <jpth...(a)online.no> wrote: >> >>>>>>>P� Fri, 02 May 2008 05:02:03 +0200, skrev Ken Tilton >>>>>>><kennytil...(a)optonline.net>: >> >>>>>>>>Everyone knows how much I love Arc, I guess it has influenced my Lisp: >> >>>>>>>>(deftoc |Reducing| >>>>>>>> (category "Algebra I" "Fractions") >>>>>>>> (genner >>>>>>>> (easy >>>>>>>> (w (n (rr 2 6)) >>>>>>>> (m/ n (* n (rr 2 9))))) >>>>>>>> (avg >>>>>>>> (dsb (n d cf) >>>>>>>> (sort (rpu 3 (rr 2 9)) '<) >>>>>>>> (m/ (* n cf) (* d cf)))) >>>>>>>> (hard >>>>>>>> (dsb (n d cf) >>>>>>>> (rpu 3 (rr 2 12)) >>>>>>>> (m/ (* n cf) (* d cf))) >>>>>>>> (dsb (n1 n2 d1 d2) >>>>>>>> (subseq (shuffle (list 2 3 5 7 9 11 13)) 0 4) >>>>>>>> (m/ (* n1 n2) (* d1 d2)))))) >> >>>>>>>>[The neat thing being one DSL within another DSL. (This Algebra >>>>>>>>application just screams for DSLs because of the repeated coding of >>>>>>>>different Algebraic transformations.)] >> >>>>>>>>Btw, the "genner" clause hard-codes random problem generation. >> >>>>>>>>Hmmm. Where'd the prolog go? Ah, different problem (halfway down): >> >>>>>>>>(deftoc add-real >>>>>>>> (title "Adding") >>>>>>>> (category "Algebra I" "Real Numbers") >>>>>>>> (genner >>>>>>>> (easy >>>>>>>> (m+ (rp 2 (r+ 12))) >>>>>>>> (m+ (rp 2 (r- 12))) >>>>>>>> (eo (m+ 0 (r+ 12)) >>>>>>>> (m+ (r+ 12) 0)) >>>>>>>> (w (n (r+ 12)) >>>>>>>> (eo (m+ n (- n)) >>>>>>>> (m+ (- n) n)))) >>>>>>>> (avg >>>>>>>> ;; --- two approaches to same thing, without prolog.. >>>>>>>> (w (ns (rpu 2 (r+ 12))) >>>>>>>> (eo (m+ (car ns) (- (cadr ns))) >>>>>>>> (m+ (- (car ns)) (cadr ns)))) >>>>>>>> ;; ---- ...and with prolog >>>>>>>> (plogn >>>>>>>> (generating ?x (fgen (random 12))) >>>>>>>> (generating ?y (fgen (random 12))) >>>>>>>> (lispp (/= ?x ?y)) >>>>>>>> (eo (m+ ?x (- ?y)) >>>>>>>> (m+ (- ?x) ?y)))) >>>>>>>> (hard >>>>>>>> (plogn >>>>>>>> (generating ?ns (fgen (rp (eo 3 4) (eo (r+ 12)(r- 12))))) >>>>>>>> (lispp (and (+? (ct-if '+? ?ns)) >>>>>>>> (+? (ct-if '-? ?ns)))) >>>>>>>> (m+ ?ns))))) >> >>>>>>>>I highlighted above a for-the-fun-of-it with/without Prolog pair, >>>>>>>>fascinating that the prolog variant is so much easier to code and so >>>>>>>>much more verbose. Usually goes the other way. >> >>>>>>>>Anyway, looking ahead I can almost guarantee the prolog approach will >>>>>>>>win out -- I have been through this before. In C. Twenty years ago. I >>>>>>>>haven't forgotten the agony of enforcing constraints in procedural code. >> >>>>>>>>Meanwhile, what a pleasure to be doing /applications/ again with Lisp, >>>>>>>>erecting version 1.0 of a random problem generation framework in an easy >>>>>>>>day. Noobs, as much as you dig Lisp, have no idea how much fun it will >>>>>>>>be three years in when it disappears and you can Just Build Apps. >> >>>>>>>>kenny >> >>>>>>>Just in case I am not on your "kill" list. I have sided with Pascal in >>>>>>>that full words are better. >> >>>>>>I vote for full words , though look at a dictionary and try to find >>>>>>shortest synonym. >>>>>>Very-long-and-descriptive-names sucks. But code that looks like a >>>>>>three-year-old with a particular fondness for periods and colons was >>>>>>set before the keyboard. (http://www.jsoftware.com/help/jforc/contents.htm) >> >>>>>This is very disappointing. >> >>>>>We already have on the table Tilton's Law of Abbreviation, signifying my >>>>>concurrence with the general rule, and I have gone to the trouble of >>>>>pointing out why this situation is exceptional, yet not not one of you >>>>>has said one word addressing the validity of the exception, which is the >>>>>only issue on the table given my concurrence with the general rule. >> >>>>>The earnest dullard can follow rules, the craftsman knows when they do >>>>>not apply. This is the thing we cannot teach, to expert systems or even >>>>>good students. It requires a meta-understanding of the rule, an >>>>>understanding of from where the rule came and then whether the >>>>>circumstances at hand come from the same place. >> >>>>>And what do I hear from You People? A cast in concrete knee-jerk rote >>>>>repeating snap-saluting line-toeing mindless recitation of something you >>>>>read in chapter 3 of a programming proverbs book. >> >>>>>Super. You got 5 points from your teacher who was looking for The One >>>>>Right Answer and you just flunked out of the U. of Kenny. >> >>>>Kenny I've read your explanation but I still disagree with you it has >>>>nothing to do listening some teacher or fallowing some cast in >>>>concrete rule. It just the way I feel it's right. >>>>Take for example assignment operator: >>>>cl setf >>>>scheme set! >>>>q : >>>>j =: >>>>c++ = >> >>>>For anybody using the language more than 3 days it would be crystal >>>>clear what this do.Because we're getting use to parse those *symbols*. >>>>Also in case of c++ we have even different meaning, because = in math >>>>means SAME. In case of j we have to understand what's that strange >>>>equal. >>>>But what if we use ASSIGN like (assign foo 4) <=> (setf foo 4) Assign >>>>is already prebuilt in our knowledge of english meaning we don't hog >>>>any more of our brain resources to parse the setf set! or : It's >>>>longer but tolerable. We have to type 6 characters but we release our >>>>brain resources from context switching and symbol lookup. If we are so >>>>on shortness maybe using IS is better. Not clear as ASSIGN but still >>>>brain resources are lower. Think (is foo 4) or in tradition syntax foo >>>>is 4; // looks like cobol? So adding a lot of meaningless >>>>abbreviations like above is just not my style. Your brain might >>>>function differently, but I have a natural tendency to remove brain >>>>hogging coming from long functions, abreviations or shortcuts. I know >>>>that each thing takes only a negligeble thing but they quickly add up. >>>>This is the reason I don't like Emacs YMMV. >> >>>Jeez, it's a simple question: >> >>>This?: >> >>> (mx-generate #\- >>> (mx-generate #\* >>> (random-in-range 2 9) >>> (random-in-range 2 9)) >>> (random-in-range 2 9)) >> >>>...or this: >> >>> (m- (m* (rr 2 9)(rr 2 9)) >>> (rr 2 9))) >> >>>...or maybe something infixy and even closer to what I am trying to >>>express (hint) like this: >> >>> "r2[9]*r2[9]-r2[9]" >> >>>...or some other infix/string scheme? >> >>In Edi >>(hook (create #\-) (create #\* dup) (random 2 9)) >>Where: >>1. (hook fn1 fn2 atom) => (fn (fn2 atom) atom)) >>2. If (define create (x &rest args) ...) then >>(create #\-) => (lambda (&rest args) (apply create #\- args)) >>3. Dup is a operator that tells how many copies of the argument >>should be supplied : >>(m* (rr 2 9)(rr 2 9) (rr 2 9)) <=> (m* (dup 2) >>4. (random x y) is ... you know > > > Sorry I forget to give you a credit for in-the-name instructions, edi > is polymorhic, so what if there is monadic create then below wouldn't > work > (create #\-) => (lambda (&rest args) (apply create #\- args)) sp using > in-the-name instructions > (create\2 #\-) meaning I'm talking about dyadic create. Something > they're nifty but I prefer to avoid them so final result > (hook (create\2 #\-) (create\2 #\* dup) (random 2 9)) or > (hook (dyad create #\-) (dyad create #\* dup) (random 2 9)) It occurs to me that we may not be in disagreement, since I have already identified my controversial naming as a faulty half-way step to a full-blown mathy infix even terser more effective syntax requiring a special parser yadda-yadda. ie, the logical extension to an infix string or somesuch does not support my naming, it refutes it. Interesting how that works. kt -- http://smuglispweeny.blogspot.com/ http://www.theoryyalgebra.com/ ECLM rant: http://video.google.com/videoplay?docid=-1331906677993764413&hl=en ECLM talk: http://video.google.com/videoplay?docid=-9173722505157942928&q=&hl=en |