Coder Social home page Coder Social logo

dubious's Introduction

Mirah

Build Status

DESCRIPTION

Mirah is a customizable programming language featuring static types, local type inference and a heavily Ruby-inspired syntax. Mirah currently includes a typer/compiler backend for the JVM which can output JVM bytecode.

FEATURES

  • Ruby-like syntax
  • Compiles to .class
  • Fast as Java
  • No runtime library

SYNOPSIS

mirah <script.mirah>
mirah -e "inline script"
mirahc <script.mirah>
mirahc -e "inline script" # produces DashE.class

REQUIREMENTS

  • Java 1.7 or higher.

INSTALL

RUBY

If your gem and rake are not from JRuby, prefix the commands with jruby -S

$ gem install mirah

JAR

Mirah is distributed as a jar through maven central. You can download the latest jar from maven.org.

ZIP

You can also install Mirah from a zip file. Download the latest stable release from https://github.com/mirah/mirah/releases. Extract it, and add bin to your $PATH to be able to use mirah, mirahc, etc.

SOURCE

Setup building locally and installing from source, you'll need jruby 1.7.12 or higher. Then just follow these commands.

To get the repository setup locally run the following:

$ git clone http://github.com/mirah/mirah.git
$ cd mirah
$ bundle install

To install mirah as a gem from source:

$ rake gem
$ gem install pkg/mirah-*.gem

To create the mirahc jar:

$ rake dist/mirahc.jar

This will create a mirahc.jar file in dist that you can run to compile mirah source files.

dubious's People

Contributors

arunk avatar ashee avatar baroquebobcat avatar hakunin avatar igrigorik avatar jacortinas avatar takeru avatar technomancy 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

dubious's Issues

rake publish task fails

Worked through the README to get started and was able to run the app locally using 'rake server'

However, tried to run the publish task and received this:

csamuel@envigo:~/projects/dubious[master✗]
→ jrake publish
(in /Users/csamuel/projects/dubious)
rake aborted!
Don't know how to build task 'publish'
(See full trace by running task with --trace)

I'm assuming because some appengine rake tasks are not being loaded at runtime?

rake server exits immediately without any errors reported

I installed jruby via rvm, then did gem install dubious, which went as planned. I created a new project and copied the InfoProperties controller from the examples and added a route for it. Running rake server (without an Internet connection,
hence the update failure) outputs the following:

% rake 'server[127.0.0.1,8008]'
(in /Users/wmoore/Projects/my-app)
2011-04-20 07:41:36.231 java[12054:903] [Java CocoaComponent compatibility mode]: Enabled
2011-04-20 07:41:36.232 java[12054:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Apr 20, 2011 7:41:36 AM com.google.appengine.tools.info.RemoteVersionFactory getVersion
INFO: Unable to access https://appengine.google.com/api/updatecheck?runtime=java&release=1.4.2&timestamp=1297450955&api_versions=['1.0']
java.net.UnknownHostException: appengine.google.com
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
  at java.net.Socket.connect(Socket.java:529)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
  at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
  at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
  at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
  at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
  at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
  at java.net.URL.openStream(URL.java:1010)
  at com.google.appengine.tools.info.RemoteVersionFactory.getVersion(RemoteVersionFactory.java:76)
  at com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.java:99)
  at com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java:174)
  at com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck.java:142)
  at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:150)
  at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
  at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
  at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Apr 20, 2011 7:41:36 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Apr 20, 2011 7:41:36 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Users/wmoore/Projects/my-app/WEB-INF/appengine-web.xml
Apr 20, 2011 7:41:36 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Users/wmoore/Projects/my-app/WEB-INF/web.xml
Apr 19, 2011 9:41:36 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Apr 19, 2011 9:41:37 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started [email protected]:8008
Apr 19, 2011 9:41:37 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8008/

A few seconds after that last line rake exists and I'm returned to my shell (zsh).
I'm running Mac OS X 10.6.7, Java from Apple (Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)), rvm info:

% rvm info

jruby-1.6.0:

  system:
    uname:       "Darwin Wes-MacBook-Pro.local 10.7.3 Darwin Kernel Version 10.7.3: Sun Mar  6 13:37:56 PST 2011; root:xnu-1504.14.2~1/RELEASE_X86_64 x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
    zsh:         "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"

  rvm:
    version:      "rvm 1.2.9 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]"

  ruby:
    interpreter:  "jruby"
    version:      "1.6.0"
    date:         "2011-03-15"
    platform:     "darwin-x86_64-java"
    patchlevel:   "TM"
    full_version: "jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java]"

  homes:
    gem:          "/Users/wmoore/.rvm/gems/jruby-1.6.0"
    ruby:         "/Users/wmoore/.rvm/rubies/jruby-1.6.0"

  binaries:
    ruby:         "/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin/ruby"
    irb:          "/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin/irb"
    gem:          "/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin/gem"
    rake:         "/Users/wmoore/.rvm/gems/jruby-1.6.0/bin/rake"

  environment:
    PATH:         "/Users/wmoore/.rvm/gems/jruby-1.6.0/bin:/Users/wmoore/.rvm/gems/jruby-1.6.0@global/bin:/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin:/Users/wmoore/.rvm/bin:/Users/wmoore/.nvm/v0.4.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin"
    GEM_HOME:     "/Users/wmoore/.rvm/gems/jruby-1.6.0"
    GEM_PATH:     "/Users/wmoore/.rvm/gems/jruby-1.6.0:/Users/wmoore/.rvm/gems/jruby-1.6.0@global"
    MY_RUBY_HOME: "/Users/wmoore/.rvm/rubies/jruby-1.6.0"
    IRBRC:        "/Users/wmoore/.rvm/rubies/jruby-1.6.0/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

