Shriram Krishnamurthi

cs.brown.edu/~sk · Personal blog · on HN since 2007

Shriram Krishnamurthi, a Brown University computer science professor, writes about programming languages, teaching, and Scheme macros.

What HN saysHN links his PLAI textbook, his paper on automata via macros, and Brown PLT's work such as Flapjax, mostly as teaching resources.
129HN people shared it
86linked it in comments
59stories submitted
1.1Kstory points
1 year agolast shared
2007people per year2026

Most-shared posts

  1. 1
  2. 2
  3. 3
    A critical view of SICP and rationale for HtDP
    9 people · 51 points · first shared 2011 · 10 comments on HN
  4. 4
  5. 5
    Homepage
    7 people · first shared 2011
  6. 6
    Scheme: The Swine before Perl
    6 people · 53 points · first shared 2008 · 3 comments on HN
  7. 7
    Automata via Macros (2006)
    6 people · 20 points · first shared 2009 · 6 comments on HN
  8. 8
    Automata via Macros (Lisp) [pdf]
    5 people · 24 points · first shared 2011 · 3 comments on HN
  9. 9
    Khmgpf impl use plt web server journal
    5 people · first shared 2007
  10. 10
  11. 11
    Books as Software (2006)
    4 people · 30 points · first shared 2007 · discussion on HN
  12. 12
  13. 13
  14. 14
    Paper.pdf
    3 people · first shared 2019
  15. 15
    Mgbcgbk flapjax
    3 people · first shared 2011

What HN people wrote when they linked it

sanderjd · 2024-03-06
Nope, but if you click into their paper[0] and follow the link to PL-Detective[1] there, that's the one! (Hat tip to another commenter who was also familiar with this.) 0: https://cs.brown.edu/~sk/Publications/Papers/Published/pkf-teach-pl-ex… 1: https://dl.acm.org/doi/10.1145/1086339.1086340
michaelsbradley · 2023-09-20
It's amazing how far back all the research and experimentation goes on reactive Web/JS tech, e.g. Brown PLT's work on Flapjax starting back in 2006, even before the JS renaissance kicked off by googl's V8! https://github.com/brownplt/flapjax https://cs.brown.edu/~sk/Publications/Papers/Published/mgbcgbk-flapjax… http://static.cs.brown.edu/research/pubs/theses/ugrad/2007/lmeyerov.pd… It might be interesting to do a compare/contrast with v5's Runes and Flapjax's implementations.
memling · 2022-11-25
He also wrote a great intro to generating finite automata using Scheme macros.[0] It carries you through step by step and motivates the work well. [0] http://cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macr…
madjayhawk · 2022-02-11
The Fatal Shore by Robert Hughes. An absolutely brilliant account of the founding of Australia. A review: https://cs.brown.edu/~sk/Personal/Books/Hughes-Fatal-Shore/ Questions to think about as you read: Why weren't criminals transported to the Americas instead of to Australia? What if they had been? Do governments ever consider the long range implications of their policies? Were German the only people who practiced government-sponsored barbarism against subsets of their own people?
CodeArtisan · 2021-04-24
A virtual machine executes instructions while an interpreter takes source code as input. An interpreter could be built on top of a virtual machine, obviously, but not necessary. For example, SICP/PLAI/OOPLAI[1] explain how to implement an interpreter on top of Scheme where you directly interpret the s-expressions. These may be a worth read if you want to learn about the usual concepts and techniques used in programming language implementations from a more general point of view. Like, for example, how to implement a static type system or an object model based on classes. Interpreters based on a virtual machine are actually compilers on the fly; the source code is not interpreted but translated into instructions beforehand. [1] http://sarabander.github.io/sicp/ http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/ https://users.dcc.uchile.cl/~etanter/ooplai/
hackermailman · 2020-08-13
Ask people who do education research https://cs.brown.edu/~sk/ There's also private companies like brilliant who would pay you to do curriculum research if you got a PhD in the field, or who knows make your own.
noelwelsh · 2018-08-24
If people are interested in understanding the design rationale of HtDP I'm not sure this is the best source. I think you already need a pretty good understanding of HtDP is get the most out of this, though the "Turing is Useless" section is good stuff. I think https://cs.brown.edu/~sk/Publications/Papers/Published/fffk-htdp-vs-si… is probably a better overview, though it's quite old now. I'm not aware of any followups. The paper even has its own wikipedia page! https://en.wikipedia.org/wiki/The_Structure_and_Interpretation_of_the_…
skrishnamurthi · 2018-06-23
Maybe. I don't believe any claims about "easier" without reasonable experimental evidence. Even in the realm of operational strategies, there are huge differences; see: http://cs.brown.edu/~sk/Publications/Papers/Published/tfk-eval-trace-r… My guess is that "denotational strategies" (from what I can guess you mean) just move the cognitive load around in other places. That doesn't make them worse, but it depends on which kind of cognitive load the learner best copes with.
thinkmoore · 2017-01-30
There is some great existing work in the academic community on better models for web interactions: https://cs.brown.edu/~sk/Publications/Papers/Published/mk-int-safe-sta…
dwaynecrooks · 2016-12-15
Well, first off it's just a suggestion so take it with a grain of salt and ultimately do what works for you. But I see your point and I did struggle with whether to include it or not. I think me wanting to share the great work I see Shriram Krishnamurthi (https://cs.brown.edu/~sk/) and others (Matthias Felleisen, http://www.ccs.neu.edu/home/matthias/ for another example) are doing and have been doing for decades to advance Computer Science education and really tackle the tough problems pushed me to include it in the end. I'm just a fan of their work and this post felt like a great time to mention it. However, I do share your feelings that most people should just jump in and learn Python as their first language. It's easy to get started, batteries included and there's plenty of resources and people to help them if they get stuck.
joshuata · 2016-07-26
One of the best resources I've found is Programming Languages: Application and Interpretation by Shriram Krishnamurthi[1]. It walks you through building a small interpreter and language in Racket. Not only does it teach Racket, but it helps understand how and why the language works. [1] https://cs.brown.edu/~sk/Publications/Books/ProgLangs/
shriramkmurthi · 2016-06-27
No. I think the best illustration is the continuation-based Web programming work we did several years ago: http://cs.brown.edu/~sk/Publications/Papers/Published/khmgpf-impl-use-… If you don't have the right underlying language (in this case, with continuations), you _can't_ have a similar API. Similarly, the reactive APIs we had in Flapjax [http://cs.brown.edu/~sk/Publications/Papers/Published/mgbcgbk-flapjax/… enabled entirely new kinds of primitive “library” operations; see, for instance, the drag-and-drop example in that paper.
cosmez · 2015-12-18
The only problem with LiSP is the price! I recommend PLAI (https://cs.brown.edu/~sk/Publications/Books/ProgLangs/) if you dont have the money to spend.
brudgers · 2014-07-08
Best practices differ from context to context. MIT switched from Scheme to Python because a large segment of students in 6.001 were not necessarily going into computer science and were there as because of a common core curriculum. Does it really make sense to teach such people to write language interpreters in an introductory course? But every place isn't MIT, nor is every course a common core requirement for a college or department with diverse majors. Does a civil engineering student really need to implement lazy evaluation? Felleisen's paper and subsequent book as well as the work of the PLT group show the current state of Scheme as a pedagogical language. http://www.cs.brown.edu/~sk/Publications/Papers/Published/fffk-htdp-vs… http://www.ccs.neu.edu/home/matthias/HtDP2e/ http://racket-lang.org/learning.html
takikawa · 2013-08-06
I would also look at PLAI (Programming Languages: Application and Interpretation): http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/ It's an excellent free undergraduate-level PL textbook that covers a lot of ground and is informed by both research and practice. There's a 2nd edition linked from there as well.
lincolnq · 2012-04-18
Great analogy. It appears that SR and HM both benefit from great teachers. I learned HM in a couple weeks of an undergraduate course, and that knowledge has continued to pay off. A good introduction can be found in Krishnamurthi's free book PLAI in the chapters on types. http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/
jules · 2011-09-09
Other great papers: Flapjax: A Programming Language for Ajax Applications: http://www.cs.brown.edu/~sk/Publications/Papers/Published/mgbcgbk-flap… Embedded probabalistic programming: http://okmij.org/ftp/kakuritu/dsl-paper.pdf Memoization of Top-down Parsing: http://arxiv.org/PS_cache/cmp-lg/pdf/9504/9504016v1.pdf
shriramk · 2011-06-29
Also, WeScheme goes to great pains to implement the "world" computing model, rather than only exposing the underlying computational model. Implementing this atop JavaScript is a fair bit of effort. That's where our resources have gone; Cloud9 has spent its effort elsewhere. You can read about the model here: http://www.cs.brown.edu/~sk/Publications/Papers/Published/fffk-functio… A fun exercise for hackers is to guess the consequences of this for running atop JavaScript.
kwantam · 2011-06-16
Have you looked at Programming Languages: Application and Interpretation [1] by Krishnamurthi? It doesn't address your concern about parsing---it's explicitly excluded from the book---but I found it to be a reasonable follow-on to SICP and a relatively enjoyable read to boot. [1] http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/
silentbicycle · 2011-01-18
OTOH, I read SICP first, and later checked out HTDP. It didn't seem very interesting to me. Not sure what I would have thought about it first. Other potential prerequisites to SICP, all of which use Scheme: The Little Schemer (http://www.ccs.neu.edu/home/matthias/BTLS/; a quick read, but a bit overly cute), EoPL (http://www.cs.indiana.edu/eip/eopl.html; a great book in its own right; I recommend the _first_ edition), PLAI (http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/).
paulitex · 2010-11-26
Shriram Krishnamurthi (author of PLAI http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/) recently suggested one: http://shriram.github.com/p4p/ I've been meaning to go through it in detail, but to be honest I really like s-expressions, really really. I'd even say the regularity of syntax is one of lisp's greatest features (even Clojure's [] and {} literals are going too far for my taste...)
b-man · 2009-09-07
Yeah, you could go for SICP too, or as the commenter above mentioned, the HTDP. Both HTDP and conabs inherit their methodologies from SICP. (in htdp you could even look at The Structure and Interpretation of the Computer Science Curriculum here http://www.cs.brown.edu/~sk/Publications/Papers/Published/fffk-htdp-vs… But it is worth to look at the same thing from different points of view. As Alan Kay says, it is worth 80 IQ points :)
jlouis · 2008-12-22
http://swtch.com/~rsc/regexp/regexp1.html is a must read. Then you should probably listen to http://www.cs.brown.edu/~sk/Publications/Talks/SwineBeforePerl/ by Shriram Krishnamurthi (I've met him - He is a really cool guy). At that point you have the ammunition and the gun loaded. You just have to fire it.
icey · 2008-04-21
Shriram is a super-sharp guy. One of the best talks I've heard for scheme evangelism was his "The Swine before Perl" talk. (edit) http://www.cs.brown.edu/~sk/Publications/Talks/SwineBeforePerl/
gavmor · 2025-04-08
I have an intuition that the comment you're responding to has a lot of truth to it, but I am going to have to educate myself to give you an answer. One thing I do know is that JS and Lisp both treat functions as first-class citizens, allow some degree of meta-programming, and rely heavily on hierarchical (e.g., nested objects in JavaScript vs. s-expressions in Lisp). Passing functions by reference enables both LISP and JS to compose higher-order functions and, as suggested in another commented, both Lisp and JavaScript's "dynamic stack frames" somehow live updates to running code without requiring a complete restart of the application. The only clear example of this I can find, however, is Bun's --hot mode, which performs a "soft reload," updating its internal module cache and re-evaluates the changed code while preserving global state. I have some vague notion that this is a favorite feature of Lisp, but it's not clear to me that it's unique to these language families. --- Edit: Lexical scoping, closures, some tail-call optimization... --- Edit 2: > Programming language “paradigms” are a moribund and tedious legacy of a bygone age. (Dave Herman)[0] --- Edit 3: > The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's…
DonaldPShimoda · 2023-11-21
> But starting out with something that is not Python, with the goal of ending up doing Python, seems like a funny way to approach things. Another project in this space is Pyret [0]. The Pyret language has been developed with the express intention of taking completely novice programmers, teaching them how to program in a language with reasonable semantics [1], and progressively add language features until they eventually switch to Python. The language is integrated into the DCIC course [2]. The idea of a language that can progressively gain features was (to the best of my knowledge) pioneered by Racket. The idea is that a particular file can be declared at a specific "language level" (I think that's the terminology), which restricts the set of features available to the user. Over the course of the semester, new features can be added as they are taught. The advantage of this approach is that students do not accidentally encounter surprising semantics that they inadvertently internalize to the detriment of their long-term learning. The Pyret project is actually spearheaded by Shriram Krishnamurthi at Brown University, who was on the original Racket team. His career has focuses on the application of PL theory and tooling to computer science education. One of his most recent publications is particularly interesting with regard to the present topic, which is an experience report detailing what happens when students move from Racket to Pyret and from Pyret to Python [3]. [0]…
LAIFscratch · 2022-01-15
There are people working on this rigorously, try going through Prof Krishnamurthi's papers: https://cs.brown.edu/~sk/ he teaches higher-order functions because they've found it helps students understand how an API works, he designed his own learning language from scratch (Pyret) and I went through much of his older CS19 Brown course here: https://learnaifromscratch.github.io/software.html because the course uses a web browser IDE, they were able to take stats of all students to see when they started to write code VS when they wrote examples and tests. The tests he teaches are property-based not typical cs101 style tests just plugging in edge cases and hoping for the best. His goal is to turn the teaching of programming from absolute guesswork and wishful thinking into something proven to work which is admirable, most CS professors that I had just taught whatever they felt was best for them when they first learned, not what is provably best for everyone in a large class. Of course the answer to everything is 'just be motivated and dig deep into X then you will learn as you go' like building a program from scratch, or how some mathematician's learned by being fascinated with various topics and purely researching them on their own for hours on end. For some people this will work others will just give up when it gets too difficult, I find it's something you can do after 1/2 of a course, you have just enough education to be able to read the documentation and now you can actually…
cben · 2019-10-28
You don't really need much math for SICP. You can learn a few random pieces of math from SICP, and without background that will be harder and you might feel like you're missing out, but these are just examples; you can just trust the math works and focus on how they implement it in code, it's structure of the code they want to teach you about. And, it gets better, IIRC from chapter 2 there is much less math. What happens in the first chapter, is that SICP is exploring various control structures (and abstractions over them) before teaching any compound data structures at all. So all it has to work with is numbers. But as number theory teaches us, numbers actually have a rich internal structure, and SICP uses that to make "interesting" examples! (This aspect of SICP is one of the big critiques in the paper http://cs.brown.edu/~sk/Publications/Papers/Published/fffk-htdp-vs-sic… which explains the motivations beyond HtDP textbook. In particular, HtDP shows compound data structures first, and uses those to start with explicit methodology for data-directed design of code. These are smart programmers and smart educators, and I trust they made a better intro course. I won't recommend SICP for people who don't know any programming at all. But I feel SICP has a magical voice about the art of programming that HtDP didn't replicate — though I haven't read HtDP, only leafed through it a bit.) So I don't recommend to to cram algebra/calculus before you begin…
jpolitz · 2013-11-09
Syntax is tricky and contentious, and our team members do love our Schemes. Members of the Pyret team have actually done some research on the issue of parenthetical expressions in introductory programming, and seen that parens aren't necessarily the best: http://cs.brown.edu/~sk/Publications/Papers/Published/mfk-val-grow-tre… One issue is that it's too regular: since open-paren means so many different things (start of a "defun", start of a function application, start of an argument list in a "defun", start of a syntactic form like "cond" or "if", start of a clause of "code", the list goes on), a typo can easily and drastically change the kind of error message you get. More closely matching syntactic forms to the type of behavior the expression has will hopefully let us improve error messages and grokkability of the difference between concepts. We're collecting data about common syntax errors and actively asking what we can do better in syntax design based on what we observe about Pyret's use.
I would encourage you to view the syntax as "Python, but repaired", for the following reasons: 1. Pyret comes out of Shriram's group's expertise with pinning down exactly what Python and other dynamic scripting languages do right, and (mostly) do wrong. Check out their recent paper Python: The Full Monty: A Tested Semantics for the Python Programming Language http://cs.brown.edu/~sk/Publications/Papers/Published/pmmwplck-python-… for more context. 2. Ruby is far and away not the originator of 'end' to end blocks -- this comes from Pascal and is in other languages that have nothing to do with Ruby, like Lua. 3. Languages that aren't Haskell have ADTs too; it happens that they've lifted an ML-style syntax for defining them. 4. Python is widely used pedagogically, so for better or for worse, students are already being familiarized with the colon, which I agree is a bit anomalous.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close