Hacker News new | past | comments | ask | show | jobs | submit login
Mond – A scripting language for C# .NET/Mono (github.com/rohansi)
39 points by farmatyr on Dec 21, 2014 | hide | past | favorite | 17 comments



I've been poking aimlessly around at the code and the wiki and I can't seem to find an answer to the question "why?". What's it trying to do/be?

The inclusion of a virtual machine (to be run on top of the CLR) was somewhat of a surprise to me, I had expected it would use the CodeDOM.


CodeDOM doesn't work everywhere. In particular, you're gonna have a rough time porting to iOS (so it's not a viable solution for cross-platform game scripting, say).

For a long time I was one of very few people who ran into the problems this solves, so I'm sympathetic. As I posted in my other comment, though, I think Jint does a better job of solving this problem in the way Mond does.


I wasn't really satisfied with the existing scripting libraries available for C#, many just bind to a native implementation or have terrible interfaces. I wanted something easy to use that would work (almost) everywhere without any hassle, even if it means performance suffers.



I'm always a bit skeptical of the libraries that generate IL. One of the biggest reasons I consider scripting is to support hot swapping, but the CLR doesn't do a good job with that.

I have used CS-Script before and it's decent. The assemblies it generates are eligible for garbage collection (if you use CSScript.Evaluator) but it also has annoying limitations. Everything must be defined before it's used and must be in one file.


ScriptCS/Roslyn?


There's a good use case for a system like this, allowing scripting to be used on platforms without Reflection.Emit (like iOS). But I'm not seeing anything differentiating about this particular project. Is there a reason to use this over Jint[1] or Script#[2]?

(I personally use my own gizmo called Exor[3], which does runtime compiling on desktop platforms and allows me to embed script assets at compile-time for platforms without Reflection.Emit. YM, of course, MV.)

[1] - https://github.com/sebastienros/jint

[2] - https://github.com/nikhilk/scriptsharp

[3] - https://github.com/eropple/Exor


Jint is nice but it's really slow. Script# looks like it only compiles C# to JS, not really relevant here.

Exor looks interesting but the CLR doesn't handle assembly reloading very well. You either have to use AppDomains or dynamic assemblies (which can be GC'd but have limitations IIRC) to clean up old assemblies.


Jint is pokey, but fast enough for most use cases. I went away from it mostly out of a desire to enforce contracts and static typing. I personally use Exor as a one-shot loader when the game using it starts, so yeah, you'd have to get cute with AppDomains if you're worried about reloading. (Last I checked, Mono didn't really support AppDomains and about 50% of my development is on a Mac, so I didn't really care).


Regarding Script# - I got the wrong project, I always mix these two up and I was posting from my phone. I meant SSharp, which used to be called Script.NET, see...

https://github.com/PetroProtsyk/SSharp


Maybe the creator of this software isn't aware, but in some regions the word "mond" is slang for the mons pubis: https://en.wikipedia.org/wiki/Mons_pubis


It's also the German word for "moon". I was expecting yet another Lua derivative.


m.o.n.d. that spells deaf and dumb


NSFW link. Although it is an informative Wikipedia article, it has a picture of a woman's genitalia.


Where? I was curious to see how oblivious the creator of Mond had been, but my google-fu leaves me with absolutely nothing that connects "mond" to somewhat private anatomy parts.


I've heard it used mostly while in the UK. I did hear it used once while in Arkansas, though.


What advantages does this have over PowerShell?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: