home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group84.txt < prev    next >
Internet Message Format  |  1988-10-29  |  27KB

  1. From mmdf Sun Jan 15 19:08:37 1984
  2. From: whm at arizona
  3. Date-Sent: 15 Jan 84 19:06:08 MST  (Sun)
  4. Subject:  Icon on 4.2bsd
  5. To: icon-group@arizona
  6. Status: R
  7.  
  8. As some of you may know, Icon is on 4.2bsd as user-contributed software.
  9. We've sort of lost contact with the people at Berkeley and we'd like
  10. to find out what versions of Icon have been distributed with 4.2bsd.
  11.  
  12. If your Icon system came with 4.2bsd, we'd really appreciate it if you
  13. would run this program:
  14.     procedure main()
  15.         write(&version)
  16.     end
  17. and mail the result to icon-project.arizona@rand-relay.
  18.  
  19.                     Thanks,
  20.                     Bill Mitchell
  21.  
  22. p.s.
  23. I'll be going to Usenix; if any of you are going and would like to
  24. talk about Icon, look me up.  (I know there'll be about 4000 people
  25. there, but if you see someone in their mid-twenties about six feet tall
  26. with red hair, glasses, dark suit, a stack of resumes, and an Icon
  27. button, it's probably going to be me.)  I'll be in DC the 16th-19th
  28. at the Hilton.
  29.  
  30. From mmdf Tue Jan 24 18:39:44 1984
  31. From: Michael Cerda <cerda@ut-ngp>
  32. Subject: Icon version number.
  33. Posted-Date: Tue, 24 Jan 84 16:07:47 CST
  34. To: icon-group.arizona@rand-relay
  35. Status: R
  36.  
  37.  
  38. I ran the described program and the results are included. Is the version of
  39. Icon that came with BSD4.2 different than the tape that says 5g version 5.8?
  40.  
  41.                     cerda at ut-ngp
  42.     procedure main()
  43.         write(&version)
  44.     end
  45. Icon, Version 5.7x compiler, March 1983
  46.  
  47.  
  48. From mmdf Sun Feb 19 07:05:26 1984
  49. From: ralph at arizona
  50. To: icon-group@arizona
  51. Subject: Icon Newsletter #14
  52. Status: R
  53.  
  54. Icon Newsletter #14 has been mailed to all persons on our Icon
  55. postal mailing list.  It went out bulk rate to US addresses about
  56. three weeks ago, and should have been delievered by now.  If
  57. you got a copy and haven't mailed back the questionnaire in it,
  58. please do so.
  59.  
  60. If you didn't get a copy, but would like to, send us your
  61. postal address.  Send requests to
  62.  
  63.     icon-project.arizona@rand-relay
  64.  
  65. (not to icon-group, please)
  66.  
  67.         Ralph Griswold
  68.  
  69. From mmdf Sun Apr 15 12:39:01 1984
  70. From:     Amir Razi <razi%udel-ee.arpa@csnet-relay.csnet>
  71. To:       Icon-Group.Arizona@csnet-relay.csnet
  72. Subject:  Subscription
  73. Status: R
  74.  
  75. Would you please add my name to receive ICON digests.
  76. My net address is:
  77.             Razi@Udel
  78. Thank you.
  79. Amir M. Razi
  80.  
  81. From mmdf Wed Apr 18 23:48:10 1984
  82. From: MDC.WAYNE%MIT-OZ%mit-mc.arpa@csnet-relay.csnet
  83. Subject: MAILING LIST REQUEST
  84. To: ICON-GROUP.ARIZONA@csnet-relay.csnet
  85. cc: MDC.WAYNE%MIT-OZ%mit-mc.arpa@csnet-relay.csnet
  86. Status: R
  87.  
  88. Please add my name to your mailing list.
  89. Wayne McGuire <mdc.wayne@MIT-OZ>
  90.  
  91.  
  92. -------
  93.  
  94.  
  95. From mmdf Fri May  4 23:27:54 1984
  96. From: whm at arizona
  97. Date-Sent: 4 May 84 23:25:23 MST  (Fri)
  98. Subject:  Sets in Icon
  99. To: icon-group@arizona
  100. Status: R
  101.  
  102. We are contemplating including a "set" data type in the next release
  103. of Icon and we are soliciting comments in this, the design stage.
  104.  
  105. I guess the best way to describe what we have in mind is to ennumerate
  106. the language additions that we are planning.
  107.    
  108. set([x1,x2, ..., xn])
  109.     Create a set from the elements of the list given as an
  110.     argument.  Duplicate elements will be eliminated.
  111.  
  112. insert(s,x)
  113.     Add x to the set s.  Insert always succeeds and returns the
  114.     value s.
  115.  
  116. delete(s,x)
  117.     Delete x from the set s.  As with insert, delete always succeeds
  118.     and returns the value s.
  119.     
  120. x in s
  121.     Succeeds if the set s contains x.
  122.  
  123. seteqv(s1,s2)
  124.     Succeeds if s1 and s2 contain the same elements.
  125.  
  126. The cset operations ++, **, and -- will be extended to operate on sets.
  127.    
  128. The prefix operators *, !, and ? and the type, copy, sort, and image
  129. functions will be extended to handle sets.
  130.  
  131.  
  132. That's about it.  We're looking for questions and suggestions concerning
  133. any of the above constructs and any other constructs that might be
  134. worth having or not having.
  135.  
  136.                     Bill Mitchell
  137.  
  138. From mmdf Sun May  6 02:38:51 1984
  139. From:     Mark Weiser <mark%umcp-cs.arpa@csnet-relay.csnet>
  140. Subject:  Re:  Sets in Icon
  141. To:       whm%arizona.csnet@csnet-relay.csnet, 
  142.           icon-group%arizona.csnet@csnet-relay.csnet
  143. Status: R
  144.  
  145. In all my set programming I have found invaluable some fast way
  146. of iterating over sets.  One way is to provide a remove-an-element
  147. function (which also returns the element as its value).  One
  148. then programs an iteration like:
  149.  
  150. tempset := realset
  151. while notempty(tempset) do
  152.     element := remove-an-element(tempset);  /* side-effect ! */
  153.     /* use element */
  154.     od
  155.  
  156. Of course in clu with built in iterators it could be much cleaner.
  157.  
  158. What would be the ICON way?
  159.  
  160.  
  161.  
  162. From mmdf Mon May  7 17:57:30 1984
  163. From: ralph at arizona
  164. To: icon-group@arizona
  165. Subject: Questionnaires
  166. Status: R
  167.  
  168. I am presently compiling the results of questionnires that have
  169. been returned from Icon Newsletter #14. If you have not returned
  170. your questionnaire yet, please do so promptly if you want your answers
  171. included in the compilation.
  172.  
  173. If you did not get Icon Newsletter #14 but would like one, send
  174. me a postal mailing address.
  175.  
  176.     Ralph Griswold
  177.     icon-project.arizona@csnet-relay
  178.  
  179. From mmdf Mon May  7 18:58:32 1984
  180. From: Waiming Mok <WMM at ACC>
  181. Subject: Concerning sets in ICON
  182. To: ICON-GROUP%ARIZONA.CSNET at CSNET-RELAY
  183. Reply-To: WMM at ACC
  184. Status: R
  185.  
  186. Are sets going to allow inclusion of elements of different data types?
  187. or some restricted set of data types?
  188. If so, insert may have to indicate unsuccessful insertion.
  189. If an element does not exist in a set, delete may have to indicate
  190. unsuccessful deletion.
  191.  
  192. At least mathematically,
  193. set operations are
  194.  
  195. 1. taking union
  196. 2. taking intersections of sets
  197. 3. finding complement of a subset in another set
  198. 4. finding the cardinality of the set
  199.  
  200. aside from the initial creation of a set,
  201. the first 3 operations may be used to replace insert and delete.
  202.  
  203. Waiming Mok
  204. ------
  205.  
  206. From mmdf Mon May  7 20:58:39 1984
  207. From: whm at arizona
  208. Date-Sent: 7 May 84 20:55:23 MST  (Mon)
  209. Subject:  Re:  generation of set elements
  210. To: mark@umcp-cs
  211. Cc: icon-group@arizona
  212. Status: R
  213.  
  214. Icon's element generation operator, !, will provide convenient iteration
  215. over elements of a set.  To print out each element in a set s, one
  216. could say:
  217.  
  218.     every write(!s)
  219.  
  220. !s generates the elements in sequence and these serve as arguments
  221. for successive calls to write.
  222.  
  223. From mmdf Mon May  7 21:07:02 1984
  224. From: whm at arizona
  225. Date-Sent: 7 May 84 21:04:00 MST  (Mon)
  226. Subject:  Re:  Concerning sets in [Icon]
  227. To: WMM@ACC
  228. Cc: icon-group@arizona
  229. Status: R
  230.  
  231. As is the presently the case with tables, sets will be able to hold any
  232. combination of types of elements.  For example,
  233.  
  234.     x := set([set([1,2,3,[]]),table(2),'abc',"xyz"])
  235.     insert(x,x)
  236.  
  237. will be perfectly valid.
  238.  
  239. Some thought was given to having insert fail if the element being inserted
  240. already exists and having delete fail if the element being deleted didn't
  241. exist, but current thinking is that such semantics would cause more loss
  242. than gain because of problems with ambiguous failure.
  243.  
  244. From mmdf Sun Jun 24 18:36:44 1984
  245. From: ralph at arizona
  246. To: icon-group@arizona
  247. Subject: Icon Newsletter #15
  248. Status: R
  249.  
  250. Icon Newsletter #15 was mailed out last week.  It goes bulkrate
  251. in the United States, so it may take a while to get to some
  252. places.
  253.  
  254. Everyone who has been sent previous Icon Newsletters has been sent
  255. a copy of #15.  Copies will be sent to others, free of charge, on request
  256. (be sure to include a postal address).
  257.  
  258. From mmdf Mon Jun 25 16:18:32 1984
  259. From: ralph at arizona
  260. To: icon-group@arizona
  261. Subject: Bug in the VAX/VMS Implementation of Version 5.8 Icon
  262. Status: R
  263.  
  264. There is a storage allocation problem in the VAX/VMS implementation
  265. of Version 5.8 that can cause programs to run out of string or heap
  266. space after a file is opened. This is caused by the fact that VMS
  267. may allocate memory in the program's data space. VAX-11 C is smart
  268. enough to realize that this has happened, and it then prevents
  269. Icon's data space from growing. This problem is compounded by
  270. an incorrect space computation in the Icon storage management
  271. system that makes it think that it needs more space than it does.
  272.  
  273. This problem can be circumvented by increasing the initial allocations
  274. of space for Icon's data regions. See the Icon HELP file.
  275.  
  276. The bug can be fixed by adding
  277.  
  278.     IOSEGMENTS=32,NOP0BUFS
  279.  
  280. to the linker options file and relinking Icon.
  281.  
  282. From mmdf Mon Jul  2 18:40:31 1984
  283. Resent-Date: Mon, 02 Jul 84 15:53:57 EDT
  284. Sender: postmaster%csnet-sh.arpa@csnet-relay.csnet
  285. ReSent-From: Postmaster@csnet-relay.csnet
  286. ReSent-To: icon-group%arizona@csnet-relay.csnet
  287. mooers-note: Mon, 02 Jul 84 15:52:47 EDT
  288. mooers-note: dist'ed to the 3 addressees
  289. From: CSNET-RELAY Memo Service <mmdf@csnet-relay.csnet>
  290. Subject: Failed mail
  291. To: Orphanage <Postmaster@csnet-relay.csnet>
  292. Resent-Sender: postmaster@csnet-sh
  293. Status: R
  294.  
  295.     After 7 days (148 hours), your message could not be
  296. fully delivered.
  297.  
  298.     It failed to be received by the following address(es):
  299.  
  300.     icon @ Etl-Ai (queue: smtp)
  301.     tbigham.es @ Parc-Maxc (queue: smtp)
  302.     hfehling @ Usc-Eclc (queue: smtp)
  303.  
  304.     Problems usually are due to service interruptions at the receiving
  305. machine.  Less often, they are caused by the communication system.
  306.  
  307.     Your message begins as follows:
  308.  
  309. Received: From arizona.csnet by csnet-relay;  25 Jun 84 2:39 EDT
  310. Date: 24 Jun 1984 18:34:05-PST
  311. From: ralph at arizona
  312. To: icon-group@arizona
  313. Subject: Icon Newsletter #15
  314.  
  315. Icon Newsletter #15 was mailed out last week.  It goes bulkrate
  316. in the United States, so it may take a while to get to some
  317. ...
  318.  
  319. From mmdf Mon Jul  2 18:51:37 1984
  320. Resent-Date: Mon, 02 Jul 84 16:28:39 EDT
  321. Sender: postmaster%csnet-sh.arpa@csnet-relay.csnet
  322. ReSent-From: Postmaster@csnet-relay.csnet
  323. ReSent-To: icon-group%arizona@csnet-relay.csnet
  324. mooers-note: Mon, 02 Jul 84 16:28:04 EDT
  325. mooers-note: reSent to the 3 addressees
  326. From: CSNET-RELAY Memo Service <mmdf@csnet-relay.csnet>
  327. Subject: Failed mail
  328. To: Orphanage <Postmaster@csnet-relay.csnet>
  329. Resent-Sender: postmaster@csnet-sh
  330. Status: R
  331.  
  332.     After 7 days (153 hours), your message could not be
  333. fully delivered.
  334.  
  335.     It failed to be received by the following address(es):
  336.  
  337.     icon @ Etl-Ai (queue: smtp)
  338.     tbigham.es @ Parc-Maxc (queue: smtp)
  339.     hfehling @ Usc-Eclc (queue: smtp)
  340.  
  341.     Problems usually are due to service interruptions at the receiving
  342. machine.  Less often, they are caused by the communication system.
  343.  
  344.     Your message begins as follows:
  345.  
  346. Received: From arizona.csnet by csnet-relay;  25 Jun 84 21:39 EDT
  347. Date: 25 Jun 1984 16:16:17-PST
  348. From: ralph at arizona
  349. To: icon-group@arizona
  350. Subject: Bug in the VAX/VMS Implementation of Version 5.8 Icon
  351.  
  352. There is a storage allocation problem in the VAX/VMS implementation
  353. of Version 5.8 that can cause programs to run out of string or heap
  354. ...
  355.  
  356. From mmdf Wed Jul  4 18:21:17 1984
  357. From: ralph at arizona
  358. To: icon-group@arizona
  359. Subject: Eunice Icon
  360. Status: R
  361.  
  362.        Version 5.8 Icon Now Available for Eunice
  363.  
  364. Version 5.8 of Icon has been adapted to Eunice, a UNIX emulator that
  365. runs under VMS.  The work was done by Mark Langley of Science Applications
  366. Inc.
  367.  
  368. A copy of this implementation can be obtained, free of charge, by
  369. sending a 600' magnetic tape to
  370.  
  371.     Icon Project
  372.     Department of Computer Science
  373.     University of Arizona
  374.     Tucson, AZ   85721
  375.  
  376. A check for $15, payable to University of Arizona, can be sent in lieu
  377. of a tape.
  378.  
  379. Be sure to specify "Eunice Icon".
  380.  
  381. From whm@arizona.CSNET  Tue Sep  4 19:50:36 1984
  382. From: whm@arizona.CSNET (Bill Mitchell)
  383. To: icon-group@arizona.CSNET
  384. Subject: A curious program
  385. Status: R
  386.  
  387. Here's a program that doesn't do quite what it looks like it might
  388. at first glance.  You may wish to ponder its behavior (and that
  389. of the translator).
  390.     
  391.     procedure main()
  392.         while next := read() do
  393.             write(next)
  394.     end
  395.  
  396. Kudos to Dave Burns for bumping into this.
  397.  
  398. From whm  Wed Sep  5 02:31:56 1984
  399. From: whm (Bill Mitchell)
  400. To: icon-group-test
  401. Subject: this
  402. Status: R
  403.  
  404. is
  405. a
  406. test
  407.  
  408. From whm  Wed Sep  5 02:33:34 1984
  409. From: whm (Bill Mitchell)
  410. To: icon-group-test
  411. Subject: this
  412. Status: R
  413.  
  414. is with
  415. foo.
  416.  
  417. From whm@arizona.CSNET  Wed Sep  5 02:43:52 1984
  418. From: whm@arizona.CSNET (Bill Mitchell)
  419. To: icon-group-test@arizona.CSNET
  420. Subject: this
  421. Status: R
  422.  
  423. is
  424. a
  425. test
  426.  
  427. From whm@arizona.CSNET  Wed Sep  5 02:59:18 1984
  428. From: whm@arizona.CSNET (Bill Mitchell)
  429. To: icon-group@arizona.CSNET
  430. Subject: Mailing list switch
  431. Status: R
  432.  
  433. I've just switched the Icon-Group mailing list over from MMDF to sendmail
  434. and rather than bore you with a test message to see if things still work,
  435. I'll pose you a puzzle:
  436.  
  437.     Give an expression that uses only relational operators and alternation
  438.     that produces the smallest value among three integer-valued variables
  439.     a, b, and c.
  440.  
  441. From mark  Thu Sep  6 22:25:45 1984
  442. From: mark (Mark Langley)
  443. To: icon-group
  444. Subject: (longish) Parsing and Expression Evaluation
  445. Cc: janalee, rogerh, trh, wendt
  446. Status: R
  447.  
  448. Conjecture for the day:
  449.  
  450. I think that Icon should parse (or give the appearance
  451. of parsing) right-associative operators from right to left,
  452. rather than left-to right.  Namely, instead of, for
  453.  
  454.     a := b := c
  455.  
  456. producing
  457.        :=
  458.     a    :=
  459.         b        c
  460.  
  461. Where it has to derefence a and then check to see if it has changed
  462. a as a side effect; instead it should produce:
  463.  
  464.         :=
  465.         :=        a
  466.     b    c
  467.  
  468. And just evaluate the tree with no further ado.
  469.  
  470. It could do this by producing a "mirror-image parse tree"
  471. instead of the usual one... ie when, in left to right encountering
  472. of 
  473.  
  474.     . a := b := c
  475.  
  476. it could make a the rson (instead of left), and then do the same for
  477.  
  478.     a := . b := c
  479.  
  480. Ie The (YACC) parsing machine would be the same, it would just
  481. produce the evaluation tree backwards.
  482.  
  483. Am I missing something?  We didn't go over the parser in much
  484. detail in 620, so I may have misinferred the point of
  485. how it uses YACC...
  486.  
  487. From whm@arizona.CSNET  Sat Sep  8 01:04:39 1984
  488. From: whm@arizona.CSNET (Bill Mitchell)
  489. To: mark@arizona.CSNET
  490. Subject: Re:  (longish) Parsing and Expression Evaluation
  491. Cc: icon-group@arizona.CSNET
  492. Status: R
  493.  
  494. It seems like what you're proposing is to alter the strict left-right
  495. evaluation order to avoid implementation difficulties.
  496.  
  497. I think the actual problem that you'd run into with your scheme is
  498. that when parsing an assignment expression, you don't really know
  499. that you've got an assignment until code has been generated for the lhs.
  500.  
  501. The solution would be to have the assignment operator assign the lhs
  502. to the rhs, e.g.:
  503.  
  504.     1 + 2 =: x
  505.  
  506. (Just kidding folks!)
  507.  
  508. From ralph@arizona.CSNET  Sat Sep  8 06:18:17 1984
  509. From: ralph@arizona.CSNET (Ralph Griswold)
  510. To: icon-group@arizona.CSNET
  511. Subject: Version 5.9 of Icon
  512. Status: R
  513.  
  514. Version 5.9 of Icon for PDP-11s and VAXs running under UNIX is now
  515. available.  The main features of this version are:
  516.  
  517.     There is an optional language extension that provides sets and
  518.     set operations.
  519.  
  520.     The Icon compiler has been removed, leaving only the
  521.     interpreter.  A "personalized interpreter" facility has
  522.     been added to allow individuals to maintain customized
  523.     versions of the Icon run-time system.  This facility
  524.     replaces the former use of external functions with
  525.     the compiler.
  526.  
  527.     The implementation of the table data type has been redone
  528.     to increase the efficiency of table lookup.
  529.  
  530.     The source code has been commented extensively and considerable
  531.     work has be done throughout the Icon system to improve the
  532.     quality of the code and to remove nonportable constructs.  Several
  533.     minor bugs have been fixed also.
  534.  
  535.     The Icon program library has been reorganized and new material
  536.     has been added to it.
  537.  
  538.     The distribution hierarchy has been reorganized and new material
  539.     has been added to aid in testing and porting to other computers.
  540.  
  541. Version 5.9 of Icon is in the public domain.  Program material and
  542. documentation is provided without charge.  To obtain a copy, format the
  543. t/nroff text following the dashed line using -ms and mail it to us
  544. as indicated.
  545. --------------------------------------------------------------------
  546. .nr LL 6.5i
  547. .ds CF
  548. .de LE
  549. \l'3.9i'
  550. .sp 1
  551. ..
  552. .de Ip
  553. .IP "\\$1" 25
  554. .LE
  555. ..
  556. .LP
  557. .ce 1
  558. \f3Version 5.9 UNIX Icon Distribution Request\fR
  559. .sp 2
  560. \fINote:\fR This system can be configured for PDP-11s with separate I and
  561. D spaces or VAX-11s.
  562. .sp 1.5
  563. Contact Information:
  564. .sp 1
  565. .Ip name
  566. .Ip address
  567. .LE
  568. .LE
  569. .LE
  570. .Ip telephone
  571. .Ip "electronic mail address"
  572. .sp 1
  573. .Ip computer
  574. .Ip "operating system"
  575. .sp 1
  576. .LP
  577. All tapes are written in 9-track \fItar\fR format.
  578. Preferred tape recording density:
  579. .sp 1
  580. \(sq   1600 bpi\h'|1.8i'\(sq   800 bpi
  581. .sp 1.2
  582. Return this form to:
  583. .DS
  584. Icon Project
  585. Department of Computer Science
  586. The University of Arizona
  587. Tucson, AZ   85721
  588. .DE
  589. Enclose a magnetic tape (at least 600\(fm) \fIor\fR a check for $15
  590. payable to the University of Arizona.
  591.  
  592. From whm@arizona.CSNET  Tue Sep 18 01:26:27 1984
  593. From: whm@arizona.CSNET (Bill Mitchell)
  594. To: icon-group@arizona.CSNET
  595. Subject: Tricky expressions and curious programs
  596. Status: R
  597.  
  598. I posted a note a couple of days ago about a program with confounding
  599. behavior.  The program went something like:
  600.  
  601.     procedure main()
  602.         sum := 0
  603.         while next := read() do
  604.             sum +:= next
  605.     end
  606.  
  607. At first glance, it looks like the program computes the sum of a set
  608. of numbers.  However, when the program is run, it just loops, not reading
  609. anything from standard input.  When I first looked at this, I noted
  610. that this program uses "next", a reserved word, as a variable.  My
  611. first reaction was that this was a horrendous translator error; a
  612. reserved word was being accepted as a variable.  I then realized that
  613. since there are no statements in Icon, just expressions, "next" was
  614. being treated as an expression.  Thus, while the program parses as
  615. one would expect, the evaluation of "next := read()" causes control
  616. to branch back to the start of the while loop when the lhs of
  617. the assignment is being evaluated.
  618.  
  619. One might argue that a "next" occurring in the conditional part of
  620. the while statement should be considered to be in an invalid context,
  621. but I suppose that there are some possible exploitations of the
  622. current treatment.
  623.  
  624.  
  625. On another topic, I also posted a note posing the problem:
  626.  
  627.     Give an expression that uses only relational operators and alternation
  628.      that produces the smallest value among three integer-valued variables
  629.      a, b, and c.
  630.  
  631. One solution is:
  632.  
  633.     c > ((b > a) | b) | c
  634.  
  635. The solution is fairly obvious if you think about it.  First, consider
  636. an expression that produces the smallest of two values, a and b.  The
  637. expression:
  638.  
  639.     b > a
  640.  
  641. produces a if it is smaller than b and fails otherwise.  By adding an
  642. alternative,
  643.  
  644.     (b > a) | b
  645.  
  646. a is the value if smaller than b and b is the value otherwise.  Since
  647. a can really represent an arbitrary expression, it is easy to extend
  648. the solution to another variable:
  649.  
  650.     c > ((b > a) | b) | c
  651.     
  652. and another...
  653.  
  654.     d > (c > ((b > a) | b) | c) | d
  655.  
  656. And now for a problem that I don't have a solution for:
  657.  
  658.     Give an expression that produces the smallest element of
  659.      a list x.  Assignments, calls to non-builtin procedures,
  660.      and modifications to x are disallowed.
  661.  
  662. From mark@arizona.CSNET  Wed Sep 19 01:52:55 1984
  663. From: mark@arizona.CSNET (Mark Langley)
  664. To: icon-group@arizona.CSNET, whm@arizona.CSNET
  665. Subject: Re:  Tricky expressions and curious programs
  666. Cc: icon@arizona.CSNET, ralph@arizona.CSNET, trh@arizona.CSNET
  667. Status: R
  668.  
  669.  
  670.     Give an expression that produces the smallest element of
  671.      a list x.  Assignments, calls to non-builtin procedures,
  672.      and modifications to x are disallowed.
  673.  
  674. This seems to work:
  675.  
  676.         (min >:=!lis) & &fail
  677.  
  678. And if you don't like the keyword, try:
  679.  
  680.         (min >:=!lis) & (0>1)
  681.  
  682. The key being to make goal-directed evaluation iterate through
  683. the list.
  684.  
  685. From whm@arizona.CSNET  Wed Sep 19 02:14:19 1984
  686. From: whm@arizona.CSNET (Bill Mitchell)
  687. To: mark@arizona.CSNET
  688. Subject: Re:  Tricky expressions and curious programs
  689. Cc: icon-group@arizona.CSNET
  690. Status: R
  691.  
  692.     From: mark@arizona.CSNET (Mark Langley)
  693.     To: icon-group@arizona.CSNET, whm@arizona.CSNET
  694.     Subject: Re:  Tricky expressions and curious programs
  695.     
  696.     
  697.         Give an expression that produces the smallest element of
  698.          a list x.  Assignments, calls to non-builtin procedures,
  699.          and modifications to x are disallowed.
  700.     
  701.     This seems to work:
  702.     
  703.                   (min >:=!lis) & &fail
  704.                         ^
  705. Nice solution as such, but this ^ looks like an "assignment" to me.
  706.  
  707. From ralph@arizona.CSNET  Wed Sep 19 07:04:09 1984
  708. From: ralph@arizona.CSNET (Ralph Griswold)
  709. To: icon-group@arizona.CSNET, mark@arizona.CSNET, whm@arizona.CSNET
  710. Subject: Re:  Tricky expressions and curious programs
  711. Cc: icon@arizona.CSNET, trh@arizona.CSNET
  712. Status: R
  713.  
  714.     From mark Wed Sep 19 01:52:41 1984
  715.     Received: by arizona.UUCP (4.12/4.7)
  716.         id AA27994; Wed, 19 Sep 84 01:52:32 mst
  717.     Date: Wed, 19 Sep 84 01:52:32 mst
  718.     From: mark (Mark Langley)
  719.     Message-Id: <8409190852.AA27994@arizona.UUCP>
  720.     To: icon-group@arizona.CSNET, whm@arizona.CSNET
  721.     Subject: Re:  Tricky expressions and curious programs
  722.     Cc: icon, ralph, trh
  723.     Status: O
  724.     
  725.     
  726.         Give an expression that produces the smallest element of
  727.          a list x.  Assignments, calls to non-builtin procedures,
  728.          and modifications to x are disallowed.
  729.     
  730.     This seems to work:
  731.     
  732.             (min >:=!lis) & &fail
  733.     
  734.     And if you don't like the keyword, try:
  735.     
  736.             (min >:=!lis) & (0>1)
  737.     
  738.     The key being to make goal-directed evaluation iterate through
  739.     the list.
  740.     
  741.  
  742. how about
  743.  
  744.     every min >:= !lis
  745.  
  746. From shafto@Nprdc.ARPA@UDel.CSNET  Wed Sep 19 19:26:59 1984
  747. From: shafto%nprdc.arpa@csnet-relay.csnet
  748. Reply-To: shafto%nprdc.arpa@csnet-relay.csnet
  749. To: ralph%arizona.csnet@csnet-relay.csnet
  750. Subject: Re: Re:  Tricky expressions and curious programs
  751. Cc: icon-group%arizona.csnet@csnet-relay.csnet,
  752.         icon%arizona.csnet@csnet-relay.csnet,
  753.         trh%arizona.csnet@csnet-relay.csnet,
  754.         shafto%nprdc.arpa@csnet-relay.csnet
  755. Status: R
  756.  
  757.  
  758. Still contains an assignment, right?
  759.  
  760.  
  761. From whm@arizona.CSNET  Thu Sep 20 01:00:14 1984
  762. From: whm@arizona.CSNET (Bill Mitchell)
  763. To: icon-group@arizona.CSNET
  764. Subject: Smallest element in a list
  765. Status: R
  766.  
  767. Look, these solutions with
  768.  
  769.     min >:= !lis
  770.  
  771. are interesting, but they've got an assignment in them.  Roger Hayes
  772. suggested:
  773.  
  774.     sort(lis)[1]
  775.  
  776. but that's just too easy.  Let's keep thinking.
  777.  
  778. Oh, and about
  779.     
  780.     min >:= !lis
  781.  
  782. min has to be initialized, and what are you going to initialize it to?
  783.  
  784. From whm@arizona.CSNET  Thu Sep 20 03:12:29 1984
  785. From: whm@arizona.CSNET (Bill Mitchell)
  786. To: icon-group@arizona.CSNET
  787. Subject: Re:  Smallest element in a list
  788. Status: R
  789.  
  790. I found a solution which works for lists which contain up to a pre-specified
  791. number of elements, but it can't be generalized to handle the arbitrary
  792. case.  However, producing this solution was interesting.  To state an
  793. instantiation specifically:
  794.  
  795.     Write an expression that finds the smallest element in a list
  796.      that contains from one to four elements.
  797.  
  798. The same restrictions given for the earlier problem apply, i.e., no
  799. assignments, etc.  I suppose the essence of the restrictions is to
  800. require the state of the calculation to be expressed solely in terms
  801. of expression activations.
  802.  
  803. From mark@arizona.CSNET  Thu Sep 20 12:03:38 1984
  804. From: mark@arizona.CSNET (Mark Langley)
  805. To: icon-group@arizona.CSNET, whm@arizona.CSNET
  806. Subject: Re:  Smallest element in a list
  807. Status: R
  808.  
  809.  
  810.     Received: by arizona.UUCP (4.12/4.7)
  811.         id AA16329; Thu, 20 Sep 84 01:04:18 mst
  812.     Received: by arizona.UUCP (4.12/4.7)
  813.         id AA16178; Thu, 20 Sep 84 01:00:14 mst
  814.     Received: by arizona.UUCP (4.12/4.7)
  815.         id AA16135; Thu, 20 Sep 84 00:59:56 mst
  816.     Date: Thu, 20 Sep 84 00:59:56 mst
  817.     From: whm@arizona.CSNET (Bill Mitchell)
  818.     Message-Id: <8409200759.AA16135@arizona.UUCP>
  819.     To: icon-group@arizona.CSNET
  820.     Subject: Smallest element in a list
  821.     Status: O
  822.     
  823.     Look, these solutions with
  824.     
  825.         min >:= !lis
  826.     
  827.     are interesting, but they've got an assignment in them.  Roger Hayes
  828.     suggested:
  829.     
  830.         sort(lis)[1]
  831.     
  832.     but that's just too easy.  Let's keep thinking.
  833.     
  834.     Oh, and about
  835.         
  836.         min >:= !lis
  837.     
  838.     min has to be initialized, and what are you going to initialize it to?
  839.  
  840. For simplicity I did not specify the trivial init.  something like
  841.  
  842.     (/min := !lis) & (min >:= !lis)...
  843.  
  844. should be sufficient, to get the first element of the list (if it the
  845. list is not empty.)
  846.  
  847. From steve@SRI-SPAM@UDel.CSNET  Thu Sep 27 23:43:18 1984
  848. From: Steve Minar <steve@sri-spam.CSNET>
  849. To: Icon-Group.Arizona@Rand-Relay.CSNET
  850. Cc: minar@sri-spam.CSNET
  851. Subject: Please Add Me to your list!
  852. Status: R
  853.  
  854.      I would like to be added to the Icon group distribution list.  I am
  855. doing research in computer graphics and would like to monitor current
  856. ideas, research, etc.  The project that I am currently involved with is
  857. studying the use of an icon user interface for use on the SUN
  858. microcomputer.  Messsages sent to me will be archived in one place for
  859. users with accounts on our machine.  Thanks!
  860.  
  861. Steve Minar
  862. arpanet address: minar@sri-spam
  863.  
  864. US Mail: SRI International
  865.      333 Ravenswood Ave Room EJ394
  866.      Menlo Park, CA. 94025
  867.      (415) 859-3806
  868.  
  869. From whm@arizona.CSNET  Sat Oct 13 02:53:59 1984
  870. From: whm@arizona.CSNET (Bill Mitchell)
  871. To: icon-group@arizona.CSNET
  872. Subject: Smallest element in a list
  873. Status: R
  874.  
  875. I never did get around to finding an expression (given the outlined
  876. constraints) that produces the smallest element in a list, but I did
  877. bump into an interesting solution for lists of non-arbitrary size.  For
  878. a list "lst" with four or less elements, the expression:
  879.  
  880.  (!lst > !lst > !lst > !lst) | (!lst > !lst > !lst) | (!lst >  !lst) | !lst
  881.  
  882. produces the smallest element.  Consider how it works:  If lst has four
  883. distinct elements, then the leftmost alternative finds an ordering
  884. of all four elements from largest to smallest, with the smallest being
  885. the result of the expression.  If there are only three distinct values
  886. (e.g. [1,2,2,3]) in lst, then the first alternative fails because a
  887. strict ordering doesn't exist.  In this case, the second alternative will
  888. succeed because a distinct ordering of three of the elements exists.
  889. Similarly, if there are only two distinct values, the third alternative
  890. takes effect.  The last alternative handles the case of four identical
  891. values.
  892.  
  893. From ralph@arizona.CSNET  Fri Oct 19 06:06:12 1984
  894. From: ralph@arizona.CSNET (Ralph Griswold)
  895. To: icon-group@arizona.CSNET
  896. Subject: Next Icon Newsletter
  897. Status: R
  898.  
  899.  
  900. I am preparing the next Icon Newsletter.  If you have something of
  901. interest to contribute, a topic you would like to see included,
  902. or just general suggestions, let me know.
  903.  
  904. For items of general interest, mail to
  905.  
  906.     icon-group.arizona@csnet-relay
  907.  
  908. Personal mail should be addressed to
  909.  
  910.     ralph.arizona@csnet-relay
  911.  
  912. From JAAKOV%WISDOM.BITNET@UCB-VAX@UDel.CSNET  Tue Dec 18 23:42:57 1984
  913. From: Jacob Levy <jaakov%wisdom.BITNET@UCB-VAX.CSNET>
  914. To: icon-group.arizona@CSNET-RELAY.CSNET
  915. Subject: Pls add us.
  916. Status: R
  917.  
  918.         Please add 'icon@wisdom.bitnet' to your list. If possible, please
  919. send a few back issues. thanks,
  920.  
  921.         Rusty Red (AKA Jacob Levy)
  922.  
  923.         BITNET:                         jaakov@wisdom
  924.         CSNET and ARPA:                 jaakov%wisdom.bitnet@wiscvm.ARPA
  925.         UUCP: (if all else fails..)     ..!decvax!humus!wisdom!jaakov
  926.  
  927.  
  928.  
  929. From ralph@arizona.CSNET  Thu Dec 27 15:00:35 1984
  930. From: ralph@arizona.CSNET (Ralph Griswold)
  931. To: icon-group@arizona.CSNET
  932. Subject: Icon Newsletter #16
  933. Status: R
  934.  
  935. Icon Newsletter #16 was sent out several weeks ago (bulk rate in the United
  936. States).  If you are on the mailing list but have not received your copy,
  937. let me know (and provide a postal address).
  938.  
  939.     Ralph Griswold
  940.     ralph@arizona
  941.  
  942.