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
4-Dec-2011
[293]
ok
Oldes
4-Dec-2011
[294]
I guess you should give us a bug tracker.
Geomol
4-Dec-2011
[295]
nooo too much work for me. :)


Well, for now I would not have time enough to deal with lots of bug 
reports. At a later time, when I'm mostly done coding on it, and 
have removed all the bugs, I already know about, and added missing 
features, bug reports are very welcome. But simple tests, like you 
see in the test/ dir is a good idea. I can handle a couple of falsed 
tests at a time now. So maybe that's a way.


What do you guys think is a good way? What way will get to the goal 
knowing I'm booked with things to do already.
Oldes
4-Dec-2011
[296]
I guess you need form for feature requests as well :) For example 
the routine! part is not good enough, R2 version is better at this 
moment.
Geomol
4-Dec-2011
[297x4]
Yes.
Fixing the routine part is high on my list.
And the defining rules for routines will most likely change, so don't 
use a lot of time making routines, unless you're ready to change 
your code later.
Defining routines is on page 10 in cortex_alpha.pdf. I just updated 
that doc.

Oldes, you can try putting in the [typecheck] special attribute.
Oldes
4-Dec-2011
[301]
don't forget routines which return void
Geomol
4-Dec-2011
[302x3]
I think, that's supported already with
void none!
at the end of the make routine! block.
And when the return type is void, the World type after (none! in 
my example above, I should maybe had said unset!) is ignored. Return 
is unset! then.
Reached 1000 pageviews.

Stats about audience for
http://world-lang.org


Overview: http://www.fys.ku.dk/~niclasen/world/overview_20111204.png
Stats: http://www.fys.ku.dk/~niclasen/world/stats_20111204.png


Earlier stats: http://www.fys.ku.dk/~niclasen/world/stats_20111128.png
PeterWood
4-Dec-2011
[305x2]
On OS X, World seems to be fussy about which directory it is launched 
from:

Rodney:Simple-Test peter$ cd ~/Languages/World
Rodney:World
 peter$ ./world

Loading Cortex... Done

World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft

build: Dec  3 2011 11:27:45

w> .

Hello, World!
w> tes
t
== true
w
> quit

Rodney:World peter$ cd ~/Code/Rebol/Simple-Test

Rodney:Simple-Test peter$ ~/Languages/World/world

World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft

build: Dec  3 2011 11:27:45

w> .

** Error: . has no value

** Near: .

w> test

** Error: test has no value

** Near: test

w> quit
Do you have a place to keep a list of REBOL incompatibilities?

For example:

** Error: set has no refinement called any
Geomol
4-Dec-2011
[307]
Not yet. How do we do that the best way?
PeterWood
4-Dec-2011
[308x3]
May be using either Github issues or wiki
Nenad uses Github issues for bug and feature request tracking for 
Red though perhaps the wiki would be better for a List of REBOL incompatabilities?
(Which I can't spell !!!)
Geomol
4-Dec-2011
[311x2]
I'll create a wiki.
Can you see the wiki: https://github.com/Geomol/World/wiki
Can you add to it/edit page?
Oldes
4-Dec-2011
[313]
Yes, I can
Geomol
4-Dec-2011
[314]
Cool! As I add features, functions, refinements, that wiki has to 
be kept up to date to be really useful. I don't have time to do it 
all myself.
Oldes
4-Dec-2011
[315]
You should add link to the world page into the readme file.
Geomol
4-Dec-2011
[316x2]
done
Peter, the directory launch problem, you see, is because it can't 
find and run cortex.w . I'll fix this. You can run it manually though 
with: do %<directory>/cortex.w
PeterWood
4-Dec-2011
[318]
Thanks, John
sqlab
4-Dec-2011
[319]
the automatic closing of open brackets may be handy when typing, 
but it gets in the way copying from the clipboard
Geomol
4-Dec-2011
[320]
Maybe if it could be turned off?
Andreas
4-Dec-2011
[321x3]
Pekr: "why it is so "big", as it mostly compares to /Core? :-)"


world's linux binary is already smaller than rebol/core 2.7.8 for 
linux. (not that it matters, though :)
re bug tracker: i think we can just use github's issue tracker [1] 
to _record_ issues we find, for now. so just so that there's a single 
place to collect them.

[1] https://github.com/Geomol/World/issues
Hmm, it seems that while (basic) compile/at with functions works 
fine, it doesn't work for blocks:
w> x: 1
== 1
w> do [x]
== 1
w> do compile/at c: [y] context [y: 99]
== [y]
w> compiled? c
== true
== 1
Geomol
4-Dec-2011
[324]
Yeah, many things are not finished in an alpha release.
Andreas
4-Dec-2011
[325x3]
Ok, understood.
Ey, DISASM unfortunately seems to stop at the first RETURN insn encountered 
instead of disassembling the complete bytecode :)
(Seems it indeed does, but it doesn't hurt much. Nested RETURNs are 
in different compiled blocks anway, so ...)
Geomol
5-Dec-2011
[328x4]
Code is compiled in two ways.


