more transition

This commit is contained in:
Torsten Ruger 2015-07-14 14:21:33 +03:00
parent 7d2120fdd5
commit 71ed4f60d7
7 changed files with 20 additions and 156 deletions

View File

@ -1,132 +0,0 @@
# app.rb is used to configure your app. This code is only run on the server,
# then any config options in config.public are passed to the client as well.
Volt.configure do |config|
# Setup your global app config here.
#######################################
# Basic App Info (stuff you should set)
#######################################
config.domain = 'salama-vm.org'
config.app_name = 'Salama-debugger'
config.mailer.from = 'Salama-debugger <no-reply@salama-debugger.com>'
############
# App Secret
############
# Your app secret is used for signing things like the user cookie so it can't
# be tampered with. A random value is generated on new projects that will work
# without the need to customize. Make sure this value doesn't leave your server.
#
# For added security we recommend moving the app secret into an environment. You can
# setup that like so:
#
# config.app_secret = ENV['APP_SECRET']
#
config.app_secret = 'pKDKhKInTaI5EVH9WmyN-cJSYnJt8PmDogwW63Zqr_ieUNqYvh1KybeWJoslylzFgsU'
###############
# Log Filtering
###############
# Data updates from the client come in via Tasks. The task dispatcher logs all calls to tasks.
# By default hashes in the arguments can be filtered based on keys. So any hash with a key of
# password will be filtered. You can add more fields to filter below:
config.filter_keys = [:password]
##########
# Database
##########
# Database config all start with db_ and can be set either in the config
# file or with an environment variable (DB_NAME for example).
# config.db_driver = 'mongo'
# config.db_name = (config.app_name + '_' + Volt.env.to_s)
# config.db_host = 'localhost'
# config.db_port = 27017
#####################
# Compression options
#####################
# If you are not running behind something like nginx in production, you can
# have rack deflate all files.
# config.deflate = true
#######################
# Public configurations
#######################
# Anything under config.public will be sent to the client as well as the server,
# so be sure no private data ends up under public
# Use username instead of email as the login
# config.public.auth.use_username = true
#####################
# Compression Options
#####################
# Disable or enable css/js compression. Default is to only run in production.
# if Volt.env.production?
# config.compress_javascript = true
# config.compress_css = true
# end
################
# Mailer options
################
# The volt-mailer gem uses pony (https://github.com/benprew/pony) to deliver e-mail. Any
# options you would pass to pony can be setup below.
# NOTE: The from address is setup at the top
# Normally pony uses /usr/sbin/sendmail if one is installed. You can specify smtp below:
# config.mailer.via = :smtp
# config.mailer.via_options = {
# :address => 'smtp.yourserver.com',
# :port => '25',
# :user_name => 'user',
# :password => 'password',
# :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
# :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
# }
#############
# Message Bus
#############
# Volt provides a "Message Bus" out of the box. The message bus provides
# a pub/sub service between any volt instance (server, client, runner, etc..)
# that share the same database. The message bus can be used by app code. It
# is also used internally to push data to any listening clients.
#
# The default message bus (called "peer_to_peer") uses the database to sync
# socket ip's/ports.
# config.message_bus.bus_name = 'peer_to_peer'
#
# Encrypt message bus - messages on the message bus are encrypted by default
# but this is meant to be used locally by a developer
config.message_bus.disable_encryption = true
#
# ## MessageBus Server -- the message bus binds to a port and ip which the
# other volt instances need to be able to connect to. You can customize
# the server below:
#
# Port range - you can specify a range of ports that an instance can bind the
# message bus on. You can specify a range, an array of Integers, or an array
# of ranges.
# config.message_bus.bind_port_ranges = (58000..61000)
#
# Bind Ip - specifies the ip address the message bus server should bind on.
# config.message_bus.bind_ip = '127.0.0.1'
#############
# Concurrency
#############
# Volt provides a thread worker pool for incoming task requests (and all
# database requests, since those use tasks to do their work.) The following
# lets you control the size of the worker pool. Threads are only created as
# needed, and are removed after a certain amount of inactivity.
# config.min_worker_threads = 1
# config.max_worker_threads = 10
#
# You can also specify the amount of time a Task should run for before it
# timeout's. Setting this to short can cause unexpected results, currently
# we recomend it be at least 10 seconds.
# config.worker_timeout = 60
end

View File

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html>
<%# IMPORTANT: Please read before changing! %>
<%# This file is rendered on the server using ERB, so it does NOT use Volt's %>
<%# normal template system. You can add to it, but keep in mind the template %>
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %>
<head>
<meta charset="UTF-8" />
<% javascript_files.each do |javascript_file| %>
<script src="<%= javascript_file %>"></script>
<% end %>
<% css_files.each do |css_file| %>
<link href="<%= css_file %>" media="all" rel="stylesheet" type="text/css" />
<% end %>
</head>
<body>
</body>
</html>

View File

@ -1,3 +0,0 @@
#require "salama"
Virtual::Machine.boot

View File

@ -1,6 +1,7 @@
require 'browser'
require 'native'
require "salama"
require "point"
require_relative "registers_view"
require_relative "object_view"

11
lib/parse_task.rb Normal file
View File

@ -0,0 +1,11 @@
require "salama-reader"
class ParseTask
def parse(num)
string_input = '"Hello again".putstring()'
parser = Parser::Salama.new
out = parser.parse(string_input)
parts = Parser::Transform.new.apply(out)
parts.to_basic
end
end

7
lib/point.rb Normal file
View File

@ -0,0 +1,7 @@
class Point
def initialize x = 0 , y = 0
@x = x
@y = y
end
attr_accessor :x , :y
end

View File

@ -21,7 +21,7 @@ Point.class_eval do
end
end
class SpaceView < Graphics
class SpaceView
include Sof::Util
def initialize