> All in all, I guess this is the result of a company that has more money than they possibly know what to do with. I wonder how long this utopian "do no evil" culture can last. Wealth creates power, and power corrupts. And boy, have I seen a lot of power this last week.
Another interesting addition would be to warn drivers if a close by car/driver also had a bad driving history. May be also track if the close by car started of from a bar/restaurant and weight the probably of the driver ending up with a crash with other cars in the vicinity
I have done something similar using https://pybowler.io/. This library wraps the LibCST library and abstracts away some of the refactoring operations into nice wrapper functions.
I am curious. Why do you think it helps it doing things on the stack. For me, I understand this to provide more generic type level checks on the size/shape of values. Perhaps, I am oversimplifying this?
Can you eloborate on what kind of projects you work on which has made the move easy from Python to OCaml. While I love OCaml I have not heard positive things about the library eco-system in terms of variety and maintenance. Perhaps, you could throw some light on that based on your experience, especially after giving up the eco-system Python provides you.
This is a sincere question and would love to find good excuses to adopt OCaml as my primary language of choice.
Have you considered using ipython as your REPL? I use ipython and in my profile, I have the following setting. This enables auto-reload and it works almost all the time.
Here is the option I have in my profile file. You can run this command inside the ipython session as well:
%autoreload 2
The times I have seen auto-reload fail is when there is lot of class creation magic going on or while dealing with global connection objects which sql alchemy might be creating. But, other than that it works very nicely.
I took the same path and went back to reading SICP. But, this time around is was very easy. I had the same experience about implementing closures and the embedded language.
I already see some good responses to your question.
As for me, before this course, learning a language was a mechanical process. I learn the syntax, learn some idioms and go with it. But, after this course, as the other commenter put it, I started learning every language as a set of features. That opens up a whole new world. For instance, when learning a new language, you seek out the features your are interested in and then figure out how that language lets you use it. For example, does a language support abstract data types, what paradigms of programming does it support, is it imperative or functional, lazy or strict, is the language supposed to be used as a bunch of statements or expressions, can common idioms be implemented as simple language functions or do I need the language to support it internally etc, does it support lambdas, does it do lexical or dynamic binding etc. The course also takes you through ML, Racket and Ruby and gradually exposes you through this concepts and in parallel explains what the trade-offs are as you give up once paradigm for another.
So, after the course, next time if you open up a beginners guide to any language, you will be seeking our answers to high level questions. The syntax to use will be learned automatically as you use those 'concepts'
Dan Grossman is a an excellent teacher. His passion for programming languages can be seen in his teachings. The homeworks are very relevant and helps you solidify the concepts. I am thankful to him for offering this course.
> The benefit of State and IO monads is not that you can use them everywhere so you now have an imperative language. The benefit is you can explicitly delimit their use, and you still get the "easier to reason about" for the rest of the code.
It is also important to note that apart from providing the ability to write imperative code, monads encapsulate computation. In my understanding, this is where their use shines. Getting to wrap values in such contexts in certain imperative languages could be tedious. Using a monad, one passes around the value within the context of the monad. There is a computation(aka context) that is associated with the value in the monad and that computation is performed before a value is yielded.
The example you quoted is probably the very basic of operators and idioms being used. These operators have standard meaning in terms of fmap and applicatives.
But, I agree with you that there are obscure operators scattered around the code base and I have to keep jumping away from that point to lookup what the particular operator means in that context.
I work on Python and the Pandas data frame is one of the core data structure that is used in the implementation. I have been thinking of how I can translate this code in a more robust type checking language such as Haskell, without loosing some of the conveniences Pandas provides. Do you have any suggestions or pointers to this?
I would love to encode the business logic into types. But, I am always afraid I might end up in type hell!
Actually, I think a search engine's capability directly adds value to SO. Even, before SO, there were different forums and searching (Google and before that alta vista) could help you find at least a few answers, though not as comprehensive as SO in some respects.