News for hackers. Stuff that matters.
Re:Stages of denial in encountering K by busterarm on Monday March 09, 2020 @12:21AM (#22522966)
Are reduce and lambdas really that cryptic/complex to people? I think I need an adult. -.-
Re:Stages of denial in encountering K by scarejunba on Monday March 09, 2020 @12:58AM (#22523099)
I guess the point is that while many say what you do here, many of those also say "No! Using lambdas and reduces is great but saying `+/!10` is impossibly terse".

Essentially that's just the Blub Paradox in action.

Sadly, at the moment I'm on this side of the Blub Paradox in a weird way. I do acknowledge the power of specialist syntax and short notation (studied Maths which is full of this) but haven't dedicated sufficient time to it for it to be fluid to me.

Re:Stages of denial in encountering K by ehsankia on Monday March 09, 2020 @01:36AM (#22523216)
range(100).reduce(plus, 0) isn't cryptic, what's cryptic is single character symbols. Looking at that line, unless you know K specifically, it's very difficult to figure out it's a reduce. Where as `sum(range(100))` is pretty self explanatory to most programmers who don't know python.
Re:Stages of denial in encountering K by rabidrat on Monday March 09, 2020 @01:40AM (#22523227)
Not to mention it's a lot easier to search for `reduce` than `+`.
Re:Stages of denial in encountering K by kaminari on Monday March 09, 2020 @05:55AM (#22524180)
I don't know K but "+/" immediately stood out to me as "add over", so I think they made a good choice in using "/" for fold.

"!", on the other hand...

Re:Stages of denial in encountering K by qayxc on Monday March 09, 2020 @09:56AM (#22525347)
There's no good (or bad) choices for mapping abstract concepts like ranges, mapping, reducing, or combining to common (ASCII-) symbols. Every choice is inherently arbitrary and carries no meaning whatsoever (besides maybe ergonomics). One could just as well argue that "/" is the ISO 8000-2:2009 2-9.6 recommended symbol for division. The same source also shows why symbols alone are inadequate for an explicit representation of abstract concepts: the Nabla symbol alone represents 5 different operations depending on context according to the ISO standard.
Re:Stages of denial in encountering K by chrispsn on Monday March 09, 2020 @06:16AM (#22524239)
What would be a more obvious symbol choice for range (aka til or seq)? Pound (#)?
Re:Stages of denial in encountering K by muzani on Monday March 09, 2020 @12:32AM (#22523013)
It's not commonly taught in college. They're probably simpler than your typical for loop.
Re:Stages of denial in encountering K by saagarjha on Monday March 09, 2020 @12:49AM (#22523073)
I’d be quite disappointed in your degree if you were never asked to take a course that was centered around a functional language.
Re:Stages of denial in encountering K by DoofusOfDeath on Monday March 09, 2020 @01:01AM (#22523108)
Many smaller CS departments in the US have no such a course in their curricula.

There simply aren't enough professors to maintain that breadth of courses in those departments.

Re:Stages of denial in encountering K by saagarjha on Monday March 09, 2020 @01:06AM (#22523119)
Really? That’s quite surprising; I would expect all of them to have some sort of “programming languages” course or similar…what classes do they have then?
Re:Stages of denial in encountering K by DoofusOfDeath on Monday March 09, 2020 @01:32AM (#22523202)
AFAIK most or all of those curricula do include a sirvey course for programming languages.

IIUC the GP was talking about courses that specifically focused on functional programmimg.

Re:Stages of denial in encountering K by saagarjha on Monday March 09, 2020 @01:48AM (#22523259)
Fair, but I from the context of the top comment I was talking more about being able to recognize and use basic functional constructs.
Re:Stages of denial in encountering K by pianoben on Monday March 09, 2020 @01:52AM (#22523274)
My CS program (class of 2007) was mostly c++. There was one semester of Java, but it was optional.

We learned fundamentals, discrete math, symbolic logic, and also "databases" (read: MS Access), object-oriented design, and I forget what else.

With the benefit of hindsight, I feel like I overpaid for that education :)

Re:Stages of denial in encountering K by chongli on Monday March 09, 2020 @02:59AM (#22523501)
I’m a math student minoring in CS and I covered all of that before I’d finished second year. I also covered functional programming in first year.

I’m really surprised your CS degree didn’t cover operating systems, compilers, or algorithms. CS students at my school are required to take all of that stuff (and a lot more, including everything you’ve mentioned) before they even finish 3rd year. In 4th year they’ll be studying things like networking, real-time programming, computer graphics (physically-based rendering), machine learning, and computational math (for simulations, numerical solvers, linear and nonlinear optimization, etc).

Re:Stages of denial in encountering K by pianoben on Monday March 09, 2020 @12:14PM (#22526575)
Ah yes, operating systems - file that under "I forget what else".

Like I said, I feel that I overpaid for that education. The degree itself has paid for itself many times over, but I needed to learn basically everything important for a CS career on my own.

Re:Stages of denial in encountering K by zhte415 on Monday March 09, 2020 @06:32AM (#22524296)
"Write an interpreter for a functional-like language of your choosing with XYZ requirements". In Haskell. As a 1st year uni project. I was just getting over Fortran. And prove it! "Can I do it in Turing please?" "No. Haskell." I still curse that exercise to this day, but it enlightened thinking.

A CS or Maths course should certainly involve some functional language element.

For someone reading thinking of CS at university, whether there's a requirement or option in such would be a good question to ask (you're interviewing them as much as they're interviewing you).

Re:Stages of denial in encountering K by busterarm on Monday March 09, 2020 @02:16AM (#22523361)
It's taught in bootcamps...
Re:Stages of denial in encountering K by isatty on Monday March 09, 2020 @02:04AM (#22523316)
It's definitely more cognitive load to x people where x = 'some' or 'most'. It does not matter what x is, your change will be rejected.
Re:Stages of denial in encountering K by busterarm on Monday March 09, 2020 @02:19AM (#22523376)
Sounds like a recruiting problem, or possibly a training one.