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

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 < 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
Ladislav
20-Oct-2010
[1027]
Did you see such line endings in other library scripts, or do you 
think it is just me doing something strange?
Andreas
20-Oct-2010
[1028x7]
I get it for all scripts, AFAICT.
Just downloaded 2 different scripts at random, same weirdness.
Now let me see what's actually going on.
Okay, I get a script library header inserted, which uses CR LF to 
terminate lines.
Then the rest of the script uses CR LF as well.
But at the very end, there's a trailing single LF.
Ah, and there's a single leading LF as well, right before the script 
library-inserted header.
Sunanda
20-Oct-2010
[1035x2]
We've had all sorts of fun trying to get the line endings to work 
for everyone.


There's a magic, undocumented URL parameter you can add to the URL 
that might make a difference on your platform.

It is MODE=????


I'll just cut'n'paste the comment from the download-a-script source... 
it may help explain it:

;; mode=windows -- the default. Makes LF or CR into CRLF
;; mode=binary  -- sends file as binary
;; mode=carl    -- saved and reloads file first as Carl thought
;;                 this would fix the problem
;; mode=text    -- the old default. Works in most cases. Just
;;                 prints the file (so sends whatever line
;;                 terminations work on the platform the library
;;                 is running on.
But we (s far as I remember) accept contributions with whatever line 
endings they come with, so some may be pre-messed with.
Andreas
20-Oct-2010
[1037x2]
Yeah, unfortunately currently break line endings predictably.
That should be: currently you* break line endings predictably :)