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

PeterWood
17-Mar-2009
[805]
It's about 65 lines so rather than post it here I will email you 
a copy.
Sunanda
18-Mar-2009
[806]
Thanks.
Anton
18-Mar-2009
[807]
Ok, so things seem to be proceeding well. The rebol.org Library's 
support for utf-8 was actually stronger than thought, and what're 
being added are functions to help deal with legacy client apps which 
misidentify the file encoding.
PeterWood
18-Mar-2009
[808]
It's not just legacy client apps unless you consider all Rebol/View 
scripts as legacy apps.
Anton
18-Mar-2009
[809x2]
Yes, I do.
I understand what you mean, and obviously the definition of "legacy" 
is a bit fuzzy.
Sunanda
18-Mar-2009
[811]
Using Peter's code (thanks again!), I've made two changes to the 
download-a-script link:


1. if we find UTF-8 chars in a script, we download it with the HTTP 
content type charset=utf-8


But that probably makes no practical difference.  A downloaded script 
will be saved by the browser, and then opened by a text editor. The 
text editor is unlikey to be passed the charset setting. So:


2. Scripts with UTF-8 encoding are downloaded with a few lines of 
comment at their top. The comment explains the possible problem.


Thanks to all for the comments and help with getting things this 
far.
Anton
19-Mar-2009
[812x2]
Sundanda, good job, I was hoping you'd do that, and you did.
I'm interested in the utf-8 detection function. Can it be published?
Maxim
20-Mar-2009
[814x2]
sunanda:  I have a feature proposal for you  :-)


it would be nice to be able to supply a single picture to link with 
the scripts. this image (jpg, png, gif) would have hefty size limitation 
and I think only one image per script should be enough, but having 
this alongside the various listings of the application and within 
searches, new scripts, etc would be really cool.


sometimes, if you see a thumbnail (ui grab, console example, logo, 
output gfx, whatever), it will help raise people's curiosity.  this 
could probably benefit quite a few scripts, which are possibly overlooked.


having a simple search filter of scripts with pics, could also help 
people to quickly find usefull things at a glance.


what do you think?  it could start out really simple, and slowly 
thumbnails could creep into various listings of scripts.
maybe, we could eventually have more than one picture, like pics 
which are specifically tagged as gui screenshots, for example.
Sunanda
20-Mar-2009
[816]
Nice idea, thanks ..... Let me think about it.
Maxim
20-Mar-2009
[817]
cool, let me know if you want to test it, I'll be happy to supply 
imgs for my scripts.
Alan
22-Mar-2009
[818]
re:pictures. Some but not all scripts also have docs, so that might 
be a good place to add them.For those that don't,a clickable small 
thumbnail?
Maxim
26-Mar-2009
[819]
you mean add the pictures at the header of docs?  or allow us to 
use the pics within the docs?
Sunanda
26-Mar-2009
[820x3]
Max, I assumed you meant have the pic on the main page for the script, 
eg for liquid.r you'd see a thumbnail here:
   http://www.rebol.org/view-script.r?script=liquid.r
That's a nice idea, though there are some technical CSS issues......For 
example, the actual script is displayed in a <pre> block. That means 
images may not float where you'd expect them. It'll take some experimentation 
to find the best way to do it.
....Maybe a better slot for a thumbnail would be in the LHS menu, 
just under the <Script Library Home> link. That would keep it out 
of the flow of the page.
Please suggest better ideas :-)
mhinson
14-Apr-2009
[823]
Hi, I am very new to Rebol so appologies if my questions are very 
simple.


I have been trying to use functions & examples from the library by 
pasting them into the REBOL/View console. When I do this I find most 
of them produce errors or lock up the console so I have to restart 
it.  What am I doing wrong please? Is there some trick to this that 
is so obvious that no one has mentioned it?

Thanks,
Pekr
14-Apr-2009
[824]
give me an example of such script. The thing might be, that some 
scripts are already dated, but most of them should work ...
sqlab
14-Apr-2009
[825x2]
There are two file versions in the library, one for viewing, one 
for downloading. Did you use the one
from http://www.rebol.org/download-a-script.r?script-name=....r
Maybe the other ones have problems.
Mike

I checked your library example from the I'm new group producing errors.

There is probably a weakness, as the script does not regard comment 
lines.
A short enhancement would be
   
parse-ini-file: func [
    file-name [file!]
   /local ini-block
    current-section
    parsed-line
    section-name
][
 ini-block: copy []
    current-section: copy []
    foreach ini-line read/lines file-name [
		if #";" <> first ini-line [ ; do not process comment lines
			section-name: ini-line
			error? try [section-name: first load/all ini-line]
			either any [
				error? try [block? section-name]
				not block? section-name
			][
				parsed-line: parse/all ini-line "="
				append last current-section parsed-line/1
				append last current-section parsed-line/2
			][
				append ini-block current-section
				current-section: copy []
				append current-section form section-name
				append/only current-section copy []
			] ;; either
		]
    ] ;; for
 append ini-block current-section
 return to-hash ini-block
 ]
Sunanda
15-Apr-2009
[827]
Thanks, sqlab......That works fine. (I should read the documentation 
in future before writing the script :)
I've updated the script in the Library:
   http://www.rebol.org/view-script.r?script=parse-ini.r
mhinson
15-Apr-2009
[828]
Thanks for your attenton to my questions. 

It seems I stumbled across the need for support of comments in ini 
files. I was also trying to cut & paste from the viewing version 
of some scripts, rather than the download version as I did not realise 
there was a destinction.  It is also possiable that my cut & pastes 
were not complete perhaps, as the scripts that would not run like 
that before seem to work ok now.


