From 337b1a8ee0f7f0d2b454f37a8d1ab23360904506 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 17 Jul 2014 02:26:13 +0300 Subject: [PATCH] renamed to kide(crystal) --- Gemfile | 2 +- Gemfile.lock | 6 +++--- README.md | 6 +++--- Rakefile | 6 +++--- crystal.gemspec => kide.gemspec | 6 +++--- lib/ast/module_expression.rb | 2 +- lib/boot/boot_space.rb | 2 +- lib/kernel/README.md | 2 +- lib/kernel/integer.rb | 2 +- lib/kernel/string.rb | 2 +- lib/kernel/system.rb | 2 +- lib/{sapphire.rb => kide.rb} | 2 +- lib/neumann/README.markdown | 2 +- lib/neumann/instruction.rb | 2 +- lib/old_ast/module_expression.rb | 2 +- lib/old_boot/boot_space.rb | 2 +- lib/parfait/README.md | 2 +- lib/parfait/array.rb | 4 ++-- test/fragments/helper.rb | 2 +- test/fragments/test_hello.rb | 4 ++-- test/fragments/test_string_class.rb | 2 +- test/helper.rb | 2 +- test/test_runner.rb | 2 +- test/virtual/virtual_helper.rb | 2 +- 24 files changed, 34 insertions(+), 34 deletions(-) rename crystal.gemspec => kide.gemspec (65%) rename lib/{sapphire.rb => kide.rb} (81%) diff --git a/Gemfile b/Gemfile index 29d03fee..ecf63e19 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "http://rubygems.org" gem "parslet" , :git => 'https://github.com/NigelThorne/parslet.git' -gem "sapphire-reader" , "0.1.0" , :require => "parser" , :git => "https://github.com/sapphire-vm/sapphire-reader.git" +gem "kide-reader" , "0.1.0" , :require => "parser" , :git => "https://github.com/kide-vm/kide-reader.git" group :development do gem "minitest" diff --git a/Gemfile.lock b/Gemfile.lock index 5caa50d2..d1cabf2e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,10 +6,10 @@ GIT blankslate (~> 2.0) GIT - remote: https://github.com/sapphire-vm/sapphire-reader.git + remote: https://github.com/kide-vm/kide-reader.git revision: 0c88e7eff569a6c1b0f354418daacb9ad2ac621a specs: - sapphire-reader (0.1.0) + kide-reader (0.1.0) GEM remote: http://rubygems.org/ @@ -87,7 +87,7 @@ PLATFORMS x64-mingw32 DEPENDENCIES - sapphire-reader (= 0.1.0)! + kide-reader (= 0.1.0)! jeweler minitest parslet! diff --git a/README.md b/README.md index 501eb26c..2a4caeb4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -#Sapphire +#Kide -Sapphire is about native code generation in and of ruby. In is done. +Kide is about native code generation in and of ruby. In is done. ### Step 1 - Assembly @@ -125,7 +125,7 @@ Celebrate New year 2030 -Contributing to sapphire +Contributing to kide ----------------------- Probably best to talk to me, if it's not a typo or so. diff --git a/Rakefile b/Rakefile index 186a1f98..aeec4780 100644 --- a/Rakefile +++ b/Rakefile @@ -14,8 +14,8 @@ require 'rake' require 'jeweler' Jeweler::Tasks.new do |gem| # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options - gem.name = "sapphire" - gem.homepage = "http://github.com/sapphire-ruby/sapphire" + gem.name = "kide" + gem.homepage = "http://github.com/kide-ruby/kide" gem.license = "MIT" gem.summary = %Q{Create fast code} gem.description = %Q{A long way to china and back} @@ -51,7 +51,7 @@ Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' - rdoc.title = "sapphire #{version}" + rdoc.title = "kide #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end diff --git a/crystal.gemspec b/kide.gemspec similarity index 65% rename from crystal.gemspec rename to kide.gemspec index f7309fab..da16073d 100644 --- a/crystal.gemspec +++ b/kide.gemspec @@ -1,17 +1,17 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = 'sapphire' + s.name = 'kide' s.version = '0.0.1' s.authors = ['Torsten Ruger'] s.email = 'torsten@villataika.fi' s.extra_rdoc_files = ['README.markdown'] s.files = %w(README.markdown LICENSE.txt Rakefile) + Dir.glob("lib/**/*") - s.homepage = 'https://github.com/sapphire-vm/sapphire' + s.homepage = 'https://github.com/kide-vm/kide' s.license = 'MIT' s.require_paths = ['lib'] - s.summary = 'Hey sapphire, what do you want to be when you grow up: I like pink and red, i wanna be a ruby' + s.summary = 'Hey kide, what do you want to be when you grow up: I like pink and red, i wanna be a ruby' s.add_dependency 'parslet', '~> 1.6.1' end diff --git a/lib/ast/module_expression.rb b/lib/ast/module_expression.rb index 8a0ec8d3..3cc8e149 100644 --- a/lib/ast/module_expression.rb +++ b/lib/ast/module_expression.rb @@ -7,7 +7,7 @@ module Ast context.current_class = clazz expressions.each do |expression| # check if it's a function definition and add - # if not, execute it, but that does means we should be in sapphire (executable), not ruby. ie throw an error for now + # if not, execute it, but that does means we should be in kide (executable), not ruby. ie throw an error for now raise "only functions for now #{expression.inspect}" unless expression.is_a? Ast::FunctionExpression puts "compiling expression #{expression}" expression_value = expression.compile(context ) diff --git a/lib/boot/boot_space.rb b/lib/boot/boot_space.rb index 042984f1..cff3a140 100644 --- a/lib/boot/boot_space.rb +++ b/lib/boot/boot_space.rb @@ -55,7 +55,7 @@ module Boot end [:putstring,:putint,:fibo,:exit].each do |f| #puts "Boot Kernel::#{f}" - obj.add_method_definition Sapphire::Kernel.send(f , @context) + obj.add_method_definition Kide::Kernel.send(f , @context) end obj = get_or_create_class :String [:get , :set].each do |f| diff --git a/lib/kernel/README.md b/lib/kernel/README.md index 4da8ab4c..e9283946 100644 --- a/lib/kernel/README.md +++ b/lib/kernel/README.md @@ -8,7 +8,7 @@ function. A normal ruby function is one that is parsed and transformed to code. But not all functionality can be written in ruby, one of those chicken and egg things. C uses Assembler in this situation, we use Kernel function. -Slightly more here : http://sapphire-vm.github.io/2014/06/10/more-clarity.html +Slightly more here : http://kide-vm.github.io/2014/06/10/more-clarity.html The Kernal module is scattered into several files, but that is just so the file doesn't get too long. diff --git a/lib/kernel/integer.rb b/lib/kernel/integer.rb index cb81dedc..4102b71a 100644 --- a/lib/kernel/integer.rb +++ b/lib/kernel/integer.rb @@ -1,5 +1,5 @@ #integer related kernel functions -module Sapphire +module Kide module Kernel # The conversion to base10 is quite a bit more complicated than i thought. The bulk of it is in div10 # We set up variables, do the devision and write the result to the string diff --git a/lib/kernel/string.rb b/lib/kernel/string.rb index b7984edc..f0135e0d 100644 --- a/lib/kernel/string.rb +++ b/lib/kernel/string.rb @@ -1,4 +1,4 @@ -module Sapphire +module Kide module Kernel def self.putstring context function = Virtual::MethodDefinition.new(:putstring , [] ) diff --git a/lib/kernel/system.rb b/lib/kernel/system.rb index 7ec92a99..56ab460a 100644 --- a/lib/kernel/system.rb +++ b/lib/kernel/system.rb @@ -1,4 +1,4 @@ -module Sapphire +module Kide module Kernel def self.exit context function = Virtual::MethodDefinition.new(:exit , [] , Virtual::Integer) diff --git a/lib/sapphire.rb b/lib/kide.rb similarity index 81% rename from lib/sapphire.rb rename to lib/kide.rb index 68a3d863..faf30b0a 100644 --- a/lib/sapphire.rb +++ b/lib/kide.rb @@ -1,7 +1,7 @@ require 'parslet' require "elf/object_writer" -require 'parser/sapphire' +require 'parser/kide' require 'parser/transform' require "virtual/machine" require "ast/all" diff --git a/lib/neumann/README.markdown b/lib/neumann/README.markdown index 46bed28d..a3b388f0 100644 --- a/lib/neumann/README.markdown +++ b/lib/neumann/README.markdown @@ -8,7 +8,7 @@ provides the stack glue. All the stuff a compiler would usually do. Also all syscalls are abstracted as functions. -The Sapphire Convention +The Kide Convention ---------------------- Since we're not in c, we use the regsters more suitably for our job: diff --git a/lib/neumann/instruction.rb b/lib/neumann/instruction.rb index 411c4755..7f639589 100644 --- a/lib/neumann/instruction.rb +++ b/lib/neumann/instruction.rb @@ -7,7 +7,7 @@ module Vm # Admittately it would be simpler just to create the (abstract) instructions and let the machine # encode them into what-ever is neccessary, but this approach leaves more possibility to - # optimize the actual instruction stream (not just the sapphire instruction stream). Makes sense? + # optimize the actual instruction stream (not just the kide instruction stream). Makes sense? # We have basic classes (literally) of instructions # - Memory diff --git a/lib/old_ast/module_expression.rb b/lib/old_ast/module_expression.rb index 8a0ec8d3..3cc8e149 100644 --- a/lib/old_ast/module_expression.rb +++ b/lib/old_ast/module_expression.rb @@ -7,7 +7,7 @@ module Ast context.current_class = clazz expressions.each do |expression| # check if it's a function definition and add - # if not, execute it, but that does means we should be in sapphire (executable), not ruby. ie throw an error for now + # if not, execute it, but that does means we should be in kide (executable), not ruby. ie throw an error for now raise "only functions for now #{expression.inspect}" unless expression.is_a? Ast::FunctionExpression puts "compiling expression #{expression}" expression_value = expression.compile(context ) diff --git a/lib/old_boot/boot_space.rb b/lib/old_boot/boot_space.rb index af696342..f68ee24e 100644 --- a/lib/old_boot/boot_space.rb +++ b/lib/old_boot/boot_space.rb @@ -69,7 +69,7 @@ module Boot end [:utoa, :putstring,:putint,:fibo,:exit].each do |f| #puts "Boot Kernel::#{f}" - obj.add_function Sapphire::Kernel.send(f , @context) + obj.add_function Kide::Kernel.send(f , @context) end obj = get_or_create_class :String [:get , :set].each do |f| diff --git a/lib/parfait/README.md b/lib/parfait/README.md index 29739335..63fe7a61 100644 --- a/lib/parfait/README.md +++ b/lib/parfait/README.md @@ -4,4 +4,4 @@ Here we have a placeholder for things i am currently developing. Basically Parfait is the smallest amount of code needed to make a ruby-like OO system work. -A work in progress that started from here : http://sapphire-vm.github.io/2014/06/10/more-clarity.html +A work in progress that started from here : http://kide-vm.github.io/2014/06/10/more-clarity.html diff --git a/lib/parfait/array.rb b/lib/parfait/array.rb index 9cdb96a8..70e3f91e 100644 --- a/lib/parfait/array.rb +++ b/lib/parfait/array.rb @@ -1,5 +1,5 @@ -# this is not a "normal" ruby file, ie it is not required by sapphire -# instead it is parsed by sapphire to define part of the sapphire that runs +# this is not a "normal" ruby file, ie it is not required by kide +# instead it is parsed by kide to define part of the kide that runs class Array < BaseObject def initialize size diff --git a/test/fragments/helper.rb b/test/fragments/helper.rb index e07a8863..eee71f2f 100644 --- a/test/fragments/helper.rb +++ b/test/fragments/helper.rb @@ -17,7 +17,7 @@ module Fragments end def parse - parser = Parser::Sapphire.new + parser = Parser::Kide.new syntax = parser.parse_with_debug(@string_input) parts = Parser::Transform.new.apply(syntax) # file is a list of expressions, all but the last must be a function diff --git a/test/fragments/test_hello.rb b/test/fragments/test_hello.rb index 69e8819f..d73db64f 100644 --- a/test/fragments/test_hello.rb +++ b/test/fragments/test_hello.rb @@ -5,10 +5,10 @@ class TestHello < MiniTest::Test def test_hello @string_input = <