Earlier quoted context omitted.
"The pursuit of knowledge shouldn't be dampened by silly things like getting a job." Here's how I just read this: "The pursuit of what makes me look good shouldn't be dampened by silly things like serving people other than myself". And than just to dampen that statement, you added "Haskell made me a better programmer", which clearly implies you got a job, serving the needs of others. Would it be fair to say you are m…
I'm not the person you're addressing, but - yes, you're wrong. (And an asshole to boot, but that's another issue.) "Getting a job" has absolutely nothing to do with "serving others," except maybe in the slavery sense of "serving," depending on your politics. The point is that universities are supposed to be dedicated to knowledge and understanding for their own sakes. It's not about "looking good," and I have absolut…
Dijkstra on Haskell and Java (2001)
101–110 of 124 posts
Re: Dijkstra on Haskell and Java (2001)
#102Earlier quoted context omitted.
They actually do this at the University of Chicago. That's exactly the introductory sequence. The first class in the major is in Racket (Standard) or Haskell (Honors). The second class in the major is in C, and also covers basic UNIX tools. The third class is in x86 assembly and C, focused on understanding low-level systems.
I wish I was there. My curriculum at Carleton University is 1. Intro to CS in Python ending with a taste of Java 2. Java 3. C (intro to UNIX) 4. C++ (design first, implement after, waterfall, etc.) Along with 3 there is data structures taught in Java [0] and with 4 there is web dev taught in Node.js. 0: Following this text: http://opendatastructures.org/ Taught by its author, Dr. Pat Morin.
"Functional" programming is taught in third year (COMP 3007), but you don't get too deep into it.
My issue with the listed classes isn't the chosen languages. A commenter mentioned that you can learn a lot of functional (and other) concepts in a procedural or object oriented language. My issue is that I basically learned the same concepts over and over again, just using different programming languages. You learn to iterate over a multidimensional array in Java, and then you do so again with C, but you have to deallocate and reallocate, and then you do it in C++, but you create an object for the array. It's all the same stuff.
Re: Dijkstra on Haskell and Java (2001)
#103Earlier quoted context omitted.
In tests and homework, we would implement the one-liner quicksort with paper and pencil, much like a math test. In a pencil implementation of that Haskell, it is n log(n). Each line on the paper represented one level of recursion. Implementing it on silicon requires the trade-offs you mention. But silicon is just an implementation left to the reader... EDIT: I guess where I'm coming from, Haskell was used in the cont…
I'm not disputing the scaling properties of the Haskell one-liner, but it doesn't give you the benefits of the true QuickSort as your comment suggests, e.g. it doesn't guarantee in-place sorting or efficient use of when access be locked. The point is, I find it questionable to praise Haskell for how you can implement a one-line QuickSort that isn't really a QuickSort.
Haskell says nothing about how lists are implemented, so with respect to "true"ness (I'm not really sure what this means), we can cannot generalize. A sufficiently optimized Haskell compiler implemented in silicon would have the liberty of using the memory in-place.
Re: Dijkstra on Haskell and Java (2001)
#104Earlier quoted context omitted.
I'm not disputing the scaling properties of the Haskell one-liner, but it doesn't give you the benefits of the true QuickSort as your comment suggests, e.g. it doesn't guarantee in-place sorting or efficient use of when access be locked. The point is, I find it questionable to praise Haskell for how you can implement a one-line QuickSort that isn't really a QuickSort.
Each list comprehension is O(n). O(n)+O(n)=O(n). Each iteration will roughly bisect the list, resulting in roughly log(n) iterations. Thus the one-liner is O(n*log(n)). Haskell says nothing about how lists are implemented, so with respect to "true"ness (I'm not really sure what this means), we can cannot generalize. A sufficiently optimized Haskell compiler implemented in silicon would have the liberty of using the m…
"I'm not disputing the scaling properties of that sort" = this proof does not convince me of anything I didn't already agree with. Was I unclear about what I was objecting to?
> Haskell says nothing about how lists are implemented, so with respect to "true"ness (I'm not really sure what this means), we can cannot generalize. A sufficiently optimized Haskell compiler implemented in silicon would have the liberty of using the memory in-place.
"Trueness" means "doing the real QuickSort". The one you posted doesn't. You can get the real QuickSort, but not with one line. A better compiler might identify useful invariants; you were not using such a compiler.
But if you had such a compiler, you wouldn't need to write I that way; you could just specify what conditions the final sort would obey, and that would be enough. You wouldn't need to tell it to filter explicitly.
Re: Dijkstra on Haskell and Java (2001)
#105Earlier quoted context omitted.
hmm, if we called them what they are we'd call them "type wrapper functions" and talk about "type wrapper function chains", monads carries zero metaphorical/associative meaning. I think thats the problem with the name and a large reason people find them so unapproachable, most other terms in computer science carry significant associative meaning that helps in learning them, pointers have to do with pointing at things…
You're demonstrating that you don't know what monads are. "Type wrapper function" could mean any number of things (lack of specificity is a bad trait in naming), but it couldn't mean a monad: monads consist of three things, whereas "type wrapper function" implies one thing. Names don't need to be metaphorical. The purpose of a name is not to teach you what the thing is. For that, you should have a proper explanation…
Re: Dijkstra on Haskell and Java (2001)
#106Earlier quoted context omitted.
and monads I really don't understand why people have such issues with monads. I don't have a haskell background and originally built up most of my functional programming skill in Python (going somewhat against the grain) and I find monads to be a fancy scary term for an extremely simple concept. I think if they were named something friendlier perhaps people's eyes wouldn't immediately glaze over and they could realis…
> controlling how things are executed/computed. No...see...you understand a monad. That is not the same thing as groking "Monads" in the abstract sense. For instance, I don't think the State monad really has anything to do with how things are 'executed/computed'
Re: Dijkstra on Haskell and Java (2001)
#107Earlier quoted context omitted.
and monads I really don't understand why people have such issues with monads. I don't have a haskell background and originally built up most of my functional programming skill in Python (going somewhat against the grain) and I find monads to be a fancy scary term for an extremely simple concept. I think if they were named something friendlier perhaps people's eyes wouldn't immediately glaze over and they could realis…
I don't know if I can agree with this. I've invested a significant amount of time in learning about monads (and functors, applicatives, monoids, and more from the bestiary of commonly used category theoretic structures in Haskell) and I find them quite challenging to grasp in their full generality. While specific use-cases are readily understood, getting to the heart of what a monad "is" has taken me time, and I hone…
Re: Dijkstra on Haskell and Java (2001)
#108Earlier quoted context omitted.
and monads I really don't understand why people have such issues with monads. I don't have a haskell background and originally built up most of my functional programming skill in Python (going somewhat against the grain) and I find monads to be a fancy scary term for an extremely simple concept. I think if they were named something friendlier perhaps people's eyes wouldn't immediately glaze over and they could realis…
For me the block for a long time for monads was understanding how they made IO possible. That is, the basic ideas for things like a Maybe or similar were obvious and intuitive to me, and everyone software dev for long has done such things, even if they never think about what parts they could refactor out into something reusable. But the leap from that to how it makes IO possible without side effects I just did not gr…
Re: Dijkstra on Haskell and Java (2001)
#109Earlier quoted context omitted.
and monads I really don't understand why people have such issues with monads. I don't have a haskell background and originally built up most of my functional programming skill in Python (going somewhat against the grain) and I find monads to be a fancy scary term for an extremely simple concept. I think if they were named something friendlier perhaps people's eyes wouldn't immediately glaze over and they could realis…
How about F#'s Computation Expressions? Not exactly the same, I'm told, but they're close, if so.
Re: Dijkstra on Haskell and Java (2001)
#110Earlier quoted context omitted.
and monads I really don't understand why people have such issues with monads. I don't have a haskell background and originally built up most of my functional programming skill in Python (going somewhat against the grain) and I find monads to be a fancy scary term for an extremely simple concept. I think if they were named something friendlier perhaps people's eyes wouldn't immediately glaze over and they could realis…
I really don't understand why people think monad is a "fancy scary term". It's a five-letter easily-pronounceable word. What makes it fancy or scary? I think people assume that they're scary, and then confirmation bias themselves into making them hard to learn, despite them being a reasonably simple concept overall. As for calling them strategies… if we called them that it would make learning and understanding the in…
Sure - I wasn't seriously suggesting we rename them, just that in my personal experience, newcomers get scared off seemingly by the name alone before ever actually finding anything out about them. A friendlier name may avoid this for newcomers. It definitely wouldn't be worth it for more advanced practitioners where referring to them exactly and in the context of their category theory roots is much more useful than friendliness.