|
|
Home » Developing U++ » U++ Developers corner » FEAT: Tcl as a plugin
FEAT: Tcl as a plugin [message #31029] |
Tue, 01 February 2011 20:40  |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
hi guys
stumbeling over the need of a scripting language execution environment, i tried to analyze Esc a bit, not too far. and while it's native Upp, it seems to be quite slow, as mirek stated in some post, due to data model which is geniously simple but...
so why not offering another possib?
Tcl..
licence is BSD, best fit 
there is even a c++ stuff available
http://cpptcl.sourceforge.net/
which as is total free license too.
unfotunately it depends on boost.
but, if anyone has got some experience..
that might be a good shot to have it in plugin.
imaginable, that the c++ wrapping needs a refactoring to get rid of boost, since Upp offers good stuff too.
|
|
|
Re: FEAT: Tcl as a plugin [message #31030 is a reply to message #31029] |
Tue, 01 February 2011 22:02   |
|
Hi,
Did you see the Tcc package in bazaar? It allows to compile a c program in memory (very fast) and run them right away. Also it is possible to call functions from your c++ code, so it can be nicely used instead of scripting.
Of course, if you feel like creating Tcl plugin, you can Having a more choices is always good...
Best regards,
Honza
|
|
|
Re: FEAT: Tcl as a plugin [message #31036 is a reply to message #31030] |
Wed, 02 February 2011 08:42   |
|
dolik.rce wrote on Tue, 01 February 2011 23:02 | Hi,
Did you see the Tcc package in bazaar? It allows to compile a c program in memory (very fast) and run them right away. Also it is possible to call functions from your c++ code, so it can be nicely used instead of scripting.
Of course, if you feel like creating Tcl plugin, you can Having a more choices is always good...
Best regards,
Honza
|
Did you compared with v8 JavaScript from google?
I'm interested what is the best.
Thank you in advance.
|
|
|
|
Re: FEAT: Tcl as a plugin [message #31040 is a reply to message #31037] |
Wed, 02 February 2011 09:51   |
oan1971
Messages: 7 Registered: April 2010
|
Promising Member |
|
|
Hi,
quite a long time ago I had to use Tcl at work. The only thing I remember about it is that I deliberately decided to erase every memory of it from my mind .
I am using python at work now and think it is very good. Its license should be OK. The Python web site states:
Quote: | The Python implementation is under an open source license that makes it freely usable and distributable, even for commercial use. The Python license is administered by the Python Software Foundation.
|
Best regards,
Oliver
910eb20c14e026a87ffb2b0d38b9ddb7
[Updated on: Wed, 02 February 2011 11:14] Report message to a moderator
|
|
|
Re: FEAT: Tcl as a plugin [message #31041 is a reply to message #31040] |
Wed, 02 February 2011 09:59   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
http://en.wikipedia.org/wiki/Python_(programming_language)
see programming philosophy
sounds quite good, dynamic typing, multi paradigm, highly extensible, small core with lots of extensions, highly readable code, late binding..
though it seems to be slower than V8, but more extensible..
i vote for Python too.., or JS V8
Tcl seems out of race 
EDIT: as of JS V8, it *precompiles* the things, which is faster, but ofcorse doesnt offer the degree of dynamics later in an application. but Esc is kind of 'precompiling' as well.
my goal is to have python console in my application, so to speak, a gui app, where one can access, define and modify the parameters and properties of the elements / controls at runtime..
[Updated on: Wed, 02 February 2011 10:03] Report message to a moderator
|
|
|
|
Re: FEAT: Tcl as a plugin [message #31044 is a reply to message #31041] |
Wed, 02 February 2011 10:21   |
chickenk
Messages: 171 Registered: May 2007 Location: Grenoble, France
|
Experienced Member |
|
|
Well if we go that way and want to find a scripting language to embed, I'm gonna give my 2 cents.
I personally love ruby and I know it's easy to embed, the C API is very clean. I also start to like python, but I don't know whether it's easy to embed or not.
But definitely, I would recommend lua.
This is THE scripting language totally designed to be embedded, and it is very powerful and most importantly, extremely fast. Try googling for luaJIT.
Besides, here is a comparison website that is really useful. I tried to put in the chart some elements of comparison (sorry, Tcl is not in the list):
http://shootout.alioth.debian.org/u32/which-programming-lang uages-are-fastest.php?gpp=on&luajit=on&v8=on&lua =on&python=on&yarv=on&calc=chart
This one is also interesting, where all languages are given a weight 2 for speed and weight 1 for size in memory (you can change these weights to your liking, depending on what you expect). In this chart, we can see LuaJIT is the first non-compiled language (well ok, it's compiled by the JIT engine but in realtime) in 8th position.
http://shootout.alioth.debian.org/u32/which-language-is-best .php?calc=calculate&xfullcpu=2&xmem=1&xloc=0& ;amp ;nbody=1&fannkuchredux=1&meteor=0&fasta=1&sp ectralnorm=1&revcomp=1&mandelbrot=1&knucleotide= 1®exdna=1&pidigits=1&chameneosredux=0&thr eadring=0&binarytrees=1
Really, lua is an easy language, easy to embed, very light on memory and really fast even without the JIT. Please do have a look at it.
Lionel
[Updated on: Wed, 02 February 2011 10:23] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 27 01:34:04 CEST 2025
Total time taken to generate the page: 0.02059 seconds
|
|
|