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

World: r3wp

[!REBOL3]

Graham
24-Jan-2010
[119x2]
Let's say that the function you just wrote requires that the user 
enter the date with a time ....
how do you tell whether the user in error used 

now/date

instead of

25-jan-2010/0:00

?
BrianH
24-Jan-2010
[121x2]
If you are talking about user input, then it is best to parse and 
construct. That way any errors can be flagged.
If you are getting the data from a string and can afford to be strict, 
use TO-DATE. Like this:
>> d: to-date "24-Jan-2010/0:00"
== 24-Jan-2010/0:00
>> d/time
== 0:00
>> d: to-date "24-Jan-2010"
== 24-Jan-2010
>> d/time
== none
Graham
24-Jan-2010
[123x2]
why can't I import the same module more than once?
or, how can I do this?  If I am rewriting the module code ..
BrianH
24-Jan-2010
[125x4]
Sometimes you want to import a module more than once, sometimes you 
don't. If you want to redo it every time then don't set a name in 
the spec - that turns it into a mixin. And named modules can be upgraded 
at runtime.
Use the version to trigger an upgrade of a named module.
The trick is that the code of the new module might need to reference 
the old to migrate the data, override any words exported to the user 
context, whatever. This process would of course be different for 
every different module.
Of course that wouldn't affect isolated modules that import yours 
- those references would need to be upgraded individually or not 
at all
Graham
25-Jan-2010
[129]
Do we have any xml helper functions?  


eg.  enclose-tag: func [ tag name ][ ajoin [ to-tag tag name to-tag 
join "/" tag ]]
Josh
25-Jan-2010
[130]
I was wanting to try R3 again, but the download link isn't working....
Henrik
25-Jan-2010
[131]
Josh, there are two /r3 paths in the download path. Remove one of 
them.
Josh
25-Jan-2010
[132]
Thanks, Henrik!
GiuseppeC
26-Jan-2010
[133x4]
Time ago I have written about porting REBOL3 to the .NET platform 
and Java VM.

The reason ? There is a big universe of libraries and frameworks 
immediately usable that would bring many developers to the REBOL 
platform.

Considering .NET and JAVA VM as alternate OS to develop REBOL3 for 
would be a big step forward to me.
In life we must first accept a comprimise to bring our ideology to 
the world.

I like the idea of a REBOL executable whose size is less than 1MB 
but I want to use it as soon as possible and in many scenarios as 
possible.

Would it be so difficul for REBOL Tech. to understand that this starting 
compromise would be instead the best possible way to pubblicize REBOL 
?
If you agree with me, what about writing a small letter to Carl explaining 
our desire ? If many developers sign this letter we could try to 
convince him to make this step once R3 will go to beta.
Then, with the time, the standalone version of REBOL3 will surely 
gain additional libraries and componet but until then we will have 
a  great ecosystem already available !
Pekr
26-Jan-2010
[137x5]
Giuseppe - long time ago, I proposed to port REBOL to JAVA VM, at 
that time it was Tao's Intent system, as I thought Amiga will become 
widespread and popular once again ;-)
... even back at that time, some ppl objected, that coding REBOL 
in JAVA or .NET would make it really slow. Instead of that, what 
was proposed was the integration work. Now with R3 Host Kit and Extensions 
infrastructure, it is really doable. R3 core already runs on many 
systems, and the porting was done in a week or two? I think that 
even ARM version is in the works ....
So, as for .NET - you mostly talk Windows. And there is no standalone 
.NET system - it is just layer upon OS, being it Windows, or Linux 
(Mono). And we have R3 for those two OSes awailable. So - why to 
slow-down REBOL, coding it in pure .NET, instead of doing integration 
work?
Getting REBOL to JAVA VM might be more interesting, as there is probably 
many HW platforms JAVA runs on, but REBOL does not. But OTOH - those 
porting efforts are going to be mainly in community hands anyway. 
Only the language interpreter itself stays closed-source, the rest 
is open-sourced. As for me - I prefer getting R3 in a raw state to 
many platforms, instead of slowing it down and porting it to JAVA 
or .NET directly.
But - if someone does it - why not? Anything spreading R3 is welcomed 
...
Robert
26-Jan-2010
[142]
What is this?

>> now/date

== 26-Jan-2010/0:00

What's the /0:00 for?
Pekr
26-Jan-2010
[143x2]
... to irritate you :-)
should be imo CCed
Robert
26-Jan-2010
[145x2]
Next one: In R2 I could write:
write output decloak data "mykey"
and: data: read %myfile
Gabriele
26-Jan-2010
[147]
(actually, you could not, without /binary)
Robert
26-Jan-2010
[148]
How to do it in R3? First read gives binary. And decloak produces 
something totally different (binary too), even when using /with.
Gabriele
26-Jan-2010
[149x2]
ah wait, sorry, you used decloak.
just to string! the binary? when you read it?
Robert
26-Jan-2010
[151x2]
Than decloakd doesn't take it. Only works on binary!
BTW: R3-CC link is hard to find. And do I have an account from either 
R3-Chat or AltMe? Or do I need to get an extra one?
Gabriele
26-Jan-2010
[153]
is your data binary? if not, to binary! it. (it should be though, 
the resulf of encloak is binary on R2 as well.)
Henrik
26-Jan-2010
[154]
Robert, you need an extra account. I remember the R3 bug system by 
going to curecode.org and clicking "bug tracker".
Robert
26-Jan-2010
[155x2]
Gab: The data was written with: write %filename encloak to-string 
data
data is block!
Gabriele
26-Jan-2010
[157]
robert, that should have been write/binary %filename encloak ... 
otherwise you may lose data.
Robert
26-Jan-2010
[158x2]
Ok, thanks. But will it solve the R3 problem?
Yes, it does. Thx. Got it working now.
Pekr
26-Jan-2010
[160x4]
Hmm, from this - http://www.rebol.com/toc.html
I got to this - http://www.rebol.com/priorities.html
So we at least know a bit, what is planned ;-)
Damned, I was not supposed to link to this page ... and this group 
is web public ....
Henrik
26-Jan-2010
[164]
Oh, nice.
Pekr
26-Jan-2010
[165x2]
nice, surely ... now Carl will kill me :-)
otoh I found it out myself ... just clicking small WIP wiki icons, 
which are publicly available :-)
Henrik
26-Jan-2010
[167x2]
just wondering when we'll get edit access. typo reports are piling 
up.
From R3 chat it sounds like Graham can edit, but I wonder if he means 
the general pages or just the manual.