Giter Site home page Giter Site logo

iolanguage / io Goto Github PK

View Code? Open in Web Editor NEW
2.6K 2.6K 298.0 25.96 MB

Io programming language. Inspired by Self, Smalltalk and LISP.

Home Page: http://iolanguage.org

License: Other

CMake 0.85% Io 28.20% Shell 0.04% C 63.54% Objective-C 0.29% Assembly 0.17% C++ 1.27% HTML 4.75% Makefile 0.02% Emacs Lisp 0.55% JavaScript 0.02% Batchfile 0.01% Roff 0.10% Rich Text Format 0.03% Dockerfile 0.02% Vim Script 0.14%

io's People

Contributors

ales-tsurko avatar apjanke avatar bnoordhuis avatar bolshakov avatar cdmoyer avatar d-r avatar datakinds avatar dendik avatar dennisferron avatar doublec avatar eradman avatar fredreichbier avatar iamaleksey avatar igstan avatar indyjo avatar jcowgar avatar jeremytregunna avatar jmhodges avatar josip avatar mig-hub avatar mkhl avatar oleganza avatar perfaram avatar petrm avatar quag avatar richcollins avatar samuellwn avatar stevedekorte avatar superbobry avatar yangfl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

io's Issues

SQLite3 uses wrong string in path when opening database implicitly

The following script will open the file "select * from foo", not the file "myfile.sqlite".

db := SQLite3 clone
db setPath("myfile.sqlite")
db exec("select * from foo")
db close

I'm fairly certain the offending line is here:

http://github.com/stevedekorte/io/blob/master/addons/SQLite3/source/IoSQLite3.c#L332

IoSQLite3_execWithCallback forwards its message to IoSQLite3_open if the database isn't already open. IoSQLite3_open uses the first argument of its message as the database path if there is one.

Path with does not return a new Path object

According to the documentation, "Path with" should return a new Path object. However, it doesn't do this; the resulting object appears to be a Sequence, and does not listen to Path methods like absolute and isPathAbsolute.

Addons cannot contain any object with "Tag" in their name

create an io-only addon called MyAddon with files Tag.io and MyObject.io.
file Tag.io
Tag := Object clone

file MyObject
MyObject := Tag clone

Start Io REPL and import MyAddon.

Exception: Object does not respond to 'Tag'


Object Tag MyObject.io 1
Addon load AddonLoader.io 118
AddonLoader loadAddonNamed Z_Importer.io 51
AddonImporter import Z_Importer.io 64
List detect Z_Importer.io 64
true and Z_Importer.io 64
Object Web test.io 2
Importer import Z_Importer.io 77
CLI doFile Z_CLI.io 138
CLI run IoState_runCLI() 1

This issue arises if the word Tag appears anywhere in any object name.

[IoVM] Object activate

Unfortunatelly the only way of getting a reference to the object being activated is:
call sender getSlot(call message name)
Which is black magic, really; even call activated point to the Block not, the object. Why not make call activated point at it?

[IoVM] List map (select, detect, groupBy)

Io> try(x) isNil not
==> true
Io> list(1,2,3) select(x, x > 3)
==> nil
Io> x
==> 3

Instead of creating a new context object, theese methods do setSlot() on the sender.

[ReadLine] completion features

Can somebody possibly add bindings to readline completion functions? It would be great to have customizable runtime completion in the REPL. Unfortunately, I'm not very good with C, so I can't do it myself.

[IoVM] Map isNotEmpty

The forgotten method :)

Io> list() isNotEmpty
==> false
Io> Map clone isNotEmpty
    Exception: Map does not respond to 'isNotEmpty'
    ---------
    Map isNotEmpty                       Command Line 1

Coding and committing standards

After some chat in #io, I noticed there is a handful of people that wants a minimal coding standards document.

Things like spaces/tabs, indentation, trailing spaces, naming conventions, comment styles, commit message guidelines and others should be specified at a minimum.

[IoVM] Block isKindOf

