Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 [2] 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: compared languages, Basic beats many?< Next Oldest | Next Newest >
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: July 11 2007,16:54 QUOTE

There are always trade-offs between language choices, so, as the cliche says, it's always about what is the right tool for the particular job.

Sometimes it's better to take a little size and performance hit in order to have the conveniences afforded by higher level languages, or just a language that you know well.   I mean, if you want everything tiny and ultrafast, just write it it Assembly language!  Can't get any smaller, faster, or more difficult than that, short of writing in binary.

Some languages that appear to be 'interpreted' are actually compiled during run time - Perl for example, is compiled into byte code when you run it, and run on  a virtual machine.   Which is why you're not supposed to call a Perl program a 'script' (it isn't).  It's also possible to turn Perl directly into C binaries.  And is the strict sense of the word, all languages are 'interpreted' at some level.

Mikshaw: that gtk-server thing sounds interesting.
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: July 11 2007,17:05 QUOTE

Not to mention tcc can interpret C..

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: July 11 2007,17:28 QUOTE

curaga: sure... but not to point out the obvious, that chart that you pointed out lists freebasic, which is not interpreted.

Good points, WDef.  I suppose it's similar to Java.  I do not know much about Perl, but I have always heard of its source being called "scripts" -- seems like for historical reasons or whatnot.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: July 11 2007,21:49 QUOTE

Quote
produces smaller executables/binaries/scripts
This I have much trouble believing.  One of the benefits of using an interpreted language is that much of the code that would normally be compiled with your program is already compiled into the interpreter, so scripts can be _much_ smaller than compiled apps that do the same thing.

Quote
I didn't know of GTK-server, it seems great. Why was lua chosen over bash & it?
Lua is a much simpler language. I haven't actually tried GTK-server yet, but from looking through the docs and examples, it seems terribly complicated in comparison to creating murgaLua scripts. I'm sure there is probably a significant difference in runtime performance as well, but that's just an assumption.

I'm also not sure about the "tiny" part. I was going by the size of the source package, which is approximately the same as the compiled murgaLua binary. For all I know, it may suck up a huge amount of code from Gtk

GTK-server website: http://www.gtk-server.org/


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: July 12 2007,10:38 QUOTE

Quote
but I have always heard of its source being called "scripts"

People do use the term - some Perl heavies get  annoyed about it though - I guess they feel it demotes Perl.

Larry Wall himself says he doesn't care, but that "a script is what you give the actors. A program is what you give the audience." That's not meant to make sense, he's famous for his wise cracks.

From Perlfaq1:

Quote
Perl programs are (usually) neither strictly compiled nor strictly interpreted. They can be compiled to a byte-code form (something of a Perl virtual machine) or to completely different languages, like C or assembly language. You can't tell just by looking at it whether the source is destined for a pure interpreter, a parse-tree interpreter, a byte-code interpreter, or a native-code compiler, so it's hard to give a definitive answer here.

Now that "script" and "scripting" are terms that have been seized by unscrupulous or unknowing marketeers for their own nefarious purposes, they have begun to take on strange and often pejorative meanings, like "non serious" or "not real programming". Consequently, some Perl programmers prefer to avoid them altogether.



Actually the way Perl runs depends on the particular circumstance - it can run it different ways.  I don't fully understand this yet, it's there in the Perl docs.
Back to top
Profile PM 
11 replies since July 11 2007,10:10 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 [2] 3 >/
reply to topic new topic new poll
Quick Reply: compared languages

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code