Git Product home page Git Product logo

world's Introduction

This is an alpha release. For testing only. Use at your own risk. Do not distribute.

To run a test
-------------
Pick one of the world_* files and rename it to 'world' - then make it executable. (Rename 'world_win32.exe' to 'world.exe' under Windows).
Also download "cortex.w", "user.w" and the libs/, mezz/ and test/ directories (or just the whole ZIP).
Start world from a terminal.
At the world prompt do this:

w> .		; run the Hello, World! program
w> test		; should return true
w> m		; will run a Mandelbrot example

If it behaves this way, you are ready to go.

Follow: http://www.world-lang.org
World at GitHub: https://github.com/Geomol/World

Have fun!

To get help at the World prompt:

w> help

Known issues
------------

- The memory handling system can't cope with cyclic references.

- Operators don't support literals as their first argument, as functions do, and they don't take refinements.


world's People

Contributors

geomol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

world's Issues

system/options/format/real/digits

[btiffin@home World]$ ./world
Loading Cortex... Done
World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec 23 2011 10:09:47
w> system/options/format/real/digits: 32
== 32
w> 1 / 3
== 0.33333333333333331482961625624739
w> system/options/format/real/digits: 48
== 48
w> 1 / 3
*** stack smashing detected ***: ./world terminated
======= Backtrace: =========

...

== 0.333333333333333314829616256247390992939472198486Aborted (core dumped)

Somewhere between 32 and 48, my GNU/Linux world cracks. Don't care about digit support that high, but access to the real/digits field may require some fencing.

CTRL-C crashes World on Windows

CTRL-C crashes World on Windows in some cases

Example:
w> wait 10 ;then press CTRL-C
or
w> p: open udp://:1234 first p ;then press CTRL-C

Auto brackets

sqlab: the automatic closing of open brackets may be handy when typing, but it gets in the way copying from the clipboard

now busted

== -5:00
w>n: now
== -5:00
w> n/time
== 4:03:45
w> call "set"
...
LANG=en_US.utf8
LANGUAGE=
...

I don't see any other LC_ or locale settings

Add facility to run scripts from the command line

Currently, starting the world binary with a script as an argument just ignores the script and gets you to the prompt:

$ ./world_linux hello.w 
Loading Cortex... Done
World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec  4 2011 09:53:36
w>

It would be nice if a world script could be executed directly that way.

Explicit block compilation does not work

Implicit compilation of blocks (via do) works fine:

w> x: 42 
== 42
w> c1: [x]
== [x]
w> do c1
== 42

Explicit compilation, however, does not:

w> c2: [x]
== [x]
w> compile c2
== [x]
w> compiled? c2 
== true
w> do c2
== [x] ;; expected: 42

load/all stops when null bytes in file

[btiffin@hcn09 World]$ ./world
Loading Cortex... Done
World/Cortex 0  Copyright (c) 2009-2012 John Niclasen, NicomSoft
build: Jan 12 2012 12:13:51
w> load/all %world
== [#{7F454C46010101}]
w> q
[btiffin@hcn09 World]$ hexdump world | head
0000000 457f 464c 0101 0001 0000 0000 0000 0000
0000010 0002 0003 0001 0000 a68c 0804 0034 0000

try.w test missing

Latest git pull, 2011-12-22 try.w is missing from test/functions/control

Ctrld-D should exit the REPL

Currently pressing ctrl-d inputs the EOT character (u+0004). It would be nice if ctrl-d just exits the interpreter instead (as if calling q).

Feature Request for exploring the alpha

Geomol, Can you add "words" to list out the dictionary? I know REBOL uses "what" but being a Forther, words makes far more sense and I never got with the what. Having said that, what would suffice if you are going for compatibility.

Cortex prints startup information even in quiet mode

$ ./world_linux -q hello.w 
Loading Cortex... Done
hello, world!

In quiet mode, the "Loading Cortex... Done" output should be suppressed.

I guess that would require exposing the information that World was started in quiet mode somewhere. REBOL's system/options/quiet would be one possibility. (A script-local argument passed from the interpreter to cortex, another.)

Executing a script should default to quiet mode

Currently, World prints the whole gamut of startup banners even when executing a script:

$ ./world_linux hello.w 
Loading Cortex... Done
World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec 22 2011 09:52:46
hello, world!
$

For executing scripts, this excessive verbosity is rarely useful. Instead, executing a script should default to quiet mode (i.e. as if -q was passed to the World interpreter).

Problem with use

In rebol:

>> use [x][x: 5 y: func [r][r + x]]
>> y 6
== 11

In World:

Loading Cortex... Done
World/Cortex 0  (c) John Niclasen, NicomSoft
build: Apr  3 2015 19:29:22
w> do %rebol.w
Loading REBOL Extension... Done
w> use [x][x: 5 y: func [r][r + x]]
w> y 5
** Script error: y has no value
** Near: y 5

help with word! seems broken

w> help 'abc ** Script error: abc has no value ** Near: path! <> type? :word w> a: 'abc == abc w> help a a is a word! of value: abc w>

Loading Cortex... Done
World/Cortex 0 Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec 11 2011 21:28:07

git pull on Dec 13, 22:00 Ottawa time.

tcp scheme parser problem

Missing the second colon borks.

w> lp: open tcp://8080
Segmentation fault (core dumped)
[btiffin@home World]$ ./world
Loading Cortex... Done
World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec 11 2011 21:28:07
w> lp: open tcp://:8080
w> call "uname -a"
Linux home 2.6.35.14-106.fc14.x86_64 #1 SMP Wed Nov 23 13:07:52 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
== 0
w>

Modifying a compiled block! should reset its compiled state

Let's start with a simple code block:

w> x: 99 
== 99
w> c: [x]
== [x]
w> do c
== 99 ;; Fine
w> compiled? c
== true

If we now change the block's content, the compiled flag is not reset:

w> append c [* 2]
== [x * 2]
w> c
== [x * 2]
w> compiled? c
== true

Now it could be that it's just marked as "dirty" and recompiled the next time it's evaluated. But no, evaluating the block again returns an unexpected result:

w> do c
== 99 ;; expected: 198

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.