I notice that a lot of things show anomolous behaviour when used 
by inexperienced users who lack confidence. It is like they know 
who they can play tricks on, & who won't stand for it.
Sunanda
15-Apr-2009
[829]
Cut'n'paste ought to work. Though the download format is safer as 
it has been less processed (no escaping of embedded HTML codes etc).

I can sympathise -- I generally notice _any_ new device I buy (from 
computers to wrist watches) won't work for the first half hour or 
so, But as soon as I start to think that either it's defective, or 
I am very stupid, then it starts to play fair.

Animism is still a good first attempt at understanding the universe 
:-)
Maxim
28-Apr-2009
[830x5]
sunanda, sorry I missed the post where you added image support!  
wow.  will check it out immediately.
sorry, misread the post... you where asking for comments... not saying 
you did it hehehe.
yes, in the script description above the start of the script, under 
the :


     [View in color]   [View discussion [1 post]]    [License]   [Download 
     script]    [History]  [Other scripts by: moliad]



menu... just a list of uploaded images with a one line caption when 
you click on it, showing the full image. obviously, you should impose 
strinct size limits, enforcing proper compression.  and potentially 
a maximum size.
strinct = collation of stringent and strict   ;-D
I meant to say "merge of"
Sunanda
29-Apr-2009
[835]
Thanks Maxim, that's helpful.......Not sure when I can start twiddling 
with something like that, but it's on my list.
Maxim
29-Apr-2009
[836]
cool
Sunanda
24-Jun-2009
[837]
Just replied to a Feedback message sent to REBOL.org about the Script 
Library:
 
> When will the current script library "die"?

[The questioner suggests that R3 incompatibilities may mean we simply 
purge all R2 scripts to create an R3-only Library]

My response......

Thanks for the question. The simple answer is: I hope never.

***


Coincidentally, I have just started an exercise in seeing how many 
of my contributions to the Script Library will port with few or no 
changes.  The results are encouraging so far:
   http://www.rebol.org/art-display-article.r?article=j26z


I know some of my scripts will be obsoleted by R3. They can stay 
in the Library as R2-only resources.  I am hoping many of the rest 
will be code compatible between R2 and R3, so they will work either 
way.

***

Ladislav has also commented on his early porting experience:
  http://www.rebol.org/art-display-article.r?article=w24v

There is some discussion of the issue on the REBOL3 AltME world:
  http://www.rebol.org/aga-display-posts.r?post=r3wp453x15753

***

The Library has a flexible tagging method for scripts, see:
   http://www.rebol.org/st-topic-index.r

We can very easily add tags for (say)
   R3-ready
   R2-only


Or whatever seems the best set to help partition the scripts into 
R2, R3, or both.

Hope that helps a little!
BrianH
24-Jun-2009
[838x2]
The Needs header works in R3, and is only checked on DO, not LOAD.
The explicit named Needs loads modules rather than checks components, 
but the straight version Needs works the same.
Sunanda
24-Jun-2009
[840]
I'd noticed that change -- it's a good one, thanks.
Sunanda
25-Jun-2009
[841]
As Carl mentioned in Announcemements:

www.rebol.org is being moved by the ISP to a faster server.  I'm 
not sure they understand what's really involved, so it is very likely 
that the site is going to break.


I'm just going to set the site to read-only, as I am not sure they 
will be able to backup and copy everything while we are adding ML 
posts, scripts etc.  I hope normal service wiill be resumed asap!
Sunanda
26-Jun-2009
[842]
REBOL.org died last night because:

 -- the ISP copied the entire site in preparation for a server migration

 -- that doubled our disk usage ..... and took us over our disk space 
 quota
 -- so all file writes failed

 -- but they failed by writing zero byte length files. result data 
 loss and corruption of indexes
We are now restored and back up and running.


The server migration is still to come. As Carl says, it may  break 
things in other ways.
Janko
26-Jun-2009
[843]
uh? .. so you lost all data or a part of it or none?
Sunanda
26-Jun-2009
[844]
We lost no data.


But we lost the site for a little while.....Little things like this 
built up:
    -- you try to login
    -- we update your last-active time

    -- but that file write completely trashed your user-profile record
Or:
  -- we upload some more posts from this AltME world

  -- as we write them into our index data structures, it corrupts the 
  index, thus making the whole
     AltME archive unavailable.

Corrupt-on-write is a hard mode to recover from :-)
Janko
26-Jun-2009
[845]
huh..  writes failing by zeroing files is a thing that can cause 
quite few problems .. haven't been aware of that
Graham
26-Jun-2009
[846]
IOS used to do that ...
Ashley
27-Jun-2009
[847]
Just tried logging on without success ... is this due to the above 
problems or do I require a password reset? (I've got a couple of 
useful scripts I finaly want to upload).
Anton
27-Jun-2009
[848x2]
Sunanda, any idea what the ultimate cause for those corrupted file 
writes was?
(Oh - I re-read what you wrote above: your disk quote was exceeded 
by the backup.)
PeterWood
27-Jun-2009
[850x2]
Ashley: Are you still having problems logging on? I can log on.
I checked the user list and "Ashley" isn't displayed. This could 
be or one of three reasons:
1. You requested privacy when you first joined.
2. You used another name.
3. You membership expired


If I remember correctly memberships can expire if you haven't added 
a script to the library and haven't logged in to the site in the 
last six months.
Ashley
27-Jun-2009
[852]
I think that last one was the reason.
Sunanda
28-Jun-2009
[853]
Ashley's in, and adding scripts!
   http://www.rebol.org/cpt-list-scripts.r?user-name=ashley
btiffin
1-Jul-2009
[854]
Yayyy!   The 2008 rebol Of The Year posts the 900th script.   And 
great big round of Yayyyy!