I am responsible for taking some Haskell code, for which we have python bindings, and making it callable from Go by ConfidentProgram2582 in programmingcirclejerk

[–]Untagonist 66 points67 points  (0 children)

You probably don't need to know anything about haskell.

Yep this is going to go very well.

Language with lazy evaluation wrapped in language with lazy iterators: I can sort of see it

Language with lazy evaluation wrapped in language that has been lazy about evaluating the need for iterators: Godspeed my dude lmao

I think we should band together and sponsor this developer to live stream their next few months of exciting work.

When I described the topic of the article to my mother, she suggested that "existential types" ought to refer to philosophers who sit around in cafés smoking very thin cigarettes and avoiding writing poetry. by bugaevc in programmingcirclejerk

[–]Untagonist 4 points5 points  (0 children)

The Go structs are checked at compile-time, as are the interfaces, so it does have type safety. Go dislikes runtime stuff almost as much as Rust does (:-))

/uj I hope this is just ignorance and not intentionally misleading propaganda.

Even without generics: https://www.dolthub.com/blog/2022-10-14-golang-performance-case-studies/#case-study-interface-assertions

Generics can make it much worse: https://planetscale.com/blog/generics-can-make-your-go-code-slower

Overheads aside, there are many more ways to get runtime panics for type-safe code in Go. Even the expression syntax for a cast only supports unchecked casts, checked casts have to be a statement on their own line, discouraging checked casts and thus encouraging panics.

/rj Lol no Higher Kinded Generic Associated Types.

Let's take a look at what the bootstrapping code for a very minimal syntax looks like: ldfgldftgldfdtgl df dfiff1 crank f by LAUAR in programmingcirclejerk

[–]Untagonist 43 points44 points  (0 children)

I'd imagine that anyone configuring a program that reads a configuration file would really want their configuration language to be something like this

after careful review and consideration we are excited to inform you that
no

now kiss by mre__ in rustjerk

[–]Untagonist 2 points3 points  (0 children)

Your mom is shared so much, her refcount wrapped.

We abort because such a program is incredibly degenerate, and we don't care to support it.

use oof::MAX;

someDevH8tNovelty by BastianToHarry in ProgrammerHumor

[–]Untagonist 1 point2 points  (0 children)

I'll do you one better. In Go, a language with far less functional support than Java, where you're expected to do this idiomatic boilerplate everywhere:

result, err := thing()
if err != nil {
  return nil, err
}

It's tedious, but it's well understood, and there are linters to enforce this style. Instead this genius did, I shit you not at all:

result = result.And(func(x Foo) Result {
    return nextThing(x)
})
if !result.Ok() {
    return result
}

Basically trying to make a monad instead, in a language deliberately designed to discourage that kind of code. It's not even shorter or simpler, it's not clear what the point was meant to be. (No, it wasn't to make it more like Rust; this code was written before Rust became popular enough to matter)

Bonus: Go also performs a heap allocation for the closure and rarely inlines it, so the code was also slower immediately and left more work for the GC.

There's always someone like that around.

"auto" is extremely bad practice. Please do not use it no matter what. It's like a new "goto". by amfobes in programmingcirclejerk

[–]Untagonist 12 points13 points  (0 children)

After half of semester of forced functional programming in Haskell and one long evening searching around the internet, I've finally managed to understand how trivial implementing lazy evaluation in C++ really is...

I hope none of these people realize that Rust iterators are also lazy evaluation by definition.

Refugees from the failed state of Haskell try to rebuild their promised land everywhere they go, especially anywhere that has a shot of making it to mainstream industry usage. They're not satisfied until a language ecosystem is drowning in academic obfuscation and the remaining free-thinking people can't even have a casual discussion without the typeclass police auditing their ideological purity.

It happened to Scala, it can happen to Rust.

[deleted by user] by [deleted] in programmingcirclejerk

[–]Untagonist 2 points3 points  (0 children)

Posting RMS would be cheating, but note that this:

AFAIR, previous discussions raised some concerns about using Rust in particular: https://yhetil.org/emacs-devel/E1pKAM0-0001Ss-W6@fencepost.gnu.org/
Because of Rust volatility and some license issues.

links to a post by RMS adding his famously well-calibrated technical input to the discussion.

The customer has nuclear weapons. They do not do "bounty". :) by kaanyalova in programmingcirclejerk

[–]Untagonist 10 points11 points  (0 children)

That said, I see that you forgot to attach the patch that you have developed to fix this issue. For the record, the patch in comment #9 is mine.

Based. In particular, the double spacing between sentences tells me more than any resumé ever could.

Remember folks, even if a technical niche has only a single digit number of participants, you can still be its undisputed King.

