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

World: r3wp

[Script Library] REBOL.org: Script library and Mailing list archive

Graham
22-Jul-2010
[977x3]
Sure Anton .. fix your email client !
But those links are not usable by Rebol
So I have to right click on the download link and copy link location
Sunanda
22-Jul-2010
[980]
True.....But the page you get to does have a "download script" link. 
 That is usable by REBOL.
Graham
22-Jul-2010
[981]
I'd rather just you fix the direct link so that it's usable by Rebol 
... or, put the download on the page so I can double click and control 
C
Anton
22-Jul-2010
[982]
I'm fairly sure it's not my email client (which is Thunderbird). 
I thought it was some problem with ecartis which we never got around 
to fixing.
Graham
22-Jul-2010
[983]
Or, you have some javascript that copies the download link to my 
clipboard
Sunanda
22-Jul-2010
[984x2]
We did try to make the direct link usable by REBOl......But that 
is not easy as we have to escape chats like & and <
chats ==> chars !
Graham
22-Jul-2010
[986x2]
well, just detect what client it is and send the right thing
if the client is rebol .. we want the script !
Anton
22-Jul-2010
[988]
Link as above not usable by rebol; because PATH-THRU has simplistic 
algorithm for mapping url -> filepath, isn't it?
Sunanda
22-Jul-2010
[989]
Nice idea, Graham..... But the REBOL script might be a spider/inder 
like RIX; and so expects a HTML page.
We can't second guess cases like that.
Anton
22-Jul-2010
[990]
But yeah, I think it should be a bit less work to change rebol.org's 
urls than improve rebol's path-thru.
Graham
22-Jul-2010
[991]
yes you can ... because a spider will identify itself
Anton
22-Jul-2010
[992x3]
Bugger the javascript idea !  (Gawd!)
That's just piling on complexity.
(and I don't run with javascript most of the time).
Graham
22-Jul-2010
[995]
anyway I don't think it matters what spiders pull down
Sunanda
22-Jul-2010
[996]
No need for second guessing -- REBOL.org already has the "feed me 
a plain text" link -- use the Download script link for that.
That's simplicity......Isn't it!?
Graham
22-Jul-2010
[997x2]
just a few characters difference
No, because you cause every single person who recieves a rebol org 
link extra work
Anton
22-Jul-2010
[999]
A caveat for changing rebol.org's urls; there is a history of rebol.org's 
urls in mail postings etc. Changing them would invalidate those historical 
links (unless you also maintain support for those old links).
Graham
22-Jul-2010
[1000x3]
Anton, one doesn't change the link you just change the behaviour
If it's a browser .. give them a browser approprate view
Everyone else ... send them the script in an executable format
Anton
22-Jul-2010
[1003x2]
I feel similarly to Graham on that one. (ie. it's simple ok, but 
annoying).
Sorry, if I'm not clear, my head is quite foggy.
Sunanda
22-Jul-2010
[1005]
If any agent uses the HTML link, we send them the HTML page.

If any agent uses the plain-text link, we send them the plain text.

Anything else is likely to lead to complications for some users whose 
expectations we'd be disregarding.
Anton
22-Jul-2010
[1006]
It is a tough problem...
Sunanda
22-Jul-2010
[1007]
Yes, a simple request, but a tough problem to get right in all practical 
cases.
Anton
22-Jul-2010
[1008x2]
Sunanda, how did you change the simetrics matching? (I noticed there 
were several algorithms in the simetrics.r file, so I suppose you 
 selected a better one.)
And I just retested the 3dmoney.r page, now money.r is first in the 
suggestions list.
Nice one.
Sunanda
22-Jul-2010
[1010]
Thanks for retesting.

We use a couple of the algos, and then weight the results.


In addition, we do some other stuff -- like give additional weight 
if the first char matches; or if the lengths are similar.


And we gave some extra weight if the search string was fully contained 
within the script name (eg some bonus when matching "Apple.r" against 
"an-apple-script.r" (ignoring the .r of course).

What was missing was some extra weight if the script name was fully 
contained in the seach string (Money.r is fully wthin 3dmoney.r)....Adding 
that test raised its relevance.
Graham
22-Jul-2010
[1011]
Yep, the users are always wrong!
Anton
22-Jul-2010
[1012]
Mind your hyperbole, Graham!
Sunanda
22-Jul-2010
[1013]
Sometimes users ask for things that are not practical for other users, 
and thus us poor developers have to make choices that can leave some 
unhappy :)
Suppose I wanted this code to execute the first code block....

  do http://synapse-ehr.com/forums/showthread.php?120-RebGUI-table

....That's a reasonable request for me. But is it for all users, 
such as Rixbot?
Graham
22-Jul-2010
[1014x3]
You're missing the point ... if you want to make it easy for users 
to test scripts ..you need to make sure that the links the users 
pass around are usable by rebol
So either educate the users or change your server script
Or, as Mohammed was wont to do ...
Anton
22-Jul-2010
[1017x2]
Would a rebol function named "get-rebol.org-script" in your user.r 
(or built-in to rebol) help alleviate the problem at all?
It would just convert a "view-script.r" link into a "download-a-script.r" 
link, so that users take, for example, the money.r link and type 
this into their console:


 do get-rebol.org-script http://www.rebol.org/view-script.r?script=money.r
Graham
22-Jul-2010
[1019]
I fire up rebol consoles everywhere .. so I would need to have that 
function everywhere. Much simple to fix the source.
Sunanda
22-Jul-2010
[1020]
Simpler for _you_ if we change the source; but perhaps not simpler 
for _others_ who expect it as it is.

Another even easier solution (easier for me, anyway:)


....In theory, REBOL does hunt through verbiage looking for "REBOL 
[" and starts executing from there.


So If the R2/R3 interpretor also de-escaped strings like &lt; then 
the view-script would be executable.
Why not curecode/RAMBO that as a request!?
NickA
22-Jul-2010
[1021]
My 2 cents:  I like the way the links work now, but I also echoed 
Graham's request when I initially started using rebol.org.  Is it 
possible to hide a copy of the actual (downloadable script) code, 
at the top of the web page, so that it's executable by REBOL, but 
not visible by those using a browser?
Sunanda
22-Jul-2010
[1022]
Nice idea. But there is no foolproof way that does not leave someone 
with a screenreader seeing (or not seeing) double.

Also, may mess things up for (the few I hope) people with early CSS 
implementations in their browsers.


I'm still looking for an argument to convince me that one URL should 
serve two separate resources depending on user-agent sniffing.
Graham
22-Jul-2010
[1023]
You want an argument??  Let's step outside and discuss this!
Sunanda
22-Jul-2010
[1024]
:/)
Andreas
20-Oct-2010
[1025x2]
I'm seeing very strange line endings in scripts downloaded from the 
script library.
I am downloading http://www.rebol.org/download-a-script.r?script-name=test-framework.r