World: r3wp
[!REBOL2 Releases] Discuss 2.x releases
older newer | first last |
BrianH 24-Oct-2008 [378x2] | Some of the same people are the ones doing development on both. Priorities :) |
Sorry, my answer above about call was wrong. It was fixed in 2.7.6. | |
RobertS 22-May-2009 [380] | . |
Tomc 2-Jun-2009 [381] | Hi, For homework, I was asked about the random number generator in my favorite language ... did some experiments but answered closed source to what "algorithm does it use?" for this part, I got a zero. So, could someone with access to rebol source or internal doc get me information on the algorithms for 'random and 'random/secure they are probably some flavor of linear congruent generators (please don't say RANDU) but multiplictive? or mixed? maybe a PMMLCG? shuffling? QCG? MRG? What constants are used? what is the period? how many streams? The easiest on you would be just send me the source and let me figure it out but is that is verboten as much detail as you may send to me (privately) would be appreciated note: the information will only be seen in a distilled form by my professor and not kept by me. thanks Tom |
Ladislav 2-Jun-2009 [382x3] | Hi Tom, I think, that the best what can be done is to put this to CureCode (R3 uses the same algorithm, I guess) as a documentation bug |
posted to CureCode as #879 | |
please use CureCode to add any comments, or even suggestions how to change the implementation | |
Henrik 2-Jun-2009 [385] | Updated headline to be slightly clearer. :-) |
Ladislav 2-Jun-2009 [386] | :-D |
Henrik 2-Jun-2009 [387] | Good that we don't have an undocumented NO or SOME function :-) |
Ladislav 2-Jun-2009 [388x2] | ROTFL |
Random: I have a simulation, where I use www.random.org data to make sure I am truly random | |
Tomc 2-Jun-2009 [390] | Hi Ladislav welcome back I have no idea what curecode is , assume it is rambo5 or whatever I don't need random numbers myself at the moment (I sometimes use hotbits ) I need to answer a homework question with something other than "don't know" I will go try to find out about curecode |
Henrik 2-Jun-2009 [391] | Tomc: http://curecode.org/rebol3/view-tickets.rsp |
BrianH 2-Jun-2009 [392x2] | Tomc, look here for the answer, though you might need to do some math: http://curecode.org/rebol3/ticket.rsp?id=879 |
Copied here: Answer: currently, there are two primary random generators: 1. old method, high speed, simple multiplicative: next = next * 1103515245L + 12345L; tmp = next & 0xffff0000; next = next * 1103515245L + 12345L; tmp |= (next >> 16); 2. much slower, SHA1() of a repeating pattern of the integer bytes (20 bytes total). | |
GiuseppeC 2-Jun-2009 [394] | Hello, I have big conceptual problems with REBOL objects. They differ a lot from common OOP. Inheritance is done by copying, no accessors, function redefinitions needs binding, the object is composed of multiple blocks and I don't know how REBOL compiler interprets them. |
BrianH 2-Jun-2009 [395] | They don't differ that much from standard prototype-based OOP. The only difference is that delegation is done manually. |
GiuseppeC 2-Jun-2009 [396] | I really ask myself why the REBOL object model is so different than standard OOP. I need some very good documentation but I have fount it nowhere. Does it exists ? Is it one of the best kept secrets ? I have read that someone was able to buil a full class system using REBOL with multiple inheritance but this is a myth for me. |
BrianH 2-Jun-2009 [397] | It only differs from class-based OOP. There are at least 3 standards for OOP, and only class-based OOP has inheritance. |
GiuseppeC 2-Jun-2009 [398x3] | BrianH, I have learnt OOP in Thinking in Java and VB.NET programming language. |
I admit I know only class-based OOP | |
However, the question remains the same. Does a good article/documentation exists for rebol OOP ? | |
BrianH 2-Jun-2009 [401x2] | The main reason REBOL's object! model is not class-based is because it was initially developed after it became known that class-based OOP has a lot of downsides. That's wasn't known about class-based OOP at first. |
As for the docs/articles, I think they exist but I don't know where. | |
GiuseppeC 2-Jun-2009 [403x3] | I'll wait for the answer of other people to continue. The I'll start experimenting and asking questions. I stopped working using REBOL object lot of time ago when I found really difficult to have an unique template to build many object with different fuctions. |
Also I needed to have the ability to change a function in many objects like you do in other languages changing a single pointer to the destination fuction. | |
Late night here. Hope to read you soon ! | |
BrianH 2-Jun-2009 [406] | In prototype-based object languages, you handle code sharing with delegation. A "class" is a common object that many similar objects delegate to. Since delegation is explicit in REBOL, that means that object functions call other object functions or other functions explicitly. In the case you mention, you just assign a new function to the word in the shared object or global context. |
james_nak 2-Jun-2009 [407] | Have any of you ever seen where the request-date requester does not display the correct month? For example, it will say May 2009 when it is actually displaying June 2009. Selecting a date will give you the june date. Using the /date refinement doesn't seem to help either. |
kcollins 2-Jun-2009 [408] | Wikipedia has an article about prototype based programming: http://en.wikipedia.org/wiki/Prototype-based_programming |
Tomc 3-Jun-2009 [409] | thanks BrianH and Ladislav I found curecode and ticket 879 it will do nicely. |
Henrik 3-Jun-2009 [410] | james, yes, it's a known bug. |
Graham 3-Jun-2009 [411] | never noticed a date issue .. but then I use rebgui's date requester. |
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. |
older newer | first last |