From icon-group-sender Fri Jan 3 12:44:03 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h03JgQA12857 for icon-group-addresses; Fri, 3 Jan 2003 12:42:26 -0700 (MST) Message-Id: <200301031942.h03JgQA12857@baskerville.CS.Arizona.EDU> From: icon-project@cs.arizona.edu X-Newsgroups: comp.lang.icon,comp.answers,news.answers Subject: Icon Programming Language FAQ Date: 3 Jan 2003 08:02:52 -0700 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Archive-name: comp-lang-icon-faq Posting-Frequency: monthly Frequently Asked Questions about the Icon programming language www.cs.arizona.edu/icon/faq.htm Last updated October 14, 2002 Learning about Icon A1. What is Icon? A2. What is Icon good for? A3. What are Icon's distinguishing characteristics? A4. What is the Icon program library? A5. Where can I learn more about Icon? A6. How about comprehensive documentation? Implementations B1. What platforms support Icon? B2. How do I get started with Icon? B3. Is there a Unicode version of Icon? B4. What happened to the compiler? Administration C1. What is the Icon Project? C2. How often is the on-line material updated? C3. Where did Icon come from? C4. Where is Icon going? Support D1. Is there a users' group for Icon? D2. How do I get technical support? Programming E1. Why doesn't read() work with every? E2. Why doesn't string invocation such as "foo"() work? E3. How can I call a C function? E4. Can I open a bidirectional pipe? _________________________________________________________________ Learning about Icon A1. What is Icon? Icon is a very high level general-purpose programming language with extensive features for processing strings (text) and data structures. Icon is an imperative, procedural language with a syntax that is reminiscent of C and Pascal, but with semantics at a much higher level. Icon has a novel expression-evaluation mechanism that integrates goal-directed evaluation and backtracking with conventional control structures. It has a string scanning facility for pattern matching that avoids the tedious details usually associated with analyzing strings. Icon's built-in data structures include sets and tables with associative lookup, lists that can be used as vectors or stacks and queues, and records. Icon is a strongly, though not statically, typed language. It provides transparent automatic type conversion: For example, if an integer is used in an operation that requires a string, the integer is automatically converted to a string. Several implementations of Icon have high-level graphics facilities with an easily programmed window interface. Icon manages storage automatically. Objects are created as needed during program execution and space is reclaimed by garbage collection as needed. The sizes of strings and data structures are limited only by the amount of available memory. A2. What is Icon good for? As a general-purpose programming language with a large computational repertoire, Icon can be used for most programming tasks. It's especially strong at building software tools, for processing text, and for experimental and research applications. Icon is designed to make programming easy; it emphasizes the value of programmer's time and the importance of getting programs to work quickly. Consequently, Icon is used both for short, one-shot tasks and for very complex applications. A3. What are Icon's distinguishing characteristics? * A high-level, general-purpose programming language * Friendly line-oriented syntax (no semicolons needed) * Emphasis on programmer productivity * Usually interpreted * Evolved from programming languages (vs. scripting languages) * Procedural control flow plus generators and goal-directed evaluation * Values have types; variables are typeless, accept any value * Static scoping: global or (procedure) local * Automatic garbage collection * All integers have arbitrary precision * Uses strings (not chars) as basic text datatype * Has lists that function as arrays, queues, and stacks * Also has sets, tables, records (structs), reals (doubles), more * No second-class "primitive types" * Not "object-oriented" (no classes, inheritance, or instance methods) * No exception catching * No concurrency (no threads, monitors, semaphores, or synchronization) * Has co-expressions (coroutines) * Basic least-common-denominator system interface (a la ANSI C) * Procedural graphics (event-driven paradigm available but not mandated) * Retained windows (programs are never called to repaint) * Simple GUI builder that can re-edit its generated code * Turtle graphics package * Large library of contributed procedures and programs A4. What is the Icon program library? The library is a collection of programs and procedures written in Icon. User contributions are welcome and form a significant portion of the library. Library procedures effectively augment the built-in functions available to an Icon program. A wide variety of procedures currently exists, and most graphically-based programs are built around library procedures. The programs in the library range from simple demonstrations to handy tools to complex graphical applications. The library is a resource for both new and experienced programmers. In addition to their basic utility, its programs and procedures serve as examples of how things can be written in Icon. A5. Where can I learn more about Icon? Here are some good places to start. * Ralph Griswold's overview: www.cs.arizona.edu/icon/docs/ipd266.htm * Dave Hanson's introduction: www.cs.arizona.edu/icon/intro.htm * John Shipman's tutorial: www.nmt.edu/tcc/help/lang/icon A6. How about comprehensive documentation? Two books define the Icon language. The core language is covered in The Icon Programming Language (third edition), by Griswold and Griswold. Graphics facilities are described in Graphics Programming in Icon by Griswold, Jeffery, and Townsend. These books contain both tutorial and reference material. Icon's internals are detailed in The Implementation of the Icon Programming Language by Griswold and Griswold. Although considerable changes have occurred since Version 6, described in the book, the basic structure of Icon remains the same. Two technical reports, IPD112 and IPD239, describe subsequent changes. The Language and Graphics books are available from RTC Books (www.rtcbooks.com, search for "Icon") or from Jeffery Systems (www.zianet.com/jeffery/books). The Language and Implementation books can be downloaded at no charge from the Icon books page, www.cs.arizona.edu/icon/books.htm. The Icon Programming Language Handbook, by Thomas W. Christopher, is available on the web at www.toolsofcomputing.com/IconHandbook. There is a large amount of additional information at the Icon web site, www.cs.arizona.edu/icon. _________________________________________________________________ Implementations B1. What platforms support Icon? Current implementations with graphics support are available for Unix and Windows. On the Apple Macintosh, Icon runs in the Unix development environment of MacOS X, with graphics using XFree86. Older versions of Icon are available for some other systems. An alternative Java-based implementation for Unix, Jcon, is also available. B2. How do I get started with Icon? Version 9.4.1 of Icon for Unix can be downloaded from www.cs.arizona.edu/icon/v941. Source and binary packages are available, each with the complete Icon program library. Version 9.3 of Icon for Windows is compatible at the source level with version 9.4.1. It can be downloaded from www.cs.arizona.edu/icon/v93w.htm. The Version 9.4.1 library can be obtained separately from www.cs.arizona.edu/icon/v941. For older implementations, start at www.cs.arizona.edu/icon/implver.htm. Jcon is at www.cs.arizona.edu/icon/jcon. B3. Is there a Unicode version of Icon? No. Icon is defined in terms of 8-bit characters, and changing this presents several design challenges that would likely break existing programs. Also, modifying the C implementation is probably infeasible, but a Unicode version of Jcon might be possible. B4. What happened to the compiler? For a while, Unix distributions included both an interpreter and a compiler; but the interpreter is is usually fast enough even for production work, and most people found that using the compiler wasn't worth the extra compilation time or the hassles involved. We no longer advertise the compiler or produce binaries for it. It is still part of the source code distribution, and we have not deliberately broken it, but we no longer support it and we cannot offer help if problems arise. _________________________________________________________________ Administration C1. What is the Icon Project? The Icon Project is a name used by the group that distributes and supports the Icon programming language. The project maintains the Icon web site at www.cs.arizona.edu/icon. A non-commercial organization, the project is supported by the Department of Computer Science at the University of Arizona. C2. How often is the on-line material updated? New material is added when it's available. Established implementations usually are updated only when there's a new version. This typically is every year or two. The Icon program library is updated on a similar schedule. C3. Where did Icon come from? Icon is the latest in a series of high-level programming languages designed to facilitate programming tasks involving strings and structures. The original language, SNOBOL, was developed at Bell Telephone Laboratories in the early 1960s. SNOBOL evolved into SNOBOL4, which is still in use. Subsequent languages were developed at the University of Arizona with support from the National Science Foundation. Although it has similar objectives and many similar capabilities, Icon bears little superficial resemblance to SNOBOL4. Icon implementations were developed by faculty, staff, and students at the University of Arizona, with significant contributions from volunteers around the world. An Icon history by Ralph and Madge Griswold appears in the preprints of the second History of Programming Languages Conference (HOPL-II), ACM SIGPLAN Notices, March 1993 (Vol 28, No 3). The name Icon is not an acronym, nor does it stand for anything in particular, although the word iconoclastic was mentioned when the name was chosen. The name predates the now common use of icon to refer to small images used in graphical user interfaces. This sometimes misleads people into thinking that that Icon is designed to create or manipulate icons, but there's no good solution to that problem. C4. Where is Icon going? We continue to use Icon on a daily basis, but no significant changes are planned. We expect to support the Unix version for the forseeable future, and to distribute ports to other systems as supplied by volunteers. The Unicon project is developing an object-oriented language based on Icon. For more information, see unicon.sourceforge.net. An earlier object-oriented extension to Icon, Idol, can be found in the Icon program library. _________________________________________________________________ Support D1. Is there a users' group for Icon? There is no official Icon users' group, but The Icon Project maintains a moderated "Icon-group" electronic mailing list. To subscribe (or unsubscribe), send a message to icon-group-request@cs.arizona.edu. There is a gateway between Icon-group and comp.lang.icon, an unmoderated newsgroup for discussing issues related to Icon. The gateway, which exchanges messages between the two systems, is imperfect and not under the control of the Icon Project. The newsgroup generally provides faster response than the mailing list and is less intrusive, but it sometimes suffers from inappropriate postings. The Icon Project usually sends its announcements and other messages to the mailing list. D2. How do I get technical support? The Icon Project is not a commercial organization, and its capacity for providing technical support is limited. Please use the appropriate resource when you need assistance: * For programming assistance, submit a query to the mailing list or newsgroup (see above). * For porting assistance or Unix problems, contact icon-project@cs.arizona.edu. * For problems with the Windows implementation, contact the implementor, jeffery@cs.nmsu.edu. * For general information and additional documentation, visit the Icon web site: www.cs.arizona.edu/icon. _________________________________________________________________ Programming E1. Why doesn't read() work with every? every s := read() do {...} doesn't loop because read() produces a single value and then fails if resumed. Other "consumer" procedures such as get() and pop() work the same way. Use a while loop with these procedures, and save every for use with generators such as !x or key(T). E2. Why doesn't string invocation such as "foo"() work? String invocation works if the procedure is present; the catch is that the linker removes unreferenced procedures. To ensure a procedure's presence, reference it in the main() procedure. A simple reference suffices, as in refs := [foo, bar, baz]; it's not necessary to actually call it. (Why does the linker remove unreferenced procedures? Because this can save huge amounts of memory for programs that use the library.) E3. How can I call a C function? You can't call an arbitrary C function, but if you're willing to write a function to Icon's specifications, there are two approaches. Under Unix, which provides loadfunc(), you can load one or more functions from a shared library, and then treat them as if they had been written in Icon. Some examples can be found in the cfuncs and packs/loadfuncs directories of the Icon program library. The more cumbersome approach is to add code to the Icon interpreter and rebuild it; some hooks are provided for this purpose. Both approaches are discussed in Calling C Functions from Icon, www.cs.arizona.edu/icon/docs/ipd240.htm. The Jcon implementation allows Icon programs to call Java code that is written to Jcon specifications. E4. Can I open a bidirectional pipe? No, this is not possible. Although the concept is simple -- write a line to a program via a pipe, then read that program's output -- it probably wouldn't work. Most I/O libraries don't write anything to a pipe until they've filled a buffer, and the most likely consequence would be a deadlock, with each program waiting for the other to send more data. _________________________________________________________________ This FAQ is edited by Gregg Townsend. It includes contributions from Ralph Griswold, Cliff Hathaway, Clint Jeffery, Bob Alexander, and Todd Proebsting. From icon-group-sender Fri Jan 24 12:47:50 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h0OJjUA16524 for icon-group-addresses; Fri, 24 Jan 2003 12:45:30 -0700 (MST) Message-Id: <200301241945.h0OJjUA16524@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: The shortest Icon program X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Fri, 24 Jan 2003 17:20:15 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Here's an oldie-but-goody I ran across in a back issue of the Icon Analyst the other day: what is the shortest complete Icon program? That is, what is the shortest Icon source file that can be compiled, linked and run? I'll give you a hint: the answer is NOT the following: procedure main() end From icon-group-sender Fri Jan 24 16:22:17 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h0ONM0I23530 for icon-group-addresses; Fri, 24 Jan 2003 16:22:00 -0700 (MST) Message-Id: <200301242322.h0ONM0I23530@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: The shortest Icon program From: Steve Wampler To: "Frank J. Lhota" Cc: icon-group@cs.arizona.edu Date: 24 Jan 2003 13:47:12 -0700 Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Fri, 2003-01-24 at 10:20, Frank J. Lhota wrote: > Here's an oldie-but-goody I ran across in a back issue of the Icon Analyst > the other day: what is the shortest complete Icon program? That is, what is > the shortest Icon source file that can be compiled, linked and run? I'll > give you a hint: the answer is NOT the following: > > procedure main() > end I've got one that's 14 characters - but I think I remember that issue of the Analyst! -- Steve Wampler National Solar Observatory From icon-group-sender Tue Jan 28 07:54:06 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h0SEqtc21912 for icon-group-addresses; Tue, 28 Jan 2003 07:52:55 -0700 (MST) Message-Id: <200301281452.h0SEqtc21912@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com Date: Mon, 27 Jan 2003 22:56:07 -0700 To: icon-group@cs.arizona.edu From: "William H. Mitchell" Subject: Good test question Errors-To: icon-group-errors@cs.arizona.edu Status: RO Here's something I'd never thought about before: 1 to 2 to 3 to 4 Maybe throw in 'by 1 to 2' in a couple of places to make it really interesting! From icon-group-sender Tue Feb 4 12:55:29 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h14JrQO23165 for icon-group-addresses; Tue, 4 Feb 2003 12:53:26 -0700 (MST) Message-Id: <200302041953.h14JrQO23165@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Time to replace wincap? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Tue, 04 Feb 2003 19:44:33 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO On the Unicon list, there has been a discussion of the use of the wincap package. This package, available as a download from Microsoft, is used to read / write bitmap files for the MS Windows implementations of the Icon runtime. This started with the question as to whether there was any copyright problem with wincap. I worked with the wincap code while porting Icon to Cygwin, and this work exposed another reason to replace wincap. Wincap was written in 1991 for Win 3.x, and it now contains many anachronisms. - The wincap file I/O uses the pre-handle file API. - They include routines for reading / writing data in blocks larger than 0xFFFF, a problem that does not exist with the Win32 API. - The DIB handles are actually based on Win16 memory handles, a feature that has been seriously depreciated in Win32. Out of curiosity, I tried building the full wincap application with MSVC++ 6.0, and failed! Apparently, the makefile that MS wrote for wincap includes command line switches that are no longer supported. A search for a more up-to-date replacement for wincap would therefore be worthwhile, copyright issues aside. From icon-group-sender Wed Feb 5 08:08:10 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h15F6rO01384 for icon-group-addresses; Wed, 5 Feb 2003 08:06:53 -0700 (MST) Message-Id: <200302051506.h15F6rO01384@baskerville.CS.Arizona.EDU> Date: Tue, 4 Feb 2003 20:41:03 -0700 From: Clint Jeffery To: lhota.adarose@verizon.net CC: unicon-group@lists.sourceforge.net, icon-group@cs.arizona.edu Subject: Re: [Unicon-group] wincap legal status (!) Errors-To: icon-group-errors@cs.arizona.edu Status: RO [Frank has recently voiced his support for removing wincap from the Icon and Unicon source code bases.] One piece of information I'll add to Frank's comments is: Icon and Unicon use a tiny part of the wincap subdirectory, just the .bmp reading and writing code. The Icon and Unicon sources do include a makefile sufficient for building the wincap object files necessary to build Icon/Unicon on MSVC++ 6.0, but Frank's observation is correct that the makefile rules for building a working executable wincap demo are out of date and VC++ is not backward compatible to the extent needed to build the executables. I searched on the net and found several pages that purported to document the .bmp format, and some non-wincap sample code, but haven't seen something that explicitly placed itself in the public domain or under an open source license. To get rid of wincap, we need free .bmp read/writing code, or else we need to write our own. From the specs, it appears .bmp is an "easy" format, so if someone wants to write the code for it, it will be pretty easy for us to get rid of wincap. If anyone wants to help with this, I am all in favor of Frank's suggestion. Wincap does have some other capabilities that would be nice to add to the Windows versions of Icon and Unicon, like the ability to print images, but we aren't making use of them at present. Clint jeffery@cs.nmsu.edu From icon-group-sender Wed Feb 5 13:41:04 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h15KedH13110 for icon-group-addresses; Wed, 5 Feb 2003 13:40:39 -0700 (MST) Message-Id: <200302052040.h15KedH13110@baskerville.CS.Arizona.EDU> Date: Wed, 5 Feb 2003 10:58:04 -0700 (MST) From: Gregg Townsend To: icon-group Subject: Re: Time to replace wincap? Errors-To: icon-group-errors@cs.arizona.edu Status: RO For Icon, I'm satisfied that the version in the Cygwin port is okay from a copyright standpoint, and I don't see a compelling need to replace it. Yes, it's old and creaky, but reading and writing .BMP files is not central to Icon's features. --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Wed Feb 5 13:42:28 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h15KgRE13194 for icon-group-addresses; Wed, 5 Feb 2003 13:42:27 -0700 (MST) Message-Id: <200302052042.h15KgRE13194@baskerville.CS.Arizona.EDU> Date: Wed, 5 Feb 2003 18:12:21 +0000 (GMT) From: Hugh Sasse Staff Elec Eng X-X-Sender: hgs@neelix To: Clint Jeffery cc: lhota.adarose@verizon.net, unicon-group@lists.sourceforge.net, icon-group@cs.arizona.edu Subject: Re: [Unicon-group] wincap legal status (!) X-MailScanner: Found to be clean Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Tue, 4 Feb 2003, Clint Jeffery wrote: > I searched on the net and found several pages that purported to document > the .bmp format, and some non-wincap sample code, but haven't seen something > that explicitly placed itself in the public domain or under an open source > license. To get rid of wincap, we need free .bmp read/writing code, or else Apparently The GIMP (GNU Image Manipulation Program) has some support for bmp: http://www.gimp.org/the_gimp_about.html I have not used it yet, so can't comment further. > > Clint jeffery@cs.nmsu.edu > Hugh > From icon-group-sender Tue Feb 11 07:28:22 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1BER8H22413 for icon-group-addresses; Tue, 11 Feb 2003 07:27:08 -0700 (MST) Message-Id: <200302111427.h1BER8H22413@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: data values Date: Mon, 10 Feb 2003 17:42:19 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO "The Implementation of the Icon programming language" is available for free download at the Icon website. In the Preface it is mentioned that one of the target audiences could be ordinary computer users who might have an interest in Icon, therefore it might be worthwhile to discuss its contents in a public newsgroup, where different viewpoints on such a clear and evident fundamental text can help further the understanding of more experienced users or encourage those like myself who have in fact no other means available to further an understanding of, and clear up confusions related to, the study before us. Anyway, in Chapter 2, page 9, there appears that, "A source-language file is a data value that provides an interface between the program and a data file in the environment in which the program executes". Considering that source-language files are what programs are made from, the previous statement is unclear in that it states that a source language file provides an interface between things that it has not yet created. Would it not be clearer to say that such a file creates a data file in the environment, which is then used by the program? From icon-group-sender Tue Feb 11 07:28:42 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1BESeB22448 for icon-group-addresses; Tue, 11 Feb 2003 07:28:40 -0700 (MST) Message-Id: <200302111428.h1BESeB22448@baskerville.CS.Arizona.EDU> From: gmt@cs.arizona.edu (Gregg Townsend) X-Newsgroups: comp.lang.icon Subject: Re: data values Date: 10 Feb 2003 22:15:03 -0700 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO > [In the implementation book,] in Chapter 2, page 9, there appears that, > "A source-language file is a data value that provides an interface > between the program and a data file in the environment in which the > program executes". I had to read that one over several times in context to figure it out. Noting that the preceding and following paragraphs talk about the null value and about procedure values, I'd paraphrase it to mean: There is also a data type that is known as a "file" in the source language. It is used for reading and writing (interfacing) data files in the program's execution environment. --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Tue Feb 11 16:44:11 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1BNi8b17345 for icon-group-addresses; Tue, 11 Feb 2003 16:44:08 -0700 (MST) Message-Id: <200302112344.h1BNi8b17345@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: data values Date: Tue, 11 Feb 2003 17:02:34 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO ernobe wrote: > > [In the implementation book,] in Chapter 2, page 17, there appears that, > "Except in such specific situations, expressions are not bounded". The > specific situations mentioned are the if-clause and the control clauses > of loops. The confusion here is that the if expressions and loops are > also themselves expressions, and when they do not appear as arguments to > other expressions they are bounded. The previous mention of unbounded > expressions referred to them as arguments to be evaluated (p.16) which > was seen to resemble a logical conjunction (p.15). All of which leads > us to the conclusion that a clearer statement than the one cited would > be "Except in such specific situations, logical expressions are not > bounded." > > The whole section immediately following, entitled "Data Backtracking" might as well be paraphrased as "There is such a thing as data backtracking". Would it be right to conclude from it that the success of expressions in a logical conjunction does not depend on the success of the final expression, while the success of the conjunction as a whole does? From icon-group-sender Tue Feb 11 16:44:02 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1BNfU917274 for icon-group-addresses; Tue, 11 Feb 2003 16:41:30 -0700 (MST) Message-Id: <200302112341.h1BNfU917274@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: data values Date: Tue, 11 Feb 2003 15:34:38 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO [In the implementation book,] in Chapter 2, page 17, there appears that, "Except in such specific situations, expressions are not bounded". The specific situations mentioned are the if-clause and the control clauses of loops. The confusion here is that the if expressions and loops are also themselves expressions, and when they do not appear as arguments to other expressions they are bounded. The previous mention of unbounded expressions referred to them as arguments to be evaluated (p.16) which was seen to resemble a logical conjunction (p.15). All of which leads us to the conclusion that a clearer statement than the one cited would be "Except in such specific situations, logical expressions are not bounded." From icon-group-sender Tue Feb 11 16:44:20 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1BNiHh17369 for icon-group-addresses; Tue, 11 Feb 2003 16:44:17 -0700 (MST) Message-Id: <200302112344.h1BNiHh17369@baskerville.CS.Arizona.EDU> From: "Andrew Hamm" X-Newsgroups: comp.lang.icon Subject: Re: data values Date: Wed, 12 Feb 2003 10:24:36 +1100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO ernobe wrote: > [In the implementation book,] in Chapter 2, page 17, there appears > that, "Except in such specific situations, expressions are not > bounded". The specific situations mentioned are the if-clause and > the control clauses of loops. The confusion here is that the if > expressions and loops are also themselves expressions, and when they > do not appear as arguments to other expressions they are bounded. That's because all individual statements bound by either ; or an implicit ; are also bounded expressions. -- There's nowt wrong wi' owt what mitherin' clutterbucks don't barly grummit! - Replies directly to this message will go to an account that may not be checked for a week or two. For more timely e-mail response, use (only in an emergency) ahamm sanderson net au with all the usual punctuation. From icon-group-sender Wed Feb 12 08:13:31 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1CFDUh14835 for icon-group-addresses; Wed, 12 Feb 2003 08:13:30 -0700 (MST) Message-Id: <200302121513.h1CFDUh14835@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Wed, 12 Feb 2003 01:15:06 -0700 To: ernobe From: "William H. Mitchell" Subject: Re: data values Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO At 05:02 PM 2/11/03 -0600, ernobe wrote: >> >The whole section immediately following, entitled "Data Backtracking" >might as well be paraphrased as "There is such a thing as data >backtracking". Would it be right to conclude from it that the success >of expressions in a logical conjunction does not depend on the success >of the final expression, while the success of the conjunction as a whole >does? It sounds like you've got the right understanding about that. An important thing to understand about the "&" is that it is simply a trivial operator. If it weren't in the language, you could mimic it with this procedure: procedure and(e1, e2) return e2 end Instead of 'x < 10 & y < 20', you might write 'and(x < 10, y < 20)'. In both cases, if x < 10 fails, y < 20 is never evaluated. The underlying principle is that if an evaluation of an operand (or argument) fails, the operator (or procedure) is never called. Likewise, in '(x < 10) + (y < 20)', if x < 10 fails, the second comparison and the addition are just never done. I point out to students that in a conventional language implementation of logical conjunction and logical disjunction is pretty similar. In Icon, implementation of the analagous elements, & and |, are at opposite ends of the difficulty spectrum. From icon-group-sender Wed Feb 12 08:13:21 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1CFDKf14816 for icon-group-addresses; Wed, 12 Feb 2003 08:13:20 -0700 (MST) Message-Id: <200302121513.h1CFDKf14816@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Wed, 12 Feb 2003 01:00:58 -0700 To: ernobe From: "William H. Mitchell" Subject: Re: data values (and bounded expressions) Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO There's a good discussion of bounded expressions on 90-92 in "The Icon Programming Language", on the website. The key point is that if an expression is bounded and it produces a result, all/any suspended generators in the expression are discarded. You can find a somewhat different explanation of the topic in some slides for an Icon class I'm currently teaching. Here's the URL for that growing set of slides: http://www.cs.arizona.edu/classes/cs451/icon.pdf. See slide 72 and following. NOTE that the PDF was generated with WordPerfect and some browser plug-ins blow up on it. If so, download it and then view it as a file. At 03:34 PM 2/11/03 -0600, ernobe wrote: > >[In the implementation book,] in Chapter 2, page 17, there appears that, >"Except in such specific situations, expressions are not bounded". The >specific situations mentioned are the if-clause and the control clauses >of loops. The confusion here is that the if expressions and loops are >also themselves expressions, and when they do not appear as arguments to >other expressions they are bounded. The previous mention of unbounded >expressions referred to them as arguments to be evaluated (p.16) which >was seen to resemble a logical conjunction (p.15). All of which leads >us to the conclusion that a clearer statement than the one cited would >be "Except in such specific situations, logical expressions are not >bounded." From icon-group-sender Wed Feb 12 08:12:35 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1CFCAE14778 for icon-group-addresses; Wed, 12 Feb 2003 08:12:10 -0700 (MST) Message-Id: <200302121512.h1CFCAE14778@baskerville.CS.Arizona.EDU> From: "Andrew Hamm" X-Newsgroups: comp.lang.icon Subject: Re: data values Date: Wed, 12 Feb 2003 10:28:04 +1100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO ernobe wrote: > > The whole section immediately following, entitled "Data Backtracking" > might as well be paraphrased as "There is such a thing as data > backtracking". Would it be right to conclude from it that the success > of expressions in a logical conjunction does not depend on the success > of the final expression, while the success of the conjunction as a > whole does? The success of the entire conjunction depends on the success of all the parts. If a "deeper" part fails, then the earlier parts are resumed to squeeze out another possible result. If deeper parts keep failing, then ultimately the earlier parts are driven to the point of their own failure, so another backtrack happens. This can happen all the way back, until maybe the first part also runs out of results, so then they have all failed in one way or the other. -- There's nowt wrong wi' owt what mitherin' clutterbucks don't barly grummit! - Replies directly to this message will go to an account that may not be checked for a week or two. For more timely e-mail response, use (only in an emergency) ahamm sanderson net au with all the usual punctuation. From icon-group-sender Thu Feb 13 12:48:39 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1DJk4k07502 for icon-group-addresses; Thu, 13 Feb 2003 12:46:04 -0700 (MST) Message-Id: <200302131946.h1DJk4k07502@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: data values Date: Thu, 13 Feb 2003 09:54:48 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO > The whole section immediately following, entitled "Data Backtracking" > might as well be paraphrased as "There is such a thing as data > backtracking". Would it be right to conclude from it that the success > of expressions in a logical conjunction does not depend on the success > of the final expression, while the success of the conjunction as a whole > does? >From p.30, "Arguments are not dereferenced until all of them have been evaluated." Does that mean that if an argument fails no dereferencing in any of the arguments succeeds? In that case the section entitled "Data Backtracking" could benefit with a line like "If an argument in a logical conjunction fails, no operations requiring dereferencing succeed." From icon-group-sender Thu Feb 13 12:50:04 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1DJo2E07641 for icon-group-addresses; Thu, 13 Feb 2003 12:50:02 -0700 (MST) Message-Id: <200302131950.h1DJo2E07641@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: data values Date: Thu, 13 Feb 2003 13:39:57 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO In the first paragraph of section 4.3, on page 53, "Variables for identifiers point to descriptors for the corresponding values." Isn't an identifier practically synonymous with a variable? What sort of variables is the text referring to as "variables for identifiers"? From icon-group-sender Thu Feb 20 13:16:39 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1KKCIg23624 for icon-group-addresses; Thu, 20 Feb 2003 13:12:18 -0700 (MST) Message-Id: <200302202012.h1KKCIg23624@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Simplifying Integer Arithmetic X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Thu, 20 Feb 2003 15:50:57 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO For the most part, basic integer arithmetic is quite straightforward. There is, however, one non-trivial issue in this area: when integer division does not produce an integer, how do we round the result? For example 5 / (-3) is between -2 and -1. Do we round 5 / (-3) to -2 or to -1? Note that the integer "%" operator depends on how this rounding is done, since there is a requirement that in the absence of arithmetic errors, we should have a = b * ( a / b ) + a % b for integers a and b. One method of rounding is to round towards minus infinity, that is, whenever an integer division result is not an integer, round to the next smallest integer. With the "round towards minus infinity" approach, we would have the following results: 5 / 3 = 1 & 5 % 3 = 2 (-5) / 3 = -2 & (-5) % 3 = 1 5 / (-3) = -2 & 5 % (-3) = -1 (-5) / (-3) = 1 & (-5) % (-3) = -2 Another method of rounding to round towards 0, that is, always round a non-integer division result to the nearest integer that has a smaller absolute value. With the "round towards 0" approach, we would have 5 / 3 = 1 & 5 % 3 = 2 (-5) / 3 = -1 & (-5) % 3 = -2 5 / (-3) = -1 & 5 % (-3) = 2 (-5) / (-3) = 1 & (-5) % (-3) = -2 C, as defined by K&R, can use either the "round towards minus infinity" or the "round towards 0" method for integer division. The first ANSI standard also does not specify the rounding method to be used for integer division. Throughout the 80's and 90's, C programmers were warned that the rounding method used for integer division and remainders were platform specific. Icon used to equally imprecise about how round is done for the "/" and "%". Originally, the rounding method used for Icon was the same as the C compiler used to implement it. This was reasonably acceptable until large integers were added. The large integer routines for division and modulus always round towards 0, irrespective of how the C compiler handles its integers. For a brief time, the rounding method used for Icon integer "/" and "%" operations depended both on the platform and on whether the integers were large integers. This was clearly unacceptable. The Icon source file "runtime/rmisc.r" contains functions used for performing integer arithmetic with overflow checking. As part of a general fix of the Icon overflow check facilities, the overflow check functions for integer "/" and "%" operations were modified so that they always rounded to 0, irrespective of C compiler rounding method. With this change, Icon always rounds to 0 for all integer arithmetic on all platforms. Since this work was done, however, the C99 standard has come out. This standard finally mandates how C compilers must perform integer division and modulus operations. A C99 compliant compiler must round towards 0 when evaluating a / b for integer a and b. I know of no currently used C compiler that does not round towards 0 for these operations. The question I pose to this group is whether we should assume that any C compiler used for Icon uses the "round towards 0" method for evaluating a / b and a % b for integers a and b. Given this assumption, we could simplify the div3 and mod3 functions in "runtime/rmisc.r" as follows: /* * mod3 - integer modulo with overflow checking (always rounds to 0) */ word mod3(a, b) word a, b; { word retval; switch ( b ) { case 0: over_flow = 1; /* Not really an overflow, but definitely an error */ return 0; case -1: /* Handle this separately, since -MinLong%-1 can overflow */ retval = 0; break; default: retval = a % b; break; } over_flow = 0; return retval; } /* * div3 - integer divide with overflow checking (always rounds to 0) */ word div3(a, b) word a, b; { if ( ( b == 0 ) || /* Not really an overflow, but definitely an error */ ( b == -1 && a == MinLong ) ) { over_flow = 1; return 0; } over_flow = 0; return a / b; } From icon-group-sender Thu Feb 20 13:31:58 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1KKSwc05373 for icon-group-addresses; Thu, 20 Feb 2003 13:28:58 -0700 (MST) Message-Id: <200302202028.h1KKSwc05373@baskerville.CS.Arizona.EDU> From: Patrick Scheible X-Newsgroups: comp.lang.icon Subject: Re: Simplifying Integer Arithmetic Date: 20 Feb 2003 17:28:32 GMT X-Newsreader: Gnus v5.3/Emacs 19.34 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO "Frank J. Lhota" writes: > The question I pose to this group is whether we should assume that any C > compiler used for Icon uses the "round towards 0" method for evaluating a / > b and a % b for integers a and b. Given this assumption, we could simplify > the div3 and mod3 functions in "runtime/rmisc.r" as follows: I would suggest not making any assumptions about which C compilers people may use at some point, especially since the work of making Icon round towards 0 regardless of the C compiler's behavior has already been done. Who knows what strange platforms someone may wish to port Icon to at some point? However, I have not done a survey of whether there are any C compilers that do not round towards 0. (Maybe the nice people in comp.lang.c happen to know?) -- Patrick From icon-group-sender Tue Feb 25 13:09:29 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1PK8R213037 for icon-group-addresses; Tue, 25 Feb 2003 13:08:27 -0700 (MST) Message-Id: <200302252008.h1PK8R213037@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Icon and QubeOS Date: Tue, 25 Feb 2003 09:17:41 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO The QubeOS is a multiplatform desktop that fits into less than 700 Kb. Compiling programs for it requires a new approach to object orientation, described by its creator as 'object routing' and low-level API. A multiplatform desktop is all a new computer user needs to hook up to the internet and download the software he'll need for his system. The new programming paradigm behind it is meant to bridge the gap between the ones current but requires a new programming language. And I think Icon is it. Currently I'm exploring the possibility of reproducing the functionality of Icons functions in Forth, particularly the success/failure mechanism. The result would be an Icon like language for programming, but with the added low-level access of Forth. The reason Forth has not developed a low level API of its own is due mostly to extraneous demands on it from the software industry. Anyway, as a first step in this direction it would be useful to have an Icon port to Qube. I encourage those more familiar with C to explore such a possibility. Here's the QubeOS website where you can download the whole SDK package for free ( a djgpp compiler with the Qube include files ): http://www.interactivestudio.sk/index2_en.htm -- my esoteric links: http://www.costarricense.cr/pagina/ernobe From icon-group-sender Thu Feb 27 12:24:36 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1RJNMc10038 for icon-group-addresses; Thu, 27 Feb 2003 12:23:22 -0700 (MST) Message-Id: <200302271923.h1RJNMc10038@baskerville.CS.Arizona.EDU> Subject: Help with high level guidance on text searching algorithms To: icon-group@cs.arizona.edu From: "David Gamey" Date: Thu, 27 Feb 2003 10:34:33 -0500 X-MIMETrack: Serialize by Router on D01ML391/01/M/IBM(Release 5.0.11 +SPRs MIAS5EXFG4, MIAS5AUFPV and DHAG4Y6R7W, MATTEST |November 8th, 2002) at 02/27/2003 10:33:54 AM Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hi all, I've been checking some links for different algorithms and how they apply to different problems. They field has really exploded since the last time I looked in detail. A quick poke about in the IPL didn't turn up anything. I did find lots of detailed links (off the agrep site) but I really want to see the forest (not the trees, branches and roots) right now. Perhaps someone could give me a pointer or two. The problem I'm looking at is related to searching through sets of text looking for commonality (substrings not patterns - although that would be of secondary interest). I'm not looking for optimal or minimal sets of substrings but relatively good matches. Given a set of messages, I'd like to be able to categorize them into sets that share common characteristics - probable this, probable that. This has to be similar to things like search engines and spam filters do. Thanks, in advance. David From icon-group-sender Fri Feb 28 12:28:03 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h1SJQ6Q22581 for icon-group-addresses; Fri, 28 Feb 2003 12:26:06 -0700 (MST) Message-Id: <200302281926.h1SJQ6Q22581@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: GUI Front End for icont X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Fri, 28 Feb 2003 18:37:31 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO In some previous versions of Icon for MS Windows, there were two separate sets of Icon tools: one for command line interface (CLI) applications, and one for Graphic User Interface (GUI) applications: - For CLI applications, the Icon compiler was called "nticont.exe", and it used "nticonx.exe"as the interpreter; and - For GUI applications, the Icon compiler was called "wicont.exe", and it used "wiconx.exe" as the interpreter. Needless to say, the need for the source files to support both sets of tools requires lots of MS Win-specific code, creating a maintenance nightmare. As a result, the Windows port of Icon has lagged behind ports on other platforms. I considered this approach unnecessarily complex, so a while back I worked on having one set of tools that could be used to build and run both CLI and GUI applications. To accomplish this, I ported the Unix Icon code to the Cygwin compiler, keeping the MS Windows code for the graphics facility. The result of this effort is a icont / iconx pair that can be used to compile and execute Icon applications that use CLI, GUI, or both. On the one hand, this port was extremely successful. The Cygwin version of Icon is much closer to Icon on other platforms, and the number of source code differences between Unix Icon and MS Icon has been significantly diminished. On the other hand, there is something that has been lost in this process. The MS Windows version of the Icon compiler for developing GUI application used to be a GUI application itself. This is not the case with the Cygwin version of icont. Of course, one way we could get back a GUI for compiling and linking Icon programs is to develop a GUI front end for the CLI version of icont. In a sense, that is what Microsoft does with its compilers. For all the fancy features of Visual C++, when the GUI actually compiles a C/C++ file, it simply runs the CLI tool CL.EXE with the appropriate arguments. Presumably, this could also be done with icont. One could develop the GUI front end using C / C++ and the Win32 API, but if we do this, the GUI would only live on the MS Windows platform. A more portable approach is possible: why not develop the GUI front end in Icon? By doing so, the GUI front end can be ported to any platform where Icon supports graphics. So, is the Icon graphics facility up to the challenge of the GUI front end? From icon-group-sender Mon Mar 3 08:08:35 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h23F79w16439 for icon-group-addresses; Mon, 3 Mar 2003 08:07:09 -0700 (MST) Message-Id: <200303031507.h23F79w16439@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: GUI Front End for icont Date: Sat, 01 Mar 2003 16:35:19 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Frank J. Lhota wrote: > In some previous versions of Icon for MS Windows, there were two separate > sets of Icon tools: one for command line interface (CLI) applications, and > one for Graphic User Interface (GUI) applications: > > - For CLI applications, the Icon compiler was called "nticont.exe", and it > used "nticonx.exe"as the interpreter; and > - For GUI applications, the Icon compiler was called "wicont.exe", and it > used "wiconx.exe" as the interpreter. > > Needless to say, the need for the source files to support both sets of tools > requires lots of MS Win-specific code, creating a maintenance nightmare. As > a result, the Windows port of Icon has lagged behind ports on other > platforms. > > I considered this approach unnecessarily complex, so a while back I worked > on having one set of tools that could be used to build and run both CLI and > GUI applications. To accomplish this, I ported the Unix Icon code to the > Cygwin compiler, keeping the MS Windows code for the graphics facility. The > result of this effort is a icont / iconx pair that can be used to compile > and execute Icon applications that use CLI, GUI, or both. > > On the one hand, this port was extremely successful. The Cygwin version of > Icon is much closer to Icon on other platforms, and the number of source > code differences between Unix Icon and MS Icon has been significantly > diminished. On the other hand, there is something that has been lost in this > process. The MS Windows version of the Icon compiler for developing GUI > application used to be a GUI application itself. This is not the case with > the Cygwin version of icont. > > Of course, one way we could get back a GUI for compiling and linking Icon > programs is to develop a GUI front end for the CLI version of icont. Better yet, why not make a CLI for the Cygwin version of iconx? > In a > sense, that is what Microsoft does with its compilers. For all the fancy > features of Visual C++, when the GUI actually compiles a C/C++ file, it > simply runs the CLI tool CL.EXE with the appropriate arguments. Presumably, > this could also be done with icont. > > One could develop the GUI front end using C / C++ and the Win32 API, but if > we do this, the GUI would only live on the MS Windows platform. A more > portable approach is possible: why not develop the GUI front end in Icon? By > doing so, the GUI front end can be ported to any platform where Icon > supports graphics. > > So, is the Icon graphics facility up to the challenge of the GUI front end? > > From icon-group-sender Mon Mar 3 12:40:39 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h23JecQ25176 for icon-group-addresses; Mon, 3 Mar 2003 12:40:38 -0700 (MST) Message-Id: <200303031940.h23JecQ25176@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: GUI Front End for icont Date: Mon, 03 Mar 2003 12:54:58 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Frank J. Lhota wrote: > > Better yet, why not make a CLI for the Cygwin version of iconx? > > The iconx tool is the runtime interpreter for Icon programs. The Cygwin > version of iconx will handle CLI applications properly. As a result, I'm not > sure what you mean by "make a CLI for the Cygwin version of iconx". > What I had in mind was an application that would translate Icon functions as you write them, and then on command interpret them. The procedures that are written are automatically translated and kept for linking to other ones ( in ucode files ). It is like having an editor that is programmed to compile procedures as they are typed, and to recognize when they are called, as in a command line interface. One way to do this is that everything between 'procedure' and 'end' is compiled, and everything that is typed outside of it is checked to see if it corresponds to a procedure name, and then interpreted if it does. As a matter of fact, all Icon functions that are typed outside of procedure declarations could be automatically translated and interpreted. Since the Cygwin version combines the console and windows versions, standard output could be the editor itself where you are typing the program. -- my esoteric links: http://www.costarricense.cr/pagina/ernobe From icon-group-sender Mon Mar 3 12:40:06 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h23JdkU25119 for icon-group-addresses; Mon, 3 Mar 2003 12:39:46 -0700 (MST) Message-Id: <200303031939.h23JdkU25119@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Re: GUI Front End for icont X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Mon, 03 Mar 2003 17:34:20 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO > Better yet, why not make a CLI for the Cygwin version of iconx? The iconx tool is the runtime interpreter for Icon programs. The Cygwin version of iconx will handle CLI applications properly. As a result, I'm not sure what you mean by "make a CLI for the Cygwin version of iconx". From icon-group-sender Tue Mar 4 13:19:26 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h24KHoM29901 for icon-group-addresses; Tue, 4 Mar 2003 13:17:50 -0700 (MST) Message-Id: <200303042017.h24KHoM29901@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Re: GUI Front End for icont X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Tue, 04 Mar 2003 16:27:26 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO If I understand you correctly, what you are asking for is an interactive Icon interpreter, sort of like many early Basic development environments. That idea has a lot of merit, it would often be nice to try out an Icon expression and get immediate feedback. From icon-group-sender Mon Mar 10 07:36:32 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2AEXwk09485 for icon-group-addresses; Mon, 10 Mar 2003 07:33:58 -0700 (MST) Message-Id: <200303101433.h2AEXwk09485@baskerville.CS.Arizona.EDU> X-Sender: kazimir@chem.pmf.hr Date: Sat, 08 Mar 2003 18:05:10 +0100 To: icon-group@cs.arizona.edu From: "Majorinc, Kazimir" Subject: Do you think Icon is good choice for me? Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hello. I'm mathematician, working at the university in Croatia. I'm considering replacing C++ with some other PL and tool for my automated theorem proving project in next five years period. In that time I expect to write 20 000 lines of code or more, mostly operations on large lists, sets and generally complicated dynamic structures. I need simple and relatively high procedural language (less of OO elements - better it is). Speed of compilation and execution, GUI, interactivity, cooperation with other languages and OS, even portability are not an issue, but stability, lack of bugs, and efficient memory menagement in crunching big dynamic structures are. Good debugger is welcome, but not essential. At this moment Icon and it's Windows version by Jeffery seems as best choice for me, and I'm ready to start next week with that as my main tool. Everything I've find on Internet suggest me that Griswold and his collaborators made great job, and provided great tool and documentation to the world for free. However, I have no experience with Icon, neither I know someone who used it personaly, so I cannot be sure is it 'mature' tool, or it is still more of an experimental kind. I'd like to ask more experienced users: is it reliable enough, without hidden limitations in memory or code size, and unexpected bugs so I can be left with my problems and not with compiler bugs in next relatively long period of life and work. Or - shortly - would you, experienced Icon user, chose Icon or would you rather prefer some more popular tool for such task, and why? Thank you. -------------- Kazimir Majorinc, Zagreb, Croatia From icon-group-sender Mon Mar 10 12:42:22 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2AJfvg07855 for icon-group-addresses; Mon, 10 Mar 2003 12:41:57 -0700 (MST) Message-Id: <200303101941.h2AJfvg07855@baskerville.CS.Arizona.EDU> From: "jsampson-indexer" To: Subject: getch() Date: Mon, 10 Mar 2003 14:51:41 -0000 X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hello - I find that when running Icon in DOS mode on a Windows computer, getch() works as described if a program is compiled with icont but not if it is compiled with nticont (it does not wait for keyboard input). For nticont, is there a substitute for getch()? Regards _John Sampson_ From icon-group-sender Mon Mar 10 12:42:37 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2AJgaQ07875 for icon-group-addresses; Mon, 10 Mar 2003 12:42:36 -0700 (MST) Message-Id: <200303101942.h2AJgaQ07875@baskerville.CS.Arizona.EDU> Date: Mon, 10 Mar 2003 11:10:20 -0500 From: "Steve Graham" To: , Subject: Re: Do you think Icon is good choice for me? Content-Disposition: inline X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2AGB4612420 Errors-To: icon-group-errors@cs.arizona.edu Status: RO Kazimir, I consider myself a beginner/intermediate user as a reference. I've used Icon mostly for utilities at work. The largest program I remember writing was 944 lines/29KB. It performed in seconds a manual process that could take minutes to hours, so I and a co-worker were very pleased with the results. I sort of understand some of the Iconish features such as success/fail, generators, etc. Others I have not yet grasped. To comment on your list of concerns: . 20 000 lines of code or more - As I mentioned my largest was at least an order of magnitude less, so I don't know. . Operations on large lists, sets - Some of my lists and tables were quite large . Complicated dynamic structures - Mostly used lists and tables . Speed of compilation and execution - Took seconds . GUI - Hardly used it . Interactivity / Debugger - This is the area that for me personally was one of the biggest adjustments. I work as a MUMPS programmer. MUMPS is an interactive interpreter with list and table-like capabilities, built-in database and simple debugger (breakpoint, watchpoints). So, when I have a problem in it, I can set a breakpoint, run the program, have it break, and then single-step from there printing variable values as necessary. I missed that with Icon. . Stability - Have not had any problems . Lack of bugs - Have not had any problems . Efficient memory menagement in crunching big dynamic structures - Have not had any problems . Good debugger is welcome, but not essential - See above . Is it reliable enough - Worked for me . Hidden limitations in memory or code size, and unexpected bugs - No problems for me Another plus for me has been Icon's Pascal-like syntax, which made it easy to learn, despite not being a Pascal programmer (although I did a little bit for a class 20 years ago). I love Icon. Hope it works for you, too. Steve Graham === >>> "Majorinc, Kazimir" 03/08/03 11:05AM >>> Hello. I'm mathematician, working at the university in Croatia. I'm considering replacing C++ with some other PL and tool for my automated theorem proving project in next five years period. In that time I expect to write 20 000 lines of code or more, mostly operations on large lists, sets and generally complicated dynamic structures. I need simple and relatively high procedural language (less of OO elements - better it is). Speed of compilation and execution, GUI, interactivity, cooperation with other languages and OS, even portability are not an issue, but stability, lack of bugs, and efficient memory menagement in crunching big dynamic structures are. Good debugger is welcome, but not essential. At this moment Icon and it's Windows version by Jeffery seems as best choice for me, and I'm ready to start next week with that as my main tool. Everything I've find on Internet suggest me that Griswold and his collaborators made great job, and provided great tool and documentation to the world for free. However, I have no experience with Icon, neither I know someone who used it personaly, so I cannot be sure is it 'mature' tool, or it is still more of an experimental kind. I'd like to ask more experienced users: is it reliable enough, without hidden limitations in memory or code size, and unexpected bugs so I can be left with my problems and not with compiler bugs in next relatively long period of life and work. Or - shortly - would you, experienced Icon user, chose Icon or would you rather prefer some more popular tool for such task, and why? Thank you. -------------- Kazimir Majorinc, Zagreb, Croatia From icon-group-sender Mon Mar 10 16:38:50 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2ANcbQ25631 for icon-group-addresses; Mon, 10 Mar 2003 16:38:37 -0700 (MST) Message-Id: <200303102338.h2ANcbQ25631@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Mon, 10 Mar 2003 15:01:59 -0700 To: "Majorinc, Kazimir" From: "William H. Mitchell" Subject: Re: Do you think Icon is good choice for me? Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO I was involved with the Icon Project for nine years and I've been writing Icon programs for over twenty years. My personal experience is that the core language is rock solid. It sounds like Icon would be a great fit for your application. It is the case that there's no debugger but between tracing and the Image procedure in the IPL, it's usually not too hard to track down bugs. The contributed material in the IPL varies in quality but there's a lot of useful stuff in there. The C implementation of Icon, which is the basis of Clint Jeffery's Windows version, was originally developed on a PDP-11 with 64k each of instruction and data space and it's very efficient both in terms of speed and space. There are no fundamental limitations on the size of anything until you reach the gigabyte range but the default limit for the main interpreter stack is set pretty low -- 10,000 words. I use a setting of 100000. (See page 318 in the book, re MSTKSIZE.) The Icon homepage has a lot of links to good resources but in case you might find something useful in them, here's a link to a set of slides that I've written for a 400-level class on Icon that I'm teaching this semester: http://www.cs.arizona.edu/classes/cs451/icon.pdf. (Some versions of the Acrobat plug-in blow up with that WordPerfect-generated PDF file. If you have trouble with it in your browser you can just download the whole document.) William Mitchell Mitchell Software Engineering www.mse.com From icon-group-sender Tue Mar 11 08:21:29 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2BFIWw17130 for icon-group-addresses; Tue, 11 Mar 2003 08:18:32 -0700 (MST) Message-Id: <200303111518.h2BFIWw17130@baskerville.CS.Arizona.EDU> To: Kazimir@chem.pmf.hr Cc: icon-group@cs.arizona.edu From: "Alexandre E. Kopilovitch" Date: Tue, 11 Mar 2003 04:10:58 +0300 (MSK) Subject: Re: Do you think Icon is good choice for me? Errors-To: icon-group-errors@cs.arizona.edu Status: RO >core language is rock solid. My impression is the same. But at the same time, there are many "idioms", which implicitly constitute experimental layer of the language. So, while you do not take those idioms "for free", but give proper own definition for each idiom you use (and then adhere to that definition), you are safe. In other words, simply do not deviate from the standards for mathematical texts - and Icon will be good for you. Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia From icon-group-sender Wed Mar 12 08:13:37 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2CFDCI24856 for icon-group-addresses; Wed, 12 Mar 2003 08:13:12 -0700 (MST) Message-Id: <200303121513.h2CFDCI24856@baskerville.CS.Arizona.EDU> Date: 12 Mar 2003 14:21:43 GMT From: rjhare@ed.ac.uk Subject: Sorting lists To: icon-group@cs.arizona.edu Organisation: Edinburgh Parallel Computing Centre Errors-To: icon-group-errors@cs.arizona.edu Status: RO I don't have the book to hand and am sitting in an Icon-free zone at the moment. What do I get if I sort a list of lists like this: [ [b,c], [a,d] ] I hope I get: [ [a,d], [b,c]] but fear that I might get: [ a, b, c, d] Thanks. Roger Hare From icon-group-sender Wed Mar 12 12:35:15 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2CJX6c03437 for icon-group-addresses; Wed, 12 Mar 2003 12:33:06 -0700 (MST) Message-Id: <200303121933.h2CJX6c03437@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: Sorting lists From: Steve Wampler To: rjhare@ed.ac.uk Cc: icon-group@cs.arizona.edu Date: 12 Mar 2003 08:51:45 -0700 Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Wed, 2003-03-12 at 07:21, rjhare@ed.ac.uk wrote: > I don't have the book to hand and am sitting in an Icon-free zone at > the moment. What do I get if I sort a list of lists like this: > > [ [b,c], [a,d] ] > > I hope I get: > > [ [a,d], [b,c]] > > but fear that I might get: > > [ a, b, c, d] > > Thanks. > > Roger Hare To make sure I understand, you have (say) a := [ ["b","c"], ["a","d"] ] and want to know the result of sort(a), right? The answer is that you won't get [ "a", "b", "c", "d" ], but you probably will not get [ ["a","d"], ["b", "c"] ], either. When sorting a list of structures (what you have), the sorting order is by time of creation of those structures. Icon won't look 'inside' those structures to see what they contain. So, since ["b","c"] was created before ["a","d"] in the above example, I would expect the result of the sort to be [ ["b","c"], ["a","d"] ]. Hope that helps! -- Steve Wampler National Solar Observatory From icon-group-sender Wed Mar 12 12:50:02 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2CJmd603887 for icon-group-addresses; Wed, 12 Mar 2003 12:48:39 -0700 (MST) Message-Id: <200303121948.h2CJmd603887@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: Sorting lists From: Steve Wampler To: rjhare@ed.ac.uk Cc: icon-group@cs.arizona.edu Date: 12 Mar 2003 09:34:29 -0700 Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Wed, 2003-03-12 at 08:51, Steve Wampler wrote: > On Wed, 2003-03-12 at 07:21, rjhare@ed.ac.uk wrote: > > I don't have the book to hand and am sitting in an Icon-free zone at > > the moment. What do I get if I sort a list of lists like this: > > > > [ [b,c], [a,d] ] > > > > I hope I get: > > > > [ [a,d], [b,c]] > > > > but fear that I might get: > > > > [ a, b, c, d] > > > > Thanks. > > > > Roger Hare > > To make sure I understand, you have (say) > > a := [ ["b","c"], ["a","d"] ] > > and want to know the result of sort(a), right? > > The answer is that you won't get [ "a", "b", "c", "d" ], > but you probably will not get [ ["a","d"], ["b", "c"] ], either. > > When sorting a list of structures (what you have), the > sorting order is by time of creation of those structures. > > Icon won't look 'inside' those structures to see what they > contain. So, since ["b","c"] was created before ["a","d"] > in the above example, I would expect the result of the > sort to be [ ["b","c"], ["a","d"] ]. A quick followup... If you do have a list of lists of strings, you *can* use sortf(X,i) instead of sort() to sort by the first element in each of the sublists, so: b := sortf(a, 1) would do what you want in the above example. -- Steve Wampler National Solar Observatory From icon-group-sender Wed Mar 12 12:51:32 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2CJoBg04037 for icon-group-addresses; Wed, 12 Mar 2003 12:50:11 -0700 (MST) Message-Id: <200303121950.h2CJoBg04037@baskerville.CS.Arizona.EDU> Date: 12 Mar 2003 16:41:41 GMT From: rjhare@ed.ac.uk Subject: Re: Sorting lists To: swampler@noao.edu cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO > If you do have a list of lists of strings, you *can* use > sortf(X,i) instead of sort() to sort by the first element in > each of the sublists, so: > > b := sortf(a, 1) > > would do what you want in the above example. That's it! Thanks very much - the book is at home and I use the internal sort command so rarely that I simply couldn't remembe - thanks again! Roger ------------------------------------------------------------------------------ `Your wild oats have come home to roost.' ------------------------------------------------------------------------------ From icon-group-sender Wed Mar 12 12:53:03 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2CJpgM04093 for icon-group-addresses; Wed, 12 Mar 2003 12:51:42 -0700 (MST) Message-Id: <200303121951.h2CJpgM04093@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com Date: Wed, 12 Mar 2003 09:43:20 -0700 To: icon-group@cs.arizona.edu From: "William H. Mitchell" Subject: Re: Sorting lists Errors-To: icon-group-errors@cs.arizona.edu Status: RO A list of lists is sorted by time of creation, oldest first. That's usually not very useful. sortf(L,i) sorts a list of lists by the value of the i-th element of the sublists. Assuming your example depicts a list of lists containing strings, sortf(L, 1) would produce the result you hope for. At 02:21 PM 3/12/03 +0000, rjhare@ed.ac.uk wrote: >I don't have the book to hand and am sitting in an Icon-free zone at >the moment. What do I get if I sort a list of lists like this: > >[ [b,c], [a,d] ] > >I hope I get: > >[ [a,d], [b,c]] > >but fear that I might get: > >[ a, b, c, d] From icon-group-sender Thu Mar 13 14:05:47 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2DL4oo06318 for icon-group-addresses; Thu, 13 Mar 2003 14:04:50 -0700 (MST) Message-Id: <200303132104.h2DL4oo06318@baskerville.CS.Arizona.EDU> X-Sender: kazimir@chem.pmf.hr Date: Thu, 13 Mar 2003 19:43:16 +0100 To: "Alexandre E. Kopilovitch" From: "Majorinc, Kazimir" Subject: Re: Do you think Icon is good choice for me? Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO I wish to thank you on answers, both on the mailing list and privately. All answers were positive, and confirmed my impressions, so I decided to go with Icon in next period. Kazimir Majorinc, Zagreb, Croatia From icon-group-sender Thu Mar 13 16:47:03 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2DNkcw03723 for icon-group-addresses; Thu, 13 Mar 2003 16:46:38 -0700 (MST) Message-Id: <200303132346.h2DNkcw03723@baskerville.CS.Arizona.EDU> Date: Thu, 13 Mar 2003 16:15:44 -0500 From: "Steve Graham" To: Subject: Reading Past Ctrl-Z in DOS File Content-Disposition: inline X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2DLG1716435 Errors-To: icon-group-errors@cs.arizona.edu Status: RO In using Ver. 9.3.2 of DOS Icon to read DOS files, my program quits reading a file when it encounters a Ctrl-Z (ASCII 26). Don't see any binary mode in OPEN() or READ/READS(). Any ideas? Windows solution also acceptable. Steve Graham From icon-group-sender Tue Mar 18 13:34:09 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2IKTuw00213 for icon-group-addresses; Tue, 18 Mar 2003 13:29:56 -0700 (MST) Message-Id: <200303182029.h2IKTuw00213@baskerville.CS.Arizona.EDU> From: Kulpreet Singh X-Newsgroups: comp.lang.icon Subject: packet generator extension Date: Tue, 18 Mar 2003 16:17:57 +0000 X-Complaints-To: helpdesk@tcd.ie User-Agent: KNode/0.7.2 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO I came across Icon while reading "The BSD Packet Filter: A New Architecture for User-level Packet Capture" - McCanne and Jacobson, Winter USENIX 1993. The mention an extension for Icon supporting new constructs of "packet" and "packet generator", to help prototype network analysis tools. I have searched the web and grepped the source quite extensively, but cant find any mention of such an extension. The paper mentioned above, provides a reference to the Griswold book, which I obtained from the net, but again can't find any reference to such an extension. Hope someone here can help.. Thanks Kulpreet -- Distributed Systems Group, | Home is where .emacs is. Computer Science Deptt, | Trinity College, Dublin | From icon-group-sender Fri Mar 21 08:29:17 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2LFSPk21303 for icon-group-addresses; Fri, 21 Mar 2003 08:28:25 -0700 (MST) Message-Id: <200303211528.h2LFSPk21303@baskerville.CS.Arizona.EDU> Date: Thu, 20 Mar 2003 19:29:15 -0500 From: "Steve Graham" To: Subject: Sockets in Icon/Unicon Content-Disposition: inline X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2L0TqD29410 Errors-To: icon-group-errors@cs.arizona.edu Status: RO I have a server program written in Unicon and a client one. While the server does not abort (not sure if it works yet), the client aborts because it cannot open the port. Can't figure out why. Both are running on an Intel/Win98 box. The programs are reproduced below. Any help would be appreciated. Steve === Client: procedure main() f := open(":1026","n") | stop("Unable to open port 1026") every write(f,1 to 4,"\n") close(f) end Server: procedure main() port := 1026 write("Server Test") while net := open(":" || port,"na") do write(read(net)) close(net) (&errno = 0) | stop("Error: ",&errortext) end From icon-group-sender Fri Mar 21 16:29:16 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2LNSwM03216 for icon-group-addresses; Fri, 21 Mar 2003 16:28:58 -0700 (MST) Message-Id: <200303212328.h2LNSwM03216@baskerville.CS.Arizona.EDU> Date: Fri, 21 Mar 2003 14:35:33 -0500 From: "Steve Graham" To: Subject: Timed Read Content-Disposition: inline X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2LJZrD27461 Errors-To: icon-group-errors@cs.arizona.edu Status: RO In my "native" programming language, MUMPS, there is the facility for doing a timed read. So that if nothing is received within a specified number of seconds, the read "times out", and returns whatever was received from the read command. How would one simulate that in Icon/Unicon? TIA, Steve From icon-group-sender Mon Mar 24 13:01:08 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2OJxR229625 for icon-group-addresses; Mon, 24 Mar 2003 12:59:27 -0700 (MST) Message-Id: <200303241959.h2OJxR229625@baskerville.CS.Arizona.EDU> Date: Mon, 24 Mar 2003 12:16:40 -0500 From: "Steve Graham" To: Subject: Re: Sockets in Icon/Unicon Content-Disposition: inline X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2OHH4D25140 Errors-To: icon-group-errors@cs.arizona.edu Status: RO Many thanks to all those who offered help. The server program works like a champ now. Steve >>> "Steve Graham" 03/20/03 06:29PM >>> I have a server program written in Unicon and a client one. While the server does not abort (not sure if it works yet), the client aborts because it cannot open the port. Can't figure out why. Both are running on an Intel/Win98 box. The programs are reproduced below. Any help would be appreciated. Steve === Client: procedure main() f := open(":1026","n") | stop("Unable to open port 1026") every write(f,1 to 4,"\n") close(f) end Server: procedure main() port := 1026 write("Server Test") while net := open(":" || port,"na") do write(read(net)) close(net) (&errno = 0) | stop("Error: ",&errortext) end From icon-group-sender Tue Mar 25 12:29:33 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2PJSvM11424 for icon-group-addresses; Tue, 25 Mar 2003 12:28:57 -0700 (MST) Message-Id: <200303251928.h2PJSvM11424@baskerville.CS.Arizona.EDU> From: voice_of_reason@australia.edu (Quiet Voice) X-Newsgroups: comp.lang.icon Subject: newbie question -- ressurected Date: 25 Mar 2003 10:44:58 -0800 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Greetings: Several years ago, I made a brief foray into trying to teach myself the ICON programming language and develop some text analysis software. After several fits-n-starts, the project sort of died on the vine. I'm back at it again. Now, I'm trying to dig thru past code, remind myself of what it was supposed to do and how...and shake out the kinks. I ran a piece of code this morning and discovered that it results in an infinite loop.....but I can't figure out why. here is the code fragment: while not((line := read(data)) == "") do every write(lettercount[!line] +:= 1) {Note, this is one continuous line in the actual code} "data" is an input text file >From some debugging I've done, it seems like it keep reading from the file after it reaches the end...it just loops back to the begining of the file and starts over again. But I don't figure out why. What am I missing? Assistance appreciated. Thanks!! From icon-group-sender Tue Mar 25 16:50:34 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2PNnPs18801 for icon-group-addresses; Tue, 25 Mar 2003 16:49:25 -0700 (MST) Message-Id: <200303252349.h2PNnPs18801@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: newbie question -- ressurected From: Steve Wampler To: Quiet Voice Cc: icon-group@cs.arizona.edu Date: 25 Mar 2003 13:37:47 -0700 Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Tue, 2003-03-25 at 11:44, Quiet Voice wrote: > Greetings: > > Several years ago, I made a brief foray into trying to teach myself > the ICON programming language and develop some text analysis software. > After several fits-n-starts, the project sort of died on the vine. > > I'm back at it again. Now, I'm trying to dig thru past code, remind > myself of what it was supposed to do and how...and shake out the > kinks. > > I ran a piece of code this morning and discovered that it results in > an infinite loop.....but I can't figure out why. > > here is the code fragment: > > while not((line := read(data)) == "") do every > write(lettercount[!line] +:= 1) > > {Note, this is one continuous line in the actual code} > "data" is an input text file > > >From some debugging I've done, it seems like it keep reading from the > file after it reaches the end...it just loops back to the begining of > the file and starts over again. But I don't figure out why. > > What am I missing? I don't think it's looping back. What is happening is that when the read(data) fails, the 'not' is converting that failure back into success (that's your infinite loop). Since the assignment to line is performed after the read but before invoking not, line is retaining its last value (i.e. last line of the file), so you're seeing the characters in that last line counted over and over again. 'not' is a tricky beast and shouldn't be confused with the not boolean operators in other languages. In particular, you have two different points of failure in you while test clause and want to do different things on each. While 'not' might be appropriate for one of those (the X == "") part, it isn't appropriate for the other. Why not just try: while line := read(data) do every lettercount[!line] +:= 1 instead of the above loop? (Yes, it doesn't print out each count as you compute it, but that's probably left over from debugging anyway.) Empty lines will produce no characters in the ! operation, so you don't have to test for them. (You can shorten the above even more, but that's probably not particularly important...) Hope that helps! -- Steve Wampler National Solar Observatory From icon-group-sender Tue Mar 25 17:16:41 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2Q0GRI19505 for icon-group-addresses; Tue, 25 Mar 2003 17:16:27 -0700 (MST) Message-Id: <200303260016.h2Q0GRI19505@baskerville.CS.Arizona.EDU> From: ernobe X-Newsgroups: comp.lang.icon Subject: Re: newbie question -- ressurected Date: Tue, 25 Mar 2003 14:29:39 -0600 User-Agent: Noworyta News Reader/2.9 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Quiet Voice wrote: > Greetings: > > Several years ago, I made a brief foray into trying to teach myself > the ICON programming language and develop some text analysis software. > After several fits-n-starts, the project sort of died on the vine. > > I'm back at it again. Now, I'm trying to dig thru past code, remind > myself of what it was supposed to do and how...and shake out the > kinks. > > I ran a piece of code this morning and discovered that it results in > an infinite loop.....but I can't figure out why. > > here is the code fragment: > > while not((line := read(data)) == "") do every > write(lettercount[!line] +:= 1) > > {Note, this is one continuous line in the actual code} > "data" is an input text file > > From some debugging I've done, it seems like it keep reading from the > file after it reaches the end...it just loops back to the begining of > the file and starts over again. But I don't figure out why. > > What am I missing? > According the Icon Language Reference, read( f ) "Produces the next line from f, but fails on end of file." Therefore, when the read function fails at the end of the data file, a new assignment is not made to the line variable, the not function succeeds once again, and an infinite loop ensues. -- my esoteric links: http://www.costarricense.cr/pagina/ernobe take my quiz: http://www.quizyourfriends.com/yourquiz.php?quizname=030320115851-ernobe From icon-group-sender Wed Mar 26 09:28:14 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QGSDg15513 for icon-group-addresses; Wed, 26 Mar 2003 09:28:13 -0700 (MST) Message-Id: <200303261628.h2QGSDg15513@baskerville.CS.Arizona.EDU> X-Newsgroups: comp.lang.icon Subject: Icon-like programming language - 2 attachments From: Raja Mukherji User-Agent: Xnews/5.04.25 X-NNTP-Posting-Host: 10155phys232.ucd.ie Date: 26 Mar 2003 12:48:26 GMT To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO I don't know if anyone is interested but after using Icon for little while (and yes Icon is great), I decided to try and write a programming language with similar features to Icon with a number of differences. I started just over 3 years ago, and although not finished yet, I think I've completed enough to finally make a posting about it. So here it is. My language is called Rapl, and like Icon has generators, backtracking, built-in lists, tables and strings (although not all features of these have been implemented yet). It also compiles to bytecode (my compiler is currently written in Icon), which is then interpreted by my virtual machine, currently written in assembly code for mmx-processors and higher. Currently it only runs on Windows but porting to Linux should be fairly easy since only the system calls have to be translated. However, Rapl also supports OOP with classes and objects, has runtime overloaded functions and operators, support for basic functional programming, redefinition of internal operators at runtime, dynamic loading of modules (both bytecode and native), and I think the internal architecture makes it much easier to extend than Icon. Anyway, here are two sample files to look at, if anybody is interested in testing my current implementation, commenting on any language features, or wants to know how any features were implemented, talk to me... begin 644 list.rpl M;6]D(&QI7,@=7-E('=R:71E.PT*#0ID968@;&ES=&YO M9&4@:7,@='EP92A686QU92P@4')E=BP@3F5X="D@*`T*"6YE=R!I'0@/"T@4V5L9BY(96%D.PT*"0D)4V5L9BY(96%D(#PM($YO9&4[#0H) M"2D[#0H)"5-E;&8N3&5N9W1H(#PM(%-E;&8N3&5N9W1H("L@,3L-"@D)4V5L M9CL-"@DI.PT*"7!O<"!I'0I*2Y07,@=7-E('=R:71E.PT*:6UP(&QI Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QGQsM15477 for icon-group-addresses; Wed, 26 Mar 2003 09:26:54 -0700 (MST) Message-Id: <200303261626.h2QGQsM15477@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com Date: Tue, 25 Mar 2003 18:37:51 -0700 To: voice_of_reason@australia.edu (Quiet Voice) From: "William H. Mitchell" Subject: Re: newbie question -- ressurected Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Assuming you want to exit the loop upon end of file OR an empty line, then I'd do this: while line := read(data) & *line ~= 0 do every write(lettercount[!line] +:= 1) If end of file is a sufficient exit condition there is a more concise option: every write(lettercount[!!data] +:= 1) The latter takes advantage of the fact that applying ! to a file generates the remaining lines. From icon-group-sender Wed Mar 26 09:28:28 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QGSS215552 for icon-group-addresses; Wed, 26 Mar 2003 09:28:28 -0700 (MST) Message-Id: <200303261628.h2QGSS215552@baskerville.CS.Arizona.EDU> From: voice_of_reason@australia.edu (Quiet Voice) X-Newsgroups: comp.lang.icon Subject: Re: newbie questions -- ressurected Date: 26 Mar 2003 06:20:48 -0800 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Thank you for this response and to all who have responded directly by e:mail. The suggestions were all helpful and did solve the problem. The next level of dilemma: I would like to sort the list. I've tried various permutations of code using the sort() function. The errors I get seeme to be related to a type mis-match caused by the output type of sort(). Example write(!sort(data,2)) {Where "data" is the external file to which the table of letters and associated values was previously written} It has also occurred to me that the sort() function may not be giving me what I want anyway. As I recall, sort() reduces a table to a list. So I would be getting simply a list of the sorted value....not a re-oragnized table of values sorted by the associated key. Suggestions? Thank you! ernobe wrote in message news:... > Quiet Voice wrote: > > > Greetings: > > > > Several years ago, I made a brief foray into trying to teach myself > > the ICON programming language and develop some text analysis software. > > After several fits-n-starts, the project sort of died on the vine. > > > > I'm back at it again. Now, I'm trying to dig thru past code, remind > > myself of what it was supposed to do and how...and shake out the > > kinks. > > > > I ran a piece of code this morning and discovered that it results in > > an infinite loop.....but I can't figure out why. > > > > here is the code fragment: > > > > while not((line := read(data)) == "") do every > > write(lettercount[!line] +:= 1) > > > > {Note, this is one continuous line in the actual code} > > "data" is an input text file > > > > From some debugging I've done, it seems like it keep reading from the > > file after it reaches the end...it just loops back to the begining of > > the file and starts over again. But I don't figure out why. > > > > What am I missing? > > > According the Icon Language Reference, read( f ) "Produces the next line > from f, but fails on end of file." > Therefore, when the read function fails at the end of the data file, > a new assignment is not made to the line variable, the not function > succeeds once again, and an infinite loop ensues. From icon-group-sender Wed Mar 26 09:28:56 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QGSqw15602 for icon-group-addresses; Wed, 26 Mar 2003 09:28:52 -0700 (MST) Message-Id: <200303261628.h2QGSqw15602@baskerville.CS.Arizona.EDU> From: "Steve Wampler" X-Newsgroups: comp.lang.icon Subject: Re: newbie questions -- ressurected Date: Wed, 26 Mar 2003 08:06:51 -0700 X-Complaints-To: abuse@noao.edu User-Agent: Pan/0.13.3 (That cat's something I can't explain) To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Wed, 26 Mar 2003 06:20:48 -0800, Quiet Voice wrote: > The next level of dilemma: I would like to sort the list. > > I've tried various permutations of code using the sort() function. The > errors I get seeme to be related to a type mis-match caused by the > output type of sort(). > > Example > > write(!sort(data,2)) > > {Where "data" is the external file to which the table of letters and > associated values was previously written} > > It has also occurred to me that the sort() function may not be giving > me what I want anyway. As I recall, sort() reduces a table to a list. > So I would be getting simply a list of the sorted value....not a > re-oragnized table of values sorted by the associated key. Tables are, by definition, unordered, so you can't reorganize the table. But if you're writing the keys and values of a table out, you probably shouldn't care - the output is really just bytes in a file, not an Icon structure. If you want an order imposed on the keys and values in a table, you will need to place those keys and values into a list [which is what the sort function does for you when given a table]. I'm confused by the statement saying 'data' is an external file - are you expecting the sort function to reconstruct a table from that files contents automatically? From icon-group-sender Wed Mar 26 12:54:54 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QJsr208601 for icon-group-addresses; Wed, 26 Mar 2003 12:54:53 -0700 (MST) Message-Id: <200303261954.h2QJsr208601@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Wed, 26 Mar 2003 10:35:55 -0700 To: voice_of_reason@australia.edu (Quiet Voice) From: "William H. Mitchell" Subject: Re: newbie questions -- ressurected Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO At 06:20 AM 3/26/03 -0800, Quiet Voice wrote: >Thank you for this response and to all who have responded directly by >e:mail. The suggestions were all helpful and did solve the problem. > >The next level of dilemma: I would like to sort the list. > >I've tried various permutations of code using the sort() function. The >errors I get seeme to be related to a type mis-match caused by the >output type of sort(). > >Example > >write(!sort(data,2)) sort(t,2) produces a list of two-element lists ([key,value] pairs) ordered by the values. I suspect the problem you're seeing is that you're trying to write() a list and unfortunately, that's not allowed (no structure types are valid as arguments to write). I usually do something like this: every pair := !sort(data,2) do write(pair[1], " ", pair[2]) William Mitchell Mitchell Software Engineering www.mse.com From icon-group-sender Wed Mar 26 12:54:37 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QJsaU08583 for icon-group-addresses; Wed, 26 Mar 2003 12:54:36 -0700 (MST) Message-Id: <200303261954.h2QJsaU08583@baskerville.CS.Arizona.EDU> content-class: urn:content-classes:message Subject: RE: Icon-like programming language - 2 attachments X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Wed, 26 Mar 2003 12:29:45 -0500 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Icon-like programming language - 2 attachments Thread-Index: AcLztS1Y1WqC67aYSoOSGXuQEw+7swAB6mz4 From: "Seabrook, Richard" To: "Raja Mukherji" , X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2QHQhD17352 Errors-To: icon-group-errors@cs.arizona.edu Status: RO -----Original Message----- From: Raja Mukherji [mailto:rapl_lang@yahoo.co.uk] Sent: Wed 3/26/2003 7:48 AM To: icon-group@CS.Arizona.EDU Cc: Subject: Icon-like programming language - 2 attachments I don't know if anyone is interested but after using Icon for little while (and yes Icon is great), I decided to try and write a programming language with similar features to Icon with a number of differences. I started just over 3 years ago, and although not finished yet, I think I've completed enough to finally make a posting about it. So here it is. My language is called Rapl, and like Icon has generators, backtracking, built-in lists, tables and strings (although not all features of these have been implemented yet). It also compiles to bytecode (my compiler is currently written in Icon), which is then interpreted by my virtual machine, currently written in assembly code for mmx-processors and higher. Currently it only runs on Windows but porting to Linux should be fairly easy since only the system calls have to be translated. =============================================================== Interesting! Would your language have any relationship with the RAPL language used by CRS for programming robot arms? Here's a link: http://trueforce.com/Lab_Automation/Lab_Automation_Companies/CRS_profile.htm Dick S. From icon-group-sender Wed Mar 26 12:54:23 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QJsAw08558 for icon-group-addresses; Wed, 26 Mar 2003 12:54:10 -0700 (MST) Message-Id: <200303261954.h2QJsAw08558@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Wed, 26 Mar 2003 10:20:10 -0700 To: Raja Mukherji From: "William H. Mitchell" Subject: Re: Icon-like programming language - 2 attachments Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO That sounds very interesting. I'd like to see an example of the functional features and overloading. From icon-group-sender Wed Mar 26 12:55:36 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QJtZo08705 for icon-group-addresses; Wed, 26 Mar 2003 12:55:35 -0700 (MST) Message-Id: <200303261955.h2QJtZo08705@baskerville.CS.Arizona.EDU> From: "Quiet Voice" To: "William H. Mitchell" , voice_of_reason@australia.edu (Quiet Voice), icon-group@cs.arizona.edu Cc: icon-group@cs.arizona.edu Date: Wed, 26 Mar 2003 13:15:57 -0500 Subject: Re: newbie questions -- ressurected X-User-Info: 199.105.164.14 Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hi, Thanks for your reply. Your suggested solution seems reasonable and I will give it a try. I've encountered a slightly different type of problem, this one dealing with the ICON environment. I created several mini testbed programs in the WI environment. Then compiled and ran them from within the environment. No problems. Then I ran one using the wicont in DOS using the -s and -o options, providing a name for the executable file. Now, when I try to run things from withint the environment, they won't run. I suspect I somehow screwed up a default by manually issuing the wicont command from DOS. Problem is I can't figure out how to get back to where I was. There isn't anything in the >ini file that addresses it. Any ideas as to what I screwed up? Thanks! >At 06:20 AM 3/26/03 -0800, Quiet Voice wrote: >>Thank you for this response and to all who have responded directly by >>e:mail. The suggestions were all helpful and did solve the problem. >> >>The next level of dilemma: I would like to sort the list. >> >>I've tried various permutations of code using the sort() function. The >>errors I get seeme to be related to a type mis-match caused by the >>output type of sort(). >> >>Example >> >>write(!sort(data,2)) > >sort(t,2) produces a list of two-element lists ([key,value] pairs) ordered >by the values. > >I suspect the problem you're seeing is that you're trying to write() a list >and unfortunately, that's not allowed (no structure types are valid as >arguments to write). I usually do something like this: > > every pair := !sort(data,2) do > write(pair[1], " ", pair[2]) > >William Mitchell >Mitchell Software Engineering >www.mse.com > > Study Business at USQ's Australian Graduate School of Business. http://www.usq.edu.au/faculty/business/usqagsb/ From icon-group-sender Wed Mar 26 12:56:03 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QJtxQ08743 for icon-group-addresses; Wed, 26 Mar 2003 12:55:59 -0700 (MST) Message-Id: <200303261955.h2QJtxQ08743@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Re: Icon-like programming language - 2 attachments X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Wed, 26 Mar 2003 17:53:56 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO My advise is that you should avoid re-inventing the wheel. Some of the features of the 'Rapl' are parts of Icon and Icon extensions. For example, Icon already supports dynamic loading of other programs (the load function for Icon code, the loadfunc function for native code). An OO extension of Icon is available through the Idol preprocessor, and also through the Unicon language (http://unicon.sourceforge.net/). You may want to take a look at these languages before duplicating work that has been done already. From icon-group-sender Thu Mar 27 07:51:13 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2REnoI09250 for icon-group-addresses; Thu, 27 Mar 2003 07:49:50 -0700 (MST) Message-Id: <200303271449.h2REnoI09250@baskerville.CS.Arizona.EDU> X-Newsgroups: comp.lang.icon Subject: Re: Icon-like programming language - 2 attachments From: Raja Mukherji User-Agent: Xnews/5.04.25 X-NNTP-Posting-Host: 10145phys232.ucd.ie Date: 27 Mar 2003 09:19:01 GMT To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO I've already looked at Idol and Unicon and although they support OOP, they don't provide operator/function overloading (Unicon says it will, but I don't think it will be similar to my method). Also, they don't support currying of functions (although I suppose you could implement it in Idol/Unicon using classes). However, Rapl was originally written to be a faster Icon (written in x86 assembly) without looking at the Icon source code, to see if I could do it. I have since looked at the source code and feel that extending Icon with new internal types is fairly difficult. I use a method table for each internal types (much like Jcon) which also makes it faster (currently Rapl code runs approx 3-5 times faster than Icon although I haven't tested all features yet). Part of the reason I wrote Rapl is that at the time, there was no real attempt to support dynamic native function loading on windows platforms, which I use (Unicon promises it in the next release but I started Rapl 3 years ago). Rapl doesn't support dynamic loading yet actually, it currently only supports dynamic linking (all modules are loaded only when needed). Similarly, it allows initialization of global constants/variables, which are only initialized when required. The module system provides no way of telling the difference between native and bytecode module, indeed my current compiled module file format can contain a mixture of both. The ease that I think new types can be added to Rapl and the lack of distinction between native and bytecode modules means (in my opinion) that the language can be extended fairly easily by independent people at independant times much more so than Icon. Also, I wanted to make the language more uniform than Icon, there are no procedure/record declarations, only constants and variables which may be assigned functions and types. There are no pre-defined functions, only imported ones. Everything is an object, including integers, strings, lists, etc, although internal layering means that performance is not affected as a results. Lastly I gave Rapl "symbols", written as . where there act as simple immutable values, with the restriction that when any program is running, . = . if and only if = , regardless of which module they are being used in. (Again this could be done using tables in Icon but I think my way is faster and simpler). For example, .a, .e, and .b are used for comparisions (above, equal or below) which can then be redefined for use in tables/sets for example. Here's an example of overloading as done in Rapl, ##################################################################### mod test; imp sys use write; ## sys is a native module imp riva use ## riva is the name of the system module real, ## real is the class of real numbers Mul, ## Mul is the name of the operator '*' Add, ## Add is the name of the operator '+' Comp; ## Comp is used for comparisions ## and is the name of the operator '?' imp math; def vector is ( def v is type(X, Y, Z) ( new is ovrl fun() fail; ## constructor ## ovrl = overload with ## default size is fun() math.sqrt(Self.X^2+Self.Y^2+Self.Z^2); strn is fun() "(" + Self.X + ", " + Self.Y + ", " + Self.Z + ")"; ); v.new[real][real][real] <- fun(X, Y, Z) ( ## constructor for reals Self.X <- X; Self.Y <- Y; Self.Z <- Z; ret Self; ); v.new[vector] <- fun(V) ( ## copying constructor for vectors Self.X <- V.X; Self.Y <- V.Y; Self.Z <- V.Z; ret Self; ); Add[vector][vector] <- fun(A, B) vector(A.X+B.X, A.Y+B.Y, A.Z+B.X); Mul[real][vector] <- fun(K, A) vector(K*A.X, K*A.Y, K*A.Z); Comp[vector][vector] <- fun(A, B) A.size() ? B.size(); ## compare based on size: returns .b, .e or .a v; ## finally set vector to our temporary type v ); def start! is ( ## ! = exported symbol var A <- vector(10.0, 20.0, 10.0); write(A, "\n"); ## will use A.strn() var B <- vector(A); B.X <- 30.0; write(B, "\n"); var C <- A + B; var D <- 0.1 * C; write(D, "\n"); write(if A > D then "A is bigger then D\n" else "A is not bigger than D\n" ); ); ##################################################################### Anyway, thanks for the comment. I don't think I'm reinventing the wheel, meerly adding tyres to make it more useful, although I could be wrong... "Frank J. Lhota" wrote in news:UOlga.7606$kU.6828@nwrdny01.gnilink.net: > My advise is that you should avoid re-inventing the wheel. Some of the > features of the 'Rapl' are parts of Icon and Icon extensions. For > example, Icon already supports dynamic loading of other programs (the > load function for Icon code, the loadfunc function for native code). > An OO extension of Icon is available through the Idol preprocessor, > and also through the Unicon language (http://unicon.sourceforge.net/). > You may want to take a look at these languages before duplicating work > that has been done already. > > > From icon-group-sender Thu Mar 27 12:49:38 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2RJn2s01089 for icon-group-addresses; Thu, 27 Mar 2003 12:49:02 -0700 (MST) Message-Id: <200303271949.h2RJn2s01089@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Icon inspires enhancements to C# X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Thu, 27 Mar 2003 17:20:07 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Icon users may find the following link interesting: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechar t/html/vbconCProgrammingLanguageFutureFeatures.asp The article discusses improvements that will be made to C# and other MS languages. Check out the section on iterators; the author cites Icon as one of the languages that they have studied that benefits from an iterator operator. Now if Microsoft could only see the virtue of generators and backtracking... From icon-group-sender Thu Mar 27 17:16:15 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2S0GEo08046 for icon-group-addresses; Thu, 27 Mar 2003 17:16:14 -0700 (MST) Message-Id: <200303280016.h2S0GEo08046@baskerville.CS.Arizona.EDU> From: voice_of_reason@australia.edu (Quiet Voice) X-Newsgroups: comp.lang.icon Subject: Re: newbie questions -- ressurected Date: 27 Mar 2003 14:00:50 -0800 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO "Steve Wampler" wrote in message news:... > > Tables are, by definition, unordered, so you can't reorganize > the table. But if you're writing the keys and values of a table > out, you probably shouldn't care - the output is really just > bytes in a file, not an Icon structure. If you want an order > imposed on the keys and values in a table, you will need to > place those keys and values into a list [which is what the > sort function does for you when given a table]. > > I'm confused by the statement saying 'data' is an external > file - are you expecting the sort function to reconstruct > a table from that files contents automatically? Hi, Thanks for you reply. With the assistance of several others who wrote to me directly via e:mail, I was able to solve this problem. The correct code is as follows: every lettercount := !sort(lettercount,2) do write(outputfile,lettercount[1]," -- ",lettercount[2]) The one problem is that this sorts it in ascending order. Can't recall if there is a direct function to sort decending...but that's a minor concern right now. Again, thank you. From icon-group-sender Thu Mar 27 17:16:01 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2S0FrA08027 for icon-group-addresses; Thu, 27 Mar 2003 17:15:53 -0700 (MST) Message-Id: <200303280015.h2S0FrA08027@baskerville.CS.Arizona.EDU> From: voice_of_reason@australia.edu (Quiet Voice) X-Newsgroups: comp.lang.icon Subject: Befuddled by logic and an error message..... Date: 27 Mar 2003 14:18:29 -0800 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Greetings: Still in my endeavor to "re-learn" ICON, I have hit upon a bug that is partially a logic bug and partially a runtime error. What I am attempting to do is as follows -- A file is opened which contains text. The idea of the program is to allow the user to selectively and iteratively edit and re-edit the file and see the edits alongside the original version of text. The program creates and output file that holds the original text and the current state of editing. A line from the original file along with the corresponding edited line are written to output. With each pass thru the loop the idea is that the program opens a temp file that holds the current editing. The user is essentially iteratively editing the temp file. Here's the code fragment along with comments I've written to myself.... target := current text edit := proposed edits . . . # LOGIC PROBLEM WITH THIS LOOP. NEED TO READ DATA FROM CURRENT GUESS *THEN* SAVE NEW GUESS FOR # FUTURE READ....but NEED TO PREVENT "INFINTIE LOOP" SITUATION OF READING THEN WRITING THEN READING>>>>ETC # CURRENT VERSION RESULTS IN RUN-TIME ERROR: 214 (???) in line 88 while (line := read(temp_holder)) do { orig := read(orig_text) trial_line := map(line,target,edit) write(output,"original: ",orig) write(output," ") write(output,"new: ",trial_line) write(output," ") OFFENDING LINE OF CODE ==> write(temp_holder,trial_line) # save current trial set } write("TRIAL CORRECTIONS WRITTEN TO TEMPORARY FILE.") writes("Do you have more corrections? Type yes or no: ") more := read() } #end INPUT loop --- First of all, what sort of situations create a runtime error 214? What am I doing wrong? Secondly, any suggestions on how better to accomplish this? Thanks for the advice and assitance..... From icon-group-sender Thu Mar 27 17:16:31 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2S0GTk08065 for icon-group-addresses; Thu, 27 Mar 2003 17:16:29 -0700 (MST) Message-Id: <200303280016.h2S0GTk08065@baskerville.CS.Arizona.EDU> X-MimeOLE: Produced By Microsoft Exchange V6.5.6851.8 Content-class: urn:content-classes:message Subject: RE: Icon inspires enhancements to C# Date: Thu, 27 Mar 2003 14:55:16 -0800 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Icon inspires enhancements to C# thread-index: AcL0miw0Llf8bTC9R7yyETN08CtYRQAGJGNw From: "Todd Proebsting" To: X-OriginalArrivalTime: 27 Mar 2003 22:55:13.0910 (UTC) FILETIME=[ED677960:01C2F4B3] X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2RMtNT06040 Errors-To: icon-group-errors@cs.arizona.edu Status: RO A couple comments: * I can assert confidently that Icon was *the* primary language of influence regarding C#'s iterators. * A big issue with generators/backtracking is that they are hard to introduce into an existing language. The whole idea of success/failure would be new in a language like C# that relies heavily on Boolean values and exceptions for alternative control flow. In general, I might argue that it's better to have one model of alternative control flow than to have an additional model, even if the additional model is arguably better. It might just cause too much confusion. Cheers, Todd -----Original Message----- From: Frank J. Lhota [mailto:NOSPAM.lhota.adarose@verizon.net] Sent: Thursday, March 27, 2003 9:20 AM To: icon-group@CS.Arizona.EDU Subject: Icon inspires enhancements to C# Icon users may find the following link interesting: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vste char t/html/vbconCProgrammingLanguageFutureFeatures.asp The article discusses improvements that will be made to C# and other MS languages. Check out the section on iterators; the author cites Icon as one of the languages that they have studied that benefits from an iterator operator. Now if Microsoft could only see the virtue of generators and backtracking... From icon-group-sender Thu Mar 27 17:17:13 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2S0HCQ08111 for icon-group-addresses; Thu, 27 Mar 2003 17:17:12 -0700 (MST) Message-Id: <200303280017.h2S0HCQ08111@baskerville.CS.Arizona.EDU> To: Raja Mukherji Cc: icon-group@cs.arizona.edu Subject: Re: Icon-like programming language - 2 attachments From: Ed L Cashin Date: Thu, 27 Mar 2003 19:11:44 -0500 User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-debian-linux-gnu) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Raja Mukherji writes: ... > Anyway, thanks for the comment. I don't think I'm reinventing the wheel, > meerly adding tyres to make it more useful, although I could be wrong... I think its great. I like currying, for instance. The world is a big place, and if nobody builds similar wheels, we will have only weak wheel builders -- Expertise comes from doing. There's a tradeoff with everything, and besides the expertise that the wheel-builder gains, there are benefits to other people. A diverse variety of wheels gives users more options, and developers get influenced by the new ideas and the example set by the new implementations. -- --Ed L Cashin | PGP public key: ecashin@uga.edu | http://noserose.net/e/pgp/ From icon-group-sender Fri Mar 28 08:10:29 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2SF8To16888 for icon-group-addresses; Fri, 28 Mar 2003 08:08:29 -0700 (MST) Message-Id: <200303281508.h2SF8To16888@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Thu, 27 Mar 2003 22:10:08 -0700 To: voice_of_reason@australia.edu (Quiet Voice) From: "William H. Mitchell" Subject: Re: newbie questions -- ressurected Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO At 02:00 PM 3/27/03 -0800, Quiet Voice wrote: > >The correct code is as follows: > >every lettercount := !sort(lettercount,2) do >write(outputfile,lettercount[1]," -- ",lettercount[2]) > >The one problem is that this sorts it in ascending order. Can't recall >if there is a direct function to sort decending...but that's a minor >concern right now. There is no descending option for the built-in sort. I usually use a down-counting to-by for that situation. For example, instead of this: every x := !Sort(L) do Do this: every x := Sort(L)[*L to 1 by -1] do ... From icon-group-sender Fri Mar 28 08:11:36 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2SFBUU16993 for icon-group-addresses; Fri, 28 Mar 2003 08:11:30 -0700 (MST) Message-Id: <200303281511.h2SFBUU16993@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Thu, 27 Mar 2003 23:00:04 -0700 To: icon-group@cs.arizona.edu From: "William H. Mitchell" Subject: Currying and partial evaluation Errors-To: icon-group-errors@cs.arizona.edu Status: RO Speaking of currying and partial evaluation, I've been thinking about a simple addition to Icon that would provide enough footing to do that sort of stuff. The expression expr1(expr2,...) currently has meaning if expr1 yields a procedure, string, or integer. I'd like to see that expanded to have meaning if expr1 is a list. Example: p(1,2) could be expressed as [p](1,2) or [p,1](2) or [p,1,2]() With that in hand you might then say pL := [push,L] and then every pL(1 to 10) A higher-order function might return a list, but the user would need to take no special steps to use it. I haven't thought through what L(p) would mean if L[1] is a list... :) From icon-group-sender Fri Mar 28 08:11:45 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2SFBiM17011 for icon-group-addresses; Fri, 28 Mar 2003 08:11:44 -0700 (MST) Message-Id: <200303281511.h2SFBiM17011@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Thu, 27 Mar 2003 23:10:17 -0700 To: icon-group@cs.arizona.edu From: "William H. Mitchell" Subject: Re: Icon-like programming language - 2 attachments Errors-To: icon-group-errors@cs.arizona.edu Status: RO At 07:11 PM 3/27/03 -0500, Ed L Cashin wrote: >Raja Mukherji writes: > >... >> Anyway, thanks for the comment. I don't think I'm reinventing the wheel, >> meerly adding tyres to make it more useful, although I could be wrong... > >I think its great. I like currying, for instance. The world is a big >place, and if nobody builds similar wheels, we will have only weak >wheel builders -- Expertise comes from doing. Here's a second for that motion. If inventors had stopped with the first wheel all we'd have would be stone wheels, right? (Or maybe it was wood... :) ) From icon-group-sender Fri Mar 28 08:11:52 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2SFBpM17054 for icon-group-addresses; Fri, 28 Mar 2003 08:11:51 -0700 (MST) Message-Id: <200303281511.h2SFBpM17054@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Fri, 28 Mar 2003 00:47:21 -0700 To: voice_of_reason@australia.edu (Quiet Voice) From: "William H. Mitchell" Subject: Re: Befuddled by logic and an error message..... Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Are you running on Windows or UNIX? I found that this program: procedure main() f := open("x","b") line := read(f) write(f, *line) end runs ok on UNIX (SunOS 5.9) with Icon 9.4.1 (&version) but on NT4SP6a with Icon 9.3.2 I get this: Run-time error 214 File io.icn; Line 4 input/output error offending value: 68 Traceback: main() write(file(x),68) from line 4 in io.icn But I've got a broader question: Why is the temp file necessary? Why not just hold those edits in memory? Are the files multi-megabytes? From icon-group-sender Fri Mar 28 12:34:33 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2SJYIQ24540 for icon-group-addresses; Fri, 28 Mar 2003 12:34:18 -0700 (MST) Message-Id: <200303281934.h2SJYIQ24540@baskerville.CS.Arizona.EDU> From: voice_of_reason@australia.edu (Quiet Voice) X-Newsgroups: comp.lang.icon Subject: Re: Befuddled by logic and an error message..... Date: 28 Mar 2003 07:46:07 -0800 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO A follow-up to my own post based on some e:mail I recieved.... >Are you running on Windows or UNIX...on NT4SP6a with >Icon 9.3.2 I get this: > >Run-time error 214 >File io.icn; Line 4 >input/output error >offending value: 68 >Traceback: > main() > write(file(x),68) from line 4 in io.icn > I am running under Win 2000 with version 9.3.2.....and that is precisely the error message I get. > >But I've got a broader question: Why is the temp file necessary? I use the temp file because the editting process is iterative. What I mean is that the program reads in the original file, writes it over to a temporary holding file and offers the user a chance to edit the file, observe the results and re-edit...over and over...until he is satisfied. Each time, the program outputs the original file along side the most recent edits. Once satisfied, the program writes out the final version of the temp file as the "answer". voice_of_reason@australia.edu (Quiet Voice) wrote in message news:<9428c6a7.0303271418.6dd64a38@posting.google.com>... > Greetings: > > Still in my endeavor to "re-learn" ICON, I have hit upon a bug that is > partially a logic bug and partially a runtime error. > > What I am attempting to do is as follows -- > > A file is opened which contains text. > > The idea of the program is to allow the user to selectively and > iteratively edit and re-edit the file and see the edits alongside the > original version of text. > > The program creates and output file that holds the original text and > the current state of editing. > > A line from the original file along with the corresponding edited line > are written to output. > > With each pass thru the loop the idea is that the program opens a temp > file that holds the current editing. The user is essentially > iteratively editing the temp file. > > Here's the code fragment along with comments I've written to > myself.... > > target := current text > edit := proposed edits > . > . > . > > # LOGIC PROBLEM WITH THIS LOOP. NEED TO READ DATA FROM CURRENT GUESS > *THEN* SAVE NEW GUESS FOR > # FUTURE READ....but NEED TO PREVENT "INFINTIE LOOP" SITUATION OF > READING THEN WRITING THEN READING>>>>ETC > > # CURRENT VERSION RESULTS IN RUN-TIME ERROR: 214 (???) in line 88 > > while (line := read(temp_holder)) do > { > orig := read(orig_text) > trial_line := map(line,target,edit) > > write(output,"original: ",orig) > write(output," ") > write(output,"new: ",trial_line) > write(output," ") > > OFFENDING LINE OF CODE ==> write(temp_holder,trial_line) # save > current trial set > } > > write("TRIAL CORRECTIONS WRITTEN TO TEMPORARY FILE.") > writes("Do you have more corrections? Type yes or no: ") > more := read() > > } #end INPUT loop > > > --- > First of all, what sort of situations create a runtime error 214? What > am I doing wrong? > > Secondly, any suggestions on how better to accomplish this? > > Thanks for the advice and assitance..... From icon-group-sender Fri Mar 28 16:48:55 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2SNmjI02806 for icon-group-addresses; Fri, 28 Mar 2003 16:48:45 -0700 (MST) Message-Id: <200303282348.h2SNmjI02806@baskerville.CS.Arizona.EDU> From: voice_of_reason@australia.edu (Quiet Voice) X-Newsgroups: comp.lang.icon Subject: Re: Befuddled by logic and an error message..... Date: 28 Mar 2003 11:31:13 -0800 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Once again following up my own follow-up.... Thank you to all for the email responses. As it turns out, I have solved my problem...at least this one. I'm still not certain what was causing the error, but I suspected it revolved around reading from and writing to the same file. So I developed a work-around by creating *TWO* temp files to hold the editing: one for reading from and one for writing two. For each pass thru the editing loop, the program swaps which is the read and which is the write file. So the editing updates that you write to one file are then read out during the next pass and written to the other file (along with the newest updates). Back and forth...etc etc. Its a bit of a kludge.....but it works! Again, thanks! voice_of_reason@australia.edu (Quiet Voice) wrote in message news:<9428c6a7.0303280746.51de65da@posting.google.com>... > A follow-up to my own post based on some e:mail I recieved.... > > >Are you running on Windows or UNIX...on NT4SP6a with > >Icon 9.3.2 I get this: > > > >Run-time error 214 > >File io.icn; Line 4 > >input/output error > >offending value: 68 > >Traceback: > > main() > > write(file(x),68) from line 4 in io.icn > > > > I am running under Win 2000 with version 9.3.2.....and that is > precisely the error message I get. > > > > >But I've got a broader question: Why is the temp file necessary? > > I use the temp file because the editting process is iterative. > > What I mean is that the program reads in the original file, writes it > over to a temporary holding file and offers the user a chance to edit > the file, observe the results and re-edit...over and over...until he > is satisfied. Each time, the program outputs the original file along > side the most recent edits. > > Once satisfied, the program writes out the final version of the temp > file as the "answer". > > > > voice_of_reason@australia.edu (Quiet Voice) wrote in message news:<9428c6a7.0303271418.6dd64a38@posting.google.com>... > > Greetings: > > > > Still in my endeavor to "re-learn" ICON, I have hit upon a bug that is > > partially a logic bug and partially a runtime error. > > > > What I am attempting to do is as follows -- > > > > A file is opened which contains text. > > > > The idea of the program is to allow the user to selectively and > > iteratively edit and re-edit the file and see the edits alongside the > > original version of text. > > > > The program creates and output file that holds the original text and > > the current state of editing. > > > > A line from the original file along with the corresponding edited line > > are written to output. > > > > With each pass thru the loop the idea is that the program opens a temp > > file that holds the current editing. The user is essentially > > iteratively editing the temp file. > > > > Here's the code fragment along with comments I've written to > > myself.... > > > > target := current text > > edit := proposed edits > > . > > . > > . > > > > # LOGIC PROBLEM WITH THIS LOOP. NEED TO READ DATA FROM CURRENT GUESS > > *THEN* SAVE NEW GUESS FOR > > # FUTURE READ....but NEED TO PREVENT "INFINTIE LOOP" SITUATION OF > > READING THEN WRITING THEN READING>>>>ETC > > > > # CURRENT VERSION RESULTS IN RUN-TIME ERROR: 214 (???) in line 88 > > > > while (line := read(temp_holder)) do > > { > > orig := read(orig_text) > > trial_line := map(line,target,edit) > > > > write(output,"original: ",orig) > > write(output," ") > > write(output,"new: ",trial_line) > > write(output," ") > > > > OFFENDING LINE OF CODE ==> write(temp_holder,trial_line) # save > > current trial set > > } > > > > write("TRIAL CORRECTIONS WRITTEN TO TEMPORARY FILE.") > > writes("Do you have more corrections? Type yes or no: ") > > more := read() > > > > } #end INPUT loop > > > > > > --- > > First of all, what sort of situations create a runtime error 214? What > > am I doing wrong? > > > > Secondly, any suggestions on how better to accomplish this? > > > > Thanks for the advice and assitance..... From icon-group-sender Mon Mar 31 08:04:48 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2VF3Sc15248 for icon-group-addresses; Mon, 31 Mar 2003 08:03:28 -0700 (MST) Message-Id: <200303311503.h2VF3Sc15248@baskerville.CS.Arizona.EDU> From: "J.P. de Ruiter" X-Newsgroups: comp.lang.icon Subject: icon syntax colors in gnu emacs Date: Sat, 29 Mar 2003 23:34:30 +0100 X-Complaints-To: abuse@planet.nl X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hello fellow Icon lovers, I've been trying for a long time now to get my icon syntax coloring in Emacs right. I have some code, but it is not doing things right. For instance, if I have a variable name 'foo_of_bar', the of will be fontified as a reserved word, which it isn't in that context. Does anyone know a working set of elisp commands to get correct syntax coloring? Thanks in advance, Jan Peter de Ruiter From info@goldengroupltd.com Mon Mar 31 14:47:34 2003 Return-Path: Received: from email.CS.Arizona.EDU (email.cs.arizona.edu [192.12.69.123]) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) with ESMTP id h2VLlYT28108 for ; Mon, 31 Mar 2003 14:47:34 -0700 (MST) Received: from cheltenham.cs.arizona.edu (cheltenham.cs.arizona.edu [192.12.69.60]) by email.CS.Arizona.EDU (8.12.6/8.12.6) with ESMTP id h2VLlYme010550 for ; Mon, 31 Mar 2003 14:47:34 -0700 Received: from 10.0.0.150 (host81-134-46-193.in-addr.btopenworld.com [81.134.46.193]) by cheltenham.cs.arizona.edu (8.12.6p2/8.12.6) with SMTP id h2VLkcM5016379 for ; Mon, 31 Mar 2003 14:46:48 -0700 (MST) (envelope-from info@goldengroupltd.com) Message-Id: <200303312146.h2VLkcM5016379@cheltenham.cs.arizona.edu> From: "Golden Group" To: Subject: WIP Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0034_01C221EC.6C64F7B0" Date: Mon, 31 Mar 2003 22:46:42 Reply-To: "Golden Group" X-Mailer: Microsoft Outlook Express 6.00.2600.0000ams Status: RO ------=_NextPart_000_0034_01C221EC.6C64F7B0 Content-Type: text/plain; charset="iso-8859-1" Golden Group Ltd
     
   

