Mailing List Archive: 49091 messages

# newbie!?

### [1/20] from: jnk:clix:pt at: 30-Nov-2000 1:26

are newbies allowed???? ok... here it is... if I do print probe unique [1 2 3 4 1 1] it returns the unique values in this block.... but if I want the repeated ones???? in this particular case "1" ???? what should I do???? please... Iīm beguinning and iīm full of doubts.... ;o) thnkx

### [2/20] from: arolls:bigpond:au at: 30-Nov-2000 16:14

Hello,
> if I do print probe unique [1 2 3 4 1 1] > it returns the unique values in this block.... > but if I want the repeated ones???? in this particular case "1" ???? >> u: unique o: copy b: [1 2 2 2 3 4 1 1 1]
== [1 2 3 4]
>> head foreach i u [remove find o i]
== [2 2 1 1 1] ; b is the block, o (output) is a copy of that block, ; u is a 'unique'd copy of the same block ; foreach item of the unique block, remove that item from the output block ;(once only). That leaves, therefore, only the duplicate values in b. ; show me the head of the output series (o). Anton.

### [3/20] from: jnk:clix:pt at: 30-Nov-2000 14:29

ok... I studied the problem and came with the following... I want to evaluate a block and want to know if any vallues are repeated 3 times or if they are 3 different items in increasing order: like: [111] or: [123] I take the example, of the numbers block [1 2 3 4 1 1] because this is a possible case to be evalluated in the litle miserable (yet) proggy Iīm working on... well I want to be able to evalluate a block and determine if there are a certain number of increasing ordered items : 3 numbers: (in this case 1 2 3 )or, if there are (3 in this case) repeated items on the block like (111) (222) etc... thankx,

### [4/20] from: arolls:bigpond:au at: 1-Dec-2000 14:11

It's a bit confusing what you want. Could you give an example input block with real values (or real enough), and the corresponding output that you desire? Is it actually going to be just numbers that you are dealing with? Anton.

### [5/20] from: jnk:clix:pt at: 1-Dec-2000 3:25

yes... itīs actually a game iīm workin' on... each button inserts vallues in a variable... I want to know how to be able to return only the repeated vallues , repeated 3 times ...not less!!! this is what I came up with to return different vallues expl: [1 2 1 3 1 2] unique expl [1 2 3] but I want to do the opposite, a function that returns vallues repeated a predetermined number of times, choosing 3x in this case ... vallue "1" would be returned is it possible??? function expl [1 1 1] thnkx so much!!! Iīm really excited with this... never programmed in my life!!! ;o)

### [6/20] from: al:bri:xtra at: 1-Dec-2000 19:46

