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

World: r4wp

[!REBOL3] General discussion about REBOL 3

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
[957x2]
Right? Gah!
And it's an emergency too, we really need that analysis.
GrahamC
31-Jan-2013
[959]
Rebol2
BrianH
31-Jan-2013
[960]
It might be easier. It's parsing, and uses MAP-EACH a lot, and there's 
a bug in MAP-EACH in R2 (that's my fault, sorry), but that is one 
approach I'll have to consider.
Andreas
31-Jan-2013
[961]
Win32, I assume?
BrianH
31-Jan-2013
[962]
Yup.
Andreas
31-Jan-2013
[963x4]
1207 is RP_MISSING_END
Only point that is thrown is within the GC.
Is it easy for you to reproduce?
I mean, can you quickly run a test binary and see if things improve?
BrianH
31-Jan-2013
[967]
I can reproduce it like clockwork. It even crashes in the same spot 
every time. Send me your test binaries!
BrianH
1-Feb-2013
[968x3]
I'm going to save this version of the crashing script, then see if 
I can get it to crash with local files only, then see if I can get 
it to crash without using the files at all (since they are proprietary). 
Also, I have to make a separate version that doesn't crash so I can 
get the results. This is annoying, but if we can get a GC bug fixed 
in R3 then it will be worth it.
Apparently I can make it last longer by using the *EACH functions 
less., switching to loops that don't allocate contexts. However, 
I create objects to store the data, so those eventually cause the 
crash. Still repeatable, so it's probably happening after allocating 
a certain number of objects/contexts. It acts identically on 32bit 
and 64bit Win7, crashing at the same point in the process.
Switching the objects allocated in the data to maps makes the crash 
go away altogether. That narrows down what to search for rather thoroughly.