- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
ScalaScriptEngine : A new library to dynamically compile & load scala classes
Thu, 2011-12-29, 19:51
Hi all,
I am happy to announce scalascriptengine, a scala library that can be
used to on-the-fly compile and load scala classes from their source
files. The library can be embedded in servers and allow modified scala
code to be reloaded without the need to redeploy.
Examples and documentation can be found at the projects home page:
http://code.google.com/p/scalascriptengine/
Regards,
Kostas
Thu, 2011-12-29, 20:51
#2
Re: ScalaScriptEngine : A new library to dynamically compile &
On 29/12/11 19:12, Doug Tangren wrote:
>
> I think I can actually use something like this for plugins in a
> project I'm working on. Is there any chance of loading all instances
> of a type in a given directory?
Hi Dough, what do you mean "load all instances of a type"?
The library has different kind of "refresh" policies for modified scala
classes. I.e. you can configure to scan source folders periodically or
to check each requested class for modification and recompile.
Cheers,
Kostas
Thu, 2011-12-29, 22:11
#3
Re: ScalaScriptEngine : A new library to dynamically compile &
On Thu, Dec 29, 2011 at 2:46 PM, Konstantinos Kougios <kostas.kougios@googlemail.com> wrote:
On 29/12/11 19:12, Doug Tangren wrote:
Hi Dough, what do you mean "load all instances of a type"?
I think I can actually use something like this for plugins in a project I'm working on. Is there any chance of loading all instances of a type in a given directory?
Let's say I defined a trait that would function as the interface for a plugin in my app. It would be neat to have a "drop in" directory for sources of instances of this trait. It sounds like I could use your library do do something of the sort. Does that make sense?
Thu, 2011-12-29, 22:41
#4
Re: ScalaScriptEngine : A new library to dynamically compile &
On 29/12/11 21:01, Doug Tangren wrote:
>
> Let's say I defined a trait that would function as the interface for a
> plugin in my app. It would be neat to have a "drop in" directory for
> sources of instances of this trait. It sounds like I could use your
> library do do something of the sort. Does that make sense?
>
Hi, yes, correct. I.e. in the examples
http://code.google.com/p/scalascriptengine/source/browse/#svn%2Ftrunk%2F...
the TryMeTrait is compiled statically. But the dynamically
compiled/loaded classes extend TryMeTrait, hence bridging with the
statically compiled code.
Hope it makes sense.
Cheers,
Kostas
Thu, 2011-12-29, 23:11
#5
Re: ScalaScriptEngine : A new library to dynamically compile &
On Thu, Dec 29, 2011 at 4:38 PM, Konstantinos Kougios <kostas.kougios@googlemail.com> wrote:
On 29/12/11 21:01, Doug Tangren wrote:
Hi, yes, correct. I.e. in the examples
Let's say I defined a trait that would function as the interface for a plugin in my app. It would be neat to have a "drop in" directory for sources of instances of this trait. It sounds like I could use your library do do something of the sort. Does that make sense?
http://code.google.com/p/scalascriptengine/source/browse/#svn%2Ftrunk%2Fscalascriptengine%2Fsrc%2Ftest%2Fscala%2Fexamples
the TryMeTrait is compiled statically. But the dynamically compiled/loaded classes extend TryMeTrait, hence bridging with the statically compiled code.
Hope it makes sense.
Cool. Ill try that out this weekend. Thanks for posting.
Mon, 2012-01-02, 11:21
#6
Re: ScalaScriptEngine : A new library to dynamically compile & l
On 29/12/2011 20:12, Doug Tangren wrote:
> Whoa cool! It there any chance of moving this project to github where it can more easily
> be watched?
Given that Kostas seems to use SVN, I doubt it...
GitHub isn't the only OSS repository anyway, why want to centralize everything there? What
is wrong with GoogleCode and SourceForge (and others)?
What do you mean by "more easily watched"? This is a genuine question, I browse GitHub
looking for projects, but I am not familiar with all its features.
Mon, 2012-01-02, 12:21
#7
Re: Re: ScalaScriptEngine : A new library to dynamically compil
On Mon, Jan 2, 2012 at 11:15 AM, Philippe Lhoste wrote:
> On 29/12/2011 20:12, Doug Tangren wrote:
>>
>> Whoa cool! It there any chance of moving this project to github where it
>> can more easily
>> be watched?
>
>
> Given that Kostas seems to use SVN, I doubt it...
> GitHub isn't the only OSS repository anyway, why want to centralize
> everything there? What is wrong with GoogleCode and SourceForge (and
> others)?
> What do you mean by "more easily watched"? This is a genuine question, I
> browse GitHub looking for projects, but I am not familiar with all its
> features.
>
Honestly I share this sentiment, I don't see a difference in watching
vs starring, both provide information in a single spot. Unless I've
not found it yet googlecode also allows rss feeds to updates so you
don't have to visit the webpage.
That said, I've noticed after 3-4 years of working on Scales (2 on
Scales Xml) that comparatively few discovered the project despite it
being mentioned for the majority of that time on scala-lang. I have
had over the course of that time 11 starring users, over the course of
the last 3 days (at new years no less) I have been watched 7 times
just by putting my project there (and announcing it might not have
hurt ^_^).
I'm personally very interested in the pull requests, code review
opportunities, easy forking and small one off fork and fixes from
github. That allows developers to contribute far more easily - the
barriers are simply lowered, working on Ensime convinced me of that.
The move to git is less a factor of github (as googlecode does that
too), and was a far simpler decision (I work offline a lot).
The mass of developers and projects on github does speak volumes about
how easy it is to collaborate with it. The only git negative is
remembering to stage first and not just commit :-)
All of this is verging on debate though, so I'd suggest any further
emails go there.
Mon, 2012-01-02, 15:41
#8
Re: Re: ScalaScriptEngine : A new library to dynamically compil
On Mon, Jan 2, 2012 at 6:12 AM, Chris Twiner <chris.twiner@gmail.com> wrote:
On Mon, Jan 2, 2012 at 11:15 AM, Philippe Lhoste <PhiLho@gmx.net> wrote:
> On 29/12/2011 20:12, Doug Tangren wrote:
>>
>> Whoa cool! It there any chance of moving this project to github where it
>> can more easily
>> be watched?
>
>
> Given that Kostas seems to use SVN, I doubt it...
> GitHub isn't the only OSS repository anyway, why want to centralize
> everything there? What is wrong with GoogleCode and SourceForge (and
> others)?
> What do you mean by "more easily watched"? This is a genuine question, I
> browse GitHub looking for projects, but I am not familiar with all its
> features.
>
Honestly I share this sentiment, I don't see a difference in watching
vs starring, both provide information in a single spot. Unless I've
not found it yet googlecode also allows rss feeds to updates so you
don't have to visit the webpage.
That said, I've noticed after 3-4 years of working on Scales (2 on
Scales Xml) that comparatively few discovered the project despite it
being mentioned for the majority of that time on scala-lang. I have
had over the course of that time 11 starring users, over the course of
the last 3 days (at new years no less) I have been watched 7 times
just by putting my project there (and announcing it might not have
hurt ^_^).
I'm personally very interested in the pull requests, code review
opportunities, easy forking and small one off fork and fixes from
github. That allows developers to contribute far more easily - the
barriers are simply lowered, working on Ensime convinced me of that.
The move to git is less a factor of github (as googlecode does that
too), and was a far simpler decision (I work offline a lot).
The mass of developers and projects on github does speak volumes about
how easy it is to collaborate with it. The only git negative is
remembering to stage first and not just commit :-)
All of this is verging on debate though, so I'd suggest any further
emails go there.
tbh, git has been a game-changer for me. Github is just icing on the cake. It's not really worth debating the merits of git it self, you can do that off the list [1].
Github brings easy code collaboration to the table with a huge emphasis on easy. And I'm not talking about just starring a repository. I'm talking about inline editing, forking, pull requests, code review, gh's issue tracker, and a probably the best online source code browser. I almost prefer browse gh repos online to cloning and acking through code locally.
As as playing the numbers game, a large number of watchers doesn't mean that much to me. I actually tend to like prefer libraries that aren't as often in the spot light. But if you do like numbers, github does that well too [2]
Codecode seems to be an iceage in terms innovating what they do. Github on otherhand is innovating all the time [3].
Due to the nature of gits distributed module its also easier for projects to live on through forks when the original maintainer steps down. Googlecode (and sourceforge) can sometimes seem like a code graveyard in that respect.
For me, it's picking github is an easy sell in almost all aspects, which is why I asked.
[1]: http://whygitisbetterthanx.com/
[2]: https://github.com/languages/Scala
[3]: https://github.com/blog/broadcasts
On Thu, Dec 29, 2011 at 1:51 PM, Kostas Kougios <kostas.kougios@googlemail.com> wrote:
Whoa cool! It there any chance of moving this project to github where it can more easily be watched?
I think I can actually use something like this for plugins in a project I'm working on. Is there any chance of loading all instances of a type in a given directory?
Very cool Kostas.