tag:blogger.com,1999:blog-8288194986820249216.post5922281614906087942..comments2024-03-22T05:09:17.789-07:00Comments on Abstract Heresies: Joe Marshallhttp://www.blogger.com/profile/03233353484280456977noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-8288194986820249216.post-43516083484412457352010-04-06T11:08:00.389-07:002010-04-06T11:08:00.389-07:00> Is this a reasonable viewpoint?
Obviously, n...> Is this a reasonable viewpoint?<br /><br />Obviously, no. The real world has billions invested in non-runtime analysis of various stripes; many companies, like Coverity, are founded solely on selling and supporting static analysis of programs.gwernhttps://www.blogger.com/profile/18349479103216755952noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-86525845437118470892010-04-02T09:39:35.863-07:002010-04-02T09:39:35.863-07:00Ian asks “
How do the prefix keywords interact wit...Ian asks “<br />How do the prefix keywords interact with SRFI 42 (eager comprehensions)?”<br><br />Probably not too well. The `:' generator would be fine because it wouldn't be confused with the empty keyword, but :list or :string would be a problem. You could either switch to suffix style, or just escape the problematic symbols:<br />(|:range| k 2 n)<br><br />The <em>other</em> possibility would be to hack the SRFI implementation so that <em>it</em> used keywords in addition to symbols (as synonyms). Then it wouldn't matter if you used keywords or not.Joe Marshallhttps://www.blogger.com/profile/03233353484280456977noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-34981852077718434552010-04-02T09:15:36.681-07:002010-04-02T09:15:36.681-07:00How do the prefix keywords interact with SRFI 42 (...How do the prefix keywords interact with SRFI 42 (eager comprehensions)?Unknownhttps://www.blogger.com/profile/11422827368532976783noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-42812886311658315962010-04-01T13:15:36.689-07:002010-04-01T13:15:36.689-07:00I just don't understand Student B's positi...I just don't understand Student B's position anymore. He says:<br /><br /><i>If you don't evaluate anything, the how could you know that (define foo (lambda (x) ...)) is going to define a name as a procedure?</i><br /><br />What do you mean, how do you know it? That's what you've been learning in class! If that's not good enough, you go and try it a few times, and find out what it does. Or you ask someone smart. Or read the R[5|6]RS specification.<br /><br />Student B seems to be using some extremely formal definition of "knowledge" that doesn't have anything to do with how humans figure things out and answer questions.<br /><br />As for student Z, if he doesn't want to analyze code, perhaps he should drop his computer science course and take a different class.mquanderhttps://www.blogger.com/profile/04628649386002008189noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-10340691446743652292010-04-01T12:47:57.616-07:002010-04-01T12:47:57.616-07:00FWIW, Guile 2 grovels the first line or two for mo...FWIW, Guile 2 grovels the first line or two for mode declarations, to determine the encoding of the file. <br /><br />I wonder to what extent character encoding is related to character folding and keyword syntax.Andy Wingohttps://www.blogger.com/profile/02844056561982747723noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-64967981867124763922010-04-01T10:14:41.692-07:002010-04-01T10:14:41.692-07:00I agree with everything Alexey said.
One thing yo...I agree with everything Alexey said.<br /><br />One thing you could do to drive the point home to Student Z is to find an open source project written in Scheme (or something else he or she should reasonably be able to deal with, like elisp) that has a known bug, point Student Z at it, and say "fix this bug".<br /><br />In this case, a profiler can easily tell you that your program is spending a tremendous amount of time in fib, but only analyzing the code can tell you why fib is taking so long, and it only through the other stuff in this class not mentioned on this quiz that'll allow you to modify or rewrite fib so it doesn't take so long.Buddha Buckhttps://www.blogger.com/profile/17167036913705912859noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-37025737436511707092010-04-01T08:49:46.424-07:002010-04-01T08:49:46.424-07:00Student Z's viewpoint is not only unreasonable...Student Z's viewpoint is not only unreasonable, it's wrong. In fact, a huge amount of a "real world" programmer's time is spent reading code---that is, "analyzing" it. The word "analyze" is perhaps a bit loaded with connotations of things compilers do, like type inference or control flow analysis, but it is the best technical analogue to the "reading" that programmers do all the time. And of course, "writing" has a very tight feedback loop with "reading", and, presumably, you analyze what you are about to write at least to some degree before you write it.<br /><br />I don't have a very good answer to Student B's question, and I suspect it does not have a very good answer. He is certainly right that some of the thoughts that happen on investigating a piece of code so as to answer a quiz question about it just mimic evaluating that piece of code. He is also right that others do not. How, in great detail, to choose which to do when may very well be AI-complete. I can offer some heuristics: be guided by the goal, in this case the quiz question; if an evaluation seems to be taking a long time, think about how to circumvent it, and learn what you need about the evaluee some other way (induction arguments, for example, can be good here); if you're lost, perhaps you can try every trick in the book breadth-first and see whether any of them lead to the answer. But as a teacher, given the current state of understanding of programs and of the process of programming, the best I think I can do is to teach particular things that the students <i>can</i> do, and give them examples of what works in various sitations and what doesn't, and hope they figure it out.Alexeyhttps://www.blogger.com/profile/11095629814500390449noreply@blogger.com