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

World: r3wp

[!REBOL2 Releases] Discuss 2.x releases

Gregg
3-Jun-2009
[412]
Giuseppe, in the context of REBOL as a messaging/data language, can 
you picture how it might work as a class-based model? And do you 
think a class-based model is more appropriate in distributed environments?
Janko
3-Jun-2009
[413x2]
the feature that you can disarm error and turn it into object / data 
that you can store then is very good !
is something like this possible also with other dynamic languages? 
I am not aware of, but I never really explored at other
Henrik
3-Jun-2009
[415]
actually it's going out in R3, because it's annoying having to disarm 
errors. :-)
Maxim
3-Jun-2009
[416]
more precisely... errors are disarmed automatically.
Janko
3-Jun-2009
[417x3]
how will it work there ? reverse .. you manually trigger them .. 
I see that they are triggered in R2 as they are evaluated (except 
probably function takes them as lit-word (without eval))?
aha
ok.. as long as you can use them as data also
BrianH
3-Jun-2009
[420]
In R3 you have to DO the error! to trigger it.
Janko
3-Jun-2009
[421]
ok, probably more predictable and consistent behaviour ..
GiuseppeC
3-Jun-2009
[422x2]
Gregg,  I do not want to criticize the REBOL object model but the 
lack of in-depth documentation leave me in the blindness.

I have no answer for you. My skill level is too low but I whish to 
increase it.

Now I have learnt that REBOL object are Prototype Based and I have 
read the Wikipedia article about this kind of object orientation. 
I know domething more.
Try to search using google: "rebol prototype based objects site:rebol.com"

You will find nothing apart "Core product information" and something 
on "Rebol/View" then only in the lower part of the page you will 
findd something in REBOL3 docs.
BrianH
3-Jun-2009
[424x3]
The transition from class-based OOP languages to non-class-based 
OOP is usually rough, because the makers of class-based OOP tend 
to teach that the only style of OOP is class-based, and that if there 
are no classes it's not OOP :(
It's even tougher in REBOL, which is not an OOP language at all.
REBOL has prototype-based objects, but that is not the primary programming 
model of REBOL.
GiuseppeC
3-Jun-2009
[427]
BrianH you are right. Until your messages I didn't ever know another 
kind of OOP was possible.
BrianH
3-Jun-2009
[428]
There's also functional OOP, which you can sort-of do in R3 with 
closures :)
GiuseppeC
3-Jun-2009
[429x3]
But believe me there is a deep gap between what the standard documentation 
teaches and what should be written there to fully understand not 
only objects but the full ideology behind REBOL.
Only asking to GURUS like you one can reach the level needed to have 
a upper gear in REBOL programming.
I have just added a STUB to R2 articles to write what I will discover 
about REBOL objects. The trip has just started.
Steeve
3-Jun-2009
[432x2]
Most of the inner schemes used in Rebol are hidden. Carl never talked 
a lot about them and never officialy
I think it's related to his choice to protect the sources
Gregg
3-Jun-2009
[434]
Giuseppe, I didn't mean to sound critical of you either. I just meant 
to pose it as a thought problem. Something fun to think about. e.g., 
in a world where you can send objects around, what does it mean if 
you can send a standalone object, versus one that needs a class to 
instantiate itself from? And what does that mean with regards to 
execution and untrusted code?
Janko
4-Jun-2009
[435]
I just use this feature to spawn actors (which are rebol objects) 
at remote locations in my playing with actors system
WuJian
3-Aug-2009
[436]
call "C:\Program Files\Windows Media Player\wmplayer.exe"
This line does not work on Rebol2.76 ,but works well on Rebol3
Who can tell me why?
Graham
3-Aug-2009
[437x2]
try call/show
call is broken in R2
WuJian
3-Aug-2009
[439]
It works. Thank you.,Graham
Graham
3-Aug-2009
[440]
it's a problem since 2.7.6 ... when 'call was fixed ...
TomBon
5-Aug-2009
[441]
does somebody knows how to create a null-terminated string pointer 
for this api call?

winlib: load/library %user32.dll