circular dependencies not allowed

Dubious should support circular dependencies between files.

Example of circular dependency I'd like to have:

class MetricsSuite
  def app(app:Webapp)
    @app = app
    self
  end

  def self.for_app(app:Webapp)
    new.app(app)
  end
end

class Webapp < Model
  def self.register(title:String)
    app = new.title(title).on_register
    app.save
    app
  end

  def on_register
    MetricsSuite.for_app(self).install
    self
  end
end

Missing dependency in Rakefile

Rakefile is missing dependency

file "#{OUTDIR}/dubious/TextHelper.class" => [
        "#{OUTDIR}/dubious/Inflection.class",
  ]

(It would not compile without it)

uninitialized constant ActiveSupport::SecureRandom

System:

  • mac ox x
  • jruby-1.7.11 [ x86_64 ]
  • dubious (0.0.3 java)

Running:
dubious new new-project

raised an exception: NameError: uninitialized constant ActiveSupport::SecureRandom
const_missing at org/jruby/RubyModule.java:2690
result at (erb):6
eval at org/jruby/RubyKernel.java:1121
result at /Users/vasco/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/erb.rb:838
template at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/file_manipulation.rb:89
call at org/jruby/RubyProc.java:271
render at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/create_file.rb:54
invoke! at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/create_file.rb:63
open at org/jruby/RubyIO.java:1182
invoke! at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/create_file.rb:63
call at org/jruby/RubyProc.java:271
invoke_with_conflict_check at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/empty_directory.rb:114
invoke! at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/create_file.rb:61
action at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions.rb:93
create_file at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/create_file.rb:26
template at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/file_manipulation.rb:88
execute! at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/directory.rb:84
each at org/jruby/RubyArray.java:1613
execute! at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/directory.rb:73
invoke! at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/directory.rb:60
action at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions.rb:93
directory at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/actions/directory.rb:46
init at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/dubious-0.0.3-java/lib/dubious/cli/init.rb:22
run at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/task.rb:21
invoke at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/invocation.rb:109
each at org/jruby/RubyHash.java:1339
map at org/jruby/RubyEnumerable.java:763
invoke at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/invocation.rb:118
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/group.rb:36
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/base.rb:379
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/group.rb:29
new at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor.rb:225
run at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/task.rb:21
invoke at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/invocation.rb:109
call at org/jruby/RubyProc.java:271
invoke at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/invocation.rb:116
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor.rb:161
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor/base.rb:379
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/thor-0.13.8/lib/thor.rb:140
start at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/dubious-0.0.3-java/lib/dubious/cli.rb:22
(root) at /Users/vasco/.rvm/gems/jruby-1.7.11/gems/dubious-0.0.3-java/bin/dubious:4
load at org/jruby/RubyKernel.java:1101
(root) at /Users/vasco/.rvm/gems/jruby-1.7.11/bin/dubious:1
eval at org/jruby/RubyKernel.java:1121
(root) at /Users/vasco/.rvm/gems/jruby-1.7.11/bin/jruby_executable_hooks:15

Am I doing something wrong?

Tks.

Rakefile doesn't run server

running "rake" or "rake server" does nothing.

michal@domov:~/mystuff/doluj_cz$ rake
(in /home/michal/mystuff/doluj_cz)
rake aborted!
Don't know how to build task ''

Nowhere to put non MVC classes

AFAIK there is no place to put non MVC classes (so that they get compiled into application).

I would imagine I could create some directories under the "app" folder and files would be included in my application.

{routes,asset,application}.properties - unused?

New apps place these files under config/ but there is no documentation for what is supposed to live in this files, or in what form.

Looking at the source, I also don't see where they get picked up (if at all)? Am I missing something?

Looking at the checked in examples, the routes are set directly in app.yaml, instead of routes.properties file.

Cannot build dubious - class ScopedParameterMap not found

Dubious fails to build with the error shown below:

[andrew@mitford dubious]$ rake gem
(in /home/andrew/projects/dubious)
cd /home/andrew/projects/dubious/src
mirahc -d /home/andrew/projects/dubious/build --classpath /home/andrew/
projects/dubious/build:/home/andrew/projects/dubious/javalib/
dubydatastore.jar dubious/params.mirah
Inference Error:
dubious/params.mirah:59: Cannot find class ScopedParameterMap
ScopedParameterMap.params(request, model)
^^^^^^^^^^^^^^^^^^^^^^
[andrew@mitford dubious]$

FormHelper does not import Params

FormHelper does not import params

And the dependency is not marked in Rakefile

file "#{OUTDIR}/dubious/FormHelper.class" => [
                          "#{OUTDIR}/dubious/Inflections.class",
                          "#{OUTDIR}/dubious/InstanceTag.class",
                          "#{OUTDIR}/dubious/Params.class",
                      "#{OUTDIR}/dubious/TimeConversion.class",
                      *STDLIB_CLASSES]

appcfg.sh must be on the path

The dubious gem depends on the appengine-sdk gem, which pulls in most of the Java App Engine SDK. However, the publish task depends on appcfg.sh being on the path, so you must manually download another copy of the Java App Engine SDK to make it work. One good solution would be for the appengine-sdk gem to place appcfg.sh on the path.

File upload support

I had the need for file uploads support.

My solution uses appache commons jar (that is not included in Dubious) and it seesms Dubious itself doesn't have support for file uploads (other than blobstore which is a paid feature of appengine if I'm correct)

I would like my solution to be included in dubious or other solution for file uploads.

.mirah files are not compiled

When I tried latest repository to build, I found src/*/.mirah files could not be compiled.
This is because LIB_MIRAH_SRC looks *.duby files. Perhaps forgot to push Rakefile?

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.