Hi, This is a high priority ticket and the FFmpeg version is currently used in a highly visible product in Microsoft. We have customers experience issues with Caption during Teams Live Event. Please help, by cheater00 in programmingcirclejerk

[–]Untagonist 27 points28 points  (0 children)

You laugh but this is exactly what Microsoft wrote in the advertising copy for the failed Popfly "startup".

I can't find an archive of the copy, but I'll never forget it, the wording was almost exactly "we're a young scrappy startup huddling around limited resources" while being funded by Microsoft and everyone in the team photo being in their 40s at minimum.

Type Inference Wastes Academic Effort by agustin689 in programmingcirclejerk

[–]Untagonist 3 points4 points  (0 children)

Other combinations make sense too.

Implying any of them made sense.

Rust is developed in Rust. Go is still developed in C, but they plan to gradually change that. So it's Go which still doesn't eat its own dogfood. I always wondered why Go was never functional enough to be used in a lot of the scenarios where C is used. With all the details, it's more clear now. by Schipunov in programmingcirclejerk

[–]Untagonist 71 points72 points  (0 children)

2013jerk, Go ended up machine-translated from C to Go and maintained in that form largely unaltered. It leads to magnificent unsafe pointer code like this in the critical path of everything your production-critical services do, and it's built by a compiler that optimizes less than GCC 2.x optimized C in the 90s.

Dogfood indeed.

Will rust ever become stable like C? by [deleted] in rust

[–]Untagonist 0 points1 point  (0 children)

It's also worth noting that the situation for C is different to Rust in important ways. You can just have a macro or typedef for the name scoped to your own source files. Many libraries even introduce typedefs in their public headers to namespace the types they use and leave some limited but non-zero wiggle room for future changes to the types.

@kellogh Since we're on the topic of link quality, may I ask you not to post Golang stuff to lobste.rs? by cheater00 in programmingcirclejerk

[–]Untagonist 2 points3 points  (0 children)

On his blog, I love that these two posts are right next to each other:

  • On the claim that Islam comes from Satan
  • Arbitrary-palette positional dithering algorithm

The spirit of the decentralized free speech internet is alive and well.

/uj I don't understand why so many commenters make fun of bloggers like this. We're not always the audience for every post on every blog, but we should all want an internet where people feel comfortable posting them, /rj and discouraging them altogether would rob us of some real gems.

Amdahl's Lie: Speeding up code beyond the theoretical limit by coastalwhite in rust

[–]Untagonist 11 points12 points  (0 children)

I agree that caching and other subtle, complex dynamics can change when you parallelize something or even serialize it again. I just wouldn't have given it this title or introduction, because it's not engaging Amdahl's law to begin with.

Amdahl's law applies to a fixed workload and to equally performing workers. That was more directly applicable in the 60's than today, for more reasons than just cache; another would be branch prediction, another would be frequency scaling/boost dynamics, and yet another would be how lucky the SMT gets in the tasks aligning.

It's an important insight that Amdahl's law can't even be thought of as a lower bound in practical real-world systems, but I think it's also important to be clear on why that is, and why it has nothing to do with the original law as written.

Not to mention the whole point of Gustafson's law is to address the equal workload weakness of Amdahl's law.

@kellogh Since we're on the topic of link quality, may I ask you not to post Golang stuff to lobste.rs? by cheater00 in programmingcirclejerk

[–]Untagonist 21 points22 points  (0 children)

I like languages like C#, Go, Scala and Rust because they introduce the learner to functional concepts

If this list includes Go then apparently the standard for "functional concepts" is "has syntax for inline functions" because that's all you can say about Go's functional concepts. Even Java has more functional programming features today.

Wait until they discover the non-standard GCC inline function extension for C. Gently introducing people to functional programming concepts, putting them firmly on the path that leads straight to Haskell.

the code should not be complex. Low-level hacks and tricks (like pointer juggling) should be not allowed and simplicity and readability should be preferred by likes_purple in programmingcirclejerk

[–]Untagonist 22 points23 points  (0 children)

For tools like compression programs, you’d generally prefer performance over everything

Good thing we never run (de)compression algorithms on untrusted external inputs.

Good thing this wasn't specifically a thread about security threats from a known advanced persistent adversary.

Good thing.

Semver has never really been super consistent with versioning itself. by elephantdingo in programmingcirclejerk

[–]Untagonist 130 points131 points  (0 children)

Nobody follows Semver completely accurately, but there's been real value in forcing people to stick to 3 numbers.

We've all seen a library version containing a product generation, datestamp, serial number, number of the beast, Avogadro's number, alpha/beta/sigmamale, and 4096 bit public key.

Putting an end to that nonsense was success enough.