Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > The end of C-like script languages - C script with TCC

Reply
Thread Tools

The end of C-like script languages - C script with TCC

 
 
lovecreatesbeauty
Guest
Posts: n/a
 
      05-20-2011
On French genius' TCC page: TCC can also be used to make C scripts,
i.e. pieces of C source that you run as a Perl or Python script.
Compilation is so fast that your script will be as fast as if it was
an executable.

I'll try TCC and use C to replace PHP for web scripting, and Perl for
shell script. No need to bear with all the strange, unneeded and
different syntaxes in Php and Perl. What do you see?
 
Reply With Quote
 
 
 
 
Tom St Denis
Guest
Posts: n/a
 
      05-20-2011
On May 20, 3:50*am, lovecreatesbeauty <(E-Mail Removed)>
wrote:
> On French genius' TCC page: TCC can also be used to make C scripts,
> i.e. pieces of C source that you run as a Perl or Python script.
> Compilation is so fast that your script will be as fast as if it was
> an executable.
>
> I'll try TCC and use C to replace PHP for web scripting, and Perl for
> shell script. No need to bear with all the strange, unneeded and
> different syntaxes in Php and Perl. What do you see?


Unless they added string handling ala perl it ain't replacing squat.

Tom
 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      05-20-2011
lovecreatesbeauty <(E-Mail Removed)> writes:

> On French genius' TCC page: TCC can also be used to make C scripts,
> i.e. pieces of C source that you run as a Perl or Python script.
> Compilation is so fast that your script will be as fast as if it was
> an executable.
>
> I'll try TCC and use C to replace PHP for web scripting, and Perl for
> shell script. No need to bear with all the strange, unneeded and
> different syntaxes in Php and Perl. What do you see?


I see much wailing and gnashing of teeth. Why replace a language
designed for the job with one designed for quite another?

--
Ben.
 
Reply With Quote
 
Malcolm McLean
Guest
Posts: n/a
 
      05-20-2011
On May 20, 2:36*pm, Ben Bacarisse <(E-Mail Removed)> wrote:
>
> I see much wailing and gnashing of teeth. *Why replace a language
> designed for the job with one designed for quite another?
>

Because everyone who did any serious programming in the past 20 years
can knock up a small script in C. With perl, I find myself scratching
about in the manual for quite simple operations. like sorting a list
of strings by suffix.



 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      05-20-2011
Malcolm McLean <(E-Mail Removed)> writes:

> On May 20, 2:36*pm, Ben Bacarisse <(E-Mail Removed)> wrote:
>>
>> I see much wailing and gnashing of teeth. *Why replace a language
>> designed for the job with one designed for quite another?
>>

> Because everyone who did any serious programming in the past 20 years
> can knock up a small script in C.


I can't refute that though I know at least two people who have done
serious programming very recently and who would not be able to write any
C. Did you mean "for the past 20 years" rather than "in the past 20
years"? Anyway, currently this is just another fact that's been stated
before which we are expected submit (or spend time researching
ourselves).

> With perl, I find myself scratching
> about in the manual for quite simple operations. like sorting a list
> of strings by suffix.


I don't see what I am expected to take from this. Do you mean that you
don't know Perl well enough to know how suitable it is for the job? Or
maybe you mean that, since you know C, and everything can eventually be
written in C, that there is no point in knowing any other language?

If all you mean is that you don't currently have the time or the
inclination to learn Perl, that's fine, but it is not much of an
argument in favour of C as scripting language.

--
Ben.
 
Reply With Quote
 
Rui Maciel
Guest
Posts: n/a
 
      05-20-2011
Malcolm McLean wrote:

> Because everyone who did any serious programming in the past 20 years
> can knock up a small script in C. With perl, I find myself scratching
> about in the manual for quite simple operations. like sorting a list
> of strings by suffix.


In the scripting world, perl isn't exactly the only choice. In fact, I'm
not aware of a single instance of perl being used as an embedded scripting
language. As Python and Lua are extensively used and even designed for
that purpose, they tend to be better comparissons.

Considering this, I don't believe that a programmer with over 20 years of
experience developing software will have any trouble hacking up simple
Python/Lua scripts.


Rui Maciel
 
Reply With Quote
 
Rui Maciel
Guest
Posts: n/a
 
      05-20-2011
lovecreatesbeauty wrote:

> On French genius' TCC page: TCC can also be used to make C scripts,
> i.e. pieces of C source that you run as a Perl or Python script.
> Compilation is so fast that your script will be as fast as if it was
> an executable.
>
> I'll try TCC and use C to replace PHP for web scripting, and Perl for
> shell script. No need to bear with all the strange, unneeded and
> different syntaxes in Php and Perl. What do you see?


Are you a developer for this TCC thing?


Rui Maciel
 
Reply With Quote
 
Stefan Ram
Guest
Posts: n/a
 
      05-20-2011
Malcolm McLean <(E-Mail Removed)> writes:
>like sorting a list of strings by suffix.


I do not know Perl that well, but was able to construct a
solution using results of a web search engine in a few minutes:

#!/usr/bin/perl
#perl 5.8.3

use strict;
use warnings;

sub suffix( $ ){ substr $_[ 0 ], -3; }

print sort{ suffix( $a )cmp suffix( $b )}
qw( alpha.bat gamma.exe beta.bat );

I guess, it cannot become much shorter or more readable
when implemented in C.

 
Reply With Quote
 
lovecreatesbeauty
Guest
Posts: n/a
 
      05-20-2011
On May 20, 9:19*am, Rui Maciel <(E-Mail Removed)> wrote:
> lovecreatesbeauty wrote:
> > On French genius' TCC page: TCC can also be used to make C scripts,
> > i.e. pieces of C source that you run as a Perl or Python script.
> > Compilation is so fast that your script will be as fast as if it was
> > an executable.

>
> > I'll try TCC and use C to replace PHP for web scripting, and Perl for
> > shell script. No need to bear with all the strange, unneeded and
> > different syntaxes in Php and Perl. What do you see?

>
> Are you a developer for this TCC thing?


No. I just became days agao a reader of Mr Bellard's site: bellard.org
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      05-20-2011
Rui Maciel <(E-Mail Removed)> writes:

> Malcolm McLean wrote:
>
>> Because everyone who did any serious programming in the past 20 years
>> can knock up a small script in C.

<snip>

> ... I don't believe that a programmer with over 20 years of
> experience developing software will have any trouble hacking up simple
> Python/Lua scripts.


Is the use of 20 a coincidence? If you were trying to turn Malcolm
McLean's claim around, then I'll point out that he said "*in* the last 20
years" not "*for* the last 20 years".

--
Ben.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web programming in C lang with TCC lovecreatesbeauty C Programming 79 06-27-2011 09:39 PM
Tcc won't link libraries. Malcolm McLean C Programming 3 06-19-2011 10:42 PM
how can i compile c program on dos prompt using tcc and tc juned2285@gmail.com C++ 1 08-04-2008 10:13 AM
looking for compiled tcc for win32 gregory.petrosyan@gmail.com C Programming 3 04-19-2006 02:11 AM
What is .tcc? jsnX C++ 1 04-04-2005 11:51 PM



Advertisments