Re: C interpreter in Lisp/scheme/python

2010-07-24 Thread francogrex
In article icqj46lnoaqkdr5igvqi9so62i30cac...@4ax.com, gneun...@comcast.net 
says...
I don't think it's accurate to say that [some] experts really scorn
newbies, but I do agree that newbies are occasionally mistreated.  

One thing newbies have to realize is that on Usenet you are quite
likely to be talking to people who were there at the beginning and, of
necessity, are largely self educated in whatever the subject matter
might be.  Many - I'd even say most - are happy to clarify
understanding and help with complicated problems, but there is a
general expectation that newbies have some basic research skills and
that they have tried to solve their problem before asking for help.

Unfortunately, there is a small percentage of people who think Usenet
and other online forums are for answering homework questions or for
digging out of a jam at work.  Getting help depends a lot on how the
question is asked: strident pleas for quick help or demands for an
answer are immediate red flags, but so are questions that begin with
X is crap, why can't I do ... and even seemingly polite questions
that are vague or unfocused (possibly indicating little or no thought
behind them) or posts which are directed to a large number of groups
(such as this thread we're in now).  

And, of course, in the language forums, drawing comparisons to
non-subject languages is generally considered rude except when done to
illustrate a relevant discussion point.  Introducing irrelevant
comparisons, deliberately proselytizing X in a Y group or doing a lot
of complaining about the subject language is bound to attract disdain.

As the Internet has grown, the absolute number of people in that
small percentage has grown as well.  A newbie can simply be unlucky
enough to ask a question at the wrong time.  If there has been a
recent rash of problem posts then experts may accidentally respond
negatively to a legitimate question.

Of course, there are cross-cultural issues too.  Many of the technical
groups are English-language.  English, even when polite, can seem
harsh and/or abrupt to non-native speakers.

On the whole, moderated groups are more conducive to helping newbies
because the moderator(s) filter obvious red flag posts.

And, finally, newbies themselves should realize that experts are
donating time to answer questions and do get frustrated answering the
same questions over and over.  They should not be offended by cold
responses that direct them to FAQs or that just give links to study
material.  Newbies who need hand-holding or warm welcoming responses
filled with detail should go find a tutor.


 ... you have the bad professors who are freaks 
(probably they have a lot of problems at home, their wives 
screwing all the males on the block, daughters drug addicts etc) 
and want to take their hatred out on you,

Unquestionably, there are experts who need their dosages adjusted. But
the same can be said for some percentage of other users too.

OTOH, newbies often aren't in the position to know who is an expert
... obviously, anyone able to correctly answer their question knows
more about that specific issue.  That doesn't necessarily qualify the
responder as an expert.  Some people get defensive at the edges of
their comfort zones.


Just some thoughts. YMMV.
George

Yes I agree, you expressed the thought better than I did. Then let's not go on 
with this thread any further and let the newsgroups carry on programming 
language support and discussions. Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-23 Thread francogrex
In article 16a7e301-2e85-47eb-971e-79acc4e07...@b35g2000yqi.
googlegroups.com, gnuist...@gmail.com says...
This makes some sense. He replied on the newsgroup in a lengthy 
post
that there are sufficient resources out there giving hint that 
no one
need help me out. Then I was called lazy in one email and 
tersely
given JUST the last name of an author who has many books each 
many
100s pages, when I asked for a relevant book, as if i am a 
scholar in
the field, although he did spend lots of words on irrelevant and
unbeneficial things which diminished my enthusiasm. Now, I find 
out
from you that he has/had a business concern or interest in a 
company
that is writing/wrote lisp interpreter in C. Correct me if I am 
making
an error. I dont want to think deprecatingly of any good soul 
but this
is what i experienced.

No, you're not making a bad judgement. He's not the only one who 
treats newcomers with disrespect and scorn. Unfortunately many 
so-called experts in the field look down on newbies and mistreat 
them (in any programming language forum), forgetting in the 
process that they were also at a certain time newbies until 
someone gentle and nice enough teachers took the trouble to 
educate them. On the other hand there are less neurotic experts 
out there who are glad to help out someone learning. It's like in 
some universities, you have the bad professors who are freaks 
(probably they have a lot of problems at home, their wives 
screwing all the males on the block, daughters drug addicts etc) 
and want to take their hatred out on you, and you have the 
good and mentally stable professors who actually deserve their 
title.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-23 Thread George Neuner
On Fri, 23 Jul 2010 15:10:16 +0200, francogrex fra...@grex.org
wrote:

Unfortunately many so-called experts in the field look down 
on newbies and mistreat them (in any programming language forum),
forgetting in the process that they were also at a certain time
newbies until some gentle and nice enough teachers took the 
trouble to educate them. 

I don't think it's accurate to say that [some] experts really scorn
newbies, but I do agree that newbies are occasionally mistreated.  

One thing newbies have to realize is that on Usenet you are quite
likely to be talking to people who were there at the beginning and, of
necessity, are largely self educated in whatever the subject matter
might be.  Many - I'd even say most - are happy to clarify
understanding and help with complicated problems, but there is a
general expectation that newbies have some basic research skills and
that they have tried to solve their problem before asking for help.

Unfortunately, there is a small percentage of people who think Usenet
and other online forums are for answering homework questions or for
digging out of a jam at work.  Getting help depends a lot on how the
question is asked: strident pleas for quick help or demands for an
answer are immediate red flags, but so are questions that begin with
X is crap, why can't I do ... and even seemingly polite questions
that are vague or unfocused (possibly indicating little or no thought
behind them) or posts which are directed to a large number of groups
(such as this thread we're in now).  

And, of course, in the language forums, drawing comparisons to
non-subject languages is generally considered rude except when done to
illustrate a relevant discussion point.  Introducing irrelevant
comparisons, deliberately proselytizing X in a Y group or doing a lot
of complaining about the subject language is bound to attract disdain.

As the Internet has grown, the absolute number of people in that
small percentage has grown as well.  A newbie can simply be unlucky
enough to ask a question at the wrong time.  If there has been a
recent rash of problem posts then experts may accidentally respond
negatively to a legitimate question.

Of course, there are cross-cultural issues too.  Many of the technical
groups are English-language.  English, even when polite, can seem
harsh and/or abrupt to non-native speakers.

On the whole, moderated groups are more conducive to helping newbies
because the moderator(s) filter obvious red flag posts.

And, finally, newbies themselves should realize that experts are
donating time to answer questions and do get frustrated answering the
same questions over and over.  They should not be offended by cold
responses that direct them to FAQs or that just give links to study
material.  Newbies who need hand-holding or warm welcoming responses
filled with detail should go find a tutor.


 ... you have the bad professors who are freaks 
(probably they have a lot of problems at home, their wives 
screwing all the males on the block, daughters drug addicts etc) 
and want to take their hatred out on you,

Unquestionably, there are experts who need their dosages adjusted. But
the same can be said for some percentage of other users too.

OTOH, newbies often aren't in the position to know who is an expert
... obviously, anyone able to correctly answer their question knows
more about that specific issue.  That doesn't necessarily qualify the
responder as an expert.  Some people get defensive at the edges of
their comfort zones.


Just some thoughts. YMMV.
George
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-15 Thread Ian Kelly
On Wed, Jul 14, 2010 at 11:17 PM, bolega gnuist...@gmail.com wrote:
 This makes some sense. He replied on the newsgroup in a lengthy post
 that there are sufficient resources out there giving hint that no one
 need help me out.

I have no record of such a post.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-15 Thread Seebs
On 2010-07-15, bolega gnuist...@gmail.com wrote:
 This makes some sense. He replied on the newsgroup in a lengthy post
 that there are sufficient resources out there giving hint that no one
 need help me out. Then I was called lazy in one email and tersely
 given JUST the last name of an author who has many books each many
 100s pages, when I asked for a relevant book, as if i am a scholar in
 the field, although he did spend lots of words on irrelevant and
 unbeneficial things which diminished my enthusiasm.

If you found those irrelevant and unbeneficial, then while I agree that he
may have been wasting his time, he would have been wasting it even worse
trying to walk you through the technical material when you're clearly
not currently at a stage where you are ready to learn anyway.

 Now, I find out
 from you that he has/had a business concern or interest in a company
 that is writing/wrote lisp interpreter in C. Correct me if I am making
 an error. I dont want to think deprecatingly of any good soul but this
 is what i experienced.

If you are trying to imply that he was acting in some unethical way, you have
further cemented the notion that trying to talk to you is a waste of anyone's
time.  *plonk*

-s
-- 
Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.net
http://www.seebs.net/log/ -- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) -- get educated!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread bolega
On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote:
 Define Macro wrote:
  On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
  I am trying to compare LISP/Scheme/Python for their expressiveness.

  For this, I propose a vanilla C interpreter. I have seen a book which
  writes C interpreter in C.

  The criteria would be the small size and high readability of the code.

  Are there already answers anywhere ?

 Sure.  Lots of texts on compilers provide exercises which, in one way or
 another suggest how to write an interpreter and perhaps a compiler too
 for some language.  Anyone taking a course on compilers is likely to
 have followed such exercises in order to pass the course.  Some
 instructors are enlightened enough to allow students to pick the
 implementation language.

 Ask any such instructor.



Beware, he does not tell the readers the financial details. This is
what he wrote to me by email.

quote
I would be willing to meet with you here in Berkeley to educate you on
these matters at a consulting rate of  $850 per hour, with a minimum
of 8 hours.

RJF
/quote



 I think you will find that many people use a packaged parser-generator
 which eliminates much of the choice-of-language difference. Do you like
 Bison, Yacc, Antlr, or one of the many parser generators in Lisp,
 python, etc.

 My own experience is that in comparing Lisp to C, students end up with
 smaller and better interpreters and compilers, faster.  I don't know
 about python vs C for sure, but I suspect python wins.  As for
 python vs Lisp, I don't know.

 RJF

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread geremy condra
On Tue, Jul 13, 2010 at 11:01 PM, bolega gnuist...@gmail.com wrote:
 On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote:
 Define Macro wrote:
  On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
  I am trying to compare LISP/Scheme/Python for their expressiveness.

  For this, I propose a vanilla C interpreter. I have seen a book which
  writes C interpreter in C.

  The criteria would be the small size and high readability of the code.

  Are there already answers anywhere ?

 Sure.  Lots of texts on compilers provide exercises which, in one way or
 another suggest how to write an interpreter and perhaps a compiler too
 for some language.  Anyone taking a course on compilers is likely to
 have followed such exercises in order to pass the course.  Some
 instructors are enlightened enough to allow students to pick the
 implementation language.

 Ask any such instructor.



 Beware, he does not tell the readers the financial details. This is
 what he wrote to me by email.

 quote
 I would be willing to meet with you here in Berkeley to educate you on
 these matters at a consulting rate of  $850 per hour, with a minimum
 of 8 hours.

 RJF
 /quote

He's Berkeley's former CS chair and was implementing lisp before
common lisp was a twinkle in anybody's eye. His time is valuable.

Geremy Condra
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread Paul Rubin
bolega gnuist...@gmail.com writes:
 I am trying to compare LISP/Scheme/Python for their expressiveness...
 Are there already answers anywhere ?
 How would a gury approach such a project ?

These two articles

http://page.mi.fu-berlin.de/~prechelt/Biblio/jccpprt_computer2000.pdf 
http://www.haskell.org/papers/NSWC/jfp.ps 

about language comparisons (Python is in the first but not the second)
might be of interest.

If you want to know how to implement C, there is a pretty good book by
Hanson and Fraser about LCC, called A Retargetable C Compiler.
Basically a code walkthrough of a small C compiler written in C.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread bolega
On Jul 13, 11:18 pm, geremy condra debat...@gmail.com wrote:
 On Tue, Jul 13, 2010 at 11:01 PM, bolega gnuist...@gmail.com wrote:
  On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote:
  Define Macro wrote:
   On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
   I am trying to compare LISP/Scheme/Python for their expressiveness.

   For this, I propose a vanilla C interpreter. I have seen a book which
   writes C interpreter in C.

   The criteria would be the small size and high readability of the code.

   Are there already answers anywhere ?

  Sure.  Lots of texts on compilers provide exercises which, in one way or
  another suggest how to write an interpreter and perhaps a compiler too
  for some language.  Anyone taking a course on compilers is likely to
  have followed such exercises in order to pass the course.  Some
  instructors are enlightened enough to allow students to pick the
  implementation language.

  Ask any such instructor.

  Beware, he does not tell the readers the financial details. This is
  what he wrote to me by email.

  quote
  I would be willing to meet with you here in Berkeley to educate you on
  these matters at a consulting rate of  $850 per hour, with a minimum
  of 8 hours.

  RJF
  /quote

 He's Berkeley's former CS chair and was implementing lisp before
 common lisp was a twinkle in anybody's eye. His time is valuable.

 Geremy Condra

This makes some sense. He replied on the newsgroup in a lengthy post
that there are sufficient resources out there giving hint that no one
need help me out. Then I was called lazy in one email and tersely
given JUST the last name of an author who has many books each many
100s pages, when I asked for a relevant book, as if i am a scholar in
the field, although he did spend lots of words on irrelevant and
unbeneficial things which diminished my enthusiasm. Now, I find out
from you that he has/had a business concern or interest in a company
that is writing/wrote lisp interpreter in C. Correct me if I am making
an error. I dont want to think deprecatingly of any good soul but this
is what i experienced.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread bolega
On Jul 13, 11:35 pm, Paul Rubin no.em...@nospam.invalid wrote:
 bolega gnuist...@gmail.com writes:
  I am trying to compare LISP/Scheme/Python for their expressiveness...
  Are there already answers anywhere ?
  How would a gury approach such a project ?

 These two articles

    http://page.mi.fu-berlin.de/~prechelt/Biblio/jccpprt_computer2000.pdf
    http://www.haskell.org/papers/NSWC/jfp.ps

 about language comparisons (Python is in the first but not the second)
 might be of interest.

 If you want to know how to implement C, there is a pretty good book by
 Hanson and Fraser about LCC, called A Retargetable C Compiler.
 Basically a code walkthrough of a small C compiler written in C.

I have decided to limit my goal to tyni LISP interpreter in C because
its a smaller and simpler language.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread geremy condra
On Wed, Jul 14, 2010 at 10:17 PM, bolega gnuist...@gmail.com wrote:
 On Jul 13, 11:18 pm, geremy condra debat...@gmail.com wrote:
 On Tue, Jul 13, 2010 at 11:01 PM, bolega gnuist...@gmail.com wrote:
  On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote:
  Define Macro wrote:
   On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
   I am trying to compare LISP/Scheme/Python for their expressiveness.

   For this, I propose a vanilla C interpreter. I have seen a book which
   writes C interpreter in C.

   The criteria would be the small size and high readability of the code.

   Are there already answers anywhere ?

  Sure.  Lots of texts on compilers provide exercises which, in one way or
  another suggest how to write an interpreter and perhaps a compiler too
  for some language.  Anyone taking a course on compilers is likely to
  have followed such exercises in order to pass the course.  Some
  instructors are enlightened enough to allow students to pick the
  implementation language.

  Ask any such instructor.

  Beware, he does not tell the readers the financial details. This is
  what he wrote to me by email.

  quote
  I would be willing to meet with you here in Berkeley to educate you on
  these matters at a consulting rate of  $850 per hour, with a minimum
  of 8 hours.

  RJF
  /quote

 He's Berkeley's former CS chair and was implementing lisp before
 common lisp was a twinkle in anybody's eye. His time is valuable.

 Geremy Condra

 This makes some sense. He replied on the newsgroup in a lengthy post
 that there are sufficient resources out there giving hint that no one
 need help me out.

No one does. Your problem is yours to solve.

 Then I was called lazy in one email and tersely
 given JUST the last name of an author who has many books each many
 100s pages, when I asked for a relevant book, as if i am a scholar in
 the field, although he did spend lots of words on irrelevant and
 unbeneficial things which diminished my enthusiasm.

Yes, you've failed to take advantage of the resources which have been
made available to you, preferring to have other people solve your
problem. Sounds like a pretty good working definition of laziness.

 Now, I find out
 from you that he has/had a business concern or interest in a company
 that is writing/wrote lisp interpreter in C. Correct me if I am making
 an error.

You're making an error. Given that there are probably only a handful
of people on earth more qualified to teach you anything you'd want to
know about this I'd say he's made you an exceptional offer. Expect no
better help elsewhere.

Geremy Condra
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Nick Keighley
On 7 July, 17:38, Rivka Miller rivkaumil...@gmail.com wrote:

 Although C comes with a regex library,

C does not come with a regexp library


 Anyone know what the first initial of L. Peter Deutsch stand for ?

Laurence according to wikipedia (search time 2s)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Nick Keighley
On 8 July, 08:08, Nick Keighley nick_keighley_nos...@hotmail.com
wrote:
 On 7 July, 17:38, Rivka Miller rivkaumil...@gmail.com wrote:


  Anyone know what the first initial of L. Peter Deutsch stand for ?

 Laurence according to wikipedia (search time 2s)

oops! He was born Laurence but changed it legally to L. including
the dot
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Pascal J. Bourguignon
Nick Keighley nick_keighley_nos...@hotmail.com writes:

 On 8 July, 08:08, Nick Keighley nick_keighley_nos...@hotmail.com
 wrote:
 On 7 July, 17:38, Rivka Miller rivkaumil...@gmail.com wrote:


  Anyone know what the first initial of L. Peter Deutsch stand for ?

 Laurence according to wikipedia (search time 2s)

 oops! He was born Laurence but changed it legally to L. including
 the dot

Too bad, Laurence is a nice name.

-- 
__Pascal Bourguignon__ http://www.informatimago.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Mark Tarver
On 14 June, 00:07, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

 Bolega

Probably you want to look at this thread

http://groups.google.co.uk/group/comp.lang.lisp/browse_frm/thread/7b1ab36f5d5cce0a/54afe11153025e27?hl=enlnk=gstq=minim#54afe11153025e27

where I specified a toy language Minim (much simpler than C) and the
goal was to construct an interpreter for it.  Similar problem.

Many solutions were given in different languages.  The thread is very
long.

One thing you might look at is whether some sort of lexer/parser is
supported in any of your targets.  Qi supports a compiler-compiler Qi-
YACC that allows you to write in BNF which makes this kind of project
much easier.

See

http://www.lambdassociates.org/Book/page404.htm

for an overview

Mark

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread George Neuner
On Thu, 08 Jul 2010 10:39:45 +0200, p...@informatimago.com (Pascal J.
Bourguignon) wrote:

Nick Keighley nick_keighley_nos...@hotmail.com writes:
 Nick Keighley nick_keighley_nos...@hotmail.com wrote:
 Rivka Miller rivkaumil...@gmail.com wrote:

 Anyone know what the first initial of L. Peter Deutsch stand for ?

 Laurence according to wikipedia (search time 2s)

 oops! He was born Laurence but changed it legally to L. including
 the dot

Too bad, Laurence is a nice name.

He probably hates the nickname Larry.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-07 Thread Richard Bos
Tim Rentsch t...@alumni.caltech.edu wrote:

 nanothermite911fbibustards nanothermite911fbibusta...@gmail.com
 
  How to make Lisp go faster than C
  Didier Verna
 
 Asking whether Lisp is faster than C is like asking why it's
 colder in the mountains than it is in the summer.

YM warmer.

HTH; HAND.

Richard
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-07 Thread Michele Simionato
On Jun 14, 1:07 am, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

 Bolega

This look like a huge project for an evaluation of expressiveness
which result is obvious. Lisp (including Scheme) is more expressive
than Python, for many definitions of expressiveness (see for instance
http://www.ccs.neu.edu/scheme/pubs/scp91-felleisen.ps.gz if you like
academic papers). However, who cares? What matters in everyday life
are other things, like the availability of libraries, tools, easy of
maintenance, etc.

In your proposed project the choice of the parsing library would
matter a lot. Writing languages is a domain where Lisp is
traditionally strong, so you may find good libraries to help you with
the task. My guess is that it would take more or less the same amount
of effort both in Python and in Lisp. The place where Lisp has an
advantage is writing an *embedded* language: then thanks to macros you
could write a *compiled* sublanguage. Doing the same in Python is
essentially impossible.

  Michele Simionato
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-07 Thread Rivka Miller
On Jun 13, 4:07 pm, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

 Bolega

You should probably narrow down your project to one. For example,
write a LISt Processor Meta Circular Evaluator in C.

You can take Paul Graham's rendition as a start and forget about
garbage collection.

Start with getchar()/putchar() for I/O.

Although C comes with a regex library, you probably do not need a
regex or parser at all for this. This is the beauty of LISP which is
why McCarthy was able to bypass the several man years of effort
involved in FORmula TRANslator. Even as a young boy like L. Peter
Deutsch was able to write it in assembly for one of the PDP's.

You will have go implement an associative array or a symbol-value
table probably as a stack or linked list. You will have to decide how
you implement the trees, as cons cells or some other method. Dynamic
scoping is easy to implement and that is what elisp has. I am not
aware of any book that provides implementation of LISP in C and
explains it at the same time.

This is the extent of help I can provide, someone else can probably
help you more.

Anyone know what the first initial of L. Peter Deutsch stand for ?

Rivka

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-07-07 Thread wolfgang.riedel
On 20 June, 03:48, Tim Rentsch t...@alumni.caltech.edu wrote:
 nanothermite911fbibustards nanothermite911fbibusta...@gmail.com
 writes:


 Asking whether Lisp is faster than C is like asking why it's
 colder in the mountains than it is in the summer.

original Karl Valentin would be colder outside than nighttime
but yours is in his sense.

Wolfgang
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-20 Thread Define Macro
On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

 Bolega

Maybe instead of full C, you should try something simplified, like
Tiny-C (http://primepuzzle.com/tc/) or Arena, or maybe even Pike (some
minimal variant thereof).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-19 Thread Tim Rentsch
nanothermite911fbibustards nanothermite911fbibusta...@gmail.com
writes:

 Probably doesn't meet your intent, but this is a really impressive bit
 of (whacky) art:

 Lisp runs faster than C. Once you get more time away from screwing
 Palestinians, and other false-flags, you will find ideas like these

 How to make Lisp go faster than C
 Didier Verna
 [snip]

Asking whether Lisp is faster than C is like asking why it's
colder in the mountains than it is in the summer.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-14 Thread Albert van der Horst
In article e1aa09cd-3bcd-4e9b-8f4c-e307a1424...@a2g2000prd.googlegroups.com,
bolega  gnuist...@gmail.com wrote:
I am trying to compare LISP/Scheme/Python for their expressiveness.

For this, I propose a vanilla C interpreter. I have seen a book which
writes C interpreter in C.

The criteria would be the small size and high readability of the code.

Are there already answers anywhere ?

How would a gury approach such a project ?

He would have his 10 year LISP sink in, meditate for 10 days and
start from scratch with a typical LISP approach.

He would have his 10 year Algol68 sink in, meditate for 10 days and
start from scratch with a typical Algol68 approach.
(Scheme is not different enough from LISP, to make this interesting.
Hey Scheme *is* a dialect of LISP.)

He would have his 10 year Python sink in, meditate for 10 days and
start from scratch with a typical Python approach.

Maybe he would code one to throw away.

The outcome would be extremely interesting, but ...


Bolega

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
alb...@spearc.xs4all.nl =n http://home.hccnet.nl/a.w.m.van.der.horst

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-14 Thread Bruno Desthuilliers

answering the OP - didn't show up on c.l.py


On Sun, Jun 13, 2010 at 4:07 PM, bolega gnuist...@gmail.com wrote:

I am trying to compare LISP/Scheme/Python for their expressiveness.


Scheme is actually a lisp, isn't it ?


For this, I propose a vanilla C interpreter. I have seen a book which
writes C interpreter in C. 
The criteria would be the small size and high readability of the code.




Readability is partly function of the reader, so I fail to see how you 
define any objective metrics here.


Also, small size and high readability can easily conflict with each 
other. I pretty often rewrite (my own) one-liners to as many lines as 
necessary to make the code more readable / maintainable.



How would a gury approach such a project ?


Can't tell. Maybe you should ask one ?

--
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-14 Thread fortunatus
On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

 Bolega

Holy cow has this gone off topic!  To OP - start writing a C context
free grammar of a subset of C (arithmetic expressions IMHO are the
historical root of C and a good place to start in any case), start
writing a parser of a subset of your subset grammar (in a lisp of your
chioce - Scheme and CL for instance are going to be pretty much
equivalent in this task), and really the rest will be obvious...

I'd go that far before posting on the topic again...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-13 Thread geremy condra
On Sun, Jun 13, 2010 at 4:07 PM, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

Try the programming languages shootout.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

Good luck.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

Try the C language standard.

 How would a gury approach such a project ?

They would probably skip it, recognizing that undertaking this
project with the goal of comparing two languages was fraught
with methodological difficulties and likely to be a complete
waste of time. Assuming that by virtue of a wetware bug they
did decide to take it on, they would probably start by writing the
code and then post their take on the results rather than posting
first and waiting in breathless anticipation for the inevitably
snarky replies of their inferiors.

Geremy Condra
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-13 Thread Vinay

On 2010-06-13 16:07:54 -0700, bolega gnuist...@gmail.com said:


I am trying to compare LISP/Scheme/Python for their expressiveness.

For this, I propose a vanilla C interpreter. I have seen a book which
writes C interpreter in C.

The criteria would be the small size and high readability of the code.

Are there already answers anywhere ?

How would a gury approach such a project ?

Bolega


you could read scheme 9 from empty space. you can find it here 
http://www.t3x.org/


--
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-13 Thread Gene
On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

Probably doesn't meet your intent, but this is a really impressive bit
of (whacky) art:

http://www.ioccc.org/1996/august.hint

and find the code at

http://www.ioccc.org/years-spoiler.html

under 1996.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C interpreter in Lisp/scheme/python

2010-06-13 Thread nanothermite911fbibustards
On Jun 13, 4:07 pm, bolega gnuist...@gmail.com wrote:
 I am trying to compare LISP/Scheme/Python for their expressiveness.

 For this, I propose a vanilla C interpreter. I have seen a book which
 writes C interpreter in C.

 The criteria would be the small size and high readability of the code.

 Are there already answers anywhere ?

 How would a gury approach such a project ?

 Bolega

Take a look at this

When I first got a summer job at MIT’s Project MAC almost 30 years
ago, I was
delighted to be able to work with the DEC PDP-10 computer, which was
more fun
to program in assembly language than any other computer, bar none,
because of
its rich yet tractable set of instructions for performing bit tests,
bit masking, field
manipulation, and operations on integers. Though the PDP-10 has not
been manufactured
for quite some years, there remains a thriving cult of enthusiasts who
keep old PDP-10 hardware running and who run old PDP-10 software—
entire
operating systems and their applications—by using personal computers
to simulate
the PDP-10 instruction set. They even write new software; there is now
at
least one Web site whose pages are served up by a simulated PDP-10.
(Come on,
stop laughing—it’s no sillier than keeping antique cars running.)
I also enjoyed, in that summer of 1972, reading a brand-new MIT
research
memo called HAKMEM, a bizarre and eclectic potpourri of technical
trivia.1 The
subject matter ranged from electrical circuits to number theory, but
what intrigued
me most was its small catalog of ingenious little programming tricks.
Each such
gem would typically describe some plausible yet unusual operation on
integers or
bit strings (such as counting the 1-bits in a word) that could easily
be programmed
using either a longish fixed sequence of machine instructions or a
loop, and then
show how the same thing might be done much more cleverly, using just
four or
three or two carefully chosen instructions whose interactions are not
at all obvious
until explained or fathomed. For me, devouring these little
programming nuggets
was like eating peanuts, or rather bonbons—I just couldn’t stop—and
there was a
certain richness to them, a certain intellectual depth, elegance, even
poetry.
“Surely,” I thought, “there must be more of these,” and indeed over
the years I
collected, and in some cases discovered, a few more. “There ought to
be a book of
them.”
I was genuinely thrilled when I saw Hank Warren’s manuscript. He has
systematically
collected these little programming tricks, organized them
thematically,
and explained them clearly. While some of them may be described in
terms of
machine instructions, this is not a book only for assembly language
programmers.
The subject matter is basic structural relationships among integers
and bit strings
in a computer and efficient techniques for performing useful
operations on them.

These techniques are just as useful in the C or Java programming
languages as
they are in assembly language.
Many books on algorithms and data structures teach complicated
techniques
for sorting and searching, for maintaining hash tables and binary
trees, for dealing
with records and pointers. They overlook what can be done with very
tiny
pieces of data—bits and arrays of bits. It is amazing what can be done
with just
binary addition and subtraction and maybe some bitwise operations; the
fact that
the carry chain allows a single bit to affect all the bits to its left
makes addition a
peculiarly powerful data manipulation operation in ways that are not
widely
appreciated.
Yes, there ought to be a book about these techniques. Now it is in
your hands,
and it’s terrific. If you write optimizing compilers or high-
performance code, you
must read this book. You otherwise might not use this bag of tricks
every single
day—but if you find yourself stuck in some situation where you
apparently need
to loop over the bits in a word, or to perform some operation on
integers and it just
seems harder to code than it ought, or you really need the inner loop
of some integer
or bit-fiddly computation to run twice as fast, then this is the place
to look. Or
maybe you’ll just find yourself reading it straight through out of
sheer pleasure.

source
http://www.hackersdelight.org./foreword.pdf

===
Standard Disclaimer, nothing personal

http://www.youtube.com/watch?v=lX18zUp6WPY

http://www.youtube.com/watch?v=XQapkVCx1HI

http://www.youtube.com/watch?v=tXJ-k-iOg0M

Hey Racist and INcompetent FBI Bustards, where is the ANTHRAX Mailer ?
Where are the 4 blackboxes ? Where are the Pentagon Videos ? Why did
you release the 5 dancing Israelis compromising the whole 911
investigation ? If the Dubai Police can catch Mossad Murderers and put
the videos and Iranian Police can why cant you put the Pentagon
Videos ? If Iran police can put the AMERICAN TERRORIST, Riggi and
puting on INTERNATIONAL MEDIA a day after catching him without
TORTURE, why cant you put the INNOCENT patsies on the MEDIA. Why did
you have to LIE 

Re: C interpreter in Lisp/scheme/python

2010-06-13 Thread nanothermite911fbibustards
 Probably doesn't meet your intent, but this is a really impressive bit
 of (whacky) art:

Lisp runs faster than C. Once you get more time away from screwing
Palestinians, and other false-flags, you will find ideas like these

How to make Lisp go faster than C
Didier Verna
Abstract
Contrary to popular belief, Lisp code can be very ef-
cient today: it can run as fast as equivalent C code
or even faster in some cases. In this paper, we explain
how to tune Lisp code for performance by introducing
the proper type declarations, using the appropriate
data structures and compiler information. We also
explain how eciency is achieved by the compilers.
These techniques are applied to simple image process-
ing algorithms in order to demonstrate the announced
performance on pixel access and arithmetic operations
in both languages.

===
Standard Disclaimer, nothing personal

http://www.youtube.com/watch?v=lX18zUp6WPY

http://www.youtube.com/watch?v=XQapkVCx1HI

http://www.youtube.com/watch?v=tXJ-k-iOg0M

Hey Racist and INcompetent FBI Bustards, where is the ANTHRAX Mailer ?
Where are the 4 blackboxes ? Where are the Pentagon Videos ? Why did
you release the 5 dancing Israelis compromising the whole 911
investigation ? If the Dubai Police can catch Mossad Murderers and put
the videos and Iranian Police can why cant you put the Pentagon
Videos ? If Iran police can put the AMERICAN TERRORIST, Riggi and
puting on INTERNATIONAL MEDIA a day after catching him without
TORTURE, why cant you put the INNOCENT patsies on the MEDIA. Why did
you have to LIE about Dr Afiya Siddiqui and torture that Innocent
little mother of 3 and smashing the skull of her one child ?

http://www.youtube.com/watch?v=DhMcii8smxk
http://www.youtube.com/watch?v=0SZ2lxDJmdg

There are CRIMINAL cases against CIA CRIMINAL Bustards in Italian
courts.

FBI bustards paid a penalty of $5.8 million to Steven Hatfill, but
only because he was a white. They got away with MURDER of thousands of
Non-whites in all parts of the world.

Daily 911 news : http://911blogger.com

http://www.youtube.com/watch?v=tRfhUezbKLw

http://www.youtube.com/watch?v=x7kGZ3XPEm4

http://www.youtube.com/watch?v=lX18zUp6WPY

-- 
http://mail.python.org/mailman/listinfo/python-list