ثبت شرکت در انگلستان

 آيا ميدانيد با داشتن شرکت در انگلستان با هر ميزان سرمايه ايي ميتوانيد از هزاران امتياز و درآمدي که انتظارش را نداريد بهر مند شويد ؟

 

انگلستان بعنوان چهارمين کشور قدرتمند اقتصادي دنيا با داشتن قدمت تاريخي بسيار کهن در تجارت با اعتبار مناسب جهاني و نيز دسترسي به بازاري با حجم 6 ميليارد نفر، شاهراه تجارت دنيا محسوب و اکثر معاملات بين المللي را در اختيار خود دارد

 

امتيازات ثبت شرکت در انگلستان

برخورداري از اعتبار وزين شرکتهاي انگليسي در سطح بين الملل

قوانين مدون تجاري و سرمايه گذاري

دسترسي به بازارهاي جهاني

استفاده از تسهيلات تجاري و مالي اعطاء شده توسط بانکها و مراکز اقتصادي

استفاده از نام شرکت انگليسي جهت نامگذاري بر روي محصول و تحت ليسانس بودن فعاليت تجاريتان توسط شرکت انگليسي

تسهيل در تردد مديران و طرفهاي تجاري شما به کشور انگلستان

تسريع در سرعت معاملات بين المللي بخاطر اعتبار و دسترسي به فن آوري روز

