Live data from Hacker News

Structure and Interpretation of Computer Programs – JavaScript Adaptation

sicp.comp.nus.edu.sg

101–110 of 188 posts

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#101
post #91

Earlier quoted context omitted.

I'm with you. As much as I find most remakes terrible, to say others should not enjoy them is a form of gatekeeping. If people who would otherwise not enjoy any of the insights to be gained from SICP do get into it through this version, great.

I think the target audience is people who don't like to learn, and I find that worrying in the context of programming. It's not like code examples in a book are intentionally obfuscated. They are also not some atrocious pile of spaghetti code you may have to put up with at work. I think any foreign PL programming book is a joy to read next to working as a software maintainer. And while the original book aspires to be…

> I think the target audience is people who don't like to learn, and I find that worrying in the context of programming.

A strange comment to make about someone trying to tackle a text like this

> I also have a modest, optimistic interest in Rust, and tinker with it from time to time, but I don't think everything should be converted to Rust.

This is a great example of how your perspective differs from that of the intended audience. They don't want the book in JS because it's a language they're already picking up and want to tinker with. It's likely one of the only languages they are confident with. Maybe they just finished their CS degree or (gasp) a coding bootcamp and would like to understand more of the fundamentals before learning their second language. Especially one like LISP that represents an entirely separate branch of programming language design from JavaScript.

As someone who writes Clojure professionally, I certainly share your hope they would choose to pick up lisp eventually. Let's not hamper their development in the meantime by steering them away from resources like this that might assist their journey.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#102

Earlier quoted context omitted.

Yes, it's such a great language that `{} + []` is a valid program.

Do you find yourself accidentally doing that often? A few of the things from the "Wat" video fall into that category. "Things no one would have ever thought to try, yet a dynamic language will fully allow". If you want to point out valid concerns with JS, the double-equal implicit coercion is a far more frightening "gotcha".

I have had REST endpoints that promise to only ever return an array return an object, so, yes. Yes this does happen in the wild.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#103
post #97

Earlier quoted context omitted.

Do you find yourself accidentally doing that often? A few of the things from the "Wat" video fall into that category. "Things no one would have ever thought to try, yet a dynamic language will fully allow". If you want to point out valid concerns with JS, the double-equal implicit coercion is a far more frightening "gotcha".

Few people do that outside of code obfuscation contests, but the point is JS has heaps of gotchas like that, each waiting to bite you. How about: x = 5; (no var declaration). Extremely easy to do by accident. Lots of these will be left for backwards compatibility. In JS errors often go silent and I developed a strong dislike for any language that does that, including Vimscript and Lua (and I do like Vim).

I'd agree that global declaration is far more egregious. A sibling comment recommends a linter, and I'd probably agree. It's sad that it was ever allowed as one that is copying and pasting code to another location can easily cause this case to happen.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#104
post #76

Earlier quoted context omitted.

Typical dramatic Hacker News user. JS is a great language and enjoyed by millions of developers.

The meaning of the second paragraph was ambiguous. Aside from Javascript dislike, which I don't pretend to deny, I believe learning new things is mind-expanding. When an intriguing movie - or book - comes out, it's often intriguing because it's quite different. When you convert it to a common language - or Hollywood - it becomes less different. Reading "Working With Legacy Code" forced me to absorb some C#, but it al…

> forced me to absorb some C#

This book will force you to absorb some pure, functional JavaScript. There's so much more to programming than "what language is it written in".

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#105
post #75

Earlier quoted context omitted.

Typical dramatic Hacker News user. JS is a great language and enjoyed by millions of developers.

It's useful and practical and has a lot of work put into it so it can't really be called bad, but it doesn't really stack up to what native languages can provide at the high end, and never will (even if it can get pretty darn close). Though I acknowledge its immense utility, I feel like JS always tends to go for "good enough" solutions rather than "best in class" solutions. That is its own kind of quality, but there'…

For sure, if you have a shot at making a world class system you probably don’t want JS.

But I’ve never been in a job where we had a shot at building a world class system. Maybe I just have bad luck, but at each place I have worked the problems in the codebase are obvious and the impediments are institutional not technical.

There are hundreds of problems I could list in our current codebase that are causing slowdowns, bugs, etc. None of them are because of the programming language. They are places where someone put a square peg in a round hole, where someone copied a bug over and over because they assumed the existing code was correct, where someone used a fancy feature of the programming language that made the program worse.

None of that goes away if we start using Rust.

So yes, I agree with you if you are within striking distance of making a perfect application use a nearly perfect language.

I’ve just never been in that job. I’ve always been in the “let’s fix some of this low hanging fruit, and make sensible use of the tools we have” job.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#106
post #35

Earlier quoted context omitted.

Simple question: do you know enough lisp to write a self hosting interpreter in it? People talk up their language until they learn lisp then this happens: https://www.draketo.de/proj/py2guile/

Can lisps place arbitrary code in types and formally verify complex properties of stateful systems--all in the same language? Doubt it. Lisp isn't the epitome of power.

... Yes. Of course they can.

Lisp is usually an academic language, which means research into type systems and type safety frequently takes place in it.

ACL2 is a theorum prover written in Common Lisp [0]. And not just a random project either, but something AMD, ARM, IBM, etc. have used.

[0] https://en.wikipedia.org/wiki/ACL2

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#107
post #49

Every now and then a great movie comes out. Then it gets its American remake. It's been proven you can put Al Pacino, Robert de Niro and Bruce Willis in any movie (with predictable results!). This is the book equivalent of an American remake for me. Is Javascript the new pseudocode? Honestly I'd rather be forced to learn a new language to understand a book than to read the book adapted to JS.

HN's ability to shoehorn a swipe at the USA into almost any topic is really an impressive thing to behold.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#109
post #87

Earlier quoted context omitted.

If learning a new language and syntax is a barrier, you will not be able to follow SICP anyway, since it includes developing multiple languages in various paradigms.

Oh, okay. I thought I was just lazy, not dumb. My bad.

[deleted]

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#110
post #48
post #22

Adaption - another term for adaptation.

I was sure it wasn't a real word but you're correct, it's an alternative (but less common) spelling.

"less common" is a bit of an understatement[0]. I'd put it in the "common misspelling" category. Though both versions seem to have been around since before English really had consistent spelling.

[0] https://books.google.com/ngrams/graph?content=adaption%2Cada...

Post reply on HN