9 ms·
There is a strange... kind of poetry with Haskell. It is like math on wheels, math applied to procedures, math with... time. Its appeal to me is like the appea
by avindroth 6y ago
There is a strange... kind of poetry with Haskell. It is like math on wheels, math applied to procedures, math with... time.
Its appeal to me is like the appeal of math to me, not like real analysis math but abstract algebra math. The beauty, the purity of mathematics of younger days that once became lost after encountering the sad complexities of the world. Understanding every little aspect and being able to prove every part is now a luxury, and interfacing without real understanding is the more practical approach in the turbulent waters of poorly connected technological and social systems.
But still there is hope and there are dreams. We like to drench ourselves in dream qualia sometimes, and Haskell and pure math are that medium. The abstractions of it, the consistency of it, the purity of it... When Haskell is called a pure language, it almost goes beyond the static definition of functions being pure, and describes the general feeling that occurs when writing Haskell. You feel pure. You feel like you are taking these small parts and creating greater parts in an elegant buildup of abstractions, traversing one level higher and one level lower at your whim.
Lisp... maybe it’s the parentheses, maybe it’s something else... it never really caught onto me like Haskell did. Haskell feels pure and dream-like and perhaps unsuited to the world where (if you really get down to it) abstractions and types are just useful ‘human’ inventions and unfit for every usage. The world is for getting down and dirty, and mathematics, or at least the pure side of it, really isn’t. The representative mathematics of Haskell is Category Theory, and it is just as far from the level of “real” as it can be. More abstract than abstract algebra, if you will.
Abstraction itself is an intellectual operation that is also rooted in emotional detachment. Perhaps Haskell represents that kind of ideal in a modern world where practicality pays before purity.
- enriquto 6y agoI followed a (pure) mathematics education, and I totally dig lisp. On the other hand, I abhor haskell and hate almost everything about it!
- alentist 6y agoThis comment would be more informative if you briefly explained why you abhor it and hate almost everything about it.
- enriquto 6y agoYep, sorry. This is a matter of feeling, completely irrational, but just my experience. When I program in lisp I get the same feeling when I'm solving an ODE by hand, or a Diophantine equation, or designing a numerical method to approximate the solution of a PDE, or finding the Euler-Lagrange equations of a physical problem. The thing is real and it gets shit done really fast; it is just exhilarating. Moreover, lisp macros are so dirty and fun that using them feels like kinky sex. Haskell is like category theory. Sure, it is pure and general, and you can create set theory and the rest of math from it. But it is certainly the most boring thing that I can think about. But hey, whatever floats your boat.
- garmaine 6y agoSounds more like applied math...
- eru 6y agoNothing wrong with applied math. It's still math.
- garmaine 6y agoFrom the grandparent post: > I followed a (pure) mathematics education...
- eru 6y agoOh, OK, that's what you meant. Makes more sense. I'm not so quick in judging people by how applied they are. We mathematicians always try to come up with new pure fields, but then some other people always come and find some applications. Just see how cryptography and computer science sullied our beloved number theory! (I mostly focused on the computer-science-y parts of math in my studies. Thinks like linear optimization and combinatorics. Not sure whether to count that as applied or pure. I guess I might get a purity pass, because we only ever proved our algorithms correct but seldom implemented them.)
- dan-robertson 6y agoI also followed a pure maths education. I like lisp (in the CL/emacs lisp family more than scheme which tends to have smaller composable functions) and Haskell. I find some parts of Haskell culture/styles to be quite silly however, and fewer parts of the lisp community to be silly. But that may just be because of Haskell’s greater popularity.
- LesZedCB 6y agois haskell more popular now? what about clojure?
- eru 6y agoPerhaps greater memetic popularity?
- nickbauman 6y agoI find that the complex syntax of Haskell is something I'll never be able to remember. There's so much implied in the syntax. Lisp is so much more readable and thinkable-inable because there's almost no syntax. No other language is as easy to think in. But I've never studied math beyond pre-calc.
- ccortes 6y agoMe too and I like Haskell the most just because I feel like it's closer to math than clojure. If I want to solve a problem I can think of it a a series of maps f: X -> Y and once I solve it on paper "translating" into Haskell just feels natural. It's also super easy to do that in clojure, maybe I'm just baised because I found and learned Haskell first. Now days I use clojure for everything and it's amazing. I never enjoyed programming so much until I discovered the functional paradigm. It just feels right.
- nine_k 6y agoI'd hazard to say that the abstract algebra is more foundational, more of a bedrock on which the sophisticated cathedrals like complex analysis can be built.
- centimeter 6y ago"Dream-like" is a good adjective for Haskell programming. Sometimes when writing Haskell I just zone out and let my subconscious do whatever it wants, and the type system provides enough structure that this usually gets you working code. It's a very fun creative exercise.
- gandalfgeek 6y agoVery much agree. When solving a problem with Haskell one first has to step back and think in terms of what algebra the underlying domain objects satisfy, then encode that in a combination of Haskell's type system + pure functions. It takes a lot of thought, but if done right, it feels like cracking an elegant proof.
- mncharity 6y ago> There is a strange... kind of poetry with Haskell. It is like math on wheels [...] pure and dream-like For me too there is a feeling of poetry... but for me it's more the nails-on-blackboard grating of awful poetry, and the ice-pick-to-ears screeching of abrading subway wheels. :) Lisps merely inspire me towards elegant craftsmanship. But Haskell tempts me to dream of more. It's my fault, but ouch. Dreams of math made manifest. Of materializing a lattice of theories, each with types and operators and laws, simply extensible and composable - a push-out lattice. Dreams of programming that's more math than plumbing. And maybe someday, some future Haskell Next will permit that flight, that dance. But that's not Haskell. Someone I know, will pull up the deep math of a problem domain, model it in Coq, and mentally compile it to Haskell, extending GHC internals as needed to better serve as compiler target. For a wetware compiler that gets only very limited support from current tooling. I can't do that. Not even close. I need a language and tooling that's on the same page as me, to serve as an extended self. And for this, that's not Haskell. Many years back, someone in a conversation suggested a core skill of a professional C++ programmer, was cataloging the things which seem like good ideas, and might even serve well in some other OO language, but which tended to go badly in that era's C++. Along with many baroque workaround to salvage others. Fewer years back, I'd a conversation about using Haskell in education. We talked of alternate preludes to remove historical clutter, and extensions to remove historical limitations. And turned up a fun divergence - he thought of learning Haskell as fairly easy, and I thought of it as ghastly hard. For his default context was programming in the small - vocabulary, functional mindset and such. And mine was... you the start at the other end, with the dream, the no-extraneous-complexity pure essence of what is needed... and now you have to learn the zoo of baroque work arounds, and crippling limitations, by which Haskell fails the dream.
- kizer 6y agoGod, reading these comments generates inspiration in me to create a pristine, beautiful language for you all to lust over. Lolol
- mncharity 6y agoThat might ironically go better starting from a Lisp-like dynamic language. "Just add types". Because the static typing side is hard, advancing one paper and thesis at a time. The poorly-funded multi-decade creeping installment plan of progress. Even with category theory, the overwhelming emphasis is on using it for proof rather than for its expressiveness. A fun example... from a very collegial course in pre-Covid January, sniff... Categories work over PreSets - no predicate of member equality required. But say I claim to be handing you a PreSet. You can't verify that claim. Your ability to prove anything is very limited. Sad for mathematicians. But fine as API. But that's not where attention is.
- cel1ne 6y agoMath with time (and space/memory)... You just found the difference between computer science and math. And the reason proof-of-work in blockchains is possible.
- nine_k 6y agoRegarding time... It's sometimes not easy to say what happens when in a Haskell program. Yes, monads give you a sequence, but it's usually not the one sequence of an imperative language.
- nybble41 6y agoIndeed. And while monads provide a certain kind of sequence, it's important to remember that what is being sequenced is just some data dependencies—later effects can depend on the result of earlier effect. The evaluation order can be completely different depending on the type of monad and how the data is actually used. For an extreme example, take the forward & backward state (or "Tardis") monad[1], or for that matter any monad that implements MonadFix (including IO). The fact that the code is written in some order using a monad does not imply that it gets evaluated in that same order. [1] https://hackage.haskell.org/package/tardis-0.4.1.0/docs/Control-Monad-Tardis.html https://hackage.haskell.org/package/tardis-0.4.1.0/docs/Cont...
- kizer 6y agoBest and worst thing about programming to me: it can be applied. Pro: I get to make good money with my “art” of choice. Con: I have to create hideous monstrosities.
- pyrale 6y agoPaid haskeller here. That feeling you describe quickly goes away when you use the language everyday. Once that happens, you can start weighting it as a tool. And overall, my assessment is that purity and practicality are not competing aspects. I would say that purity conttibutes to the practicality of haskell.