World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Maxim 2-Jun-2009 [14828] | does rebol 3 have a fast function which converts [[1][2][3]] into [ 1 2 3] ? |
BrianH 2-Jun-2009 [14829x2] | No, you'll have to write your own flatten function. |
We discussed adding one, but everyone wanted the function to do something different. No consensus. | |
Henrik 2-Jun-2009 [14831] | I think it should be simple. But then again, that's in the same territory as "parse string none". What should it do? |
BrianH 2-Jun-2009 [14832] | What types do you want to flatten? Just blocks, or other block types? |
Maxim 2-Jun-2009 [14833x3] | just blocks... cause its a recurring "problem" thru the years. |
well, any block, list, hash but not things like objects. | |
obviously, I know how to write one... but its a pretty recurring need for inclusion in the /plus pack... no? | |
BrianH 2-Jun-2009 [14836] | Yeah, it's a good candidate for /Plus. The problem is that whenever the need occurs, what it needs to do is slightly different. Flexible semantics like that lead to a slow function - which is a bad thing for a mezzanine or library func. |
Pekr 2-Jun-2009 [14837] | June - we need updated R3 Plan :-) |
BrianH 2-Jun-2009 [14838] | Already mentioned it to Carl here yesterday. |
sqlab 2-Jun-2009 [14839] | load form [[1][2][3]] == [1 2 3 ] |
Carl 2-Jun-2009 [14840x2] | That is so true: "everyone wanted the function to do something [a little] different". So, the question always becomes: what is the most common pattern, and how common is it really? Difficult to know, especially when you start thinking about adding reduce or compose into it. |
R3 Chat #4395: Re #1890: Question on DO/next: currently, it returns a block as a result. That means it must allocate a new block each time. An alternative would be to provide a variable name as an argument, and it would not need to allocate a new block each time. result: do/next block1 'block2 It would also be possible to: result: do/next block 'block Something to think about. | |
Ladislav 2-Jun-2009 [14842] | OK with me |
Carl 2-Jun-2009 [14843] | (I don't know how many people use DO/next - I don't use it myself.) |
Ladislav 2-Jun-2009 [14844x2] | can you check bug#879? |
Tomc needs it for a homework assignment, unknown due date. | |
Carl 2-Jun-2009 [14846x2] | Ok, where best to post the answer? |
I will post it in the bug report. | |
Ladislav 2-Jun-2009 [14848x4] | Do/next I defined my %build.r dialect with it |
...and later %spider.r dialect, %xyplot.r dialect, using %build.r | |
I am using %build.r instead of Compose as I advertised many times | |
BTW, BrianH is a co-author of it | |
Carl 2-Jun-2009 [14852] | Ladislav: random ticket updated with code |
BrianH 2-Jun-2009 [14853] | Carl, there are at least a half-dozen mezzanine/library function requests that are waiting for DO/next. Your continuation word idea is good though :) |
Carl 2-Jun-2009 [14854x2] | For compat, it could be different refinement name. |
The difference in overhead is large, but not sure how much it matters to anyone. | |
Ladislav 2-Jun-2009 [14856x2] | no prob with me even with the same name |
overhead: yes, I found a test showing really huge diff when not generating blocks every now and then | |
BrianH 2-Jun-2009 [14858x2] | It would matter to me. If DO/next were more efficient, I would not consider use of it to be a sign of a bad function :) |
I'm not that worried about compatibility here - see bug#666 :) It would be simple to search for, like copy/deep which is also improved in R3. | |
Ladislav 2-Jun-2009 [14860x2] | thanks, Carl. BTW, I am using www.rebol.org as a truly random source, since it is so easy in REBOL |
errata: www.random.org | |
Pekr 2-Jun-2009 [14862] | I just read bug #666. Cool number and cool ticket at once :-) |
BrianH 2-Jun-2009 [14863] | When I saw that number coming up, I had to do something appropriate there :) |
Carl 2-Jun-2009 [14864x2] | I just lost my connection to rebol.net -- quite odd -- as if a router along the way just stopped working. |
See R3 Chat #4403 regarding how to get new R3 to test DO/next. | |
Maxim 2-Jun-2009 [14866] | Carl, btw, something in liquid is causing a prior versio of R3 to crash. I'll try next week with the latest version, there might be some new tickets coming as part of the R3 conversion of liquid. |
Carl 2-Jun-2009 [14867] | BTW, I estimate DO/next overhead about 30% of full speed DO. |
Pekr 2-Jun-2009 [14868] | quite slow, no? |
Carl 2-Jun-2009 [14869x2] | Maxim: is it just the math part of Liquid or includes graphics? |
Pekr, no... that's very fast! | |
Pekr 2-Jun-2009 [14871] | There were no changes in gfx kernel for quite some time, no? Well, but maybe it could be related due to some other changes? |
Maxim 2-Jun-2009 [14872] | carl: just the dataflow part.... the graphics engine is obviously not compatible. |
Carl 2-Jun-2009 [14873] | In other words, it is running at 66% of full speed of REDUCE!! |
Maxim 2-Jun-2009 [14874] | its an object within an object, so I am thinking it has something to do with binding. |
Carl 2-Jun-2009 [14875x2] | Maxim: ah good, I look foward to seeing the problem. |
BTW, there is a bug in objects related to a copy loop if the object references itself (directly or via a block). | |
BrianH 2-Jun-2009 [14877] | Is that new? |
older newer | first last |