2024/07/02

2024-07-02 00:05:11 +0200CrunchyFlakes(~CrunchyFl@146.52.130.128) (Quit: ZNC 1.8.2 - https://znc.in)
2024-07-02 00:05:45 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-02 00:12:07 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2024-07-02 00:17:51 +0200mikess(~mikess@user/mikess) (Ping timeout: 255 seconds)
2024-07-02 00:20:12 +0200target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2024-07-02 00:22:26 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 268 seconds)
2024-07-02 00:38:05 +0200emm(~emm@user/edmeme) (Ping timeout: 256 seconds)
2024-07-02 00:52:17 +0200acidjnk_new3(~acidjnk@p200300d6e72cfb4649ca0157bfe844d2.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2024-07-02 01:05:46 +0200mreh(~matthew@host86-160-168-12.range86-160.btcentralplus.com)
2024-07-02 01:09:22 +0200poscat(~poscat@user/poscat) (Ping timeout: 246 seconds)
2024-07-02 01:12:13 +0200mreh(~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 256 seconds)
2024-07-02 01:15:54 +0200poscat(~poscat@user/poscat)
2024-07-02 01:24:33 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2024-07-02 01:48:40 +0200Taneb(~Taneb@runciman.hacksoc.org) (Quit: I seem to have stopped.)
2024-07-02 01:53:31 +0200mikess(~mikess@user/mikess)
2024-07-02 01:54:43 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds)
2024-07-02 01:54:53 +0200Square(~Square@user/square) (Ping timeout: 240 seconds)
2024-07-02 01:55:02 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2024-07-02 01:56:11 +0200 <oo_miguel> Trying to figure out how to create [a->b] from a->[b]. Appears like this should be straightforward.
2024-07-02 01:57:13 +0200 <EvanR> @djinn (a->[b]) -> [a->b]
2024-07-02 01:57:13 +0200 <lambdabot> Error: Undefined type []
2024-07-02 01:58:53 +0200 <EvanR> the problem is, how long should that list be
2024-07-02 01:59:28 +0200 <oo_miguel> same length as the list returned by the first function
2024-07-02 01:59:31 +0200 <EvanR> :t \f -> map (\i x -> f x !! i) [0..]
2024-07-02 01:59:32 +0200 <lambdabot> (t -> [a]) -> [t -> a]
2024-07-02 01:59:51 +0200 <EvanR> you can't call the first function without an argument
2024-07-02 01:59:56 +0200 <EvanR> catch 22
2024-07-02 02:00:17 +0200 <oo_miguel> but the type does not carry any information about the length
2024-07-02 02:00:24 +0200 <EvanR> here's another "solution"
2024-07-02 02:00:30 +0200 <EvanR> :t \f -> []
2024-07-02 02:00:31 +0200 <lambdabot> p -> [a]
2024-07-02 02:00:54 +0200 <EvanR> :t \f -> [] :: (a -> [b]) -> [a -> b]
2024-07-02 02:00:55 +0200 <lambdabot> error:
2024-07-02 02:00:55 +0200 <lambdabot> • Couldn't match expected type ‘(a1 -> [b1]) -> [a1 -> b1]’
2024-07-02 02:00:55 +0200 <lambdabot> with actual type ‘[a0]’
2024-07-02 02:01:59 +0200 <EvanR> what if f returns []
2024-07-02 02:02:42 +0200 <EvanR> then the result is an empty list, and no function can be called, there is no argument
2024-07-02 02:02:49 +0200 <EvanR> it's a paradoxical function
2024-07-02 02:02:57 +0200 <oo_miguel> I am looking for something like that one you posted above: \f -> map (\i x -> f x !! i) [0..]. but this will obviously fail if the returned list is not infinite
2024-07-02 02:03:28 +0200 <EvanR> you might be thinking you look into the future, and see what f x is
2024-07-02 02:03:39 +0200 <EvanR> which determines the size of [0..]
2024-07-02 02:03:42 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 256 seconds)
2024-07-02 02:03:58 +0200 <EvanR> perhaps you can do it with the tardis monad xD
2024-07-02 02:04:30 +0200 <haskellbridge> <iqubic (she/her)> Are we trying to write a function of type "(a -> [b]) -> [a -> b]"?
2024-07-02 02:06:26 +0200it_(~quassel@v2202212189510211193.supersrv.de) (Quit: No Ping reply in 180 seconds.)
2024-07-02 02:06:39 +0200 <haskellbridge> <iqubic (she/her)> EvanR: This is probably more in depth than in needs to be, but here we're using the "a" in negative position only, and you can't summon a value of type "a" from nowhere.
2024-07-02 02:06:42 +0200 <oo_miguel> @EvanR; if "f x" returns "[ ]" i want to get []
2024-07-02 02:06:43 +0200 <lambdabot> Unknown command, try @list
2024-07-02 02:07:39 +0200it_(~quassel@v2202212189510211193.supersrv.de)
2024-07-02 02:07:42 +0200 <haskellbridge> <iqubic (she/her)> oo_miguel: Where does x come from? Who supplies that value?
2024-07-02 02:08:39 +0200 <oo_miguel> let me try to rephrase my question.. given a function with one parameter that returns a list.. i want to get a list of fucntions of one parameter that return values analgously
2024-07-02 02:08:54 +0200 <oo_miguel> so lets say :
2024-07-02 02:08:54 +0200 <oo_miguel> f something = [1,2,3]
2024-07-02 02:09:51 +0200 <oo_miguel> I wnat to get a list of functions [a,b,c] ... ouch
2024-07-02 02:09:52 +0200 <oo_miguel> ok
2024-07-02 02:10:05 +0200 <oo_miguel> guess I seee now what the problem is
2024-07-02 02:11:09 +0200 <oo_miguel> thanks EvanR & haskellbridge , for claryfying
2024-07-02 02:11:10 +0200 <ncf> list distributes over reader, not the other way around
2024-07-02 02:11:30 +0200 <haskellbridge> <iqubic (she/her)> Yes... That's a way to explain it.
2024-07-02 02:12:33 +0200 <haskellbridge> <iqubic (she/her)> ncf: Does that mean that it's possible to write something of the type "[a -> b] -> a -> [b]".
2024-07-02 02:13:03 +0200 <ncf> :t sequence
2024-07-02 02:13:04 +0200 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
2024-07-02 02:13:35 +0200 <haskellbridge> <iqubic (she/her)> :t \fs x -> map (\f -> f x) fs
2024-07-02 02:13:41 +0200 <ncf> :t distribute -- or:
2024-07-02 02:13:42 +0200 <lambdabot> error:
2024-07-02 02:13:42 +0200 <lambdabot> • Variable not in scope: distribute
2024-07-02 02:13:42 +0200 <lambdabot> • Perhaps you meant ‘distrib’ (imported from Control.Lens)
2024-07-02 02:13:48 +0200 <ncf> fuck
2024-07-02 02:13:55 +0200 <haskellbridge> <iqubic (she/her)> Why does lambdabot hate me?
2024-07-02 02:13:58 +0200 <ncf> :t Data.Distributive.distribute
2024-07-02 02:13:59 +0200 <lambdabot> (Data.Distributive.Distributive g, Functor f) => f (g a) -> g (f a)
2024-07-02 02:14:08 +0200 <geekosaur> haskellbridge puts a prefix in front of your messages, @iqubic. (it doesn't puppet on the IRC end)
2024-07-02 02:14:21 +0200 <haskellbridge> <iqubic (she/her)> Right... I see.
2024-07-02 02:14:23 +0200 <geekosaur> % :t sequence @[]
2024-07-02 02:14:24 +0200 <yahb2> sequence @[] :: Monad m => [m a] -> m [a]
2024-07-02 02:14:42 +0200 <geekosaur> % :t sequence @[] @((->) _)
2024-07-02 02:14:42 +0200 <yahb2> sequence @[] @((->) _) :: Monad ((->) w) => [w -> a] -> w -> [a]
2024-07-02 02:15:19 +0200 <haskellbridge> <iqubic (she/her)> \fs x -> map (\f -> f x) fs should have the type of "[a -> b] -> a -> [b}" though.
2024-07-02 02:15:43 +0200 <ncf> yes that's what sequence does
2024-07-02 02:16:18 +0200 <haskellbridge> <iqubic (she/her)> Right... and you cannot got the other way, because you can't pluck a value of type a out of thin air.
2024-07-02 02:16:22 +0200 <ncf> (it's not like there's more than one way to do it...)
2024-07-02 02:16:58 +0200 <ncf> well i guess there is, you could mess with the list
2024-07-02 02:17:16 +0200 <haskellbridge> <iqubic (she/her)> Right...
2024-07-02 02:17:55 +0200 <haskellbridge> <iqubic (she/her)> ncf: You can also technically do "\fs a -> []"
2024-07-02 02:21:42 +0200 <geekosaur> you could also add a Monoid constraint to a so you can use `mempty` to manufacture a value, but that's unlikely to give you useful results
2024-07-02 02:22:09 +0200 <geekosaur> (or `Default`, with the same caveat)
2024-07-02 02:23:45 +0200emmanuelux(~emmanuelu@user/emmanuelux)
2024-07-02 02:26:35 +0200 <ncf> in any case you won't get an actual distributive law
2024-07-02 02:28:16 +0200 <oo_miguel> what makes me wonder.. just theoratically assuming I would know the length of the list returned by f, would the following (posted by EvanR above) work:
2024-07-02 02:28:16 +0200 <oo_miguel> \f -> map (\i x -> f x !! i) [0..99]
2024-07-02 02:29:24 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
2024-07-02 02:30:59 +0200 <monochrom> @type \f -> map (\i x -> f x !! i) [0..99]
2024-07-02 02:31:00 +0200 <lambdabot> (t -> [a]) -> [t -> a]
2024-07-02 02:32:08 +0200 <monochrom> yeah
2024-07-02 02:33:07 +0200 <geekosaur> looks very brute force, though, and might rerun `f x` for each index
2024-07-02 02:33:14 +0200 <ncf> yes, because lists of length n are representable (by Fin n), so you're just using the fact that flip :: (t → Fin n → a) → (Fin n → t → a) is a distributive law for (t →) over (Fin n →)
2024-07-02 02:33:57 +0200 <Leary> oo_miguel: If you want to produce `n` outputs, then `f` must satisfy `length (f x) >= n` for all `x`.
2024-07-02 02:34:37 +0200 <monochrom> It is a strange question in the first place.
2024-07-02 02:35:18 +0200 <oo_miguel> yeah right. let's forget about it. I will redesign my initial solution. Thanks for all the constructive answers
2024-07-02 02:36:35 +0200 <ncf> it's not like the excluded middle would change anything :p
2024-07-02 02:44:13 +0200euleritian(~euleritia@dynamic-176-004-131-157.176.4.pool.telefonica.de)
2024-07-02 02:55:47 +0200robotsnowfall(~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.0 - https://znc.in)
2024-07-02 02:56:49 +0200euleritian(~euleritia@dynamic-176-004-131-157.176.4.pool.telefonica.de) (Ping timeout: 246 seconds)
2024-07-02 02:59:00 +0200euleritian(~euleritia@dynamic-176-004-131-157.176.4.pool.telefonica.de)
2024-07-02 03:33:51 +0200puke(~puke@user/puke) (Quit: puke)
2024-07-02 03:39:31 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 246 seconds)
2024-07-02 03:40:08 +0200rvalue(~rvalue@user/rvalue) (Ping timeout: 256 seconds)
2024-07-02 03:44:35 +0200fryguybob(~fryguybob@syn-024-094-050-022.res.spectrum.com) (Quit: leaving)
2024-07-02 03:46:01 +0200rvalue(~rvalue@user/rvalue)
2024-07-02 03:48:49 +0200puke(~puke@user/puke)
2024-07-02 03:50:24 +0200danse-nr3(~danse-nr3@151.37.108.131)
2024-07-02 03:58:25 +0200robotsnowfall(~robotsnow@user/robotsnowfall)
2024-07-02 04:03:51 +0200xff0x(~xff0x@2405:6580:b080:900:6b0d:696c:4da9:e7ba) (Ping timeout: 264 seconds)
2024-07-02 04:06:15 +0200robotsnowfall(~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.0 - https://znc.in)
2024-07-02 04:06:44 +0200robotsnowfall(~robotsnow@user/robotsnowfall)
2024-07-02 04:32:48 +0200euleritian(~euleritia@dynamic-176-004-131-157.176.4.pool.telefonica.de) (Ping timeout: 268 seconds)
2024-07-02 04:33:34 +0200euleritian(~euleritia@dynamic-176-004-179-095.176.4.pool.telefonica.de)
2024-07-02 04:37:13 +0200tomku(~tomku@syn-141-126-184-057.res.spectrum.com)
2024-07-02 04:41:39 +0200td_(~td@i53870923.versanet.de) (Ping timeout: 264 seconds)
2024-07-02 04:43:20 +0200td_(~td@i53870908.versanet.de)
2024-07-02 04:43:35 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat)
2024-07-02 04:45:24 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::)
2024-07-02 04:52:40 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2024-07-02 05:00:51 +0200euleritian(~euleritia@dynamic-176-004-179-095.176.4.pool.telefonica.de) (Ping timeout: 268 seconds)
2024-07-02 05:01:36 +0200euleritian(~euleritia@dynamic-176-004-176-014.176.4.pool.telefonica.de)
2024-07-02 05:08:15 +0200tomku(~tomku@syn-141-126-184-057.res.spectrum.com) (Ping timeout: 268 seconds)
2024-07-02 05:09:52 +0200tomku(~tomku@syn-141-126-184-057.res.spectrum.com)
2024-07-02 05:15:14 +0200shane(~shane@ana.rch.ist) (Ping timeout: 256 seconds)
2024-07-02 05:18:30 +0200aforemny(~aforemny@2001:9e8:6cdc:7000:35fc:2c7:776f:671b)
2024-07-02 05:19:51 +0200aforemny_(~aforemny@i59F516CB.versanet.de) (Ping timeout: 256 seconds)
2024-07-02 05:30:34 +0200euleritian(~euleritia@dynamic-176-004-176-014.176.4.pool.telefonica.de) (Ping timeout: 264 seconds)
2024-07-02 05:31:46 +0200euleritian(~euleritia@dynamic-176-007-196-150.176.7.pool.telefonica.de)
2024-07-02 05:37:03 +0200motherfsck(~motherfsc@user/motherfsck)
2024-07-02 05:54:23 +0200superbil(~superbil@1-34-176-171.hinet-ip.hinet.net) (Read error: Connection reset by peer)
2024-07-02 05:55:52 +0200superbil(~superbil@1-34-176-171.hinet-ip.hinet.net)
2024-07-02 05:57:35 +0200danse-nr3(~danse-nr3@151.37.108.131) (Ping timeout: 268 seconds)
2024-07-02 05:57:47 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2024-07-02 05:59:06 +0200img(~img@user/img)
2024-07-02 06:00:45 +0200euleritian(~euleritia@dynamic-176-007-196-150.176.7.pool.telefonica.de) (Ping timeout: 255 seconds)
2024-07-02 06:03:07 +0200euleritian(~euleritia@dynamic-176-000-193-082.176.0.pool.telefonica.de)
2024-07-02 06:11:18 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2024-07-02 06:14:18 +0200euleritian(~euleritia@dynamic-176-000-193-082.176.0.pool.telefonica.de) (Ping timeout: 252 seconds)
2024-07-02 06:14:41 +0200euleritian(~euleritia@dynamic-176-000-192-024.176.0.pool.telefonica.de)
2024-07-02 06:15:04 +0200iza4k5(~iza4k5@2806:2f0:5321:fd27:eb76:58af:820:9ebc)
2024-07-02 06:17:03 +0200bilegeek(~bilegeek@2600:1008:b0a4:3d85:d957:a4d8:5c3a:cf35)
2024-07-02 06:17:53 +0200danse-nr3(~danse-nr3@151.37.108.131)
2024-07-02 06:19:40 +0200iza4k5(~iza4k5@2806:2f0:5321:fd27:eb76:58af:820:9ebc) (Remote host closed the connection)
2024-07-02 06:26:39 +0200danza(~francesco@151.37.108.131)
2024-07-02 06:32:25 +0200danse-nr3(~danse-nr3@151.37.108.131) (Ping timeout: 246 seconds)
2024-07-02 06:33:00 +0200euleritian(~euleritia@dynamic-176-000-192-024.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-02 06:33:17 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-02 06:36:53 +0200zmt01(~zmt00@user/zmt00) (Quit: Leaving)
2024-07-02 06:38:38 +0200zmt00(~zmt00@user/zmt00)
2024-07-02 07:02:24 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2024-07-02 07:04:12 +0200mulk(~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2024-07-02 07:22:43 +0200yobson(~yobson@mail.jotron.com)
2024-07-02 07:27:44 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection timed out)
2024-07-02 07:30:16 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-07-02 07:42:25 +0200danza(~francesco@151.37.108.131) (Ping timeout: 246 seconds)
2024-07-02 07:46:34 +0200danza(~francesco@151.47.22.136)
2024-07-02 07:51:36 +0200danza(~francesco@151.47.22.136) (Ping timeout: 256 seconds)
2024-07-02 07:56:25 +0200michalz(~michalz@185.246.207.197)