from Hacker News

A Functional Introduction To Computer Science

by debanjan16 on 7/2/23, 6:14 AM with 34 comments

  • by cubefox on 7/2/23, 11:02 AM

    This is a very mathematically inspired introduction, as they say in the initial chapter.

    What I would like to see is a logical introduction to computer science, or at least theoretical computer science.

    Start with combinational logic [1], i.e. with Boolean circuits. They are both conceptually simple and relatively close to physical transistors, unlike any functional / mathematical approach. Then move on to sequential logic[2] which allows the introduction of memory/states, e.g. via flip-flops. From this, more complex circuits and even a primitive GOTO language would be introduced. What I would be interested in is how these circuits relate to the traditional models of computation, i.e. finite state machines, pushdown automatons and Turing machines. Not very cleanly, I suspect.

    [1] https://en.wikipedia.org/wiki/Combinational_logic

    [2] https://en.wikipedia.org/wiki/Sequential_logic

  • by wk_end on 7/2/23, 2:26 PM

    Don't miss Part II [0], which (not to discount the quality of Part I) is much less elementary and much more interesting.

    [0] https://cs.uwaterloo.ca/~plragde/flane/FICS2/

  • by tralarpa on 7/2/23, 9:47 AM

    Oh, they are using Racket. I really love that language. I think it's also great that they explain how to work with structures, instead of going the "everything is a list" aproach (the latter is, in my opinion, better suited for advanced students).

    Unfortunately, I haven't managed yet to integrate Racket into my daily work. The last time I tried to use it, the resulting (manually optimized) compiled code was as slow as an unoptimized python solution and 10x slower than a manually optimized Java version.

  • by asicsp on 7/2/23, 10:12 AM

    See also "Teach yourself Computer Science functionally"

    https://news.ycombinator.com/item?id=36312603 (315 points | 18 days ago | 99 comments)

  • by genericuser256 on 7/2/23, 12:58 PM

    This was a really fantastic course, good intro to the principles of recursion and fundamentals of CS
  • by kingkongjaffa on 7/2/23, 10:26 AM

    How to Design Programs is also an intro to programming using Racket as the teaching language https://htdp.org/2023-5-12/Book/index.html
  • by s-zeng on 7/2/23, 12:15 PM

    Ragde is an excellent CS prof. I really enjoyed the functional approach Waterloo takes in first year CS, especially in the optional more advanced version of the course where they go a lot deeper into the math connections and interpreters
  • by amelius on 7/2/23, 1:01 PM

    Can this be considered a modern version of SICP?

    https://en.wikipedia.org/wiki/Structure_and_Interpretation_o...

  • by josefrichter on 7/2/23, 8:50 AM

    Oh God, wish I had this when I first started.
  • by yungporko on 7/2/23, 8:24 AM

    this seems like a great resource, thanks for posting.