• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[!REBOL3] General discussion about REBOL 3

GrahamC
27-Jan-2013
[908x2]
What old answers if you don't have a SO account before?
For completeness I've asked the question about exporting and private
BrianH
27-Jan-2013
[910]
SO didn't previously require you to create an account or even provide 
an email address to answer questions. Since I didn't care about SO, 
I didn't bother to make an account. Now they require an email address, 
and use that email address to determine who you are. Creating an 
account is almost an extra, just a way to give you a nickname and 
profile info.
GrahamC
27-Jan-2013
[911x3]
You need a reputation of at least 20 to use the SO chat system ... 
and with ticks, you're already there.
with 2 ticks
BTW, we are encouraging the use of SO as a help resource for those 
who won't or can't use Altme
BrianH
27-Jan-2013
[914x2]
Yeah, I found that annoying, but I suppose it makes sense.
Do you want me to edit my answer to include the exporting stuff? 
I can't really do it in a comment since it would be in the same scale 
as the original answer.
GrahamC
27-Jan-2013
[916]
Edit the answer would be better
Andreas
27-Jan-2013
[917]
Or ask a separate question.
GrahamC
27-Jan-2013
[918]
Also, SO has an API so we can potentially grab all the Rebol tagged 
questions and also host them on rebol.org if we need to.  It's not 
stuck in the SO system
BrianH
27-Jan-2013
[919x2]
Too late, Andreas, I'm already editing the answer. It makes it easier 
to keep context this way.
Done.
Chris
27-Jan-2013
[921]
Thanks Brian, good answer!
GrahamC
27-Jan-2013
[922]
So, should schemes be isolated?
BrianH
27-Jan-2013
[923x4]
I've never needed to isolate something, so in general no. Most stuff 
should generally be regular modules or scripts. The rest are special 
cases.
I can imagine that if you want to have a module somehow negitiate 
some passwords and don't want them to leak, or some other security 
issue, you might want to write the module to be isolated. Also, if 
Maxim wanted to port slim to R3, or someone wanted to port Qtask 
(I forgot what it's called now, sorry) or some other code written 
for Gabriele's PowerMezz modules to R3, they might want to use named, 
private isolated modules.
One interesting use of isolated modules is to use IMPORT/no-share 
to force a module to load isolated even if it wasn't written for 
that. This is a way to use modules that are too messily written, 
that make too many unnecessary changes, and try to limit the mess 
a bit.
negitiate -> negotiate
james_nak
30-Jan-2013
[927]
Was there ever a mysql driver for R3? I saw some examples in the 
"import" docs but the link is not working.
BrianH
30-Jan-2013
[928]
There's an ODBC driver for R3, at least on Windows. It emulated R2-like 
port behavior. Can that be used to access mysql?
james_nak
30-Jan-2013
[929]
According to the mysql ref, yes. Thanks for the tip.
MaxV
31-Jan-2013
[930]
However, on linux is easy to ovverride any problem using "call", 
in the end I prefer this way.
Pekr
31-Jan-2013
[931x2]
Id depends, how fast is CALL, but especially on Linux, there should 
be very little overhead. E.g. I found out, that PHP, for Unicode 
conversions, just calls iconv. If you don't call the function in 
loop, I would go the CALL way, with tiny wrapper parsing results 
back. But - CALL on R3 misses /output and /wait ...
We need some bounty to bring R3 CALL on par with R2 :-)
AdrianS
31-Jan-2013
[933x2]
Maybe we could see what ist stopping Krzysztof from moving on this 
issue (which he mentioned he could work on). Possibly if some of 
the gurus would help him out with some Rebol pointers he could do 
it.

https://github.com/rebol/r3/issues/5
I contacted Krzysztof with this idea in mind.
GrahamC
31-Jan-2013
[935x2]
wait  value  /all

Waits for a duration, port, or both.

Arguments:

value [number! time! port! block! none!] 


Could wait be enhanced to wait for a particular value like unless?
wait [ port zero? word! ]
BrianH
31-Jan-2013
[937]
You mean waiting for a condition, rather than for a port, time or 
duration?
GrahamC
31-Jan-2013
[938]
In addition to
BrianH
31-Jan-2013
[939]
Waiting on a block is always "in addition to". I mean, being able 
to wait on a condition changing, as another wait feature. How would 
you want this implemented? We don't have write barriers for words 
(that I know of). WAIT basically works based on signalling events, 
afaik. Would a port scheme for generic signalling completion of a 
task do, as long as it's easy enough to do?
GrahamC
31-Jan-2013
[940x2]
Yes, a port scheme was something I was thinking of
How does wait on a date! work?  is the date checked or is there a 
signal/event produced on change of system date ?
Andreas
31-Jan-2013
[942]
wait does not work with date!, it works with time.
GrahamC
31-Jan-2013
[943]
Ah... the documentation is a little misleading then http://www.rebol.com/r3/docs/functions/wait.html
BrianH
31-Jan-2013
[944]
The spec is taken from R3, but the docs for this function haven't 
been updated from their R2 equivalents. A problem with a lot of the 
R3 docs, I'm afraid.
Andreas
31-Jan-2013
[945]
Thanks for reporting Graham, fixed.
GrahamC
31-Jan-2013
[946]
What is fixed?
Andreas
31-Jan-2013
[947]
The problem in the documentation you reported earlier.
GrahamC
31-Jan-2013
[948]
ahh... the old version was caching
BrianH
31-Jan-2013
[949x2]
I'm getting metaphorically killed by the FOREACH function blowing 
a system assertion 1207 periodically. I'm trying to process a couple 
thousand files and it's dying before it's finished. The script will 
need to be rewritten to call another R3 instance per file, just to 
make sure that it completes.
There's only so much of the process that can be rewritten to uzse 
FORALL. And of course MAP-EACH is getting hit by the same bug.
GrahamC
31-Jan-2013
[951]
which build?
BrianH
31-Jan-2013
[952]
Latest from rebolsource, but it also affected alpha 111.
GrahamC
31-Jan-2013
[953]
and it's not a memory leak?
BrianH
31-Jan-2013
[954x2]
I was able to make it last longer by switching some calls from FOREACH 
to FORALL - I figure it's a context allocation bug.
I'm going to switch the rest of the code to non-rebinding loops and 
see if that helps.
GrahamC
31-Jan-2013
[956]
Well, that doesn't bode well for long running scrips
BrianH
31-Jan-2013
[957]
Right? Gah!