Prev: Why warnings about unused keyword although (call-next-method)is used?
Next: Why warnings about unused keyword although (call-next-method) is used?
From: bolega on 13 Jun 2010 19:07 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
From: Vinay on 13 Jun 2010 20:15 On 2010-06-13 16:07:54 -0700, bolega <gnuist006(a)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/
From: Gene on 13 Jun 2010 20:48 On Jun 13, 7:07 pm, bolega <gnuist...(a)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.
From: nanothermite911fbibustards on 13 Jun 2010 21:58 On Jun 13, 4:07 pm, bolega <gnuist...(a)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 MITs 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 applicationsby 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 laughingits 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 bonbonsI just couldnt stopand 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 Warrens 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 databits 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 its 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 daybut 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 youll 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 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
From: nanothermite911fbibustards on 13 Jun 2010 23:21
> 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 |