Goby Versions Save

Goby - Yet another programming language written in Go

v0.1.13

4 years ago

This version contains many new APIs, bug fixes and internal refactorings.

Features

Library

Fixes

Breaking Changes

v0.1.12

4 years ago

This version contains 1 new API and fixes a few issues. The rest of the changes were for internal polishing.

Features

Bug Fixes

v0.1.11

4 years ago

Noticeable Changes

New APIs

  • Object#tap - @st0012
  • Object#inspect - @mweitzel
  • Object#kind_of? - @284km
  • Array#sort- @st0012
  • Array#index_with - @hachi8833

API changes

  • Integer#time now returns an Enumerator - @st0012

Performance improvements

The overall performance is now 2x faster and object allocations and memory usage are reduced to half.

benchmarking e22beaebdea18ea8670d98d56f4e4f39eed444e8
benchmarking 587f1c8dadd5adec3c16642ae3133504682f4d5c
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
        ignoring go.mod;
        see 'go help modules'
x86_64-darwin18
benchmark                         old ns/op     new ns/op     delta
BenchmarkBasicMath/add-4          5650          3357          -40.58%
BenchmarkBasicMath/subtract-4     5592          2740          -51.00%
BenchmarkBasicMath/multiply-4     5687          2786          -51.01%
BenchmarkBasicMath/divide-4       5661          2757          -51.30%

benchmark                         old allocs     new allocs     delta
BenchmarkBasicMath/add-4          75             33             -56.00%
BenchmarkBasicMath/subtract-4     75             33             -56.00%
BenchmarkBasicMath/multiply-4     75             33             -56.00%
BenchmarkBasicMath/divide-4       75             33             -56.00%

benchmark                         old bytes     new bytes     delta
BenchmarkBasicMath/add-4          3152          1568          -50.25%
BenchmarkBasicMath/subtract-4     3152          1568          -50.25%
BenchmarkBasicMath/multiply-4     3152          1568          -50.25%
BenchmarkBasicMath/divide-4       3152          1568          -50.25%

Big thanks to @eliothedeman for the significant improvement 🎉

Other changes

There are a lot of refactoring/code reorganization/bug fixes in this version as well. They’re mainly done by @hachi8833, @ear7h and @saveriomiroddi

v0.1.10

5 years ago

Goby 0.1.10 release note

Performance Improvement

Compare to the first commit (d5f5fc) that introduces the benchmark

benchmarking d5f5fc591bdbd3cd8f35cfe4e753f977478eecf8
benchmarking e22beaebdea18ea8670d98d56f4e4f39eed444e8
x86_64-darwin17
benchmark                         old ns/op     new ns/op     delta
BenchmarkBasicMath/add-4          7178          5299          -26.18%
BenchmarkBasicMath/subtract-4     7185          5336          -25.73%
BenchmarkBasicMath/multiply-4     7185          5298          -26.26%
BenchmarkBasicMath/divide-4       7158          5292          -26.07%

benchmark                         old allocs     new allocs     delta
BenchmarkBasicMath/add-4          78             75             -3.85%
BenchmarkBasicMath/subtract-4     78             75             -3.85%
BenchmarkBasicMath/multiply-4     78             75             -3.85%
BenchmarkBasicMath/divide-4       78             75             -3.85%

benchmark                         old bytes     new bytes     delta
BenchmarkBasicMath/add-4          3792          3152          -16.88%
BenchmarkBasicMath/subtract-4     3792          3152          -16.88%
BenchmarkBasicMath/multiply-4     3792          3152          -16.88%
BenchmarkBasicMath/divide-4       3792          3152          -16.88%

Features

Classes

  • Module - #681
  • Result - #675

APIs

  • Object#respond_to? - #651
  • Integer#to_d - #649
  • Class#method_missing - #672
  • Class#inherits_method_missing - #676
  • Class#Constants - #686
  • Object#print - #694

Fixes

  • Fixed some documentation mistakes
  • Fixed panic when a library file is not found on startup
  • Fixed #643
  • Fixed #679

Other changes

  • Moved db related code out of vm package

v0.1.9

