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

World: r3wp

[Ann-Reply] Reply to Announce group

Chris
23-Aug-2010
[2030x3]
The header is used to sign request parameters, including the parameters 
of the OAuth header.
The handshake is a multi-step process to get a user's credentials: 
request a temporary token, send the user to the site, user comes 
back and enters a code, request a permanent token.
That's all there is to it : )
Graham
23-Aug-2010
[2033]
Yeah ... I looked at this before and decided it was a little tricky 
:)
Chris
23-Aug-2010
[2034]
A more generic implementation may be a protocol that wraps around 
http(s).

read/custom oauth://[chris-:-api-:-twitter-:-com]/ [post a: 1 b: 2 c: 3]
Graham
23-Aug-2010
[2035]
sounds like a good idea :)
Chris
23-Aug-2010
[2036]
Doable, I think.  Need to have a way to store user info over sessions.
Graham
23-Aug-2010
[2037]
system/user ?
Chris
23-Aug-2010
[2038]
I think that's fine if it's for your own purposes...
Graham
23-Aug-2010
[2039]
as opposed to ?
Chris
23-Aug-2010
[2040x3]
Well, even for twitter, I maintain an account for my soccer team 
- so I have an app key/secret and two user key/secrets.
Then for google, you'd need an app key/secret and a user key/secret.
So you'd need to store by domain and user.
Graham
23-Aug-2010
[2043]
I see ...
Chris
23-Aug-2010
[2044x3]
api.twitter.com
 [
    "rgrebol" [
         key/secret/other metadata
    ]
]

docs.google.com
 [...]
And...
api.twitter.com
 [key/secret]
docs.google.com
 [key/secret]
AdrianS
24-Aug-2010
[2047]
get-env returns the value of an env variable, so you could concat 
that, system32, and the dll name
Maxim
24-Aug-2010
[2048x3]
replace the lib loading line with this:


k32-lib: load/library join to-file get-env "systemroot" %"/system32/Kernel32.dll"
it works for me
does it work for you?
AdrianS
24-Aug-2010
[2051x2]
not quite - the correct path is still prefixed with the directory 
of the rebol exe

** Access Error: Cannot open /C/dev/r2/C:\Windows/system32/Kernel32.dll
** Near: k32-lib: load/library join to-file get-env
need a leading "/" to make it an absolute path, no?
Maxim
24-Aug-2010
[2053]
oops... to-file should be  'TO-REBOL-FILE
AdrianS
24-Aug-2010
[2054]
OK, now
Maxim
24-Aug-2010
[2055]
ok, will update rebol.org file.
AdrianS
24-Aug-2010
[2056]
I get:

>> do http://www.rebol.org/download-a-script.r?script-name=windows-chrono.r
connecting to: www.rebol.org
Script: "Chrono - High-precision time measurement" (24-Aug-2010)
** Script Error: Feature not available in this REBOL
** Near: i64-struct: make struct! [
    low [integer!]
    hi [integer!]
] [0 0]
>>
Maxim
24-Aug-2010
[2057x2]
you are not using the latest rebol which has library support for 
free.
2.7.7 or higher?
AdrianS
24-Aug-2010
[2059]
2.7.7
Maxim
24-Aug-2010
[2060]
core or view?   AFAIK only the view version has the library support.
BrianH
24-Aug-2010
[2061]
Library support requires /View for now, not /Core.
AdrianS
24-Aug-2010
[2062x2]
that was core - with view, it works
what was the reason for limiting it to /View?
BrianH
24-Aug-2010
[2064]
It was limited to /View before. That limitation was just not removed 
yet. 2.7.7 was put out quickly.
AdrianS
24-Aug-2010
[2065]
I get significantly varying results from consecutive executions of 
 print ".". Is this typical?

>> probe time-lapse [print "."]
.
0:00:00.000521096
== 0:00:00.000521096
>> probe time-lapse [print "."]
.
0:00:00.001658861
== 0:00:00.001658861
>> probe time-lapse [print "."]
.
0:00:00.001802788
== 0:00:00.001802788
>> probe time-lapse [print "."]
.
0:00:00.00178686
== 0:00:00.00178686
>> probe time-lapse [print "."]
.
0:00:00.001694701
== 0:00:00.001694701
>> probe time-lapse [print "."]
.
0:00:00.001815304
== 0:00:00.001815304
>> probe time-lapse [print "."]
.
0:00:00.001718594
== 0:00:00.001718594
>> probe time-lapse [print "."]
.
0:00:00.0017971
== 0:00:00.0017971
>> probe time-lapse [print "."]
.
0:00:00.001743625
== 0:00:00.001743625
>> probe time-lapse [print "."]
.
0:00:00.002421733
== 0:00:00.002421733
>> probe time-lapse [print "."]
.
0:00:00.002234001
== 0:00:00.002234001
>> probe time-lapse [print "."]
.
0:00:00.001800513
== 0:00:00.001800513
>> probe time-lapse [print "."]
.
0:00:00.001718594
== 0:00:00.001718594
>>
BrianH
24-Aug-2010
[2066]
On Windows, yes. You will get varying results on anything. It's a 
non-real-time multitasking thing.
AdrianS
24-Aug-2010
[2067x2]
sure, I would expect some variation, but this seems a bit large
anyhow, this should be averaged over thousands of executions to get 
a more accurate value
BrianH
24-Aug-2010
[2069]
Anything that requires traditional I/O (not OpenGL or DirectX) will 
have a lot of variation on Windows. Video games use timers and delays 
to get consistent behavior.
Maxim
24-Aug-2010
[2070x4]
adrian, its up to you to put a loop in the block.
but, you can get a feel for relative speeds.... sine, on my system 
takes a little over 0.000015 seconds on average.  when I run the 
timer with a loop of 100000 It takes about 1.5 seconds... so the 
resolution of the timer is factual.
I'm using the timers to have much better resolution in controling/measuring 
frame rates.
its not perfect, because the time events aren't very reliable, but 
at least I can measure some of mouse events and throttle them.
AdrianS
24-Aug-2010
[2074x2]
does chrono-time work for you?
I get:
** Script Error: vin has no value
** Where: chrono-time
** Near: vin ["chrono-time()"] 
vout 
GLOBAL_CHRONO-TIMED +
Maxim
24-Aug-2010
[2076]
ohhh.... forgot to remove the call to 'VIN part of another library 
(also on rebol.org)
AdrianS
24-Aug-2010
[2077x2]
btw, how come you didn't want to use 'dt for 'time-lapse as in R3?
this could be part of 22-forward, I would think - at least for windows
Maxim
24-Aug-2010
[2079]
i don't like acronyms like that.  I could have used time-delay   
but  time lapse is actually more precise meaning, especially when 
speaking about chronometers.