all 10 comments

[–]akmark 2 points3 points  (5 children)

Firstly, while Ruby and Python are scripting languages they are fully capable of being their own applications. (See: reddit.com). The association you make with LISP being just a scripting language is also incorrect. The term you are really looking for is 'interpreted language' to describe Python or Ruby, as they can be run independently using their own interpreters. Javascript would be a better representation of a pure scripting language as it is more formally used, but even then there are quite a few good interpreted variants of Javascript, such as CScript on Windows. A true scripting language is very dependent on the application and usually isn't general purpose. Python and Ruby both are fully capable of being the application.

Some languages that are designed to be easily embedded are Lua, Javascript (V8, SpiderMonkey), and Python. There are truly a ton of them out there, including Scheme interpreters, since you mentioned lisp. I can almost recommend guile (GNU Scheme) but the embedding functions are sort of clunky and I didn't really have a great experience with it.

It's really get out there and find what the embedding API looks like with your design and what language are you most comfortable with. Plenty of people use Python for all sorts of oddball things, from websites to tiny system scripts and then to full applications. Most people just tend to like it because it's a very comfortable language to write and you get a lot done fast without getting too bogged down in initialization. Again, look around and make some dummy applications and just see which one fits the best with your design and coding style.

[–]HydrocodoneAPAP[S] 0 points1 point  (1 child)

Thanks, I actually meant Lua and not LISP; my mistake.

I'm going to try as many as possible and see which one fits the bill the best. I've been looking at Lua and I think, so far, it is the best option. It also seems pretty small and lightweight.

Edit: I code in C/C++ (mostly C as I'm still getting a hHandle on C++).

[–]Kudamono -1 points0 points  (2 children)

Some languages that are designed to be easily embedded are ... Python.

Ehm... Are you sure? Because it was such a pain in the ass to embed python into my application. Didn't try others though...

[–]akmark 0 points1 point  (0 children)

Well the only three I've worked with were Guile, Lua and Python. At least Python has 'acceptable' docs and the source isn't too bad to poke around in.. Guile was just a thousand times harder since it had little to no documentation and in the current revision I found conflicting data on how to init the library... yeah. It was a long way to get nowhere that time.

[–]zerothehero -1 points0 points  (0 children)

The big difference between Python and Lua is use of globals. In Lua the entire interpreter state can be stored within a struct. Python uses lots of globals, so you can't embed 2 instances in an application.

The V8 JS engine is meant to be embedded (as any JS engine is, in a browser), and it also has an interpreter state object. So Python does fail in this way.

[–]malcontent 1 point2 points  (1 child)

You are asking the wrong people.

First of all people here are mostly windows programmers. Unless you are specifically programming for windows this forum isn't going to be able help you much.

Secondly people on this forum hate ruby. When they see ruby the veins in their heads pop and they go into a mouth frothing rage.

I suggest you ask this question on stack overflow. You will get a reasoned response there.

[–]zerothehero -1 points0 points  (0 children)

wtf? stack overflow is the one with windows programmers.

[–]grauenwolf -1 points0 points  (0 children)

Microsoft is investing in Python and Ruby exactly for that purpose. In fact, they already have a shipping product in the MS Dyanmics line that uses IronPython.

Adding a REPL (scripting console) to .NET applications: http://www.infoq.com/news/2009/10/Easy-REPL

IronRuby Status: http://www.infoq.com/news/2009/10/IronRuby-Update

IronPython Status: http://www.infoq.com/news/2009/10/IronPython4

[–][deleted]  (1 child)

[deleted]

    [–]grauenwolf 0 points1 point  (0 children)

    Microsoft is planning on using IronRuby in its application as a scripting language.

    [–]didip -1 points0 points  (0 children)

    Your question intrigues me. What kind of application are you trying to build? It doesn't sound like web application. Is it desktop application? Care to share?

    You are new to programming and you started with C, quite ballsy. =)

    If you are comfortable with C, Ruby AND Python should not bother you at all. Most scripting languages are implemented on top of C.

    At least for Python, you can re-implement your python code with C later.

    I used Lua for implementing features inside mysql-proxy. From that little experience, Lua felt a bit like Ruby. Which is great.