daPenguin wrote:
> but I want to do the opposite, a function that returns > vallues repeated a predetermined number of times, > choosing 3x in this case ... vallue "1" would be returned > is it possible??? > > function expl > [1 1 1]
Here's a starter for you:
>> expl: [1 2 1 3 1 2]
== [1 2 1 3 1 2]
>> Duplicates: func [Series [series!]][
[ foreach Item unique Series [ [ remove find Series Item [ ] [ Series [ ]
>> duplicates expl
== [1 1 2] Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/

### [7/20] from: lmecir:mbox:vol:cz at: 1-Dec-2000 8:58

Hi, one possible solution: ; using higher order functions do http://www.sweb.cz/LMecir/highfun.r repeated-n?: function [ {find out, if a given value is repeated n times in the series} series [series!] n [integer!] value [any-type!] ] [found] [ found: series repeat i n [ if not found: find found get/any 'value [break] found: next found ] found ] repeated-n: func [ {find n-times repeated values in a series} series [series!] n [integer!] ] [ filter do curry :repeated-n? 2 series n series ]
>> repeated-n [1 2 1 3 1 2] 3
== [1 1 1] Regards Ladislav

### [8/20] from: arolls:bigpond:au at: 2-Dec-2000 0:31

How about this? n-or-more: func [b n][ unique head repeat n n - 1 [ foreach i unique b [remove find b i] ] ] Use like this:
>> expl: [1 2 1 3 1 2] >> n-or-more expl 3
== [1] This means 1 occurs 3 times or more in the original. Note that it modifies the expl block. Also, n should be greater than 1. :) Anton.

### [9/20] from: al:bri:xtra at: 3-Dec-2000 9:23

> ok... I studied the problem and came with the following... > > I want to evaluate a block and want to know if any vallues are repeated 3
times or if they are 3 different items in increasing order: I'm available for hire or reward. Andrew Martin Some things one has to do oneself... ICQ: 26227169 http://members.nbci.com/AndrewMartin/

### [10/20] from: chaz:innocent at: 2-Dec-2000 19:42

At 09:23 AM 12/3/00 +1300, you wrote:
>> ok... I studied the problem and came with the following... >>
<<quoted lines omitted: 5>>
>ICQ: 26227169 http://members.nbci.com/AndrewMartin/ >-><-
Lo and behold! What have we here? None other than a living breathing "REBOL mercenary"! :) chaz P.S. You might be interested in this article at http://www.linuxplanet.com/linuxplanet/opinions/2708/1/ It's called ".comment: Making Money on Free Software? Is anybody actually doing it?"

### [11/20] from: mike:myers:cybarite at: 3-Dec-2000 10:04

Chaz once commented:
>> Lo and behold! What have we here? None other than a living breathing "REBOL
mercenary"! :) Great title!!! Andrew has earned it. I hope you don't mind if I use it too! :-)

### [12/20] from: allenk:powerup:au at: 4-Dec-2000 21:46

daPenguin, Perhaps you should get to know the callibre of the people you are insulting. Having a go at Andrew is not the best way to start in this community. Andrew is one quality REBOL who contributes a lot of time and effort and free scripts to the REBOL community. He is certainly warranted in occassionally putting his hand up for monetary reward for his skills, after all we don't want him starving and leaving us. :-) Maybe you were just trying to be funny?, sorry if I've misjudged your tone. Cheers, Allen K

### [13/20] from: jeff:rebol at: 4-Dec-2000 6:39

jnk: You might want to hire a tutor for some much needed work on your grammar, spelling, and typing, though.

### [14/20] from: carlos:lorenz at: 4-Dec-2000 13:31

daPenguin, Thatīs too bad and Allen K is right. Youīd better watch your steps in here. This is the most decent list Iīve ever been. --Carlos Lorenz

### [15/20] from: jnk:clix:pt at: 5-Dec-2000 2:16

Hey... wathīs up with you men????? donīt ya have sense of humour??? damn!!!! I migth have been a little hard on him... but I was just following this ...quote:
> Lo and behold! What have we here? None other than a living breathing
REBOL
> mercenary
! :)
> chaz
just kiddinīma man!!! but the fact that you put our knowledge for hire!!!... not in here I think!!! I may be far from your level... (if I have one!!!) I just want to have a little fun and play with rebol... and if you can chare a couple of seconds with me... fine!!! I didnīt ask for some major coding here!!!! just a couple lines thatīs all!!! sorry for nothinīī Iīll try to behave!!! :o) ***

### [16/20] from: al:bri:xtra at: 5-Dec-2000 17:36

jnk:
> Hey... wathīs up with you men????? > donīt ya have sense of humour???
I do have a sense of humour.
> damn!!!! > I migth have been a little hard on him... > but I was just following this ...quote: > > > Lo and behold! What have we here? None other than a living breathing
REBOL mercenary ! :) And I'm proud of it. I hope you, too, get to be skilled enough to be paid money for your skill.
> just kiddinīma man!!!
No, you're not kidding, you meant what you wrote, otherwise why would you write it?
> but the fact that you put our knowledge for hire!!!... > not in here I think!!! > I may be far from your level... (if I have one!!!) > I just want to have a little fun and play with rebol...
So write some Rebol code, and present it here.
> and if you can chare a couple of seconds with me...
Then we can Share some time. Note:-------^
> fine!!! > I didnīt ask for some major coding here!!!! > just a couple lines thatīs all!!!
Make the attempt and be a rebol programmer, instead of acting as a client.
> sorry for nothinīī > Iīll try to behave!!!
Instead of try, do.
> :o) > ***
Andrew Martin Sounding way too much like Yoda... ICQ: 26227169 http://members.nbci.com/AndrewMartin/

### [18/20] from: mat:eurogamer at: 5-Dec-2000 17:49

Heya daPenguin, d> a couple of dudezzz replyed to me... and asked Ugh, please don't encourage him. -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

### [19/20] from: jeff:rebol at: 5-Dec-2000 10:43

How about let's all dump the flaming? This list almost never has flaming, so let's return to our harmonious REBOL'in. Sorry, jnk, for criticizing your spelling. I should have noticed from your email that English is not your first language. Was just being protective of Andrew who is a long time valued list member. Cheers! -jeff

### [20/20] from: al:bri:xtra at: 6-Dec-2000 19:55

> I just want to learn something for fun...
Write Rebol. Do something with it, instead of asking others to fix your problems for you. Make an effort by yourself, and show that effort. Do some research, read the manual, get educated. Andrew Martin Give a man a fish and feed him for a day,... ICQ: 26227169 http://members.nbci.com/AndrewMartin/

Notes
• Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted