Live data from Hacker News

Programming and Programming Languages

papl.cs.brown.edu

51–60 of 68 posts

Re: Programming and Programming Languages

#51
post #24

Earlier quoted context omitted.

Shriram, thank you for the PLAI and I'm looking forward to take a look on PAPL as well. But one thing I don't like - types (static typing) for the implementation language is an afterthought in your books. This happened to PLAI, and later it switched to "plai-typed" language (which was a good move). Now we have PAPL, but again using a dynamic language. Although, as I can see, static typing is a planned feature for Pyr…

Thanks for your comments; criticism is always welcome! And for your kind words about Pyret, though I actually find parenthetical syntax a bit easier to write. It's still taking me some effort to get used to the irregularities of non-parenthetical syntax. I don't know why you say types are an afterthought. HtDP teaches a profoundly _typed_ discipline of programming. The datatype mechanism in PLAI continues this with m…

> And plai-typed is anything _but_ an "afterthought", right?

No, no, plai-typed is great. I meant that PLAI book initially used a dynamically typed language (and I guess it is preserved in the printed edition), but you switched to plai-typed afterwards, and I believe you'll switch to full static typed Pyret for this book as well, when it becomes ready :)

("shameless plug": Actually, it was me who notified you about the plai-typed effort and you further developed it, during your online PLAI class at Brown ;))

Agree about a typed discipline, but I meant specifically static typing for the implementation (host) language.

As for preferences, yes, actually Noel has a point - learning debugging type errors in a dynamic languages is a skill useful in a "real world" (unfortunately :))

Re: Programming and Programming Languages

#52
I'd like to learn from this book.

> If you ask Pyret for the value of this program, it will unsurprisingly tell you that it’s 3.

I am not sure how to do that. In [this tutorial](http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28par...) everything is a test. Is the program 3 supposed to be run as a test as well? Just running 3 in the editor does nothing. Where can I read up on Pyret syntax so i can follow this book?

Re: Programming and Programming Languages

#53
post #51

Earlier quoted context omitted.

Thanks for your comments; criticism is always welcome! And for your kind words about Pyret, though I actually find parenthetical syntax a bit easier to write. It's still taking me some effort to get used to the irregularities of non-parenthetical syntax. I don't know why you say types are an afterthought. HtDP teaches a profoundly _typed_ discipline of programming. The datatype mechanism in PLAI continues this with m…

> And plai-typed is anything _but_ an "afterthought", right? No, no, plai-typed is great. I meant that PLAI book initially used a dynamically typed language (and I guess it is preserved in the printed edition), but you switched to plai-typed afterwards , and I believe you'll switch to full static typed Pyret for this book as well, when it becomes ready :) ("shameless plug": Actually, it was me who notified you about…

Aaah, YOU are responsible! Well, then I should publicly thank you for notifying me about that. It was a great addition.

Re: Programming and Programming Languages

#54

Earlier quoted context omitted.

By the way, you've summed up Pyret quite nicely (-:, though it is more than just that sum (with more goodies on the way).

Thank you - I wasn't expecting a response from you here! "Bastard child of python and plt" is a high compliment coming from me :-) I keep hearing your name, first because Kathi was my beloved teacher and advisor, second because Justin worked with you, and third because I made Frank Goodman take your class. Maybe we'll finally meet one day!

You seem tied up to all the happiness in my life. Come by and visit sometime -- I owe you lunch. (-:

Re: Programming and Programming Languages

#55
I read the introduction and I really liked the following excerpt from The Structure of This Book:

  We will often build up programs incrementally, just as a pair of programmers
  would. We will include mistakes, not because I don’t know the answer, but
  because *this is the best way for you to learn*. Including mistakes makes it
  impossible for you to read passively: you must instead engage with the
  material, because you can never be sure of the veracity of what you’re
  reading.
I really like this idea as any techniques that help the learner to actively think about what they’re reading work better than books which don’t employ such technique. It’s for the same reasons that I recommend the Head First series – even though for some books, the pace can be too slow for my liking.

I’d also agree with the author that a good book for readers to learn from does not make a good reference book (and vice-versa).

Re: Programming and Programming Languages

#56

Earlier quoted context omitted.

Thank you - I wasn't expecting a response from you here! "Bastard child of python and plt" is a high compliment coming from me :-) I keep hearing your name, first because Kathi was my beloved teacher and advisor, second because Justin worked with you, and third because I made Frank Goodman take your class. Maybe we'll finally meet one day!

You seem tied up to all the happiness in my life. Come by and visit sometime -- I owe you lunch. (-:

Will do!

Re: Programming and Programming Languages

#57
post #16

@shriramkmurthi may I know what license PLAI and PAPL are released under? I couldn't find it on the linked page.

PLAI's license is CC BY-NC-SA (3.0 US). I have not yet decided for sure with PAPL. At any rate, I'm committed to having a full copy of the book available for free to all, as is also true of HtDP (we were one of the pioneers in this space) and PLAI (which has even more free/commercial options than HtDP). You may assume at least a CC BY-NC-ND, which lets typical users have at it right away.

I have my own odd way of rewarding CC-licensed content:

If it has no DRM but is 'all rights reserved', and I really want a copy, I wait for a chance to buy it at a deep discount.

If it is released under a CC 'non-commercial' license, I buy a copy at full price.

If it is released under a CC license which allows commercial use, I pay extra for a copy (at sites like www.leanpub.com) or buy 2 copies.

At any rate, I would gladly pay for a copy (or two) of PAPL if the option were available and a CC license declared.

BTW, thanks for this resource!

Re: Programming and Programming Languages

#58
post #52

I'd like to learn from this book. > If you ask Pyret for the value of this program, it will unsurprisingly tell you that it’s 3. I am not sure how to do that. In [this tutorial]( http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28par... ) everything is a test. Is the program 3 supposed to be run as a test as well? Just running 3 in the editor does nothing. Where can I read up on Pyret syntax so i can follow thi…

Sorry about the confusion. Looks like you've already found https://code.pyret.org/editor (but the link is here for the information of others). You can run programs by typing them in the interactions area (a.k.a. REPL), which is the area on the right. To wit:

> 3 3 > 1 + 2 3

Re: Programming and Programming Languages

#59

Earlier quoted context omitted.

PLAI's license is CC BY-NC-SA (3.0 US). I have not yet decided for sure with PAPL. At any rate, I'm committed to having a full copy of the book available for free to all, as is also true of HtDP (we were one of the pioneers in this space) and PLAI (which has even more free/commercial options than HtDP). You may assume at least a CC BY-NC-ND, which lets typical users have at it right away.

I have my own odd way of rewarding CC-licensed content: If it has no DRM but is 'all rights reserved', and I really want a copy, I wait for a chance to buy it at a deep discount. If it is released under a CC 'non-commercial' license, I buy a copy at full price. If it is released under a CC license which allows commercial use, I pay extra for a copy (at sites like www.leanpub.com) or buy 2 copies. At any rate, I would…

With PLAI 1/e, I did something much simpler. I made a pay version of the PDF available, making clear it was also available for free, so people would only be buying it to reward the author. I'm pleased to say some number of people have done so with regularity. Search for "Electronic Version" on http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04....

Re: Programming and Programming Languages

#60
post #49

Earlier quoted context omitted.

Diving into the middle of a large and complex document and extrapolating from that is always a dangerous venture. The style of the book is to gradually reveal things as it goes along, often even starting with incorrect statements, because we learn best when we see missteps, not only from perfect solutions. Therefore, there's nothing wrong with "starting from" a statement that may not be where we end up. It's meant to…

I agree, my gripes are not with the entire document, or even with the chapter in question. I also don't have a problem with starting from a statement that may be wrong in an informative way, it's a valid approach to learn a subject. My problem is that it's not presented as a starting point or even implied that the definition might be wrong. It categorically states "The simplest notion of an object—pretty much the onl…

> My other gripe is that I've heard too many vague, biased or incomplete answers to the question

Well, "behaviour and state" is also incomplete, because it fails to mention anything about how you refer to parts of state and particular behaviours.

"a mapping of names to values and functions" on the other hand mentions both state ("values") and behaviour (functions) and also tells you that they have names.

> they've never learned a proper definition for it?

Well, there are many different valid definitions for objects, and even more for OO. There are people who don't know any of them for sure, but I strongly suspect that you've dismissed many good definitions as "vague, biased, incomplete" on the grounds of them not being your preferred one. You did it at least once just now, when you failed to realize that "a mapping of names to values and functions" is the same thing as "[named] behaviour and state".

Post reply on HN