1) Code is being compiled to the VM, when it's being run. So if I 
define and run this function:

w> f: does [return 1 return 2]
w> f
== 1

only the first RETURN statement is being compiled.


2) If I instead compiled the functions, both statements are being 
compiled, e.g.:

w> compile :f


will compile both RETURN statements, but this has no impact, when 
running the function (of cource), and DISASM just stops, when it 
sees a RETURN.
Functions can also be in a parthly compiled state:

w> f: func [v][if v [return 42] print "Hello!"]
w> f true
== 42
w> disasm :f

...	(just part of the function is seen ending with an END_EXECUTE)
w> f false
Hello!
w> disasm :f
...	(the full function is seen ending with a RETURN)
*partly*
Q: Does binding work similarly to REBOL? I mean can World support 
current advanced REBOL block binding/building for generating code 
like Parse compilers or such oddities like this:
>> reduce [word word word]
== [1 2 3]


A: No, binding works differently in World. In World, each block is 
bound (points to a context).
Pekr
5-Dec-2011
[332]
btw - if World is supposed to be about dialect, I would rename it 
to simply a Word :-) You acronym still would make sense ....
Geomol
5-Dec-2011
[333]
Rename World to Word? You must be kiddin'! :) Gives some unwanted 
association.
Pekr
5-Dec-2011
[334x2]
Terry would explain to you, that in the beginning, there was a God, 
and right after him, there was a Word - the first dialect of our 
cosmos :-)
I don't understand the "unwanted association", but never mind - it 
is just me, that "World" has some obstacles when I tried to pronounce 
or write it, simply the letter "l" :-)
Geomol
5-Dec-2011
[336]
Try Google "Word".
Pekr
5-Dec-2011
[337]
Try Google "World" :-) Anyway - that's not important, it just came 
to my mind ...
Sunanda
5-Dec-2011
[338]
Can you comment on what World is doing when fed incorrect arguments? 
In these two cases below, both R2 and R3 throw an error....
       w> 1-jan-2011 xor 1-jan-2012
       == false
       w> 1-jan-2011 and 1-jan-2012
       == true
Geomol
5-Dec-2011
[339]
It relates to the true/false value of different values. Using IF, 
only logic false and none will fail the IF. All other values will 
fulfill the IF. I have brought this idea to AND, OR, XOR etc. So 
because you can write:

w> if 1-jan-2011 [true]
== true

you can also write

w> 1-jan-2011 and 1-jan-2012
== true
Sunanda
5-Dec-2011
[340]
Okay.....Yet is is confusing that bad args are caught in some cases 
but not in others:
       w> 1-jan-2012 xor 555
       == false
       w> 1-jan-2012 xor 5x5
       Valid pair: 5x5
       ** Error: xor is missing one or more arguments
       ** Near: 1-jan-2012 xor 5x5
Geomol
5-Dec-2011
[341x2]
That's because pair! isn't implemented. It's just prepared for in 
the lexer, and that's why you see the text "Valid pair: 5x5". Only 
the datatypes listed in the cortex_alpha.pdf doc enters the World 
engine, and pair! isn't among them ... yet.
In other words, the pair! is ignored at this time.