Dear All,
are there any advices about hosting DLR under ASP.NET for scripting? (not
for views!)?
Where hosting ScriptingRuntime, ScriptingEngine?
As static variables in Global.asax? In Application?
Where hosting ScriptingScope? In Session? Destroy and reistantiate at each
call?
I have to develop
What do you want to achieve?
Do you want to display pages written in Ruby, call Ruby functions, something
else?
Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed |
Sela Technology Center
Blog: http://IronShay.com | Twit
The best is to host the scriptingruntime in global.asax
A script scope is something that you can think of as a unit of runnable
script (1 or more files) so in a web scenario I'd say that a scriptscope is
scoped to a request.
For IronRubyMVC it works like this:
Global.asax initializes the ruby eng
There you go:
http://github.com/casualjim/ironrubymvc
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
GSM: +32.486.787.582
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
On Tue, Feb 2, 2010
Recreating them on each call is OK for really simple script usages, since
multiple requests of an ASP.NET app run in the same CLR instance, and the
result of ScriptRuntime.GetEngine("langName") is cached, so the app will only
incur a performance hit (because of the language's assemblies JITing)
>> If you index System.Collections.Generic.List by a fixnum instead of a
class/module you’ll get the generic definition of arity 1
Nice! I had no idea that feature existed
___
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/m
That's fantastic, Tomas, thanks! Is there any way to pass a block, lambda,
or Proc into the slot for the delegate, or perhaps a way to create a .NET
delegate (or Expression) from a block, lambda, or Proc?
Thanks,
Ryan Riley
Email: ryan.ri...@panesofglass.org
LinkedIn: http://www.linkedin.com/in/
just pass your block to the constructor of a delegate and you should be good
to go
Action.new { more_work_here }
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manni