6 years ago

Features

Builtin Test Framework

Now you can use built-in test framework: spec to write specs for Goby program! For example:

require "spec"

Spec.describe Spec do
  describe "comparison" do
    describe "#to eq" do
      it "compares if two values are equal" do
        expect(1).to eq(1)
      end
    end

    describe "#not_to eq" do
      it "compares if two values are not equal" do
        expect(1).not_to eq(2)
      end
    end
  end

  describe "indentation" do
    it "indents four spaces" do
    end
    describe "nest another level" do
      it "indents six spaces" do
      end
    end
  end
end

And to run the spec, use goby test FILE_OR_DIRECTORY_PATH. Then it will run the spec and print the output like:

Spec
  comparison
    #to eq
      it "compares if two values are equal"
    #not_to eq
      it "compares if two values are not equal"
  indentation
    it "indents four spaces"
    nest another level
      it "indents six spaces"

Support Descending Range

Thanks to @ear7h, this is a feature that does not exist in Ruby but now in Goby! Take the following code as an example:

sum = 0
(2..-9).step(3) do |i|
  sum = sum + i
end
puts(sum)

In Ruby it returns 0 cause it does not support descending range. But in Goby it will return -10 😁

New APIs

  • Object#exit (thanks to @saveriomiroddi)
  • Object#instance_eval
  • Module#>, #>=, #<, #<= (thanks to @kachick)

Fixes (thanks to @shes50103)

  • #574
  • #624
  • #524
  • #636

v0.1.8.1

6 years ago

The major fix is to make splat parameter returns an empty array instead of nil when no argument is passed.

def foo(*x)
  x
end

# before fix
foo #=> nil

# after fix
foo #=> []

v0.1.8

6 years ago

Upgrade Go's version to 1.10

Features

Support String's range indexing

s = "Hello!"
puts(s[1..3]) #=> ell

Fixes

  • #589
  • #540
  • #444

Testing

Add AST testing helpers

For example, to test

def add(x, y)
  x + y
end

We can now write it like:

firstStmt := program.FirstStmt().IsDefStmt(t)
firstStmt.ShouldHasName("add")
firstStmt.ShouldHasNormalParam("x")
firstStmt.ShouldHasNormalParam("y")

firstExpression := firstStmt.MethodBody().NthStmt(1).IsExpression(t)
infixExp := firstExpression.IsInfixExpression(t)
infixExp.ShouldHasOperator("+")
infixExp.TestableLeftExpression().IsIdentifier(t).ShouldHasName("x")
infixExp.TestableRightExpression().IsIdentifier(t).ShouldHasName("y")

Add Integration tests for simple server

See #604

Add t.Helper() to test helper functions

v0.1.7

6 years ago

v0.1.7 release note

New Keywords

  • get_block: let you retrieve a block as an object
  • break: break current loop or block execution

New APIs

  • Array#lazy
  • Array#to_enum
  • Object#raise
  • Range#lazy
  • Range#map
  • Range#to_enum

New Classes

  • LazyEnumerator
  • ArrayEnumerator
  • RangeEnumerator

Fixes

  • #327
  • #470
  • #472
  • #526
  • #541
  • #545
  • #547
  • #560
  • #561

Deprecations

  • then keyword

v0.1.6

6 years ago

New BuiltIn Types

  • Float
  • GoMap
  • Decimal
  • MatchData
  • Regex

New Libraries

  • Concurrent::Array
  • Concurrent::Hash
  • Concurrent::RWLock

Syntax Change

  • Add _ for unused variable
  • Support float literal like 1.0
  • Support Keyword Argument (unstable)
  • Support Case expression
  • Prohibit capitalized method call like Foo()
  • Drop support of ++
  • Support += or -= syntactic sugars
  • Support ~= operator

Others

  • Stack Traces support (unstable)
  • A lot bug fixes (too many to list)

v0.1.3

6 years ago
  • File is now builtin class instead of standard library now
  • Added some new APIs to Array class
  • Added Object#send
  • Channel's performance should be improved due to upgrading Go to version 1.9
  • Fixed some edge case issues
  • Largely improve http library