Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wipe out source and replace with a README pointing people at Mirah.

  • Loading branch information...
commit 7081c941279b1907d1516ac43673638496b522e7 1 parent 8be7172
@headius authored
Showing with 3 additions and 16,148 deletions.
  1. +0 −8 Duby Plugin/Duby Editor/build.xml
  2. +0 −6 Duby Plugin/Duby Editor/manifest.mf
  3. +0 −45 Duby Plugin/Duby Editor/nbproject/build-impl.xml
  4. +0 −8 Duby Plugin/Duby Editor/nbproject/genfiles.properties
  5. 0  Duby Plugin/Duby Editor/nbproject/private/private.properties
  6. +0 −4 Duby Plugin/Duby Editor/nbproject/private/private.xml
  7. +0 −2  Duby Plugin/Duby Editor/nbproject/project.properties
  8. +0 −131 Duby Plugin/Duby Editor/nbproject/project.xml
  9. +0 −1  Duby Plugin/Duby Editor/nbproject/suite.properties
  10. +0 −4 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/Bundle.properties
  11. +0 −36 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyDataObject.java
  12. +0 −14 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyElement.java
  13. +0 −43 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyLanguage.java
  14. +0 −100 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyParseResult.java
  15. +0 −98 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyParser.java
  16. +0 −12 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyResolver.xml
  17. +0 −4 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyTemplate.duby
  18. BIN  Duby Plugin/Duby Editor/src/org/jruby/duby/editor/duby-icon.png
  19. +0 −84 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/fontsColors.xml
  20. +0 −130 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/layer.xml
  21. +0 −7 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/preferences.xml
  22. +0 −26 Duby Plugin/Duby Editor/test/unit/src/org/jruby/duby/editor/DubyDataObjectTest.java
  23. +0 −8 Duby Plugin/DubyCompiler/build.xml
  24. +0 −5 Duby Plugin/DubyCompiler/manifest.mf
  25. +0 −45 Duby Plugin/DubyCompiler/nbproject/build-impl.xml
  26. +0 −8 Duby Plugin/DubyCompiler/nbproject/genfiles.properties
  27. 0  Duby Plugin/DubyCompiler/nbproject/private/private.properties
  28. +0 −4 Duby Plugin/DubyCompiler/nbproject/private/private.xml
  29. +0 −1  Duby Plugin/DubyCompiler/nbproject/project.properties
  30. +0 −51 Duby Plugin/DubyCompiler/nbproject/project.xml
  31. +0 −1  Duby Plugin/DubyCompiler/nbproject/suite.properties
  32. BIN  Duby Plugin/DubyCompiler/release/modules/ext/JRubyParser.jar
  33. BIN  Duby Plugin/DubyCompiler/release/modules/ext/duby.jar
  34. BIN  Duby Plugin/DubyCompiler/release/modules/ext/jruby-complete.jar
  35. +0 −1  Duby Plugin/DubyCompiler/src/org/jruby/duby/compiler/Bundle.properties
  36. +0 −3  Duby Plugin/README
  37. +0 −8 Duby Plugin/build.xml
  38. +0 −42 Duby Plugin/nbproject/build-impl.xml
  39. +0 −8 Duby Plugin/nbproject/genfiles.properties
  40. +0 −14 Duby Plugin/nbproject/platform.properties
  41. +0 −5 Duby Plugin/nbproject/project.properties
  42. +0 −9 Duby Plugin/nbproject/project.xml
  43. +0 −15 History.txt
  44. +3 −48 README.txt
  45. +0 −85 Rakefile
  46. +0 −9 bin/duby
  47. +0 −9 bin/dubyc
  48. +0 −9 bin/dubyp
  49. +0 −34 bin/jrubyp
  50. +0 −40 build.xml
  51. +0 −26 duby.gemspec
  52. +0 −7 examples/ant/example-build.xml
  53. +0 −12 examples/appengine/Rakefile
  54. +0 −29 examples/appengine/Readme
  55. +0 −143 examples/appengine/lib/duby/appengine_tasks.rb
  56. +0 −60 examples/appengine/lib/duby_task.rb
  57. +0 −57 examples/appengine/src/com/ribrdb/DubyApp.duby
  58. +0 −15 examples/appengine/src/com/ribrdb/list.dhtml
  59. BIN  examples/appengine/war/WEB-INF/lib/dubydatastore.jar
  60. +0 −66 examples/bintrees.duby
  61. +0 −8 examples/construction.duby
  62. +0 −17 examples/dynamic.duby
  63. +0 −3  examples/edb.duby
  64. +0 −16 examples/fib.duby
  65. +0 −22 examples/fields.duby
  66. +0 −55 examples/fractal.duby
  67. +0 −13 examples/java_thing.duby
  68. +0 −34 examples/plugins/appengine/Rakefile
  69. +0 −287 examples/plugins/appengine/lib/com/google/appengine/ext/duby/db/datastore.rb
  70. +0 −209 examples/plugins/appengine/src/com/google/appengine/ext/duby/db/Model.duby
  71. +0 −12 examples/simple_class.duby
  72. +0 −7 examples/sort_closure.duby
  73. +0 −20 examples/swing.duby
  74. +0 −15 examples/tak.duby
  75. +0 −9 examples/test.edb
  76. BIN  javalib/JRubyParser.jar
  77. BIN  javalib/duby-bootstrap.jar
  78. BIN  javalib/dynalang-invoke-0.1.jar
  79. BIN  javalib/jruby-complete.jar
  80. +0 −316 lib/duby.rb
  81. +0 −636 lib/duby/ast.rb
  82. +0 −215 lib/duby/ast/call.rb
  83. +0 −265 lib/duby/ast/class.rb
  84. +0 −353 lib/duby/ast/flow.rb
  85. +0 −345 lib/duby/ast/intrinsics.rb
  86. +0 −144 lib/duby/ast/literal.rb
  87. +0 −88 lib/duby/ast/local.rb
  88. +0 −268 lib/duby/ast/method.rb
  89. +0 −183 lib/duby/ast/structure.rb
  90. +0 −93 lib/duby/ast/type.rb
  91. +0 −341 lib/duby/compiler.rb
  92. +0 −33 lib/duby/env.rb
  93. +0 −239 lib/duby/jvm/base.rb
  94. +0 −850 lib/duby/jvm/compiler.rb
  95. +0 −203 lib/duby/jvm/method_lookup.rb
  96. +0 −718 lib/duby/jvm/source_compiler.rb
  97. +0 −416 lib/duby/jvm/source_generator/builder.rb
  98. +0 −110 lib/duby/jvm/source_generator/loops.rb
  99. +0 −188 lib/duby/jvm/source_generator/precompile.rb
  100. +0 −11 lib/duby/jvm/source_generator/typer.rb
  101. +0 −148 lib/duby/jvm/typer.rb
  102. +0 −398 lib/duby/jvm/types.rb
  103. +0 −33 lib/duby/jvm/types/basic_types.rb
  104. +0 −11 lib/duby/jvm/types/boolean.rb
  105. +0 −65 lib/duby/jvm/types/enumerable.rb
  106. +0 −70 lib/duby/jvm/types/extensions.rb
  107. +0 −167 lib/duby/jvm/types/factory.rb
  108. +0 −86 lib/duby/jvm/types/floats.rb
  109. +0 −171 lib/duby/jvm/types/integers.rb
  110. +0 −336 lib/duby/jvm/types/intrinsics.rb
  111. +0 −82 lib/duby/jvm/types/literals.rb
  112. +0 −632 lib/duby/jvm/types/methods.rb
  113. +0 −95 lib/duby/jvm/types/number.rb
  114. +0 −29 lib/duby/nbcompiler.rb
  115. +0 −25 lib/duby/plugin/edb.rb
  116. +0 −173 lib/duby/plugin/gwt.rb
  117. +0 −51 lib/duby/plugin/java.rb
  118. +0 −1,164 lib/duby/transform.rb
  119. +0 −395 lib/duby/typer.rb
  120. +0 −16 nbproject/project.properties
  121. +0 −20 nbproject/project.xml
  122. +0 −62 src/duby/lang/compiler/interfaces.duby
  123. +0 −36 src/org/jruby/duby/Compiler.duby
  124. +0 −20 src/org/jruby/duby/DynalangBootstrap.java
  125. +0 −44 src/org/jruby/duby/ant/compile.duby
  126. +0 −28 src/org/jruby/duby/duby_command.rb
  127. +0 −391 test/test_ast.rb
  128. +0 −112 test/test_compilation.rb
  129. +0 −42 test/test_env.rb
  130. +0 −58 test/test_gwt.rb
  131. +0 −183 test/test_java_typer.rb
  132. +0 −61 test/test_javac_compiler.rb
  133. +0 −2,337 test/test_jvm_compiler.rb
  134. +0 −225 test/test_typer.rb