امنيت سرمايه گذاري و حمايتهاي دولتي و خصوصي سازمانها و شرکتها جهت پيشرفت اقتصادي شرکتهاي انگليسي

اگر خريدهاي خارجي شما از انگلستان و اروپا توسط شرکت انگليسي انجام گردد، از پرداخت 17.5 % مالیات معاف و اين مبلغ بعنوان تشويق صادرات به شرکت انگليسي عودت ميگردد

و هزاران امتياز ديگر که طي تماس با ما از آن مطلع خواهيد شد

 

GOLDEN GROUP

بعنوان مشاور و ياري مطمئن به شما کمک خواهد نمود که سطح تجاري خود را افزايش داده و فعاليتي موفق داشته باشيد

 

     پرسنل و مشاوران متخصص ما ميتوانيد ظرف مدت کمتر از 10 روز شرکت شما را در انگلستان به ثبت رسانده و شما را تا مرز موفقعيت همراهي نمايند

مدارک لازم جهت ثبت شرکت در انگلستان

تعيين نام شرکت

معرفي مدير و سکرتر شرکت

کپي پاسپورت سهامداران

امضاء مدارک قانوني شرکت

و ساير موارد که در مراحل اجراي به خدمتتان اعلام ميگردد

 

سرويسهاي ارائه شده توسط  شرکت گلدن گروپ جهت متقاضيان ثبت شرکت در انگلستان

ثبت شرکت شما در انگلستان

اجازه استفاده از آدرس دفترشرکت گلدن گروپ در انگلستان بمدت يکسال جهت شرکت انگليسي شما

همکاري با شما جهت افتتاح حساب بانکي

مشاوره در خصوص بهره برداري از امکانات و امتيازات شرکتهاي انگليسي

در اختيار گذاشتن خبرها و قوانين اقتصادي انگلستان و ساير کشورها

برگزاري کنفرانسهاي جهت بهبود روند فعاليتهاي اقتصادي

 و هزاران سرويسهاي ديگر که توسط شرکتهاي تحت پوشش گلدن گروپ قابل ارائه ميباشد

 

 قيمت حق الزحمه پکيج ثبت شرکت در انگلستان بمبلغ 1.000 ( هزار) پوند ميباشد که متقاضي ميبايست وجه حق الزحمه را در وجه شرکت گلدن گروپ  پرداخت نمايد

     ضمناٌ متقاضي ميبايست متعهد گردد که هيچ گونه مشکلي براي شرکت گلدن گروپ بوجود نياورده و خود متعهد موارد و مشکلات خود ميباشد

 

جهت کسب اطلاعات کاملتر با دفاتر اين شرکت در لندن و تهران تماس حاصل نمائيد

 

