4 ms·
Thinking about hard problems in terms of lambda calculus. I took a day to read about all that stuff and at some point so many things fell into place. I learned
by lopatin 10y ago
Thinking about hard problems in terms of lambda calculus. I took a day to read about all that stuff and at some point so many things fell into place. I learned CS theory in school, learned ML, but it's not the same as being confronted by a seemingly monstrous software project and then realizing ... omg, everything is relational and I can just write an interpreter. No longer asking "how do I write this in ruby/java/js ..." but how do all of these things relate to each other and if which language would be best for encoding my invariants. All kinds of ML and AI fields go from "data science, math stuff ... disregard" to a fascinating universe of answers to questions that you already have in your head for how to solve your real world software problems. The usefulness of macros became obvious and custom monads are rewarding achievements. Closures, instead of being occasional conveniences, became a swiss army knife for eliminating explicit data structures.
Not for all projects of course, but when building something enterprisey, simulated, or creative where users can model their own domain I believe that at least being familiar with the theory is not optional. I'm also somewhat convinced now that most "10x programmers" are maybe ~2x programmers who have simply encoded their expertise into a private DSL using JetBrains MPS or something. Allowing themselves to spend more time snowballing their skills and knowledgebase, and less time doing repetitive tasks and managing incidental complexity.
Oh also, I started using linear constraint solvers for automatically solving small to medium sized problems. You'll usually see them used for UI layout constraints, but that's just the beginning! For example, say you're building a small scheduling system, or a lightweight recommendation system that lies somewhere in between an if-statement and a full blown classifier, or you're writing some arbitrary last-minute business rule for a client where several things depend on each other with varying levels of weights/importance. If you know some things are linear, and the problem is unlikely outgrow the solver, then save yourself hours or work and just solve it at runtime!
- mulcahey 10y agoYou should write some blog posts or something about this. As someone just finishing up their undergrad I'd love to hear about these applications and detailed examples.
- rocqua 10y agoDo you have any good sources for reading up on lambda calculus?
- lopatin 10y agoI started here http://worrydream.com/AlligatorEggs/ http://worrydream.com/AlligatorEggs/. Great intro article and my favorite visual explanation. The alligator system helped me visualize the dynamics of the system. However, about 3/4 of the way down, the pictures start being harder to follow than the bottom section of the page where he notates Church numerals and the Y-Combinator (without even defining what they are, which I find hilarious given how "for-dummies" the article starts out as). So what are Church numerals? And what's so important about the Y-Combinator that pg would name his company after it? I didn't know either, and the journey begins! But also, just download clojure to mess around with a Lisp. Once you feel comfortable with the basics, check out core.logic.
- ronald_raygun 10y agoI really enjoyed An Introduction to Functional Programming Through Lambda Calculus - by Greg Michaelson It helps you build it up through basic building blocks