1. suggestion sequence section
- Posted by gertie at visionsix.com Feb 07, 2003
- 488 views
Can we get: s = "abcdefgh" x = "1..2" ? s[x] This only borders on string execution. Kat
2. Re: suggestion sequence section
- Posted by "C. K. Lester" <cklester at yahoo.com> Feb 07, 2003
- 475 views
> s = "abcdefgh" > x = "1..2" > ? s[x] > > This only borders on string execution. I'm sure there's a reason, so I want to know why you can't go: s = "abcdefgh" x = 1 y = 2 ?s[x..y] or use an eXtractSequence function: s = "abcdefgh" x = "1..2" ? es( s, x ) where x can be an object... you'll just have to parse it out, which won't be too difficult. I think the results you want can be obtained, but maybe not the way you want to obtain them...?
3. Re: suggestion sequence section
- Posted by gertie at visionsix.com Feb 07, 2003
- 461 views
On 7 Feb 2003, at 15:53, C. K. Lester wrote: > > > s = "abcdefgh" > > x = "1..2" > > ? s[x] > > > > This only borders on string execution. > > I'm sure there's a reason, so I want to know why you can't go: > > s = "abcdefgh" > x = 1 > y = 2 > ?s[x..y] > > or use an eXtractSequence function: > > s = "abcdefgh" > x = "1..2" > ? es( s, x ) > > where x can be an object... you'll just have to parse it out, which won't be > too > difficult. Doing that now, simple matches and tests for type. What is your arguement against my suggestion to include this form in the language, where it could be done faster? > I think the results you want can be obtained, but maybe not the way you want > to > obtain them...? That can be said for almost anything. It's so good to know anything i suggest will be shot down, saves me from expecting anything till next year when someone else suggests it and it's accepted at that time. I am aware people will dismiss anything i say, merely because i am the one saying it, but at least the idea is out there, and someone else can add it to their calendar to bring it up again next year. Kat
4. Re: suggestion sequence section
- Posted by jbrown1050 at hotpop.com Feb 07, 2003
- 472 views
On Fri, Feb 07, 2003 at 03:53:57PM -0600, C. K. Lester wrote: > > > s = "abcdefgh" > > x = "1..2" > > ? s[x] > > > > This only borders on string execution. > > I'm sure there's a reason, so I want to know why you can't go: > > s = "abcdefgh" > x = 1 > y = 2 > ?s[x..y] > > or use an eXtractSequence function: > > s = "abcdefgh" > x = "1..2" > ? es( s, x ) > > where x can be an object... you'll just have to parse it out, which won't be > too difficult. > > I think the results you want can be obtained, but maybe not the way you want > to obtain them...? Or you can do what I did and write a parser to convert all s[x] to es(s, x), if you must have that syntax. Or, if you really want it in the interpreter, ask for it in the openeu mailing list, as it seems unlikely that RC will add such new inovative things in the mainstream interpreter. jbrown > > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon | \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME |
5. Re: suggestion sequence section
- Posted by gertie at visionsix.com Feb 07, 2003
- 462 views
On 7 Feb 2003, at 17:34, jbrown1050 at hotpop.com wrote: > > On Fri, Feb 07, 2003 at 03:53:57PM -0600, C. K. Lester wrote: > > > > > s = "abcdefgh" > > > x = "1..2" > > > ? s[x] > > > > > > This only borders on string execution. > > > > I'm sure there's a reason, so I want to know why you can't go: > > > > s = "abcdefgh" > > x = 1 > > y = 2 > > ?s[x..y] > > > > or use an eXtractSequence function: > > > > s = "abcdefgh" > > x = "1..2" > > ? es( s, x ) > > > > where x can be an object... you'll just have to parse it out, which won't be > > too difficult. > > > > I think the results you want can be obtained, but maybe not the way you want > > to obtain them...? > > Or you can do what I did and write a parser to convert all s[x] to es(s, x), > if > you must have that syntax. > > Or, if you really want it in the interpreter, ask for it in the openeu mailing > list, as it seems unlikely that RC will add such new inovative things in the > mainstream interpreter. I un-subbed from that list months ago, nothing i suggested was acceptable. I can get all the rejection i need here, thanks. Kat
6. Re: suggestion sequence section
- Posted by jbrown1050 at hotpop.com Feb 08, 2003
- 473 views
On Fri, Feb 07, 2003 at 05:19:22PM -0600, gertie at visionsix.com wrote: <snip> > > I un-subbed from that list months ago, nothing i suggested was acceptable. I > can get all the rejection i need here, thanks. > > Kat Actually, thats not exactly true (for example an eval statment is being discussed on, which was originally your idea iirc, every person and every idea is welcome), however, the list often does have an atmostphere full of debate, if you take it too personally then it probably is for the best that you stay off of there. (No offense, but you appear to take A LOT of things personally. Not exactly the best trait for a heavily argumental democratic language designing group.) jbrown > > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon | \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME |
7. Re: suggestion sequence section
- Posted by "C. K. Lester" <cklester at yahoo.com> Feb 08, 2003
- 479 views
On Friday 07 February 2003 04:29 pm, you wrote: > > Doing that now, simple matches and tests for type. What is your argueme= nt > against my suggestion to include this form in the language, where it co= uld > be done faster? Well, my questions are: 1. would it be truly faster, and if so, how much faster? 2. would it be easier to code? > > I think the results you want can be obtained, but maybe not the way y= ou > > want to obtain them...? > > That can be said for almost anything. Except goto's... ;) > It's so good to know anything i > suggest will be shot down... The fact is, until I understand more clearly where you're coming from, of= =20 COURSE I'm going to suggest alternate methods/algorithms. I expect ANYBOD= Y=20 who asks a question about EUPHORIA on this list would be willing to accep= t=20 answers to the positive and/or negative, including suggestions for how to= do=20 something differently than proposed. Since I wasn't clear on what you wer= e=20 currently doing, I offered a "work around" for the moment. You obviously=20 didn't need that. Shall I assume in the future that your questions are=20 rhetorical, because nobody can seem to offer you a pleasant enough answer= =2E > saves me from expecting anything till next year > when someone else suggests it and it's accepted at that time. How about in the future you contact someone on the list and ask them to p= ost a=20 suggestion for you? Then maybe you'll see all your wonderful ideas come t= o=20 fruition!
8. Re: suggestion sequence section
- Posted by gertie at visionsix.com Feb 08, 2003
- 454 views
On 7 Feb 2003, at 21:16, C. K. Lester wrote: > > On Friday 07 February 2003 04:29 pm, you wrote: > > > > Doing that now, simple matches and tests for type. What is your arguement > > against my suggestion to include this form in the language, where it could be > > done faster? > > Well, my questions are: > > 1. would it be truly faster, and if so, how much faster? I don't know. > 2. would it be easier to code? Not if you have the procedure already written. > > > I think the results you want can be obtained, but maybe not the way you want > > > to obtain them...? > > > > That can be said for almost anything. > > Except goto's... ;) Making every line a separate procedure works. > > It's so good to know anything i > > suggest will be shot down... > > The fact is, until I understand more clearly where you're coming from, of > COURSE I'm going to suggest alternate methods/algorithms. The lines of examples i gave were clear enough, which of them did you not understand? Oh, nevermind. > I expect ANYBODY who > asks a question about EUPHORIA on this list would be willing to accept answers > to the positive and/or negative, including suggestions for how to do something > differently than proposed. Since I wasn't clear on what you were currently > doing, I offered a "work around" for the moment. You obviously didn't need that. > Shall I assume in the future that your questions are rhetorical, because nobody > can seem to offer you a pleasant enough answer. You wouldn't believe the crap i get for making suggestions. me: lets add a line to the notice to inform users about the whatever when that happens them: no, i don't want to, you sit in here and answer them when they make the effort to come in and ask you about it every time the service is used. me: there is a bug in services them: no it's your mirc and windows computer <flame war ensues for 6 months> somebody_else: there is a bug in services, i use nix them: oh, there is a bug in servcies, thanks, somebody_else, i'll check it out now! > > saves me from expecting anything till next year > > when someone else suggests it and it's accepted at that time. > > How about in the future you contact someone on the list and ask them to post a > suggestion for you? Then maybe you'll see all your wonderful ideas come to > fruition! Tried that. When it wasn't mangled in the in-between, it was generally accepted. Goto <flame war ensues for 6 months> above. Kat
9. Re: suggestion sequence section
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 08, 2003
- 467 views
Kat, nothing is set in concrete yet. We have been discussing things in detail. In the next day or so I'll be introducing another discussion topic - namingly run time evaluation of code that is in strings or files. Other topic still to be discussed include GOTO, Labels, Case statements, and many others. We are building (slowly) a language specification. From that, we hope to encourage people to create implementations of the language. ---------------- cheers, Derek Parnell ----- Original Message ----- From: <gertie at visionsix.com> To: "EUforum" <EUforum at topica.com> Sent: Saturday, February 08, 2003 10:19 AM Subject: Re: suggestion sequence section > > On 7 Feb 2003, at 17:34, jbrown1050 at hotpop.com wrote: > > > > > On Fri, Feb 07, 2003 at 03:53:57PM -0600, C. K. Lester wrote: > > > > > > > s = "abcdefgh" > > > > x = "1..2" > > > > ? s[x] > > > > > > > > This only borders on string execution. > > > > > > I'm sure there's a reason, so I want to know why you can't go: > > > > > > s = "abcdefgh" > > > x = 1 > > > y = 2 > > > ?s[x..y] > > > > > > or use an eXtractSequence function: > > > > > > s = "abcdefgh" > > > x = "1..2" > > > ? es( s, x ) > > > > > > where x can be an object... you'll just have to parse it out, which won't be > > > too difficult. > > > > > > I think the results you want can be obtained, but maybe not the way you want > > > to obtain them...? > > > > Or you can do what I did and write a parser to convert all s[x] to es(s, x), if > > you must have that syntax. > > > > Or, if you really want it in the interpreter, ask for it in the openeu mailing > > list, as it seems unlikely that RC will add such new inovative things in the > > mainstream interpreter. > > I un-subbed from that list months ago, nothing i suggested was acceptable. I > can get all the rejection i need here, thanks. > > Kat > > > > TOPICA - Start your own email discussion group. FREE! >
10. Re: suggestion sequence section
- Posted by "Carl W." <euphoria at cyreksoft.yorks.com> Feb 10, 2003
- 472 views
gertie at visionsix.com wrote: > Can we get: > > s = "abcdefgh" > x = "1..2" > ? s[x] That's equivalent to ? s[{49,46,46,50}] which other people have requested return a sequence containing the 49th, 46th, 46th again and 50th elements of s[]. Which interpretation is better? Discuss. :) -- [ Carl R White == aka () = The Domain of Cyrek = ] [ Cyrek the Illogical /\ www.cyreksoft.yorks.com ]
11. Re: suggestion sequence section
- Posted by Lucius Hilley <l3euphoria at bellsouth.net> Feb 11, 2003
- 448 views
Oh boy. Well, I like them both. But my preference is put on s[{49,46,46,50}] = s[49] & s[46] & s[46] & s[50] The error message could be tricky to code though. Guess it would be like... Trying to index 50 in a length 49 sequence 50 > 49 or whatever it is that is closest to Robert Craig's error current message. Lucius L. Hilley III ----- Original Message ----- From: "Carl W." <euphoria at cyreksoft.yorks.com> To: "EUforum" <EUforum at topica.com> Sent: Monday, February 10, 2003 07:31 AM Subject: Re: suggestion sequence section > > gertie at visionsix.com wrote: > > > Can we get: > > > > s = "abcdefgh" > > x = "1..2" > > ? s[x] > > That's equivalent to ? s[{49,46,46,50}] which other people have requested > return a sequence containing the 49th, 46th, 46th again and 50th elements of > s[]. > > Which interpretation is better? Discuss. :) > > -- > [ Carl R White == aka () = The Domain of Cyrek = ] > [ Cyrek the Illogical /\ www.cyreksoft.yorks.com ] > > > > TOPICA - Start your own email discussion group. FREE! > >
12. Re: suggestion sequence section
- Posted by "Carl W." <euphoria at cyreksoft.yorks.com> Feb 11, 2003
- 470 views
Carl W. wrote: > gertie at visionsix.com wrote: > > > s = "abcdefgh" > > x = "1..2" > > ? s[x] > > That's equivalent to ? s[{49,46,46,50}] which other people have > requested return a sequence containing the 49th, 46th, 46th again and > 50th elements of s[]. > > Which interpretation is better? Discuss. :) I know I'm replying to myself here, but a third interpretation occurred to me after reading Lucius' response: String parse (Kat): s["1..2"] --> s[1..2] Element selection (Lucius): s[{49,46,46,50}] --> s[49] & s[46] & s[46] & s[50] Multidimensional access: s[{49,46,46,50}] --> s[49][46][46][50] _Now_ which is the better interpretation? Aargh!! :) Here's an (untested) code snippet that tries to roll all three into one: include get.e -- needed for value() type intseq(object o) -- sequence of integers if atom(o) then return 0 end if -- atom != sequence for x = 1 to length(o) do -- this loop is skipped if length is zero if not integer o[x] then return 0 end if end for return 1 end type type intseqinseq(object o) if sequence(o) and length(o) = 1 and intseq(o[1]) then return 1 end if return 0 end if end type function rerange(object i, integer len) -- Used to avoid errors with badly ranged subscripts if sequence(i) then return 1 elsif i < 0 then return len + i + 1 elsif i = 0 then return 1 elsif i > len then return len end if return i endf if function si(sequence s, object i) -- Usage: si(s, atom) -- returns s[atom] -- si(s, "1..2") -- returns s[1..2] -- si(s, {integer, integer...}) where there are no consecutive 46's -- returns s[integer1] & s[integer2] & etc. -- si(s, { {integer, integer...} }) -- returns s[integer1][integer2]... object i1, i2 integer len, ddot len = length(s) if not len then return {} end if -- can't index nothing! if atom(i) then return s[rerange(i,len)] elsif intseq(i) then ddot = match("..", i) -- Kat's "x..y" if ddot then i1 = value(i[1..ddot-1]) i1 = rerange(i1[1],len) i2 = value(i[ddot+2..len]) i2 = rerange(i2[1],len) -- swap if bad slice NB: s[n..n-1] is valid so is left alone if i2+1 < i1 then ddot = i1 i1 = i2 i2 = ddot end if return s[i1..i2] end if i1 = {} -- Lucius' element selection for x = 1 to len do i1 = append(i1, s[rerange(i[x],len)]) end for return i1 elsif intseqinseq(i) then -- Dimension stepping... i1 = s for x = 1 to len do if sequence(i1) then i1 = i1[rerange(i[x],length(i1))] else -- Not enough dimensions! return {} end if end for return i1 else -- 'i' is badly formatted! return {} end if end function Carl -- [ Carl R White == aka () = The Domain of Cyrek = ] [ Cyrek the Illogical /\ www.cyreksoft.yorks.com ]
13. Re: suggestion sequence section
- Posted by gertie at visionsix.com Feb 11, 2003
- 462 views
On 11 Feb 2003, at 11:56, Carl W. wrote: > > Carl W. wrote: > > > gertie at visionsix.com wrote: > > > > > s = "abcdefgh" > > > x = "1..2" > > > ? s[x] > > > > That's equivalent to ? s[{49,46,46,50}] which other people have > > requested return a sequence containing the 49th, 46th, 46th again and > > 50th elements of s[]. > > > > Which interpretation is better? Discuss. :) I would really like to use the [ ] as delimiters for a range, but the programmer would need to remember to put them in quotes, anyhow, so i was dropping their use in strtok, and using the quotes alone. The problem is when you mix what i said and what Lucious said below...... > I know I'm replying to myself here, but a third interpretation occurred to > me after reading Lucius' response: > > String parse (Kat): > s["1..2"] --> s[1..2] > > Element selection (Lucius): > s[{49,46,46,50}] --> s[49] & s[46] & s[46] & s[50] > > Multidimensional access: > s[{49,46,46,50}] --> s[49][46][46][50] > > _Now_ which is the better interpretation? Aargh!! :) In strtok, I went with what i did there. But i also went with what Lucious said. There is a problem with typecasting tho, and i am a long way from done with it. In my opinion, if i cast a atom, add it to a sequence, i want to be able to pick that atom off the front of the sequence as an atom, like: s = gettok(s,{atom&".."&atom},32) But both atoms become sequence types when gettok gets them. So i don't think your type intseq below will work as (i) expected (but i didn't try, i'm *really* distracted atm). Making things more versatile, for ease of use and being bulletproof, means using value() and sprintf(), dragging down execution speed. Derek tossed me an idea, which i will be trying asap, but prolly not today. A local MD was dragging a scalpel thru my back for an hour this morning, so you can see i have things on my mind, and taped to my back. Sorry about being not up to par for now. Kat