World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Maxim 13-Feb-2007 [2115] | this allows you to remove the complexity of an API and integrate it within the normal flow of a language. |
BrianH 13-Feb-2007 [2116] | There are no object! accessors, to be sure, except for field setting and getting. It definitely makes sense to add them to object! types, but it doesn't make sense to add them to non-object types. |
Maxim 13-Feb-2007 [2117x3] | why not? |
conceptually, in rebol all the types are private classes. if we had access to the accessors of integer, we could fix/adapt the "out of bounds" conditions, for example. | |
I understand that this raises some points as to the loading part, but within an application this is not an issue, it does not change REBOL itself, it changes the application of a type within a specific use. | |
BrianH 13-Feb-2007 [2120] | In the blog and here I was in favor of adding property accessors to object types (think get and set handlers). There was much debate as to whether such a concept would be added to REBOL 3 - I was in favor. If what you want is general redefinition of the actions associated with a type, what you are really asking for is user-defined types, and those have already been promised for REBOL 3. |
Maxim 13-Feb-2007 [2121x2] | they still boil down to pretty much the same thing... they could simple be the same api. |
IMHO. | |
Ladislav 13-Feb-2007 [2123x2] | Brian: trampoline actions: interesting idea. For: - simplifies some scripts Against: - may complicate/slow down the interpreter - may make debugging harder in some cases |
so, I am neither 100% for nor 100% against it | |
BrianH 13-Feb-2007 [2125x2] | Maxin, I like that there are two models for types, with different semantics: - Datatypes: Classes with polymorphic methods handled by dynamic dispatch. - Objects: Unique objects with methods directly associated, where you can emulate class-based or delegation-based systems at your whim. The advantage of having two models is that you can balance efficiency versus flexibility. The only disadvantages are that there is a fixed set of datatypes (to be fixed with user-defined types), and that the usage patterns for objects are somewhat limited (which would be fixed by the get/set handler proposal if implemented properly). |
Ladislav, another to add to the For list: - Lets programmers used to imperative programming code using algorithms they already know, rather than having to adopt a functional style. That may be one for the Against list as well, depending on your attitude towards such things. | |
Maxim 13-Feb-2007 [2127] | I think I meant to say that I hope the api, can be uniformitised... so we decide if we want instance or class based method. |
BrianH 13-Feb-2007 [2128x3] | As for complicating or slowing down the interpreter, I don't think that it will. The trampoline code would be contained in the actions associated with two datatypes, not in the interpreter at all. The interpreter would not need any changes. |
Maxim, what does it matter if the API is uniform, as long as the syntax is similar? You can't make the API completely uniform when you are supporting different semantic models. | |
The speed of datatypes comes from the fixed action list. It allows the dispatch to be a simple retrieval from a fixed offset into a function table, no lookup required. It is not the same thing as general class-based methods, which in a language with dynamically typed variables would need to do a lookup to figure out where to find the method to call, same as with instance-based methods. | |
Ladislav 13-Feb-2007 [2131] | - Lets programmers used to imperative programming code using algorithms they already know - there is no algorithm you cannot use in REBOL even now, those are mainly C idioms as far as I can tell? |
BrianH 13-Feb-2007 [2132] | I meant style I suppose, though even C is expression-based. The idioms would actually be more assembler-like than C-like, for 2-address instruction sets like x86. Still, this wouldn't add anything to the language that isn't there through other means, except speed. And while it wouldn't complicate the interpreter, it would complicate the semantics of REBOL, making it harder to explain, debug or reimplement. |
Ladislav 13-Feb-2007 [2133] | agreed |
Jerry 10-Mar-2007 [2134] | http://www.rebol.com/priorities.htmlIn the green little box, there is an item called "Deci". What's that? |
Anton 10-Mar-2007 [2135] | A new deci! datatype for storing floating point numbers in BCD (Binary Coded Decimal) format. |
Jerry 10-Mar-2007 [2136x2] | Tanks Anton. |
=> Thanks | |
Henrik 3-Apr-2007 [2138x2] | good news about the STACK function: http://www.rebol.net/cgi-bin/r3blog.r?view=0075 |
hah! A percent datatype as well. :-) | |
Oldes 3-Apr-2007 [2140] | yes... singing with Queens... I want it all, I want it all,I want it all, and I want it now:] |
Henrik 3-Apr-2007 [2141] | Oldes, how spooky, I have a Queen song running in the background! |
PeterWood 3-Apr-2007 [2142] | I agree Queen songs are spooky ;-) |
Geomol 3-Apr-2007 [2143] | :-) Good to be back! |
ChristianE 3-Apr-2007 [2144] | Hi Peter, sadly, this isn't reddit. I so want to vote your comment up :-D |
Pekr 3-Apr-2007 [2145] | Minor Bitsets - http://www.rebol.net/r3blogs/0077.html |
Maxim 3-Apr-2007 [2146x2] | is it just me or is it obvious R3 is about giving us what we always asked for and need? so far, all I read is user requests coming to life. If people think 100% open source is the universal panacea... I think its time people looked at how REBOL is evolving. I think R3 might be the middle ground which allows much of the "open" discussion to be irrelevant. user types, open linking and compilation, lexical allowance for unrecognised tokens, somehow, this seems like we will be able to mold (sorry for the pun) REBOL into what we need, finally, rather than molding what we do to what REBOL (the interpreter) wants :-) |
pekr, I think you're going to have to book a flight to paris... to much of what you and I have criticised about for you not to show up. ;-) | |
btiffin 3-Apr-2007 [2148] | Make sure you comment on the relaxed lexical parsing. I've been working around this one for a long time...but it may hold traps my giddy little mind is missing today. |
Maxim 3-Apr-2007 [2149] | I guess I'm getting annoying with all my comments ;-) this really is a subject I have been wishing for about 5 years and am constantly reminded how usefull extending lexical analysis would be. |
btiffin 3-Apr-2007 [2150] | Yep, agreed (not about the annoying part - keep them coming) The comment from Norm caught my eye. If REBOL can attract the attention of the academia...why we might get paid to be rebols. :) |
Oldes 4-Apr-2007 [2151] | Maxim, I really like your load/extension way. It would be very useful. |
BrianH 5-Apr-2007 [2152x5] | Sorry to take so long to reply - I was sidetracked. I've put an alternate idea to relaxing the lexical rules on the comments. Take a look. |
The idea is to add a LOAD directive to the PARSE string dialect. LOAD would treat the sequence of characters at the current position as a REBOL value, and then check it against a block-dialect rule. If it is not a valid REBOL value or if the check fails, the directive fails and triggers any appropriate backtracking. If you are not interested in checking the value, just use SKIP for the rule. If you want the value, use SET (or COPY perhaps?) before the LOAD to assign it to a word. | |
The problem with relaxing the lexical rules of the LOAD function is that REBOL can't handle natural language syntax, particularly punctuation. You would need to convert a word to a string to tell the similarity between "Hello" and "Hello,", at which point you are doing string parsing again, but slower. | |
It makes sense to be able to parse REBOL values in the middle of non-REBOL text, but not as much the other way around. | |
Nonetheless, I can see the advantage to having a comma! datatype that would be a syntactical noop, so you can put one anywhere in REBOL code and it would be ignored by the standard dialects. Then we can give these commas meaning in our own dialects, or ignore them too. | |
Oldes 5-Apr-2007 [2157] | Why not parse/load ? Would it be possible to parse the code as it's loaded? if load fail, I know position in the string so I could modify the string and continue. |
Steeve 5-Apr-2007 [2158] | load/next would be enough as proposed by Carl iirc |
Oldes 5-Apr-2007 [2159x3] | load/next is already available |
But I'm not sure if proposed load/relaxed can help me. It's one more pass for me. 1. load, 2. check for invalid types, 3. parse | |
and I don't want much, I want just << to be loadable in my dialect. | |
Maxim 5-Apr-2007 [2162x2] | brian I like your idea VERY much. |
I just posted a second vote with an example of how brian's idea actually is exactly like the load/extension. | |
btiffin 5-Apr-2007 [2164] | Keep going guys. This feature is going to rock if it gets implemented...in any form. But I'm leaning towards Carl's original load/relax (load/lazy) :) with an invalid? or nonsense? test. Mainly because my brain hurts thinking about parse too deeply. |
older newer | first last |