Logs: freenode/#haskell
| 2020-10-03 06:42:18 | × | jle` quits (~mstksg@unaffiliated/mstksg) (Ping timeout: 256 seconds) |
| 2020-10-03 06:42:20 | <p0a> | Because I have a Database -> [String] function applied to my db. Uh, sorry everyone I'm just confused. |
| 2020-10-03 06:42:53 | <c_wraith> | what do you want to do if it's Nothing? |
| 2020-10-03 06:43:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-10-03 06:43:29 | <ski> | <p0a> propagate the failure |
| 2020-10-03 06:44:18 | <p0a> | I like that (1+) <$> Nothing == Nothing, so that's the kind of thing I want |
| 2020-10-03 06:44:25 | × | Stanley|00 quits (~stanley00@unaffiliated/stanley00) () |
| 2020-10-03 06:44:31 | <ski> | .. but at some point, you're going to have to handle the possible `Nothing', in some way (perhaps just by throwing away a `Maybe ()' result ..) |
| 2020-10-03 06:46:02 | × | HaskellYogi quits (~vivekrama@49.207.196.239) (Remote host closed the connection) |
| 2020-10-03 06:46:39 | → | HaskellYogi joins (~vivekrama@49.207.196.239) |
| 2020-10-03 06:46:53 | <p0a> | i.e. I wnat something like (putStrLn . show) <$> (Just 1) |
| 2020-10-03 06:46:58 | <p0a> | but as is it won't work |
| 2020-10-03 06:47:15 | <p0a> | I think MaybeT might be what I need |
| 2020-10-03 06:47:16 | <c_wraith> | what do you want to *happen* if it's Nothing? |
| 2020-10-03 06:47:37 | <taurux> | p0a: It does not work because it has type (Maybe (IO ())) |
| 2020-10-03 06:47:50 | <p0a> | c_wraith: no print |
| 2020-10-03 06:47:55 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 2020-10-03 06:48:05 | <c_wraith> | do you care to communicate the information to a higher level? |
| 2020-10-03 06:48:10 | <c_wraith> | err, communicate the failure |
| 2020-10-03 06:48:16 | <p0a> | no because this is version alpha of the thing I'm doing |
| 2020-10-03 06:48:27 | <p0a> | I was planning to move to RIO after I get something down and do things more properly |
| 2020-10-03 06:48:30 | <taurux> | if you use MaybeT you can directly bind it in an action in do-notation, and perform the related IO action. If it is nothing, the whole function will return Nothing (wrapped in MaybeT) |
| 2020-10-03 06:48:30 | × | falafel quits (~falafel@2605:e000:1527:d491:a806:37fa:6971:2798) (Remote host closed the connection) |
| 2020-10-03 06:48:33 | → | todda7 joins (~torstein@athedsl-4367507.home.otenet.gr) |
| 2020-10-03 06:48:38 | <c_wraith> | traverse_ or mapM_ work with Maybe, too |
| 2020-10-03 06:48:49 | → | falafel joins (~falafel@2605:e000:1527:d491:a806:37fa:6971:2798) |
| 2020-10-03 06:48:53 | <c_wraith> | so you could do something like mapM_ (mapM_ putStrLn) |
| 2020-10-03 06:48:59 | <p0a> | ah two mapM_'s |
| 2020-10-03 06:49:15 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-03 06:49:18 | <p0a> | nice. I did notice that mapM_ worked with Maybe which is why my code was working in the first place (but putStrLn . show was applied to [String] ...) |
| 2020-10-03 06:49:24 | <p0a> | of course! thanks |
| 2020-10-03 06:50:25 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds) |
| 2020-10-03 06:51:21 | → | GyroW joins (~GyroW@d54c03e98.access.telenet.be) |
| 2020-10-03 06:51:21 | × | GyroW quits (~GyroW@d54c03e98.access.telenet.be) (Changing host) |
| 2020-10-03 06:51:21 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-03 06:52:14 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2020-10-03 06:52:27 | × | Foritus quits (~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net) (Read error: Connection reset by peer) |
| 2020-10-03 06:53:12 | → | Foritus joins (~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net) |
| 2020-10-03 06:53:28 | × | HaskellYogi quits (~vivekrama@49.207.196.239) (Ping timeout: 246 seconds) |
| 2020-10-03 06:53:38 | → | Dimlock joins (~Dimlock@195.140.213.38) |
| 2020-10-03 06:53:48 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2020-10-03 06:55:22 | → | jle` joins (~mstksg@cpe-23-240-75-236.socal.res.rr.com) |
| 2020-10-03 06:55:22 | × | jle` quits (~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host) |
| 2020-10-03 06:55:22 | → | jle` joins (~mstksg@unaffiliated/mstksg) |
| 2020-10-03 06:55:27 | → | HaskellYogi joins (~vivekrama@49.207.196.239) |
| 2020-10-03 06:55:28 | → | shatriff joins (~vitaliish@188.163.30.117) |
| 2020-10-03 06:58:47 | → | mav1 joins (~mav@i59F4E15F.versanet.de) |
| 2020-10-03 06:59:22 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-03 07:00:12 | × | HaskellYogi quits (~vivekrama@49.207.196.239) (Ping timeout: 256 seconds) |
| 2020-10-03 07:00:34 | → | aenesidemus_ joins (~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) |
| 2020-10-03 07:00:50 | → | HaskellYogi joins (~vivekrama@49.207.196.239) |
| 2020-10-03 07:00:50 | → | xerox__ joins (~xerox@unaffiliated/xerox) |
| 2020-10-03 07:01:09 | → | madjestic joins (~madjestic@86-88-72-244.fixed.kpn.net) |
| 2020-10-03 07:01:51 | → | shatriff_ joins (~vitaliish@188.163.30.117) |
| 2020-10-03 07:02:01 | × | jle` quits (~mstksg@unaffiliated/mstksg) (Ping timeout: 265 seconds) |
| 2020-10-03 07:03:25 | × | shatriff quits (~vitaliish@188.163.30.117) (Ping timeout: 240 seconds) |
| 2020-10-03 07:03:25 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 240 seconds) |
| 2020-10-03 07:03:25 | × | aenesidemus quits (~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Ping timeout: 240 seconds) |
| 2020-10-03 07:03:44 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 2020-10-03 07:04:10 | → | zeta_0 joins (~zeta@h78.22.19.98.dynamic.ip.windstream.net) |
| 2020-10-03 07:04:17 | × | Foritus quits (~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net) (Read error: Connection reset by peer) |
| 2020-10-03 07:04:28 | <p0a> | Hey all, here's my code, feel free to criticize: https://paste.tomsmeding.com/hu7SEMVu |
| 2020-10-03 07:04:59 | → | Foritus joins (~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net) |
| 2020-10-03 07:05:15 | × | fiQ2 quits (~fiQ@mirkk.ninja) (Ping timeout: 244 seconds) |
| 2020-10-03 07:05:27 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-tarhbdjsvwboswmi) (Quit: Connection closed for inactivity) |
| 2020-10-03 07:05:37 | → | fiQ2 joins (~fiQ@mirkk.ninja) |
| 2020-10-03 07:05:58 | <p0a> | The comment at the beginning of Main.hs explains the purpose of the program. I plan to rewrite it. I want to include proper strings (instead of String), exceptions for file handling, prettier printing and some other functionality to my database (like deleting records), as well as using an actual database instead of relying on the haskell Read |
| 2020-10-03 07:06:24 | → | jle` joins (~mstksg@cpe-23-240-75-236.socal.res.rr.com) |
| 2020-10-03 07:06:24 | × | jle` quits (~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host) |
| 2020-10-03 07:06:24 | → | jle` joins (~mstksg@unaffiliated/mstksg) |
| 2020-10-03 07:07:04 | <zeta_0> | hello there, has anyone here used the haskell package miso ? my issue has to do with nix configuration. |
| 2020-10-03 07:07:26 | <p0a> | a better "search" function would be nice, the one I currently have is a bit lame. Is there a google-esque String -> String -> Double function available? (Double representing the score of x being searched in y) |
| 2020-10-03 07:07:54 | <p0a> | The only thing I'm aware of is Levenshtein distance which is not exactly what I'm describing but would do |
| 2020-10-03 07:08:11 | → | siraben joins (sirabenmat@gateway/shell/matrix.org/x-chzvshhyoygxwnpg) |
| 2020-10-03 07:09:40 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-03 07:10:45 | × | HaskellYogi quits (~vivekrama@49.207.196.239) (Ping timeout: 240 seconds) |
| 2020-10-03 07:11:25 | × | todda7 quits (~torstein@athedsl-4367507.home.otenet.gr) (Ping timeout: 240 seconds) |
| 2020-10-03 07:11:51 | <tomsmeding> | p0a ah nice idea |
| 2020-10-03 07:12:49 | → | HaskellYogi joins (~vivekrama@49.207.196.239) |
| 2020-10-03 07:12:56 | × | jle` quits (~mstksg@unaffiliated/mstksg) (Ping timeout: 258 seconds) |
| 2020-10-03 07:13:47 | <p0a> | yeah :) I think it'd be nice |
| 2020-10-03 07:13:51 | → | chappi joins (~swaroop@157.49.68.100) |
| 2020-10-03 07:13:55 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-10-03 07:13:56 | × | zeta_0 quits (~zeta@h78.22.19.98.dynamic.ip.windstream.net) (Quit: rcirc on GNU Emacs 26.3) |
| 2020-10-03 07:14:08 | <p0a> | tomsmeding: btw in my latest paste https://paste.tomsmeding.com/hu7SEMVu there is no colors |
| 2020-10-03 07:14:23 | <p0a> | Did I break it by having lines that are too long? |
| 2020-10-03 07:14:35 | <taurux> | i see colors just fine in your paste |
| 2020-10-03 07:14:36 | <p0a> | oh nevermind I toggled highlighting |
| 2020-10-03 07:15:03 | p0a | is in a permanent state of confusion |
| 2020-10-03 07:15:18 | <ski> | (mapM_ . mapM_) (putStrLn . if optPathOnly opts then path else show) . fmap (queryStrings nonOptions) =<< readDatabase (optDatabase opts) |
| 2020-10-03 07:15:41 | <p0a> | ah thank you ski let me think about that |
| 2020-10-03 07:16:06 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-modyeizvecmfjtqb) (Ping timeout: 244 seconds) |
| 2020-10-03 07:16:11 | <ski> | not sure whether you want to elide naming `db', but you can do it |
| 2020-10-03 07:16:13 | <p0a> | kinda intense to be honest |
| 2020-10-03 07:16:31 | <p0a> | Like, it's cool that you can write and understand that |
| 2020-10-03 07:16:41 | <p0a> | but I think it places an unnecessary barrier to those of us who can't :P |
| 2020-10-03 07:16:55 | <p0a> | or am I being naive? idk |
| 2020-10-03 07:17:21 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-sxnpuddjngolmugc) |
| 2020-10-03 07:17:30 | × | chappi quits (~swaroop@157.49.68.100) (Remote host closed the connection) |
| 2020-10-03 07:18:39 | <p0a> | okay so =<< allows us to ignore the do binding, then you fmap over the Maybe, followed by a double mapM_ to get inside Maybe and List |
All times are in UTC.