Logs: freenode/#haskell
| 2020-09-29 00:56:54 | <ski> | the `let' is shadowing the `d' input with another locally defined function called `d' |
| 2020-09-29 00:57:55 | → | DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) |
| 2020-09-29 00:59:18 | <ski> | it also seems to me like this is better written without guards |
| 2020-09-29 00:59:31 | <Axman6> | absolutely |
| 2020-09-29 00:59:53 | <sepi> | where x /= xs, test ( next elements in xs, s, fs, d) ? |
| 2020-09-29 00:59:55 | <ski> | (but if you really want to, i guess you could use them .. but it'd be unidiomatic) |
| 2020-09-29 01:00:05 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-09-29 01:00:35 | <ski> | sepi : what is that supposed to check ? |
| 2020-09-29 01:01:42 | <sepi> | I want to check if the states in xs are all unique |
| 2020-09-29 01:02:05 | <ski> | how about defining a separate function for checking that ? |
| 2020-09-29 01:02:20 | → | filwisher joins (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net) |
| 2020-09-29 01:02:36 | <ski> | it seems you're trying to do too many things at the same time, in `checkFSM', and confusing them up with each other |
| 2020-09-29 01:03:11 | <sepi> | checkFSM call all the functions or functions would be defined inside? |
| 2020-09-29 01:03:31 | <ski> | "wishful thinking" can be useful, when programming. imagine you had a function that could check whether a list had no duplicates. then you could use that function to check one of your conditions for `checkFSM' |
| 2020-09-29 01:04:14 | × | jespada quits (~jespada@90.254.241.6) (Ping timeout: 256 seconds) |
| 2020-09-29 01:04:16 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-29 01:04:21 | <ski> | you could either put off defining that function for later (after writing a bit of `checkFSM', perhaps all). or you could start by defining this helper function, and then come back to `checkFSM', to use it there |
| 2020-09-29 01:04:46 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-29 01:04:59 | <ski> | you could either define such a helper function, inside a `where'-clause for `checkFSM'. or define it separately, in your module |
| 2020-09-29 01:05:17 | <ski> | (with the latter option, you could test it out on its own, in the interactor) |
| 2020-09-29 01:06:42 | <ski> | anyway, if you'd like to try this, you'd then have to do one of the harder things in programming .. namely invent some suitable name, for this helper function |
| 2020-09-29 01:07:56 | <Axman6> | I already did some of that work, with isSubsetOf above |
| 2020-09-29 01:08:04 | → | jespada joins (~jespada@90.254.241.6) |
| 2020-09-29 01:09:28 | → | sagax joins (~sagax_nb@213.138.71.146) |
| 2020-09-29 01:09:55 | × | nineonine quits (~nineonine@216.81.48.202) (Remote host closed the connection) |
| 2020-09-29 01:11:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2020-09-29 01:13:50 | → | concept2 joins (~concept2@unaffiliated/tubo) |
| 2020-09-29 01:13:52 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 256 seconds) |
| 2020-09-29 01:14:42 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-29 01:14:47 | → | mu__ joins (~mu@unaffiliated/mu) |
| 2020-09-29 01:15:30 | → | adam_wespiser joins (~adam_wesp@209.6.42.110) |
| 2020-09-29 01:15:50 | → | falafel joins (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) |
| 2020-09-29 01:19:00 | <sepi> | https://dpaste.org/taJt#L1,3 |
| 2020-09-29 01:19:05 | <sepi> | my mind still goes elem |
| 2020-09-29 01:19:29 | <sepi> | except I should've put notelem |
| 2020-09-29 01:20:09 | <ski> | what is the intent of `go' ? |
| 2020-09-29 01:21:47 | × | adam_wespiser quits (~adam_wesp@209.6.42.110) (Ping timeout: 240 seconds) |
| 2020-09-29 01:22:41 | <sepi> | use that to check my first case to see if qs has no duplicates is what I was thinking |
| 2020-09-29 01:22:43 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-29 01:23:22 | <ski> | that doesn't explain specifically what behaviour `go' is intended to have |
| 2020-09-29 01:24:43 | <ski> | perhaps if you'd have a suggestion for how you'd want to call `go' from `checkFSM', that might clarify it a bit ? |
| 2020-09-29 01:24:44 | × | mu__ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-29 01:24:52 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-29 01:25:04 | × | ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection) |
| 2020-09-29 01:25:32 | <Axman6> | ski: go only checks if a single element is contained in another list, it is _exactly_ the same as elem |
| 2020-09-29 01:25:37 | <Axman6> | uh, sepi |
| 2020-09-29 01:25:43 | → | ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 2020-09-29 01:25:52 | <ski> | (or else, if you prefer, you could tell what `go' is supposed to check/compute, given inputs, without referring to how you might then use that in `checkFSM') |
| 2020-09-29 01:26:17 | × | dansho quits (~dansho@ip68-108-167-185.lv.lv.cox.net) (Remote host closed the connection) |
| 2020-09-29 01:26:33 | → | dansho joins (~dansho@ip68-108-167-185.lv.lv.cox.net) |
| 2020-09-29 01:26:52 | ski | isn't bothering with the (current) implementation of `go', so far, at most taking the type signature of it into account |
| 2020-09-29 01:27:38 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-09-29 01:29:07 | × | falafel quits (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Ping timeout: 240 seconds) |
| 2020-09-29 01:29:15 | <Axman6> | sepi: I've said a few times now you should try to write a function with the following type: Eq a => [a] -> [a] -> Bool, which returns true if all the elements in the first list are contained in the second list. what do you think the base case of this function should be? |
| 2020-09-29 01:30:01 | × | catkiki quits (~catkiki@m90-134-157-227.cust.tele2.hr) (Remote host closed the connection) |
| 2020-09-29 01:30:07 | × | revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 246 seconds) |
| 2020-09-29 01:32:17 | → | nineonine joins (~nineonine@216-19-190-182.dyn.novuscom.net) |
| 2020-09-29 01:32:20 | → | revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) |
| 2020-09-29 01:32:51 | × | nineonine quits (~nineonine@216-19-190-182.dyn.novuscom.net) (Remote host closed the connection) |
| 2020-09-29 01:33:06 | → | nineonine joins (~nineonine@216-19-190-182.dyn.novuscom.net) |
| 2020-09-29 01:33:13 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-29 01:34:41 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-29 01:34:47 | → | mu__ joins (~mu@unaffiliated/mu) |
| 2020-09-29 01:35:13 | × | revprez_stg quits (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 260 seconds) |
| 2020-09-29 01:35:39 | → | revprez_stg joins (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net) |
| 2020-09-29 01:35:39 | → | adam_wespiser joins (~adam_wesp@209.6.42.110) |
| 2020-09-29 01:35:53 | <Axman6> | sepi: do you understand that f ... | x = True | otherwise = False is the same as just f ... = x? "If x is true return true, otherwise x must be false so return false" |
| 2020-09-29 01:36:01 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 2020-09-29 01:37:07 | × | justan0theruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds) |
| 2020-09-29 01:37:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-09-29 01:37:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-09-29 01:37:36 | <sepi> | I suppose the base case would be if it were comparing list1to list2 which is empty it'd return false? |
| 2020-09-29 01:37:47 | × | Wuzzy quits (~Wuzzy@p5b0df9fe.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 2020-09-29 01:38:05 | <Axman6> | why false? |
| 2020-09-29 01:38:27 | <Axman6> | the empty set is a subset of all sets isn't it? |
| 2020-09-29 01:38:46 | <Axman6> | are all the elements of [] in [1,2,3]? |
| 2020-09-29 01:40:16 | <sepi> | ah yes I was already thinking of it backwards are all elements of [1,2,3] in [] |
| 2020-09-29 01:41:30 | → | jedws joins (~jedws@121.209.139.222) |
| 2020-09-29 01:41:41 | × | mu__ quits (~mu@unaffiliated/mu) (Quit: mu__) |
| 2020-09-29 01:41:56 | <sepi> | for the guards I was using them because it was the only way I thought of going through all the cases at once. But I doing if, elif, elif instead it looks like |
| 2020-09-29 01:42:03 | → | snakemasterflex joins (~snakemast@213.100.206.23) |
| 2020-09-29 01:42:51 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2020-09-29 01:43:35 | <Axman6> | sepi: have you tried to write the function I suggested? |
| 2020-09-29 01:43:36 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-29 01:44:43 | <sepi> | could it work like, checkFSM (qs, [], [], []) = define func.....([], s, [], []) = define function |
| 2020-09-29 01:44:46 | <sepi> | for seperation |
| 2020-09-29 01:44:55 | <sepi> | I'll do the one you were talking about now |
| 2020-09-29 01:45:17 | <Axman6> | sepi: look, if you want help, you need to listen to the help we give. if you're going to ignore it, then I'll go and do something else, it's not worth my time |
| 2020-09-29 01:46:49 | <Axman6> | we're trying to steer you in the right direction, but you keep getting distracted. no, I don't think that will work, this isn;t something that makes sense to do by traversing the lists all at the same time. break the problem down into smaller problems like we've said, and then combine the results |
| 2020-09-29 01:47:00 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 265 seconds) |
| 2020-09-29 01:47:30 | × | CrazyPython quits (~crazypyth@71-135-5-88.lightspeed.rlghnc.sbcglobal.net) () |
| 2020-09-29 01:47:58 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2020-09-29 01:48:32 | <Axman6> | your final function will probably look something like: checkFSM (qs, s, fs d) = uniqueStates && startIsValid && finalsAreValid && transitionsAreValid where uniqueStates = ...; startsAreValid = ... |
| 2020-09-29 01:50:34 | <ski> | sepi : have you used `&&' before ? do you know what it means ? |
| 2020-09-29 01:50:54 | × | nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Remote host closed the connection) |
| 2020-09-29 01:51:59 | → | nek0 joins (~nek0@2a01:4f8:222:2b41::12) |
| 2020-09-29 01:53:08 | × | xff0x quits (~fox@2001:1a81:537a:5700:d96:c29a:71ef:4f01) (Ping timeout: 246 seconds) |
| 2020-09-29 01:53:36 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-29 01:54:28 | × | rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Ping timeout: 260 seconds) |
| 2020-09-29 01:54:46 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
All times are in UTC.