r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[World] For discussion of World language

Geomol
13-Feb-2012
[873x3]
Continuing from #Not REBOL. A MORE? function could look like:

more?: make function! [[
	"True if a series isn't empty."
	series [series! none!]
][
	if none! = type? series [
		return false
	]
	0 < length? series
]]
Could also be made easier to read maybe, but slower:

more?: make function! [[
	"True if a series isn't empty."
	series [series! none!]
][
	not any [none? series tail? series]
]]
And to make is less confusing, the function description should probably 
read "True if a series isn't at its tail."
Geomol
19-Feb-2012
[876x2]
Working on the next release of World, I implemented coercion for 
words and datatypes, so things like block! = 'block! returns true. 
This lead to a much simpler implementation of SWITCH, which is a 
mezzanine in World, so it looks like I'm on the right track.
Another point talking against open sourcing at this time. World is 
not completely set in stone yet, I admit that. When I make design 
changes like this coercion between datatypes and words, it affect 
all other code, which can fast become a mess, if you have 10 people 
working on it. When it's completely set in stone, it's another situation.
Geomol
21-Feb-2012
[878x2]
Update!


I'm implementing support for cyclic series in World these days. My 
initial research about freeing memory taken by cyclic series made 
me realize, that it'll hit performance, if every block and paren 
freed is being tested for cyclic references. So I'll implement a 
FREE mezzanine written in World, that can free such structures. This 
lead me to molding such structures, which is only partly implemented 
in current version of World and copying such structures. Those functions 
will be mezzanines too, as it's much easier to write the code in 
World than in C. So some C code will be removed in next release, 
but we'll have some more World code instead.
Btw. COPY is by defauit deep in World (contrary to REBOL), and World 
will support deep copying of cyclic blocks, which gives a stack overflow 
error in REBOL.
Maxim
21-Feb-2012
[880]
no cyclic error in R3 IIRC (it was fixed in some alpha).
Pekr
21-Feb-2012
[881]
In one of 114 alphas :-)
BrianH
22-Feb-2012
[882]
Maxim, the fix was requested for R3 but not yet implemented, or planned.
Maxim
23-Feb-2012
[883]
hum... strange I feel like it was fixed, since at some point, R3 
coudn't make objects which I required, then, when Carl did the whole 
copy/make makeover, I was able to start using R3 because of deep 
copying issues being resolved ... maybe it was not completely fixed.
Kaj
23-Feb-2012
[884]
I don't think that was about cyclic structures
Maxim
23-Feb-2012
[885:last]
yes.. definitely but I think Carl may have only fixed it for cyclic 
Objects references.