Readit News logoReadit News
still_grokking commented on A list is a monad   alexyorke.github.io//2025... · Posted by u/polygot
stronglikedan · 2 months ago
After reading your comment, I've made it my mission to understand it. Although I have no idea what you're talking about, you make it sound intriguing.
still_grokking · 2 months ago
What parent describes is pretty simple: That's just how the compiler transforms some code.

Do-notation in Haskell, or for-comprehensions in Scala are just syntax sugar for nested calls to `flatMap`, `filter`, and `map`.

I think this here shows it nicely:

https://www.baeldung.com/scala/for-comprehension#for-compreh...

In Scala you can add the needed methods to any type and than they will "magically" work in for-comprehensions. In Haskell you need to implement a Monad instance which than does the same trick.

The concrete implementations of these methods need to obey to some algebraic laws for the data structure which defines them to be called a monad. But that's pretty much it.

In my opinion all that Haskell in most "monad tutorials" just blurs an in principle very simple concept.

The in practice relevant part is that a monad can be seen as an interface for a wrapper type with a constructor that wraps some value (whether a flat value, some collection, or even functions, makes no difference), does not expose an accessor to this wrapped value, and has a `flatMap` method defined. It also inherits a `map` method, coming from an interface called "Functor". The thing is also an instance of an "Applicative", which is an interface coming with a `combine` method which takes another object of the same type as itself and returns a combination of again the same type (classical example: string concatenation can be a `combine` implementation if we'd say that `String` implements the `Applicative` interface).

still_grokking commented on A list is a monad   alexyorke.github.io//2025... · Posted by u/polygot
skybrian · 2 months ago
That’s because flatMap() is a good name for a particular list operation, but it’s not generic enough to be a good name for the corresponding monad operation.

I’m not sure there is a good name for the monad operation. Sometimes it’s called ‘bind’ but what does it bind?

I suppose you could call it ‘then’ like when working with Promises.

still_grokking · 2 months ago
Scala's new effect library Kyo just uses `map`. See:

https://getkyo.io/#/?id=the-quotpendingquot-type-lt

All pure values are automatically lifted into the Kyo monad, so `map` is effectively `flatMap`.

From the linked docs:

> This unique property removes the need to juggle between map and flatMap. All values are automatically promoted to a Kyo computation with zero pending effects, enabling you to focus on your application logic rather than the intricacies of effect handling.

In the end it makes a lot of sense I think. What you do is manipulating values inside some wrapper. Whether this wrapper is a monad or not should not matter. Just do something with the value(s) inside, and that's mapping.

still_grokking commented on Nick Clegg says asking artists for use permission would 'kill' AI industry   theverge.com/news/674366/... · Posted by u/olyellybelly
birn559 · 3 months ago
If using the work as training data was lawful (which hasn't been always the case as we know today) I tend to agree with you, but it might depend: creating an alteration of the work might be prohibited altogether or you might need to give proper credit to the original authors and that might already be violated when you present certain output to a user. In general, the user is responsible to obey the license of the original work. The problem is that the LLM doed not know on which works its output (mostly) is based on. So in theory, no output for which copyright laws might apply should be used whatsoever.
still_grokking · 3 months ago
> the user is responsible to obey the license of the original work

The user is in this case the "AI" company.

They already violated law almost certainly by copying stuff from the net in the first place. (Almost certainly as it by now does not look like this was fair use, and there is no other means to make legal what they did.)

still_grokking commented on Nick Clegg says asking artists for use permission would 'kill' AI industry   theverge.com/news/674366/... · Posted by u/olyellybelly
pj_mukh · 3 months ago
The legality of Copyright material being present in the latent space of a commercialized foundation model would definitely be an interesting case!

Though most of these cases aren't litigating this. They are charging that the ability to recreate copyrightable material is the fault of the tool and not the tool user[1].

[1]: https://www.darrow.ai/resources/ai-copyright-law

still_grokking · 3 months ago
That's not true.

Some people (like the NYT¹) are in fact demanding before curt the destruction of the trained models as they obviously contain copyrighted content.

¹ https://pressgazette.co.uk/media_law/new-york-times-open-ai-...

still_grokking commented on Nick Clegg says asking artists for use permission would 'kill' AI industry   theverge.com/news/674366/... · Posted by u/olyellybelly
therealpygon · 3 months ago
People don’t like honesty because they want to be special snowflakes, but sorry, humans aren’t that creative. The entire copyright and patent system is predicated on that fact, that you can only make money by making a thing exclusive and proprietary. That is directly caused by the fact that not only is it NOT original, but that others absolutely will invent/create the same thing eventually even without exposure to the original material, which is why people want to protect their exclusivity.

“I’m original because I add the little curls to the lines, make the lines softer, and make faces pointy rather than round” isn’t originality, nor is any of the art that people claim copyright for.

Additionally, it is a fundamental misunderstanding of AI modes if you think the models are simply lossy compression of data. That is like saying the alphabet is just lossy compression of The Odyssey.

still_grokking · 3 months ago
But why should things work differently for "AI"?

One could of course say that "IP" ("intellectual property") is an ill concept all in all and abolish it. But than without exceptions! If it's not a valid concept in regard to "AI" it's not a valid concept in general. But if we want to keep that concept "AI" needs to bend to the same rules that apply to anybody else. Simple as that. Law is universal. (At least it should be like that everybody is equal before the law.)

still_grokking commented on Nick Clegg says asking artists for use permission would 'kill' AI industry   theverge.com/news/674366/... · Posted by u/olyellybelly
kulahan · 3 months ago
I’m not talking about China. I’m talking about every single nation on the planet.
still_grokking · 3 months ago
As you say, "China" is here only a placeholder.

This "logic" that you need to do obviously illegal stuff (under current legislation) because otherwise someone else would do it and take the loot from that raid remains highly questionable no matter what country you put in that placeholder.

The same "logic" would for example dictate that you should dismiss patents as otherwise "someone in China" could do it before you. Somehow nobody would agree that this is a valid approach in that case…

still_grokking commented on Dijkstra On the foolishness of "natural language programming"   cs.utexas.edu/~EWD/transc... · Posted by u/nimbleplum40
card_zero · 5 months ago
> Explorative work becomes quite difficult if the type system is really rigid

Or to put it another way, the ease of programming is correlated with the ease of making undetected mistakes.

still_grokking · 5 months ago
I'm not sure you tried to understand what I've depicted.

As long as you don't know how the end result should look like there are no "mistakes".

The whole point of explorative work is to find out how to approach something in the first place.

It's usually impossible to come up with the final result at first try!

After you actually know how to do something in general tools which help to avoid all undetected mistakes in the implementation of the chosen approach are really indispensable. But before having this general approach figured out too much rigidity is not helpful but instead a hindrance.

To understand this better read the linked article. It explains the problem very well over a few paragraphs.

still_grokking commented on Dijkstra On the foolishness of "natural language programming"   cs.utexas.edu/~EWD/transc... · Posted by u/nimbleplum40
jedimastert · 5 months ago
> It was a significant improvement that now many a silly mistake did result in an error message instead of in an erroneous answer. (And even this improvement wasn't universally appreciated: some people found error messages they couldn't ignore more annoying than wrong results, and, when judging the relative merits of programming languages, some still seem to equate "the ease of programming" with the ease of making undetected mistakes.)

If I didn't know who wrote this it would seem like a jab directly at people who dislike Rust.

still_grokking · 5 months ago
Rust? Since when is Rust the pinnacle of static type safety?

After I've worked for some time with a language that can express even stronger invariants in types than Rust (Scala) I don't see that property anymore as clear win regardless circumstances. I don't think any more "stronger types == better, no matter what".

You have a price to pay for "not being allowed to do mistakes": Explorative work becomes quite difficult if the type system is really rigid. Fast iteration may become impossible. (Small changes may require to re-architecture half your program, just to make the type system happy again![1])

It's a trade-off. Like with everything else. For a robust end product it's a good thing. For fast experimentation it's a hindrance.

[1] Someone described that issue quite well in the context of Rust and game development here: https://loglog.games/blog/leaving-rust-gamedev/

But it's not exclusive to Rust, nor game dev.

still_grokking commented on Dijkstra On the foolishness of "natural language programming"   cs.utexas.edu/~EWD/transc... · Posted by u/nimbleplum40
still_grokking · 5 months ago
By chance I came just today across GitHub's SpecLang:

https://githubnext.com/projects/speclang/

Funny coincidence!

I leave it here for the nice contrast it creates in light of the submission we're discussing.

still_grokking commented on Dijkstra On the foolishness of "natural language programming"   cs.utexas.edu/~EWD/transc... · Posted by u/nimbleplum40
nsonha · 5 months ago
isn't that just copilot "explain", one of the earliest copilot capabilities. It's definitely helpful to understand new codebases at a high level

> there is a reason why legalese is not plain English, and it goes beyond mere gatekeeping.

unfortunately they're not in any kind of formal language either

still_grokking · 5 months ago
> isn't that just copilot "explain", one of the earliest copilot capabilities. It's definitely helpful to understand new codebases at a high level

In my experience this function is quite useless. It will just repeat the code in plain English. It will not explain it.

u/still_grokking

KarmaCake day1967May 24, 2016View Original