Logs: liberachat/#haskell
| 2021-06-29 10:18:49 | <Profpatsch> | <link rel="icon" href="data:,"> |
| 2021-06-29 10:18:51 | <Profpatsch> | guibou: haha, sorry, but hi! :) |
| 2021-06-29 10:19:04 | <Profpatsch> | int-e: the snippet i just posted makes the browser not request it |
| 2021-06-29 10:20:05 | <rawles> | I use <link rel="icon" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4K"/> to avoid additional requests to /favicon.ico - it's the smallest valid data URL I could find. |
| 2021-06-29 10:20:35 | <Profpatsch> | rawles: empty data works as well |
| 2021-06-29 10:20:50 | <Profpatsch> | maybe not in all browsers though |
| 2021-06-29 10:21:44 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-06-29 10:21:48 | <int-e> | you can probably use https://hackage.haskell.org/package/scotty-0.12/docs/Web-Scotty-Trans.html#v:file and serve an actual image for /favicon.ico (a 32x32 or 64x64 png should work fine?) |
| 2021-06-29 10:22:39 | × | sayola quits (~vekto@dslb-088-078-152-192.088.078.pools.vodafone-ip.de) (Read error: Connection reset by peer) |
| 2021-06-29 10:24:52 | × | theproffesor quits (~theproffe@user/theproffesor) (Ping timeout: 272 seconds) |
| 2021-06-29 10:26:41 | <guest61> | yes |
| 2021-06-29 10:26:58 | <guest61> | file in scotty is very easy to use |
| 2021-06-29 10:27:16 | → | dunj4 joins (~dunj3@p200300f61714a6027bbd4f06e8da6b8b.dip0.t-ipconnect.de) |
| 2021-06-29 10:27:31 | <guest61> | https://paste.ubuntu.com/p/JR22Gcjfp6/ |
| 2021-06-29 10:27:42 | <guest61> | I like its simple |
| 2021-06-29 10:28:01 | → | Torro joins (Torro@gateway/vpn/protonvpn/torro) |
| 2021-06-29 10:28:03 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-29 10:28:04 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-06-29 10:29:56 | × | dunj3 quits (~dunj3@p200300f61714a693595934ba002cc8b5.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2021-06-29 10:32:22 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 246 seconds) |
| 2021-06-29 10:39:19 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:48c3:15b7:84fd:d26e) |
| 2021-06-29 10:39:32 | × | dka quits (~code-is-a@ns3059207.ip-193-70-33.eu) (Quit: My Ex-Girlfriend once told me: I'm not a slut, I'm just popular) |
| 2021-06-29 10:40:19 | → | PHO joins (~pho@akari.cielonegro.org) |
| 2021-06-29 10:40:25 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) |
| 2021-06-29 10:41:25 | PHO | is now known as PHO` |
| 2021-06-29 10:44:00 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:48c3:15b7:84fd:d26e) (Ping timeout: 256 seconds) |
| 2021-06-29 10:45:19 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 2021-06-29 10:46:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 10:57:02 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-06-29 10:57:33 | → | Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-06-29 10:57:35 | → | chomwitt joins (~Pitsikoko@athedsl-16082.home.otenet.gr) |
| 2021-06-29 10:57:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:01:38 | → | xsperry joins (~as@user/xsperry) |
| 2021-06-29 11:02:17 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-06-29 11:02:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 2021-06-29 11:03:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:03:52 | × | Guest7 quits (~Guest7@mob-5-90-96-69.net.vodafone.it) (Quit: Client closed) |
| 2021-06-29 11:07:30 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2021-06-29 11:08:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-06-29 11:08:44 | → | cfricke joins (~cfricke@user/cfricke) |
| 2021-06-29 11:09:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:09:29 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-06-29 11:10:06 | → | chris_ joins (~chris@81.96.113.213) |
| 2021-06-29 11:14:34 | × | PHO` quits (~pho@akari.cielonegro.org) (Quit: Server Configuration changed; reconnect) |
| 2021-06-29 11:14:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-06-29 11:14:42 | → | PHO` joins (~pho@akari.cielonegro.org) |
| 2021-06-29 11:14:53 | × | chris_ quits (~chris@81.96.113.213) (Ping timeout: 265 seconds) |
| 2021-06-29 11:15:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:16:12 | × | PHO` quits (~pho@akari.cielonegro.org) (Remote host closed the connection) |
| 2021-06-29 11:16:27 | → | PHO` joins (~pho@akari.cielonegro.org) |
| 2021-06-29 11:20:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-06-29 11:21:06 | × | chomwitt quits (~Pitsikoko@athedsl-16082.home.otenet.gr) (Ping timeout: 240 seconds) |
| 2021-06-29 11:21:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:22:24 | <Unhammer> | Is there a way to get ghci to run a command after every :r ? |
| 2021-06-29 11:26:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 2021-06-29 11:27:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:27:13 | <boxscape_> | Unhammer you can use `:def` in your ghci config file to make a new command that reloads and then runs something or to overwrite the :r command |
| 2021-06-29 11:27:27 | <Unhammer> | oh good idea |
| 2021-06-29 11:28:32 | <boxscape_> | hm although I'm currently failing to actually figure out how to use it properly |
| 2021-06-29 11:33:59 | → | gensyst joins (gensyst@user/gensyst) |
| 2021-06-29 11:34:26 | → | fendor_ joins (~fendor@77.119.197.237.wireless.dyn.drei.com) |
| 2021-06-29 11:34:35 | × | wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal) |
| 2021-06-29 11:35:09 | <gensyst> | In this https://pastebin.com/n4s0i2Qb (pardon the ridiculous example), is there a way to use "let" (or something) to avoid duplicating "my_func i" those four times in that pattern matching? |
| 2021-06-29 11:35:43 | <gensyst> | The trick is that "i" is only extracted "later on". |
| 2021-06-29 11:35:56 | <gensyst> | s/trick/challenge |
| 2021-06-29 11:36:12 | <Unhammer> | boxscape_, |
| 2021-06-29 11:36:13 | <Unhammer> | :def g \_ -> return $ ":r\nJust d <- DevelGet.get :: IO (Maybe Data)" |
| 2021-06-29 11:36:15 | <Unhammer> | worked for me :) |
| 2021-06-29 11:36:21 | <boxscape_> | ah, nice |
| 2021-06-29 11:37:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-06-29 11:38:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:38:53 | <kuribas> | gensyst: case testm of Nothing -> 2; Just i -> let mf = my_func i in (if | mf > 3 -> mf; f < -30 -> mf + 1000; otherwise -> 0); |
| 2021-06-29 11:39:10 | <kuribas> | use multiwayif |
| 2021-06-29 11:39:15 | <boxscape_> | gensyst or with ViewPatterns you should be able to do https://paste.tomsmeding.com/qMVAfDaa |
| 2021-06-29 11:39:24 | × | Raito_Bezarius quits (~Raito@2a01:e0a:5f9:9681:bdcd:d554:1779:9a1a) (Changing host) |
| 2021-06-29 11:39:24 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 2021-06-29 11:40:48 | <boxscape_> | though I suppose realistically I would do it more similarly to kuribas and combine the guards https://paste.tomsmeding.com/FFFW20ej |
| 2021-06-29 11:42:36 | <kuribas> | I mean: (if | mf > 3 -> mf | f < -30 -> mf + 1000 | otherwise -> 0) |
| 2021-06-29 11:43:11 | <boxscape_> | for good measure, a solution that doesn't require extensions https://paste.tomsmeding.com/cYPx7PJ3 |
| 2021-06-29 11:43:53 | <kuribas> | boxscape_: nice |
| 2021-06-29 11:43:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-06-29 11:44:26 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-29 11:44:42 | → | Guest33 joins (~textual@c-107-4-204-12.hsd1.mn.comcast.net) |
| 2021-06-29 11:45:54 | × | acidjnk quits (~acidjnk@p200300d0c72b953738da50577290d8ed.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2021-06-29 11:46:38 | <merijn> | kuribas: Eh, why use multiwayif? You can just use guards on the case? |
| 2021-06-29 11:46:55 | <kuribas> | merijn: because there is a let in between? |
| 2021-06-29 11:47:10 | <merijn> | You can use guards on the let :p |
| 2021-06-29 11:47:16 | → | kilolympus joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) |
| 2021-06-29 11:47:17 | → | alphabeta joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) |
| 2021-06-29 11:47:22 | → | dasher joins (~user@197.155.22.36) |
| 2021-06-29 11:47:37 | <kuribas> | merijn: let mf = my_func i in | mf > 3 = mf | ... ? |
| 2021-06-29 11:47:46 | × | alphabeta quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Client Quit) |
| 2021-06-29 11:47:59 | × | kilolympus quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Client Quit) |
| 2021-06-29 11:48:16 | → | kilolympus joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) |
| 2021-06-29 11:48:29 | <merijn> | kuribas: hmm, I think I'm lacking context of the original question :) |
| 2021-06-29 11:48:39 | <kuribas> | well, you could do let mf = my_func i; result | mf > 3 = mf .. in result. |
| 2021-06-29 11:49:00 | → | chris_ joins (~chris@81.96.113.213) |
| 2021-06-29 11:49:01 | <kuribas> | I think boxscape_ s last way is nicer. |
| 2021-06-29 11:49:46 | <kuribas> | or case () of () | mf > 3 = mf | ... |
| 2021-06-29 11:51:48 | × | xff0x quits (~xff0x@2001:1a81:53b8:a100:fc31:6f5c:5a37:95a) (Ping timeout: 268 seconds) |
All times are in UTC.