1. we need official libs
- Posted by Lionel Wong <eljay98 at HOTMAIL.COM> Jun 19, 1999
- 547 views
There are too many include files for their purpose; the most popular seem to be math libraries and sequence manipulation (seqman) libraries. Example math libraries are Andy Montgomery's math.e, Jeff Zeitlin's math.e, Dave Brock's math.e, Carl R. White's mathbag.e, etc... The troubles that arise: incompleteness, naming conflicts, and usage confusions. I'm not surprised if most of us hate to trash our euphoria\include directory with so many files. I think the employment of misc.e isn't really correct. For example, the PI constant, arcsin() and arccos() should be in a math library together with other math routines. Similarly, reverse() should be put in a seqman library. I suggest RDS create (and distribute with the Eu package) an official math library, and maybe an official seqman library too. (call it "sequence.e"?) And everyone could help contribute to building these libraries. What do u think, Rob? Lionel Wong ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
2. Re: we need official libs
- Posted by Bernie Ryan <bwryan at PCOM.NET> Jun 19, 1999
- 524 views
>>Date: Wed, 24 Feb 1999 16:31:01 -0500 >>Reply-To: Euphoria Programming for MS-DO<EUPHORIA at LISTSERV.MUOHIO.EDU> >>Sender: Euphoria Programming for MS-DOS<UPHORIA at LISTSERV.MUOHIO.EDU> >>From: Bernie Ryan <bwryan at PCOM.NET> >>Subject: STANDARDS >>I think that rather than debating all these complex issue that >>we first start establishing some basic standard for the language. >>For example when someone authors an include file. There should >>be a precise format for the header that is agree to by all users >>For instance version #, date, author discription, etc> >>These agreed Standards would be incorporated into a standard document >>that could be kept at on the Euphoria Web page. >>Establishing standards that everyone abides by will help to make >>programming easier. >>We may not be able to change the language but we can contribute to >>it's growth in this simple way. >>Maybe you can think of some ideas for these standards instead of >>ideas about how to rewrite Euphoria. This would help everybody and it >>can be done right now. I sent the above message in February and nobody replyed so I don't think anyone is interested in establishing standards. Bernie Bernie
3. Re: we need official libs
- Posted by "Bruce M. Axtens" <bruce_axtens at SIL.ORG> Jun 21, 1999
- 527 views
Thus spake Bernie Ryan on Sat, 19 Jun 1999: >>>I think that rather than debating all these complex issue that >>>we first start establishing some basic standard for the language. >>>For example when someone authors an include file. There should >>>be a precise format for the header that is agree to by all users >>>For instance version #, date, author discription, etc> >>>These agreed Standards would be incorporated into a standard document >>>that could be kept at on the Euphoria Web page. >>>Establishing standards that everyone abides by will help to make >>>programming easier. >>>We may not be able to change the language but we can contribute to >>>it's growth in this simple way. >>>Maybe you can think of some ideas for these standards instead of >>>ideas about how to rewrite Euphoria. This would help everybody and it >>>can be done right now. > >I sent the above message in February and nobody replyed so I don't >think anyone is interested in establishing standards. Was I on the list in February? .... well whether I was or wasn't I'd like to vote in favour of programming standards. It would be nice to have a precise header, if only for the possibility of going to the main Euphoria site and running a search for a routine. Rob could put a search facility into the web page and I could then go there and search for, say, "Fast Fourier Transform" and the search engine would rip through the headers and return a list of likely candidates. Considering the rate of additions to the Archive and Reader Contribs sections, I've got Buckley's chance of finding anything these days except by reading through every item on the pages concerned. Having said all that I don't want to get involved in any religious arguments about variable naming standards just yet: let's get our interface to the outside world worked out first. Bruce. -------------------------------------------------------------------------------- Life has enough crises in it without magnifying our troubles during good times, yet peace of mind is often surrendered for such insignificant causes. - Dr. James Dobson --------------------------------------------------------------------------------
4. Re: we need official libs
- Posted by Robert Craig <rds at ATTCANADA.NET> Jun 21, 1999
- 524 views
Lionel Wong writes: > I suggest RDS create (and distribute with the Eu package) > an official math library, and maybe an official seqman > library too. (call it "sequence.e"?) And everyone could > help contribute to building these libraries. What do u > think, Rob? What math functions, and what sequence-related functions would you propose? I'm more interested here in functions that multiple people have actually encountered a need for, rather than functions that someone *imagines* might be useful. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/
5. Re: we need official libs
- Posted by Robert Craig <rds at ATTCANADA.NET> Jun 21, 1999
- 515 views
------=_NextPart_000_0072_01BEBBE7.F9D86320 charset="iso-8859-1" Bruce M. Axtens writes: > Considering the rate of additions to the Archive > and Reader Contribs sections, I've got Buckley's chance > of finding anything these days except by reading through > every item on the pages concerned. I'm not sure how to set up a decent search facility on the Web site, but here (attached) are the source files that we use for generating the Recent User and Archive pages. If you unzip this file in an empty directory somewhere, you can use cdguru.bat (see euphoria\bin) to search for keywords. Better still, maybe someone can write a program that will read in all these entries and organize them into a simple database, allowing for searches on any field, sorting, etc. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/ ------=_NextPart_000_0072_01BEBBE7.F9D86320 name="Contrib.zip"
6. Re: we need official libs
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Jun 23, 1999
- 534 views
On Sat, 19 Jun 1999, Lionel Wong wrote: ] There are too many include files for their purpose; the most popular seem to ] be math libraries and sequence manipulation (seqman) libraries. Example math ] libraries are Andy Montgomery's math.e, Jeff Zeitlin's math.e, Dave Brock's ] math.e, Carl R. White's mathbag.e, etc... The troubles that arise: ] incompleteness, naming conflicts, and usage confusions. [...] The problem the Euphoria world has is that there's no real collective entitity for language planning. To become my latent trekkie for a moment; It'd be nice if we could "Borg" up like the folks at Sun Microsystems who produced Java. After all, librarywise, Java is probably the most complete language. Which is probably why I don't use it ;) I *like* reinventing the wheel from time to time... Rob C. has a point though. What do we *really* need in terms of the language? Not many people are going to be using my Gamma.E mathbag extension (f'rinstance) , now are they? :) Since I'm not on the 'net much longer, I'll again try to start something that runs forever... We need (at least) the following libraries to match the basics of another language, say C, in order (IMHO) of necessity: Data type handling - Sequences, Strings, Pseudo-Arrays Mathematics - Trigonometrics, Hyperbolics, Exponentials & Logs Operating system wrapper - Win32Lib / Llama is a good example A GUI wrapper for DOS mode - There's a few of these, from the TEXT_GUI that I adopted, to some of the WinMan type stuff to DOS32Lib / LlamaDOS (if there is one...) Advanced Maths - More complex functions than the above, like Gamma ;) and nCr etc. Complex Maths? - Not many folks would need this, so it'd be an optional install/Downloadable option. I'm sure the list could be continued... In an ideal Euniverse (sp!) would-be library writers should ask what people would want to be in their new library. I would have probably taken a radically different approach to my libraries had I asked people to suggest routines and give pseudo-code ideas... Mathbag, especially, would be radically different, and would probably be split into smaller .E files. Hope that's useful to someone (HTUTS), Carl PS Re: Other "official" stuff... What do people think of my icons? :) :) -- Carl R White -- Final Year Computer Science at the University of Bradford E-mail........: cyrek- at -bigfoot.com -- Remove hyphens. Ta :) URL...........: http://www.bigfoot.com/~cyrek/ Uncrackable...: "19.6A.23.38.52.73.45 25.31.1C 3C.53.44.39.58"
7. Re: we need official libs
- Posted by Irv Mullins <irv at ELLIJAY.COM> Jun 23, 1999
- 526 views
On Wed, 23 Jun 1999, you wrote: > Since I'm not on the 'net much longer, I'll again try to start something > that runs forever... Idle curiosity: do you have a new job on, say, Pluto? I can't think of anywhere closer that doesn't have net access. Irv
8. Re: we need official libs
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Jun 23, 1999
- 553 views
On Wed, 23 Jun 1999, Irv Mullins wrote: ] On Wed, 23 Jun 1999, you wrote: ] ] > Since I'm not on the 'net much longer, I'll again try to start something ] > that runs forever... ] ] Idle curiosity: do you have a new job on, say, Pluto? I can't think ] of anywhere closer that doesn't have net access. Despite being old enough to be independent, I'm still living with parents, and the 'phone line has been deemed voice only (by order of they who must be obeyed). At the moment I don't have the cash to a) move out or b) get a second phone line, so I can't access the 'net from home. Not having a modem also affects certain things :) I graduate from University this year, so my account will no longer be available. I'll be back on this list if and when I regain 'net access. If I manage to get a job with a company with 'net access (which is likely), I'll not be able to use the 'net for personal use until I know how much of my day is taken up with actually needing to work. ;) I'll be around as long as I can be though. If and when my site goes back up, it'll be available through the Bigfoot redirection again. I need to find somewhere to host my site that lets me do the .cgi trickery I do here at the Uni. HTH, Carl -- Carl R White -- Final Year Computer Science at the University of Bradford E-mail........: cyrek- at -bigfoot.com -- Remove hyphens. Ta :) URL...........: http://www.bigfoot.com/~cyrek/ Uncrackable...: "19.6A.23.38.52.73.45 25.31.1C 3C.53.44.39.58"
9. Re: we need official libs
- Posted by Lucius Hilley <lhilley at CDC.NET> Jun 23, 1999
- 510 views
----- Carl R. White wrote: > >PS Re: Other "official" stuff... What do people think of my icons? :) :) > I like the Floppy Icons. I don't know what .prj or .pro are suppose to be though. Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+
10. Re: we need official libs
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Jun 23, 1999
- 536 views
At 11:52 AM 6/21/99 -0400, Rob wrote: >What math functions, and what sequence-related functions >would you propose? I would like to propose a few general math functions which I use all the time: max, min, abs, sgn. Colin Taylor
11. Re: we need official libs
- Posted by Roderick Jackson <rjackson at CSIWEB.COM> Jun 24, 1999
- 526 views
I'll vote for an 'abs' function. I haven't used 'min' and 'max' as much, and I'm not sure if I've ever had a need for 'sgn', but 'abs' should be a definite, if this ever comes to fruition. Rod Jackson ---------- From: Colin Taylor[SMTP:cetaylor at COMPUSERVE.COM] Sent: Wednesday, June 23, 1999 11:49 AM To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: we need official libs At 11:52 AM 6/21/99 -0400, Rob wrote: >What math functions, and what sequence-related functions >would you propose? I would like to propose a few general math functions which I use all the time: max, min, abs, sgn. Colin Taylor
12. Re: we need official libs
- Posted by "Boehme, Gabriel" <gboehme at POBOXB1.HQ.MSMAIL.MUSICLAND.COM> Jun 24, 1999
- 523 views
I've definitely run into the need for abs() and sign() in my programs. These are very basic math functions which apply both to general use as well as to more math-specific purposes. They're also standard in most other programming languages, if I'm not mistaken. Gabriel Boehme ---------- From: Roderick Jackson To: EUPHORIA; Boehme, Gabriel Subject: RE: we need official libs Date: Thursday, June 24, 1999 8:11AM I'll vote for an 'abs' function. I haven't used 'min' and 'max' as much, and I'm not sure if I've ever had a need for 'sgn', but 'abs' should be a definite, if this ever comes to fruition. Rod Jackson ---------- From: Colin Taylor[SMTP:cetaylor at COMPUSERVE.COM] Sent: Wednesday, June 23, 1999 11:49 AM To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: we need official libs At 11:52 AM 6/21/99 -0400, Rob wrote: >What math functions, and what sequence-related functions >would you propose? I would like to propose a few general math functions which I use all the time: max, min, abs, sgn. Colin Taylor
13. Re: we need official libs
- Posted by Lucius Hilley <lhilley at CDC.NET> Jun 24, 1999
- 532 views
At 11:52 AM 6/21/99 -0400, Rob wrote: >What math functions, and what sequence-related functions >would you propose? I vote for any of these that don't currently exist. Many of these should be rather trivial to implement. But still handy if they where already in a standard math.e. I also vote that the include file name of "math.e" be reserved for RDS. Any others should use names such as mathbag, mathsack, arith. In my case maybe even llh_math.e. That would be a great convention. everyone create your own math include and name it using your initials. Mine would be llh_math.e Then RDS can take from those math suggestions and create a standard math.e atom a integer i sequence s object x max(s) min(s) abs(x) sgn(x) sum(s) mean(s) mode(s) median(s) arcsin(x) arccos(x) arctan(x) Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+
14. Re: we need official libs
- Posted by Lucius Hilley <lhilley at CDC.NET> Jun 24, 1999
- 528 views
Below are some of my propose functions already built. Also average would be nice. The only catch here is that avg(s) = mean(s). mean() and average() are the same thing. global function abs(object x) -- Let me explain how abs() works. -- x = {-5, 0, 6} -- -(x < 0) = {-1, 0, 0} -- ({-1, 0, 0} * {-5, 0, 6}) = {5, 0, 6} return -(x < 0) * x end function global function sign(object x)-- or sgn(object x)-- I guess sgn() is clearer. -- Let me explain how sign() works. -- x = {-5, 0, 5} -- (x >= 0) = {0, 1, 1} -- (2 * {0, 1, 1}) = {0, 2, 2} -- ({0, 2, 2} - 1) = {-1, 1, 1} -- Negative becomes (-1) zero and greater become (1) return (x >= 0) * 2 - 1 end function global function max(sequence s) atom a a = s[1]--set current max to 1st value for Z = 2 to length(s) do-- go through remaining values if s[Z] > a then-- if value greater than current max then a = s[Z]-- set to current max end if end for return a end function global function min(sequence s) atom a a = s[1]--set current min to 1st value for Z = 2 to length(s) do-- go through remaining values if a > s[Z] then-- if current min is greater than value then a = s[Z]-- set to current min end if end for return a end function global function sum(sequence s) atom a a = 0-- set a to no value for Z = 1 to length(s) do-- go through each value and add it to a. -- a = a + s[Z] --2.0 compliace a += s[Z] --2.1 advantage end for return a end function global function mean(sequence s)-- or average(sequence s) s[1] = s[1] -- prevents null sequence. Therefore, -- prevents divide by zero. -- gives better error. return (sum(s) / length(s)) end funtion Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+
15. Re: we need official libs
- Posted by Roderick Jackson <rjackson at CSIWEB.COM> Jun 24, 1999
- 529 views
That's another function I'll vote for: 'sum'. I've run into a need for it several times before, but because writing the function for it each time was trivial, it hadn't come to mind. And I can see the need for the statistical and arccos, etc. functions. But perhaps they'd be better placed in an 'advmath.e' library? I'm sure they're commonly used, but only when serious math is needed. Then again, there doesn't seem to be a large number of these functions, so perhaps placing them with the more elementary ones wouldn't be too cumbersome... Rod Jackson ---------- From: Lucius Hilley[SMTP:lhilley at CDC.NET] Sent: Thursday, June 24, 1999 9:33 AM To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: we need official libs At 11:52 AM 6/21/99 -0400, Rob wrote: >What math functions, and what sequence-related functions >would you propose? I vote for any of these that don't currently exist. Many of these should be rather trivial to implement. But still handy if they where already in a standard math.e. <snip> atom a integer i sequence s object x max(s) min(s) abs(x) sgn(x) sum(s) mean(s) mode(s) median(s) arcsin(x) arccos(x) arctan(x)
16. Re: we need official libs
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Jun 24, 1999
- 533 views
At 08:11 AM 6/24/99 -0400, Roderick Jackson wrote: >I haven't used 'min' and 'max' as much I like to use max and min for enforcing limits. Instead of ... if x*5 > 400 then n = 400 else n = x*5 end if you can do ... n = min(400, x*5) Less messy, wouldn't you say? Colin Taylor
17. Re: we need official libs
- Posted by Roderick Jackson <rjackson at CSIWEB.COM> Jun 24, 1999
- 508 views
Colin Taylor[SMTP:cetaylor at compuserve.com] wrote: >At 08:11 AM 6/24/99 -0400, Roderick Jackson wrote: >>I haven't used 'min' and 'max' as much > >I like to use max and min for enforcing limits. Instead of ... > > if x*5 > 400 then > n = 400 > else > n = x*5 > end if > >you can do ... > > n = min(400, x*5) > >Less messy, wouldn't you say? I see your point... it's definitely less messy that way, but I had assumed 'min' and 'max' would apply to sequences. For example: i = min ({1,7,9,-11,33,0,4.6,-4}) -- -11 is assigned to i In fact, that's the only capacity in which I remember ever needing those functions. And in the actual instances I could have used them, the data values weren't stored conveniently in a single sequence anyway; making an "inlined" loop to find the min/max made more sense than writing a min/max function and then making a loop to construct the sequence of values. I could probably have made more use of a 2-element min/max function for limiting purposes in some of my types. But when writing types I generally optimize for speed over brevity or clarity, especially since types usually aren't that complex (at least, mine aren't.) So in types, I prefer coding things out in full rather than using a function call (unless that function call is for another type.) But all this begs the question... which format (min(atom,atom) versus min(seq)) would most people want? Myself, if min & max were included at all, I'd like to see the latter form. Rod Jackson
18. Re: we need official libs
- Posted by Bernie Ryan <bwryan at PCOM.NET> Jun 24, 1999
- 533 views
Rod When you send a message to the listserver the end always contains an extra 20 or 30 lines like the following: This is a sample (from the end of your last message)
19. Re: we need official libs
- Posted by Roderick Jackson <rjackson at CSIWEB.COM> Jun 24, 1999
- 540 views
Yipes... I suppose it's time to switch to a new email program. MS Exchange simply isn't doing the job. Sorry about the garbage, I don't know what it is; possibly font info, but if so I don't know how to turn it off. I'll look into it, thanks for letting me know. (And here I thought sending attatchments was the only problem...) Rod Jackson ---------- From: Bernie Ryan[SMTP:bwryan at PCOM.NET] Sent: Thursday, June 24, 1999 2:53 PM To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: we need official libs Rod When you send a message to the listserver the end always contains an extra 20 or 30 lines like the following: This is a sample (from the end of your last message)
20. Re: we need official libs
- Posted by Greg Phillips <i.shoot at REDNECKS.COM> Jun 24, 1999
- 529 views
Carl R. White wrote: > On Wed, 23 Jun 1999, Irv Mullins wrote: > > ] On Wed, 23 Jun 1999, you wrote: > ] > ] > Since I'm not on the 'net much longer, I'll again try to start something > ] > that runs forever... > ] > ] Idle curiosity: do you have a new job on, say, Pluto? I can't think > ] of anywhere closer that doesn't have net access. > > Despite being old enough to be independent, I'm still living with parents, > and the 'phone line has been deemed voice only (by order of they who must > be obeyed). At the moment I don't have the cash to a) move out or b) get a > second phone line, so I can't access the 'net from home. Not having a > modem also affects certain things :) > For the amount of money I'm spending on internet access and a second phone line, I could've moved out 3 times over by now =) > > [hack, slash, chop, snip] > I need to find somewhere to host my site that lets me do the .cgi trickery > I do here at the Uni. > I ran across something a little while ago, the Free Apache Webspace Project. I've had an account here for quite some time, and I'm impressed with the service. It allows CGI, more specifically, perl, but, I'm sure if you asked really, really nicely, the staff would *maybe* add other languages. At last check, they don't require banner ads or annoying popups or anything, which is great. > HTH, > Carl > > -- > Carl R White -- Final Year Computer Science at the University of Bradford > E-mail........: cyrek- at -bigfoot.com -- Remove hyphens. Ta :) > URL...........: http://www.bigfoot.com/~cyrek/ > Uncrackable...: "19.6A.23.38.52.73.45 25.31.1C 3C.53.44.39.58" Greg Phillips
21. Re: we need official libs
- Posted by Joe Otto <jotto at NETZERO.NET> Jun 24, 1999
- 519 views
- Last edited Jun 25, 1999
I'm in for all 4. Joe -----Original Message----- From: Roderick Jackson [SMTP:rjackson at csiweb.com] Sent: Thursday, June 24, 1999 8:11 AM To: 'Euphoria Programming for MS-DOS' Subject: RE: we need official libs I'll vote for an 'abs' function. I haven't used 'min' and 'max' as much, and I'm not sure if I've ever had a need for 'sgn', but 'abs' should be a definite, if this ever comes to fruition. Rod Jackson ---------- From: Colin Taylor[SMTP:cetaylor at COMPUSERVE.COM] Sent: Wednesday, June 23, 1999 11:49 AM To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: we need official libs At 11:52 AM 6/21/99 -0400, Rob wrote: >What math functions, and what sequence-related functions >would you propose? I would like to propose a few general math functions which I use all the time: max, min, abs, sgn. Colin Taylor
22. Re: we need official libs
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Jun 25, 1999
- 515 views
At 03:42 PM 6/24/99 -0400, Rod wrote: >which format (min(atom,atom) versus min(seq)) would most people want? I think the second form is better because it is more general and more Euphoria-style. My previous example could be written ... n = min({400, x*5}) Colin Taylor
23. Re: we need official libs
- Posted by "Marco A. Achury P." <achury at ELDISH.NET> Jun 25, 1999
- 520 views
- Last edited Jun 26, 1999
Roderick Jackson escribió: > Colin Taylor[SMTP:cetaylor at compuserve.com] wrote: > > I see your point... it's definitely less messy that way, but I had assumed > 'min' and 'max' would apply to sequences. For example: > > i = min ({1,7,9,-11,33,0,4.6,-4}) -- -11 is assigned to i > > In fact, that's the only capacity in which I remember ever needing those > functions. And in the actual instances I could have used them, the data > values weren't stored conveniently in a single sequence anyway; making an > "inlined" loop to find the min/max made more sense than writing a min/max > function and then making a loop to construct the sequence of values. > > I could probably have made more use of a 2-element min/max function for > limiting purposes in some of my types. But when writing types I generally > optimize for speed over brevity or clarity, especially since types usually > aren't that complex (at least, mine aren't.) So in types, I prefer coding > things out in full rather than using a function call (unless that function > call is for another type.) > > But all this begs the question... which format (min(atom,atom) versus > min(seq)) would most people want? Myself, if min & max were included at > all, I'd like to see the latter form. > What do you think about a function that return where is the min/max value in a sequence i = min ({1,7,9,-11,33,0,4.6,-4}) -- 4 is assigned to i (minimum is fourth position) i = max ({1,7,9,-11,33,0,4.6,-4}) -- 5 is assigned to i Even an Eu Style max!!! s = max ( { 1, 2, {3, 4}, 0}) -- {{3,2}}is assigned. The max is the second element of the third element!!!! When there are many elements whit the max value, return a sequence as: s = max {1, 2, 3, 4, {1, 2, 3, 4}} -- {4, {5,4}} is assigned. These are only ideas... -- +-+-+-+-+-+-+-+-+-+ Marco A. Achury P. http://members.xoom.com/achury mailto:achury at eldish.net ICQ: 19390207 Caracas, Venezuela
24. Re: we need official libs
- Posted by Lucius Hilley <lhilley at CDC.NET> Jun 27, 1999
- 523 views
- Last edited Jun 28, 1999
Okay, But what about atom a sequence values, seq values = {1,7,9,-11,33,0,4.6,-4, -11, 5, 8, -11} a = min ({1,7,9,-11,33,0,4.6,-4, -11, 5, 8, -11}) -- a = -11 if you want to act on ALL of the -11's then you could do this seq = (values = a) -- seq = {0,0,0,1,0,0,0,0,1,0,0,1} Anywhere there was a -11 now there is a 1 everywhere else is 0. Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+ > ---------------------- Information from the mail header ----------------------- > Sender: Euphoria Programming for MS-DOS > Poster: "Marco A. Achury P." <achury at ELDISH.NET> > Subject: Re: we need official libs > -------------------------------------------------------------------------- ----- > > Roderick Jackson escribió: > <SNIP> > > What do you think about a function that return where is the min/max value in a > sequence > > i = min ({1,7,9,-11,33,0,4.6,-4}) -- 4 is assigned to i (minimum is fourth > position) > i = max ({1,7,9,-11,33,0,4.6,-4}) -- 5 is assigned to i > > Even an Eu Style max!!! > > s = max ( { 1, 2, {3, 4}, 0}) -- {{3,2}}is assigned. The max is the > second element of the third element!!!! > > When there are many elements whit the max value, return a sequence as: > > s = max {1, 2, 3, 4, {1, 2, 3, 4}} -- {4, {5,4}} is assigned. > > These are only ideas... > > -- > +-+-+-+-+-+-+-+-+-+ > Marco A. Achury P. > http://members.xoom.com/achury > mailto:achury at eldish.net > ICQ: 19390207 > Caracas, Venezuela >
25. Re: we need official libs
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Jun 28, 1999
- 556 views
More on "min" and "max" ... After doing a fast review of the way similar Euphoria functions are written, I think that only two possible syntaxes (or is that syntices?) f= it the mold: example 1: obj =3D min(obj, obj) example 2: obj =3D min(seq) The first example doesn't add much to the language because its almost the= same as compare(). The second example would return the lowest top-level element in the sequence, treating the sequence in the same way as the sort(), find() and reverse() functions. My vote is for the second exampl= e. More on voting ... We should remember that the Euphoria community is not a democracy. I don= 't like the word "dictatorship", so maybe we should just call it a benevolen= t monarchy And while I'm on this soap box ... There seems to be a growing trend toward changing the subject name (threa= d name) with each new message. This makes it harder to follow a given thre= ad and also messes up the digests. Colin Taylor
26. Re: we need official libs
- Posted by Lucius Hilley <lhilley at CDC.NET> Jun 29, 1999
- 540 views
I agree on my preference of min() being the 2nd one. I also think that the first is okay but really should have a differrent name such as at_least() or more appropriately, threshold_min(). After all, that is really what it is. A threshold control with a minimium. Of course even it needs to be defined in functionality. Example: print(1, threshold_min({0,1,2,3,4}, 2)) should that print {0,0,2,3,4} or wouldn't it be better to print {2,2,2,3,4} Thus forcing those below the threshold into the desired range. I personally don't know which is better. With the 1st value you are assuming that if it doesn't reach the threshold that the value should be 0 but with the 2nd you are assuming that anything below the threshold should be raised to the threshold miniumum. Same is true of threshold_max(). Should you zero those beyond the threshold? I really think not. Even though my previous code doesn't reflect it. I embrace the 2nd method. Bring the values outside the threshold_min() or max to the specified threshold value. Below lies the correction to my previous sign() code. this code will return -1 for (negative) 0 for (zero) and +1 for (positive). Also is the threshold() routines to reflect my preference of how they should be handled. global function sign(object input) return ((input > 0) - (input < 0)) end function global function threshold_min(object input, atom threshold) return ((input * (input >= threshold)) + ((threshold > input) * threshold)) end function global function threshold_max(object input, atom threshold) return ((input * (threshold >= input)) + ((input > threshold) * threshold)) end function Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+ > ---------------------- Information from the mail header ----------------------- > Poster: Colin Taylor <cetaylor at COMPUSERVE.COM> > Subject: Re: we need official libs > -------------------------------------------------------------------------- ----- > > More on "min" and "max" ... > > After doing a fast review of the way similar Euphoria functions are > written, I think that only two possible syntaxes (or is that syntices?) f= > it > the mold: > > example 1: obj = min(obj, obj) > example 2: obj = min(seq) > > The first example doesn't add much to the language because its almost the= > > same as compare(). The second example would return the lowest top-level > element in the sequence, treating the sequence in the same way as the > sort(), find() and reverse() functions. My vote is for the second exampl= > e. > > More on voting ... > > We should remember that the Euphoria community is not a democracy. I don= > 't > like the word "dictatorship", so maybe we should just call it a benevolen= > t > monarchy > > And while I'm on this soap box ... > > There seems to be a growing trend toward changing the subject name (threa= > d > name) with each new message. This makes it harder to follow a given thre= > ad > and also messes up the digests. > > Colin Taylor >
27. Re: we need official libs
- Posted by Lionel Wong <eljay98 at HOTMAIL.COM> Jun 29, 1999
- 540 views
Rob said: >I'm more interested here in functions that multiple people >have actually encountered a need for, rather than functions >that someone *imagines* might be useful. The functions that i have in mind are those that are commonly used. And didn't i mention in my original post that having the PI constant, functions arcsin() and arccos() in misc.e is kind of awkward? As for seq-related functions, they seem to need no notice for now, as you guys have already shifted to attempting to compile a math library. Keep it up, you're doing fine! ------- Sometimes I post a message and then dissapear, even as the replies come and the thread grows. Sorry about it! I should have said this earlier: I actually only sit at my computer on weekends and some rare weekdays, hence my sloth in following the mailing list. So don't be surprised now if i ever reply to a message several days old! After reading what was apparently Rob's early disaproval of my request, I wanted to suggest simply *stamping an existing math library* as an alternative. But then u guys start posting and voting functions...i feel pretty cool!! 8) Lionel ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
28. Re: we need official libs
- Posted by Talvitie <smtoa at SAUNALAHTI.FI> Jul 13, 1999
- 507 views
also swap() (or xchg if you like) would come in need. It really bugs me = to write junk=3Da a=3Db b=3Djunk instead of swap(a,b).=20 --Tapani btw, it would be great if somebody would do a simple summary every month = or week bout the things been discussed/announced/etc. in the list = server. Why? because everybody can't participate to list all the = time(f.ex. when having a long vacation ;) Yesterday I checked my mail = after a month and a half and quess what! There was something like four = or five hundred messages send by Eu list server... I did read hundred or = two and maybe I'm going to check them all, but I'd rather would like to = read a few simple summaries and then go to mails that interest me most. Is this a bad idea? tell me what you think bout it :)
29. Re: we need official libs
- Posted by "C. K. Lester" <cklester at TICNET.COM> Jul 13, 1999
- 515 views
At 05:55 PM 7/13/99 +0300, you wrote: >Eu list server... I did read hundred or two and maybe I'm going to check >them all, but I'd rather would like to read a few simple summaries and then >go to mails that interest me most. >Is this a bad idea? tell me what you think bout it :) Who has the time? Of course, I'm sure somebody could be persuaded. Send your cash or check to me and I'll see what I can do.
30. Re: we need official libs
- Posted by Gary Dumer <dumer9354 at WHITE-MARSH.AIM-SMART.COM> Jul 13, 1999
- 502 views
>--Tapani > >btw, it would be great if somebody would do a simple summary every month or week bout the things been discussed/announced/etc. in the list server. Why? because everybody can't participate to list all the time(f.ex. when having a long vacation ;) Yesterday I checked my mail after a month and a half and quess what! There was something like four or five hundred messages send by Eu list server... I did read hundred or two and maybe I'm going to check them all, but I'd rather would like to read a few simple summaries and then go to mails that interest me most. >Is this a bad idea? tell me what you think bout it :) I think this is a great idea!!! I vote that you do it Gary
31. Re: we need official libs
- Posted by "Boehme, Gabriel" <gboehme at POBOXB1.HQ.MSMAIL.MUSICLAND.COM> Jul 13, 1999
- 510 views
Talvitie wrote: >also swap() (or xchg if you like) would come in need. It really bugs me >to write junk=a a=b b=junk instead of swap(a,b). I agree that it'd be convenient, but it would contravene one of the fundamental ways Euphoria works. When you do something like this in Euphoria... this = func(that, the_other_thing) ..you are 100% guaranteed that the values of "that" and "the_other_thing" will NOT change. Only "this" will be changed, since the only way a variable can be modified in Euphoria is to place it to the left of an assignment operation (=, +=, -=, etc.). This is a big advantage in many respects (avoidance of confusion, visually obvious data movement), but it can also be a bit of a stumbling block for those of us used to parameter-modification available in other languages (as exemplified by the "swap(a,b)" idea). A more "euphoric" approach to the swap idea would be for something like this to be possible: {a,b} = {b,a} We can't currently do this, of course, but it would be nice. In the meantime, we'll just have to use the old "junk=a a=b b=junk" approach, even though it bugs me, too. >btw, it would be great if somebody would do a simple summary every month >or week bout the things been discussed/announced/etc. in the list server. >[snip] From the mailing list page at the official Euphoria site: ]Digests ] ]You can arrange to have just one message per day ]delivered to your inbox. It will contain all the messages that ]were posted that day, in a somewhat condensed format. ] ]Send a message to ] LISTSERV at LISTSERV.MUOHIO.EDU ]with any subject, but the body must be: ] SET EUPHORIA DIGESTS ] ]This will reduce the number of messages arriving in your ]inbox. The disadvantage is that you won't be able to respond ]as quickly to messages that other people post. You might ]want to do this before going on vacation. To resume ]immediate message delivery, send the command: ] SET EUPHORIA NODIGESTS This is would accomplish basically what you're asking for here. Of course, for a month and a half, you'd have about 45 of these digests to wade through, but it'd be better than four or five hundred separate messages! Hope this helps, Gabriel Boehme
32. Re: we need official libs
- Posted by Bernie Ryan <bwryan at PCOM.NET> Jul 13, 1999
- 523 views
>btw, it would be great if somebody would do a simple summary every month >or week bout the things been discussed/announced/etc. in the list server. >[snip] A simple solution: Log OFF the listserver when you go on vacation. When you return log ON the listserver. Do a Search on the listserver between the dates you were gone. Look at the topics that are listed by your search and selectively read the messages that interest you. Bernie