r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

shadwolf
2-Dec-2009
[20022x2]
but with the request injection the reply is the data ....
rhat's what the PHP script does it  get the raw data tehn locate 
the metatag part and extract the needed data
Oldes
2-Dec-2009
[20024]
check this:
 maxlen: 20 * 4096
 p: open/direct/binary tcp://ifb.impek.com:8000
 insert p "GET / HTTP/1.0 ^/Icy-MetaData:1 ^/^/"
 data: copy #{}
 while [buf: copy/part p 20048][
 	append data buf
 	probe length? buf
 	if f: find buf "StreamTitle" [
 		probe as-string copy/part f find f ";"
 		break
 	]
 	if maxlen <= length? data [break]
 ]
 probe length? data
 close p
shadwolf
2-Dec-2009
[20025]
oldes with you last methode we get the information i want 
oldes with you last methode we get the information i want 

StreamTitle='RACHID TAHA     BONJOUR';StreamUrl='';            vMQ(@K 
                 @  abm@]kaz 
Oldes
2-Dec-2009
[20026]
I know:) but you should parse it using some better way, if you want 
to also store the MP3
shadwolf
2-Dec-2009
[20027x3]
so i do a find "StreamTitle=" or a parse data [ some [ "StreamTile=" 
 copy artistsong thru ";StreamUrl="]
in  order to isolate the  inforation i want
oldes i don't care the MP3 i can't decode it with rebol ....
Oldes
2-Dec-2009
[20030]
no.. the StreamTitle is just a part of the ICY info
shadwolf
2-Dec-2009
[20031]
i just want the StreamTitle information ...
Oldes
2-Dec-2009
[20032x2]
ok, if you need only the name, than it should be enough, if you don't 
get the info just in the buf border
btw, I like Rachid Taha's music:)
shadwolf
2-Dec-2009
[20034x5]
yeah that's the new one  ok i made a HTML version oldes if you want 
to see the bot
irc.quoimagueule.com:6667 #maurice
ok it work perfect thank you oldes  ^^
hum the HTML modeparsing is faster than the binary version T___T 
at least i learned many things on the net area...
thank you very much for your time oldes
Oldes
2-Dec-2009
[20039]
because the binary is used for player, and zou first get about 40kB 
of data before the name.
shadwolf
3-Dec-2009
[20040x2]
yeah
oldes one day we will do a winamp streaming player  using Rebol 3 
 in only 10 lines :P
Steeve
3-Dec-2009
[20042]
About comparing pairs, currently we've got an error...
>> 1x1 < 2x2
== script error! cannot compare pair! with pair!

Is that "y" must take precedence over "x" (as in R2), or not. 
But a default behavior must be taken.


Personnaly I prefer no coordinate precedence (i don't really care).
i.e. :
>> pair1 < pair2
as
>> pair1 = min pair1 pair2
Oldes
3-Dec-2009
[20043]
I agree
Geomol
3-Dec-2009
[20044x2]
Isn't this more correct?
(pair1 = min pair1 pair2) and (pair1 <> pair2)
Yours is the same as:
pair1 <= pair2
Steeve
3-Dec-2009
[20046]
correct
BrianH
4-Dec-2009
[20047x2]
IMO both coordinates should be lesser for < to return true. If you 
want to compare the x or y coordinates on their own, do so.
So p1 < p2 would be the same thing as (p1/x < p2/x) and (p1/y < p2/y).
Geomol
4-Dec-2009
[20049x2]
It's also problematic using MIN with pairs to make some rules, as 
can be seen with this example:

>> min 2x2 3x1
== 2x1


It seems, MIN can create a new value, that isn't among the input 
values. Related to this is complex numbers, that have a real and 
an imaginary part (like 2D coords have two parts). In e.g. Python, 
you get an error, when using inequalities (<, >, <= and >=) with 
complex numbers. In math, it doesn't really make sense to use an 
equality with two complex numbers. You can do that with the absolute 
value (like length of a vector).


So maybe it's more correct to give an error, when comparing pairs 
this way, like R3 does now.
or use the rules found here:

http://en.wikipedia.org/wiki/Inequality#Complex_numbers_and_inequalities
and here:
http://en.wikipedia.org/wiki/Inequality#Vector_inequalities
Henrik
4-Dec-2009
[20051]
http://www.rebol.net/r3blogs/0299.html

Juicy stuff now.
Janko
5-Dec-2009
[20052]
what is command! type ?
Pavel
5-Dec-2009
[20053]
This is a function exported from extension, becaouse you can write 
different function using differend type of arguments it is globally 
called command! Another thing is some abstraction in names used in 
future things in (Carl's) mind.
Henrik
9-Dec-2009
[20054]
http://www.rebol.net/r3blogs/0300.html

New 'export method.
Janko
9-Dec-2009
[20055]
http://paste.factorcode.org/paste?id=1057Is this dumb proposition 
?
Steeve
9-Dec-2009
[20056]
Janko, I don't see the need, we can do that easly, using bindology.

make-report: func [ data ]  bind [
    p: new-page
    f: font "arial" 12
    goto p 100 100
    print p f data/title newline
    row p f [ "item" "qty" "price" ]
    save p %file.pdf
] haru-pdf
Janko
9-Dec-2009
[20057x2]
even better then :) .. but what is haru-pdf in this case ? is it 
a module?
and can you put more than one in-there?  for example two modules 
[ haru-pdf image-loader ]  ?
Steeve
9-Dec-2009
[20059x2]
? bind
haru-pdf can be a module or an object
Janko
9-Dec-2009
[20061x2]
I don't have rebol at this comp.. I will look
well then it's fawesome already
Steeve
9-Dec-2009
[20063]
fawesome ?
Janko
9-Dec-2009
[20064]
:) some startup invented word fugly here .. f*** ugly ... so this 
would be f*** awesome :)
Steeve
9-Dec-2009
[20065]
you can do several bind in chain.
bind bind [...] haru-pdf image-loader
Janko
9-Dec-2009
[20066]
aha, so you could create bind-all that would receive a block of contexts 
and bind to them all .. I see now bind is also in R2 which I have 
here
Steeve
9-Dec-2009
[20067]
Allowing a block of contexts for bindings has been already requested 
in curecode for R3
Janko
9-Dec-2009
[20068x3]
ha, I tried and it really works :) 


a: context [ name: "janko" ]  aa: func [ ] bind [ print name ] a 
aa 
janko
(btw fugly was the for the measuring the code ugliness and it was 
the most ugly code)
I posted your example on paste code for anyone that will be looking
Steeve
9-Dec-2009
[20071]
fine