JaroslavTulach at 14:41, 21 June 2016 - 2016-06-21 14:41:38

←Older revision Revision as of 14:41, 21 June 2016
Line 1: Line 1:
-
 
+
Please use README at https://github.com/graalvm/truffle as your starting point to help us review this technology preview of [[Truffle]] [[API]].
-
Please use README at https://github.com/graalvm/truffle as your starting point.
+
==== 1. Setting Up ====
==== 1. Setting Up ====
Line 31: Line 30:
* Name at least three ways we can improve the documentation.
* Name at least three ways we can improve the documentation.
* Name at least three ways we can make the API easier to use (other than documentation).
* Name at least three ways we can make the API easier to use (other than documentation).
-
 
-
=== What is a development stage of your API? ===
 
-
 
-
Technology preview.
 

JaroslavTulach at 10:05, 13 June 2016 - 2016-06-13 10:05:33

←Older revision Revision as of 10:05, 13 June 2016
Line 1: Line 1:
-
== Inter-op Usability Study ==
 
Please use README at https://github.com/graalvm/truffle as your starting point.
Please use README at https://github.com/graalvm/truffle as your starting point.

JaroslavTulach at 09:59, 13 June 2016 - 2016-06-13 09:59:43

←Older revision Revision as of 09:59, 13 June 2016
Line 1: Line 1:
-
Let's come up with own larger examples that exchange larger data structures and not just very small tests where only a few objects are participating in interop. In general, I am not so sure about the message annotations. You have to assume a very generic Java programmer (i.e., fresh beginner student). He also knows a bit how to type JavaScript. Can he use the API reasonably? Actually, what would be interesting is to do a “usability study” with some students. They get some documentation, they get an inter-op task. You let them work and observe. If they can solve the task without problems, the API is good.
 
-
 
-
An example of a [http://wiki.netbeans.org/Html4JavaUXStudy2014 usability study] to follow is [http://wiki.netbeans.org/Html4JavaUXStudy2014 here]. The cost was $49 per developer doing the study.
 
-
 
== Inter-op Usability Study ==
== Inter-op Usability Study ==

JaroslavTulach: New page: Let's come up with own larger examples that exchange larger data structures and not just very small tests where only a few objects are participating in interop. In general, I am not so sur... - 2016-06-13 09:58:59

New page: Let's come up with own larger examples that exchange larger data structures and not just very small tests where only a few objects are participating in interop. In general, I am not so sur...

New page

Let's come up with own larger examples that exchange larger data structures and not just very small tests where only a few objects are participating in interop. In general, I am not so sure about the message annotations. You have to assume a very generic Java programmer (i.e., fresh beginner student). He also knows a bit how to type JavaScript. Can he use the API reasonably? Actually, what would be interesting is to do a “usability study” with some students. They get some documentation, they get an inter-op task. You let them work and observe. If they can solve the task without problems, the API is good.

An example of a [http://wiki.netbeans.org/Html4JavaUXStudy2014 usability study] to follow is [http://wiki.netbeans.org/Html4JavaUXStudy2014 here]. The cost was $49 per developer doing the study.

== Inter-op Usability Study ==

Please use README at https://github.com/graalvm/truffle as your starting point.

==== 1. Setting Up ====

Download GraalVM, setup your IDE to allow you to develop against Truffle API. Write a main class that initializes the Truffle interpreter and evaluetes 'Hello World!' application in JavaScript, Ruby, R and one more language with Truffle interpreter. Package the application as a JAR file and execute it from a command line: ''java -cp yourapp.jar yourpkg.app.MainClass'' (or something like this).

==== 2. Compare the Speed ====

Implement some well known algorithm in JS, Ruby, R and compare speed of the execution in GraalVM JS vs. regular JS, in Graal Ruby and regular Ruby and/or in GraalVM R and normal R.
Find good examples in different languages here: http://benchmarksgame.alioth.debian.org
Make sure the algorithm is warmed up - let it run for few seconds, repeat the computation few times to give the system time to optimize. Compare the speed of initial vs. optimized execution.

==== 3. Java Interoperability ====

Re-implement inner part of your algorithm in Java. Use interoperability features of Truffle API to communicate between the scripting language and Java. Does the rewrite to Java influence the execution speed of your algorithm?

==== 4. Expose Java Data ====

Expose a Java class like '''Address''' that has name, street, town, zipcode fields as an object usable from the Truffle languages. Write a program that constructs the Address instance in Java and passes it into a function written in Ruby/JavaScript/R and this function reads the fields from the object concatenates them into a sequence: {name} lives at {street} in {town} and returns it.

==== 5. Write a Unit Test ====

Verify the ''Address'' concatenating algorithm by writing a unit test using JUnit. Execute it successfully.

=== Post-study questions (up to 5) ===

* How well the Truffle system fits into your developer workflow? What are the three most important issues that could make your experience better?
* Name at least three of the most difficult problems you encountered during task execution.
* Have you experienced any unexpected crashes or errors? If yes, did you find the error messages useful?
* Name at least three ways we can improve the documentation.
* Name at least three ways we can make the API easier to use (other than documentation).

=== What is a development stage of your API? ===

Technology preview.