View
8 Duby Plugin/Duby Editor/build.xml
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
-<!-- for some information on what you could do (e.g. targets to override). -->
-<!-- If you delete this file and reopen the project it will be recreated. -->
-<project name="org.jruby.duby.editor" default="netbeans" basedir=".">
- <description>Builds, tests, and runs the project org.jruby.duby.editor.</description>
- <import file="nbproject/build-impl.xml"/>
-</project>
View
6 Duby Plugin/Duby Editor/manifest.mf
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-OpenIDE-Module: org.jruby.duby.editor
-OpenIDE-Module-Layer: org/jruby/duby/editor/layer.xml
-OpenIDE-Module-Localizing-Bundle: org/jruby/duby/editor/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.0
-
View
45 Duby Plugin/Duby Editor/nbproject/build-impl.xml
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT ***
-*** EDIT ../build.xml INSTEAD ***
--->
-<project name="org.jruby.duby.editor-impl" basedir="..">
- <fail message="Please build using Ant 1.7.1 or higher.">
- <condition>
- <not>
- <antversion atleast="1.7.1"/>
- </not>
- </condition>
- </fail>
- <property file="nbproject/private/suite-private.properties"/>
- <property file="nbproject/suite.properties"/>
- <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
- <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
- <property file="${suite.dir}/nbproject/platform.properties"/>
- <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
- <attribute name="property"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{property}" value="@{value}"/>
- </sequential>
- </macrodef>
- <property file="${user.properties.file}"/>
- <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
- <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
- <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
- <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
- <condition>
- <not>
- <contains string="${cluster.path.evaluated}" substring="platform"/>
- </not>
- </condition>
- </fail>
- <import file="${harness.dir}/build.xml"/>
-</project>
View
8 Duby Plugin/Duby Editor/nbproject/genfiles.properties
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=b32b0a6b
-build.xml.script.CRC32=c6ff82a7
-build.xml.stylesheet.CRC32=79c3b980@1.31.1.7
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=b32b0a6b
-nbproject/build-impl.xml.script.CRC32=2b293a18
-nbproject/build-impl.xml.stylesheet.CRC32=261c4bef@1.31.1.7
View
0  Duby Plugin/Duby Editor/nbproject/private/private.properties
No changes.
View
4 Duby Plugin/Duby Editor/nbproject/private/private.xml
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
- <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
-</project-private>
View
2  Duby Plugin/Duby Editor/nbproject/project.properties
@@ -1,2 +0,0 @@
-javac.source=1.5
-javac.compilerargs=-Xlint -Xlint:-serial
View
131 Duby Plugin/Duby Editor/nbproject/project.xml
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.apisupport.project</type>
- <configuration>
- <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
- <code-name-base>org.jruby.duby.editor</code-name-base>
- <suite-component/>
- <module-dependencies>
- <dependency>
- <code-name-base>org.jruby.duby.compiler</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>1.0</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.libs.jrubyparser</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>1</release-version>
- <implementation-version/>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.libs.junit4</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>1.7.1</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.modules.csl.api</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>1</release-version>
- <specification-version>1.14.1.1.1.1.2</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.modules.lexer</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>2</release-version>
- <specification-version>1.33.1.1</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>1</release-version>
- <specification-version>1.26.1.2</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.modules.projectapi</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>1</release-version>
- <specification-version>1.24.2</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.netbeans.modules.ruby</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>1</release-version>
- <implementation-version/>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.openide.filesystems</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>7.21.1.1.1</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.openide.loaders</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>7.5.2</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.openide.nodes</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>7.9.2.1</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.openide.text</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>6.22.1</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.openide.util</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>7.22.1.1</specification-version>
- </run-dependency>
- </dependency>
- <dependency>
- <code-name-base>org.openide.windows</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <specification-version>6.26.1</specification-version>
- </run-dependency>
- </dependency>
- </module-dependencies>
- <public-packages/>
- </data>
- </configuration>
-</project>
View
1  Duby Plugin/Duby Editor/nbproject/suite.properties
@@ -1 +0,0 @@
-suite.dir=${basedir}/..
View
4 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/Bundle.properties
@@ -1,4 +0,0 @@
-LBL_Duby_loader_name=Duby Files
-OpenIDE-Module-Name=Duby Editor
-Services/MIMEResolver/DubyResolver.xml=Duby Files
-Templates/Other/DubyTemplate.duby=Duby file
View
36 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyDataObject.java
@@ -1,36 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.jruby.duby.editor;
-
-import java.io.IOException;
-import org.openide.filesystems.FileObject;
-import org.openide.loaders.DataNode;
-import org.openide.loaders.DataObjectExistsException;
-import org.openide.loaders.MultiDataObject;
-import org.openide.loaders.MultiFileLoader;
-import org.openide.nodes.CookieSet;
-import org.openide.nodes.Node;
-import org.openide.nodes.Children;
-import org.openide.util.Lookup;
-import org.openide.text.DataEditorSupport;
-
-public class DubyDataObject extends MultiDataObject {
-
- public DubyDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
- super(pf, loader);
- CookieSet cookies = getCookieSet();
- cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies));
- }
-
- @Override
- protected Node createNodeDelegate() {
- return new DataNode(this, Children.LEAF, getLookup());
- }
-
- @Override
- public Lookup getLookup() {
- return getCookieSet().getLookup();
- }
-}
View
14 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyElement.java
@@ -1,14 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package org.jruby.duby.editor;
-
-/**
- *
- * @author ribrdb
- */
-class DubyElement {
-
-}
View
43 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyLanguage.java
@@ -1,43 +0,0 @@
-package org.jruby.duby.editor;
-
-import org.netbeans.api.lexer.Language;
-import org.netbeans.modules.csl.api.Formatter;
-import org.netbeans.modules.csl.api.KeystrokeHandler;
-import org.netbeans.modules.csl.spi.DefaultLanguageConfig;
-import org.netbeans.modules.parsing.spi.Parser;
-import org.netbeans.modules.ruby.RubyFormatter;
-import org.netbeans.modules.ruby.RubyKeystrokeHandler;
-import org.netbeans.modules.ruby.RubyParser;
-import org.netbeans.modules.ruby.lexer.RubyTokenId;
-
-/**
- *
- * @author ribrdb
- */
-public class DubyLanguage extends DefaultLanguageConfig {
-
- @Override
- public Language getLexerLanguage() {
- return RubyTokenId.language();
- }
-
- @Override
- public String getDisplayName() {
- return "Duby";
- }
-
- @Override
- public Formatter getFormatter() {
- return new RubyFormatter();
- }
-
- @Override
- public KeystrokeHandler getKeystrokeHandler() {
- return new RubyKeystrokeHandler();
- }
-
- @Override
- public Parser getParser() {
- return new DubyParser();
- }
-}
View
100 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyParseResult.java
@@ -1,100 +0,0 @@
-package org.jruby.duby.editor;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jruby.duby.ParseError;
-import org.jruby.duby.ParseResult;
-import org.jruby.runtime.builtin.IRubyObject;
-import org.jrubyparser.SourcePosition;
-import org.jrubyparser.lexer.SyntaxException;
-import org.netbeans.modules.csl.api.Error;
-import org.netbeans.modules.csl.api.Severity;
-import org.netbeans.modules.csl.spi.ParserResult;
-import org.netbeans.modules.parsing.api.Snapshot;
-import org.openide.filesystems.FileObject;
-
-/**
- *
- * @author ribrdb
- */
-class DubyParseResult extends ParserResult {
- class DubyParseError implements Error {
- private FileObject file;
- private String message;
- private int start;
- private int end;
-
- public DubyParseError(FileObject file, String message, SourcePosition position) {
- this.file = file;
- this.message = message;
- this.start = position.getStartOffset();
- this.end = position.getEndOffset() + 1;
- }
-
- public String getDisplayName() {
- return message;
- }
-
- public String getDescription() {
- return message;
- }
-
- public String getKey() {
- return message;
- }
-
- public FileObject getFile() {
- return file;
- }
-
- public int getStartPosition() {
- return start;
- }
-
- public int getEndPosition() {
- return end;
- }
-
- public boolean isLineError() {
- return false;
- }
-
- public Severity getSeverity() {
- return Severity.ERROR;
- }
-
- public Object[] getParameters() {
- return null;
- }
-
- }
-
- IRubyObject ast;
- ArrayList<DubyParseError> errors = new ArrayList<DubyParseError>();
-
- DubyParseResult(Snapshot snapshot, SyntaxException ex) {
- super(snapshot);
- FileObject file = snapshot.getSource().getFileObject();
- errors.add(new DubyParseError(file, ex.getMessage(), ex.getPosition()));
- }
-
- DubyParseResult(Snapshot snapshot, ParseResult result) {
- super(snapshot);
- this.ast = (IRubyObject)result.ast();
- FileObject file = snapshot.getSource().getFileObject();
- for (ParseError error : result.errors()) {
- errors.add(new DubyParseError(file, error.message(), error.position()));
- }
- }
-
- @Override
- protected void invalidate() {
- ast = null;
- }
-
- @Override
- public List<? extends Error> getDiagnostics() {
- return errors;
- }
-
-}
View
98 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyParser.java
@@ -1,98 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package org.jruby.duby.editor;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.swing.event.ChangeListener;
-import org.jruby.Ruby;
-import org.jruby.RubyInstanceConfig;
-import org.jruby.duby.DubyCompiler;
-import org.jruby.duby.ParseResult;
-import org.jruby.exceptions.RaiseException;
-import org.jruby.javasupport.JavaEmbedUtils;
-import org.jrubyparser.CompatVersion;
-import org.jrubyparser.ast.Node;
-import org.jrubyparser.lexer.LexerSource;
-import org.jrubyparser.lexer.SyntaxException;
-import org.jrubyparser.parser.ParserConfiguration;
-import org.jrubyparser.parser.Ruby18Parser;
-import org.netbeans.modules.parsing.api.Snapshot;
-import org.netbeans.modules.parsing.api.Task;
-import org.netbeans.modules.parsing.spi.ParseException;
-import org.netbeans.modules.parsing.spi.Parser;
-import org.netbeans.modules.parsing.spi.SourceModificationEvent;
-import org.openide.filesystems.FileObject;
-
-/**
- *
- * @author ribrdb
- */
-class DubyParser extends Parser {
- private static final Logger logger = Logger.getLogger(DubyParser.class.getName());
- private static final Ruby runtime;
- private static final DubyCompiler parser;
-
- static {
- System.setProperty("jruby.duby.enabled", "true");
- RubyInstanceConfig config = new RubyInstanceConfig();
- config.processArguments(new String[]{"-d"});
- runtime = JavaEmbedUtils.initialize(new ArrayList());
- parser = (DubyCompiler) JavaEmbedUtils.newRuntimeAdapter().eval(
- runtime, "require 'duby/nbcompiler';Duby::NbCompiler.new").toJava(DubyCompiler.class);
- }
-
- Result result;
-
- public DubyParser() {
- }
-
- private ParseResult parse(String text) {
- synchronized (runtime) {
- return parser.parse(text);
- }
- }
-
- @Override
- public void parse(Snapshot snapshot, Task arg1, SourceModificationEvent arg2) throws ParseException {
- try {
- result = new DubyParseResult(snapshot, parse(new StringBuilder(snapshot.getText()).toString()));
- } catch (RaiseException ex) {
- if (ex.getCause() instanceof SyntaxException) {
- result = new DubyParseResult(snapshot, (SyntaxException)ex.getCause());
- } else if (ex.getCause() != null) {
- logger.log(Level.SEVERE, null, ex.getCause());
- } else {
- logger.log(Level.SEVERE, null, ex);
- }
- } catch (SyntaxException ex) {
- result = new DubyParseResult(snapshot, ex);
- }
- }
-
- @Override
- public Result getResult(Task arg0) throws ParseException {
- return result;
- }
-
- @Override
- public void cancel() {
-
- }
-
- @Override
- public void addChangeListener(ChangeListener arg0) {
-
- }
-
- @Override
- public void removeChangeListener(ChangeListener arg0) {
-
- }
-
-}
View
12 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyResolver.xml
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-To change this template, choose Tools | Templates
-and open the template in the editor.
--->
-<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
-<MIME-resolver>
- <file>
- <ext name="duby"/>
- <resolver mime="text/x-duby"/>
- </file>
-</MIME-resolver>
View
4 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/DubyTemplate.duby
@@ -1,4 +0,0 @@
-# To change this template, choose Tools | Templates
-# and open the template in the editor.
-
-puts "Hello World"
View
BIN  Duby Plugin/Duby Editor/src/org/jruby/duby/editor/duby-icon.png
Deleted file not rendered
View
84 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/fontsColors.xml
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
-
-<fontscolors>
- <!-- See http://ui.netbeans.org/docs/ui/editor_fonts_colors/Editor_fonts_and_colors.htm#ruby -->
- <!-- A couple of things are not accurate yet; globals are not bold, and method calls are
- black and bold instead of green (which would be identical to fields) -->
- <fontcolor name="keyword" default="keyword"/>
-
- <fontcolor name="CLASS_VAR" foreColor="ff098618">
- <font style="bold+italic"/>
- </fontcolor>
-
- <fontcolor name="INT_LITERAL" default="number"/>
- <fontcolor name="FLOAT_LITERAL" default="number"/>
- <fontcolor name="ANY_OPERATOR" default="operator"/>
- <fontcolor name="INSTANCE_VAR" default="field"/>
- <fontcolor name="GLOBAL_VAR" foreColor="black">
- <font style="italic"/>
- </fontcolor>
- <fontcolor name="STRING_LITERAL" default="string"/>
- <fontcolor name="DOUBLE_LITERAL" default="number"/>
- <fontcolor name="BLOCK_COMMENT" default="comment"/>
- <fontcolor name="DOCUMENTATION" default="comment"/>
- <fontcolor name="LONG_LITERAL" default="number"/>
- <fontcolor name="REGEXP_LITERAL" foreColor="9933CC"/>
- <fontcolor name="ERROR" default="error"/>
- <fontcolor name="LINE_COMMENT" default="comment"/>
- <fontcolor name="CONSTANT" foreColor="black">
- <font style="italic"/>
- </fontcolor>
- <fontcolor name="TYPE_SYMBOL" foreColor="2E92C7"/>
- <fontcolor name="IDENTIFIER" default="identifier"/>
- <fontcolor name="WHITESPACE" default="whitespace"/>
- <fontcolor name="TODO" foreColor="ff99006b">
- <font style="bold"/>
- </fontcolor>
- <fontcolor name="QUOTED_STRING_LITERAL" default="string"/>
-
- <!-- This is intended for an embedded regular expression language -->
- <!--
- <fontcolor name="REGEXP_TEXT" foreColor="ff006f00"/>
- <fontcolor name="REGEXP_META" foreColor="ff006f00">
- <font style="bold"/>
- </fontcolor>
- <fontcolor name="REGEXP_INVALID" foreColor="ffff006b" strikeThrough="ffff006b" >
- <font style="bold"/>
- </fontcolor>
- -->
-
- <!--"semantic" highlighting:-->
- <fontcolor name="mod-unused" waveUnderlined="999999"/>
- <fontcolor name="mod-abstract" />
- <fontcolor name="mod-field" default="field"/>
- <fontcolor name="mod-local-variable" />
- <fontcolor name="mod-parameter" foreColor="A06001"/>
-
- <fontcolor name="mod-method">
- <font style="bold" />
- </fontcolor>
- <fontcolor name="mod-constructor" >
- <font style="bold" />
- </fontcolor>
- <fontcolor name="mod-class" />
- <fontcolor name="mod-interface" />
- <fontcolor name="mod-annotation-type" />
- <fontcolor name="mod-enum" />
- <fontcolor name="mod-deprecated" strikeThrough="404040" />
- <fontcolor name="mod-static" >
- <font style="italic" />
- </fontcolor>
- <fontcolor name="mod-private" />
- <fontcolor name="mod-package-private" />
- <fontcolor name="mod-protected" />
- <fontcolor name="mod-public" />
-
- <!--currently not used:-->
-<!-- <fontcolor name="mod-type-parameter-declaration" bgColor="lightGray"/>
- <fontcolor name="mod-type-parameter-use" bgColor="green"/>
- <fontcolor name="mod-undefined" foreColor="red"/>-->
-
- <!--mark occurrences:-->
- <fontcolor name="mark-occurrences" bgColor="ECEBA3"/>
-</fontscolors>
View
130 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/layer.xml
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
-<filesystem>
- <folder name="Editors">
- <folder name="text">
- <folder name="x-duby">
- <file name="language.instance">
- <attr name="instanceCreate" methodvalue="org.netbeans.modules.ruby.lexer.RubyTokenId.language"/>
- <attr name="instanceOf" stringvalue="org.netbeans.api.lexer.Language"/>
- </file>
-
- <folder name="BracesMatchers">
- <file name="org-netbeans-modules-ruby-RubyBracesMatcherFactory.instance">
- <attr name="position" intvalue="0"/>
- </file>
- </folder>
- <folder name="Actions">
- <file name="org-netbeans-modules-ruby-ReflowParagraphAction.shadow">
- <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-ruby-ReflowParagraphAction.instance"/>
- </file>
- </folder>
-
- <folder name="FontsColors">
- <folder name="NetBeans">
- <folder name="Defaults">
- <file name="coloring.xml" url="fontsColors.xml">
- <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.ruby.Bundle"/>
- </file>
- </folder>
- </folder>
- </folder>
-
- <folder name="Preferences">
- <folder name="Defaults">
- <file name="org-netbeans-modules-ruby-preferences.xml" url="preferences.xml"/>
- </folder>
- </folder>
- </folder>
- </folder>
- </folder>
-
- <folder name="CslPlugins">
- <folder name="text">
- <folder name="x-duby">
- <file name="language.instance">
- <attr name="instanceClass" stringvalue="org.jruby.duby.editor.DubyLanguage"/>
- </file>
- </folder>
- </folder>
- </folder>
-
- <folder name="Loaders">
- <folder name="text">
- <folder name="x-duby">
- <folder name="Actions">
- <file name="org-openide-actions-CopyAction.instance">
- <attr name="position" intvalue="400"/>
- </file>
- <file name="org-openide-actions-CutAction.instance">
- <attr name="position" intvalue="300"/>
- </file>
- <file name="org-openide-actions-DeleteAction.instance">
- <attr name="position" intvalue="600"/>
- </file>
- <file name="org-openide-actions-FileSystemAction.instance">
- <attr name="position" intvalue="1100"/>
- </file>
- <file name="org-openide-actions-OpenAction.instance">
- <attr name="position" intvalue="100"/>
- </file>
- <file name="org-openide-actions-PropertiesAction.instance">
- <attr name="position" intvalue="1400"/>
- </file>
- <file name="org-openide-actions-RenameAction.instance">
- <attr name="position" intvalue="700"/>
- </file>
- <file name="org-openide-actions-SaveAsTemplateAction.instance">
- <attr name="position" intvalue="900"/>
- </file>
- <file name="org-openide-actions-ToolsAction.instance">
- <attr name="position" intvalue="1300"/>
- </file>
- <file name="sep-1.instance">
- <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
- <attr name="position" intvalue="200"/>
- </file>
- <file name="sep-2.instance">
- <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
- <attr name="position" intvalue="500"/>
- </file>
- <file name="sep-3.instance">
- <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
- <attr name="position" intvalue="800"/>
- </file>
- <file name="sep-4.instance">
- <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
- <attr name="position" intvalue="1000"/>
- </file>
- <file name="sep-5.instance">
- <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
- <attr name="position" intvalue="1200"/>
- </file>
- </folder>
- <folder name="Factories">
- <file name="DubyDataLoader.instance">
- <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/jruby/duby/editor/duby-icon.png"/>
- <attr name="dataObjectClass" stringvalue="org.jruby.duby.editor.DubyDataObject"/>
- <attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
- <attr name="mimeType" stringvalue="text/x-duby"/>
- </file>
- </folder>
- </folder>
- </folder>
- </folder>
- <folder name="Services">
- <folder name="MIMEResolver">
- <file name="DubyResolver.xml" url="DubyResolver.xml">
- <attr name="SystemFileSystem.localizingBundle" stringvalue="org.jruby.duby.editor.Bundle"/>
- </file>
- </folder>
- </folder>
- <folder name="Templates">
- <folder name="Other">
- <file name="DubyTemplate.duby" url="DubyTemplate.duby">
- <attr name="SystemFileSystem.localizingBundle" stringvalue="org.jruby.duby.editor.Bundle"/>
- <attr name="template" boolvalue="true"/>
- </file>
- </folder>
- </folder>
-</filesystem>
View
7 Duby Plugin/Duby Editor/src/org/jruby/duby/editor/preferences.xml
@@ -1,7 +0,0 @@
-<!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd">
-
-<editor-preferences>
- <entry category="private" javaType="java.lang.Integer" name="indent-shift-width" value="2" />
- <entry category="private" javaType="java.lang.Integer" name="spaces-per-tab" value="2" />
- <entry category="private" javaType="java.lang.Integer" name="tab-size" value="2" />
-</editor-preferences>
View
26 Duby Plugin/Duby Editor/test/unit/src/org/jruby/duby/editor/DubyDataObjectTest.java
@@ -1,26 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.jruby.duby.editor;
-
-import junit.framework.TestCase;
-import org.openide.filesystems.FileObject;
-import org.openide.filesystems.Repository;
-import org.openide.loaders.DataObject;
-
-public class DubyDataObjectTest extends TestCase {
-
- public DubyDataObjectTest(String testName) {
- super(testName);
- }
-
- public void testDataObject() throws Exception {
- FileObject root = Repository.getDefault().getDefaultFileSystem().getRoot();
- FileObject template = root.getFileObject("Templates/Other/DubyTemplate.duby");
- assertNotNull("Template file shall be found", template);
-
- DataObject obj = DataObject.find(template);
- assertEquals("It is our data object", DubyDataObject.class, obj.getClass());
- }
-}
View
8 Duby Plugin/DubyCompiler/build.xml
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
-<!-- for some information on what you could do (e.g. targets to override). -->
-<!-- If you delete this file and reopen the project it will be recreated. -->
-<project name="org.jruby.duby.compiler" default="netbeans" basedir=".">
- <description>Builds, tests, and runs the project org.jruby.duby.compiler.</description>
- <import file="nbproject/build-impl.xml"/>
-</project>
View
5 Duby Plugin/DubyCompiler/manifest.mf
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-OpenIDE-Module: org.jruby.duby.compiler
-OpenIDE-Module-Localizing-Bundle: org/jruby/duby/compiler/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.0
-
View
45 Duby Plugin/DubyCompiler/nbproject/build-impl.xml
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT ***
-*** EDIT ../build.xml INSTEAD ***
--->
-<project name="org.jruby.duby.compiler-impl" basedir="..">
- <fail message="Please build using Ant 1.7.1 or higher.">
- <condition>
- <not>
- <antversion atleast="1.7.1"/>
- </not>
- </condition>
- </fail>
- <property file="nbproject/private/suite-private.properties"/>
- <property file="nbproject/suite.properties"/>
- <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
- <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
- <property file="${suite.dir}/nbproject/platform.properties"/>
- <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
- <attribute name="property"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{property}" value="@{value}"/>
- </sequential>
- </macrodef>
- <property file="${user.properties.file}"/>
- <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
- <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
- <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
- <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
- <condition>
- <not>
- <contains string="${cluster.path.evaluated}" substring="platform"/>
- </not>
- </condition>
- </fail>
- <import file="${harness.dir}/build.xml"/>
-</project>
View
8 Duby Plugin/DubyCompiler/nbproject/genfiles.properties
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=884e1f98
-build.xml.script.CRC32=fa261cdd
-build.xml.stylesheet.CRC32=79c3b980@1.28.2.7
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=884e1f98
-nbproject/build-impl.xml.script.CRC32=cbfbdb71
-nbproject/build-impl.xml.stylesheet.CRC32=261c4bef@1.28.2.7
View
0  Duby Plugin/DubyCompiler/nbproject/private/private.properties
No changes.
View
4 Duby Plugin/DubyCompiler/nbproject/private/private.xml
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
- <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
-</project-private>
View
1  Duby Plugin/DubyCompiler/nbproject/project.properties
@@ -1 +0,0 @@
-is.autoload=true
View
51 Duby Plugin/DubyCompiler/nbproject/project.xml
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.apisupport.project</type>
- <configuration>
- <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
- <code-name-base>org.jruby.duby.compiler</code-name-base>
- <suite-component/>
- <module-dependencies>
- <dependency>
- <code-name-base>org.netbeans.libs.jrubyparser</code-name-base>
- <build-prerequisite/>
- <compile-dependency/>
- <run-dependency>
- <release-version>1</release-version>
- <implementation-version/>
- </run-dependency>
- </dependency>
- </module-dependencies>
- <public-packages>
- <package>org.jruby.duby</package>
- <package>org.jrubyparser</package>
- <package>org.jrubyparser.ast</package>
- <package>org.jrubyparser.lexer</package>
- <package>org.jrubyparser.parser</package>
- <package>jruby.objectweb.asm</package>
- <package>jruby.objectweb.asm.commons</package>
- <package>jruby.objectweb.asm.signature</package>
- <package>jruby.objectweb.asm.tree</package>
- <package>jruby.objectweb.asm.tree.analysis</package>
- <package>jruby.objectweb.asm.util</package>
- <package>org.jruby</package>
- <package>org.jruby.exceptions</package>
- <package>org.jruby.javasupport</package>
- <package>org.jruby.javasupport.bsf</package>
- <package>org.jruby.javasupport.proxy</package>
- <package>org.jruby.javasupport.util</package>
- <package>org.jruby.runtime</package>
- <package>org.jruby.runtime.builtin</package>
- <package>org.jruby.util</package>
- </public-packages>
- <class-path-extension>
- <runtime-relative-path>ext/duby.jar</runtime-relative-path>
- <binary-origin>release/modules/ext/duby.jar</binary-origin>
- </class-path-extension>
- <class-path-extension>
- <runtime-relative-path>ext/jruby-complete.jar</runtime-relative-path>
- <binary-origin>release/modules/ext/jruby-complete.jar</binary-origin>
- </class-path-extension>
- </data>
- </configuration>
-</project>
View
1  Duby Plugin/DubyCompiler/nbproject/suite.properties
@@ -1 +0,0 @@
-suite.dir=${basedir}/..
View
BIN  Duby Plugin/DubyCompiler/release/modules/ext/JRubyParser.jar
Binary file not shown
View
BIN  Duby Plugin/DubyCompiler/release/modules/ext/duby.jar
Binary file not shown
View
BIN  Duby Plugin/DubyCompiler/release/modules/ext/jruby-complete.jar
Binary file not shown
View
1  Duby Plugin/DubyCompiler/src/org/jruby/duby/compiler/Bundle.properties
@@ -1 +0,0 @@
-OpenIDE-Module-Name=DubyCompiler
View
3  Duby Plugin/README
@@ -1,3 +0,0 @@
-To use this you need to replace Netbean's jruby-parser with the duby version.
-I use this command
-$ cp duby/javalib/JRubyParser.jar /Applications/NetBeans/NetBeans\ 6.7.1.app/Contents/Resources/NetBeans/ruby2/modules/ext/jruby-parser-0.1.jar
View
8 Duby Plugin/build.xml
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
-<!-- for some information on what you could do (e.g. targets to override). -->
-<!-- If you delete this file and reopen the project it will be recreated. -->
-<project name="Duby Plugin" basedir=".">
- <description>Builds the module suite Duby Plugin.</description>
- <import file="nbproject/build-impl.xml"/>
-</project>
View
42 Duby Plugin/nbproject/build-impl.xml
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT ***
-*** EDIT ../build.xml INSTEAD ***
--->
-<project name="Duby Plugin-impl" basedir=".." xmlns:sproject="http://www.netbeans.org/ns/nb-module-suite-project/1">
- <fail message="Please build using Ant 1.7.1 or higher.">
- <condition>
- <not>
- <antversion atleast="1.7.1"/>
- </not>
- </condition>
- </fail>
- <property file="nbproject/private/platform-private.properties"/>
- <property file="nbproject/platform.properties"/>
- <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
- <attribute name="property"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{property}" value="@{value}"/>
- </sequential>
- </macrodef>
- <property file="${user.properties.file}"/>
- <sproject:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir"/>
- <sproject:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir"/>
- <sproject:evalprops property="cluster.path.evaluated" value="${cluster.path}"/>
- <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
- <condition>
- <not>
- <contains string="${cluster.path.evaluated}" substring="platform"/>
- </not>
- </condition>
- </fail>
- <import file="${harness.dir}/suite.xml"/>
-</project>
View
8 Duby Plugin/nbproject/genfiles.properties
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=fdf49c7d
-build.xml.script.CRC32=8ffc2fd2
-build.xml.stylesheet.CRC32=531c622b@1.28.2.7
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=fdf49c7d
-nbproject/build-impl.xml.script.CRC32=8ae94027
-nbproject/build-impl.xml.stylesheet.CRC32=2f5f2db8@1.28.2.7
View
14 Duby Plugin/nbproject/platform.properties
@@ -1,14 +0,0 @@
-cluster.path=\
- ${nbplatform.active.dir}/apisupport:\
- ${nbplatform.active.dir}/enterprise:\
- ${nbplatform.active.dir}/harness:\
- ${nbplatform.active.dir}/ide:\
- ${nbplatform.active.dir}/identity:\
- ${nbplatform.active.dir}/java:\
- ${nbplatform.active.dir}/nb:\
- ${nbplatform.active.dir}/platform:\
- ${nbplatform.active.dir}/profiler:\
- ${nbplatform.active.dir}/ruby:\
- ${nbplatform.active.dir}/webcommon:\
- ${nbplatform.active.dir}/websvccommon
-nbplatform.active=default
View
5 Duby Plugin/nbproject/project.properties
@@ -1,5 +0,0 @@
-modules=\
- ${project.org.jruby.duby.editor}:\
- ${project.org.jruby.duby.compiler}
-project.org.jruby.duby.compiler=DubyCompiler
-project.org.jruby.duby.editor=Duby Editor
View
9 Duby Plugin/nbproject/project.xml
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.apisupport.project.suite</type>
- <configuration>
- <data xmlns="http://www.netbeans.org/ns/nb-module-suite-project/1">
- <name>Duby Plugin</name>
- </data>
- </configuration>
-</project>
View
15 History.txt
@@ -1,15 +0,0 @@
-=== 0.0.3 / 2010-06-09
-
-* Even more language features!
-* invokedynamic support (sort of)
-* Using mirror types to avoid class initialization
-* Other stuff
-
-=== 0.0.2 / 2010-02-15
-
-* More language features added
-
-=== 0.0.1 / 2009-10-27
-
-* First gem release
- * Most things necessary for simple apps, scripts, servlets are working
View
51 README.txt
@@ -1,50 +1,5 @@
-= duby
+The Duby project has been renamed to Mirah and moved to a new repository
-* http://kenai.com/projects/duby
+http://github.com/headius/mirah
-== DESCRIPTION:
-
-Duby is a customizable programming language featuring static types,
-local type inference and a heavily Ruby-inspired syntax. Duby
-currently includes a typer/compiler backend for the JVM which can
-output either JVM bytecode or Java source files.
-
-== FEATURES/PROBLEMS:
-
-* Ruby syntax
-* Compiles to .class or .java
-* Fast as Java
-
-== SYNOPSIS:
-
-duby <script.duby>
-duby -e "inline script"
-dubyc <script.duby>
-dubyc -e "inline script" # produces DashE.class
-dubyc -java <script.duby>
-dubyc -java -e "inline script" # produces DashE.java
-
-== REQUIREMENTS:
-
-* JRuby 1.5.0 or higher.
-* BiteScript 0.0.5 or higher
-
-== INSTALL:
-
-If your "gem" command is the one from JRuby:
-
-* gem install duby
-
-Otherwise:
-
-* jruby -S gem install duby
-
-Only JRuby is supported at this time.
-
-== For Java tools:
-
-To build the Duby jars from source you should have a checkout of both jruby and
-bitescript in Duby's parent directory. Run "ant jar-complete" in jruby, then in
-the duby directory "../jruby/bin/jruby -S rake jar" to build the Duby jar. Use
-"jar:complete" instead to produce a free-standing jar file with JRuby and the
-JRubyParser libraries included.
+See http://mirah.org for more information.
View
85 Rakefile
@@ -1,85 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'java'
-$: << './lib'
-require 'duby'
-require 'jruby/compiler'
-require 'ant'
-
-task :default => :test
-
-Rake::TestTask.new :test do |t|
- t.libs << "lib"
- # This is hacky, I know
- t.libs.concat Dir["../bitescript*/lib"]
- t.test_files = FileList["test/**/*.rb"]
- java.lang.System.set_property("jruby.duby.enabled", "true")
-end
-
-task :init do
- mkdir_p 'dist'
- mkdir_p 'build'
-end
-
-task :clean do
- ant.delete :quiet => true, :dir => 'build'
- ant.delete :quiet => true, :dir => 'dist'
-end
-
-task :compile => :init do
- # build the Ruby sources
- puts "Compiling Ruby sources"
- JRuby::Compiler.compile_argv([
- '-t', 'build',
- '--javac',
- 'src/org/jruby/duby/duby_command.rb'
- ])
-
- # build the Duby sources
- puts "Compiling Duby sources"
- Dir.chdir 'src' do
- classpath = Duby::Env.encode_paths([
- 'javalib/jruby-complete.jar',
- 'javalib/JRubyParser.jar',
- 'dist/duby.jar',
- 'build',
- '/usr/share/ant/lib/ant.jar'
- ])
- Duby.compile(
- '-c', classpath,
- '-d', '../build',
- 'org/jruby/duby',
- 'duby/lang')
- end
-end
-
-task :jar => :compile do
- ant.jar :jarfile => 'dist/duby.jar' do
- fileset :dir => 'lib'
- fileset :dir => 'build'
- fileset :dir => '.', :includes => 'bin/*'
- fileset :dir => '../bitescript/lib'
- manifest do
- attribute :name => 'Main-Class', :value => 'org.jruby.duby.DubyCommand'
- end
- end
-end
-
-namespace :jar do
- task :complete => :jar do
- ant.jar :jarfile => 'dist/duby-complete.jar' do
- zipfileset :src => 'dist/duby.jar'
- zipfileset :src => 'javalib/jruby-complete.jar'
- zipfileset :src => 'javalib/JRubyParser.jar'
- manifest do
- attribute :name => 'Main-Class', :value => 'org.jruby.duby.DubyCommand'
- end
- end
- end
-
- task :bootstrap => :compile do
- ant.jar :jarfile => 'javalib/duby-bootstrap.jar' do
- fileset :dir => 'build'
- end
- end
-end
View
9 bin/duby
@@ -1,9 +0,0 @@
-#!/usr/bin/env jruby
-begin
- require 'duby'
-rescue LoadError
- $: << File.dirname(File.dirname(__FILE__)) + '/lib'
- require 'duby'
-end
-
-Duby.run(*ARGV)
View
9 bin/dubyc
@@ -1,9 +0,0 @@
-#!/usr/bin/env jruby
-begin
- require 'duby'
-rescue LoadError
- $: << File.dirname(File.dirname(__FILE__)) + '/lib'
- require 'duby'
-end
-
-Duby.compile(*ARGV)
View
9 bin/dubyp
@@ -1,9 +0,0 @@
-#!/usr/bin/env jruby
-begin
- require 'duby'
-rescue LoadError
- $: << File.dirname(File.dirname(__FILE__)) + '/lib'
- require 'duby'
-end
-
-puts Duby.parse(*ARGV).inspect
View
34 bin/jrubyp
@@ -1,34 +0,0 @@
-#!/usr/bin/env jruby
-$: << File.dirname(File.dirname(__FILE__)) + '/lib'
-require 'duby'
-
-module Java::OrgJrubyparserAst
- class Node
- def pp(indent = 0)
- return if self.invisible?
- name = ":#{self.name}" if respond_to? :getName
- name += " (#{depth})" if respond_to? :getDepth
- print "#{' '*indent}(#{node_name}#{name}"
- if child_nodes.size == 0
- puts ')'
- else
- puts
- indent += 2
- child_nodes.each {|n| n.pp(indent)}
- puts "#{' '*indent})"
- end
- end
- end
-end
-
-filename = ARGV.shift
-case filename
-when '-e'
- contents = ARGV.join(' ')
-when '-', nil
- contents = $stdin.read
-else
- contents = IO.read(filename)
-end
-require 'duby'
-puts Duby::AST.parse_ruby(contents, filename).pp
View
40 build.xml
@@ -1,40 +0,0 @@
-<project name="duby" default="jar">
- <target name="bootstrap">
- <mkdir dir="dist"/>
- <jar jarfile="dist/duby.jar">
- <fileset dir="lib"/>
- <fileset dir="." includes="bin/*"/>
- <fileset dir="../bitescript/lib"/>
- <fileset dir="../jruby/lib/ruby/1.8/"/>
- </jar>
- </target>
-
- <target name="clean">
- <delete quiet="true" dir="build"/>
- <delete quiet="true" dir="dist"/>
- </target>
-
- <target name="compile">
- <mkdir dir="build"/>
- <java classname="org.jruby.Main"
- classpath="../jruby/lib/jruby-complete.jar:javalib/JRubyParser.jar:dist/duby.jar"
- fork="true" failonerror="true" dir="src">
- <arg value="-e"/>
- <arg value="load 'bin/dubyc'"/>
- <arg value="--"/>
- <arg value="-d"/>
- <arg file="build"/>
- <arg value="org/jruby/duby"/>
- </java>
- </target>
-
- <target name="jar" depends="compile">
- <mkdir dir="dist"/>
- <jar jarfile="dist/duby.jar">
- <fileset dir="lib"/>
- <fileset dir="build"/>
- <fileset dir="." includes="bin/*"/>
- <fileset dir="../bitescript/lib"/>
- </jar>
- </target>
-</project>
View
26 duby.gemspec
@@ -1,26 +0,0 @@
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = 'duby'
- s.version = "0.0.3"
- s.authors = ["Charles Oliver Nutter", "Ryan Brown"]
- s.date = Time.now.strftime("YYYY-MM-DD")
- s.description = %q{Duby is a customizable programming language featuring static types,
-local type inference and a heavily Ruby-inspired syntax. Duby
-currently includes a typer/compiler backend for the JVM which can
-output either JVM bytecode or Java source files.}
- s.email = ["headius@headius.com", "ribrdb@google.com"]
- s.executables = ["duby", "dubyc", "dubyp"]
- s.extra_rdoc_files = ["History.txt", "README.txt"]
- files = Dir["{bin,lib,test,examples,javalib}/**/*"] + Dir["{*.txt,Rakefile}"]
- s.files = files.reject {|file| file =~ /jruby-complete.jar/}
- s.homepage = %q{http://kenai.com/projects/duby}
- s.rdoc_options = ["--main", "README.txt"]
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{duby}
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Duby is a customizable programming language featuring static types, local type inference and a heavily Ruby-inspired syntax}
- s.test_files = Dir["test/**/test*.rb"]
- s.platform = "java"
- s.add_dependency("bitescript", ">= 0.0.6")
-end
View
7 examples/ant/example-build.xml
@@ -1,7 +0,0 @@
-<project name="test">
- <taskdef name="dubyc" classname="org.jruby.duby.ant.Compile"/>
-
- <target name="blah">
- <dubyc src="examples/fib.duby" target="build"/>
- </target>
-</project>
View
12 examples/appengine/Rakefile
@@ -1,12 +0,0 @@
-$: << File.expand_path(File.dirname(__FILE__) + '/lib')
-require 'duby/appengine_tasks'
-
-appengine_app :app
-
-DUBY_APP = "#{Duby.dest_path}/com/ribrdb/DubyApp.class"
-LIST = "#{Duby.source_path}/com/ribrdb/list.dhtml"
-
-Rake::Task[DUBY_APP].enhance([LIST])
-
-task :app => DUBY_APP
-task :default => :server
View
29 examples/appengine/Readme
@@ -1,29 +0,0 @@
-Run rake to compile the application and start the development server:
-
-$ jruby -I `pwd`/../../lib -S rake
-
-Requirements:
- - jruby -S gem install bitescript
- - jruby -S gem install appengine-sdk -v=1.3.5.pre
-
-Datastore API:
- Model.get(key)
- Model.delete(key)
- Model.all -> Query
- property foo, String # or any supported datastore type
- # For numbers use Long or Double
-
- instance.save
- instance.key
-
- instance.foo
- instance.foo=
-
- Query.count
- Query.run -> Model[]
- Query.first -> instance || nil
- Query.sort(property_name)
- Query.sort(property_name, true) # descending
- Query.foo('foo').bar(3) # Only return instances where foo = 'foo' and bar = 3
- Query.offset(10)
- Query.limit(5)
View
143 examples/appengine/lib/duby/appengine_tasks.rb
@@ -1,143 +0,0 @@
-require 'appengine-sdk'
-require 'duby_task'
-require 'java'
-require 'open-uri'
-require 'rake'
-require 'yaml'
-
-module AppEngine::Rake
- SERVLET = AppEngine::SDK::SDK_ROOT +
- '/lib/shared/geronimo-servlet_2.5_spec-1.2.jar'
- APIS = AppEngine::SDK::API_JAR
- TOOLS = AppEngine::SDK::TOOLS_JAR
-
- $CLASSPATH << SERVLET
- $CLASSPATH << APIS
- $CLASSPATH << TOOLS
-
- class AppEngineTask < Rake::Task
- def initialize(*args, &block)
- super
- AppEngineTask.tasks << self
- end
-
- def init(src, war)
- @src = src
- @war = war
- unless $CLASSPATH.include?(webinf_classes)
- $CLASSPATH << webinf_classes
- end
- webinf_lib_jars.each do |jar|
- $CLASSPATH << jar unless $CLASSPATH.include?(jar)
- end
- Duby.source_path = src
- Duby.dest_path = webinf_classes
- directory(webinf_classes)
- directory(webinf_lib)
-
- file_create api_jar => webinf_lib do
- puts 'Coping apis'
- cp APIS, api_jar
- end
-
- task :server => [name] do
- check_for_updates
- args = [
- 'java', '-cp', TOOLS,
- 'com.google.appengine.tools.KickStart',
- 'com.google.appengine.tools.development.DevAppServerMain',
- @war
- ]
- sh *args
- @done = true
- @update_thread.join
- end
- task :upload => [name] do
- Java::ComGoogleAppengineTools::AppCfg.main(
- ['update', @war].to_java(:string))
- end
-
- enhance([api_jar])
- end
-
- def real_prerequisites
- prerequisites.map {|n| application[n, scope]}
- end
-
- def check_for_updates
- @update_thread = Thread.new do
- # Give the server time to start
- next_time = Time.now + 5
- until @done
- sleep_time = next_time - Time.now
- sleep(sleep_time) if sleep_time > 0
- next_time = Time.now + 1
- update
- end
- end
- end
-
- def update
- begin
- timestamp = app_yaml_timestamp
- @last_app_yaml_timestamp ||= timestamp
- updated = false
- real_prerequisites.each do |dep|
- if dep.needed?
- dep.execute
- updated = true
- end
- end
- if updated || (timestamp != @last_app_yaml_timestamp)
- #touch aeweb_xml
- open('http://localhost:8080/_ah/reloadwebapp')
- @last_app_yaml_timestamp = timestamp
- end
- rescue Exception
- puts $!, $@
- end
- end
-
- def app_yaml_timestamp
- if File.exist?(app_yaml)
- File.mtime(app_yaml)
- end
- end
-
- def app_yaml
- @war + '/app.yaml'
- end
-
- def webinf_classes
- @war + '/WEB-INF/classes'
- end
-
- def webinf_lib
- @war + '/WEB-INF/lib'
- end
-
- def api_jar
- File.join(webinf_lib, File.basename(APIS))
- end
-
- def webinf_lib_jars
- Dir.glob(webinf_lib + '/*.jar')
- end
- end
-end
-
-def appengine_app(*args, &block)
- deps = []
- if args[-1].kind_of?(Hash)
- hash = args.pop
- arg = hash.keys[0]
- deps = hash[arg]
- args << arg
- end
- name, src, war = args
- task = AppEngine::Rake::AppEngineTask.define_task(name => deps, &block)
- src = File.expand_path(src || 'src')
- war = File.expand_path(war || 'war')
- task.init(src, war)
- task
-end
View
60 examples/appengine/lib/duby_task.rb
@@ -1,60 +0,0 @@
-require 'duby'
-module Duby
- def self.source_path
- @source_path ||= File.expand_path('.')
- end
-
- def self.source_path=(path)
- @source_path = File.expand_path(path)
- end
-
- def self.dest_path
- @dest_path ||= File.expand_path('.')
- end
-
- def self.dest_path=(path)
- @dest_path = File.expand_path(path)
- end
-
- def self.dest_to_source_path(path)
- source = File.expand_path(path).sub(/\.(?:java|class)/, '.duby')
- source = source.sub(/^#{dest_path}\//, "#{source_path}/")
- down = source[0,1].downcase + source[1,source.size]
- return down if File.exist?(down)
- source
- end
-
- def self.compiler_options
- @compiler_options ||= []
- end
-
- def self.compiler_options=(args)
- @compiler_options = args
- end
-end
-
-def dubyc(*files)
- if files[-1].kind_of?(Hash)
- options = files.pop
- else
- options = {}
- end
- source_dir = options.fetch(:dir, Duby.source_path)
- dest = options.fetch(:dest, Duby.dest_path)
- files = files.map {|f| f.sub(/^#{source_dir}\//, '')}
- flags = options.fetch(:options, Duby.compiler_options)
- args = ['-d', dest, *flags] + files
- chdir(source_dir) do
- puts "dubyc #{args.join ' '}"
- Duby.compile(*args)
- Duby.reset
- end
-end
-
-rule '.java' => [proc {|n| Duby.dest_to_source_path(n)}] do |t|
- dubyc(t.source, :options=>['-java'])
-end
-
-rule '.class' => [proc {|n| Duby.dest_to_source_path(n)}] do |t|
- dubyc(t.source)
-end
View
57 examples/appengine/src/com/ribrdb/DubyApp.duby
@@ -1,57 +0,0 @@
-import java.util.HashMap
-import java.util.regex.Pattern
-
-import javax.servlet.http.HttpServlet
-
-import com.google.appengine.api.datastore.Text
-import com.google.appengine.ext.duby.db.Model
-
-class Post < Model
- property 'title', String
- property 'body', Text
-end
-
-class DubyApp < HttpServlet
- def_edb(list, 'com/ribrdb/list.dhtml')
-
- def doGet(request, response)
- @posts = Post.all.run
- response.getWriter.write(list)
- end
-
- def doPost(request, response)
- post = Post.new
- post.title = request.getParameter('title')
- post.body = request.getParameter('body')
- post.save
- doGet(request, response)
- end
-
-
- def initialize
- @escape_pattern = Pattern.compile("[<>&'\"]")
- @escaped = HashMap.new
- @escaped.put("<", "&lt;")
- @escaped.put(">", "&gt;")
- @escaped.put("&", "&amp;")
- @escaped.put("\"", "&quot;")
- @escaped.put("'", "&#39;")
- end
-
- def h(text:String)
- return "" unless text
- matcher = @escape_pattern.matcher(text)
- buffer = StringBuffer.new
- while matcher.find
- replacement = String(@escaped.get(matcher.group))
- matcher.appendReplacement(buffer, replacement)
- end
- matcher.appendTail(buffer)
- return buffer.toString
- end
-
- def h(o:Object)
- return "" unless o
- h(o.toString)
- end
-end
View
15 examples/appengine/src/com/ribrdb/list.dhtml
@@ -1,15 +0,0 @@
-<title>Posts</title>
-<body>
- <h1>All the Posts:</h1>
- <% for post in @posts %>
- <h2><%=h post.title %></h2>
- <p><%=h post.body %></p>
- <% end %>
- <hr>
- <h1>New Post:</h1>
- <form method=post>
- Title: <input type=text name=title><br>
- Content: <textarea name=content></textarea><br>
- <input type=submit>
- </form>
-</body>
View
BIN  examples/appengine/war/WEB-INF/lib/dubydatastore.jar
Binary file not shown
View
66 examples/bintrees.duby
@@ -1,66 +0,0 @@
-class BinaryTrees
- def self.main(args:String[])
- n = 0
- n = Integer.parseInt(args[0]) if args.length > 0
-
- maxDepth = (6 > n) ? 6 : n
- stretchDepth = maxDepth + 1
-
- check = TreeNode.bottomUpTree(0, stretchDepth).itemCheck
- puts "stretch tree of depth #{stretchDepth}\t check: #{check}"
-
- longLivedTree = TreeNode.bottomUpTree 0, maxDepth
-
- depth = 4
- while depth <= maxDepth
- iterations = 1 << (maxDepth - depth + 4)
- check = 0
-
- i = 1
- while i <= iterations
- check += TreeNode.bottomUpTree(i, depth).itemCheck
- check += TreeNode.bottomUpTree(-i,depth).itemCheck
- i += 1
- end
-
- puts "#{iterations * 2}\t trees of depth #{depth}\t check: #{check}"
- depth += 2
- end
-
- puts "long lived tree of depth #{maxDepth}\t check: #{longLivedTree.itemCheck}"
- end
-end
-
-class TreeNode
- def initialize(left:TreeNode, right:TreeNode, item:int)
- @item = item
- @left = left
- @right = right
- end
-
- def initialize(item:int)
- @left = TreeNode(nil)
- @right = TreeNode(nil)
- @item = item
- end
-
- def self.bottomUpTree(item:int, depth:int)
- if depth > 0
- TreeNode.new(
- TreeNode.bottomUpTree(2*item-1, depth-1),
- TreeNode.bottomUpTree(2*item, depth-1),
- item)
- else
- TreeNode.new(item)
- end
- end
-
- def itemCheck
- # if necessary deallocate here
- if @left == nil
- @item
- else
- @item + @left.itemCheck - @right.itemCheck
- end
- end
-end
View
8 examples/construction.duby
@@ -1,8 +0,0 @@
-import "java.lang.StringBuffer"
-import "java.util.ArrayList"
-
-list = ArrayList.new
-sb = StringBuffer.new("Hello")
-sb.append(", world")
-list.add(sb)
-puts list
View
17 examples/dynamic.duby
@@ -1,17 +0,0 @@
-# Example of using a dynamic type in a method definition
-def foo(a:dynamic)
- puts "I got a #{a.getClass.getName} of size #{a.size}"
-end
-
-class SizeThing
- def initialize(size:int)
- @size = size
- end
-
- def size
- @size
- end
-end
-
-foo([1,2,3])
-foo(SizeThing.new(12))
View
3  examples/edb.duby
@@ -1,3 +0,0 @@
-def_edb :render, 'test.edb'
-@message = "Hello"
-puts render
View
16 examples/fib.duby
@@ -1,16 +0,0 @@
-def fib(a:int)
- if a < 2
- a
- else
- fib(a - 1) + fib(a - 2)
- end
-end
-
-def bench(n:int)
- n.times do
- time_start = System.currentTimeMillis
- puts "fib(45): #{fib(45)}\nTotal time: #{System.currentTimeMillis - time_start}"
- end
-end
-
-bench 10
View
22 examples/fields.duby
@@ -1,22 +0,0 @@
-import 'java.util.ArrayList'
-
-class Bar
- def initialize
- @a = ArrayList(nil)
- end
-
- def list(a:ArrayList)
- @a = a
- end
-
- def foo
- puts @a
- end
-end
-
-b = Bar.new
-list = ArrayList.new
-list.add('hello')
-list.add('world')
-b.list(list)
-b.foo
View
55 examples/fractal.duby
@@ -1,55 +0,0 @@
-def run
- puts "Rendering"
- y = -39.0
- while y <= 39.0
- puts
- x = -39.0
- while x <= 39.0
- i = iterate(x/40.0,y/40.0)
- if (i == 0)
- print "*"
- else
- print " "
- end
- x += 1
- end
- y += 1
- end
- puts
-end
-
-def iterate(x:double,y:double)
- cr = y-0.5
- ci = x
- zi = 0.0
- zr = 0.0
- i = 0
-
- result = 0
- while true
- i += 1
- temp = zr * zi
- zr2 = zr * zr
- zi2 = zi * zi
- zr = zr2 - zi2 + cr
- zi = temp + temp + ci
- if (zi2 + zr2 > 16)
- result = i
- break
- end
- if (i > 1000)
- result = 0
- break
- end
- end
-
- result
-end
-
-i = 0
-while i < 10
- start = System.currentTimeMillis
- run
- puts "Time: #{(System.currentTimeMillis - start) / 1000.0}"
- i += 1
-end
View
13 examples/java_thing.duby
@@ -1,13 +0,0 @@
-import "java.lang.System"
-
-def foo
- home = System.getProperty "java.home"
- System.setProperty "hello.world", "something"
- hello = System.getProperty "hello.world"
-
- puts home
- puts hello
-end
-
-puts "Hello world!"
-foo
View
34 examples/plugins/appengine/Rakefile
@@ -1,34 +0,0 @@
-require 'ant'
-require 'appengine-sdk'
-
-$: << '../../../lib'
-require 'duby'
-
-$CLASSPATH << AppEngine::SDK::API_JAR
-
-task :default => :jar
-
-task :init do
- mkdir_p 'dist'
- mkdir_p 'build'
-end
-
-task :clean do
- ant.delete :quiet => true, :dir => 'build'
- ant.delete :quiet => true, :dir => 'dist'
-end
-
-task :compile => :init do
- # build the Duby sources
- puts "Compiling Duby sources"
- Dir.chdir 'src' do
- Duby.compile('-d', '../build', 'com/google/appengine')
- end
-end
-
-task :jar => :compile do
- ant.jar :jarfile => 'dist/dubydatastore.jar' do
- fileset :dir => 'lib'
- fileset :dir => 'build'
- end
-end
View
287 examples/plugins/appengine/lib/com/google/appengine/ext/duby/db/datastore.rb
@@ -1,287 +0,0 @@
-module AppEngine
- class DubyDatastorePlugin
- @models = {}
-
- TypeMap = {
- 'Category' => 'String',
- 'Email' => 'String',
- 'Link' => 'String',
- 'PhoneNumber' => 'String',
- 'PostalAddress' => 'String',
- 'Text' => 'String',
- 'Blob' => 'byte[]',