Live data from Hacker News

Lost in Math?

cacm.acm.org

1–10 of 73 posts

Re: Lost in Math?

#2
Related: Dijkstra's comments on mathematics and CS - http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW....

I've personally been getting a lot of satisfaction from learning Haskell and seeing how the functional programming community is taking ideas from abstract mathematics, like category theory, and is turning them into practical ways of thinking about programming.

Re: Lost in Math?

#3
I haven't been in the developer industry for too long, but excepting the haskell community, I would say that the way CS tends to treat math is as guardrails, as in, "you can't do that because of the halting theorem". "you might be butting up against computational complexity if you try doing it this way". "reconstruction of this data shard is impossible because you don't have enough points to determine the equation".

In the FP communities, I do sometimes see people overoptimize for TCO. Your datastructure is never going to be more than 10-100 deep. Don't worry about it. Just write the most legible recursive algorithm, not the most performant.

Re: Lost in Math?

#4

Related: Dijkstra's comments on mathematics and CS - http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW... . I've personally been getting a lot of satisfaction from learning Haskell and seeing how the functional programming community is taking ideas from abstract mathematics, like category theory, and is turning them into practical ways of thinking about programming.

Me too. Listened to a podcast recently where they were talking about things like, "once you know what a monoid is, you start seeing them everywhere". I've tried to express these benefits to coworkers recently. Leveraging ideas from math allows you to take advantage of many decades of research and provides a structural foundation that's substantially more robust than things you might find in the gang of four book or other "design pattern" resources. I think there's still a lot of opportunity to bring these ideas to the masses in the way that Evan Czaplicki , the author of Elm, is trying to do. The challenge in doing so seems to be finding the right level of abstraction to expose people to with the goal of maximizing benefit while simultaneously minimizing the prerequisite knowledge you're requiring folks to take on to participate.

Re: Lost in Math?

#5
post #3

I haven't been in the developer industry for too long, but excepting the haskell community, I would say that the way CS tends to treat math is as guardrails, as in, "you can't do that because of the halting theorem". "you might be butting up against computational complexity if you try doing it this way". "reconstruction of this data shard is impossible because you don't have enough points to determine the equation".…

Hmm? My queues and stacks are >100 deep.

My graph traversals are >100 deep.

My recursive calculations are >100deep

Dynamic programming wouldn't be relevant if non-tail recursion was always good enough in practice.

Re: Lost in Math?

#6

Related: Dijkstra's comments on mathematics and CS - http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW... . I've personally been getting a lot of satisfaction from learning Haskell and seeing how the functional programming community is taking ideas from abstract mathematics, like category theory, and is turning them into practical ways of thinking about programming.

"practical" is highly debated.

Re: Lost in Math?

#7
post #5
post #3

I haven't been in the developer industry for too long, but excepting the haskell community, I would say that the way CS tends to treat math is as guardrails, as in, "you can't do that because of the halting theorem". "you might be butting up against computational complexity if you try doing it this way". "reconstruction of this data shard is impossible because you don't have enough points to determine the equation".…

Hmm? My queues and stacks are >100 deep. My graph traversals are >100 deep. My recursive calculations are >100deep Dynamic programming wouldn't be relevant if non-tail recursion was always good enough in practice.

I was obviously referring to a different you. Yes, there are (many) cases when tco is 100% a great idea.

Re: Lost in Math?

#8
post #6

Related: Dijkstra's comments on mathematics and CS - http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW... . I've personally been getting a lot of satisfaction from learning Haskell and seeing how the functional programming community is taking ideas from abstract mathematics, like category theory, and is turning them into practical ways of thinking about programming.

"practical" is highly debated.

[deleted]

Re: Lost in Math?

#9
But complexity theory aims at describing the performance of A over the space of all problem instances and it does so by abstracting away from individual problem instances.

I appreciate the effort to extend the story into CS, but I wonder if you have to be familiar with the particular work he's alluding to. The charge (as leveled against theoretical physics) is not that some people do pure mathematical work for the sake of beauty. The charge is that people who are supposed to be applying mathematics to reality are instead prioritizing mathematics and neglecting reality. To extend the analogy to CS, he must be talking about researchers supposedly trying to model real systems but instead just chasing beautiful math, but he isn't specific. Is it obvious to people in the know who or what he's talking about?

For practical programmers, I think the problem is the reverse of being "lost in math." Practical programmers use extremely general theoretical results because they don't want to do math, not because the math is more beautiful. If they applied the information they know about their particular problem, they could get more useful mathematical results, but since they want to stay as far away from (doing) theory as possible, they use whatever facts they remember from class, which are ironically the most purely theoretical ideas because those are the simplest and easiest to remember.

Re: Lost in Math?

#10

Related: Dijkstra's comments on mathematics and CS - http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW... . I've personally been getting a lot of satisfaction from learning Haskell and seeing how the functional programming community is taking ideas from abstract mathematics, like category theory, and is turning them into practical ways of thinking about programming.

Me too. Listened to a podcast recently where they were talking about things like, "once you know what a monoid is, you start seeing them everywhere". I've tried to express these benefits to coworkers recently. Leveraging ideas from math allows you to take advantage of many decades of research and provides a structural foundation that's substantially more robust than things you might find in the gang of four book or o…

I think it depends on what you are doing. If you are just doing API plumbing, the idea of introducing more rigor into the process may seem somewhat absurd. If you are doing real programming, however, Haskell allows you to elegantly structure and think about a problem. Certainly in parsing applications Haskell is a no brainier, Pandoc is written in Haskell for example. People are saying Rust is going to be the chosen one that brings it all together.

For anyone interested in Haskell, I recommend starting with http://learnyouahaskell.com/ (very friendly, intuitive and light) then doing these exercises: https://github.com/data61/fp-course.

Post reply on HN