I'm not quite sure what's happening here, but Block instances handle isKindOf incorrectly. Example:
Io> Block isKindOf(Object)
==> true
Io> Lobby getSlot("forward") type
==> Block
Io> Lobby getSlot("forward") isKindOf(Object)

  Exception: Object does not respond to 'self'
  ---------
  Object self                          A2_Object.io 380
  Block ancestors                      A2_Object.io 387
  Block isKindOf                       Command Line 1

[IoVM] isDirectory doesn't work on ReiserFS

Hello there,

I have Gentoo box with ReiserFS partitions and Directory with("test") items always returns a list of Files. I made a quick debugging and found that isDirectory (IoDirectory.c) always returns 0 because dirent d_type field contains DT_UNKNOWN. Man page for readdir states that "Currently, only some file systems (among them: Btrfs, ext2, ext3, and ext4) have full support returning the file type in d_type" so I don't think that's a good implementation you have now. Changing the method to something like below would probably be a better solution.

int isDirectory(struct dirent *dp, char *path)
{
    #ifdef DT_DIR
    if (dp->d_type == DT_DIR)
    {
        return 1;
    }
    #endif
    struct stat st;
    if (!stat(path, &st))
    {
        return ( (st.st_mode & S_IFMT) == S_IFDIR );
    }
    return 0;
}

Regards,
Mike

[IoVM] asJson problems

asJson isn't defined for nil, false and true singletons
Io> true asJson

  Exception: true does not respond to 'asJson'
  ---------
  true asJson                          Command Line 

Io> false asJson

  Exception: false does not respond to 'asJson'
  ---------
  false asJson                         Command Line 

Io> nil asJson

  Exception: nil does not respond to 'asJson'
  ---------
  nil asJson                           Command Line 

I suggest moving all the JSON related functionality from core to the JSON addon,
since it really isn't needed all the time.

Unexpected auto-import behavior

The behavior of the Io interpreter is a bit unexpected when you have a directory named io/addons/* in the working directory. See the following shell session.

david@third:~/test_dir$ ls -a
.  ..
david@third:~/test_dir$ io
Io 20090105
Io> Random value
==> 0.3316115872003138
Io> 
david@third:~/test_dir$ mkdir -p io/addons/Random
david@third:~/test_dir$ io
Io 20090105
Io> Random value

  Exception: unable to read file 'io/addons/Random/depends'
  ---------
  contents                            AddonLoader.io 46
  Object Random                        Command Line 1

I believe that removing "io/addons" from AddonLoader searchPaths would fix the issue. Is there any reason to keep that directory in the default search path?

In most normal usage, this issue won't show up, but if, for example, you happen to have a copy of the Io source tree in a folder named io under your current directory (which is a perfectly reasonable situation to have), it can be quite confusing.

Issue with the io Lexer

I found an issue when passing the string "()", "[]" or "{}" to Compiler tokensForString. The first token returned has its line slot set to 0.
When i pass any other string, such as "Foo bar()", the first token has the line slot set to one.

The following command should return true
Compiler tokensForString("()") at(0) line == Compiler tokensForString("a") at(0) line

List map(x, ...) works wrong

It seems that list map method resolves a symbol when it must not.
For example:

Io> x := list(1, 2, 3, 4, 5)
==> list(1, 2, 3, 4, 5)
Io> x map(z, z ** 2)
==> list(1, 4, 9, 16, 25)
Io> x
==> list(1, 2, 3, 4, 5) // all right this time
Io> x map(x, x ** 2)
==> list(1, 4, 9, 16, 25)
Io> x
==> 5  // and now x receives a last value of the list

Here is a part of List map method:

    if(a3 == nil, 
        a1 := a1 name
        self foreach(v, 
            call sender setSlot(a1, getSlot("v"))
            ss := stopStatus(c := a2 doInContext(call sender, call sender))
            if(ss isReturn, ss return getSlot("c"))
            if(ss stopLooping, break)
            if(ss isContinue, continue)
            aList append(getSlot("c"))
        )
        return aList
    )

call sender setSlot(a1, getSlot("v")) -- this line seems the reason of this issue, so maybe this works as designed?

Could not use SGML addon

Io> SGML

  Exception: Error loading object '/usr/lib/io/addons/SGML/_build/dll/libIoSGML.so': 'libsgml.so: cannot open shared object file: No such file or directory'
  ---------
  open                                AddonLoader.io 65
  Object SGML                          Command Line 1

But this file really exists:

$ ls -l /usr/lib/io/addons/SGML/_build/dll/libIoSGML.so
-rwxr-xr-x 1 root root 88633 Мар  9 20:39 /usr/lib/io/addons/SGML/_build/dll/libIoSGML.so

'PDB sync' always fails with IoCoroutine error

Running unit tests on Mac OSX 10.6.2 fails as below. I haven't tried other architectures:

make testaddons
...
Obsidian - testBasic
testSimpleSync
IoCoroutine error: unable to auto abort coro 0x1005ca050 by resuming parent coro Object_0x10022a7d0

This worked as of probably 6 months ago. It's reproducible following a basic PDB workflow such as that from the examples:

User := Object clone pSlots(name)
steve := User clone steve = "steve"
PDB setPath("test.tc")
PDB open
PDB root atPut("users", PMap clone)
PDB root users atPut("steve", steve)
PDB sync
IoCoroutine error: unable to auto abort coro 0x1002c8d40 by resuming parent coro Object_0x10022b0a0

[IoVM] Sequence removeAt

The current removeAt implementation for Sequence looks a little inconsistent to me, at least compared to the way List acts:
Io> "123" removeAt(0)
==> "23"
Io> list(1,2,3) removeAt(0)
==> 1

sort(bar) isn't working

Tag: 2010.06.06

Steps to Reproduce:

Foo := Object clone do(
  newSlot("bar")
)
foos := list(
  Foo clone setBar(1),
  Foo clone setBar(3),
  Foo clone setBar(2)
)
foos sort(bar) map(bar) foreach(print)

Expected: 123
Actual: 132

[IoVM] tests broken

make testvm results in...
======================================================================
FAIL: DateTest testAsSerializationAndFromSerialization
----------------------------------------------------------------------

  Exception: [d != Date clone fromSerialization(d asSerialization)] [Date_0x9b7e800 != Date_0x9b7de08]
  ---------
  Exception raise                      UnitTest.io 146
  DateTest assertEquals                DateTest.io 51
  DateTest testAsSerializationAndFromSerialization doString 1

======================================================================
FAIL: SequenceTest testAsNumber
----------------------------------------------------------------------

  Exception: [Number constants nan asString != "" asNumber asString] ["-nan" != "nan"]
  ---------
  Exception raise                      UnitTest.io 146
  SequenceTest assertEquals            SequenceTest.io 27
  SequenceTest testAsNumber            doString 1

======================================================================
FAIL: SequenceTest testBetweenSeq
----------------------------------------------------------------------

  Exception: ["bc" != "bcd" betweenSeq("a", "d")] ["bc" != nil]
  ---------
  Exception raise                      UnitTest.io 146
  SequenceTest assertEquals            SequenceTest.io 557
  SequenceTest testBetweenSeq          doString 1

======================================================================
FAIL: ObjectTest testWillFree
----------------------------------------------------------------------

  Exception: [Lobby willFreeWorked != true] [false != true]
  ---------
  Exception raise                      UnitTest.io 146
  ObjectTest assertEquals              ObjectTest.io 108
  ObjectTest testWillFree              doString 1

Yajl addon does not work

I got the most recent pull from git of both Yajl and Io, and installed both. When I run Io and reference Yajl, I get this error:

justin@bug ~/s/io> io
Io 20090105
Io> Yajl

  Exception: Error loading object '/usr/local/lib/io/addons/Yajl/_build/dll/libIoYajl.so': 'libyajl.so.1: cannot open shared object file: No such file or directory'
  ---------
  open                                AddonLoader.io 65
  Object Yajl                          Command Line 1

When I ls /usr/local/lib/*yajl*, I see that everything is installed properly:

justin@bug ~/s/io> ls /usr/local/lib/*yajl*
/usr/local/lib/libyajl_s.a    /usr/local/lib/libyajl.so.0.4.0
/usr/local/lib/libyajl.so@    /usr/local/lib/libyajl.so.1@
/usr/local/lib/libyajl.so.0@  /usr/local/lib/libyajl.so.1.0.8

Has anyone had similar issues, or got any suggestions for what I should do?

"foo" findReges("foo") returns RegexMatch ""

Tag: 2010.06.06

Steps to reproduce:
Regex; "foo" findRegex("foo")

Expected: RegexMatch "foo"
Actual: RegexMatch ""

in #io, jer had this to say about it: "it might be related to a bug in Range wrt comparison during looping"

inline magic doesn't work in clang

clang is only going to gain in prominence as a mainline compiler within many toolchains as time goes on with the aggressive stance the GPLv3 has taken on some vendors that employ GPL software. As a result, major investment has been sunk into clang development by these companies (notables include Apple), and it is to a point where it can actually be used for many applications (the FreeBSD operating system has even been ported to it).

As a result, I think it time we look at fixing Io so we can get it to build on clang. Unfortunately, all the preprocessor magic to subvert the compiler not inlining stuff we want inlined needs to be rethought. clang does not support this kind of behaviour, and fails to find many symbols because of it. We need a longer term solution.

[IoVM] Object tailCall

According to Jeremy, tailCall support was removed quite a while ago, however the slot appears in the reference and is defined in the Object proto.
Io> getSlot("tailCall")
==> Object_tailCall()

[IoVM] weird locals behavior with doFile

Source:
T := Object clone do(
doFile := method(path, "allright" println)
run := method(
doFile("zzzz")
)
)

T run

Output:
bobry@bobry ~/coding/io % io ../tmp/io/templ.io

  Exception: unable to read file 'zzzz'
  ---------
  doFile                              templ.io 4
  T run                                templ.io 8

Is this the expected behaviour?

Some addons not compiling

On very typical Snow Leopard system, I get the following addons not compiling, due to errors: Socket, AppleExtras, ObjcBridge and SecureSocket.

Any idea why?

make vm failure on Mac OS X powerpc

version: d2e9b90

OS: Mac OS X 10.4.11 powerpc

error log:

../coroutine/_build/headers/power-ucontext.h:7: error: parse error before 'ulong'
../coroutine/_build/headers/power-ucontext.h:7: warning: no semicolon at end of struct or union
../coroutine/_build/headers/power-ucontext.h:8: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:9: error: parse error before 'ctr'
../coroutine/_build/headers/power-ucontext.h:9: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:10: error: parse error before 'xer'
../coroutine/_build/headers/power-ucontext.h:10: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:11: error: parse error before 'sp'
../coroutine/_build/headers/power-ucontext.h:11: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:12: error: parse error before 'toc'
../coroutine/_build/headers/power-ucontext.h:12: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:13: error: parse error before 'r3'
../coroutine/_build/headers/power-ucontext.h:13: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:14: error: parse error before 'gpr'
../coroutine/_build/headers/power-ucontext.h:14: warning: data definition has no type or storage class
../coroutine/_build/headers/power-ucontext.h:21: error: parse error before '}' token
../coroutine/_build/headers/power-ucontext.h:30: error: field 'mc' has incomplete type
make[2]: *** [_build/objs/IoBlock.o] Error 1
make[1]: *** [all] Error 2
make: *** [vm] Error 2

[Regex] doesn't work

Regex 
Io> "Hello world!" allMatchesOfRegex("\\w+")
==> list(RegexMatch: "", RegexMatch: "")

All of the tests in addons/Regex/tests/ fail, too.
Arch Linix, PCRE 8.02

Memory comsumption after Exception thrown during CLI session

Shown is an interleaved Io CLI/1-second-step-ps aux output.
An Io CLI is excuted, then a mistake is make, then a 10000000
for loop. Memory is eaten nearly until 50% during loop execution.
At exit, the CLI takes ~2 seconds to complete exit.

Machine is a Debian amd64 with 4Gb RAM. Same behavior on a Debian
i686 with 2Gb RAM.

Io 20090105

Io>

omf 13702 0.6 0.1 16208 5952 pts/3 S+ 22:58 0:00 io

Io> for(

Exception: compile error: "unmatched ()s" on line 1 character 4


message 'Error' in '[unlabeled]' on line 0

Io>

omf 13702 0.0 0.1 16340 5996 pts/3 S+ 22:58 0:00 io

Io> for(i,0,10000000,1,s:="hello")

==> hello

omf 13702 0.1 1.9 87752 77284 pts/3 R+ 22:58 0:00 io
omf 13702 0.8 11.3 469232 458748 pts/3 R+ 22:58 0:01 io
omf 13702 1.5 20.6 848336 837780 pts/3 R+ 22:58 0:02 io
omf 13702 2.2 29.9 1227836 1217280 pts/3 R+ 22:58 0:03 io
omf 13702 2.8 39.5 1617764 1607228 pts/3 R+ 22:58 0:04 io
omf 13702 3.0 42.4 1734188 1723512 pts/3 S+ 22:58 0:04 io

omf 13702 3.0 42.4 1734188 1723512 pts/3 S+ 22:58 0:04 io

Io> Collector collect
Collector warning: attempt to force collection while pause count = 1
==> 0
Io>

[IoVM] File moveTo

According to the docs:

Raises ... File nameConflict exception if the file nameString already exists.

The realities:
Io> f := File with("test.io") open close
==> File_0x9f73450:

Io> f exists
==> true
Io> File with(f path) exists
==> true
Io> File with("testAgain.io") open moveTo(f path)
==>  File_0x9f88808:

[IoVM] Sequence print and BASH escape sequences

UArray seems to be doing something with \0, but I wasn't able to locate the part where it's happening.
bobry@bobry ~/coding/io % io -e ""\033[1mFoo\033[0m\n" cPrint"
33[1mFoo33[0m
bobry@bobry ~/coding/io % io -e ""\033[1mFoo\033[0m\n" print"
33[1mFoo33[0m

Addons do not build

This is since commit 5472169. The change in Project.io is looking for the build.io script inside a "build" directory.

Documentation state.

Is there plans to document all features of language/library and to keep them in actual state?
If yes, I can maintain some piece of information.
If no, it is a pity...

Installation fails on Mac OSX 10.6.2

Attached is the command output for make vm.

make vm for dir in basekit coroutine garbagecollector iovm; do INSTALL_PREFIX=/usr/local make -C libs/$dir; done mkdir -p _build mkdir -p _build/objs mkdir -p _build/headers mkdir -p _build/lib mkdir -p _build/dll make _build/lib/libbasekit.a make[2]:_build/lib/libbasekit.a' is up to date.
make _build/dll/libbasekit.dylib
make[2]: _build/dll/libbasekit.dylib' is up to date. cp source/BStream.h source/BStreamTag.h source/Base.h source/Common.h source/Common_inline.h source/ConvertUTF.h source/Date.h source/Duration.h source/DynLib.h source/List.h source/List_inline.h source/MainArgs.h source/PHash.h source/PHash_inline.h source/PortableGettimeofday.h source/PortableStdint.h source/PortableStrlcpy.h source/PortableStrptime.h source/PortableTruncate.h source/PortableUsleep.h source/RandomGen.h source/SHash.h source/SHash_inline.h source/Sorting.h source/Stack.h source/Stack_inline.h source/UArray.h source/UArray_character.h source/UArray_format.h source/UArray_math.h source/UArray_path.h source/UArray_stream.h source/UArray_string.h source/UArray_utf.h _build/headers mkdir -p _build mkdir -p _build/objs mkdir -p _build/headers mkdir -p _build/lib mkdir -p _build/dll make _build/lib/libcoroutine.a make[2]:_build/lib/libcoroutine.a' is up to date.
make _build/dll/libcoroutine.dylib
cc -dynamiclib -flat_namespace -L../basekit/_build/dll _build/objs/*.o -o _build/dll/libcoroutine.dylib -lbasekit
Undefined symbols:
"__getmcontext", referenced from:
_Coro_setup in Coro.o
Coro_startCoro in Coro.o
_swapcontext in PortableUContext.o
"__setmcontext", referenced from:
_swapcontext in PortableUContext.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [_build/dll/libcoroutine.dylib] Error 1
make[1]: *** [all] Error 2
mkdir -p _build
mkdir -p _build/objs
mkdir -p _build/headers
mkdir -p _build/lib
mkdir -p _build/dll
make _build/lib/libgarbagecollector.a
make[2]: _build/lib/libgarbagecollector.a' is up to date. make _build/dll/libgarbagecollector.dylib make[2]:_build/dll/libgarbagecollector.dylib' is up to date.
cp source/Collector.h source/CollectorMarker.h source/CollectorMarker_inline.h source/Collector_inline.h build/headers
make -f Makefile.local all_begin
./tools/io2c VMCode IoState_doString
io/A0_List.io io/A1_OperatorTable.io io/A2_Object.io io/A3_List.io io/A4_Exception.io io/Actor.io io/AddonLoader.io io/B_Sequence.io io/Block.io io/CFunction.io io/Date.io io/Debugger.io io/Directory.io io/DynLib.io io/Error.io io/File.io io/List_schwartzian.io io/Map.io io/Message.io io/Number.io io/Sandbox.io io/Serialize.io io/System.io io/UnitTest.io io/Vector.io io/Y_Path.io io/Z_CLI.io io/Z_Importer.io > source/IoVMInit.c
mkdir -p _build
mkdir -p _build/objs
mkdir -p _build/headers
mkdir -p _build/lib
mkdir -p _build/dll
make _build/lib/libiovm.a
cc -DINSTALL_PREFIX="/usr/local" -O3 -g -Wstrict-prototypes -I. -I./source -I../basekit/_build/headers -I../coroutine/_build/headers -I../garbagecollector/_build/headers -falign-loops=16 -fPIC -DBUILDING_IOVM_DLL -c source/IoBlock.c -o _build/objs/IoBlock.o
In file included from source/IoState.h:23,
from source/IoObject_inline.h:12,
from source/IoObject.h:236,
from source/IoBlock.h:9,
from source/IoBlock.c:9:
source/IoCoroutine.h:12:18: error: Coro.h: No such file or directory
In file included from source/IoState.h:23,
from source/IoObject_inline.h:12,
from source/IoObject.h:236,
from source/IoBlock.h:9,
from source/IoBlock.c:9:
source/IoCoroutine.h:24: error: expected specifier-qualifier-list before ‘Coro’
make[2]: *** [_build/objs/IoBlock.o] Error 1
make[1]: *** [all] Error 2
make: *** [vm] Error 2
`

IoState_UserInterruptHandler

IoState_UserInterruptHandler shouldn't print an error message when a userInterruptHandler slot is set on System

[IoVM] List_slice step

Hello, I've noticed that List slice slot doesn't accept step argument. I'm pretty sure most of the modern language provide such a feature, for example Python:
>>> [1, 2, 3, 4][::2]
[1, 3]
It shouldn't take a lot of effort to implement this, since slice is a simple for loop.

[IoVM] List asString

List asString should probably call asSimpleString
Io> list(Object clone, Object clone)
==> list( Object_0x90d3718:
, Object_0x90d3740:
)

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.