• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need feedback for a project.

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there. Hello there. I am not sure if this is the place to ask but let's try.

During the graduate degree I've written many projects. Some of which I believe to be useful to others. Since it was written with time and resource constrain (you know, a weekly report to the supervisor), I don't feel very good letting others (which may be my potential future employer) to see the code. I must refactor it before I open it.

I would like to ask you guys if the project is worth to invest time and energy refactoring it.

You can see and test it on my blog here: http://blog.nawaman.net/simplescript/.

I can ensure you that it contain no mal-ware of any kind but hey, who am I for you to believe. So if you like the description and decided to try it, do it at your own risk like on the sandbox, virtual machine or something.

I appreciate any response.
Thanks in advance.

 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you might want to let us know what it is or what it does...
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

fred rosenberger wrote:you might want to let us know what it is or what it does...



Agreed. I'd also like to know about how you designed it, the requirements your tool attends...
 
Nawapunth Manusitthipol
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK.

My project enables you to use Java language as a script language.

You can write Java in a file without minimum unnecessary declaration. Like this test.ss file:



There is no need to compile, you can run it using:



Well, you can put above code into a run bash like this ss file:


Put ss in the right path and you can simple run your script using:


Behind you, the script code is transform to a full flesh Java class with a random name. The transformation is done in the way that the line numbers are preserved so you can use the line number information for debugging.

After the transformation, the generated class is compiled in memory. The compiled byte-code is, then, appended after the script code in text form (BASE64) together with its hash. This is done so that the byte code can be reused right away if nothing is changed in the code.

You can use this to for a quick experiment code, test cases that also act like examples or smart configurations.

Hope this is descriptive enough.
 
Nawapunth Manusitthipol
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems that no body is interested in writing scripts in Java language, ah.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always use Python for quick scripting.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting. Have you heard of BeanShell? It's similar, you can use Java as a scripting language that has existed for a longer time already. In fact, there's even a JSR to try to make this a part of standard Java.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I want to a quick Java scripting, I will use Groovy. For other things, I prefer Python. Interesting project, BTW
 
Nawapunth Manusitthipol
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for responding ...

@Jesper: SimpleScript differ from BeanSheel suite greatly. BS interprete its java-like syntax script while SS reoganize the script to a Java code then ask javac to compile it to byte-code. Then byte-code is, then, executed directly by JVM. So once loaded, SS script run as fast as other Java code. Also, the code written for SS is (except for the simpliication of code structure) 100% compatible with Java include all new Java syntaxes that may come in later Java version.

Thanks again for responding ...
:-D
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic