Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 475 476 477 478 479 480 481 482 483 484 485 .. 5022
502,152 events total
2020-10-06 22:32:59 <dminuoso> I'd use `has` separately beforehand
2020-10-06 22:33:57 <ski> (perhaps one could get list of updated values ?)
2020-10-06 22:35:47 <monochrom> yushyin: In the Haskell Platform and cabal-v1 days, I used to recommend something like that, but using version numbers chosen by Haskell Platform.
2020-10-06 22:36:52 × son0p quits (~son0p@181.136.122.143) (Remote host closed the connection)
2020-10-06 22:38:18 × pacak quits (~pacak@bb116-14-220-91.singnet.com.sg) (Read error: Connection reset by peer)
2020-10-06 22:38:18 × nineonin_ quits (~nineonine@216.81.48.202) (Read error: Connection reset by peer)
2020-10-06 22:38:27 nineonine joins (~nineonine@216.81.48.202)
2020-10-06 22:38:43 pacak joins (~pacak@bb116-14-220-91.singnet.com.sg)
2020-10-06 22:39:45 <yushyin> Hehe, I don't really recommend it, though. I'm also fine with the behaviour of cabal v2- like it is today. After I update the index (and no pinning) I *do* expect some rebuilds.
2020-10-06 22:42:29 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
2020-10-06 22:43:04 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Ping timeout: 258 seconds)
2020-10-06 22:43:50 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Ping timeout: 258 seconds)
2020-10-06 22:45:19 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 22:45:27 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
2020-10-06 22:45:39 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 22:46:08 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 22:46:27 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 22:46:56 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 22:47:14 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 22:47:43 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 22:47:53 <monochrom> cabal v1 reusing installed libs was actually only true in its last days. Over most of v1's life it wantonly brought in newer versions as much as v2 does today.
2020-10-06 22:47:59 shatriff joins (~vitaliish@217.27.153.240)
2020-10-06 22:48:31 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 22:48:35 <monochrom> It is why my historical advice such as http://www.vex.net/~trebla/haskell/cabal-cabal.xhtml#lockdown existed.
2020-10-06 22:49:49 <monochrom> The difference though is v1 did it unsafely, v2 does it safely.
2020-10-06 22:49:58 × conal quits (~conal@209.58.130.230) (Quit: Computer has gone to sleep.)
2020-10-06 22:52:26 × chaosmasttter quits (~chaosmast@p200300c4a73b2e01d0131264df465fff.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
2020-10-06 22:53:45 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2020-10-06 22:54:26 × m0rphism quits (~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 272 seconds)
2020-10-06 22:54:57 zaquest joins (~notzaques@5.128.210.178)
2020-10-06 22:56:32 <orzo> how do i use index-state? The docs show putting a time stamp there, but where do i get the time stamp
2020-10-06 22:56:37 <unclechu> dminuoso: i’m trying to define my own operator: `(??~) :: Lens' s a -> a -> s -> Either s s; (??~) lens x s = (if has lens s then Right else Left) (set lens x s)`
2020-10-06 22:56:37 <unclechu> but when i try to use it: `((),Just(10,True,Just(20,Right 30))) & (_2._Just._3._Just._2._Right) ??~ 200` i get this: error `Could not deduce (Applicative f) arising from a use of ‘_Just’`
2020-10-06 22:57:13 <monochrom> I haven't tried, but I would try just choosing a time in the past I like.
2020-10-06 22:58:07 <unclechu> dminuoso: maybe you have any idea what i’m missing?
2020-10-06 23:01:15 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
2020-10-06 23:01:29 <monochrom> You know, if you really still like v1 the commands and their semantics, you can still use them, most of them are still available in cabal-install-3.2, or you could even find and use an older cabal-install.
2020-10-06 23:01:40 <Axman6> orzo: what's index-state?
2020-10-06 23:02:02 <monochrom> Axman6: this one: https://cabal.readthedocs.io/en/3.4/cabal-project.html#cfg-field-index-state
2020-10-06 23:03:53 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-06 23:04:26 conal joins (~conal@209.58.130.230)
2020-10-06 23:08:00 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-10-06 23:08:27 <dsal> > ((),Just(10,True,Just(20,Right 30))) & (_2 . _Just . _3 . _Just . _2 . _Right) ?~ 200 -- unclechu I'm not entirely sure what you're going for there.
2020-10-06 23:08:30 <lambdabot> ((),Just (10,True,Just (20,Right (Just 200))))
2020-10-06 23:08:39 <dsal> But in any case, I'd probably start with a smaller example. :)
2020-10-06 23:11:50 × danso quits (~dan@107-190-41-58.cpe.teksavvy.com) (Read error: Connection reset by peer)
2020-10-06 23:12:22 danso joins (~dan@107-190-41-58.cpe.teksavvy.com)
2020-10-06 23:16:15 <unclechu> dsal: `?~` has a completely different purpose
2020-10-06 23:16:45 <dminuoso> 00:33:57 ski | (perhaps one could get list of updated values ?)
2020-10-06 23:16:46 × conal quits (~conal@209.58.130.230) (Quit: Computer has gone to sleep.)
2020-10-06 23:16:49 <dminuoso> That would be a Fold then.
2020-10-06 23:16:50 <unclechu> dsal: it doesn’t wrap the whole value into `Maybe`, only the value deep inside
2020-10-06 23:16:53 × mirrorbird quits (~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276) (Quit: Leaving)
2020-10-06 23:17:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-95-218.w86-212.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2020-10-06 23:17:33 zebrag joins (~inkbottle@aaubervilliers-654-1-109-218.w86-212.abo.wanadoo.fr)
2020-10-06 23:18:49 <dminuoso> unclechu: Dunno, my lens-fu is quite weak. I'd just write it in optics and let their advanced diagnostics figure it out.
2020-10-06 23:18:54 <dsal> > ((),Just(10,True,Just(20,Right 30))) & (_2._Just._3._Just._2._Right) .~ 200 -- ok. Like I said, I don't quite understand your goal.
2020-10-06 23:18:57 <lambdabot> ((),Just (10,True,Just (20,Right 200)))
2020-10-06 23:19:57 <dminuoso> ski: Or are you suggesting some kind of `ASetter s t a b -> b -> s -> (t, [s])`
2020-10-06 23:20:25 <unclechu> dsal: `((),Just(10,True,Just(20,Right 30))) & (_2._Just._3._Just._2._Right) ??~ 200` would give me `Just ((),Just (10,True,Just (20,Right 200)))`
2020-10-06 23:20:25 <unclechu> this `((),Just(10,True,Just(20,Left 30))) & (_2._Just._3._Just._2._Right) ??~ 200` would give me `Nothing`
2020-10-06 23:20:54 <dminuoso> Which I guess you can concoct if you run the lens with State
2020-10-06 23:21:20 <dminuoso> Or.. not quite
2020-10-06 23:21:40 zargoertzel joins (~zar@fw1.ciirc.cvut.cz)
2020-10-06 23:21:43 <ski> dminuoso : more like `ASetter s t a b -> b -> s -> (t,[b])', then, i think
2020-10-06 23:22:18 <ski> although, i suppose i had in mind updating with a function
2020-10-06 23:22:18 <unclechu> Setter would not work with `has`
2020-10-06 23:22:31 <Axman6> :T has
2020-10-06 23:22:34 <Axman6> :t has
2020-10-06 23:22:36 <lambdabot> Getting Any s a -> s -> Bool
2020-10-06 23:23:35 <ski> the idea was just, if you get a list of the updated values, then you could easily check if this is empty, to see whether any value was updated
2020-10-06 23:24:16 × zariuq quits (~zar@fw1.ciirc.cvut.cz) (Ping timeout: 256 seconds)
2020-10-06 23:25:10 <ski> (but perhaps unclechu wanted not to see whether any value was updated, but rather whether "any expected update failed (due to absence of the intended location)", if that makes sense (not sure))
2020-10-06 23:26:26 <unclechu> ski: well, yes, i just want to see whether a value is failed to update or not
2020-10-06 23:27:02 <ski> (anyway, going from `(t,[b])' to `Maybe t' or `Either s t' is obvious)
2020-10-06 23:27:25 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2020-10-06 23:28:01 <ski> unclechu : even if some other locations was succeddfully updated, at the same time ?
2020-10-06 23:28:13 <unclechu> ski: but i missed how do i get to `(t,[b])`?
2020-10-06 23:28:54 <ski> i didn't figure that out. it just sounded like something that could be possible
2020-10-06 23:29:09 <unclechu> ski: well, my main intention was to check a single update, i didn’t think much about multiple updates
2020-10-06 23:29:28 <ski> (in the worst case, by separately extracting the values at the requested locations. but nicer would be to be able to do both at the same time)
2020-10-06 23:29:53 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
2020-10-06 23:29:59 <ski> the point is that having zero locations to update is a special case of having multiple locations
2020-10-06 23:30:14 conal joins (~conal@209.58.130.230)
2020-10-06 23:30:44 nitrix is now known as nitrix-or-treats
2020-10-06 23:31:01 <ski> and, afaik, updating with `_Just' and `_Right' is treated like updating zero or one location (depending on whether you have `Nothing'/`Left (...)' or `Just (...)'/`Right (...)')
2020-10-06 23:33:07 <ski> but say you have a list of type `[Maybe Int]', or of type `[Either String Int]', and you want to add two to each `Int'. it should be able to get an indication if there was no `Int's there at all to update. but, from what you're saying, it sounds like maybe you'd want to get an indication as soon as at least one (rather than all) of the list elements is of the form `Nothing'/`Left (...)'
2020-10-06 23:34:35 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Quit: Leaving...)
2020-10-06 23:40:01 × jneira_ quits (~jneira@80.30.101.206) (Remote host closed the connection)
2020-10-06 23:44:46 thir joins (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-06 23:49:07 × thir quits (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-06 23:52:04 snakemas1 joins (~snakemast@213.100.206.23)
2020-10-06 23:52:07 × seanvert quits (~user@177.84.244.242) (Remote host closed the connection)
2020-10-06 23:56:43 × snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 256 seconds)
2020-10-06 23:56:53 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-10-06 23:57:17 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-10-06 23:58:43 <sm[m]> monochrom: re "v1 did it unsafely, v2 does it safely" - I know what you mean, but I'd amend that to "more safely" - it's still going to the net and downloading a new chunk of software, which may or may not compile or have correct bounds, which the user often has not intended. I think this is still a weakness of cabal-install as a practical tool - it's too willing to do risky operations when the user is not wanting anything to
2020-10-06 23:58:43 <sm[m]> change
2020-10-06 23:58:45 × conal quits (~conal@209.58.130.230) (Quit: Computer has gone to sleep.)
2020-10-06 23:59:17 conal joins (~conal@209.58.130.230)

All times are in UTC.