SendMessage: make routine! [

    hWnd      [integer!]  "[in] Handle to the window whose window procedure 
    will receive the message."

    Msg       [integer!]  "[in] Specifies the message to be sent."

    wParam    [integer!]  "[in] Specifies additional message-specific 
    information."

    lParam    [integer!]  "[in] Specifies additional message-specific 
    information."

    return:   [integer!]  "The return value specifies the result of the 
    message processing; it depends on the message sent."
] winlib "SendMessageA"


the-char-result: make however the -> null-terminated string pointer 
???
creating a struct! doesn't work either.

char-len:  	SendMessage: hWnd WM_GETTEXTLENGTH 	0 		0

char-pointer:  	SendMessage: hWnd WM_GETTEXT		char-len  	the-char-result



WM_GETTEXTLENGTH is working fine but the WM_GETTEXT seems to need 
a pointer to a string.
any idea?

tom
Graham
5-Aug-2009
[442]
did you see this http://www.rebol.org/ml-display-message.r?m=rmlNHMQ
?
TomBon
6-Aug-2009
[443]
yes but doesn't work with strings. thx graham. I have solved it by 
using another compiler, capable creating pointer etc.
Gabriele
7-Aug-2009
[444]
TomBon... isn't "abc^(00)" a null terminated string? :-)
TomBon
7-Aug-2009
[445x2]
yes gabriele, this is of course the easier part but  where is the 
pointer? ;-)
hopefully R3 will address a better pointer, struct (nested)  etc. 
handling. being able to use the tons of C/C++ stuff outside will 
enrich professional development.
Gabriele
8-Aug-2009
[447]
you need to use a struct to get the pointer, or define the routine 
as taking a string argument.
Pekr
8-Aug-2009
[448]
TomBon - unless someone writes enhanced DLL wrapper as a plug-in, 
there will be no such thing as struct!, routine! in R3. You better 
look into plug-in interface, where there is much more freedom to 
do wrapping, but otoh it requires greater skill to handle it (C IDE 
set-up, compiling, etc.)
Maxim
8-Aug-2009
[449]
wrt call on rebol 2.76... I've figured one way to solve some bugs... 
you use the /input/output refinements with bogus strings... the input 
string should be something like "^/^/^/^/^"  might not fix all problems, 
but it has for me on some occasions.
RobertS
10-Aug-2009
[450]
In Rebol 2.7.6 is it possible to set an escaped forward curly brace 
comparable to the ^} for escaping a closing curly brace?  In 2.7.7 
?  Or am I missing something.  I am trying for readability when my 
string tokens include both double-quotes and curly-braces and often 
span multiple lines.
BrianH
10-Aug-2009
[451]
^{ sounds like a good idea for 2.7.7.
Gabriele
11-Aug-2009
[452]
^{ is already supported, it's just the console code that is buggy.
RobertS
14-Aug-2009
[453]
it looks like some issues remain in the R3 console ...
PeterWood
15-Aug-2009
[454]
As far as I know the current R3 console is a  temporary version.
WuJian
22-Aug-2009
[455]
Is there anything wrong?  In my  Rebol2.76 for Windows
>> print read dns://www.rebol.com
205.134.252.23
>> print read dns://205.134.252.23
gs28.inmotionhosting.com

the 205.134.252.23 isn't the  correct address
Sunanda
22-Aug-2009
[456]
I see the expected result in R2.7.6:
>> print read dns://www.rebol.com
205.134.252.23
>> print read dns://205.134.252.23
www.rebol.com

Maybe you have a firewall, proxy server, etc?
WuJian
22-Aug-2009
[457]
As you say, the ip address is correct.  but  I didn't use a firewall 
,nor  a proxy . I think  the problem  comes from my ISP
amacleod
22-Aug-2009
[458]
How can I get the windows version my app is running on....XP or Vista?
Graham
22-Aug-2009
[459]
a windows call?
ManuM
23-Aug-2009
[460]
WuJian: The same result here >>print read dns://205.134.252.23 gs28.inmotionhosting.com. 
I think this is correct, is the server at hosting company
Gabriele
23-Aug-2009
[461]
correct, an ip address can only have one PTR record, so for virtual 
hosting it's impossible for the reverse lookup to work.