UK:

708, Crown House, North Circular Road, London, NW10  7PN   T: +44(0) 208 838 4464   F: +44(0) 208 838 4463  uk@goldengroupltd.com

Iran:

No259, South Africa High Way, Tehran, 1517884911  T: +98(0) 21 877 2282   F: +98(0) 21 888 0356  iran@goldengroupltd.com

 

   
     
© Golden Group Ltd 2003
توجه : آدرس پست الکترونيک شما توسط (خود شما – دوستان – همکاران و يا ... شما ) در ليست ما قرار گرفته است چنانچه مايل به دريافت اطلاعات تکميلي در زمينه خدمات شرکت گلدن گروپ نيستيد لطفا اين ايميل را با موضوع عدم عضويت به آدرس فرستنده بازگردانيد .  
------=_NextPart_000_0034_01C221EC.6C64F7B0 Content-Type: text/html; charset="iso-8859-1" Golden Group Ltd
     
   

ثبت شرکت در انگلستان

 آيا ميدانيد با داشتن شرکت در انگلستان با هر ميزان سرمايه ايي ميتوانيد از هزاران امتياز و درآمدي که انتظارش را نداريد بهر مند شويد ؟

 

انگلستان بعنوان چهارمين کشور قدرتمند اقتصادي دنيا با داشتن قدمت تاريخي بسيار کهن در تجارت با اعتبار مناسب جهاني و نيز دسترسي به بازاري با حجم 6 ميليارد نفر، شاهراه تجارت دنيا محسوب و اکثر معاملات بين المللي را در اختيار خود دارد

 

