Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 548 549 550 551 552 553 554 555 556 557 558 .. 5022
502,152 events total
2020-10-09 23:49:23 <Guest18> Although it does make sense now that i think about it, otherwise i couldn't have made this module, as it uses a where in the beginning
2020-10-09 23:49:38 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-09 23:50:17 × leungbk quits (~user@2605:e000:1315:706:26ff:1608:dcbb:bfdf) (Remote host closed the connection)
2020-10-09 23:51:20 <ski> Guest18 : ah. now you know :)
2020-10-09 23:51:32 <ski> you can, of course, also put type signatures in there
2020-10-09 23:52:50 <Guest18> So you're saying make deleteOn to be merge, that takes 2 BSTs and merges them, and i can apply the deleteBST to the left subtree before giving it to merge, and then construct a minSplit function and define it in a where clause in deleteBST, that will return the minimum of the right subtree, aka head (flatten right)
2020-10-09 23:53:00 <Guest18> am i undersanding this correctly?
2020-10-09 23:53:07 × conal quits (~conal@64.71.133.70) (Ping timeout: 240 seconds)
2020-10-09 23:53:45 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-09 23:54:29 × nados quits (~dan@107-190-41-58.cpe.teksavvy.com) (Read error: Connection reset by peer)
2020-10-09 23:55:03 nados joins (~dan@107-190-41-58.cpe.teksavvy.com)
2020-10-09 23:55:15 <ski> why apply `deleteBST' ?
2020-10-09 23:55:44 <ski> `minSplit' would not be defined locally, since it could well be a common operation a user could want to do
2020-10-09 23:56:19 <ski> and your `deleteOn'/`merge' could be defined, in terms of `minSplit'
2020-10-09 23:56:35 <ski> (instead of using `flatten' and `deleteBST')
2020-10-09 23:56:39 snakemas1 joins (~snakemast@213.100.206.23)
2020-10-09 23:58:11 × perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 240 seconds)
2020-10-09 23:58:39 <Guest18> I am sorry, but I don't see how this would eliminate deleteBST from being called in `merge`
2020-10-09 23:58:49 <Guest18> I still need it
2020-10-09 23:59:16 xff0x joins (~fox@2001:1a81:5233:da00:49ff:f70d:c215:5652)
2020-10-09 23:59:35 <Guest18> I am also really really tired, it's 3 AM here
2020-10-10 00:00:02 × larsan1 quits (~larsan@178.239.168.171) ()
2020-10-10 00:01:22 Katarushisu2 joins (~Katarushi@cpc149712-finc20-2-0-cust535.4-2.cable.virginm.net)
2020-10-10 00:01:26 × snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 265 seconds)
2020-10-10 00:02:05 × Katarushisu quits (~Katarushi@cpc149712-finc20-2-0-cust535.4-2.cable.virginm.net) (Ping timeout: 240 seconds)
2020-10-10 00:02:05 Katarushisu2 is now known as Katarushisu
2020-10-10 00:03:15 <Guest18> the edges of the screen are starting to get blurry
2020-10-10 00:03:32 elliott_ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-10 00:05:42 <dsal> Sleep solves a lot of programming problems.
2020-10-10 00:07:01 <Guest18> Schlafen is fur die Schwachen
2020-10-10 00:07:52 <Guest18> ist
2020-10-10 00:10:24 sand_dull joins (~theuser@104.140.53.43)
2020-10-10 00:13:29 perrier-jouet joins (perrier-jo@gateway/vpn/privateinternetaccess/perrier-jouet)
2020-10-10 00:14:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-10-10 00:14:50 raehik joins (~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net)
2020-10-10 00:16:11 <ski> Guest18 : why do you need it ?
2020-10-10 00:16:49 ski . o O ( "Ich will mit mein Kopf arbeiten. Am liebsten möchtest ich schlafen." )
2020-10-10 00:18:20 <MarcelineVQ> ichkabibble
2020-10-10 00:19:12 Katarushisu5 joins (~Katarushi@cpc149712-finc20-2-0-cust535.4-2.cable.virginm.net)
2020-10-10 00:19:13 × Katarushisu quits (~Katarushi@cpc149712-finc20-2-0-cust535.4-2.cable.virginm.net) (Ping timeout: 260 seconds)
2020-10-10 00:19:14 Katarushisu5 is now known as Katarushisu
2020-10-10 00:19:33 <Guest18> I need it to delete the duplicate from the right subtree. If the element i need to delete has two subtrees, i take the minimum from the right subtree, as discussed, and set it as the new root. If i stop there, that minimum element from the right subtree is still there, resulting in a duplicate in my tree
2020-10-10 00:20:18 renzhi joins (~renzhi@modemcable070.17-177-173.mc.videotron.ca)
2020-10-10 00:20:26 <ski> yes. that's why i thought using a `splitMin' would be nicer there
2020-10-10 00:21:02 <Guest18> So splitMin would return the minimum and the tree without that minimum, you say
2020-10-10 00:21:39 <Guest18> i a tuple
2020-10-10 00:21:42 <Guest18> in*
2020-10-10 00:22:31 <Guest18> right, ski?
2020-10-10 00:22:38 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-10 00:23:06 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-10 00:23:23 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-10 00:23:42 <ski> yes
2020-10-10 00:25:34 mcmoor joins (727ca7e4@114.124.167.228)
2020-10-10 00:26:53 <Guest18> ok, will do it tomorrow
2020-10-10 00:27:00 <Guest18> i seriously need to sleep now
2020-10-10 00:27:16 <Guest18> goodbye, for now
2020-10-10 00:27:31 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-10-10 00:28:09 × rekahsoft quits (~rekahsoft@fitz10681.telemetry.esentire.com) (Ping timeout: 256 seconds)
2020-10-10 00:29:43 <mcmoor> I think I might re ask my question I have data CT (c :: Color) (a :: *) where E :: CT Black a T :: Valid c c1 c2 => SColor c -> (CT c1 a) -> a -> (CT c2 a) -> CT c aclass Valid (c :: Color) (c1 :: Color) (c2 :: Color) whereinstance Valid Red Black Black instance Valid Black c1 c2
2020-10-10 00:30:44 <mcmoor> https://repl.it/repls/DisastrousClientsideDataset#main.hs
2020-10-10 00:31:30 <mcmoor> I thought that because of Valid the tree only allows Red Black Black or Black (any color) (any color)
2020-10-10 00:31:38 <mcmoor> But then there's this code
2020-10-10 00:31:40 <mcmoor> redden :: CT c a -> DT aredden (T B a x y) = DT R a x yredden (T BB a x y) = DT B a x yredden (T R a x y) = DT NB a x yredden (T NB a x y) = error "Nope"
2020-10-10 00:31:57 <mcmoor> and somehow it's compiled eventhough the tree contatins NB and BB
2020-10-10 00:33:32 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-10 00:34:52 danso joins (~dan@107-190-41-58.cpe.teksavvy.com)
2020-10-10 00:35:02 MVQq joins (~anja@198.254.202.72)
2020-10-10 00:35:07 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-10 00:35:25 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-10 00:35:40 × MVQq quits (~anja@198.254.202.72) (Client Quit)
2020-10-10 00:35:55 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-10-10 00:36:18 MVQq joins (~anja@198.254.202.72)
2020-10-10 00:36:19 × MVQq quits (~anja@198.254.202.72) (Client Quit)
2020-10-10 00:36:30 <dolio> I don't understand the problem.
2020-10-10 00:36:56 × Guest18 quits (4f7755cb@gateway/web/cgi-irc/kiwiirc.com/ip.79.119.85.203) (Quit: Ping timeout (120 seconds))
2020-10-10 00:37:53 × MarcelineVQ quits (~anja@198.254.202.72) (Ping timeout: 260 seconds)
2020-10-10 00:38:09 × Lycurgus quits (~niemand@98.4.96.130) (Quit: Exeunt)
2020-10-10 00:39:33 <mcmoor> the Valid Instance only allows Valid Red Black Black and Valid Black c1 c2
2020-10-10 00:39:59 <dolio> Those are the only ones you wrote so far.
2020-10-10 00:40:41 <dolio> Matching on a GADT doesn't go look for which typeclass instances have been written currently to filter out cases.
2020-10-10 00:41:23 <dolio> If you want that, then Valid should probably be a GADT.
2020-10-10 00:41:41 <dolio> E.G. instead of the singleton colors, make it a relation GADT.
2020-10-10 00:42:52 <mcmoor> Oh really? Interesting
2020-10-10 00:43:08 <mcmoor> This is not my code and I'm trying to understand how it works
2020-10-10 00:43:51 <ski> (or a type family ?)
2020-10-10 00:43:55 <mcmoor> But like in GHCI I can't make something like (T BB a x y) or (T NB a x y) without being scolded by the compiler so I'm confused why it allows this one
2020-10-10 00:44:03 <dolio> Yeah, there are probably multiple ways to do it.
2020-10-10 00:44:13 <ski> (a closed one, i mean)
2020-10-10 00:48:20 <dolio> I think the issue with that would be that GADTs (inductive families) are kind of genuinely different than type families (recursively defined types) in Haskell, because of bottom.
2020-10-10 00:49:09 <dolio> Or maybe the coverage checker is smart enough for that, I'm not sure.
2020-10-10 00:49:28 MarcelineVQ joins (~anja@198.254.202.72)
2020-10-10 00:49:42 × Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Remote host closed the connection)
2020-10-10 00:49:55 × perrier-jouet quits (perrier-jo@gateway/vpn/privateinternetaccess/perrier-jouet) (Ping timeout: 260 seconds)
2020-10-10 00:50:01 Axman6 joins (~Axman6@pdpc/supporter/student/Axman6)
2020-10-10 00:53:13 <dolio> mcmoor: Yeah, you can't build them, because there's no instance in scope to build them.
2020-10-10 00:53:23 × elliott_ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
2020-10-10 00:53:26 <dolio> But you can't assume that a function won't receive one.
2020-10-10 00:53:40 Sososasa joins (~textual@2601:643:8000:a570:9513:b921:a468:618c)
2020-10-10 00:54:23 × Sososasa quits (~textual@2601:643:8000:a570:9513:b921:a468:618c) (Client Quit)
2020-10-10 00:54:47 <dolio> Type classes aren't closed, so in principle, someone could write an instance, build one, and give it to your function.

All times are in UTC.