Readit News logoReadit News
bedman12345 commented on Type Theory and Functional Programming (1999) [pdf]   cs.cornell.edu/courses/cs... · Posted by u/fanf2
jghn · 2 months ago
"makes things safer and more elegant, but I have never seen that in reality."

This is the claim that you're making. And yet terms like "elegant" have no objective definition.

bedman12345 · 2 months ago
> And yet terms like "elegant" have no objective definition.

Why does that matter? You seem to really think one needs objective definitions? It should be clear that whether a definition is objective or not is subjective itself. The question is whether there is some shared experience. And most people agree on what’s simple and what isn’t. You can now argue that’s all cultural, but that’s also a rather ridiculous position. We all experience advanced math as more complicated than 2 word sentences and so on. And I’m arguing, using my experience and examples, that functional programming is unnecessarily complicated. Requiring objective measures either misses the point. It’s really not a reasonable ask.

bedman12345 commented on Type Theory and Functional Programming (1999) [pdf]   cs.cornell.edu/courses/cs... · Posted by u/fanf2
jghn · 2 months ago
No, your comments are nonsensical without it. You claim things as being inherently hard to read and understand. But this is a matter of one's personal context and experience. There are things that I'd find hard to read that you would not, and vice versa.

Just because you don't like something doesn't make it universally bad.

bedman12345 · 2 months ago
> You claim things as being inherently hard to read and understand.

I don’t.

> But this is a matter of one's personal context and experience. There are things that I'd find hard to read that you would not, and vice versa.

Obviously.

> Just because you don't like something doesn't make it universally bad.

Not my point.

My claim is that most people who want to be good software engineers can spent their time better than doing functional programming. I’m trying to disprove the opposite claim. That claim being that you’d learn something important from doing it or that functional programming offers something important to the programmer. I’m simply sharing the result of my journey through it so that others don’t have to make the same mistake. If it’s fun to somebody they should of course do it. What upsets me is that I was caught up in this delusion that functional programming is worth spending significant time on.

bedman12345 commented on Type Theory and Functional Programming (1999) [pdf]   cs.cornell.edu/courses/cs... · Posted by u/fanf2
jghn · 2 months ago
> It’s really complicated > hard to read

You did not provide objective measures. You're just providing subjective opinions.

bedman12345 · 2 months ago
True. My statements are meaningful because of that. The objective measures we could agree on are obvious, so they need not to be stated. The heart of the debate is about the things that are hard to measure. As most things in software engineering. I ignored your question because it is a bad one.
bedman12345 commented on Type Theory and Functional Programming (1999) [pdf]   cs.cornell.edu/courses/cs... · Posted by u/fanf2
jrrv · 2 months ago
The Haskell looks much better, and I don't even know Haskell.

> If you know simd it’s easy.

Surely "if you know Haskell it's easy" is equally applicable.

bedman12345 · 2 months ago
> The Haskell looks much better, and I don't even know Haskell

Plain crazy take. The c example uses basic coding to implement some clever maths with special fast instructions. Thehaskell example is just some dumb algo implemented with complicated programming. There is obviously nothing good about that.

You can also look at a c example without simd https://benchmarksgame-team.pages.debian.net/benchmarksgame/... It’s shorter and simpler and faster than the Haskell version. It’s not even close???

bedman12345 commented on Type Theory and Functional Programming (1999) [pdf]   cs.cornell.edu/courses/cs... · Posted by u/fanf2
jghn · 3 months ago
Can you provide objective measures for "terrible code" and then examples of what you're describing?
bedman12345 · 2 months ago
It’s slow. Example: quicksort [] = [] quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = filter (< p) xs greater = filter (>= p) xs

It’s really complicated. Everybody includes lenses https://hackage.haskell.org/package/lens I don’t want to read all that stuff just for imperative syntax.

It’d both slow and hard to read. Compare these two: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

The c examples complexity lies in using SIMD. If you know simd it’s easy. You should know simd, it’s useful. The Haskell example is drivel. Long complicated and in the end hopelessly slow compared to the c example. You could als use simd in Haskell, but then it would just be C with extra steps.

bedman12345 commented on Type Theory and Functional Programming (1999) [pdf]   cs.cornell.edu/courses/cs... · Posted by u/fanf2
bedman12345 · 3 months ago
Man I hate functional programming so much. Please, to anyone reading this. Don’t waste your time on this stuff. They always try to claim functional code makes things safer and more elegant, but I have never seen that in reality. These ideas seem to produce terrible code first and foremost.
bedman12345 commented on Why Haskell?   gtf.io/musings/why-haskel... · Posted by u/mesaoptimizer
pyrale · a year ago
That's a problem no haskell user has, honestly. Your issue seems to be about getting your feet wet. Could you imagine people saying the issue with Java is its extremism towards objects and method calls?

Sure, a determined Fortran programmer can write Fortran in any language, but if they have trouble doing so, maybe the issue isn't the language.

bedman12345 · a year ago
> Could you imagine people saying the issue with Java is its extremism towards objects and method calls?

I think exactly that all the time. It’s ridiculous.

> That's a problem no haskell user has, honestly.

I had this problem all the time when trying to write games in Haskell. Not every subject matter decomposes into semirings. Just like not everything decomposes nicely into objects. People tried to fix this with FRP or lenses. Both are worse than imperative programming for games imo.

bedman12345 commented on Why Haskell?   gtf.io/musings/why-haskel... · Posted by u/mesaoptimizer
Coolbeanstoo · a year ago
I would like to use haskell or another functional language professionally.

I try them out (ocaml,haskell,clojure,etc) from time to time and think they're fairly interesting, but i struggle to figure out how to make bigger programs with them as I've never seen how you build up a code base with the tools they provide and with someone to review the code i produce and so never have any luck with jobs i've applied to.

On the flipside I never had too much trouble figuring out how to make things with Go, as it has so little going on and because it was the first language i worked with professionally for an extended period of time. I think that also leads me to trying to apply the same patterns because I know them even if they dont really work in the world of functional languages

Not sure what the point of this comment is, but I think i just want to experience the moment of mind opening-ness that people talk about when it comes to working with these kinds of languages on a really good team

bedman12345 · a year ago
I’ve been working with pure functional languages and custom lisp dialects professionally my whole tenure. You get a whole bag of problems for a very subjective upside. Teams fragment into those that know how to work with these fringe tools and those who don’t. The projects using them that I worked on all had trouble with getting/retaining people. They also all had performance issues and had bugs like all other software. You’re not missing out on anything.
bedman12345 commented on Why Haskell?   gtf.io/musings/why-haskel... · Posted by u/mesaoptimizer
axilmar · a year ago
My question for Haskellers is how to do updates of values on a large scale, let's say in a simulation.

In imperative languages, the program will have a list of entities, and there will be an update() function for each entity that updates its state (position, etc) inline, i.e. new values are overwriten onto old values in memory, invoked at each simulation step.

In Haskell, how is that handled? do I have to recreate the list of entities with their changes at every simulation step? does Haskell have a special construct that allows for values to be overwritten, just like in imperative languages?

Please don't respond with 'use the IO monad' or 'better use another language because Haskell is not up for the task'. I want an actual answer. I've asked this question in the past in this and some other forums and never got a straight answer.

If you reply with 'use the IO monad' or something similar, can you please say if whatever you propose allows for in place update of values? It's important to know, for performance reasons. I wouldn't want to start simulations in a language that requires me to reconstruct every object at every simulation step.

I am asking for this because the answer to 'why Haskell' has always been for me 'why not Haskell: because I write simulations and performance is of concern to me'.

bedman12345 · a year ago
An example of how to use the io monad for simulations https://benchmarksgame-team.pages.debian.net/benchmarksgame/... It’s one of the nicer to read ones I’ve seen. Still is terrible imo.
bedman12345 commented on Hacking on PostgreSQL is hard   rhaas.blogspot.com/2024/0... · Posted by u/fletchr
MBlume · 2 years ago
Coming at this from a naive outsider perspective, the central problem described in the post (commits to PostgreSQL frequently have serious defects which must be addressed in follow-up commits) seems like one that would ideally be addressed with automated testing and CI tooling. What kind of testing does the Postgres project have? Are there tests which must pass before a commit can be integrated in the main branch? Are there tests that are only run nightly? Is most core functionality covered by quick-running unit tests, or are there significant pieces which can only be tested by hours-long integration tests? How expensive is it, in machine-hours, to run the full test suite, and how often is this done? What kinds of requirements are in place for including new tests with new code?
bedman12345 · 2 years ago
Most database companies run only a small amount of tests before committing. After committing, you run tests for thousands of hours. It sucks. You probably do this all day every day. You just run the tests on whatever you have currently committed. you kind of have to be careful about not adding more tests that make it take much much longer. See https://news.ycombinator.com/item?id=18442941

u/bedman12345

KarmaCake day31February 26, 2022View Original