امتيازات ثبت شرکت در انگلستان

برخورداري از اعتبار وزين شرکتهاي انگليسي در سطح بين الملل

قوانين مدون تجاري و سرمايه گذاري

دسترسي به بازارهاي جهاني

استفاده از تسهيلات تجاري و مالي اعطاء شده توسط بانکها و مراکز اقتصادي

استفاده از نام شرکت انگليسي جهت نامگذاري بر روي محصول و تحت ليسانس بودن فعاليت تجاريتان توسط شرکت انگليسي

تسهيل در تردد مديران و طرفهاي تجاري شما به کشور انگلستان

تسريع در سرعت معاملات بين المللي بخاطر اعتبار و دسترسي به فن آوري روز

امنيت سرمايه گذاري و حمايتهاي دولتي و خصوصي سازمانها و شرکتها جهت پيشرفت اقتصادي شرکتهاي انگليسي

اگر خريدهاي خارجي شما از انگلستان و اروپا توسط شرکت انگليسي انجام گردد، از پرداخت 17.5 % مالیات معاف و اين مبلغ بعنوان تشويق صادرات به شرکت انگليسي عودت ميگردد

و هزاران امتياز ديگر که طي تماس با ما از آن مطلع خواهيد شد

 

GOLDEN GROUP

بعنوان مشاور و ياري مطمئن به شما کمک خواهد نمود که سطح تجاري خود را افزايش داده و فعاليتي موفق داشته باشيد

 

     پرسنل و مشاوران متخصص ما ميتوانيد ظرف مدت کمتر از 10 روز شرکت شما را در انگلستان به ثبت رسانده و شما را تا مرز موفقعيت همراهي نمايند

مدارک لازم جهت ثبت شرکت در انگلستان

تعيين نام شرکت

معرفي مدير و سکرتر شرکت

کپي پاسپورت سهامداران

امضاء مدارک قانوني شرکت

و ساير موارد که در مراحل اجراي به خدمتتان اعلام ميگردد

 

سرويسهاي ارائه شده توسط  شرکت گلدن گروپ جهت متقاضيان ثبت شرکت در انگلستان

ثبت شرکت شما در انگلستان

اجازه استفاده از آدرس دفترشرکت گلدن گروپ در انگلستان بمدت يکسال جهت شرکت انگليسي شما

همکاري با شما جهت افتتاح حساب بانکي

مشاوره در خصوص بهره برداري از امکانات و امتيازات شرکتهاي انگليسي

در اختيار گذاشتن خبرها و قوانين اقتصادي انگلستان و ساير کشورها

برگزاري کنفرانسهاي جهت بهبود روند فعاليتهاي اقتصادي

 و هزاران سرويسهاي ديگر که توسط شرکتهاي تحت پوشش گلدن گروپ قابل ارائه ميباشد

 

 قيمت حق الزحمه پکيج ثبت شرکت در انگلستان بمبلغ 1.000 ( هزار) پوند ميباشد که متقاضي ميبايست وجه حق الزحمه را در وجه شرکت گلدن گروپ  پرداخت نمايد

     ضمناٌ متقاضي ميبايست متعهد گردد که هيچ گونه مشکلي براي شرکت گلدن گروپ بوجود نياورده و خود متعهد موارد و مشکلات خود ميباشد

 

جهت کسب اطلاعات کاملتر با دفاتر اين شرکت در لندن و تهران تماس حاصل نمائيد

 

UK:

708, Crown House, North Circular Road, London, NW10  7PN   T: +44(0) 208 838 4464   F: +44(0) 208 838 4463  uk@goldengroupltd.com

Iran:

No259, South Africa High Way, Tehran, 1517884911  T: +98(0) 21 877 2282   F: +98(0) 21 888 0356  iran@goldengroupltd.com

 

   
     
