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
26-Mar-2009
[821x2]
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!
Sunanda
9-Jul-2009
[855]
REBOL.org just migrated from the world's slowest single server to 
a small load balanced cluster.
Sadly, we're not superfast, but its early days yet.


One cosmetic problem: we're showing the date as 6 hours out. Highly 
trained techies are working to resolve that. Other than that, it 
was a smooth move, mainly handled by the ISP.
Maxim
10-Jul-2009
[856]
just noticed that downloading scripts seems to add a .txt extension 
after the .r   so you get  script.r.txt
Sunanda
10-Jul-2009
[857]
Thanks ... I'll add that to my list of migration quirks. We have 
several now :)
Maxim
10-Jul-2009
[858]
also, some scripts indexed on google do not have the same url now... 
no example, but just tought I'd point this out... its possible the 
url has changed slightly.
Sunanda
10-Jul-2009
[859x2]
I just tried  a script download under Windows:

-- when I selected "save to disk" it was saved as a *.r file as I';d 
expect
-- when I selected "open with notepad" it got named *.r.txt"
Google changes -- do you mean the whol /cgiwrap/ stuff in the middle 
of a URL?
Maxim
10-Jul-2009
[861]
here is an error I got trying to go to the http-tools.r script...

Not Found


The requested URL /cgi-bin/cgiwrap/rebol/view-script.r was not found 
on this server.


Additionally, a 404 Not Found error was encountered while trying 
to use an ErrorDocument to handle the request.
Apache Server at www.rebol.org Port 80
Sunanda
10-Jul-2009
[862]
Thanks -- I see that too......We need a tweak on the URL rewriting.
Maxim
10-Jul-2009
[863]
glad to help. :-)
Sunanda
10-Jul-2009
[864]
Thanks -- looks like our  .htaccess is being ignored by the new version 
of Apache.

I suppose I could mess around trying stuff in .htconfig to work around 
it.

Instead, I've asked the ISP why .htaccess is not enabled. I'll ley 
you know when they respond.
Graham
10-Jul-2009
[865]
I get an internal server error at www.rebol.org
Sunanda
10-Jul-2009
[866x2]
Thanks, So did I -- I uploaded one changed cgi script as part of 
the sea trials for the new site. And suddenly it all went dark.
Back now.....Not sure what happened, yet.
Got it -- what I'd uploaded (using our time-tested uploader) somehow 
had the wrong sort of line endings, and Apache got very unhappy.

My immediate attempted repair (hand upload via FTP) also had the 
same issue.
I have no idea why the line endings are suddenly acceptable.


The ISP saved the day by restoring the cgi-bin from the previous 
night's backup.
Gabriele
11-Jul-2009
[868]
Sunanda, what usually creates problems is the shebang line ending. 
If it's CRLF, the CR becomes part of the command line.
Sunanda
11-Jul-2009
[869]
Thanks Gabriele. That's probably what happened.

The real mystery though is why our upload process gets it wrong with 
the new server.
Sunanda
12-Jul-2009
[870]
Maxim -- 404s should be fixed now. Sorry again for the problem.

Gabriele -- the ISP explains it as some stray redirect for the duplicate 
folders we had during the migration. I am not sure I follow their 
explanation, but they say they've fixed it.