r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3]

Graham
17-Jul-2010
[3867x2]
The lack of coordination and exclusiveness of the current development 
methodology does not maximize the use of the community
Just because R3 isn't multi-threaded doesn't mean we can't be
BrianH
17-Jul-2010
[3869]
Right now the main core of current development is coordinated. It 
would be nice to maximize the use of the community, but the interrelated 
projects are already being coordinated, and syncing up the projects 
that can be done independently would just add management overhead.
Graham
18-Jul-2010
[3870x2]
Anyone able to assess whether this is feasible http://www.libssh2.org/
as an extension or whatever ...
BSD license vs the LGPL license for libssh ( which also does server 
side ssh )
Robert
19-Jul-2010
[3872]
I have used it. Works very good. It's used in the communication layer 
I have done.
Graham
19-Jul-2010
[3873]
Are you releasing that or should we reimplement it?
Robert
19-Jul-2010
[3874]
It will be released. To really be convinient we need R3 callbacks. 
So, it's to much a prototype yet. My experience showed that things 
need to have a critical maturity level before others will pick it 
up and really use it.
Graham
19-Jul-2010
[3875]
So, did you do a R3 or R2 implementation?
TomBon
19-Jul-2010
[3876]
ssh extension? this would be great!
Graham
19-Jul-2010
[3877]
It's not something I have any immediate need for, but it looks like 
an interesting project to try
Andreas
21-Jul-2010
[3878]
Brian, you say "We have a task! type now, and have had it for a while. 
It doesn't work well but when last I checked it does work."


Could you elaborate on this? How does one actually use task!, with 
current R3?
BrianH
21-Jul-2010
[3879]
In general, one doesn't. There is no infrastructure code around tasks, 
no way to stop or track them that I know of (they may stop on their 
own), and the only testing of them that I have done is to track down 
errors. But they seem to do something. The task-local user context 
is for the moment by definition rather than actual - it hasn't yet 
been implemented. But you can MAKE a task! and it will do something.
Pekr
21-Jul-2010
[3880x2]
a: make task! [wait 5 print "Hello in a task"] do a print "Hello"
as you can see, it will print "Hello" first, and after 5 secs it 
will print "Hello in a task" .... the question is, if I got the usage 
right :-)
BrianH
21-Jul-2010
[3882x2]
It's been like that for more than a year now. Oh, and if an error 
is triggered in a task and not handled, it will crash R3. I'm not 
sure it is stable to trigger an error and handle it either.
Yup, that works Pekr, and the task ends on its own.

>> a: make task! [wait 5 print "Hello in a task"] do a print "Hello"
Begin Task
Hello
>> Hello in a task
End Task
Andreas
21-Jul-2010
[3884x2]
interesting. does nothing at all on linux, so i guess that's why 
i didn't ever notice that tasks actually do something.
but it indeed works fine on win32 R3. thanks for your help, guys!
BrianH
21-Jul-2010
[3886x2]
There's a lot of R3 that only works on Windows for now, if there.
I wonder where the code is that prints "Begin Task" and "End Task"...
Maxim
21-Jul-2010
[3888]
you've got me wondering how we could already setup some thread IPC 
and burst mode control with the current  !task.implementation.... 
hum... worth looking into.
Andreas
21-Jul-2010
[3889]
the "begin/end task" printing happens somewhere in r3lib, and in 
native code, afaict
BrianH
21-Jul-2010
[3890]
I hope it pays attention to the quiet setting.
Graham
21-Jul-2010
[3891]
timers cannot be started from another thread .. error
BrianH
21-Jul-2010
[3892]
? Code?
Graham
21-Jul-2010
[3893x2]
Interesting .. so I can start my gui that way as a task
oh .. I think it's a Qt error message
BrianH
21-Jul-2010
[3895]
Likely not, because task-local data isn't implemented yet. It's probably 
not safe.
Graham
21-Jul-2010
[3896]
I started up multiple Qt windows as tasks
Andreas
21-Jul-2010
[3897]
Nope, it does not pay attention to the quiet setting.
BrianH
21-Jul-2010
[3898]
Debug code then.
Andreas
21-Jul-2010
[3899x2]
Surely, a bug nevertheless.
Well, nevermind. Considering that it's mostly unsupported functionality 
at this point, probably not worth a bug report :)
BrianH
21-Jul-2010
[3901x2]
Yup, there is no point to reporting task! bugs yet, they all get 
deferred. But not deferred very long, if recent indications are true 
:)
When they are worth reporting, we'll let you know.
Graham
21-Jul-2010
[3903x2]
interesting .. this seems to be working well.
still a bug if you can't use it for cgi ...
BrianH
21-Jul-2010
[3905]
You can barely use it for anything except reliably crashing R3.
Graham
21-Jul-2010
[3906]
I mean the ignoring of the -quiet flag .. you can't use r3 for cgi
BrianH
21-Jul-2010
[3907]
We're not disputing that it is a bug - actually, we think it is debug 
code that is only there temporarily. But reporting it is of no good 
for the moment, and it's not nearly as bad as its other bugs.
Andreas
21-Jul-2010
[3908x2]
>> do task [] [print 42]
stack size: 50000
[New Thread 0xf7d75b70 (LWP 25615)]
waiting for task to become ready
Begin Task
REBOL System Error:
REBOL System Error #1411: REBOL System Error
that's tasks almost working on linux as well :)
BrianH
21-Jul-2010
[3910]
Wow, they're almost working as well as they almost work on Windows 
:)
Andreas
21-Jul-2010
[3911]
unfortunately that error is caused somewhere deep within libr3, so 
i don't get any further than this :)
BrianH
21-Jul-2010
[3912]
Start with the host code's implementation of tasks - that's where 
the platform-specific code is.
Andreas
21-Jul-2010
[3913x2]
that's what i did. the above is the result.
i implemented the thread management functions in the host lib. the 
create_thread hostlib function gets a function pointer as argument 
that is to be run in the new thread. and the error is occuring within 
this function, so it's a bit outside my reach
BrianH
21-Jul-2010
[3915]
That's a good start. Keep that code for when we start working on 
this :)
Andreas
21-Jul-2010
[3916]
just for comparison, without the hostlib stubs implemented, all you 
get on linux is:
>> do task [] [print 42]
>>