2025/01/08

Newest at the top

2025-01-08 17:51:46 +0100 <tomsmeding> much as I am usually condescending about the abilities of LLMs, I'm quite sure it can generate the source for `head`. :)
2025-01-08 17:51:41 +0100saulosilva(~saulosilv@181.216.220.21) saulosilva
2025-01-08 17:50:49 +0100 <jokoon> no idea if he will solve this with chatpgt without help
2025-01-08 17:50:21 +0100 <lambdabot> head [] = error "Prelude.head: empty list"
2025-01-08 17:50:20 +0100 <lambdabot> head (x:_) = x
2025-01-08 17:50:20 +0100 <mauke> @src head
2025-01-08 17:50:14 +0100 <jokoon> although to be fair I just had a student send me his haskell homework
2025-01-08 17:49:51 +0100 <jokoon> you can guess that I am doing homework haha
2025-01-08 17:49:26 +0100 <mauke> yes, that's pretty much how head is defined
2025-01-08 17:49:09 +0100 <jokoon> that works
2025-01-08 17:49:06 +0100 <jokoon> like this then https://bpa.st/SDXA
2025-01-08 17:46:03 +0100 <tomsmeding> foo n = "was something else: " ++ show n
2025-01-08 17:46:02 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 252 seconds)
2025-01-08 17:45:59 +0100 <tomsmeding> foo 2 = "was two"
2025-01-08 17:45:56 +0100 <tomsmeding> foo 1 = "was one"
2025-01-08 17:45:42 +0100 <tomsmeding> you can give multiple equations to a function
2025-01-08 17:45:34 +0100 <jokoon> I will try to put an if
2025-01-08 17:45:26 +0100 <jokoon> put some if?
2025-01-08 17:45:25 +0100 <tomsmeding> what have you tried?
2025-01-08 17:45:18 +0100 <jokoon> and how can I raise an error if the list is empty?
2025-01-08 17:44:55 +0100 <tomsmeding> which will still crash if f8 gets an empty list
2025-01-08 17:44:47 +0100 <tomsmeding> f8 (a : _) = a
2025-01-08 17:44:28 +0100 <jokoon> https://bpa.st/KICQ like this?
2025-01-08 17:43:41 +0100 <tomsmeding> pattern-match on it?
2025-01-08 17:42:56 +0100 <jokoon> can I access the first element of a list without the head function?
2025-01-08 17:42:42 +0100jokoon(~jokoon@2a01:cb1d:8f84:4f00:60a2:6701:a66e:bb95)
2025-01-08 17:41:24 +0100saulosilva(~saulosilv@181.216.220.21) (Quit: Client closed)
2025-01-08 17:41:04 +0100 <merijn> ah, no I'm misremebering it seems, it's from 2018
2025-01-08 17:40:05 +0100 <merijn> sm: So that should be MORE than old enough to require ;)
2025-01-08 17:39:36 +0100 <merijn> 2.4 is the version I used at the start of my phd in 2014
2025-01-08 17:39:24 +0100 <merijn> anyway, cabal 2.2 is over a decade old, so :p
2025-01-08 17:38:06 +0100 <merijn> sm: At any rate, the core idea is that the semantics of a field will never change for a specific cabal-version, so even if field "foo" changes behaviour in a later version of the spec, any file declaring version X will always use the semantics of 'foo' at time X
2025-01-08 17:36:52 +0100 <merijn> ah, right
2025-01-08 17:36:43 +0100 <tomsmeding> ah
2025-01-08 17:36:29 +0100 <tomsmeding> merijn: the Note here seems to give more certainty https://cabal.readthedocs.io/en/stable/file-format-changelog.html#spec-history
2025-01-08 17:36:27 +0100 <merijn> tomsmeding: In general there's no real reason the spec and cabal-install versions should correspond (they always have and do at the moment, but there's no specific reason)
2025-01-08 17:35:48 +0100 <merijn> tomsmeding: I'm not 100% it's guaranteed
2025-01-08 17:35:40 +0100 <tomsmeding> merijn: "generally"?
2025-01-08 17:35:22 +0100 <merijn> sm: to add onto tomsmeding answer, cabal-version refers to the cabal *spec* i.e. supported features, (generally equal to "the earliest cabal version that supports it")
2025-01-08 17:34:06 +0100merijn(~merijn@77.242.116.146) merijn
2025-01-08 17:34:02 +0100 <hseg> I thought https://reuse.software might have something, but apparently not
2025-01-08 17:32:51 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2025-01-08 17:30:44 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 264 seconds)
2025-01-08 17:27:30 +0100 <__monty__> Maybe it's worth looking into some of the reproducible builds stuff? SALSA and the like? They tend to care about source provenance and licensing is part of that so maybe they have tools that make this easy.
2025-01-08 17:25:25 +0100saulosilva(~saulosilv@181.216.220.21) saulosilva
2025-01-08 17:25:15 +0100 <hseg> then all would need to be copied, presumably
2025-01-08 17:24:00 +0100 <__monty__> What if the PKG lists multiple license-files?
2025-01-08 17:23:49 +0100merijn(~merijn@77.242.116.146) merijn
2025-01-08 17:23:36 +0100JuanDaugherty(~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
2025-01-08 17:23:04 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles