Interactive SICP 262 points by zodiac on Jan 30, 2014 | hide | past | favorite | 31 comments

 Hello everyone, author here. Sorry for forgetting to enable billing on appengine - the page should be displaying now.I shared Interactive SICP with HN last year (https://news.ycombinator.com/item?id=4860370), and thought it was time to share it again. Since that time, I've- added more sections of the book - replaced the javascript scheme engine - added mathjax - made the evaluation asynchronous (to avoid freezing the UI during long computations) - improved dependency management between blocks of code - separated out the interactive library - I should be releasing it soon!What I haven't been able to do is to make the entire book interactive due to a lack of time. I was thinking of using indiegogo to pay myself and my co-author so that we can finish the book. What do you guys think?
 Thanks for making this!It seems like I can't skip ahead to further chapters and start working through it there - for instance if I start here:http://xuanji.appspot.com/isicp/3-0-modularity-objects-and-s...and click the right arrow, it brings me back to the beginning. Is that by design to enforce that I work my way through from the very beginning? One reason I'd like to start mid-way is I've read this book a number of times, getting more out of it each time, and I don't feel like spending the time on the basics.
 I think it's a broken link. Try clicking the home icon on the side panel and navigating through that.
 Very very cool. One thing that I would like would be if 'tab' jumped to the next example/input area?
 Thanks! I must have missed that one last year, but I've thought a project like this should exist for years. I'd be willing to contribute to an indiegogo campaign to support this.
 i would definitely keep running with this. would def support. iconic text, and this makes it easy to dive in and play with. perhaps the examples appear in a mini-IDE on the right, where you click the example, it shows up in the IDE. click compile button, and it will execute the sample.
 Hello author. Thanks author. Suggested feature: press right = go to next page.
 I wonder if you are familiar with Bret Victor's elaborate criticism of Khan Academy's live coding environment. This effort looks like it could really benefit from its insights.http://worrydream.com/LearnableProgramming/While an inline interactive Scheme interpreter does make the SICP examples easier to follow and play with, it doesn't by itself make the content more understandable and learnable.A "learning environment for SICP", with the principles of learnability and understandability in Victor's article applied, would be very beneficial for present day learners. It surely is a lot of work, but would be an interesting route for your project to take.
 I've definitely read that particular link and thought hard about how SICP should be written for a live coding environment. I don't think either the original SICP or Bret Victor will be the last word on this matter.In Bret Victor's terms, the scheme used in SICP has very little "vocabulary" to learn to read. The first section (which I linked) uses only arithmetic functions and if to teach you, well, how to program. And the "show flow" examples emphasize mutation of variables through time, while scheme uses recursion in place of loops. I think something that shows the function calls explicitly would be good, or at least something that shows the flow of function call (like the DrRacket debugger).At the risk of generalizing, Bret Victor deals with things like graphics, animations and simulations, while SICP treats programming like a branch of pure math, and it's not straightforward reconciling the two.I'd love to talk more about this with you though!
 Yes, the specific example scenarios that Victor has used are hard to directly reconcile with what SICP is doing. But, that the examples are oriented towards graphics and animation has only to do with the fact that the immediate target of his critique in the essay is Processing and a particular live coding implementation of it. I was thinking more in terms of applying the principles of learnability that he has put forward, and are manifest in the examples he has cited (Logo, Smalltalk, etc.), "how exactly" admittedly being an open question.One thing I'm more or less certain about is that it would entail less live coding, and more stepping through visualized execution states (perhaps similar to pythontutor.com's visualizer).I will be going through SICP with these in mind in the following weeks/months; I will keep you posted if I end up with notes that I think you might find useful.
 This looks really neat. Glad to see that the source is available, but there is no licensing information to indicate what can/cannot be done with the source. All I know is that SICP's text is CC-BY-NC.
 This is pretty cool. I've been meaning to do SICP forever. It's got the first 2 sections completely it seems.
 Thanks a bunch! SICP is my current course literature at Linköping University.
 Consider yourself lucky! We had some boring and entirely too basic OOP-y course (with Java, of course). I'm reading SICP now (this beautiful PDF version: https://github.com/sarabander/sicp-pdf/blob/master/sicp.pdf). I would've loved to have had it when I was in college.Alternate HTML5 version here: http://sarabander.github.io/sicp/html/index.xhtml
 Same. Looking forward to go through it.
 Over quota, btw, i found the source here:
 I have to admit I'm probably going to love this quite a bit. I'm a sysadmin who has dabbled in scripting languages and a little bit of c, python, and perl, but other than that my programming always kinda scared me off. I read the wizard book for the first time last year and it has absolutely helped me gain a new understanding of just about everything I do in daily work and has helped remove my programming fears. If they do more work on the built in interpreter I will probably go through it a time or two more.
 Hello! I'm the author - what improvements would you like to see in the built-in interpreter?
 I really don't have any major complaints, at first noscript was messing up things but everything works afterwards so far.One idea though, where you have the green box that can be hidden, it would be nice to have an interpreter box there, to mess around with as one goes through (and keep it persistent between pages). That way, if someone just wants to mess with the text already entered on the page, they can, but if they are like me and like retyping things (a form of mental note-taking) they could do that too.I know at first the main issue I found with lisp was that I didn't know how to get an environment going to just mess around with, and having something like that might be useful to provide a standalone from the iSICP (or it might not).Overall, very impressive, good stuff.
 I created an implementation of R5RS in Javascript[1] that perhaps you'd be interested in. I know you already have one, but you might have opinions and needs that could influence my implementation. I got stalled trying to get (real) macros to work, but I already had a Scheme->JS FFI and asynchronous evaluation without the use of web workers.
 How do you get asynchronous evaluation without the use of web workers? My understanding is that, without web workers, javascript and the browser share a single thread, and executing javascript freezes the UI.
 Very cool! I have also been making an (iPad) app to help people get through SICP and I somehow didn't run into this.If anyone is interested in reading SICP now, you should try out my app. We find you someone and you have a good conversation about the material each week through video chat and a whiteboard. We aren't launched yet, but you can check out our simple demo (https://www.youtube.com/watch?v=DlUTKzrqECE) and send me an email if you want to try the beta. bridger@understudyapp.com
 It's not obvious how to run examples after editing — it's explained in readme.md, but I didn't see it the book itself.[It's Ctrl-Enter. Actuallghy just pressing Ctrl is enough.]Ideas to make it more discoverable: - re-run an expresion when the editor is unfocused. - add a "▶" button in the corner of each editor. - add a tooltip with the kbd shortcut on the "▶" button
 The expression is re-run when the editor is unfocused. If you're not seeing that behavior please let me know!
 Oops, you're right. I thought it's not but cannot reproduce now.
 If you're coming out of pocket to pay for the app engine charges, I'd put up a gittip / microdonation link.Great work, and very useful.
 When I worked my way through SICP I found the following javascript based scheme REPL very useful:http://bluishcoder.co.nz/jsscheme/Unfortunately, searching for jsscheme in Google gives you a list of many different projects that either share the same name or have a very similar name.
 This is very cool, every innovation helps. I wonder if it wouldn't be helpful for learning to add execution visualization, such as provided at http://www.pythontutor.com/visualize.html (click "Visualize Execution")
 Small suggestion: add navigation arrows at the bottom of the page as well.
 I look forward to seeing it, once it quits 503ing.

Search: