Most active commenters

    ←back to thread

    193 points ingve | 12 comments | | HN request time: 1.346s | source | bottom
    Show context
    mikojan ◴[] No.43712753[source]
    In another life I will be a Haskell programmer
    replies(6): >>43712991 #>>43713006 #>>43713074 #>>43714014 #>>43714156 #>>43716535 #
    1. revskill ◴[] No.43713006[source]
    Why not python ?
    replies(3): >>43713045 #>>43713108 #>>43714465 #
    2. linguae ◴[] No.43713045[source]
    I’m not the OP, but static types, Hindley-Milner type inference, algebraic data types, and pattern matching can be quite ergonomic. I have also come to appreciate functional programming and how it makes reasoning about and testing code easier.
    replies(2): >>43713201 #>>43713342 #
    3. xboxnolifes ◴[] No.43713108[source]
    They really aren't anything alike at all.
    4. kqr ◴[] No.43713342[source]
    Yeah, just last week I updated the numeric precision of a value across an entire user journey in a big enterprise application, spanning many functions and data types. Thanks to Haskell, I could do it in a day.

    In any other language I've used (barring maybe Ada) that is a refactoring that would take at least days, if not weeks, to manually track down all the places it interacts with the system directly or indirectly, because mixing e.g. int with long long is not a type error.

    In Haskell, I change the type and the compiler spits out a list of locations that needs to change. This is repeated for a few iterations until all transitive interactions are worked out. Done!

    5. tasuki ◴[] No.43714465[source]
    No one wants to be a python programmer. It's a practical language to get things done. It isn't a language to make you feel proud of yourself nor about the current state of our industry.
    replies(3): >>43715762 #>>43716452 #>>43724201 #
    6. Philpax ◴[] No.43715762[source]
    The concept of "the Pythonic Way" indicates to me that there are people who are proud of being Python programmers.

    May God have mercy on their souls.

    replies(1): >>43724409 #
    7. sgarland ◴[] No.43716452[source]
    I’ve enjoyed making it go faster by finding quirks, but at this point it’s mostly become “OK, what else can I offload to C?”

    I should really learn Rust. Or Zig. I tried Nim (best of both worlds, Python-esque code that compiles to C!), but it wasn’t nearly as fast as my Python + C for my specific use case.

    replies(1): >>43719330 #
    8. knighthack ◴[] No.43719330{3}[source]
    What exactly do you write, where your Python+C is faster than Nim which compiles to optimized C?
    replies(1): >>43719502 #
    9. sgarland ◴[] No.43719502{4}[source]
    Generating millions of rows of synthetic data for testing RDBMS.

    Tbf, I didn't spend much time trying to optimize the Nim code once I got a working PoC, so it's entirely possible that I could've made it faster.

    replies(1): >>43721105 #
    10. cb321 ◴[] No.43721105{5}[source]
    You may no longer be interested in this kind of thing, but if you are there might be some ideas of note over at https://github.com/c-blake/nio/blob/main/db-bench.md (in particular the demo/gbyGen.nim program).
    11. butterisgood ◴[] No.43724201[source]
    Can’t stand Python. Have to use Python. Wish it would DIAF to be honest.
    12. revskill ◴[] No.43724409{3}[source]
    Could u be more specific ?