World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Jerry 17-Mar-2008 [5804] | >> probe first jerry-rebol-blog/readers == [self yeksoon] |
JohanAR 21-Mar-2008 [5805] | I wrote a lengthy post, hoping to start a constructive discussion on how we could increase Rebol's popularity and enbiggen (I know it's not a real word, but I didn't want to use "increase" twice in one sentense :P) it's userbase. I hope this is something more people are thinking about now that Rebol 3 is imminent. Please have a look at http://www.reboltalk.com/forum/index.php/topic,1513.0.html (I'm not trying to draw people away from Altme, but I think there's a need for a good Rebol forum too! :)) |
RobertS 23-Mar-2008 [5806] | ; a wee difference people probably noticed otr is documented ; R2 >> form first datatypes =="end" ;R3 >> form first datatypes == "end!" ; there is also a difference with get ; R3 >> t: 42 >> get 't >> get :t >> get t ; in R2 only the first is not an error |
BrianH 23-Mar-2008 [5807x3] | ; In R3 >> get 42 == 42 |
Interesting. I wonder if that is intentional. | |
; In R3 >> a: context [b: 42] == object! >> get 'a/b == 42 ; In R2 >> a: context [b: 42] >> get 'a/b ** Script Error: get expected word argument of type: any-word object none ** Where: halt-view ** Near: get 'a/b | |
btiffin 26-Mar-2008 [5810x3] | from !Altme Anyone that wants to take part in the testing that is required for REBOL3, drop a note here and we can synchronize what words are in need of a test case file. Don't worry, there are many. All we need to avoid is redundancy (well not really as more tests are infinitely better than no tests.) If you are keen to start, of the word dictionary; I'm in the A's. :) So if you start at D or E of F we probably won't collide. |
Carl's preferred method are small focused tests. and: [ [equal? 1 and 1 1] [error? try [1.0 and 1.0]] ; and is not expected to handle decimal! ] etc... for the gament of 56 types by 68 actions that REBOL needs to handle for us. The test case files usually focus on few actions with lots of various types. Note; A lot of the tests can be based on R2. The basic operators need to function at or beyond R2, so an R2 test that fails R3 is important. I'll find out if the basic-test-engine.r script these case files are based on is for public consumption for those that want ot help out. It really is a fair grunt of typing and thinking about edge cases (after all the baby step core cases) | |
Note; with the recent blog post; this basic-test-engine.r may wel become part of the build-basic-test-engine-scripts.r reflective test generator. As Carl points out; these are not better than human written. They may cover more bases but still require a lot of attention to detail. My interest in all this is mainly to keep Carl and RT away from the potato peeling work, freeing them for building new things. :) | |
Graham 27-Mar-2008 [5813x2] | Are we going to see a 'currentpoint type of word for 'draw in R3? something that will tell us where we are on the drawing surface? |
This is for using draw to do a print preview. | |
Gabriele 28-Mar-2008 [5815] | where we are - do you mean in rich text? |
Graham 28-Mar-2008 [5816] | Not necessarily. If using AGG fonts, I want to know where I am so I can calculate how much space I have left on a line. |
[unknown: 5] 28-Mar-2008 [5817] | Can someone set me up an account for R3-Alpha? |
Gabriele 29-Mar-2008 [5818] | graham, that is in rich text then. i want access to metrix, text bounding box, and so on. hopefully we'll get that eventually. |
Jerry 30-Mar-2008 [5819] | Reflection in REBOL 3.0 http://rebollovesjerry.blogspot.com/2008/03/reflection.html , For English version of this article, hit the "Google Translate" Link in the page. |
Henrik 31-Mar-2008 [5820] | the first OSX version of R3 is released internally. it's currently only for unicode testing purposes, so there is no networking or graphics yet. |
btiffin 15-Apr-2008 [5821] | While feeling stupid giddy today, starting working on the Zen of REBOL. But >> import 'this doesn't have the same Zen oomph as >>> import this maybe I'll leave it alone. |
LuisE 16-Apr-2008 [5822x2] | can anyone help , im new to rebol. im trying to pass a value to a function but i get a path error. why? ex. somefunc: func [x] [print series/x] |
and use it to read a value in a series somefunc 1 | |
Sunanda 16-Apr-2008 [5824x2] | This may be what you want: series: ["a" "b" "c" ] somefunc: func [x] [print pick series x] >>somefunc 1 == a |
This works in recent versions of REBOL: somefunc: func [x] [print pick series/:x] note the ":" before the "x" | |
Pekr 16-Apr-2008 [5826] | series/:x or series/(x) |
Sunanda 16-Apr-2008 [5827] | oops -- remove the 'pic from that second example: somefunc: func [x] [print series/:x] |
LuisE 16-Apr-2008 [5828] | thank you that worked the .x didn't but the (x) did |
BrianH 16-Apr-2008 [5829] | It wasn't a .x, it was a :x in his example - try that. |
LuisE 16-Apr-2008 [5830x2] | that works too |
thanks | |
BrianH 17-Apr-2008 [5832x2] | This was in response to a question from Jerry: And what is "the new behavior of function!" that you mentioned? Cross-posted by request. |
Jerry, R2 just had one kind of context (2 if you include the autoexpand context used by system/words). Functions, objects and USE all used this type of context, and words were bound to this kind of context. A function! in R2 is bound to one of these contexts, which gets reused when the function is called. When the function is called recursively, the value block of the context is pushed on a stack but the context is reused - this is the main reason R2 could never be thread-safe. The only difference that object! contexts have over function! or USE contexts is that the word 'self is added to them. In R3, there is at least one more context type: stack-relative, which is used by the function! type. All of the words bound to a function! resolve their bindings relative to the context in the executing stack frame, rather than directly. When a function! starts it allocates a context on the stack; when it ends it deallocates the context. This means that the context of words bound to a function only exists when the function is running, so there is no point to referring to these words outside of the function. Although this slows down word references, it speeds up function! calls and reduces potential memory leaks due to word references in functions after they have returned. This slowdown in word references is the reason that R2-style rebcode doesn't make sense to add to R3 without some changes to its semantic model to make up for the difference. A closure! in R3 is like a USE call in R2 (USE in R3 is implemented using closure!). The words are direct-bound to a context (so word references are faster), but it creates a new context and bind/copy's the code block at the beginning of each closure! call. There is still no point to bind a word to a closure's context when the closure isn't running, since the next time the closure runs it will create a new context, but it does make sense to use a context created by a closure call after the closure has returned since it is a regular context like a R2 USE context. In general, it is better to use function! unless you need to refer to the context after the closure! returns - mostly useful for generators, currying and other functional programming tricks. In R3, object! contexts are like the R2 system/words context: they can expand, but not shrink; closure! and function! contexts can't expand though. There will be further changes to the way object! contexts work, and module! contexts will behave the same way. | |
btiffin 17-Apr-2008 [5834] | http://rebol.net/wiki/Brian%27s_Take_on_Context Docbase Link of above. It's beefee. Thanks Brian. |
BrianH 19-Apr-2008 [5835x2] | I expanded the above article, making it easier to understand and with more information. http://rebol.net/wiki/R2_vs._R3_Contexts |
By the way, it turns out that function! word references are around 28% slower than closure! or object! word references. | |
Rod 19-Apr-2008 [5837x2] | BrianH, thanks for that context information, very good to keep in mind in both R2 and R3. |
I'm struggling a bit with the closure! specifics. I have used closures in Ruby (though I'm not clear on the difference between a block using yield and a closure at this point) and part of what I thought made valuable was the connection to the context they were formed with that persists. I'm probably getting this all wrong but what does "next time tthe closure runs it will create a new context" imply on that front? | |
BrianH 19-Apr-2008 [5839x2] | If Ruby is as much like Smalltalk as I remember, a block is like an anonymous function, and functions in Ruby are more like closures in REBOL. There is nothing like yield in REBOL yet, though I don't know whether Ruby's yield is a cooperative multitasking thing or an Icon-style resumable return for generators. |
Ruby has the general overhead of indirect word binding so it can support things like closures directly, which is why it is slower than REBOL overall. On the other hand, REBOL has a lot of overhead when creaing closures because of its direct binding, but that same direct binding is part of what makes REBOL so fast otherwise. It's a tradeoff. | |
Kaj 21-Apr-2008 [5841x2] | That sounds about right |
I think Ruby's yield is both for cooperative multi-tasking and generators | |
BrianH 21-Apr-2008 [5843] | Some languages use multitasking for generators - Icon doesn't. Does Ruby have Icon-style resumable return? |
Kaj 22-Apr-2008 [5844] | I daren't say. I don't know Icon |
Rod 23-Apr-2008 [5845] | I don't know Icon either and I'm not sure about the cooperative multi-tasking part for Ruby, only seen the generators use so far. |
Henrik 1-May-2008 [5846x2] | A tiny bit of status report: - Working on ports now. It's a very straight forward system, if you've been reading the docs. - Carl found a bug in the garbage collector that would speed up a loop test case from 35.2 seconds to 6.4 seconds. - After a while of core unicode testing, graphics is finally going back in. The third test version of View with unicode is going to be released soon. - Still no unicode support inside View graphics, though. - 445 bug reports so far. - HTTP protocol recently done (IMHO a very nice and super-clean implementation of http1.1 by Gabriele). - Test case system temporarily put on hold. Ports are more interesting. :-) - WAIT now switches between efficiency and accuracy. It's accurate but CPU intensive when selecting a WAIT lower than 1 ms, because in those cases it uses it's own routine for waiting, but it can be done much more accurately than the OS timer. When above 1 second, it uses the OS timer. |
oops, in the last line it should read "WAIT lower than 1 second", not 1 ms. :-) | |
[unknown: 5] 1-May-2008 [5848] | Henrik, sounds interesting. Thanks for the status report. |
Gabriele 1-May-2008 [5849] | note, afaik the wait < 1 s problem only applies to windows. (although, other oses may have long context switches too) |
Henrik 2-May-2008 [5850x2] | >> ? evoke USAGE: EVOKE chant DESCRIPTION: Special guru meditations. (Not for beginners.) EVOKE is a native value. ARGUMENTS: chant -- Single or block of words ('? to list) (word! block!) :-) |
not really sure what it does, but it's used for debugging | |
Gabriele 2-May-2008 [5852x2] | sets secret internal options. |
:-) | |
older newer | first last |