As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
If you need to choose the language to write your integration tests, what language would you pick? (from the above, or maybe another language).
The requirements that I think the language should meet are at least the following: fast, reasonable IDE, easy to learn.
Thanks!
I'd say Groovy is probably the best choice.
It offers significant advantages over Java (closures, list/map literals, very compact implementation of mocks)
It's very easy to learn incrementally for anyone familiar with Java (Scala is much more different, and many also consider the language inherently more difficult)
Groovy is pretty well supported by IDE plugins by now
The speed of the language is almost certainly not going to matter for integration tests, as the system being tested will probably contain much larger overheads (especially if a database is involved)
However, if you're already using Scala elsewhere (especially in the system under test) and can assume youre developers to be familiar with it, Scala may be a better choice.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I want to make a Java game engine that would be simple to use mainly for it would have a higher level language interpreter. I though about using Lua language with the LuaJ intertpreter, but I've got some really slow results...
I need suggestions for what other Lua-like languages (With a Java interpreter available) exist that (with an interpreter) could execute faster (than LuaJ) on my Java application.
In the domain of game programming, Java itself is considered slow. I would suggest that you can start with code generation facility built on top of Java. I have worked extensively on Drools , Groovy and similar DSLs and can vouch they are "slow" for even a typical enterprise app. One problem is the dynamic interpretation layer built over java. You can see the typical performances in this comparison study at http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine
If you can work on creating a language which generates code before compiling, you will get best of both world. This doesn't mean you will need to know compiler theory stuff from day one. You can simply create utility functions in Java which you can distribute as client library. However, you will need to know Reflections thoroughly to approach the solution in this way. As nobody changes the code in a running production server, you will be perfectly fine.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Interpreted languages are nice, I can write some quick, prototypical code (i.e. using an interactive shell) for the purpose of exploration before delving into production level code.
What is the best approach for this with Java? Currently I'm creating Maven projects with Eclipse, and exploring things in my test infrastructure using JUnit... but this is less then ideal.
You can also check out Eclipse's Scrapbook Page:
Menu>File>New>Other>(search for)Scrapbook Page
Why not use something like BeanShell ? It's a scripting solution for Java and offers a console-based interactive scripting environment.
Here's the quick start guide. Note that you can also start a BeanShell console from within Maven.
I've picked BeanShell here since it's the closest thing to Java, but interactive. You could pick another console-based JVM language such as Scala, Jython etc. They're more removed from standard Java since they're different languages, but still offer interoperability with your standard Java components.
You might want to try out JRebel for quick code tweaking. Or if you are into web development, check Play framework.
http://zeroturnaround.com/software/jrebel/
http://www.playframework.org/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Subjective Logic is fundamental as part of my next project, and I was just wondering if there are any implementations already out there. I've read some things (not a lot) about the operators but I'm still unsure as to how it is implemented.
Preferably I would like a C/Java/Go/Python implementation
I dont see any example codes for subjective logic after a google search. This concept is more into AI and logic based languages like Prolog will have to be employed. Also if you have a rule evaluation engine (like CLIPS rule-engine as mentioned here), then good to go.
There are couple of algorithms proposed which leverage subjective logic and can be coded in java or C right away.
The demo page contains a Java applet which can be used to visualise networks of trust using subjective logic. While no source can be obtained for the applet up front, the applet JAR file can be decompiled using a program such as JD (java decompiler) and from there reverse engineered.
The code somewhat provides a library and is the only example of subjective logic in code I've seen.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
CoffeeScript is so cool. If there is any language use the coffee syntax but running on jvm, like groovy, scala?
Python's syntax is not cool. i can't use so many xx,self in my code, that's ugly.
Yes. CoffeeScript compiles into plain old JavaScript, which can be executed by modern JVMs (v6+).
Incidentally, it's funny that you contrast the syntax of Python, since both languages depend on whitespace as syntax (which is a controversial topic!). Anyhoo, happy hacking!
[Edit] Here is a more useful introduction to using JavaScript on the JVM.
While it is not specifically Coffeescript, Mirah is a JVM language that compiles directly to JVM bytecode or Java source and requires no runtime library to run. Which makes it analogous to the way most people use Coffeescript. That is, avoiding the ugly semantic and syntactic elements of Javascript. Mirah is statically typed, yet its syntax borrows heavily from Ruby (Mirah is Javanese for Ruby).
While the language itself is still in its infancy, it's very possible to use it today. I've done most of my University homework using it where writing Java directly would have otherwise been required. I'm also poking at using it to develop for Android.
It does not look like Coffeescript, but it has the same goals and you may find it a good fit. Not to mention that Coffeescript syntax is also inspired somewhat on Ruby so the two share a common ancestor.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I know there are some differences between both of them, but suppossing that you already have a fully-operating Java environment for developing, testing and production, will you ever consider using Ruby MRI instead of JRuby? On top of that, I would also argue that you can inline Java, use Java datatypes and, most importantly, it almost always outperform Ruby. What do you think? Is there any reason why one should consider Ruby seriously when compared to JRuby?
It's all about choice. If JRuby makes more sense to you use it. Using MRI means you're using Ruby the way Matz has intended it.
This should also answer the question for Rubinius, Maglev and all other implementations. Each serves a different purpose and tries to cover all aspects of MRI. To achieve that they (all) use RubySpec to test the implementation against MRI.