World: r3wp
[!REBOL3-OLD1]
older newer | first last |
BrianH 3-Jun-2009 [14958] | MAKE and TO are constructors too. |
Ladislav 3-Jun-2009 [14959] | MAKE and TO: they can be called "methods", since they are functions, but #[...] is something totally different, and it surely isn't "a method" |
BrianH 3-Jun-2009 [14960] | Internal, remember? |
Ladislav 3-Jun-2009 [14961] | there is nothing like "internal" from a user's POV, anything "internal" should be invisible, that is why I honestly don't understand, why the END! datatype is exposed |
BrianH 3-Jun-2009 [14962x2] | Not all the actions are exported as action! functions - some are only called by native code, like the action that handles function eval. |
I was talking about an internal action, not something exposed. | |
Ladislav 3-Jun-2009 [14964] | moreover, the #[...] constructs are actually executed by the LOAD function (or maybe Transcode,...) internally, which may call whatever functions it likes to construct any specific datatype represented by the discussed #[...] text, but this does not make the "#[...]" text a function, anyway |
BrianH 3-Jun-2009 [14965x2] | Except the deserialization actions are exposed, indirectly. Not as action! functions - they are called by TRANSCODE, TO-BLOCK, ... |
The text is not a function. The *handler* for the text is a function. | |
Ladislav 3-Jun-2009 [14967x2] | yes, but then the methods are Transcode, To-block, etc. the #[...] texts are only data for them |
so, the distinction is, that "#[...]" actually is data (argument/arguments) for a constructor, not a constructor | |
BrianH 3-Jun-2009 [14969x2] | TRANSCODE calls the action. I am talking about internal code here. |
And it's not text - bug#864 proved that. | |
Ladislav 3-Jun-2009 [14971] | yes, I understand, there is a constructor (there has to be one), but the "#[...]" text is not a constructor, just data for a constructor |
BrianH 3-Jun-2009 [14972x2] | Ladislav, if you think that I am saying that the lexical form #[...] is a function call, you are wrong. I am saying that the processing of that lexical form is handled by an internal function call that constructs a value of a particular datatype. That is what I have always beenn saying. |
And since then I have been trying to clear up that misunderstanding. | |
Ladislav 3-Jun-2009 [14974] | yes, that is correct, of course. What I mean by saying, that #[...] is not a constructor is, that the function is "somewhere else" (in C or internal Rebol code, I do not exactly mind in this case) |
BrianH 3-Jun-2009 [14975] | Well, the function "somewhere else" is all that I have been talking about, not the lexical form. |
Ladislav 3-Jun-2009 [14976] | BTW, what do you think about the END! datatype? is there really a reason, why it has to be "exposed"? |
BrianH 3-Jun-2009 [14977x2] | There is a reason to reserve it, but not expose it per-se. It would need to be used by internal code and a lot of that internal code is written in REBOL in R3. From what I know about blocks (minimal), it seems like the nul character for C strings, but less required. |
There are other internal datatypes, like handle! and frame!. | |
Ladislav 3-Jun-2009 [14979] | I do know one use for the END! datatype, but am not sure, it should be "exposed" this way, taking into account, that it is an "implementation detail" in fact. The same applies to handle! and frame! or e.g. the symbol! datatype n earlier interpreter versions. |
BrianH 3-Jun-2009 [14980] | You are prejudging on what is exposed: Most of the code hasn't been modularized yet :) |
Ladislav 3-Jun-2009 [14981x2] | aha |
yes, that is why I wondered | |
BrianH 3-Jun-2009 [14983] | Same about Pekr's complaint earlier about LOAD-PLUGIN. We aren't prematurely modularizing the code so as to avoid setting up artificial barriers. It is better to let the code grow and see where the natural bondaries are. Alpha :) |
Maarten 3-Jun-2009 [14984] | do/next matters to me, but, I don't count for language features (Carl put me in the 0.1% basket ;-) What I would like is a "break out"of a block much like throw, that allows me to re-enter even in nested blocks. |
BrianH 3-Jun-2009 [14985] | Continuations, basically. Sorry :( |
Maarten 3-Jun-2009 [14986x3] | e.g. pos: reduce/do/try/... [ some code [ nested [ and then some [ break! some more more ] more ] really ] more ] |
And then: "into" pos | |
I think a closure over the evaluation with an "into" would do it. It is easy to see parse with into do this. | |
BrianH 3-Jun-2009 [14989] | That's a continuation. |
Janko 3-Jun-2009 [14990] | Maarten, yes that jump out and back again into the same state would be very cool but it seems a very core thing that is either possible or not |
BrianH 3-Jun-2009 [14991] | We removed those from REBOL with the R1 to R2 rewrite. Sped up REBOL by around 30 times as a result. |
Maarten 3-Jun-2009 [14992x2] | It is possible at the data manipulation level. REBOL is a data language after all. |
Brian, I don't buy that argument. | |
Janko 3-Jun-2009 [14994] | Brian .. is there a way to get current local state inside function as a block and store it somewhere? |
Maarten 3-Jun-2009 [14995] | Besides, we have sped up hardware more than that since then ;-) |
Janko 3-Jun-2009 [14996] | I mean list of variables / words defined in a function and their values? |
Maarten 3-Jun-2009 [14997] | I would be happy with just breaking out of a nested block and having a "deep" reference instead of only the one from the lastly traversed inner block |
BrianH 3-Jun-2009 [14998] | Janko, store it, yes, more or less with the STACK function. Restore it, no. |
Maarten 3-Jun-2009 [14999] | Rebuild it? |
Janko 3-Jun-2009 [15000] | there is stack function? .. is it R3 only? |
BrianH 3-Jun-2009 [15001] | Yes, and restricted by PROTECT. |
Janko 3-Jun-2009 [15002x2] | aha interesting |
can you also somehow access your current position in the block of code like as if it's a serries? *B*: none a: does [ 1 + 2 *B*: get-current-pos 5 + 3 ] ? | |
Maarten 3-Jun-2009 [15004] | Brian, when you get to tasks, pleae look at the queue/multiprocessing module in Python 2.6 I can help you on that. I think they have done it right, and it feels very REBOLish. |
Pekr 3-Jun-2009 [15005] | Maarten - you should be instead ready with your proposal for R3 tasking :-) Then no continuation is needed, no? |
BrianH 3-Jun-2009 [15006x2] | If you want to resume continuations you have to build your runtime around the concept, which basically turns your language into Scheme with a different syntax - that's R1. Like R1 and early Schemes, your language will be slow. Scheme solved this by compiling the code and letting the optimization phase remove the continuations, where possible - where not possible, Scheme is still slow. REBOL doesn't have this option because code is data *at runtime*, rather than having the input syntax be data, but the runtime code the result of compilation. Code that relies on this (and there is a lot of that) is not compilable in any direct sense. |
The days of hardware getting faster is going away - now the hardware is staying the same speed, but more hardware (more cores) are being added. You get more speed through parallelism. Slow langages are getting made faster or dying out. | |
older newer | first last |