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

World: r3wp

[World] For discussion of World language

Pekr
13-Feb-2012
[865]
Well, a trade-off :-) It is about to get the most expected result 
preferably, vs your mentioned speed :-)
Endo
13-Feb-2012
[866]
What about a compiler option to turn on and off the typecheck? More 
complicated, but we would have a chance to run in default (typecheck) 
and then test it without typecheck by changing just one option.
Geomol
13-Feb-2012
[867x3]
After I wrote the above, I considered it some more. Right now, most 
people will probably run into this problem, because most libraries 
return 32 bit values. But in the future, and with what World is very 
much designed for, namely science, 64 bit values will be used. So 
I'm not gonna change it.


Problem with compiler option is, that we then have two versions of 
World, and programs made for one won't run on the other.


Maybe better to make a World wrapper function with it's own routine 
definition dialect!?
Like ROUTINE is a helper function calling MAKE ROUTINE!, a ROUTINE32 
(or something) can be made to have typecheck as default.
with *its* own ...
Endo
13-Feb-2012
[870]
But we should set the option in the (on top of) source code, not 
in runtime, so it should not be a problem having 2 versions of World. 
We can say "compile this source with "typecheck" options". No?
Geomol
13-Feb-2012
[871]
ah, I'll consider that.
Endo
13-Feb-2012
[872]
In the boot time of World compiler some functions changes according 
to some options. As in "Option Compare", "Option Explicit" options 
in VB6.
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.