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

World: r3wp

[!REBOL3]

Graham
2-Jul-2010
[3632]
you have to be part of the gui developement team ...
Steeve
2-Jul-2010
[3633]
why ? Is that a secret ?
Graham
2-Jul-2010
[3634]
seems effectively so ...
Rebolek
2-Jul-2010
[3635]
There's no secret, once there's something to release, it will be 
released. Right now, there's nothing right now. That will change 
soon.
Graham
3-Jul-2010
[3636]
Is there a suite of tests for Database protocols ?  I presume there 
was something for R2 ... can RT release those so we can use for testing?
Robert
7-Jul-2010
[3637]
Ok... successful host-kit build!
 - Carl
Pekr
7-Jul-2010
[3638]
Cool :-)
Graham
7-Jul-2010
[3639x3]
what's the download link?
Ok... successful host-kit build!
about 1 hour ago via Socialite.app <<< that means Robert!
Carl uses the Twitter API
Pekr
7-Jul-2010
[3642]
I think that Carl really said that, but Robert just twitted about 
it :-)
Henrik
7-Jul-2010
[3643]
correct
Robert
7-Jul-2010
[3644]
I'm the ghost twitterer to help keep information flowing.
Graham
7-Jul-2010
[3645x2]
And it's appreciated!  :)
note to Carl .. add a tweet button on Altme
Robert
7-Jul-2010
[3647x3]
So, Petr asked, what this message regarding the host-kit means:
The components are there and work together, and more DRAW commands 
still need to be implemented. For this we priorized some task different 
to faster make it possible that we can start implementing DRAW commands 
in parallel to Carl's other work items.
There are still some questions to answer and quite a lot of little 
things to do. But IMO it's a big step ahead that the host-kit now 
builds.
Henrik
7-Jul-2010
[3650]
Internal release made of hostkit for A99. Still some work to do before 
a public release can be made.
Maxim
7-Jul-2010
[3651]
funny, I see all I need so that I could start using it already.
Henrik
7-Jul-2010
[3652]
still some compiler issues to solve. Cyphre is helping with that.
Rebolek
7-Jul-2010
[3653]
It's just that ++ is more like -- in real life.
Pekr
8-Jul-2010
[3654]
It is coming .... http://www.rebol.com/r3/docs/concepts/host-kit.html
shadwolf
10-Jul-2010
[3655x3]
one trivial but important question: 


OK rebol is a programing language that get most of its interest when 
used in the internet area.

So for example i use my brand new software made in rebol  it connects 
to internet and check for version update.

Updating a software from the software itself is a common feature 
now in day.


But with rebol how do we do that mechanics ? ok i can log to the 
webserver where are stored the release i can do a CRC comparasoin 
betwin 

my software and the  one on the distant server repository. So i get 
to know if the repository is different from the version installed 
on my computer.

Once my local copy is aware the distant repository evolved i can 
download the new copy.

And that's where the poblems appears ... I can't make the new version 
downloaded from the server to be subtituated like all the other software 

made in c, C++ etc... does. What i mean is i can do 97% of the update 
from the webtask but the automatic stop the current app and launch 
the new version is 
not possible...


if you want to better understand what i mean think about your firefox 
update for example

 at your firefox start it performs a version check then download the 
 new version
then close the current running firefox and launch the new one.

Does rebol 3 will introduce that kind of mecanics ?
in fact that i current software download the new version install 
software then starts the new version install software and curent 
version is terminated  install software then doeas the substitution 
process then starts the new software version.


But this means the software can launch a sub process which will not 
be terminated when the current process is terminated with an quit 
call for example.
and since rebol script are  most of the time very tiny in size  i 
don't see the interest of having an updated scheme looking like what 
is done on the other laguages. I htink it should be a cool thing 
to be able somehow to substitute anytime the file on my computer 
and then  autoreload it in memory without having to restart the application 
and if i could trash out  from memory of the VM the previous script 
that wuld be even nicer ....
BrianH
10-Jul-2010
[3658x2]
Script autoreloading is not a simple task because scripts are primarily 
run to cause side-effects, even if those side effects are only in 
memory sometimes. So reloading a script means upgrading a script. 
The R3 module system was designed to allow modules to be upgraded 
in place, by making the previous module state available to the initialization 
block of the new module. This allows the new module to migrate the 
data of its old version.
Be careful though, you have to design your modules for this on purpose, 
you can't just count on it happening automatically. Module state 
migration is not difficult, but it is a different process every time 
since it depends on what state you need to migrate. The R3 module 
system can make it possible, but your module needs to do the actual 
work.
Andreas
10-Jul-2010
[3660]
the automatic stop the current app and launch the new version is 
not possible...

what stops you from simply CALLing the new app and then QUITing?
Sunanda
10-Jul-2010
[3661]
This is essentially what several of my applications do to restart 
themselves. Not quite what you want, but as close as I could get:
   http://www.rebol.org/ml-display-message.r?m=rmlPPPJ
shadwolf
10-Jul-2010
[3662x2]
you can't overwritte the script currently running it's locked 

that why an intermediary intaller is used in general but this in 
not suited for rebol or scripting langages in general
sunanda yeah i know we can get close to the real deal but we can't 
get the real deal ... and i think it will benefit rebol image to 
have the real deal
Sunanda
10-Jul-2010
[3664]
[The partially solution I adopted allows replacement of all scripts 
except the top-level driver]
shadwolf
10-Jul-2010
[3665x3]
yeah in fact i could do this check the version then download the 
new version from server maning the file .TMP then create from my 
script a install-app.r  and call it then close the current app

and have that temporary script install-app.r to rename the .TMP file 
to my main script and then start the app. It could display popup 
message like "Configuring the new version please be patient..."

but it's lot of work for a thing i will be the only one to use ... 
and that's not the meaning of my ask ...
but then how to detect in the install-app.r that the min script we 
want to replace is not locked anymore ?
and wait until it does
Ladislav
10-Jul-2010
[3668x2]
There is a solution using RENAME, at least I think that a version 
using RENAME works, did you try it?
the function doing update could work as follows:

update: func [
    {updates the current application}
    application-file [file!] {the current application}
    tmp-file [file!] {a temporary file}
    source {updates from this source}
] [
    if exists? tmp-file [delete tmp-file]

    ; now we can rename the application-file, since the tmp-file does 
    not exist

    rename application-file tmp-file ; I guess, that this works, even 
    if the application is running?
    write/binary application-file read/binary source
    call application-file
    quit
]
Andreas
10-Jul-2010
[3670]
rename works fine on linux. but you'll only need it for encapped 
programs. no trouble directly overwriting the currently running .r
Ladislav
10-Jul-2010
[3671x2]
I guess, that shadwolf meant it for encapped programs
shadwolf?
Graham
10-Jul-2010
[3673x2]
Ladislav, your update function won't work in Windows
The easiest way to do this is to maintain your source in an encrypted 
and signed compressed binary.  So, you have the stub which does the 
update and executes the source.  It checks for new source, overwrites 
the old one and then executes it.  Since it is not updating the exe, 
there are no file locking issues.
Ladislav
10-Jul-2010
[3675x2]
Ladislav, your update function won't work in Windows
 - as far as I can tell, it works even in Windows
Can you be more specific?
Graham
10-Jul-2010
[3677]
renaming won't work if there is a file lock on it
Ladislav
10-Jul-2010
[3678x2]
I tested it under Windows 7, it just works
Again, can you be more specific?
Graham
10-Jul-2010
[3680x2]
Hmm...  it does work!
Ahh.. but it locks the tmp-file instead