© Golden Group Ltd 2003
توجه : آدرس پست الکترونيک شما توسط (خود شما – دوستان – همکاران و يا ... شما ) در ليست ما قرار گرفته است چنانچه مايل به دريافت اطلاعات تکميلي در زمينه خدمات شرکت گلدن گروپ نيستيد لطفا اين ايميل را با موضوع عدم عضويت به آدرس فرستنده بازگردانيد .  
------=_NextPart_000_0034_01C221EC.6C64F7B0-- From icon-group-sender Tue Apr 1 12:31:22 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h31JVL224767 for icon-group-addresses; Tue, 1 Apr 2003 12:31:21 -0700 (MST) Message-Id: <200304011931.h31JVL224767@baskerville.CS.Arizona.EDU> X-WebMail-UserID: yhou4@uic.edu Date: Tue, 1 Apr 2003 13:03:34 -0600 From: yhou4 To: icon-group@cs.arizona.edu X-EXP32-SerialNo: 50000146 Subject: question about xencode and xdecode Errors-To: icon-group-errors@cs.arizona.edu Status: RO If the data structure has already been xencoded into a file, then I create one program to try to xdecode the data structure out from this file. I found it doesn't work even though I have already included the definition of the data structure in this new program. It seems to me that the xdecode can only work successfully in the same program file with the xencode in it. Is it true? or I am doing something wrong? Thanks for any help! Yijue From icon-group-sender Tue Apr 1 12:30:15 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h31JTIg24686 for icon-group-addresses; Tue, 1 Apr 2003 12:29:18 -0700 (MST) Message-Id: <200304011929.h31JTIg24686@baskerville.CS.Arizona.EDU> Date: Tue, 1 Apr 2003 10:00:08 -0700 (MST) From: Gregg Townsend To: icon-group@cs.arizona.edu, storkchen@yahoo.com Subject: Re: icon syntax colors in gnu emacs Errors-To: icon-group-errors@cs.arizona.edu Status: RO > From: "J.P. de Ruiter" > > Does anyone know a working set of elisp commands to get correct syntax > coloring? There are some contributed files for using emacs with Icon in http://www.cs.arizona.edu/icon/ftp/contrib/emacs/ I don't know what they do or how well they work. --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Thu Apr 10 08:19:15 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3AFIDM20723 for icon-group-addresses; Thu, 10 Apr 2003 08:18:13 -0700 (MST) Message-Id: <200304101518.h3AFIDM20723@baskerville.CS.Arizona.EDU> X-Newsgroups: comp.lang.icon Subject: My Icon-like programming language (again) From: Raja Mukherji User-Agent: Xnews/5.04.25 X-NNTP-Posting-Host: 10145phys232.ucd.ie Date: 10 Apr 2003 09:13:24 GMT To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Well, I've put up a (really bad) webpage for my Icon-like programming language at . The source of its virtual machine is not up yet (needs documentation/comments) but the source of my compiler is (written in Icon) and may be of interest to Icon programmers anyway. (It's around 3000-4000 lines of code). If you want the source code for the virtual machine, (and please note that it is written in largely uncommented x86 assembly code), you can e-mail me and I'll send you it. From icon-group-sender Tue Apr 15 07:46:16 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3FEjAM04078 for icon-group-addresses; Tue, 15 Apr 2003 07:45:10 -0700 (MST) Message-Id: <200304151445.h3FEjAM04078@baskerville.CS.Arizona.EDU> From: Richard Bos X-Newsgroups: comp.lang.icon Subject: Re: Simplifying Integer Arithmetic User-Agent: MT-NewsWatcher/3.1 (PPC) Date: Tue, 15 Apr 2003 12:22:39 +0200 X-Complaints-To: abuse@nl.uu.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO In article , Patrick Scheible wrote: > "Frank J. Lhota" writes: > > > The question I pose to this group is whether we should assume that any C > > compiler used for Icon uses the "round towards 0" method for evaluating a / > > b and a % b for integers a and b. Given this assumption, we could simplify > > the div3 and mod3 functions in "runtime/rmisc.r" as follows: > > I would suggest not making any assumptions about which C compilers > people may use at some point, especially since the work of making Icon > round towards 0 regardless of the C compiler's behavior has already > been done. Who knows what strange platforms someone may wish to port > Icon to at some point? > > However, I have not done a survey of whether there are any C compilers > that do not round towards 0. (Maybe the nice people in comp.lang.c > happen to know?) Right. I'm a bit late answering this (only just set up the test Mac with ProIcon and Newswatcher on it), and I'm not really a c.l.c regular anymore, but it's like this: In the first C Standard of 1989, positive/positive division rounded towards zero (obviously), and +/+ modulo is positive. However, if either operand is negative, the direction of the rounding as well as the sign of the modulo is implementation-defined. Even so, for all implementations, (a/b)*a + a%b must equal a, as long as a/b can be represented at all. In the new Standard of 1999, this is more closely regulated: all implementations that use the new Standard _must_ truncate towards zero. This also means that the result of the modulo operator has the same sign as its first operand. I haven't got a large selection of compilers myself, but those I do have all round towards zero. Richard From icon-group-sender Tue Apr 15 12:26:43 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3FJQgU11987 for icon-group-addresses; Tue, 15 Apr 2003 12:26:42 -0700 (MST) Message-Id: <200304151926.h3FJQgU11987@baskerville.CS.Arizona.EDU> From: Richard Bos X-Newsgroups: comp.lang.icon Mail-Copies-To: nobody Subject: Re: Simplifying Integer Arithmetic User-Agent: MT-NewsWatcher/3.1 (PPC) Date: Tue, 15 Apr 2003 17:37:33 +0200 X-Complaints-To: abuse@nl.uu.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO In article , "Frank J. Lhota" wrote: > Within the file "src/h/config.h", we can guarantee that ROUNDS_TO_0 is > defined with the following preprocessor directives: > > #ifndef ROUNDS_TO_0 > #if ( 5 / (-3) == -1 ) && ( (-5) / 3 == -1 ) && ( (-5) / (-3) == 1 ) > #define ROUNDS_TO_0 1 > #else > #define ROUNDS_TO_0 0 > #endif > #endif /* ROUNDS_TO_0 */ > > If there is some platform for which this does not set ROUNDS_TO_0 to the > appropriate value, you can set it in 'src/h/define.h'. Well, let's see. If the #if does not evaluate to true, then the implementation for that very reason does not truncate to 0, so #define ROUNDS_TO_0 0 is correct. If, OTOH, it does evaluate to true, then the requirement, in both the C89 and the C99 Standard, that (a/b)*b + a%b == a, demands that the modulo operator behaves as expected for platforms that truncate to 0, and #define ROUNDS_TO_0 1 is correct. So whether the implementation does truncate towards zero or not, this snippet is correct. BTW, strictly speaking this is truncation, not rounding, but that's a matter of terminology. A newbie like me certainly shouldn't dictate what the Icon dev team calls things . Richard From icon-group-sender Tue Apr 15 12:26:33 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3FJQFM11960 for icon-group-addresses; Tue, 15 Apr 2003 12:26:15 -0700 (MST) Message-Id: <200304151926.h3FJQFM11960@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Re: Simplifying Integer Arithmetic X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Date: Tue, 15 Apr 2003 15:18:01 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO Perhaps there is a way to have the best of both worlds. We could add the configuration parameter ROUNDS_TO_0 that will indicate whether C integer division / modulo rounds to 0 on this platform. This macro can be used to make sure that the more complicated versions of div3 / mod3 are used only when necessary, as follows: /* * div3 - integer divide with overflow checking (always rounds to 0) */ word div3(a, b) word a, b; { #if ROUNDS_TO_0 /* Simplified implementation, C result needs no adjusting */ #else /* More complicated implementation, adjusts C result if necessary to get rounding to 0 */ #endif } Within the file "src/h/config.h", we can guarantee that ROUNDS_TO_0 is defined with the following preprocessor directives: #ifndef ROUNDS_TO_0 #if ( 5 / (-3) == -1 ) && ( (-5) / 3 == -1 ) && ( (-5) / (-3) == 1 ) #define ROUNDS_TO_0 1 #else #define ROUNDS_TO_0 0 #endif #endif /* ROUNDS_TO_0 */ If there is some platform for which this does not set ROUNDS_TO_0 to the appropriate value, you can set it in 'src/h/define.h'. From icon-group-sender Wed Apr 16 11:58:31 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3GIvO608433 for icon-group-addresses; Wed, 16 Apr 2003 11:57:24 -0700 (MST) Message-Id: <200304161857.h3GIvO608433@baskerville.CS.Arizona.EDU> Date: Wed, 16 Apr 2003 11:09:39 +1200 (NZST) From: "Richard A. O'Keefe" To: icon-group@cs.arizona.edu, rlb@hoekstra-uitgeverij.nl Subject: Re: Simplifying Integer Arithmetic X-scanner: scanned by Inflex 1.0.12.4 - (http://pldaniels.com/inflex/) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Richard Bos explained about / and % in C89 and C99. However, it is worth pointing out that the C89 standarisers were aware of the issue. They chose to deal with it not by requiring incompatible changes to existing compilers (like they did with signed@unsigned combinations) but by adding a pair of library functions: div(int n, int d) => a div_t containing quotient and remainder ldiv(long n, long d) => an ldiv_t containing quotient and remainder where the quotient is sign(n/d)*floor(abs(n/d)). So if you want a fully specified truncate-towards-zero quotient and/or remainder in C89, you use div() or ldiv() depending on the size of the operands. From icon-group-sender Wed Apr 16 16:27:39 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3GNRGo15405 for icon-group-addresses; Wed, 16 Apr 2003 16:27:16 -0700 (MST) Message-Id: <200304162327.h3GNRGo15405@baskerville.CS.Arizona.EDU> Date: Wed, 16 Apr 2003 15:49:04 -0700 (MST) From: Gregg Townsend To: icon-group Subject: Announcing Icon 9.4.2 for Unix (now including Cygwin) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Version 9.4.2 of Icon is now available for Unix systems. This version removes the 256-color limit for graphics programs and addresses several minor portability and installation issues. Thanks to the efforts of Frank Lhota, this version can now be built in the Cygwin environment running on Microsoft Windows. It also runs in the Darwin environment of the Apple Macintosh. The Version 9.4.2 library is also available separately for use with Icon 9.3.2 for Windows, which remains available, or with other versions of Icon. For more information, see http://www.cs.arizona.edu/icon/v942 --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Tue Apr 22 07:44:09 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3MEgJc28916 for icon-group-addresses; Tue, 22 Apr 2003 07:42:19 -0700 (MST) Message-Id: <200304221442.h3MEgJc28916@baskerville.CS.Arizona.EDU> X-Sender: kazimir@chem.pmf.hr Date: Tue, 22 Apr 2003 13:56:06 +0200 To: icon-group@cs.arizona.edu From: "Majorinc, Kazimir" Subject: Re: Do you think Icon is good choice for me? Errors-To: icon-group-errors@cs.arizona.edu Status: RO Just stopped to say that I'm going well. Month and half after first Icon code line, my theorem proving program is functional with 1000+ lines of code, worked up to 30 hours, allocating up to 500 MB memory (Windows said so) without bugs and problems. Needs for memory are not that great, that was only a test. Starting period passed smoother and faster than expected, and I can already focus more on the problems of the matter itself than on programming. Again, thenx to all contributors to Icon project. Kazimir Majorinc, Zagreb, Croatia From icon-group-sender Mon Apr 28 07:50:53 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3SEo3I07530 for icon-group-addresses; Mon, 28 Apr 2003 07:50:03 -0700 (MST) Message-Id: <200304281450.h3SEo3I07530@baskerville.CS.Arizona.EDU> From: Steve Graham User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en X-Newsgroups: comp.lang.icon Subject: Using VIB X-Complaints-To: abuse@attbi.com Date: Sun, 27 Apr 2003 17:46:19 GMT To: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO I'm trying to design a visual interface under Win98 using VIB. Although I've put together a number of controls, I've only figured out how to code the callback for the quit button (by copying from another app). Can someone point me to an example of one that uses a text field, for example? TIA, Steve Graham From icon-group-sender Tue Apr 29 08:01:35 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h3TF0Jw14769 for icon-group-addresses; Tue, 29 Apr 2003 08:00:19 -0700 (MST) Message-Id: <200304291500.h3TF0Jw14769@baskerville.CS.Arizona.EDU> X-Sender: whm@mail.mse.com (Unverified) Date: Mon, 28 Apr 2003 19:10:48 -0700 To: Steve Graham From: "William H. Mitchell" Subject: Re: Using VIB Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu Status: RO At 05:46 PM 4/27/03 +0000, Steve Graham wrote: >I'm trying to design a visual interface under Win98 using VIB. Although >I've put together a number of controls, I've only figured out how to >code the callback for the quit button (by copying from another app). > Can someone point me to an example of one that uses a text field, for >example? I spent some time on VIB in a class I'm teaching this semester. On the page http://www.cs.arizona.edu/classes/cs451/handouts.htm you can find my slides. If you look under "Full Sets of Slides", the "Icon Graphics" set has about forty VIB-related slides. On the same page, Assignment 9 (w/solns) has two VIB-based programs. The WP-generated PDF files give some browser plug-ins heartburn, but if you download the PDFs things work fine. Also, there are many VIB examples in the IPL under gprogs. It's my understanding (and experience) that text fields don't work well on a top-level interface and are thus best used in dialogs. (One example of a problem: there's no notion of focus -- they get keystrokes iff the pointer is over them.) William Mitchell Mitchell Software Engineering From icon-group-sender Fri May 23 12:55:21 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h4NJs7k18669 for icon-group-addresses; Fri, 23 May 2003 12:54:07 -0700 (MST) Message-Id: <200305231954.h4NJs7k18669@baskerville.CS.Arizona.EDU> From: gmt@cs.arizona.edu (Gregg Townsend) X-Newsgroups: comp.lang.icon Subject: Re: rswitch.s hack to GNU systems on powerpc Date: 23 May 2003 10:24:15 -0700 To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-2.0 required=5.0 tests=EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO In article <87y90x7r31.fsf@gnu.org>, Jose E. Marchesi wrote: > > i just adapted ppc_darwin/'s rswitch.s to work in GNU/Linux systems > running on a ppc machine (macintosh ones, for example). ... > Untar it, put it in config/unix/ppc_gnulinux, and then do ... That path would seem to indicate that you're using an old version of Icon. Have you tried an unmodified Icon 9.4.2? It should build just fine on a PPC Linux or Macintosh system, although an unrelated problem with large integers has been reported. --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Wed Jun 18 07:55:12 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h5IEs3c04355 for icon-group-addresses; Wed, 18 Jun 2003 07:54:03 -0700 (MST) Message-Id: <200306181454.h5IEs3c04355@baskerville.CS.Arizona.EDU> From: rjmh@cs.chalmers.se (John Hughes) X-Newsgroups: comp.lang.clos,comp.lang.dylan,comp.lang.eiffel,comp.lang.icon,comp.lang.lisp.franz Subject: ICFP Programming Contest 2003 starts in 10 days Date: 18 Jun 2003 05:30:22 -0700 X-Complaints-To: groups-abuse@google.com To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO ICFP Programming Contest ======================== There are just ten days to go to the sixth ICFP Programming Contest! Starting at midnight on Saturday morning, June 28th, you can prove once again that your favourite programming language is "the programming tool of choice for discriminating hackers!" Don't miss this opportunity -- check out the contest web site at http://icfpcontest.org for details -- and the tiniest little hint of this year's problem. John Hughes From icon-group-sender Tue Jun 24 09:45:41 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h5OGiVI09407 for icon-group-addresses; Tue, 24 Jun 2003 09:44:31 -0700 (MST) Message-Id: <200306241644.h5OGiVI09407@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Re: Problem at int/bigint boundary X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Date: Mon, 23 Jun 2003 20:43:09 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-0.5 required=5.0 tests=PRIORITY_NO_NAME,QUOTED_EMAIL_TEXT,REFERENCES version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO "Walter Faxon" wrote in message news:57958c65.0306221432.5d95e5be@posting.google.com... > Hello. I don't know if this has been fixed in later versions/ports, > but in the OS/2 non-graphical version of Icon 9.3.1 (using icont), the > following tiny program crashes: > > procedure main() > local x > x := -2147483648 > x := -x > end > > I found this when abs(x) was called. A while back, I found a number of arithmetic errors around the boundaries between C integers and large integers. I devised a fix and submitted to the Icon project. My arithmetic fixes were incorporated into an official version of Icon (I forget which version). At any rate, this works OK for Icon 9.4.1. From icon-group-sender Mon Jul 14 09:12:43 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h6EGBVg17104 for icon-group-addresses; Mon, 14 Jul 2003 09:11:31 -0700 (MST) Message-Id: <200307141611.h6EGBVg17104@baskerville.CS.Arizona.EDU> X-Sender: kazimir@chem.pmf.hr Date: Sun, 13 Jul 2003 00:16:01 +0200 To: icon-group@cs.arizona.edu From: "Majorinc, Kazimir" Subject: Idiom for Pascal-like with? X-Trace: ls401.hinet.hr 1058048309 15022 195.29.140.193 (Sun, 13 Jul 2003 00:18:29 +0200) X-Spam-Status: No, hits=-0.5 required=5.0 tests=IN_REP_TO version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hi. Is there any idiom in Icon that can replace Pascal-like with statement. For example, I'd like to write something like: #----imaginary.icn record Polar(r,phi) record Cartesian(x,y) Ap:=Polar(1, 3.14) Ac:=Cartesian(0, 0) .... with Ap & Ac do { x:=r*cos(phi) y:=r*sin(phi) } ... #-----end of imaginary.icn--------- What would you do to eliminate redundant "P1." and "C1." parts? Thanks. -------------- Kazimir Majorinc, Zagreb, Croatia From icon-group-sender Thu Jul 17 20:50:58 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h6I3mLQ29137 for icon-group-addresses; Thu, 17 Jul 2003 20:48:25 -0700 (MST) Message-Id: <200307180348.h6I3mLQ29137@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: Idiom for Pascal-like with? From: Steve Wampler To: "Majorinc, Kazimir" Cc: icon-group@cs.arizona.edu Date: 17 Jul 2003 12:59:44 -0700 X-Spam-Status: No, hits=-5.3 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_XIMIAN,X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Sat, 2003-07-12 at 15:16, Majorinc, Kazimir wrote: > Hi. > > Is there any idiom in Icon that can replace Pascal-like with statement. For > example, I'd like to write something like: > > > #----imaginary.icn > > record Polar(r,phi) > record Cartesian(x,y) > > Ap:=Polar(1, 3.14) > Ac:=Cartesian(0, 0) > > .... > > with Ap & Ac > do { x:=r*cos(phi) > y:=r*sin(phi) > } > > ... > > #-----end of imaginary.icn--------- I haven't seen a response, so... There isn't a direct idiom to replace the Pascal-like with statement. > What would you do to eliminate redundant "P1." and "C1." parts? I'd use a slightly different approach: ... Ac := p2c(Ap.r, Ap.phi) ... procedure p2c(r,phi) return Cartesian(r*cos(phi), r*sin(phi)) end In fact, I'd have a 2nd procedure: procedure PtoC(p) return p2c(p.r, p.phi) end and replace the above assignment with: Ac := PtoC(Ap) -- Steve Wampler -- swampler@noao.edu Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? From icon-group-sender Thu Aug 7 17:28:26 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h780R7o04104 for icon-group-addresses; Thu, 7 Aug 2003 17:27:07 -0700 (MST) Message-Id: <200308080027.h780R7o04104@baskerville.CS.Arizona.EDU> From: "Andrew Hamm" X-Newsgroups: comp.lang.icon Subject: pre-processing? Date: Fri, 8 Aug 2003 09:51:24 +1000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=0.5 required=5.0 tests=PRIORITY_NO_NAME version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Folks, Do I recall correctly that in the dim distant past you could pre-process the Icon source through m4 or similar? Can I do that now? I want to embed simple timestamps into the files each time they are compiled. Are there any new &keywords I'm missing that perform this duty? [not the runttime time, but the build time and a few other obvious facts] I suppose I could stick the "@(#)......" string into the .icn and then post-process the .u1 file... From icon-group-sender Fri Aug 8 12:31:59 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h78JVHL17746 for icon-group-addresses; Fri, 8 Aug 2003 12:31:17 -0700 (MST) Message-Id: <200308081931.h78JVHL17746@baskerville.CS.Arizona.EDU> From: gmt@cs.arizona.edu (Gregg Townsend) X-Newsgroups: comp.lang.icon Subject: Re: pre-processing? Date: 8 Aug 2003 08:53:13 -0700 To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-1.0 required=5.0 tests=QUOTED_EMAIL_TEXT,REFERENCES version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO > Do I recall correctly that in the dim distant past you could pre-process the > Icon source through m4 or similar? Yes. That was before Icon had its own preprocessor ($define, $if, etc.). > Can I do that now? I want to embed simple timestamps into the files each > time they are compiled. Are there any new &keywords I'm missing that perform > this duty? [not the runttime time, but the build time and a few other > obvious facts] You can run m4 manually, but it's no longer an option to icont. There's nothing in Icon that will give you that timestamp. --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Wed Aug 13 07:36:26 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h7DEYiM04035 for icon-group-addresses; Wed, 13 Aug 2003 07:34:44 -0700 (MST) Message-Id: <200308131434.h7DEYiM04035@baskerville.CS.Arizona.EDU> Date: Tue, 12 Aug 2003 17:06:46 -0700 (MST) From: Gregg Townsend To: ahamm@mail.com Cc: icon-group Subject: Re: pre-processing? Errors-To: icon-group-errors@cs.arizona.edu Status: RO > OK - thanks for the reply. I've virtually settled on just poking the version > details into the .u1 straight after compiling. I suppose I could latch onto > the first procedure header in each file and inject a string. Injecting a trivial procedure at end of file might be even easier. > Looking in a basic .u1 emitted from 9.4.1, I see: > > proc thingy > filen tester.icn > local 0,001000,a > local 1,001000,args > local 2,000020,b > local 3,000020,c > con 0,010000,6,163,164,162,151,156,147 > con 1,002000,2,10 > declend > > so it seems reasonable to find the first proc, then count the "con"s and add > a new con with the next available serial number just before the declend? > > Do you, from your position of great inner knowledge, see any downside to > this technique being applied in the Makefile? I *think* that should work, assuming you have a way to get it back out. But it's been a long time since I've mucked with the icode. --------------------------------------------------------------------------- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Mon Aug 25 07:15:01 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h7PEBBR06200 for icon-group-addresses; Mon, 25 Aug 2003 07:11:11 -0700 (MST) Message-Id: <200308251411.h7PEBBR06200@baskerville.CS.Arizona.EDU> From: Steve Graham User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en X-Newsgroups: comp.lang.icon Subject: Windows Question X-Complaints-To: abuse@comcast.net Date: Sat, 23 Aug 2003 01:15:01 GMT To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-0.1 required=5.0 tests=USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO I have a Windows project in which I need to: 1) Draw a grid on the screen; 2) Completely blacken out some of the square; 3) In some of the non-blackened out squares put a small number in the top left or right corner; and 4) In some of the non-blackened out squares put a letter which occupies most of the space. I have not done any real Windows programming, so this is maybe quite easily done. I'm wondering if this is doable in Icon or Unicon. TIA, Steve Graham From icon-group-sender Sat Aug 30 15:55:50 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h7UMsTr05127 for icon-group-addresses; Sat, 30 Aug 2003 15:54:29 -0700 (MST) Message-Id: <200308302254.h7UMsTr05127@baskerville.CS.Arizona.EDU> To: Steve Graham Cc: icon-group@cs.arizona.edu Subject: Re: Windows Question From: Ed L Cashin Date: Fri, 29 Aug 2003 16:57:40 -0400 User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-debian-linux-gnu) X-Spam-Status: No, hits=-3.0 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_GNUS_UA version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Steve Graham writes: > I have a Windows project in which I need to: > 1) Draw a grid on the screen; > 2) Completely blacken out some of the square; > 3) In some of the non-blackened out squares put a small number in the > top left or right corner; and > 4) In some of the non-blackened out squares put a letter which occupies > most of the space. > > I have not done any real Windows programming, so this is maybe quite > easily done. I'm wondering if this is doable in Icon or Unicon. As far as I can remember, all that would be very easy in icon. There's a good book on doing GUI stuff in icon: http://www.cs.arizona.edu/icon/gb.htm -- --Ed L Cashin help make electronic forums easier to use: http://www.uwasa.fi/~ts/http/quote.html From icon-group-sender Wed Sep 17 13:33:16 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h8HKWPJ20725 for icon-group-addresses; Wed, 17 Sep 2003 13:32:25 -0700 (MST) Message-Id: <200309172032.h8HKWPJ20725@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Simple Icon programming challenge... From: Steve Wampler To: icon-group@cs.arizona.edu Date: Wed, 17 Sep 2003 07:51:31 -0700 X-Spam-Status: No, hits=-8.5 required=5.0 tests=BAYES_01,USER_AGENT_XIMIAN,X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO (This is probably a good string scanning exercise for newer Icon programmers...) Yesterday there were some news reports of a finding from an English University on just how well most of us read. In particular, they found that people could read nearly as fast if the interior letters (all but the first and last) of words were scrambled, provided people tried to read it fast and didn't spend time focussing on each word. For example, one scrambling of the above paragraph is: Ysaeterdy trhee wree smoe nwes roetprs of a fdinnig form an Eingslh Usnivetriy on jsut how wlel msot of us raed. In paarticulr, tehy fnoud taht ppeloe cloud raed nalery as fsat if the ionterir lrettes (all but the fsirt and lsat) of wdors wree smcreabld, perovidd pleope tierd to raed it fsat and ddin't snped tmie fsocunsig on ecah wrod. This actually may have profound implications on the ability of spam-blocking software to perform properly. Not that I want to promote spam, but... Write an Icon (or Unicon!) program that scrambles input using to this approach. It would be nice if it produced random scramblings (where repeated runs of the program on the same input produce different results). -- Steve Wampler -- swampler@noao.edu Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? From icon-group-sender Thu Sep 18 07:29:38 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h8IET7F18427 for icon-group-addresses; Thu, 18 Sep 2003 07:29:07 -0700 (MST) Message-Id: <200309181429.h8IET7F18427@baskerville.CS.Arizona.EDU> To: Steve Wampler cc: icon-group@cs.arizona.edu Subject: Re: Simple Icon programming challenge... Date: Wed, 17 Sep 2003 23:15:25 -0700 From: William Griswold X-Spam-Status: No, hits=-5.1 required=5.0 tests=BAYES_10,IN_REP_TO version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Hi Steve, Here is my solution. I got a little too clever for my own good, but I enjoyed it. :) --bill procedure main() every !&input ? { while not pos(0) do { writes(nextpiece()) writes(scrambleinnards(nextpiece())) } write() } end # # Scramble internal letters of a string with replacement. Without seemed # hard. Note that pretty much any letter-preserving function would work, # if you didn't care about randomness. # procedure scrambleinnards(word) every !word[2:*word] :=: ?word[2:*word] return word end # # State machine semantics for retrieving the word and non-word parts # of a text. First retrieves a non-word, then a word, etc. Would be # more efficient with a swap rather than a complement. # procedure nextpiece() static current initial current := &ucase ++ &lcase # letters return tab(many(current := ~current)) end In msg <200309172032.h8HKWPJ20725@baskerville.CS.Arizona.EDU>, Steve Wampler sa ys: >(This is probably a good string scanning exercise for newer >Icon programmers...) > >Yesterday there were some news reports of a finding from an >English University on just how well most of us read. In >particular, they found that people could read nearly as fast >if the interior letters (all but the first and last) of >words were scrambled, provided people tried to read it fast >and didn't spend time focussing on each word. > >For example, one scrambling of the above paragraph is: > >Ysaeterdy trhee wree smoe nwes roetprs of a fdinnig form an >Eingslh Usnivetriy on jsut how wlel msot of us raed. In >paarticulr, tehy fnoud taht ppeloe cloud raed nalery as fsat >if the ionterir lrettes (all but the fsirt and lsat) of >wdors wree smcreabld, perovidd pleope tierd to raed it fsat >and ddin't snped tmie fsocunsig on ecah wrod. > >This actually may have profound implications on the ability >of spam-blocking software to perform properly. > >Not that I want to promote spam, but... > >Write an Icon (or Unicon!) program that scrambles input >using to this approach. It would be nice if it produced >random scramblings (where repeated runs of the program on >the same input produce different results). > >-- >Steve Wampler -- swampler@noao.edu >Quantum materiae materietur marmota monax si marmota > monax materiam possit materiari? > From icon-group-sender Thu Sep 18 12:43:42 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h8IJhEO27359 for icon-group-addresses; Thu, 18 Sep 2003 12:43:14 -0700 (MST) Message-Id: <200309181943.h8IJhEO27359@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: Simple Icon programming challenge... From: Steve Wampler To: icon-group@cs.arizona.edu Date: Thu, 18 Sep 2003 07:52:29 -0700 X-Spam-Status: No, hits=-8.2 required=5.0 tests=BAYES_10,IN_REP_TO,REFERENCES,USER_AGENT_XIMIAN, X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO For the record, here are two possible solutions - the first is fairly straightforward, the second borders on the absurd... from the far side. Both share a common ancestry and would be cleaner if rewritten to use William's scambleinnards(words) approach. Solution 1: ################################################################## # Scrambles words but leaves them 'readable' by fixing the first # and last letters in place. # # Reads from standard input, writes to standard output procedure main(args) &random := integer(map("smhSMH","Hh:Mm:Ss",&clock)) while write(scrambleline(read())) end # Take a single line of input and produce it's equivalent with # interior letters of words scrambled. # Defines a word as any sequence of 1 or more letters, # procedure scrambleline(line) local s := "" line ? { while s ||:= tab(upto(&letters)) || sword(tab(many(&letters))) return s || tab(0) } end # Do the actual scrambling of the word. Note that words with less # than four letters can't be scrambled (not enough interior letters) # procedure sword(word) word ?:= (move(1) || scramble(tab(1<*word)) || move(1)) return word end # This procedure just randomly rearranges the characters in its # argument. # procedure scramble(s) every !s :=: ?s return s end ######################################################################### Solution 2 (unfit for human consumption!): ######################################################################### #### Scrambles words but leaves them 'readable' by fixing the first # and last letters in place. # # Reads from standard input, writes to standard output procedure main(args) &random := integer(map("smhSMH","Hh:Mm:Ss",&clock)) while read() ? { while writes(tab(upto(&letters))) do (w := tab(many(&letters))\1) ? writes(move(1), {s := tab(1<*w)|"";every !s :=: ?s; s}, move(1)|"") write(tab(0)) } end ###################################################################### -- Steve Wampler -- swampler@noao.edu Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? From icon-group-sender Mon Nov 3 12:24:30 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hA3JNJI17786 for icon-group-addresses; Mon, 3 Nov 2003 12:23:19 -0700 (MST) Message-Id: <200311031923.hA3JNJI17786@baskerville.CS.Arizona.EDU> From: Gregg Townsend Subject: Paper on "Converge", influenced by Icon Date: Mon, 3 Nov 2003 08:26:19 -0700 To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_20,TO_MALFORMED,USER_AGENT_APPLEMAIL version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Laurence Tratt and Tony Clark, of King's College London, have described a new language "Converge" that is influenced by Icon. See: http://tratt.net/laurie/research/publications/papers/ tratt03converge.pdf (Thanks to Kazimir Majorinc for pointing this out on another list.) ------------------------------------------------------------------------ --- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA From icon-group-sender Thu Nov 20 16:28:48 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hAKNPOB22820 for icon-group-addresses; Thu, 20 Nov 2003 16:25:24 -0700 (MST) Message-Id: <200311202325.hAKNPOB22820@baskerville.CS.Arizona.EDU> Date: Thu, 20 Nov 2003 15:07:27 -0700 From: Sandra L Miller X-Accept-Language: en To: icon-group@cs.arizona.edu Subject: Icon mailing list being retired X-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_20,USER_AGENT_MOZILLA_XM version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Dear Icon enthusiast, Due to the very low utilization of the Icon mailing list, it is being discontinued. After December 15, 2003, the Icon mailing list will no longer exist. After that date, submissions to the list and requests to join the list will answered with email explaining that the list has been retired and pointing the sender to the Icon newsgroup. If you are interested in maintaining a presence in the Icon community, we recommend that you follow discussions in the Icon newsgroup, comp.lang.icon. In the past, mail to the mailing list was also posted to the newsgroup, and posts to the newsgroup were sent to the mailing list. Now there will simply be one avenue for gathering information rather than two. There are numerous options for reading news groups. Netscape, Mozilla and Outlook Express include news reading functions, and some ISPs may provide their own news reading applications. To use a news reading application, you would have to configure your news reading application to interact with a news server provided by your ISP. You can also get to newsgroups via a web-based news server such as groups.google.com. For information on the use of newsgroups, see http://www.terena.nl/library/gnrt/group/usenet.html and http://www.ocf.berkeley.edu/help/usenet/ Sincerely, The Icon mailing list moderator -- Sandra L Miller Department of Computer Science University of Arizona From icon-group-sender Tue Nov 25 08:26:12 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hAPFP8V28025 for icon-group-addresses; Tue, 25 Nov 2003 08:25:08 -0700 (MST) Message-Id: <200311251525.hAPFP8V28025@baskerville.CS.Arizona.EDU> Date: Tue, 25 Nov 2003 07:46:54 -0700 From: Sandra L Miller X-Accept-Language: en To: icon-group@cs.arizona.edu Subject: Icon mailing being retired X-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_20,USER_AGENT_MOZILLA_XM version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Dear Icon enthusiast, Due to the very low utilization of the Icon mailing list, it is being discontinued. After December 15, 2003, the Icon mailing list will no longer exist. After that date, submissions to the list and requests to join the list will answered with email explaining that the list has been retired and pointing the sender to the Icon newsgroup. If you are interested in maintaining a presence in the Icon community, we recommend that you follow discussions in the Icon newsgroup, comp.lang.icon. In the past, mail to the mailing list was also posted to the newsgroup, and posts to the newsgroup were sent to the mailing list. Now there will simply be one avenue for gathering information rather than two. There are numerous options for reading news groups. Netscape, Mozilla and Outlook Express include news reading functions, and some ISPs may provide their own news reading applications. To use a news reading application, you would have to configure your news reading application to interact with a news server provided by your ISP. You can also get to newsgroups via a web-based news server such as groups.google.com. For information on the use of newsgroups, see http://www.terena.nl/library/gnrt/group/usenet.html and http://www.ocf.berkeley.edu/help/usenet/ Sincerely, The Icon mailing list moderator -- Sandra L Miller Department of Computer Science University of Arizona From icon-group-sender Tue Nov 25 12:58:44 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hAPJwOb07005 for icon-group-addresses; Tue, 25 Nov 2003 12:58:24 -0700 (MST) Message-Id: <200311251958.hAPJwOb07005@baskerville.CS.Arizona.EDU> Date: Tue, 25 Nov 2003 07:47:41 -0800 (PST) From: Taybin Rutkin To: Sandra L Miller , icon-group@cs.arizona.edu Subject: Re: Icon mailing being retired X-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_20 version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO That's a shame. Maybe someone else would care to host it? Taybin -----Original Message----- From: Sandra L Miller Sent: Nov 25, 2003 6:46 AM To: icon-group@CS.Arizona.EDU Subject: Icon mailing being retired Dear Icon enthusiast, Due to the very low utilization of the Icon mailing list, it is being discontinued. After December 15, 2003, the Icon mailing list will no longer exist. After that date, submissions to the list and requests to join the list will answered with email explaining that the list has been retired and pointing the sender to the Icon newsgroup. If you are interested in maintaining a presence in the Icon community, we recommend that you follow discussions in the Icon newsgroup, comp.lang.icon. In the past, mail to the mailing list was also posted to the newsgroup, and posts to the newsgroup were sent to the mailing list. Now there will simply be one avenue for gathering information rather than two. There are numerous options for reading news groups. Netscape, Mozilla and Outlook Express include news reading functions, and some ISPs may provide their own news reading applications. To use a news reading application, you would have to configure your news reading application to interact with a news server provided by your ISP. You can also get to newsgroups via a web-based news server such as groups.google.com. For information on the use of newsgroups, see http://www.terena.nl/library/gnrt/group/usenet.html and http://www.ocf.berkeley.edu/help/usenet/ Sincerely, The Icon mailing list moderator -- Sandra L Miller Department of Computer Science University of Arizona From icon-group-sender Tue Nov 25 12:59:33 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hAPJxWS07036 for icon-group-addresses; Tue, 25 Nov 2003 12:59:32 -0700 (MST) Message-Id: <200311251959.hAPJxWS07036@baskerville.CS.Arizona.EDU> X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Re: Icon mailing being retired From: Steve Wampler To: icon-group@cs.arizona.edu Date: Tue, 25 Nov 2003 10:18:48 -0700 X-Spam-Status: No, hits=-7.0 required=5.0 tests=BAYES_20,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN, X_AUTH_WARNING autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Tue, 2003-11-25 at 07:46, Sandra L Miller wrote: > > If you are interested in maintaining a presence in the Icon community, > we recommend that you follow discussions in the Icon newsgroup, > comp.lang.icon. You may be interested in also establishing a presence in Unicon community by joining the Unicon mailing list. The main Unicon webpage is http://unicon.sourceforge.net and the mailing list subscription signup can be found by following the link on that page or directly at: http://unicon.sourceforge.net/mailing.html Because Unicon tries hard (without being obtuse about it) to maintain backward compatibility with Icon (the vast majority of Icon programs run unchanged under Unicon), Icon related topics are quite welcome on the Unicon mailing list. -- Steve Wampler -- swampler@noao.edu The gods who smiled on your birth are now laughing out loud. From icon-group-sender Wed Dec 3 12:47:02 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hB3Jh1w09428 for icon-group-addresses; Wed, 3 Dec 2003 12:43:01 -0700 (MST) Message-Id: <200312031943.hB3Jh1w09428@baskerville.CS.Arizona.EDU> Date: Wed, 03 Dec 2003 07:39:57 -0700 From: Sandra L Miller X-Accept-Language: en To: icon-group@cs.arizona.edu Subject: Icon mailing list being retired X-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_30,USER_AGENT_MOZILLA_XM version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Dear Icon enthusiast, Due to the very low utilization of the Icon mailing list, it is being discontinued. After December 15, 2003, the Icon mailing list will no longer exist. After that date, submissions to the list and requests to join the list will answered with email explaining that the list has been retired and pointing the sender to the Icon newsgroup. If you are interested in maintaining a presence in the Icon community, we recommend that you follow discussions in the Icon newsgroup, comp.lang.icon. In the past, mail to the mailing list was also posted to the newsgroup, and posts to the newsgroup were sent to the mailing list. Now there will simply be one avenue for gathering information rather than two. There are numerous options for reading news groups. Netscape, Mozilla and Outlook Express include news reading functions, and some ISPs may provide their own news reading applications. To use a news reading application, you would have to configure your news reading application to interact with a news server provided by your ISP. You can also get to newsgroups via a web-based news server such as groups.google.com. For information on the use of newsgroups, see http://www.terena.nl/library/gnrt/group/usenet.html and http://www.ocf.berkeley.edu/help/usenet/ Sincerely, The Icon mailing list moderator -- Sandra L Miller Department of Computer Science University of Arizona From icon-group-sender Tue Dec 9 08:41:24 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hB9FeGl15927 for icon-group-addresses; Tue, 9 Dec 2003 08:40:16 -0700 (MST) Message-Id: <200312091540.hB9FeGl15927@baskerville.CS.Arizona.EDU> Date: Tue, 09 Dec 2003 07:54:30 -0700 From: Sandra L Miller X-Accept-Language: en To: icon-group@cs.arizona.edu Subject: Icon list being retired X-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_30,USER_AGENT_MOZILLA_XM version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Dear Icon enthusiast, Due to the very low utilization of the Icon mailing list, it is being discontinued. After December 15, 2003, the Icon mailing list will no longer exist. After that date, submissions to the list and requests to join the list will answered with email explaining that the list has been retired and pointing the sender to the Icon newsgroup. If you are interested in maintaining a presence in the Icon community, we recommend that you follow discussions in the Icon newsgroup, comp.lang.icon. In the past, mail to the mailing list was also posted to the newsgroup, and posts to the newsgroup were sent to the mailing list. Now there will simply be one avenue for gathering information rather than two. There are numerous options for reading news groups. Netscape, Mozilla and Outlook Express include news reading functions, and some ISPs may provide their own news reading applications. To use a news reading application, you would have to configure your news reading application to interact with a news server provided by your ISP. You can also get to newsgroups via a web-based news server such as groups.google.com. For information on the use of newsgroups, see http://www.terena.nl/library/gnrt/group/usenet.html and http://www.ocf.berkeley.edu/help/usenet/ Sincerely, The Icon mailing list moderator -- Sandra L Miller Department of Computer Science University of Arizona From icon-group-sender Tue Dec 9 12:35:09 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hB9JYj008755 for icon-group-addresses; Tue, 9 Dec 2003 12:34:45 -0700 (MST) Message-Id: <200312091934.hB9JYj008755@baskerville.CS.Arizona.EDU> From: Steve Wampler X-Newsgroups: comp.lang.icon Subject: Re: Desperately in need of help Date: Tue, 09 Dec 2003 09:02:22 -0700 X-Complaints-To: abuse@noao.edu User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-3.0 required=5.0 tests=BAYES_20,QUOTED_EMAIL_TEXT,REFERENCES,USER_AGENT version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO On Mon, 08 Dec 2003 23:10:48 -0800, Afgncaap5 wrote: ... > Anyway, I'm working towards creating a very simple, basic program that > will create data tables. Each cell of the table is named after a > letter of the alphabet, and each cell contains the number of times > that this letter has been encountered in the input. After this stage, > a random number generator is used to find a number between 0 and 1, > and each of the numbers in the cells are to be divided by the sum > total of all of the cells. The program will then select a letter of > the alphabet based on all of this. > > Now, my prof keeps telling me that there's an error in the code but is > absolutely refusing to tell me where the error is, what the error is > doing, and how I can go about fixing it. Can someone help me? > Included is a copy of the material that I'm working with. Have you tried compiling the code yet? There's definitely a syntax error - there is no keyword &alphabet. I suspect you mean &lcase again. This is a bit worrisome, as it means you haven't tried running the program yourself yet... There are also some logic flaws, from what I understand of the problem. For example: As it's written now, the entire program can be rewritten as: procedure main() write("z") end which probably isn't what you want! (My guess is that this is a work in progress, where you'll be adding more to the program as you get this part running.) Finally, the statement: &random := 0 probably isn't doing what you want. That does not randomize a timer. In fact, 0 is the initial value of &random, so the above line isn't really doing anything. If you want a different sequence of random numbers generated each time you run the program, you'll have to assign a unique (different) seed to &random each time you run the program. > procedure main() > &random :=0 #randomizes the timer > primary := table(0) #Creates a table with all values equal to zero > > test := string(&lcase) # Creates a string based on all lower-case > letters > > every primary[!test] +:=1 #Goes through every letter in the alphabet > and increments it by one > sum := 0 # creates a value of sum equal to zero > every x := !&lcase do > sum +:= primary[x] > > cumcounts := 0 > cumprob := table(0.0000) > every x:=!&lcase do{ > cumcounts +:= primary[x] > cumprob[x]:=(cumcounts*1.0000)/(sum *1.0000) > } > > > randnum := ?0 > every x := !&alphabet do { > if randnum <= primary[x] then { > letter := x > } > } > > write(x) > > end From icon-group-sender Thu Dec 11 13:07:18 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hBBK63022657 for icon-group-addresses; Thu, 11 Dec 2003 13:06:03 -0700 (MST) Message-Id: <200312112006.hBBK63022657@baskerville.CS.Arizona.EDU> From: "Frank J. Lhota" X-Newsgroups: comp.lang.icon Subject: Icon Implementation of Dijkstra's Guarded Command Control Structures X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Date: Thu, 11 Dec 2003 19:30:07 GMT X-Complaints-To: abuse@verizon.net To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-2.2 required=5.0 tests=BAYES_20,PRIORITY_NO_NAME version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO The following file contains an Icon implementation of control structures used in Edsger W. Dijkstra's classic book, "A discipline of Programming", along with a sample program using these control structures. It is to Icon's credit that the implementation of these control structures are much, much shorter than the description! ############################################################################ # # File: dijkstra.icn # # Subject: Procedures for Dijkstra's "Discipline" control structures # # Author: Frank J. Lhota # # Date: December 9, 2003 # ############################################################################ # # This file is in the public domain. # ############################################################################ # # The procedures do_od and if_fi implement the "do ... od" and "if ... fi" # control structures used in the book "A Discipline of Programming" by # Edsger W. Dijkstra. This book uses a programming language designed to # delay implementation details, such as the order in which tests are # performed. # # Dijkstra's programming language uses two non-ASCII characters, a box and # a right arrow. In the following discussion, the box and right arrow # characters are represented as "[]" and "->" respectively. # # The "if ... fi" control structure is similar to multi-branch "if" statements # found in many languages, including the Bourne shell (i.e. the # "if / elif / fi" construct). The major difference is that in Dijkstra's # notation, there is no specified order in which the "if / elif" tests are # performed. The "if ... fi" structure has the form # # if # Guard1 -> List1 # [] Guard2 -> List2 # [] Guard3 -> List3 # ... # [] GuardN -> ListN # fi # # where # # Guard1, Guard2, Guard3 ... GuardN are boolean expressions, and # List1, List2, List3 ... ListN are lists of statements. # # When this "if ... fi" statement is performed, the guard expressions are # evaluated, in some order not specified by the language, until one of the # guard expressions evaluates to true. Once a true guard is found, the list # of statements following the guard is evaluated. It is a fatal error # for none of the guards in an "if ... fi" statement to be true. # # The "do ... od" control is a "while" loop structure, but with multiple # loop conditions, in style similar to "if ... fi". The form of a Dijkstra # "do" statement is # # do # Guard1 -> List1 # [] Guard2 -> List2 # [] Guard3 -> List3 # ... # [] GuardN -> ListN # od # # where # # Guard1, Guard2, Guard3 ... GuardN are boolean expressions, and # List1, List2, List3 ... ListN are lists of statements. # # To perform this "do ... od" statement, the guard expressions are # evaluated, in some order not specified by the language, until either a # guard evaluates to true, or all guards have been evaluated as false. # # - If all the guards are false, we exit the loop. # - If a guard evaluates to true, then the list of statements following this # guard is performed, and then we loop back to perform this "do ... od" # statement again. # # The procedures if_fi{} and do_od{} implement Dijkstra's "if ... fi" and # "do ... od" control structures respectively. In keeping with Icon # conventions, the guard expressions are arbitrary Icon expressions. A guard # is considered to be true precisely when it succeeds. Similarly, a statement # list can be represented by a single Icon expression. The Icon call # # if_fi{ # Guard1, List1, # Guard2, List2, # ... # GuardN, ListN # } # # suspends with each result produced by the expression following the true # guard. If none of the guards succeed, runerr() is called with an appropriate # message. # # Similarly, the Icon call # # do_od{ # Guard1, List1, # Guard2, List2, # ... # GuardN, ListN # } # # parallels the "do ... od" statement. As long as at least one guard # succeeds, another iteration is performed. When all guards fail, we exit # the loop and do_od fails. # # The test section of this file includes a guarded command implementation of # Euclid's algorithm for calculating the greatest common denominator. Unlike # most implementations of Euclid's algorithm, this version handles its # parameters in a completely symmetrical fashion. # ############################################################################ # # Links: none # ############################################################################ ############################################################################ # # Produces a set of the indices of all the guard expressions in exp. # ############################################################################ procedure __Dijkstra_guard_index_set(exp) local result result := set() every insert(result, 1 to *exp by 2) return result end # __Dijkstra_guard_index_set ############################################################################ procedure do_od(exp) #: Dijkstra's do_od construct local all_guards, curr_guard all_guards := __Dijkstra_guard_index_set(exp) # Remember to use refreshed co-expressions so that they can be evaluated # more than once! while @^exp[ curr_guard := !all_guards ] do @^exp[ curr_guard + 1 ] end # do_od ############################################################################ procedure if_fi(exp) #: Dijkstra's if_fi construct local all_guards, curr_guard all_guards := __Dijkstra_guard_index_set(exp) if @exp[ curr_guard := !all_guards ] then suspend | @exp[ curr_guard + 1 ] else runerr(500, "if_fi: no guards succeeded") end # if_fi $ifdef TEST ############################################################################ # # Dijkstra version of the familiar Euclidean algorithm for gcd. # ############################################################################ procedure gcd(x, y) # Use static variables so that co-expressions can share them static lx, ly lx := abs(x) ly := abs(y) do_od{ lx >= ly > 0, lx %:= ly, ly >= lx > 0, ly %:= lx } return if_fi{ lx = 0, ly, ly = 0, lx } end # gcd procedure main(arg) local a, b a := integer(arg[1]) | 1836311903 b := integer(arg[2]) | 1134903170 return write("gcd(", a, ",", b,")=",gcd(a, b)) end # main $endif From icon-group-sender Fri Dec 12 07:40:43 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hBCEcQ424461 for icon-group-addresses; Fri, 12 Dec 2003 07:38:27 -0700 (MST) Message-Id: <200312121438.hBCEcQ424461@baskerville.CS.Arizona.EDU> From: Jesse Tov X-Newsgroups: comp.lang.icon Subject: Re: Icon Implementation of Dijkstra's Guarded Command Control Structures Date: 12 Dec 2003 02:40:56 GMT User-Agent: slrn/0.9.7.4 (Linux) To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-1.3 required=5.0 tests=BAYES_30,QUOTED_EMAIL_TEXT,REFERENCES,USER_AGENT version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Frank J. Lhota : > The following file contains an Icon implementation of control structures > used > in Edsger W. Dijkstra's classic book, "A discipline of Programming", along > with a sample program using these control structures. Cool! Unfortunately, I don't remember Icon well enough to understand it completely. Also, I'm not sure Dijkstra's control structures are so great, but maybe that's just because most of us aren't used to them; also, I haven't read the book (yet). Jesse From icon-group-sender Mon Dec 15 07:46:26 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hBFEjEf13660 for icon-group-addresses; Mon, 15 Dec 2003 07:45:14 -0700 (MST) Message-Id: <200312151445.hBFEjEf13660@baskerville.CS.Arizona.EDU> X-Sender: dnaugler@semovm.semo.edu Date: Mon, 15 Dec 2003 08:26:48 -0600 To: Sandra L Miller , icon-group@cs.arizona.edu From: David Naugler Subject: Re: Icon list being retired X-Spam-Status: No, hits=-1.3 required=5.0 tests=BAYES_30,IN_REP_TO version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO I have been a regular "lurker" of the list for several years (I've posted only once) and have very much enjoyed the postings. Icon is a wonderful language and one I regularly teach in programming languages. Many of my students also love Icon. I want to thank everybody involved with the mailing list and with Icon. I will miss the postings. I'm now a lurker of the Unicon list. Thanks again, David Naugler Southeast Missouri State University From icon-group-sender Mon Dec 15 08:23:24 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hBFFNNw14860 for icon-group-addresses; Mon, 15 Dec 2003 08:23:23 -0700 (MST) Message-Id: <200312151523.hBFFNNw14860@baskerville.CS.Arizona.EDU> Date: Mon, 15 Dec 2003 08:16:27 -0700 From: Sandra L Miller X-Accept-Language: en To: icon-group@cs.arizona.edu Subject: Icon mailing list officially retired X-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_20,USER_AGENT_MOZILLA_XM version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO Dear Icon enthusiast, Due to the very low utilization of the Icon mailing list, it is being discontinued. As of today, December 15, 2003, the Icon mailing list no longer exists. After today, submissions to the list and requests to join the list will answered with email explaining that the list has been retired and pointing the sender to the Icon newsgroup. If you are interested in maintaining a presence in the Icon community, we recommend that you follow discussions in the Icon newsgroup, comp.lang.icon. In the past, mail to the mailing list was also posted to the newsgroup, and posts to the newsgroup were sent to the mailing list. Now there will simply be one avenue for gathering information rather than two. There are numerous options for reading news groups. Netscape, Mozilla and Outlook Express include news reading functions, and some ISPs may provide their own news reading applications. To use a news reading application, you would have to configure your news reading application to interact with a news server provided by your ISP. You can also get to newsgroups via a web-based news server such as groups.google.com. For information on the use of newsgroups, see http://www.terena.nl/library/gnrt/group/usenet.html and http://www.ocf.berkeley.edu/help/usenet/ Sincerely, The Icon mailing list moderator -- Sandra L Miller Windows System Administrator Department of Computer Science University of Arizona "The opinions or statements expressed herein are my own and should not be taken as a position, opinion, or endorsement of the University of Arizona." From icon-group-sender Mon Dec 15 08:23:15 2003 Return-Path: Received: (from root@localhost) by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id hBFFNAP14842 for icon-group-addresses; Mon, 15 Dec 2003 08:23:10 -0700 (MST) Message-Id: <200312151523.hBFFNAP14842@baskerville.CS.Arizona.EDU> From: Gregg Townsend Subject: Re: Icon discussions moving to comp.lang.icon Date: Mon, 15 Dec 2003 08:02:14 -0700 To: icon-group@cs.arizona.edu X-Spam-Status: No, hits=-5.5 required=5.0 tests=BAYES_10,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_APPLEMAIL version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Errors-To: icon-group-errors@cs.arizona.edu Status: RO > I want to thank everybody involved with the mailing list and with > Icon. I > will miss the postings. And everybody remember: We're still going to talk about Icon on the comp.lang.icon newsgroup. Hope to see you over there. Gregg ------------------------------------------------------------------------ --- Gregg Townsend Staff Scientist The University of Arizona gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA