283 karma · joined Dec 10, 2011 (14y ago) · 122 submissions
comment 11y ago · link · parent
comment 11y ago · link · parent
comment 11y ago · link · parent
comment 11y ago · link · parent
http://www.ccs.neu.edu/home/matthias/HtDP2e/
This book is much more than the intro to programming that it appears to be. It is a foundational approach for producing robust programs, regardless of your implementation language or level of experience.
comment 11y ago · link · parent
I don't quite follow your observation, but if you are suggesting that this function would be better with verbose, Englishy naming, I think you are mistaken. Quite the opposite, the parametrically is better illustrated with hieroglyphs.
Regarding failing "for years as an engineering discipline", are you suggesting that imperative programming was "successful" because of the reliance on using naming to communicate intent in the midst of rampant state mutation and unbridled complexity?
comment 11y ago · link · parent
1 8 + A 5 + 0 0 + 6 5 + 0 1 + 8 5 + F A + A 9 + 0 0 + 8 5 + F B + 4 C + 4 F + 1 C
I remember how much like some kind of incantation it was. I still get that feeling. And I've had the good fortune to work some fun, powerful, and interesting magic with those incantations.
I suspect that most younger people haven't yet seen their tech choices slip into decay and disuse. And they hang on tightly, hoping to expend less effort in learning as time goes by and they master that tech. It's a vain hope. The essential part of the experience is the underlying creativity, the joy of getting to the next ledge, and really understanding what a marvelous thing a computer is.
comment 11y ago · link · parent
Watching my 5 yo work in Minecraft reminds me of the programmer "crunching entities" in the movie "The Zero Theorem".
comment 11y ago · link · parent
Idiomatic Scala is not a grab bag of features or paradigms. It is firmly based on programming with expressions and using the type system to improve abstraction. Statements and mutable data structures show up when interfacing with external systems or for performance reasons. The Collections libraries are arguably "object-oriented" as that term is commonly understood, but this is not typical for application code. However, object-oriented features such as objects, classes, and traits are the basis of Scala's module capabilities.
For programmers coming from 20th century mainstream languages that are all based on programming with statements, mutable variables, and are arguably a thin abstraction over the machine itself, programming with Scala can be a challenge. If you want to do your familiar imperative style of programming, Scala is going to be painful. Use another language. But if you would benefit from a type system and good support for expressions, then Scala is possibly the best choice currently for growing business applications. We are not in 2005 any more.
Scala is not ideal as an introduction to functional programming. Other languages, such as F#, SML, OCaml, and Haskell have better, simpler syntactic support for features associated with functional programming.
People who dislike on Scala are probably either stuck in the past or don't have pain that Scala would solve.
41.
LA Schools demand refund for iPads(latimes.com ↗)
10 points · by ericssmith · 11y ago · 7 comments
comment 11y ago · link · parent
As a side note, I know quite a bit about the early history of computing, and I was amazed how carefully Waldrop navigates these murky historical waters. Highly recommended.
comment 11y ago · link · parent
If I understand it correctly, this observation shows just what a short distance we've come in programming languages and software development since the 1960s. Verifying the correctness of a program shouldn't depend on good naming or being able to execute it in your head.
comment 11y ago · link · parent
comment 11y ago · link · parent
The historical relationship is that Eugenio Moggi wrote a paper in 1988 "Computational lambda-calculus and monads" http://bit.ly/1x9uUHQ that used ideas from category theory to handle the semantics of programming language features. His problem was that the lambda calculus itself failed to adequately handle certain "notions of computation" such as side effects and non-determinism. This inadequacy goes way back to the origins of programming language semantics, starting with Peter Landin's 1964 paper "Mechanical evaluation of expressions" http://bit.ly/1rrBit3. He described a virtual machine (SECD) for evaluating lambda expressions, but had to add special constructs for handling assignment and jumps. In case you don't know what semantics is about, imagine that you had two small programs written in two different languages. How would you determine if they were the same? One way would be to demonstrate their equivalence to a common, mathematically sound, language. That's what Landin used the lambda calculus for. But it's only good for a subset of what we understand computation to be (particalurly what a Von Neumann computer is capable of doing).
That's what prompted Moggi to look to a more encompassing branch of mathematics -- category theory -- to describe semantics. In 1991, he wrote "Notions of computation and monads" http://bit.ly/1viXT6z, which is much shorter and more accessible, but essentially the same as the previous paper. Philip Wadler, one of the original authors of Haskell and long-time functional programming researcher and educator, was inspired by Moggi's work to write (several times) a tutorial showing how Moggi's "monads" could be applied to the restrictions of functional purity. For example, to simulate the incrementing of a global variable representing a counter (of some operation), one could use a "state" monad.
The monad of Wadler (and Moggi) is really pretty simple. First, you need a way of representing one of these notions of computation. In a programming language, this is done with types. Or to be more precise, a 'type constructor' since you will want the computation to be general. For instance, if your computation changes state (eg the counter above), you might want to construct a function type that given a value, takes a state (eg integer representing the counter variable) and returns a tuple consisting of the value and some new state. I should point out that my last sentence is what makes monads so confusing and challenging in languages other than Haskell. They don't have a nice way to represent what I just said. To use Wadler's notation:
type T x = S -> (x, S)
The second component of a monad is a function that takes a value and returns a "computation" (ie, the type described above). And the third component is a function that takes one of the computations and a function from a value to a computation and returns a computation. That's a mouthful, and it requires the language to support polymorphic types and higher-order functions. If your language does not or doesn't provide good syntax for them, then monads will be an elusive and difficult concept. But as you can see, a monad is just a pattern made up of these three things. That's all ... almost.
Because of the relationship to category theory, a monad (consisting of the three components) must also obey certain rules for how these operations are expected to behave when combined in certain ways.
In fact, monads are pretty cumbersome to implement, especially when there isn't good syntactical support in a language. But they provide a general solution to certain kinds of problems which is functional in nature.
comment 11y ago · link · parent
http://www.amazon.com/Maxwellians-Cornell-History-Science/dp...
http://www.amazon.com/Oliver-Heaviside-Electrical-Genius-Vic...
comment 12y ago · link · parent
I personally believe that Landau was caught up in the spirit of the times and optimistically believed that math could be built up from "first principles". The famous kickstart to this is Hilbert's 1900 presentation. And it certainly continued up through Nicolas Bourbaki.
In fact, Landau's mathematics is presented in a somewhat archaic style and his proofs are extremely hard to follow in spots, as if he is making unstated assumptions. Overall, it is an interesting, but ultimately thankless, task to go through that book. It is a mostly a historical curiosity. The same can be said of Hardy's "Course of Pure Mathematics", which was recommended elsewhere in this thread. I find it hard to believe that anyone who recommends these books have actually read them.
To the OP, while I can relate to the goal from personal experience, after decades of going down a similar path, I can tell you that the history of math is very messy. Our textbooks and notation reflect this messiness. My recommendation is to dive into whatever part strikes your fancy, although it may help to start from where you are. For instance, if you program, you might want to get a book on physics in game programming or learn Haskell.
comment 12y ago · link · parent
"Learning Java" http://chimera.labs.oreilly.com/books/1234000001805/index.ht... seems to be a decent review of the language and ecosystem, although it doesn't cover many of the new technologies in common usage (many of which are mentioned in this thread).
comment 12y ago · link · parent
Because it doesn't refer to a key. It's more of a identifier. It would be considerably more confusing to substitute whatever key you think it should be. Cmd? Alt? Opt? Esc?
When I see "M-" in the literature, I know what that means and translate it to the relevant keystrokes. For instance, M-x for me is actually "C-[ x". I've customized it that way. However, we have a lingua franca for communicating commands despite the personalizations.
comment 12y ago · link · parent
But I could only identify with four of the seven. Mostly because I couldn't make sense of his rhetoric for the other three.
> I imagine that my passions are still rather thinly veiled in places
You got that right. But I don't deny you your right to be as passionate about it as you like. It's a debate after all.
comment 12y ago · link · parent
A list is either null or else has a head (h) and a tail (t) which is a list.
Rod Burstall picked up on this in "Proving Properties of Progams by Structural Induction" (1968) in an extension to Landin's ISWIM that used pattern matching on these. If you look closely the pattern matching was present in his if-then-else syntax, but he changed it to the more convenient "case".
comment 12y ago · link · parent
However, if you are interested to "learn FP", as in see what all the fuss is about, then there are more direct routes. My own recommendations are for Graham Hutton's "Programming in Haskell" and "Real World OCaml" (https://realworldocaml.org). There are many other good (albeit verbose) resources but these two are the shortest path (IMO) to understanding the "common denominator" and historical underpinnings of functional programming languages and functional programming. Dan Grossman's "Programming Languages" course at Coursera was also quite accessible and comprehensive, but I think it may be closed now.
comment 12y ago · link · parent
So the lambda calculus has been used as a consistent and primitive basis for understanding computation itself and how it is expressed in programming languages. I suppose it is more "equivalent" to Newton's 2nd Law than any particular way to solve a problem. It's perhaps worth remembering that Principia used geometry, not what we know of as calculus, to clarify mechanics.
comment 13y ago · link · parent
The only goal is to familiarize them with doing stuff with numbers. The 6yo's kindergarten class has heavy emphasis on math, so I try not to get in the way of what they are doing. I avoid confusion by just staying away from the same stuff (at first, I thought I'd reinforce, but that turned out to be a bad idea. The 6yo needs a disconnect from what's happening in school, not a reminder. It's tiring).
The one thing I can confidently say is that what works changes as they pick up more concepts, and have more influences on learning (ie, other parent, school, other kids). My kids are not especially smart or gifted. The trick is that we stay just at the border of what they can do. We try new things, which fuels their confidence when they get it. We practice old things, which fuels their confidence with little cost. We stay focused and brief.
I try to get as many information and pedagogical tricks as I can. But they only work, if they work, for brief points in time. Kid thinking changes much faster than adult thinking.