Logs on 2021-12-21 (liberachat/#haskell)
| 00:00:15 | <zero> | f 0 = 1 ; f n = n + n * f (pred n) -- should i expect ghci to be faster at running `f x` after i run `f (x-1)` ? |
| 00:00:28 | <Axman6> | no |
| 00:00:41 | <Axman6> | there is no automatic memoisation in Haskell |
| 00:00:47 | <Axman6> | (*) |
| 00:01:32 | <zero> | what about `map f [0..] ; f !! x` ? |
| 00:01:38 | <zero> | i mean |
| 00:02:00 | <zero> | `fx = map f [0..] ; fx !! x` |
| 00:02:06 | <Axman6> | yes |
| 00:02:15 | <zero> | got it |
| 00:02:17 | → | euouae joins (~euouae@user/euouae) |
| 00:02:21 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:02:22 | <Axman6> | because fx is still in scope |
| 00:02:54 | <geekosaur> | and it behaves like a constant, not a function |
| 00:02:57 | <monochrom> | Memoization happens if you go "fs = 1 : map (\n -> n + fs !! (pred n)) [1..] |
| 00:03:00 | <Axman6> | uh, well, actually if you ran f n, f (n-1) wouldn't be any faster |
| 00:03:00 | <zero> | question #2: why can't there be automatic memoisation in Haskell? :p |
| 00:03:26 | <geekosaur> | how much of your memory do you want to spend on inadvertently memoized stuff you'll never look at again? |
| 00:03:31 | <Axman6> | because it's generally a bad idea that leads to slow programs that use a lot of RAM |
| 00:03:33 | <monochrom> | It is a pessimization. |
| 00:04:02 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 00:04:11 | <monochrom> | Imagine a web server that memoizations all webscale transactions in the past. |
| 00:04:32 | × | acidjnk quits (~acidjnk@p200300d0c7271e5430c1f3c646e9c4d1.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 00:04:34 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 00:04:37 | <Axman6> | Why does that immediately make me thing of blockchain... |
| 00:04:39 | <Axman6> | think* |
| 00:04:47 | <monochrom> | :) |
| 00:05:54 | <Axman6> | zero: if you had fibs = 0:1:zipWith (+) fibs (tail fibs), then fibs !! n would compute fibs !! (n-1) for you |
| 00:05:54 | <zero> | what about annotating? like `{-# MEMO f #-}` |
| 00:06:10 | <Axman6> | why annotate when you can just use a function? |
| 00:06:15 | × | max22- quits (~maxime@2a01cb0883359800b82a50c14ca08cd9.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 00:06:17 | <Axman6> | @hoogle memo |
| 00:06:18 | <lambdabot> | Data.MemoTrie memo :: HasTrie t => (t -> a) -> t -> a |
| 00:06:18 | <lambdabot> | FRP.Elerea.Param memo :: Signal a -> SignalGen p (Signal a) |
| 00:06:18 | <lambdabot> | FRP.Elerea.Simple memo :: Signal a -> SignalGen (Signal a) |
| 00:06:50 | <Axman6> | hmmmm could Ed's discrimination library be used for memoisation? |
| 00:08:28 | <Axman6> | should be trivial actually... |
| 00:08:28 | × | euouae quits (~euouae@user/euouae) (Read error: Connection reset by peer) |
| 00:08:49 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 00:11:04 | <zero> | @.@ |
| 00:11:05 | <lambdabot> | Maybe you meant: @ . |
| 00:11:45 | <zero> | i would have to invest some time in understanding that |
| 00:12:42 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
| 00:13:40 | <mrianbloom> | @Janus, thanks for that suggestion. It worked but I also sent myself in cabal hell for an hour. |
| 00:13:40 | <lambdabot> | Unknown command, try @list |
| 00:13:48 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 268 seconds) |
| 00:15:37 | <Axman6> | s/trivial/"trivial" |
| 00:16:19 | <mrianbloom> | I'm out now. |
| 00:20:19 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 00:23:10 | <zero> | ok what abut this one: Data.Map.Strict.fromList [(1,let fibs = 0 : 1 : zipWith (+) fibs (tail fibs) in fibs)] |
| 00:23:57 | <zero> | should I expect ghci to give me `mymap M.! 1 !! x` faster after (x-1)? |
| 00:24:01 | <zero> | because it's not |
| 00:25:38 | → | lragyslmtdwnbt^ joins (~lragyslmt@64.253.22.77) |
| 00:27:17 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:27:17 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 00:27:17 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:27:34 | <jkaye> | Why would it? |
| 00:27:35 | <typeswitch> | should be, `mymap M.! 1` should be the same `fibs` every time |
| 00:28:12 | <zero> | actually i'm not even seeing any improvement on fibs !! x... strange |
| 00:28:21 | <typeswitch> | seems a bit convoluted to put it in a map tho |
| 00:29:26 | <geekosaur> | if you're doing this in ghci it may not work because it relies on the monomorphism restriction |
| 00:29:48 | <zero> | geekosaur: how's that? |
| 00:29:51 | <geekosaur> | otherwise it's secretly a function because your numbers are Num a => a |
| 00:30:05 | <zero> | ah.. |
| 00:30:54 | <zero> | ok it works now |
| 00:31:00 | <zero> | thanks geekosaur |
| 00:34:22 | <zero> | that's an important detail |
| 00:34:36 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 00:36:17 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 00:40:12 | × | sander quits (~sander@user/sander) (Quit: So long! :)) |
| 00:41:34 | → | sander joins (~sander@user/sander) |
| 00:42:15 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 00:44:15 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 00:45:47 | × | Tuplanolla quits (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:47:26 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 252 seconds) |
| 00:49:15 | <mrianbloom> | So if I want to use linear types do I need to replace every monad usage with the monad definition from Prelude.Linear? |
| 00:52:48 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 276 seconds) |
| 00:53:18 | <mrianbloom> | What is the right way to override Prelude by using mixins? |
| 00:53:43 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 00:54:50 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 00:54:51 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer) |
| 00:55:00 | × | aeka quits (~aeka@pool-100-4-208-71.albyny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 00:55:25 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 00:55:45 | × | Erutuon quits (~Erutuon@user/erutuon) (Client Quit) |
| 00:56:34 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 00:57:10 | → | aeka joins (~aeka@pool-100-4-208-71.albyny.fios.verizon.net) |
| 00:57:18 | <geekosaur> | I don't think mixins will work. You need to use Prelude.Linear in place of Prelude |
| 00:58:48 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 00:59:04 | <mrianbloom> | Thanks, so is the right way to make base-noprelude and linear-base dependencies? |
| 00:59:17 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 01:01:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 01:02:15 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 01:02:41 | <mrianbloom> | My hope is to avoid changing the header of every file. |
| 01:03:32 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds) |
| 01:03:46 | <geekosaur> | I don't think you will succeed |
| 01:04:10 | <geekosaur> | the documented use is to {-# LANGUAGE NoImplicitPrelude #-} and import Prelude.Linear |
| 01:04:25 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 01:04:49 | <geekosaur> | if you want it to be more transparent, I guess you'll have to talk to the folks at Tweag |
| 01:05:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:05:57 | <geekosaur> | but I'm not sure they want it to be transparent because too much would break |
| 01:06:24 | <geekosaur> | you really need to start out with linear types in mind, from what I am seeing |
| 01:08:18 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 01:08:27 | <mrianbloom> | Alright, I'm actually trying to integrate them into the futhark wrapper, futhask, to try and eliminate gpu space leaks, but I'll try it with a very simple example first. |
| 01:08:30 | <geekosaur> | they don't even use compatible module names (Monad is in Control.Functor.Linear) |
| 01:08:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Ping timeout: 240 seconds) |
| 01:08:45 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 01:08:48 | <mrianbloom> | I see. |
| 01:09:30 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 01:09:42 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 01:09:58 | <mrianbloom> | I'll try a common import module for Monad, MonadIO etc. |
| 01:10:08 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 01:10:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 01:11:19 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 01:11:48 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 01:11:52 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 01:13:37 | → | lavaman joins (~lavaman@98.38.249.169) |
| 01:13:53 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 01:13:57 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 01:17:17 | × | danso quits (~danso@d67-193-121-2.home3.cgocable.net) (Ping timeout: 240 seconds) |
| 01:17:20 | → | [_] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:17:57 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds) |
| 01:17:57 | → | trollRoger joins (~trollroge@ti0017q161-1333.bb.online.no) |
| 01:18:14 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 01:18:17 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds) |
| 01:22:26 | × | chomwitt quits (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374) (Ping timeout: 245 seconds) |
| 01:22:37 | × | aeka quits (~aeka@pool-100-4-208-71.albyny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 01:25:13 | → | ksqsf joins (~user@134.209.106.31) |
| 01:28:45 | [_] | is now known as [itchyjunk] |
| 01:29:57 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 01:31:38 | → | aeka joins (~aeka@pool-100-4-208-71.albyny.fios.verizon.net) |
| 01:32:32 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 01:38:18 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 268 seconds) |
| 01:41:22 | × | aeka quits (~aeka@pool-100-4-208-71.albyny.fios.verizon.net) (Ping timeout: 268 seconds) |
| 01:41:29 | × | trollRoger quits (~trollroge@ti0017q161-1333.bb.online.no) (Quit: WeeChat 3.4) |
| 01:41:39 | → | aeka joins (~aeka@2606:6080:1001:d:c59c:6e9a:3115:6f2f) |
| 01:45:09 | → | danso joins (~danso@d67-193-121-2.home3.cgocable.net) |
| 01:47:50 | → | bollu joins (uid233390@id-233390.helmsley.irccloud.com) |
| 01:49:01 | → | hololeap_ joins (~hololeap@user/hololeap) |
| 01:49:31 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 01:49:59 | × | hololeap quits (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
| 01:50:28 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving) |
| 01:53:57 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds) |
| 01:59:16 | × | danso quits (~danso@d67-193-121-2.home3.cgocable.net) (Ping timeout: 268 seconds) |
| 01:59:36 | × | waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
| 01:59:39 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 01:59:40 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 02:01:56 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 02:02:20 | × | johnw quits (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) (Ping timeout: 268 seconds) |
| 02:02:54 | → | Guest17 joins (~Guest17@2001:19f0:7001:3383:5400:3ff:fea2:fee5) |
| 02:05:57 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 240 seconds) |
| 02:07:14 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 02:07:17 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Ping timeout: 268 seconds) |
| 02:07:28 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 02:09:04 | × | typeswitch quits (~textual@user/typeswitch) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 02:11:42 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 260 seconds) |
| 02:13:29 | → | berberman_ joins (~berberman@user/berberman) |
| 02:14:32 | × | berberman quits (~berberman@user/berberman) (Ping timeout: 240 seconds) |
| 02:15:11 | → | Guest26 joins (~Guest26@209.141.167.143) |
| 02:15:35 | × | Guest26 quits (~Guest26@209.141.167.143) (Client Quit) |
| 02:19:14 | → | Guest23 joins (~Guest23@cpec025e909512d-cm00fc8d8c9620.cpe.net.cable.rogers.com) |
| 02:19:19 | → | ksqsf joins (~user@134.209.106.31) |
| 02:21:48 | × | Guest23 quits (~Guest23@cpec025e909512d-cm00fc8d8c9620.cpe.net.cable.rogers.com) (Client Quit) |
| 02:24:32 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds) |
| 02:25:14 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:25:14 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:25:14 | finn_elija | is now known as FinnElija |
| 02:33:17 | × | jkaye quits (~jkaye@2601:281:8300:7530:bdb2:1444:46f4:adc7) (Ping timeout: 240 seconds) |
| 02:40:59 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 02:41:29 | finstern1s | is now known as finsternis |
| 02:45:37 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds) |
| 02:46:14 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 02:48:11 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
| 02:49:37 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 02:52:00 | × | finsternis quits (~X@23.226.237.192) (Quit: leaving) |
| 02:52:40 | → | finsternis joins (~X@23.226.237.192) |
| 02:52:52 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 02:53:48 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 02:55:21 | × | xff0x quits (~xff0x@2001:1a81:5214:2e00:3a40:685:1119:99d6) (Ping timeout: 245 seconds) |
| 02:57:24 | → | xff0x joins (~xff0x@2001:1a81:5251:6900:31bd:c473:a01b:db9e) |
| 02:57:27 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 03:00:55 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds) |
| 03:02:01 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 03:07:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:12:57 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 03:13:30 | → | ksqsf joins (~user@134.209.106.31) |
| 03:14:55 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 03:17:14 | × | Guest17 quits (~Guest17@2001:19f0:7001:3383:5400:3ff:fea2:fee5) (Quit: Client closed) |
| 03:18:06 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 03:18:22 | × | td_ quits (~td@94.134.91.10) (Ping timeout: 256 seconds) |
| 03:18:26 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 260 seconds) |
| 03:18:27 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 03:19:17 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Ping timeout: 240 seconds) |
| 03:19:47 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 252 seconds) |
| 03:20:06 | → | td_ joins (~td@94.134.91.4) |
| 03:21:41 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 03:23:42 | × | lragyslmtdwnbt^ quits (~lragyslmt@64.253.22.77) (Remote host closed the connection) |
| 03:25:48 | → | mbuf joins (~Shakthi@122.164.195.237) |
| 03:26:22 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
| 03:33:04 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 03:36:34 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:36:34 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:36:34 | finn_elija | is now known as FinnElija |
| 03:37:37 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds) |
| 03:40:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 03:40:57 | hololeap_ | is now known as hololeap |
| 03:44:17 | × | kaph quits (~kaph@net-2-47-236-216.cust.vodafonedsl.it) (Read error: Connection reset by peer) |
| 03:45:46 | → | kaph joins (~kaph@net-2-47-236-216.cust.vodafonedsl.it) |
| 03:50:08 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:50:20 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 03:55:12 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 268 seconds) |
| 03:57:47 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 03:58:13 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Client Quit) |
| 03:58:37 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 04:02:02 | → | BrokenClutch joins (~pioneer@2804:d41:c251:8e00:2f95:d3cd:d94f:7520) |
| 04:04:39 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 04:07:09 | → | Neuromancer joins (~Neuromanc@user/neuromancer) |
| 04:07:37 | → | ksqsf joins (~user@134.209.106.31) |
| 04:07:53 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 04:09:17 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 04:09:19 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 04:09:22 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 04:09:48 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed) |
| 04:10:00 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 04:12:17 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 04:12:23 | × | Guest9348 quits (~mike@user/feetwind) (Quit: WeeChat 3.1) |
| 04:12:42 | ← | BrokenClutch parts (~pioneer@2804:d41:c251:8e00:2f95:d3cd:d94f:7520) () |
| 04:13:42 | → | feetwind joins (~mike@user/feetwind) |
| 04:15:14 | × | puke quits (~puke@user/puke) (Quit: puke) |
| 04:15:40 | × | cjb quits (~cjb@user/cjb) (Ping timeout: 260 seconds) |
| 04:17:58 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 04:20:31 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 04:21:44 | <Square> | Im planning on making a simple text serialization module. Possibly just work as Show and Read, wo replacing them, but not be stock derivable. I wonder if anyone knows a lib that does this or any other simple short cut before i start shoving tons of time this way. |
| 04:22:40 | <dsal> | Square: How do you want it to worok? |
| 04:23:05 | <dsal> | There's generic related things like Aeson, or DerivingVia |
| 04:25:04 | <Square> | dsal, basically i want it to work like quick (https://hackage.haskell.org/package/quiet) wo replacement of show / read |
| 04:25:53 | <Square> | dsal, ...and generics seems to be a the be a good approach to shorten time doing this. |
| 04:26:10 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 04:26:13 | <dsal> | Yeah, that uses DerivingVia |
| 04:26:56 | <Square> | And if i dont want to replace show / read - deriving via is no go right? |
| 04:27:15 | <dsal> | Orthogonal. |
| 04:27:35 | <dsal> | This is specifically making Show/Read instances. You can make up your own type class and do the same thing. |
| 04:28:25 | <Square> | So you suggest i make a copy of Show / Read and then wire it up by deriving via? |
| 04:30:09 | <dsal> | Well, you can click source on that and see what it does. It's not much. There are two things: 1: make it do the thing for Generic and 2: make it do the thing for whatever class you want. |
| 04:30:14 | <Square> | (copy in the sense of structure (not the class function names) |
| 04:30:57 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 268 seconds) |
| 04:34:17 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 04:35:02 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 04:37:29 | × | bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:39:57 | × | emf quits (~emf@2620:10d:c091:480::1:8fa6) (Ping timeout: 240 seconds) |
| 04:39:58 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 04:41:51 | → | ymh joins (~ym@pool-96-253-29-94.prvdri.fios.verizon.net) |
| 04:44:17 | × | mvk quits (~mvk@2607:fea8:5cdd:f000::917a) (Ping timeout: 240 seconds) |
| 04:44:59 | × | pfurla quits (~pfurla@2804:d41:4331:4800:5835:b5d3:9cc8:104b) (Quit: gone to sleep. ZZZzzz…) |
| 04:45:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:45:21 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 04:50:04 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 04:59:01 | oats | is now known as factsandlogic |
| 04:59:49 | → | Guest83 joins (~Guest83@122-199-1-30.ip4.superloop.com) |
| 04:59:49 | → | jimmys joins (~jimmys@2001:8004:11a0:5d05:1516:3364:d6ab:71dd) |
| 04:59:57 | → | ksqsf joins (~user@134.209.106.31) |
| 05:00:11 | factsandlogic | is now known as oats |
| 05:00:57 | × | Guest83 quits (~Guest83@122-199-1-30.ip4.superloop.com) (Client Quit) |
| 05:01:37 | → | Guest23 joins (~Guest23@cpec025e909512d-cm00fc8d8c9620.cpe.net.cable.rogers.com) |
| 05:01:39 | → | Guest83 joins (~Guest83@122-199-1-30.ip4.superloop.com) |
| 05:01:56 | × | Guest83 quits (~Guest83@122-199-1-30.ip4.superloop.com) (Client Quit) |
| 05:03:01 | × | kaph quits (~kaph@net-2-47-236-216.cust.vodafonedsl.it) (Read error: Connection reset by peer) |
| 05:03:26 | → | sagax joins (~sagax_nb@user/sagax) |
| 05:09:38 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 05:11:03 | → | eruditass joins (uid248673@id-248673.uxbridge.irccloud.com) |
| 05:14:21 | → | kaph joins (~kaph@net-2-47-236-216.cust.vodafonedsl.it) |
| 05:15:40 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 05:22:10 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:26:11 | → | Guest138 joins (~Guest1@2601:18c:4300:36d0:480a:3125:fad9:df2e) |
| 05:36:54 | × | jimmys quits (~jimmys@2001:8004:11a0:5d05:1516:3364:d6ab:71dd) (Quit: Client closed) |
| 05:36:59 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:37:44 | → | emf joins (~emf@2620:10d:c091:480::1:3482) |
| 05:39:38 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 05:44:12 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 05:44:17 | × | emf quits (~emf@2620:10d:c091:480::1:3482) (Ping timeout: 240 seconds) |
| 05:45:18 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 05:47:58 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 256 seconds) |
| 05:48:32 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 05:53:00 | → | dsrt^ joins (~dsrt@64.253.22.77) |
| 05:53:45 | × | juhp quits (~juhp@128.106.188.82) (Read error: Connection reset by peer) |
| 05:53:53 | × | Guest23 quits (~Guest23@cpec025e909512d-cm00fc8d8c9620.cpe.net.cable.rogers.com) (Quit: Client closed) |
| 05:53:57 | → | juhp joins (~juhp@128.106.188.82) |
| 05:54:02 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 05:54:12 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 268 seconds) |
| 05:55:03 | → | notzmv joins (~zmv@user/notzmv) |
| 05:57:36 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds) |
| 06:00:26 | × | ymh quits (~ym@pool-96-253-29-94.prvdri.fios.verizon.net) (Ping timeout: 256 seconds) |
| 06:02:56 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 06:03:48 | × | Guest138 quits (~Guest1@2601:18c:4300:36d0:480a:3125:fad9:df2e) (Quit: Client closed) |
| 06:05:56 | → | matthias1 joins (~igloo@cpe-76-170-236-166.socal.res.rr.com) |
| 06:08:06 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 06:09:43 | → | hololeap joins (~hololeap@user/hololeap) |
| 06:11:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 06:11:49 | → | emf joins (~emf@163.114.130.6) |
| 06:18:34 | × | emf quits (~emf@163.114.130.6) (Ping timeout: 256 seconds) |
| 06:19:09 | → | falafel joins (~falafel@2603-8000-d800-688c-f998-9914-c722-4c43.res6.spectrum.com) |
| 06:21:58 | × | matthias1 quits (~igloo@cpe-76-170-236-166.socal.res.rr.com) (Ping timeout: 256 seconds) |
| 06:23:48 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:23:54 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 06:24:24 | → | joo-_ joins (~joo-_@80-62-117-215-mobile.dk.customer.tdc.net) |
| 06:24:24 | × | joo-_ quits (~joo-_@80-62-117-215-mobile.dk.customer.tdc.net) (Changing host) |
| 06:24:24 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 06:27:17 | × | falafel quits (~falafel@2603-8000-d800-688c-f998-9914-c722-4c43.res6.spectrum.com) (Ping timeout: 240 seconds) |
| 06:27:36 | <Axman6> | edwardk: I might have nerdsniped myself and given myself an impossible challenge: is it possible to write: memo :: forall t a. Grouping t => (t -> a) -> (t -> a) |
| 06:27:57 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 240 seconds) |
| 06:29:01 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 06:32:41 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 06:36:28 | <int-e> | how can you write `instance Divisible Group where` with a straight face |
| 06:36:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 06:36:51 | <int-e> | (cf. https://en.wikipedia.org/wiki/Divisible_group ) |
| 06:38:11 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 06:42:57 | × | kaph quits (~kaph@net-2-47-236-216.cust.vodafonedsl.it) (Ping timeout: 240 seconds) |
| 06:42:58 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:42:58 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 06:42:58 | → | wroathe joins (~wroathe@user/wroathe) |
| 06:43:58 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan) |
| 06:45:46 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 06:47:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 06:50:09 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 06:51:35 | × | sweater1 quits (~sweater@206.81.18.26) (Read error: Connection reset by peer) |
| 06:53:11 | → | ksqsf joins (~user@134.209.106.31) |
| 06:53:54 | → | emf joins (~emf@2620:10d:c091:480::1:3482) |
| 06:54:37 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 06:54:50 | × | td_ quits (~td@94.134.91.4) (Ping timeout: 256 seconds) |
| 06:56:26 | → | johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 06:56:45 | → | td_ joins (~td@muedsl-82-207-238-131.citykom.de) |
| 07:00:11 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 268 seconds) |
| 07:01:57 | × | emf quits (~emf@2620:10d:c091:480::1:3482) (Ping timeout: 240 seconds) |
| 07:03:13 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 07:04:04 | <int-e> | > unwords $ map (\x -> printf "%.2f" (191-x/42)) [7885,7880,7803,7737,7636,7610,7600,7539,7452,7385] |
| 07:04:05 | <lambdabot> | "3.26 3.38 5.21 6.79 9.19 9.81 10.05 11.50 13.57 15.17" |
| 07:05:09 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 07:08:11 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer) |
| 07:09:48 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 07:11:32 | × | xff0x quits (~xff0x@2001:1a81:5251:6900:31bd:c473:a01b:db9e) (Ping timeout: 240 seconds) |
| 07:11:54 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 268 seconds) |
| 07:12:07 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 07:12:35 | → | xff0x joins (~xff0x@2001:1a81:5251:6900:24dc:6835:7948:5232) |
| 07:14:24 | → | zaquest joins (~notzaques@5.130.79.72) |
| 07:18:42 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 07:19:39 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 07:24:18 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 07:25:46 | × | ksqsf quits (~user@134.209.106.31) (Remote host closed the connection) |
| 07:26:36 | × | xff0x quits (~xff0x@2001:1a81:5251:6900:24dc:6835:7948:5232) (Ping timeout: 245 seconds) |
| 07:26:41 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 07:27:21 | → | sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) |
| 07:27:47 | → | xff0x joins (~xff0x@2001:1a81:5251:6900:442a:7d08:a5db:f300) |
| 07:29:57 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:38:53 | → | kaph joins (~kaph@151.35.8.156) |
| 07:41:00 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Remote host closed the connection) |
| 07:42:21 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 07:45:55 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 07:48:41 | <iqubic> | What are impredictive types? |
| 07:49:07 | <iqubic> | I'm getting a compiler error saying that GHC doesn't yet support them. |
| 07:51:36 | <tomsmeding> | iqubic: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/impredicative_types.html#extension-ImpredicativeTypes |
| 07:51:56 | <tomsmeding> | the extension has existed for a long time, but the mentioned robust Quick Look algorithm is only since 9.2 |
| 07:52:10 | <tomsmeding> | the earlier implementation was (apparently, I wouldn't know) wonky |
| 07:55:19 | × | kaph quits (~kaph@151.35.8.156) (Remote host closed the connection) |
| 07:56:50 | <EvanR> | more like GHC finally admitted that they aren't supported |
| 07:57:21 | <EvanR> | maybe that changed in 9.2 |
| 07:57:32 | <tomsmeding> | that certainly changed in 9.2 |
| 07:57:44 | <tomsmeding> | there's a paper! :p |
| 07:59:36 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:00:52 | <dminuoso> | tomsmeding: Im not happy with these boolean tags somehow. |
| 08:01:16 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:c53a:6a45:8ba8:8ed6) |
| 08:02:44 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 08:03:00 | <tomsmeding> | :( |
| 08:07:02 | <iqubic> | I'm running into a bit of an issue with Data.Finite. I need the following function: "add :: (KnownNat n) => Finite n -> (Int/Integer) -> Finite n" |
| 08:07:20 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 08:07:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:09:13 | <dsal> | modulo :: KnownNat n => Integer -> Finite n |
| 08:09:45 | <dminuoso> | tomsmeding: Im thinking that patricia tries offer this out of the box. |
| 08:09:54 | <tomsmeding> | do they? |
| 08:10:13 | <tomsmeding> | can you distinguish ["fo", "foo", "fob"] from ["foo", "fob"] without tags? |
| 08:10:21 | <dminuoso> | Yes, because ["google", "com"] would not give me something like [["google"], ["com"]] |
| 08:10:30 | <tomsmeding> | (honest question) |
| 08:10:31 | <dminuoso> | Unless we already had ["com"] |
| 08:10:51 | <dminuoso> | tomsmeding: Well it doesnt matter whether we can "distinguish" them |
| 08:10:56 | <dminuoso> | Oh |
| 08:11:04 | <dminuoso> | I dont think this actually matters though |
| 08:11:04 | <tomsmeding> | (use 'map (map (\c -> [c]))' if you like the Domain version) |
| 08:11:21 | <dminuoso> | The question is whether the subsequent lookup will behave correctly |
| 08:11:43 | <dminuoso> | The patricia trie will give you the least number of nodes always |
| 08:11:48 | <tomsmeding> | if the tree contains "foo" and "fob", and you do a longest-prefix lookup for "fom", won't it give "fo"? |
| 08:12:00 | <dminuoso> | darn you are right again. |
| 08:12:02 | <tomsmeding> | which, in my understanding of the problem, is the wrong answer, because "fo" is not in the tree |
| 08:12:27 | <dminuoso> | I should look at what iproute does |
| 08:12:38 | <tomsmeding> | well, in the tree, but not in the set it's supposed to model :p |
| 08:12:40 | <dminuoso> | Because forwarding decisions are longest prefix matching |
| 08:12:45 | <tomsmeding> | ah |
| 08:13:05 | <dminuoso> | Its just that every time I looked at it, I found stuff inside it bizarre |
| 08:13:20 | <dminuoso> | data IPRTable k a = Nil | Node !(AddrRange k) !k !(Maybe a) !(IPRTable k a) !(IPRTable k a) |
| 08:13:32 | <dminuoso> | And there's a comment stating that this is a TRIE with one way branching removed, not sure what that means here |
| 08:13:39 | <dminuoso> | Because it seems like you can have one way branches? |
| 08:13:47 | <tomsmeding> | sounds like patricia tree to me, that comment :p |
| 08:13:57 | <tomsmeding> | what's the k and a here |
| 08:14:08 | <dminuoso> | k is just to track address family, whether its ipv4 or ipv6 |
| 08:14:16 | <tomsmeding> | then why is there a k in every node |
| 08:14:16 | <dminuoso> | And `a` is some additional payload I think |
| 08:14:36 | <tomsmeding> | or is this the bizarre thing you mentioned? :p |
| 08:14:44 | <dminuoso> | That as well |
| 08:15:50 | <tomsmeding> | seems the k is either IPv4 or IPv6, which are both full addresses |
| 08:15:57 | <dminuoso> | Right |
| 08:16:09 | <dminuoso> | Ah hold on I know why |
| 08:16:17 | <dminuoso> | tomsmeding: The `AddrRange k` is what we care about |
| 08:16:21 | <dminuoso> | the `k` is some additional payload we can ignroe |
| 08:16:30 | <dminuoso> | its the `next hop address` in your routing table |
| 08:16:43 | <dminuoso> | but what really matters here, is the "what network to route for", which is `AddrRange k |
| 08:17:25 | <dminuoso> | tomsmeding: Very broadly, a simple router would be supplied with some `lookupRoute :: k -> IPRTable k a -> Maybe k |
| 08:17:48 | <dminuoso> | Such that you provide some address, it finds the matching AddrRange with longest prefix, and then returns the contained `k` |
| 08:18:13 | <tomsmeding> | ah, AddrRange a = { addr :: a, mask :: a, mlen :: Int {- mask prefix length -} } |
| 08:18:52 | <dminuoso> | Yeah |
| 08:19:09 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:19:31 | <dminuoso> | Though, Im not entirely sure because that library offers: lookup :: Routable k => AddrRange k -> IPRTable k a -> Maybe a |
| 08:19:58 | <tomsmeding> | that keyToTestBit function is weird |
| 08:20:19 | <tomsmeding> | it converts an AddrRange to a prefix of 1-bits as long as the mask was |
| 08:20:23 | <tomsmeding> | or so it seems |
| 08:20:37 | <dminuoso> | That is very reasonable |
| 08:20:52 | tomsmeding | wonders why they use an intmap for a statically fixed table of max 128 entries |
| 08:21:09 | <dminuoso> | Why max 128 entries? |
| 08:21:35 | <tomsmeding> | ipv6 has length 128, right? |
| 08:21:38 | <dminuoso> | Yes |
| 08:21:43 | <tomsmeding> | the intmap is keyed on the mlen |
| 08:21:46 | <tomsmeding> | from the AddrRange |
| 08:22:47 | <dminuoso> | tomsmeding: Ah and I think I get why you understand that "with one way branching removed" as patricia trie. |
| 08:23:05 | <dminuoso> | The only way for one way branching to ever occur, is if you turned "foo" into ["f", "o", "o"] |
| 08:23:17 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 240 seconds) |
| 08:23:23 | <tomsmeding> | that's what it sounded like to my naive ears |
| 08:24:15 | → | chomwitt joins (~chomwitt@94.66.63.187) |
| 08:26:26 | <tomsmeding> | dminuoso: from scanning through `insert`, I get the feeling that that Maybe is precisely my boolean tag |
| 08:26:30 | <tomsmeding> | the Maybe a, that is |
| 08:26:58 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 08:27:07 | <tomsmeding> | because it retains them on normal insert and creates Just values for the places where it puts the inserted value, but it puts Nothing in the weird splitting code in `link` that I haven't yet figured out |
| 08:27:44 | <tomsmeding> | (which makes sense: there only is an associated value `a` if that prefix is actually in the set) |
| 08:29:25 | <tomsmeding> | dminuoso: that recursion loop in `glue` is weird -- wouldn't that be more efficiently written as `let n = countLeadingZeros (addr k1 `xor` addr k2)` |
| 08:30:36 | → | lavaman joins (~lavaman@98.38.249.169) |
| 08:31:59 | <tomsmeding> | (followed by the 'otherwise' branch) |
| 08:33:00 | → | nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
| 08:34:00 | × | deech quits (~user@024-217-244-075.res.spectrum.com) (Ping timeout: 256 seconds) |
| 08:35:35 | → | mattil joins (~mattil@helsinki.portalify.com) |
| 08:36:40 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 08:37:12 | → | deech joins (~user@024-217-244-075.res.spectrum.com) |
| 08:37:51 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 08:38:25 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 08:38:30 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 08:40:39 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 08:41:25 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 08:41:27 | × | phma quits (phma@2001:5b0:211f:b348:59d8:7cb7:9451:9394) (Read error: Connection reset by peer) |
| 08:41:56 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 08:42:40 | × | jespada quits (~jespada@87.74.33.157) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:42:47 | → | phma joins (phma@2001:5b0:211f:1938:f16a:3063:a09d:1c4c) |
| 08:43:08 | → | jespada joins (~jespada@87.74.33.157) |
| 08:43:08 | × | jespada quits (~jespada@87.74.33.157) (Client Quit) |
| 08:43:44 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 08:43:44 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 08:43:44 | → | wroathe joins (~wroathe@user/wroathe) |
| 08:45:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Ping timeout: 240 seconds) |
| 08:46:45 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 08:47:07 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 08:48:32 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 08:52:48 | <dminuoso> | tomsmeding: Im not sure what glue or link do exactly |
| 08:52:54 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 08:53:15 | <dminuoso> | Or hold on |
| 08:53:30 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 260 seconds) |
| 08:53:35 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:53:36 | <dminuoso> | I think `link` takes two addresses that are disjoint, and forms a new node that contains them both I think |
| 08:53:44 | <dminuoso> | this is just an assumption based on its usage and the guards in `insert` |
| 08:54:32 | <dminuoso> | And presumably `glue` gives you the longest common prefix that contains them both |
| 08:55:40 | → | acidjnk joins (~acidjnk@p200300d0c7271e54d135507ad6b9a309.dip0.t-ipconnect.de) |
| 08:57:11 | <dminuoso> | Yeah, that seems to be it |
| 08:58:57 | <dminuoso> | tomsmeding: Then yeah, the countLeadingZeros approach is definitely faster |
| 08:59:12 | <dminuoso> | It's probably not a big deal, since rarely will you be spending much time in insertion |
| 08:59:54 | → | jespada joins (~jespada@87.74.33.157) |
| 09:00:10 | × | tomku[m] quits (~tomkumozi@2001:470:69fc:105::1:2fcb) (Quit: You have been kicked for being idle) |
| 09:00:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:01:17 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 240 seconds) |
| 09:05:55 | × | nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Quit: WeeChat 3.3) |
| 09:17:24 | → | deech` joins (~user@024-217-244-075.res.spectrum.com) |
| 09:19:20 | × | deech quits (~user@024-217-244-075.res.spectrum.com) (Ping timeout: 256 seconds) |
| 09:21:03 | → | Topsi joins (~Tobias@dyndsl-095-033-094-005.ewe-ip-backbone.de) |
| 09:22:13 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 09:22:57 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:23:34 | <tomsmeding> | fair point about the time spent in insertion :p |
| 09:23:53 | <tomsmeding> | and yes that's also what I concluded from the usage in `insert` |
| 09:25:53 | <tomsmeding> | dminuoso: do you agree about the `Maybe a` containing the information of the boolean tag? |
| 09:26:27 | <dminuoso> | Yeah |
| 09:26:41 | <dminuoso> | Thanks I think I get the implementation now |
| 09:26:49 | <dminuoso> | I took your implementation and twisted it a bit around |
| 09:27:02 | <tomsmeding> | sounds good |
| 09:27:08 | <dminuoso> | https://gist.github.com/dminuoso/dc8cccaff1e72592b4f285153fbe4605 |
| 09:27:18 | <dminuoso> | Find that a bit easier to read |
| 09:27:33 | <dminuoso> | Oh hold on |
| 09:27:43 | <dminuoso> | Note how I dont need that reverse on domain anymore? (I forgot to delete it in that gist) |
| 09:28:28 | <dminuoso> | Mm, some bug lingering still |
| 09:28:31 | <dminuoso> | But Ill find it |
| 09:28:48 | <tomsmeding> | dminuoso: what do you return for looking up "abc" in ["ab", "abcd"] |
| 09:28:53 | <tomsmeding> | under map (map (\c -> [c])) |
| 09:29:15 | → | kranius joins (~kranius@162.19.149.77.rev.sfr.net) |
| 09:30:07 | <tomsmeding> | oh and perhaps more interestingly, for looking up "abcd" in ["a", "abc", "abcde"] -- but untested |
| 09:30:39 | tomsmeding | thinks you're going to get "ac" as the prefix |
| 09:30:47 | <dminuoso> | Mmm yeah |
| 09:30:52 | <dminuoso> | I had the same thought just when I hit enter |
| 09:30:56 | <tomsmeding> | lol |
| 09:31:08 | <dminuoso> | Im going to pursue this, could be really cool if I dont need reverse here. :) |
| 09:31:20 | × | kranius quits (~kranius@162.19.149.77.rev.sfr.net) (Client Quit) |
| 09:31:38 | <tomsmeding> | you can have two additional parameters, one that always accumulates, and the other that gets overwritten with the accumulating parameter if b == True |
| 09:31:45 | <dminuoso> | tomsmeding: One thing I could do is keep the full domain at the label instead. |
| 09:31:48 | <dminuoso> | instead of a bool |
| 09:31:54 | <dminuoso> | That would simplify everything |
| 09:32:05 | <tomsmeding> | or that, but more memory usage :p |
| 09:32:27 | <dminuoso> | That's fine, it's short lived |
| 09:32:36 | <dminuoso> | Decisions decisions! |
| 09:34:22 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 09:34:37 | <dminuoso> | tomsmeding: And the insert becomes less pretty :( |
| 09:34:46 | <dminuoso> | But a quick application of `tails` can solve that |
| 09:34:50 | <tomsmeding> | :p |
| 09:35:03 | <tomsmeding> | my two-extra-parameters is also still a possibility, think that would work |
| 09:35:07 | <dminuoso> | or inits I suppose |
| 09:35:30 | <dminuoso> | tomsmeding: Yeah, but I think we've already ruined fusion. |
| 09:35:40 | <dminuoso> | We should do two-extra-parameters with continuations! |
| 09:36:13 | <dminuoso> | Is this the point where I should mention Im going to start out with 10 domains in the trie? |
| 09:36:22 | <tomsmeding> | :p |
| 09:36:23 | <dminuoso> | No but seriously, in production there will be more |
| 09:37:38 | × | darchitect quits (~darchitec@2a00:23c6:3584:df00:7dec:bf13:8fa:748c) (Ping timeout: 252 seconds) |
| 09:39:37 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Ping timeout: 240 seconds) |
| 09:41:41 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 09:43:46 | → | neurocyte0132889 joins (~neurocyte@IP-185117070150.dynamic.medianet-world.de) |
| 09:43:46 | × | neurocyte0132889 quits (~neurocyte@IP-185117070150.dynamic.medianet-world.de) (Changing host) |
| 09:43:46 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 09:44:43 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:45:45 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 09:48:17 | × | dsrt^ quits (~dsrt@64.253.22.77) (Ping timeout: 240 seconds) |
| 09:48:56 | → | kuribas joins (~user@ptr-25vy0i8itabkuxqpwp8.18120a2.ip6.access.telenet.be) |
| 09:49:06 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 09:50:46 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 09:55:47 | → | Tuplanolla joins (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi) |
| 10:08:17 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:09:03 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 10:14:26 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 10:14:48 | → | darchitect joins (~darchitec@82-132-215-233.dab.02.net) |
| 10:17:54 | → | epolanski joins (uid312403@id-312403.helmsley.irccloud.com) |
| 10:18:31 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 10:19:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 10:19:34 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:19:58 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 10:22:20 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:27:46 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 10:27:54 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 10:29:39 | → | jinsun__ joins (~quassel@user/jinsun) |
| 10:30:37 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 240 seconds) |
| 10:32:10 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 10:33:38 | → | jinsun joins (~quassel@user/jinsun) |
| 10:34:52 | → | jinsun___ joins (~quassel@user/jinsun) |
| 10:37:17 | × | jinsun__ quits (~quassel@user/jinsun) (Ping timeout: 240 seconds) |
| 10:37:37 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 240 seconds) |
| 10:43:15 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 10:44:00 | → | mikoto-chan joins (~mikoto-ch@2a00:1d50:3:0:d35c:a450:4ccc:94ac) |
| 10:44:32 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 10:44:32 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 10:44:32 | → | wroathe joins (~wroathe@user/wroathe) |
| 10:47:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Ping timeout: 240 seconds) |
| 10:47:40 | → | jinsun joins (~quassel@user/jinsun) |
| 10:48:49 | → | max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) |
| 10:49:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 10:50:36 | <dminuoso> | tomsmeding: https://gist.github.com/dminuoso/37edae34ce73428fbb691bcd34e9868a |
| 10:50:38 | <dminuoso> | final version. |
| 10:51:19 | <dminuoso> | I actually like this because as I recurse down I reconstruct the original domain :) |
| 10:51:42 | × | jinsun___ quits (~quassel@user/jinsun) (Ping timeout: 256 seconds) |
| 10:53:47 | <tomsmeding> | dminuoso: looks good! |
| 10:53:57 | <tomsmeding> | don't you need to reverse the result though? Or am I reading it wrong |
| 10:54:18 | <tomsmeding> | you're producing a suffix in reversed order, I think |
| 10:54:41 | <tomsmeding> | (s/Domain/Domain . reverse/ on line 3) |
| 10:55:29 | → | toastloop joins (toastloop@user/toastloop) |
| 10:56:03 | <Digit> | lol, fun intro https://www.youtube.com/watch?v=RqvCNb7fKsg |
| 10:56:28 | <dminuoso> | tomsmeding: Im reversing the lookup domain |
| 10:56:36 | <dminuoso> | But not the result |
| 10:56:50 | <tomsmeding> | yeah |
| 10:57:02 | <tomsmeding> | if you want the reversed suffix, this is fine :) |
| 10:57:07 | <dminuoso> | huh? |
| 10:57:11 | <dminuoso> | What do you mean? |
| 10:57:31 | <dminuoso> | tomsmeding: No this produces it in the right order. |
| 10:57:47 | <dminuoso> | tomsmeding: consider: the tree starts in reverse, and as I traverse down I prepend. |
| 10:57:52 | <tomsmeding> | OH |
| 10:57:55 | tomsmeding | is stupid |
| 10:57:56 | <tomsmeding> | yes |
| 10:58:03 | <tomsmeding> | awesome |
| 10:58:06 | <dminuoso> | this is why this is so cute, no reverse needed :) |
| 10:58:11 | <tomsmeding> | and it's even shorter than my original code I think |
| 10:59:02 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 260 seconds) |
| 10:59:08 | → | typeswitch joins (~typeswitc@user/typeswitch) |
| 10:59:55 | <dminuoso> | now ontop, I could also make a separate `DomainR` newtype where my attosec parser generates the labels in reverse. |
| 10:59:55 | × | 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) |
| 11:00:05 | <dminuoso> | (this seems like it would be faster, even) |
| 11:00:31 | <tomsmeding> | that feels like overdoing it somehow :p |
| 11:00:33 | <dminuoso> | :p |
| 11:01:10 | → | dka joins (~code-is-a@ns3059207.ip-193-70-33.eu) |
| 11:03:51 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 11:11:57 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 240 seconds) |
| 11:15:18 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 11:15:18 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 11:15:18 | → | wroathe joins (~wroathe@user/wroathe) |
| 11:16:28 | × | Jing quits (~hedgehog@2604:a840:3::103b) (Remote host closed the connection) |
| 11:17:08 | → | Jing joins (~hedgehog@115.207.51.59) |
| 11:20:36 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 11:23:54 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:27:31 | → | toastloopex joins (toastloop@user/toastloop) |
| 11:27:31 | × | typeswitch quits (~typeswitc@user/typeswitch) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 11:29:56 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.3) |
| 11:30:50 | × | toastloopex quits (toastloop@user/toastloop) (Remote host closed the connection) |
| 11:30:54 | × | toastloop quits (toastloop@user/toastloop) (Ping timeout: 268 seconds) |
| 11:31:27 | → | lavaman joins (~lavaman@98.38.249.169) |
| 11:35:21 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 11:35:38 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 11:35:54 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 11:36:45 | × | mikoto-chan quits (~mikoto-ch@2a00:1d50:3:0:d35c:a450:4ccc:94ac) (Quit: mikoto-chan) |
| 11:40:52 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 11:41:17 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:41:33 | → | pfurla joins (~pfurla@2804:18:5828:51e7:9893:1d7d:a278:3fd2) |
| 11:42:26 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 260 seconds) |
| 11:43:24 | → | kaph joins (~kaph@151.37.203.0) |
| 11:46:07 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 11:46:07 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 11:46:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 11:46:47 | ← | iqubic parts (~user@2601:602:9502:c70:c28f:848:f184:6c67) (ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)) |
| 11:51:02 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 240 seconds) |
| 11:51:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 11:54:32 | × | kaph quits (~kaph@151.37.203.0) (Read error: Connection reset by peer) |
| 11:54:50 | → | kaph joins (~kaph@151.37.203.0) |
| 11:56:48 | → | pfurla_ joins (~pfurla@177.79.126.247) |
| 11:57:53 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 11:57:53 | × | pfurla quits (~pfurla@2804:18:5828:51e7:9893:1d7d:a278:3fd2) (Ping timeout: 252 seconds) |
| 11:59:37 | × | kaph quits (~kaph@151.37.203.0) (Read error: Connection reset by peer) |
| 11:59:42 | → | jinsun joins (~quassel@user/jinsun) |
| 11:59:50 | → | kaph joins (~kaph@151.37.203.0) |
| 12:05:56 | × | kaph quits (~kaph@151.37.203.0) (Ping timeout: 256 seconds) |
| 12:06:30 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 12:06:45 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 12:07:13 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Client Quit) |
| 12:07:47 | × | acidjnk quits (~acidjnk@p200300d0c7271e54d135507ad6b9a309.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 12:10:12 | → | kaph joins (~kaph@151.37.203.0) |
| 12:11:33 | → | pfurla joins (~pfurla@177.25.184.32) |
| 12:14:37 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Ping timeout: 240 seconds) |
| 12:14:53 | × | mattil quits (~mattil@helsinki.portalify.com) (Remote host closed the connection) |
| 12:15:18 | × | pfurla_ quits (~pfurla@177.79.126.247) (Ping timeout: 268 seconds) |
| 12:15:53 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 12:15:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:16:42 | × | jinsun quits (~quassel@user/jinsun) (Read error: Connection reset by peer) |
| 12:16:52 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 12:16:52 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 12:16:52 | → | wroathe joins (~wroathe@user/wroathe) |
| 12:18:20 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 12:18:23 | → | wehttam joins (~wehttam@175.103.19.88) |
| 12:18:35 | → | jinsun joins (~quassel@user/jinsun) |
| 12:20:14 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
| 12:20:58 | → | ksqsf joins (~user@134.209.106.31) |
| 12:21:16 | → | fef joins (~thedawn@user/thedawn) |
| 12:21:48 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 12:25:12 | × | wehttam quits (~wehttam@175.103.19.88) (Read error: Connection reset by peer) |
| 12:26:36 | × | lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap) |
| 12:26:58 | → | lambdap joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 12:26:59 | → | retro_ joins (~retro@05412d78.skybroadband.com) |
| 12:30:43 | × | retroid_ quits (~retro@05412d78.skybroadband.com) (Ping timeout: 268 seconds) |
| 12:35:06 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:c53a:6a45:8ba8:8ed6) (Quit: WeeChat 2.8) |
| 12:35:39 | × | kaph quits (~kaph@151.37.203.0) (Ping timeout: 268 seconds) |
| 12:36:10 | → | kaph joins (~kaph@151.37.203.0) |
| 12:39:12 | × | kaph quits (~kaph@151.37.203.0) (Read error: Connection reset by peer) |
| 12:39:28 | → | kaph joins (~kaph@151.37.203.0) |
| 12:45:15 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 12:47:38 | → | mattil joins (~mattil@helsinki.portalify.com) |
| 12:49:00 | × | kaph quits (~kaph@151.37.203.0) (Ping timeout: 256 seconds) |
| 12:49:15 | × | dolio quits (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in) |
| 12:49:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Ping timeout: 240 seconds) |
| 12:50:08 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 12:51:41 | × | pfurla quits (~pfurla@177.25.184.32) (Quit: gone to sleep. ZZZzzz…) |
| 12:53:12 | × | tubogram4 quits (~tubogram@user/tubogram) (Ping timeout: 260 seconds) |
| 12:55:48 | → | evocatus joins (~evocatus@62.182.78.42) |
| 12:59:30 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 13:00:27 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 13:02:14 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 13:02:17 | → | rusty joins (~rustyboy@82.77.225.165) |
| 13:02:31 | → | pfurla joins (~pfurla@2804:18:581a:c123:74be:cb28:dc5f:8826) |
| 13:02:50 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:08:17 | × | max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 252 seconds) |
| 13:09:02 | × | evocatus quits (~evocatus@62.182.78.42) (Ping timeout: 240 seconds) |
| 13:13:27 | × | pfurla quits (~pfurla@2804:18:581a:c123:74be:cb28:dc5f:8826) (Quit: gone to sleep. ZZZzzz…) |
| 13:14:12 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 13:14:18 | → | kaph joins (~kaph@151.47.131.129) |
| 13:17:05 | → | Inst__ joins (~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e) |
| 13:19:50 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen) |
| 13:19:57 | × | Inst_ quits (~Inst@2601:6c4:4080:3f80:98ca:4368:fd5e:1ee0) (Ping timeout: 240 seconds) |
| 13:26:13 | × | m1dnight quits (~christoph@christophe.dev) (Ping timeout: 268 seconds) |
| 13:27:04 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 13:30:35 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:30:49 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 13:31:31 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 13:32:28 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
| 13:35:52 | <raehik> | I'm having issues with cabal haddock --enable-documentation : sometimes it rebuilds dependencies with docs so it can link to them, sometimes it doesn't and complains instead. Any tips? |
| 13:37:29 | → | m1dnight joins (~christoph@christophe.dev) |
| 13:37:51 | <raehik> | actually, it might just be the base libs. on CI it won't rebuild them to link, but it does with identical cmd locally... |
| 13:38:08 | → | jkaye joins (~jkaye@2601:281:8300:7530:fd05:1ba8:c481:f305) |
| 13:41:54 | → | tubogram4 joins (~tubogram@user/tubogram) |
| 13:42:22 | × | mattil quits (~mattil@helsinki.portalify.com) (Read error: Connection reset by peer) |
| 13:48:25 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 13:48:30 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 256 seconds) |
| 13:48:44 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 13:48:48 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 13:50:18 | × | darchitect quits (~darchitec@82-132-215-233.dab.02.net) (Read error: Connection reset by peer) |
| 13:52:09 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
| 13:52:54 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 13:54:26 | → | max22- joins (~maxime@2a01cb08833598007266ea6574ab9177.ipv6.abo.wanadoo.fr) |
| 13:57:20 | → | son0p joins (~ff@181.136.122.143) |
| 13:57:53 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 13:57:53 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 13:57:53 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:00:09 | × | max22- quits (~maxime@2a01cb08833598007266ea6574ab9177.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
| 14:00:38 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 14:00:39 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
| 14:02:44 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 14:05:53 | × | rusty quits (~rustyboy@82.77.225.165) (Quit: Leaving) |
| 14:16:06 | × | NinjaTrappeur quits (~ninja@user/ninjatrappeur) (Quit: WeeChat 3.3) |
| 14:16:15 | → | bodisiw joins (~bodiskw@128.163.238.115) |
| 14:16:53 | → | Bartol joins (~Bartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) |
| 14:20:27 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 14:21:52 | → | Vajb joins (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) |
| 14:22:43 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 14:23:46 | → | Guest4242 joins (~Guest4242@78.198.4.122) |
| 14:23:57 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 14:25:46 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 14:27:41 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Quit: leaving) |
| 14:30:02 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 240 seconds) |
| 14:30:41 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:30:41 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 14:30:41 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:31:28 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:7976:b4da:33a:e80c) |
| 14:33:57 | × | xff0x quits (~xff0x@2001:1a81:5251:6900:442a:7d08:a5db:f300) (Ping timeout: 240 seconds) |
| 14:34:59 | → | xff0x joins (~xff0x@2001:1a81:5251:6900:1836:4f55:974b:f1ca) |
| 14:38:32 | → | KnifeFire joins (~Knifefire@120.242.178.114) |
| 14:39:05 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) |
| 14:40:10 | × | KnifeFire quits (~Knifefire@120.242.178.114) (Client Quit) |
| 14:42:15 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:43:13 | → | doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
| 14:44:23 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 14:44:37 | × | shailangsa quits (~shailangs@host86-186-127-224.range86-186.btcentralplus.com) (Ping timeout: 240 seconds) |
| 14:46:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 14:46:57 | × | Inst__ quits (~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e) (Ping timeout: 240 seconds) |
| 14:48:09 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:52:49 | → | mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
| 14:54:20 | → | evocatus joins (~evocatus@62.182.78.42) |
| 14:58:54 | → | max22- joins (~maxime@2a01cb0883359800aceba2125845502e.ipv6.abo.wanadoo.fr) |
| 15:01:58 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 15:02:18 | → | zebrag joins (~chris@user/zebrag) |
| 15:03:41 | → | __monty__ joins (~toonn@user/toonn) |
| 15:04:36 | → | Bartol60 joins (~Bartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) |
| 15:04:53 | × | Bartol quits (~Bartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) (Ping timeout: 256 seconds) |
| 15:05:05 | <Guest4242> | Hey, could anyone explain what's wrong with my implementation https://paste.tomsmeding.com/B1u4ChwF ? I wanted to test a foldr that could be short circuited, but turns out that the foldr doesn't even work as I expect (I expect the example given to return True) |
| 15:05:39 | Bartol60 | is now known as Bartol |
| 15:05:50 | <tomsmeding> | > intercalate "" $ take 10 $ repeat "a" |
| 15:05:51 | <lambdabot> | "aaaaaaaaaa" |
| 15:05:57 | <tomsmeding> | > replicate 10 'a' |
| 15:05:59 | <lambdabot> | "aaaaaaaaaa" |
| 15:06:17 | × | bodisiw quits (~bodiskw@128.163.238.115) (Quit: Leaving) |
| 15:07:20 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) (Quit: gone to sleep. ZZZzzz…) |
| 15:07:22 | <tomsmeding> | Guest4242: if your foldr encounters an element in the needles that does not occur in the haystack, the result becomes False, right? (and ignores the tail in that case) |
| 15:07:39 | <tomsmeding> | and 'a' is not in haystack |
| 15:07:40 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 15:07:57 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 240 seconds) |
| 15:08:03 | × | Bartol quits (~Bartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) (Client Quit) |
| 15:08:21 | → | neurocyte0132889 joins (~neurocyte@IP-185117070150.dynamic.medianet-world.de) |
| 15:08:21 | × | neurocyte0132889 quits (~neurocyte@IP-185117070150.dynamic.medianet-world.de) (Changing host) |
| 15:08:21 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 15:08:21 | → | Bartol joins (~Bartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) |
| 15:08:27 | × | evocatus quits (~evocatus@62.182.78.42) (Quit: Leaving) |
| 15:09:01 | → | puke joins (~puke@user/puke) |
| 15:09:05 | Bartol | is now known as andbartol |
| 15:09:25 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 15:09:58 | andbartol | is now known as Bartol |
| 15:10:29 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) |
| 15:13:00 | → | jinsun joins (~quassel@user/jinsun) |
| 15:13:03 | × | Bartol quits (~Bartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) (Changing host) |
| 15:13:03 | → | Bartol joins (~Bartol@user/Bartol) |
| 15:13:18 | <Guest4242> | But why does foldr ignore the tail of the needles then? |
| 15:14:01 | <Guest4242> | Shouldn't foldr traverse the list (the needles) completely? |
| 15:19:04 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 268 seconds) |
| 15:19:31 | <tomsmeding> | > foldr f z [a, b, c, d] |
| 15:19:32 | <lambdabot> | f a (f b (f c (f d z))) |
| 15:20:14 | <tomsmeding> | Guest4242: if 'f' ignores its second argument, in your case 'acc', which indeed it does if 'elem x haystack' is False, then the tail of the list remains unevaluated |
| 15:20:18 | <tomsmeding> | because of lazy evaluation |
| 15:20:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 15:21:07 | <tomsmeding> | > foldr (\x rest -> if x > 10 then [] else x : rest) undefined [1..] |
| 15:21:09 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10] |
| 15:22:35 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:23:42 | → | shailangsa_ joins (~shailangs@host109-159-108-207.range109-159.btcentralplus.com) |
| 15:24:02 | → | jinsun joins (~quassel@user/jinsun) |
| 15:24:14 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 15:24:15 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 15:24:49 | → | sweater joins (~sweater@206.81.18.26) |
| 15:26:11 | <Guest4242> | That means that in ` f a (f b (f c (f d z)))` if z is ignored, then only (f d z) will be computed? |
| 15:27:00 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 15:27:00 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 15:27:00 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:27:00 | <tomsmeding> | > foldr (\x _ -> x) 10 [1,2,3,4] |
| 15:27:02 | <lambdabot> | 1 |
| 15:27:26 | <tomsmeding> | > (\x _ -> x) 1 ((\x _ -> x) 2 ((\x _ -> x) 3 ((\x _ -> x) 4 10))) |
| 15:27:28 | <lambdabot> | 1 |
| 15:27:41 | <tomsmeding> | Guest4242: does that help? |
| 15:28:16 | <tomsmeding> | the entirety of ((\x _ -> x) 2 ((\x _ -> x) 3 ((\x _ -> x) 4 10))) is not computed in that example |
| 15:28:40 | <tomsmeding> | > (\x _ -> x) 1 (error "oops I lied") |
| 15:28:42 | <lambdabot> | 1 |
| 15:29:11 | <xerox> | > foldr (\x _ -> f x) a [b,c,d,e] |
| 15:29:13 | <lambdabot> | f b |
| 15:31:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 15:33:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 15:33:49 | <Guest4242> | tomsmeding: I think that helps yeah. How would you change my function to do what I initially wanted? And if possible with a short-circuit of foldr in case any needle isn't found in the haystack. |
| 15:34:14 | <tomsmeding> | what exactly do you want to compute |
| 15:34:39 | <tomsmeding> | you're checking whether all needles occur in the haystack, and bailing out with False if that's not the case |
| 15:34:57 | <tomsmeding> | which you're correctly doing: not all needles in aaaa...aaabaaaaa.... occur in "bc" :) |
| 15:35:51 | × | ksqsf quits (~user@134.209.106.31) (Remote host closed the connection) |
| 15:36:09 | → | ksqsf joins (~user@134.209.106.31) |
| 15:36:23 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 15:37:08 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 15:37:52 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 15:38:30 | <Guest4242> | I want to check that all the needles appear in the haystack yes. So it's already correct and already short-circuiting right? |
| 15:39:21 | <tomsmeding> | yes -- at the very first 'a' :p |
| 15:39:25 | <tomsmeding> | because it doesn't occur in the haystack |
| 15:41:51 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 15:42:15 | <Guest4242> | All right. And I was right to use foldr, because of how foldl is defined it can't be short-circuited that way right? |
| 15:44:18 | → | pavonia joins (~user@user/siracusa) |
| 15:44:27 | × | Topsi quits (~Tobias@dyndsl-095-033-094-005.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 15:45:09 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:46:30 | <tomsmeding> | > foldl f z [a,b,c,d,e] |
| 15:46:32 | <lambdabot> | f (f (f (f (f z a) b) c) d) e |
| 15:46:34 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 15:47:17 | <tomsmeding> | if the list is finite, as it is here, an 'f' can short-circuit based on its _second_ argument, ignoring its first argument |
| 15:47:30 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 15:48:21 | <tomsmeding> | > foldl (\x y -> if y <= 7 then 0 else x + y) 0 [1..10] |
| 15:48:22 | <lambdabot> | 27 |
| 15:48:34 | <tomsmeding> | > 8 + 9 + 10 |
| 15:48:36 | <lambdabot> | 27 |
| 15:49:37 | <tomsmeding> | but if the list is infinite, then foldl will never produce anything anyway! Regardless of how lazy f is |
| 15:51:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Ping timeout: 240 seconds) |
| 15:54:20 | <Guest4242> | I'm not sure I get your short-circuit example :/ for me, in your foldl, there is no short-circuit, foldl will go over every element of [1..10] |
| 15:54:47 | <tomsmeding> | hm it's a bit verbose |
| 15:55:05 | <tomsmeding> | > foldl (\x y -> if y <= 3 then 0 else x + y) 0 [1,2,3,4,5] |
| 15:55:07 | <lambdabot> | 9 |
| 15:55:19 | <tomsmeding> | note that the function ignores its left argument if the right argument is <= 3 |
| 15:55:27 | <tomsmeding> | > foldl f 0 [1,2,3,4,5] |
| 15:55:28 | <lambdabot> | error: |
| 15:55:28 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M534001523296... |
| 15:55:28 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 15:55:32 | <tomsmeding> | > foldl f 0 [1,2,3,4,5 :: Int] |
| 15:55:33 | <lambdabot> | error: |
| 15:55:33 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M896483681726... |
| 15:55:34 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 15:55:38 | <tomsmeding> | > foldl f (0 :: Int) [1,2,3,4,5 :: Int] |
| 15:55:39 | <lambdabot> | error: |
| 15:55:39 | <lambdabot> | • No instance for (FromExpr Int) arising from a use of ‘f’ |
| 15:55:40 | <lambdabot> | • In the first argument of ‘foldl’, namely ‘f’ |
| 15:55:42 | <tomsmeding> | oh come on |
| 15:55:44 | <geekosaur> | use Expr |
| 15:55:51 | <tomsmeding> | > foldl f (0 :: Expr) [1,2,3,4,5 :: Expr] |
| 15:55:52 | <lambdabot> | f (f (f (f (f 0 1) 2) 3) 4) 5 |
| 15:55:55 | <tomsmeding> | geekosaur++ |
| 15:56:04 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 15:56:11 | <tomsmeding> | Guest4242: ignore the type annotations, not relevant to the point :p |
| 15:56:38 | <tomsmeding> | do you see that the call 'f _ 3', where the _ is really 'f (f 0 1) 2', just evaluates to 0? |
| 15:57:04 | → | isovector1 joins (~isovector@172.103.216.166) |
| 15:58:17 | <tomsmeding> | > let f = \x y -> if y <= 3 then 0 else x + y in f (f (f (error "not evaluated") 3) 4) 5 |
| 15:58:19 | <lambdabot> | 9 |
| 15:58:49 | <tomsmeding> | > let f = \x y -> if y <= 3 then 0 else x + y in (((error "not evaluated") `f` 3) `f` 4) `f` 5 |
| 15:58:50 | <lambdabot> | 9 |
| 15:58:56 | <tomsmeding> | perhaps clearer |
| 16:01:52 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) (Quit: gone to sleep. ZZZzzz…) |
| 16:03:03 | <Guest4242> | Mmh, isn't that only an example of lazy-evaluation? |
| 16:03:16 | <tomsmeding> | what's the difference? |
| 16:03:27 | <tomsmeding> | short-circuiting is precisely because of lazy evaluation |
| 16:06:16 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 16:07:51 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat) |
| 16:12:10 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 16:13:39 | <Guest4242> | tomsmeding: https://paste.tomsmeding.com/H8m1shVP Here foldr short circuits at 100 and foldl doesn't. I'm not sure that's the perfect example, but that kinda shows the kind of thing i'm trying to do. |
| 16:16:34 | <tomsmeding> | Guest4242: foldr: if the function ignores its right argument, the rest of the list, to the right, is ignored. foldl: if the function ignores its left argument, the rest of the list, to the LEFT, is ignored. |
| 16:16:48 | <tomsmeding> | note that in my last example, elements 1,2,3 of the list were ignored |
| 16:18:42 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 260 seconds) |
| 16:22:13 | → | sweater1 joins (~sweater@206.81.18.26) |
| 16:23:00 | <tomsmeding> | Guest4242: side note about foldl: note that if the list is infinite, whatever f does, no result will ever be produced because foldl is too busy staging all the f calls. foldl' is a bit better in this, in that it doesn't allow short-circuiting: it evaluates every f call from the innermost to the outermost. |
| 16:23:36 | <tomsmeding> | There are almost no cases where the plain foldl is a useful choice -- this short-circuiting might be one, but then there are probably better ways to do that anyway, like reversing the list first and then using foldr :p |
| 16:24:30 | × | sweater quits (~sweater@206.81.18.26) (Read error: Connection reset by peer) |
| 16:25:00 | × | sweater1 quits (~sweater@206.81.18.26) (Remote host closed the connection) |
| 16:25:10 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 16:27:04 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:7976:b4da:33a:e80c) (Quit: WeeChat 2.8) |
| 16:27:49 | → | sweater joins (~sweater@206.81.18.26) |
| 16:29:32 | → | ksqsf joins (~user@134.209.106.31) |
| 16:31:52 | <Guest4242> | > foldr f z [a, b, c, d] |
| 16:31:54 | <lambdabot> | f a (f b (f c (f d z))) |
| 16:32:39 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 16:33:32 | <Guest4242> | In this example, the evaluator tries to evaluate f a ??, then ?? because it's needed, and not f d z first and and then f c (f d z) ? If that's the case I think I get it now. |
| 16:33:43 | <tomsmeding> | yes! |
| 16:33:47 | <tomsmeding> | that's the point of lazy evaluation |
| 16:35:08 | <mrianbloom> | If you are hoping to use linear types, does an entire project have to use the linear prelude? |
| 16:35:19 | <tomsmeding> | no |
| 16:35:23 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) |
| 16:35:38 | <tomsmeding> | well, technically no, but linear types are only useful if you have linear APIs to use |
| 16:36:19 | <tomsmeding> | I believe the meaning of existing valid haskell code never changes by enabling -XLinearTypes |
| 16:36:27 | × | isovector1 quits (~isovector@172.103.216.166) (Quit: Leaving) |
| 16:36:33 | <tomsmeding> | there's just more stuff that you can do |
| 16:36:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 16:36:45 | <mrianbloom> | I'm actually looking into writing a linear API for futhark and I'm just trying to wrap my brain around what a user would need to change to use it. |
| 16:37:15 | <tomsmeding> | the user would probably need to enable the extension in order to use your API sensibly, but not necessarily anything else |
| 16:37:19 | <Guest4242> | Hm ok. That also explains how it can work on infinite lists. It's said to treat elements right-to-left, but the evaluator will actually try to evaluate f 1 ... first in `foldr f acc [1..]`, right? And then f 2 only if it was needed by f 1, right? |
| 16:37:30 | <tomsmeding> | mrianbloom: the linear prelude is just a lot of utility functions and data types |
| 16:37:45 | <tomsmeding> | Guest4242: correct |
| 16:38:12 | <mrianbloom> | I think the issue is whether we need to use the linear version of monad bind or not. |
| 16:38:20 | <Guest4242> | tomsmeding: All right. Thanks a lot ! |
| 16:38:27 | <tomsmeding> | ah, linear monads |
| 16:38:50 | <mrianbloom> | We give users a monad transformer that holds a Cuda/OpenCL context. |
| 16:39:09 | <tomsmeding> | mrianbloom: in any case, you can just re-export the entirety of the linear prelude from your library if you want :p |
| 16:39:32 | <tomsmeding> | not sure how exactly linear monads work with monad transformers etc |
| 16:39:55 | <mrianbloom> | Yes that's my question as well. |
| 16:41:37 | → | emf joins (~emf@2620:10d:c091:480::1:cf46) |
| 16:43:08 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 16:45:57 | × | emf quits (~emf@2620:10d:c091:480::1:cf46) (Ping timeout: 240 seconds) |
| 16:46:16 | <geekosaur> | I would extpect a type error tbh, since everything else is built against the Prelude Monad |
| 16:46:44 | <geekosaur> | ghc tends not to like this, since it doesn't do whole-program compilation so it can't just replace one with the other on the fly |
| 16:47:44 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:48:03 | → | ksqsf joins (~user@134.209.106.31) |
| 16:48:08 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 16:48:14 | → | zer0bitz joins (~zer0bitz@2001:2003:f444:a000:499c:186d:f10d:6a24) |
| 16:50:26 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 16:51:26 | <tomsmeding> | yeah you wouldn't be able to use existing monad transformers unchanged; the data definitions might work, but the instances are for Prelude.Monad, not for the linear Monad class |
| 16:51:56 | <tomsmeding> | geekosaur: you might be right, but I also think it's possible that the first error you get is just a missing instance error |
| 16:52:12 | <tomsmeding> | s/also think it's /think it's also / |
| 16:52:18 | <geekosaur> | Prelude.Linear has instances |
| 16:52:39 | <tomsmeding> | but not for State or anything, right? |
| 16:52:42 | <geekosaur> | er, not exactly that module but there's a replacement Control.Monad.Trans.Instances.Linear |
| 16:52:52 | <monochrom> | Guest4242: In fact, "f b (f c (f d z))" or "f 2 (...)" was not even generated, not even as a delayed expression. For example, foldr (&&) z (False : foo) -> False && foldr (&&) z foo -> False, this takes constant time therefore constant space. |
| 16:53:14 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 260 seconds) |
| 16:54:20 | × | Guest4242 quits (~Guest4242@78.198.4.122) (Quit: Client closed) |
| 16:54:42 | <tomsmeding> | geekosaur: I'm only finding this thing? https://hackage.haskell.org/package/linear-base-0.1.0/docs/src/Control.Functor.Linear.Internal.Instances.html |
| 16:55:05 | <geekosaur> | mm, there's a State monad on the contents page but no docs link |
| 16:55:22 | <tomsmeding> | oh yeah there is stuff, e.g. https://hackage.haskell.org/package/linear-base-0.1.0/docs/src/Control.Functor.Linear.Internal.State.html#line-98 |
| 16:55:42 | <tomsmeding> | TIL |
| 16:56:07 | <tomsmeding> | the instances are listed in Control.Functor.Linear |
| 16:58:28 | → | emf joins (~emf@2620:10d:c091:480::1:cf46) |
| 17:00:02 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:00:03 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:01:39 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:01:39 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:02:00 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:02:00 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:03:15 | <danso> | has there been much follow-up discussion to alexis king's post "names are not type safety"? |
| 17:03:47 | <danso> | i am wondering whether it's possible to create a type of strings which contain alphabetic chars only |
| 17:04:13 | <geekosaur> | not presently |
| 17:04:16 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:04:17 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:04:44 | <danso> | (without having 52 constructors) |
| 17:04:45 | <monochrom> | That would be predicate subtypes, which is known as "refinement types" around this neighbourhood. |
| 17:04:46 | → | ksqsf joins (~user@134.209.106.31) |
| 17:05:00 | <geekosaur> | what you can do is create a newtype-d String and export a smart constructor |
| 17:05:13 | <danso> | geekosaur, oh :^/ |
| 17:05:25 | <danso> | yes, that's what alexis says is the typical pattern but not ideal |
| 17:05:48 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:05:49 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:06:03 | <geekosaur> | not ideal, but the best you can do with standard Haskell. you can express it in Liquid Haskell, though, I think |
| 17:06:16 | → | econo joins (uid147250@user/econo) |
| 17:06:22 | <monochrom> | Well, something else would be non-ideal if you could express that with types. Namely, programmers have more proof obligations. |
| 17:06:37 | × | emf quits (~emf@2620:10d:c091:480::1:cf46) (Ping timeout: 240 seconds) |
| 17:06:48 | <monochrom> | At that point, what is "ideal" anyway? |
| 17:09:25 | <danso> | i always thought refinement types were a little weird. |
| 17:09:46 | <monochrom> | For a system that does both dependent typing and predicate subtyping, see http://pvs.csl.sri.com/ |
| 17:09:54 | × | ksqsf quits (~user@134.209.106.31) (Remote host closed the connection) |
| 17:09:55 | <danso> | you can express something like `x: {... -2, -1, 0, 1, 2 ...} | x > 0` |
| 17:10:09 | <danso> | which is effectively the same as `x: {0, 1, 2...}` |
| 17:10:10 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:10:10 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:10:15 | → | ksqsf joins (~user@134.209.106.31) |
| 17:10:22 | → | emf joins (~emf@2620:10d:c091:480::1:cf46) |
| 17:10:52 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:10:52 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:11:27 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:11:28 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:12:27 | × | xff0x quits (~xff0x@2001:1a81:5251:6900:1836:4f55:974b:f1ca) (Ping timeout: 250 seconds) |
| 17:12:28 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:12:29 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:13:10 | → | xff0x joins (~xff0x@2001:1a81:5251:6900:a6ab:a36:c73a:5d3f) |
| 17:13:21 | <monochrom> | In practice, it's "x : Integer | x>0" so we never have to write "{... -2, -1, 0, 1, 2 ...}". |
| 17:13:41 | × | kaph quits (~kaph@151.47.131.129) (Ping timeout: 245 seconds) |
| 17:13:56 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) (Quit: gone to sleep. ZZZzzz…) |
| 17:14:06 | <monochrom> | And there will be time when you appreciate "x : Integer | x >= 65 && x < 65+26" |
| 17:14:10 | <danso> | that's true, but i wonder why we can't give a name to `Integers > 0` instead |
| 17:14:33 | <danso> | (correction: why we *shouldn't*, because of course we can: Natural) |
| 17:14:53 | <monochrom> | I don't know Liquid Haskell, but a self-respecting refinement type system ought to support type aliases too. |
| 17:15:20 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds) |
| 17:15:30 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 17:17:03 | <geekosaur> | danso, simply because Haskell's type system does not support it. |
| 17:17:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:17:24 | <danso> | i guess my dream would be support for type declarations like `newtype CapitalInt = { 65 ... 91 } |
| 17:17:34 | <monochrom> | Also, Natural should be "integers >= 0". |
| 17:17:48 | <danso> | but i think that would basically require every number literal to have its own typeclass |
| 17:17:51 | <geekosaur> | the first decision you must make in such a system is whether to do checking at runtime (easier) or compile time (and now programmers must provide proofs with every operation on such a number that they don't violate the invariant) |
| 17:18:05 | <monochrom> | Pascal can do the special case of range subtypes. |
| 17:18:16 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) |
| 17:18:17 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:18:18 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:18:28 | <geekosaur> | *such a type |
| 17:18:33 | <monochrom> | You literally write "type T = 65...91" or "x : 65..91". |
| 17:18:57 | → | kspalaiologos joins (~kspalaiol@user/kspalaiologos) |
| 17:19:06 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:19:08 | → | tewrvd^ joins (~tewrvd@64.253.22.77) |
| 17:19:14 | <monochrom> | Although, yeah, Pascal checks the range at run time. |
| 17:19:20 | <danso> | monochrom, mathematicians much smarter than i am disagree about the exact definition of "natural" |
| 17:19:48 | <danso> | i think ada supports a similar type feature |
| 17:19:54 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:19:55 | <monochrom> | Oh, it gets better. They disagree with each other. |
| 17:20:17 | <danso> | but both of those languages still have much... simpler type systems than haskell |
| 17:20:18 | <monochrom> | And they are split into 3 camps regarding 0^0. |
| 17:20:25 | <danso> | monochrom, that is what i meant :^) |
| 17:20:25 | → | Akiva joins (~Akiva@user/Akiva) |
| 17:20:38 | <monochrom> | Ah OK haha. |
| 17:20:55 | <danso> | you clearly have an opinion, but i don't really |
| 17:21:25 | <danso> | i am fine with nats starting at 0 or 1 |
| 17:21:35 | <danso> | of course anything else would be one of those "abominations" |
| 17:22:47 | × | mbuf quits (~Shakthi@122.164.195.237) (Quit: Leaving) |
| 17:23:03 | <monochrom> | The anicent Greeks started at 2. They did not consider 0 or 1 to be numbers. They did not have 0, they probably didn't even have 1. |
| 17:23:58 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed) |
| 17:24:13 | <danso> | uncivilized heathens. luckily for us, the arabs taught them the error of their ways |
| 17:24:32 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:24:45 | <monochrom> | You can see some of it in Euclid's elements, in which when he stated a theorem that today we regard as "true for all positive integers", he stated a version for 1 and a version for >=2 separately. |
| 17:25:22 | <monochrom> | It also has a relic in our languages. If I say "I have a number of wives", you automatically assume it's >=2. |
| 17:25:31 | <monochrom> | Apparently 1 is not a "number". |
| 17:25:36 | <danso> | that is a good observation |
| 17:25:56 | <danso> | likewise, 0, -1, e, and 2+i are not "numbers" |
| 17:26:54 | <danso> | i am now wondering when such proofs are necessary and when they can be worked around. |
| 17:27:32 | × | xff0x quits (~xff0x@2001:1a81:5251:6900:a6ab:a36:c73a:5d3f) (Ping timeout: 240 seconds) |
| 17:27:44 | <geekosaur> | the cases when they're not necessary are pretty much the cases when you wouldn't want to use them (e.g. constants, which the compiler can check) |
| 17:27:47 | <danso> | taking the set/type CapsInt = {65 ... 91}, + and * could be the semiring operations isomorphic to the naturals mod 26 |
| 17:28:03 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:28:04 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:28:18 | <danso> | though that would have the funny consequence that 65*65 = 65 and 66*66 = 66 |
| 17:28:23 | → | xff0x joins (~xff0x@port-92-195-26-37.dynamic.as20676.net) |
| 17:28:40 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:28:41 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:28:59 | <danso> | (the naturals beginning at zero, of course ;^)) |
| 17:29:14 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:29:14 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:30:00 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:30:01 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:30:03 | <danso> | i guess it would look funny because "65" is an unusual way to write zero |
| 17:30:38 | <geekosaur> | I think most people would want an exception for wraparounds; see complaints already about Haskell's Int and Word |
| 17:31:29 | <danso> | i am not aware of such complaints |
| 17:32:10 | <danso> | i suppose what they want is more like (+) :: Int -> Int -> Maybe Int |
| 17:32:51 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 245 seconds) |
| 17:34:02 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c52a:cb9b:7833:8fe4) (Ping timeout: 240 seconds) |
| 17:35:21 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:35:22 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:35:45 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:35:46 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:36:00 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c98d:6161:3d03:dc15) |
| 17:36:11 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:36:12 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:36:26 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 17:37:36 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:37:36 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:37:41 | × | kspalaiologos quits (~kspalaiol@user/kspalaiologos) (Quit: Leaving) |
| 17:38:05 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:38:05 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:39:38 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:39:39 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:40:32 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c98d:6161:3d03:dc15) (Ping timeout: 240 seconds) |
| 17:42:37 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:42:37 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:43:01 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:43:01 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:43:42 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 17:44:06 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 260 seconds) |
| 17:45:42 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:45:43 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:45:49 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 17:46:41 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:46:41 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:46:56 | → | cosimone joins (~user@93-47-231-231.ip115.fastwebnet.it) |
| 17:51:03 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:51:04 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:51:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 17:51:56 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:51:56 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:52:51 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:52:52 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:54:13 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:54:13 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:55:38 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:55:39 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:56:00 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 17:56:01 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 17:56:51 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:59:29 | → | ksqsf joins (~user@134.209.106.31) |
| 18:00:35 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 18:01:11 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed) |
| 18:01:20 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 18:02:26 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 18:02:37 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 18:02:56 | <Arsen> | what's a good way to cache deps in a, say, stack build in github actions cache |
| 18:04:48 | <sshine> | Arsen, https://github.com/sshine/evm-opcodes/blob/main/.github/workflows/haskell.yml#L33-L40 |
| 18:05:04 | <sshine> | Arsen, sorry, that was for cabal. |
| 18:05:28 | → | nvmd joins (~nvmd@user/nvmd) |
| 18:05:34 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 268 seconds) |
| 18:05:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 18:06:54 | <sshine> | Arsen, in Stack's case you want to cache .stack-work/ and ~/.stack, I think. let me just look. |
| 18:08:38 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 18:09:46 | <Arsen> | I think it's just stack-work |
| 18:10:00 | <sshine> | Arsen, you might like this: https://github.com/freckle/stack-action |
| 18:10:07 | <Arsen> | oh, damn, I didn't know that actions can cache dirs |
| 18:10:11 | <Arsen> | I thought it just caches a blob |
| 18:10:34 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 18:10:58 | <sshine> | Arsen, https://github.com/freckle/stack-action#hlint--weeder -- possibly the shortest solution on GitHub is: - uses: freckle/stack-cache-action@v1 |
| 18:11:29 | <sshine> | although, consider pinning the action by the commit hash instead of a version for security reasons. |
| 18:11:31 | → | ksqsf joins (~user@134.209.106.31) |
| 18:11:57 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 18:12:01 | <sshine> | https://michaelheap.com/ensure-github-actions-pinned-sha/ |
| 18:12:06 | <Arsen> | yeah, of course |
| 18:12:07 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 18:12:24 | <Arsen> | that's great, thank you! :D |
| 18:12:34 | <sshine> | yw! |
| 18:13:14 | <sshine> | also, I think it's not just .stack-work/ if you also want to cache building external dependencies. |
| 18:13:26 | <sshine> | I think .stack-work/ contains symlinks to ~/.stack/...? |
| 18:13:53 | <Arsen> | maybe.. |
| 18:14:09 | <sshine> | might as well let the pre-made action figure that part out :-P |
| 18:14:37 | → | darchitect joins (~darchitec@2a00:23c6:3584:df00:7dec:bf13:8fa:748c) |
| 18:14:41 | <Arsen> | as long as it's audited and pinned |
| 18:15:29 | <sshine> | you can always hard-fork it, but I think @freckle looks like a reliable place to refer to one's actions, especially when hash-pinnned. :) |
| 18:16:17 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 18:18:47 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c98d:6161:3d03:dc15) |
| 18:18:47 | → | mvk joins (~mvk@2607:fea8:5cdd:f000::917a) |
| 18:19:21 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:19:21 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 18:19:21 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:21:01 | × | doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 240 seconds) |
| 18:22:57 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c98d:6161:3d03:dc15) (Ping timeout: 240 seconds) |
| 18:24:18 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
| 18:26:06 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 18:27:33 | → | kspalaiologos joins (~kspalaiol@user/kspalaiologos) |
| 18:27:42 | × | epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:28:01 | <zero> | why is take specialized to lists? aaarhg |
| 18:28:19 | × | haasn quits (~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 18:29:16 | → | haasn joins (~nand@haasn.dev) |
| 18:29:38 | <monochrom> | What's wrong with that. What does "generalize" mean in that context? |
| 18:31:24 | <geekosaur> | what were you expecting it to work with, and why? |
| 18:31:37 | <zero> | take :: Foldable f => Int -> f a -> [a] |
| 18:31:54 | <geekosaur> | now imagine take applied to a Set |
| 18:32:02 | → | lavaman joins (~lavaman@98.38.249.169) |
| 18:32:06 | <monochrom> | That one can simply go through toList. |
| 18:32:24 | <geekosaur> | sure, but is it going to do what a caller would expect? |
| 18:32:37 | <geekosaur> | (for that matter, what would a caller expect it to do?) |
| 18:32:58 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds) |
| 18:33:26 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:33:26 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 18:33:26 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:33:39 | geekosaur | is now imagining take applied to the infamous Foldable instance for tuples |
| 18:33:42 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 18:33:47 | <EvanR> | repeatedly minViewing a set |
| 18:33:50 | <zero> | take n = take n . foldl' (:) [] |
| 18:34:38 | <EvanR> | oof... spider sense tingling at that choice of fold |
| 18:34:45 | <zero> | oops |
| 18:34:57 | <dmj`> | maybe there should be a 'takeBy', takeBy on a Tree could give you an in/pre/post order traversal |
| 18:35:03 | <zero> | you're right but you get my point |
| 18:35:07 | <EvanR> | but yeah any Foldable can be converted to a list, which you can take |
| 18:35:12 | <zero> | that was muscle memory |
| 18:35:28 | <EvanR> | drop is the one that makes less sense |
| 18:35:44 | <monochrom> | People are too eager for strictness in a lazy language. |
| 18:35:50 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 18:36:01 | <zero> | monochrom: ;) |
| 18:38:15 | × | tewrvd^ quits (~tewrvd@64.253.22.77) (Remote host closed the connection) |
| 18:38:55 | <EvanR> | I often want to not only take, by drop precisely what I took to end up with a "partition" that could hypothetically go back together |
| 18:39:07 | <EvanR> | but drop* |
| 18:39:14 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Quit: WeeChat 3.3) |
| 18:39:21 | <monochrom> | Yeah, span or break. |
| 18:39:26 | <EvanR> | dunno what typeclass that would be |
| 18:39:38 | <EvanR> | span for list, split for map or set |
| 18:39:51 | <geekosaur> | don't think there is one since you lose structure on the way |
| 18:40:03 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 18:42:56 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 18:42:59 | <EvanR> | for a more complex database of sets and indexes, splitting into the found set and the rest... for "purposes" |
| 18:43:16 | <EvanR> | this is how my deranged mind works |
| 18:46:50 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 18:47:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 18:49:23 | × | deech` quits (~user@024-217-244-075.res.spectrum.com) (Remote host closed the connection) |
| 18:49:36 | → | deech` joins (~user@024-217-244-075.res.spectrum.com) |
| 18:50:59 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 18:51:40 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 18:52:55 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 18:53:06 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 18:53:38 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 18:54:51 | → | ksqsf joins (~user@134.209.106.31) |
| 18:55:30 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 18:55:56 | <zero> | what's the advantage of the class system over having overladed functions? |
| 18:56:36 | <zero> | *overloaded |
| 18:56:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:57:32 | <monochrom> | The Haskell class system is organized overloading. |
| 18:57:53 | <monochrom> | C++'s is unorganized. |
| 18:58:07 | <monochrom> | The difference is separate compilation. |
| 18:58:27 | × | cosimone quits (~user@93-47-231-231.ip115.fastwebnet.it) (Remote host closed the connection) |
| 18:58:32 | <monochrom> | Separate compilation has benefits in error message management too. |
| 18:58:45 | <EvanR> | type directed name disambiguation seems hit or miss |
| 18:58:59 | <monochrom> | For example, if you try to do "x < y" where the type of x and y do not support < |
| 18:59:26 | <monochrom> | Err, I need to start my example with: |
| 18:59:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 19:00:10 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 19:00:11 | <monochrom> | If I define a function "f x y = ... x<y ..." and you are the user. |
| 19:01:15 | <monochrom> | As a user, you don't want to hear how I coded it up, which line number I'm doing x<y at. |
| 19:01:17 | × | jkaye quits (~jkaye@2601:281:8300:7530:fd05:1ba8:c481:f305) (Ping timeout: 240 seconds) |
| 19:01:54 | <monochrom> | But you used it wrong. You try to have "f X Y" where X and Y are from a type that doesn't support < |
| 19:01:56 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 19:02:20 | <monochrom> | In Haskell, the error message is simply "your type is not an instance of Ord". |
| 19:03:26 | <monochrom> | In C++, the error message is "you're #include'ing monochrom.h and at line 451 it has x<y and it's nonsense". |
| 19:03:33 | × | max22- quits (~maxime@2a01cb0883359800aceba2125845502e.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
| 19:04:27 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:04:27 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 19:04:27 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:05:00 | <monochrom> | It can get worse if f doesn't use x<y directly, but instead f calls g, g calls h, h is where I have x<y. And all that goes through 3 transitive #include's, too. |
| 19:05:23 | <zero> | i just wish there was a better way to disambiguate which function i mean without having to mess with imports |
| 19:06:16 | <EvanR> | ah that's a whole nother topic |
| 19:06:29 | → | pfurla joins (~pfurla@177.142.243.216) |
| 19:06:34 | <EvanR> | the same name is used in prelude, Data.Map, Data.Set, Data.Sequence, Data.HashMap, etc |
| 19:06:40 | <monochrom> | The C++ error message will be telling you all about monochrom1.h, monochrom2.h, monochrom3.h, f, g, h, and a lot of line numbers that you didn't write. |
| 19:07:24 | <zero> | EvanR: exactly |
| 19:07:48 | <zero> | i hate having to qualify all my imports |
| 19:07:48 | <EvanR> | clojure tries to help you by making all these names part of some interface, but then the interfaces don't come with any guarantees at all and end up doing a bunch of import fu anyway |
| 19:07:53 | <monochrom> | That one you solve by "import qualified Data.Map as M". |
| 19:08:26 | <EvanR> | I'm getting pretty close to having a copy pastable block of qualified imports that I just know |
| 19:08:48 | <monochrom> | Why were they not unified by a class? Because people felt that they didn't know how to design that class properly. |
| 19:09:05 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 19:09:44 | <monochrom> | Moreover classes might not even be the right answer. Parametrized modules might be a better answer. We were not sure. |
| 19:09:45 | <zero> | monochrom: also that would require coordination and also some time travel |
| 19:09:57 | <monochrom> | Moreoever, parametrized modules came too little too late. |
| 19:10:18 | <zero> | monochrom: what are paremeterized modules? |
| 19:10:32 | <EvanR> | and how would they help zero's issue |
| 19:10:42 | → | xkuru joins (~xkuru@user/xkuru) |
| 19:10:45 | <EvanR> | (not wanting to specify anything) |
| 19:10:57 | <monochrom> | Okassaki tried to do the classes in the "edision" library, when he was also doing functional data structures. |
| 19:11:04 | <monochrom> | No one went on to use that library. |
| 19:11:17 | × | pfurla quits (~pfurla@177.142.243.216) (Ping timeout: 252 seconds) |
| 19:11:37 | <carter> | which was a bummer |
| 19:11:38 | <monochrom> | That was the closest we ever got. |
| 19:11:42 | <carter> | yeah |
| 19:11:51 | → | ubert joins (~Thunderbi@p548c89c3.dip0.t-ipconnect.de) |
| 19:11:57 | → | Akiva joins (~Akiva@user/Akiva) |
| 19:11:58 | → | ksqsf joins (~user@134.209.106.31) |
| 19:12:02 | <carter> | partly its because type class composition is sortah not qutie the right "user demanded" ux |
| 19:12:28 | → | cosimone joins (~user@93-47-231-231.ip115.fastwebnet.it) |
| 19:13:13 | <monochrom> | Suppose you write a module M, in which you may want to use one of: [], Array, Set. But you are not sure which. |
| 19:13:17 | → | x_kuru joins (~xkuru@user/xkuru) |
| 19:13:23 | <carter> | yeah |
| 19:13:36 | <carter> | parameterized modules are sortah friendlier for that UX |
| 19:13:55 | <monochrom> | But you are sure that you want these 3 operations: isEmpty, singleton, insert. |
| 19:15:07 | <monochrom> | So you say your M takes a parameter, the parameter needs to be a module that exports a type T, and 3 operations isEmpty:T a->Bool, singleton:: a -> T a, insert :: a -> T a -> T a. |
| 19:15:30 | <d34df00d> | Suppose I have a `class Has (x :: Ty) (xs :: [Ty])`. How do I write `instance Has x (x :: xs)`? ghc thinks that latter :: is a type annotation and not a constructor. |
| 19:15:35 | <monochrom> | A module that takes a module as parameter. |
| 19:15:53 | × | xkuru quits (~xkuru@user/xkuru) (Ping timeout: 268 seconds) |
| 19:15:54 | <monochrom> | See SML "functor" and Haskell+cabal "backpack". |
| 19:16:13 | <monochrom> | And now you know all 4 definitions of "functor" :) |
| 19:16:15 | <EvanR> | headscratch... ok that's cool and all but, it sounds like more typing than import qualified Data.Map as M |
| 19:16:32 | <EvanR> | it solves a different issue from zero's gripe |
| 19:16:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 19:17:18 | <EvanR> | yes you don't specify exact which module you will use |
| 19:17:33 | <EvanR> | but you build a whole interface before doing anything |
| 19:18:11 | → | smyds joins (~smyds@176.10.118.193) |
| 19:18:20 | × | nvmd quits (~nvmd@user/nvmd) (Ping timeout: 268 seconds) |
| 19:18:44 | <EvanR> | maybe zero was saying I know which module I want to use, why can't the compiler just know what I know |
| 19:19:09 | <EvanR> | some kind of inference |
| 19:19:22 | <smyds> | hey, I'm reading a tutorial where they use the type "!Text", what does the '!' means ? |
| 19:19:26 | <monochrom> | Yeah, zero is not exactly known to clearer state their real concern. |
| 19:19:32 | <monochrom> | s/clearer/clearly/ |
| 19:19:41 | → | nvmd joins (~nvmd@user/nvmd) |
| 19:20:06 | <d34df00d> | Ah dang, too much different languages lately. Of course, haskell's list constructor is :, not ::. Sorry for the brainfart. |
| 19:20:17 | <geekosaur> | smyds, the ! makes it strict |
| 19:20:29 | → | ksqsf joins (~user@134.209.106.31) |
| 19:20:30 | <monochrom> | smyds: You should post a more complete line of code, but it is likely http://www.vex.net/~trebla/haskell/strict-field.xhtml |
| 19:20:39 | <monochrom> | Context is very important. |
| 19:21:31 | <monochrom> | I am just upset that querents simply assume that they don't need to provide more context. |
| 19:21:48 | <monochrom> | Or it is reasonable to ask over-generalized questions. |
| 19:22:22 | <monochrom> | I was in a math channel in which some students were like "Is there an algorithm for solving equations in general?" |
| 19:22:36 | <monochrom> | And they only meant "like 3x+5 = 4". |
| 19:23:01 | <monochrom> | Or rather, they meant "my homework is 3x+5 = 4". |
| 19:24:46 | <monochrom> | This channel is not free of the same disease either. |
| 19:25:04 | <monochrom> | There were people who asked like "how do I use the Maybe type?" |
| 19:25:11 | <EvanR> | equations in general, like, commutative diagrams? xD |
| 19:25:34 | → | yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) |
| 19:25:40 | <monochrom> | And it turned out they just meant: "I got an error message for this line of code: f x = g Just x". |
| 19:25:45 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 268 seconds) |
| 19:27:49 | <monochrom> | in which the only problem was the lack of parentheses, "g (Just x)". |
| 19:28:09 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Remote host closed the connection) |
| 19:28:31 | <EvanR> | less generalized problems, more generalized solutions |
| 19:28:53 | <smyds> | geekosaur: thanks, monochrom : thanks anyway |
| 19:29:14 | <EvanR> | including complaining about generalized problems |
| 19:29:37 | × | yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 19:31:01 | → | max22- joins (~maxime@2a01cb0883359800cf3672742e8ded0b.ipv6.abo.wanadoo.fr) |
| 19:31:32 | × | Vajb quits (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) (Read error: Connection reset by peer) |
| 19:32:17 | <zero> | monochrom: my concerns are not clear, i'm just generally concerned :) |
| 19:32:21 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 19:34:02 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 19:34:21 | <zero> | my curiosity is most often better satisfied if i don't try to be too specific with my questioning |
| 19:34:56 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:34:58 | <zero> | this channel is a never-ending funtain of knowledge |
| 19:35:15 | <geekosaur> | flip side you can be so nonspecific that nobody can give you an answer |
| 19:35:29 | <zero> | never happened |
| 19:35:42 | <EvanR> | if you think qualified imports are bad in haskell, in elixir not only is everything qualified but you use the full module name everywhere |
| 19:35:44 | <zero> | when it does, i can specify ;D |
| 19:35:57 | → | jkaye joins (~jkaye@2601:281:8300:7530:e0f7:dc28:dd0d:f0d5) |
| 19:36:29 | <EvanR> | 50% of a short snippet of code can be module names xD |
| 19:37:40 | <monochrom> | Now I know that next time I need not answer. |
| 19:38:17 | <zero> | i know understand what the issue is, why it is, and what the possible solutions are |
| 19:38:33 | <sshine> | zero, I like the term funtain. |
| 19:38:53 | <zero> | monochrom: your answers have been very helpful |
| 19:39:11 | <zero> | sshine: my 'o' key is acting up |
| 19:39:41 | <pragma-> | zero: have you tried sitting down with it and talking to it to see what may be bothering it? |
| 19:40:53 | <zero> | pragma-: i know exaclty what has been bthering it and that's my cat |
| 19:40:53 | <EvanR> | is strict field of primitives without UNPACK useful, or is UNPACK sometimes automatic?, and if you change UNPACK does that break anything down the line, already compiled, that depended on that type? |
| 19:41:33 | <geekosaur> | ghc with optimization will often try to UNPACK strict fields itself, iirc |
| 19:42:02 | <geekosaur> | anything already compiled will depend on it via the .hi file and will get recompiled if needed |
| 19:42:09 | <EvanR> | cool |
| 19:42:11 | <monochrom> | If you change UNPACK, you trigger "it recompiles everything, again". |
| 19:42:12 | <zero> | EvanR: unpacking often happens in optimizations |
| 19:42:48 | <monochrom> | Strict field is useful without UNPACK. |
| 19:42:51 | <EvanR> | so it might not even be necessary to state it |
| 19:43:04 | <EvanR> | strict field of e.g. Float? |
| 19:43:11 | <geekosaur> | yes, and you can have fields that are strict but can't be UNPACKed |
| 19:43:33 | <geekosaur> | (for example, anything with more than one constructor) |
| 19:43:55 | <monochrom> | If you try to do foldl' (z0, z1) ... and find that it is still too lazy and uses too much space, you need data S a b = S !a !b, foldl' (S z0 z1) ... |
| 19:44:49 | <EvanR> | yeah strict field in general is that, which is why i tagged "of primitives" on there xD |
| 19:45:00 | <monochrom> | Oh! |
| 19:45:07 | <monochrom> | Yeah I missed that. |
| 19:45:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 19:46:18 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 19:46:29 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:48:25 | → | yin joins (~yin@user/zero) |
| 19:49:53 | <yin> | do linear types have anything to do with the way rust handles the "borrowing" of values? |
| 19:50:31 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:50:36 | → | deadmarshal joins (~deadmarsh@95.38.229.7) |
| 19:51:01 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 268 seconds) |
| 19:51:35 | → | ksqsf joins (~user@134.209.106.31) |
| 19:51:56 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 19:55:20 | × | deadmarshal quits (~deadmarsh@95.38.229.7) (Ping timeout: 268 seconds) |
| 19:56:17 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 19:56:21 | <geekosaur> | from the last discussion of that here I gather it's related but not identical |
| 19:57:27 | <geekosaur> | forthat matter ghc does the same kind of "borrowing" but it's simpler because of purity and that it therefore knows what values are no longer "alive" and can be reused |
| 19:59:26 | <EvanR> | specifically with the linear types? |
| 20:00:08 | <geekosaur> | which is how it does fusion |
| 20:00:17 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 20:04:36 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 20:04:37 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 20:05:20 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 256 seconds) |
| 20:06:58 | → | juhp joins (~juhp@128.106.188.82) |
| 20:08:25 | → | andbartol joins (~andrea@user/Bartol) |
| 20:09:09 | × | andbartol quits (~andrea@user/Bartol) (Client Quit) |
| 20:12:52 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:14:06 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:16:29 | <geekosaur> | it doesn't yet use linearity / multiplicity for optimization at all. apparently that's supposed to come later |
| 20:19:18 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 20:19:34 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 20:20:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 20:21:11 | × | kspalaiologos quits (~kspalaiol@user/kspalaiologos) (Quit: Leaving) |
| 20:24:43 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 20:24:54 | <carter> | its more that they cant make their fusion rewrite api safe UNLESS it type checks as linear |
| 20:25:02 | <carter> | rather than linearity being used for the optimization |
| 20:25:08 | <carter> | if you're talking about the xample i think youare |
| 20:26:18 | <geekosaur> | actually I started out talking about regular fusion (as compared to rust "borrowing") and only brought multiplicity into it later |
| 20:26:27 | → | ksqsf joins (~user@134.209.106.31) |
| 20:26:40 | <geekosaur> | I was wondering how much linear RULES could help with fusion, I admit |
| 20:27:28 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 20:28:06 | → | amk joins (~amk@109.255.169.126) |
| 20:29:08 | × | burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 20:30:55 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 20:30:57 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 20:31:02 | → | jumper149 joins (~jumper149@static.6.71.203.116.clients.your-server.de) |
| 20:31:39 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 20:31:54 | → | doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
| 20:34:13 | <jumper149> | Is blaze-html maintained properly? It seems like a few html tags aren't included. |
| 20:36:25 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 20:42:16 | <Henson> | I'm trying to run a file interactively using ghci, and I'm getting an error about "undefined symbol: __gxx_personality_v0". The library in question is in pure Haskell, and doesn't depend on any C or C++ code. |
| 20:43:56 | <geekosaur> | I think libffi pulls that in, and is needed even for pure Haskell code because ultimately system calls go through libffi instead of the runtime trying to figure out how to call them directly (or, how linux decided to change their interface this week) |
| 20:44:49 | <geekosaur> | (even worse on windows since the only way to make a system call is a foreign dll call) |
| 20:46:28 | <Henson> | geekosaur: any idea on how to remedy it? I'm building this in Nix, and something that just occurred to me is I haven't included the appropriate library in the shell.nix file. |
| 20:47:28 | <Henson> | geekosaur: hmm, maybe not a Nix problem, libstdc++ is in the gcc compiler package, which I've included. |
| 20:47:29 | <geekosaur> | that should be libstdc++.so (unless you mean nix on os x in which case it's probably libc++.dylib) |
| 20:48:10 | <geekosaur> | but I know little about nix |
| 20:48:41 | → | ph88^ joins (~ph88@2a02:8109:9e00:71d0:1121:f5bd:b8b:ca33) |
| 20:50:11 | <Henson> | geekosaur: ok, I'll keep digging. Thanks for the help |
| 20:50:20 | <geekosaur> | a quick check confirms it comes form libstdc++ |
| 20:50:44 | <geekosaur> | beyond that, no clue especially if you have gcc exposed |
| 20:51:20 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 20:55:05 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 20:55:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 20:59:55 | → | amk joins (~amk@109.255.169.126) |
| 21:00:20 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 21:02:35 | → | acidjnk joins (~acidjnk@p200300d0c7271e256ce23fbe5bf2eea3.dip0.t-ipconnect.de) |
| 21:03:29 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 21:09:05 | → | andbartol joins (~andbartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) |
| 21:09:11 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 21:10:18 | × | andbartol quits (~andbartol@dynamic-adsl-84-221-241-8.clienti.tiscali.it) (Client Quit) |
| 21:10:52 | → | andbartol joins (~andbartol@user/Bartol) |
| 21:11:33 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:11:54 | × | andbartol quits (~andbartol@user/Bartol) (Client Quit) |
| 21:13:56 | → | andbartol joins (~andbartol@user/Bartol) |
| 21:14:32 | × | andbartol quits (~andbartol@user/Bartol) (Client Quit) |
| 21:14:39 | → | andbartol joins (~andbartol@user/Bartol) |
| 21:16:52 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 21:19:00 | × | cosimone quits (~user@93-47-231-231.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1)) |
| 21:20:38 | → | ksqsf joins (~user@134.209.106.31) |
| 21:21:31 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:29:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 21:32:04 | × | Bartol quits (~Bartol@user/Bartol) (Quit: Client closed) |
| 21:37:03 | × | ph88^ quits (~ph88@2a02:8109:9e00:71d0:1121:f5bd:b8b:ca33) (Remote host closed the connection) |
| 21:37:19 | andbartol | is now known as Bartol |
| 21:40:39 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 21:40:39 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 21:42:12 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:42:12 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 21:42:12 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:42:34 | × | acidsys quits (~LSD@2.lsd.systems) (Excess Flood) |
| 21:43:06 | → | acidsys joins (~LSD@2.lsd.systems) |
| 21:43:17 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 21:45:17 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 21:45:55 | → | amk joins (~amk@109.255.169.126) |
| 21:47:21 | × | kuribas quits (~user@ptr-25vy0i8itabkuxqpwp8.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 21:47:54 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 21:48:28 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 21:49:02 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:50:26 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 21:53:05 | <Henson> | geekosaur: I figured it out. I was not including the various C libraries when compiling my library. This was not a problem in the case of building the executable, because the necessary libraries were included in the build instructions for the executable, same as the test suite executable. However, when trying to run the tests interactively using ghci, it was missing the libraries and failing. |
| 21:54:28 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 21:54:51 | → | cheater joins (~Username@user/cheater) |
| 21:55:17 | × | emf quits (~emf@2620:10d:c091:480::1:cf46) (Ping timeout: 240 seconds) |
| 21:56:21 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 21:58:55 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:00:41 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 252 seconds) |
| 22:01:02 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:b7fd:fa95:80d6:f41) (Ping timeout: 240 seconds) |
| 22:04:05 | <mrianbloom> | Is there any project out there that uses linear types to manage foreign pointers? |
| 22:04:09 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:04:30 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:04:30 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 22:04:30 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:04:33 | <mrianbloom> | I'm just trying to understand best practices. |
| 22:05:26 | <geekosaur> | I'm not sure there are any projects out there to speak of that use linear types, period |
| 22:05:42 | <geekosaur> | aside from Tweag |
| 22:06:40 | → | emf joins (~emf@2620:10d:c091:480::1:cf46) |
| 22:07:46 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:a000:499c:186d:f10d:6a24) (Ping timeout: 260 seconds) |
| 22:08:17 | × | hololeap quits (~hololeap@user/hololeap) (Excess Flood) |
| 22:08:53 | <mrianbloom> | Hmmm... seems so promising. |
| 22:09:46 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 22:11:23 | → | hololeap joins (~hololeap@user/hololeap) |
| 22:11:23 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:12:00 | → | rusty joins (~rustyboy@82.77.225.165) |
| 22:12:13 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 22:12:34 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 22:14:18 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 22:14:46 | × | sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 260 seconds) |
| 22:15:10 | → | ksqsf joins (~user@134.209.106.31) |
| 22:16:31 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Client Quit) |
| 22:17:14 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 22:17:37 | → | amk joins (~amk@109.255.169.126) |
| 22:18:22 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 22:19:21 | → | matthias1 joins (~igloo@cpe-76-170-236-166.socal.res.rr.com) |
| 22:20:02 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 22:21:50 | × | matthias1 quits (~igloo@cpe-76-170-236-166.socal.res.rr.com) (Remote host closed the connection) |
| 22:22:39 | → | matthias1 joins (~igloo@cpe-76-170-236-166.socal.res.rr.com) |
| 22:23:46 | × | matthias1 quits (~igloo@cpe-76-170-236-166.socal.res.rr.com) (Remote host closed the connection) |
| 22:24:13 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 22:24:26 | → | sprout joins (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) |
| 22:25:37 | × | emf quits (~emf@2620:10d:c091:480::1:cf46) (Ping timeout: 240 seconds) |
| 22:25:51 | → | notzmv joins (~zmv@user/notzmv) |
| 22:28:28 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 22:28:37 | × | sprout quits (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) (Ping timeout: 240 seconds) |
| 22:30:29 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 22:31:42 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:1bce:ba7c:3f01:c9f3) |
| 22:36:58 | → | amk joins (~amk@109.255.169.126) |
| 22:38:32 | × | jumper149 quits (~jumper149@static.6.71.203.116.clients.your-server.de) (Quit: WeeChat 3.3) |
| 22:40:42 | → | ksqsf joins (~user@134.209.106.31) |
| 22:41:10 | → | sprout joins (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) |
| 22:43:37 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 22:43:41 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 22:44:22 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed) |
| 22:44:24 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 22:44:35 | × | ubert quits (~Thunderbi@p548c89c3.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 22:45:42 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds) |
| 22:46:10 | × | sprout quits (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) (Ping timeout: 268 seconds) |
| 22:46:10 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 22:46:20 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 22:46:48 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 22:46:49 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 22:46:50 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 22:47:16 | → | jeetelongname joins (~jeet@88-111-159-26.dynamic.dsl.as9105.com) |
| 22:51:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:51:49 | → | Guest|47 joins (~Guest|47@c-73-221-44-172.hsd1.wa.comcast.net) |
| 22:53:40 | <Guest|47> | Prelude> curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh |
| 22:53:41 | <Guest|47> | <interactive>:2:1: error: Variable not in scope: curl |
| 22:54:15 | <Guest|47> | This is the terminal message I get when I try to run the haskell install package from: https://www.haskell.org/ghcup/# |
| 22:55:08 | <geekosaur> | you're running it from ghci instead of the shell. if you already have ghci, why do you need ghcup? |
| 22:56:01 | <Guest|47> | Wow, good catch. haha |
| 22:56:30 | <Guest|47> | I'm trying to update to GHCi from version 8.4.2 |
| 22:57:08 | <Guest|47> | with end goal of downloading Euterpea and HSoM to work through "The Haskell School Of Music" book |
| 22:57:50 | <yushyin> | `ghcup tui' |
| 22:58:12 | → | emf joins (~emf@2620:10d:c091:480::1:cf46) |
| 22:58:40 | <Guest|47> | >> curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh |
| 22:58:41 | <Guest|47> | curl: (60) SSL certificate problem: certificate has expired |
| 22:58:41 | <Guest|47> | More details here: https://curl.haxx.se/docs/sslcerts.html |
| 22:58:53 | → | sprout joins (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) |
| 22:58:53 | <geekosaur> | once you have ghcup, that is. mthen 'a' to show 8.4.2, since by default it shows only the latest release in any given series which will be 8.4.4 in your case |
| 22:59:41 | <geekosaur> | hm, chrome here thinks the cert is fine |
| 23:00:26 | × | Bartol quits (~andbartol@user/Bartol) (Remote host closed the connection) |
| 23:01:03 | <geekosaur> | hm, you may have an old let's encrypt root certificate |
| 23:01:22 | <geekosaur> | the original expired back in august |
| 23:02:19 | <geekosaur> | I don't know how you would update your system's certificate store to get updated root certificates |
| 23:02:44 | <Guest|47> | I first updated cabal with "cabal install cabal-install" |
| 23:02:53 | <Guest|47> | Not sure if it is related to cabal though |
| 23:02:57 | <geekosaur> | it's not |
| 23:03:01 | <geekosaur> | this is related to curl |
| 23:03:55 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 23:04:02 | × | sprout quits (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) (Ping timeout: 268 seconds) |
| 23:04:20 | × | emf quits (~emf@2620:10d:c091:480::1:cf46) (Quit: emf) |
| 23:04:49 | → | emf joins (~emf@2620:10d:c091:480::1:cf46) |
| 23:06:48 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) (Remote host closed the connection) |
| 23:11:11 | × | max22- quits (~maxime@2a01cb0883359800cf3672742e8ded0b.ipv6.abo.wanadoo.fr) (Quit: Leaving) |
| 23:11:39 | × | Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep) |
| 23:11:43 | <geekosaur> | https://curl.se/ca/cacert.pem is the latest certificate store. you can download this using a browser and then add --cacert=cacert.pem after --tlsv1.2 |
| 23:11:53 | → | ksqsf joins (~user@134.209.106.31) |
| 23:12:46 | <geekosaur> | (if your browser doesn't put it in the current directory then you may need to point to it, e.g. --cacert=~/Downloads/cacert.pem) |
| 23:14:20 | <hpc> | i am surprised your os updates haven't already packaged the new cert |
| 23:14:44 | <geekosaur> | so am I tbh |
| 23:14:51 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:15:32 | → | sprout joins (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) |
| 23:16:52 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds) |
| 23:18:16 | <Guest|47> | Oh thanks for the help, I'll try that. |
| 23:18:26 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 23:18:39 | <Guest|47> | I just reinstalled Curl thinking that would do something positive - it did nothing |
| 23:19:01 | <Guest|47> | Then I tried: |
| 23:19:02 | <Guest|47> | HOMEBREW_FORCE_BREWED_CURL=1 |
| 23:19:02 | <Guest|47> | also to no avail |
| 23:20:06 | × | sprout quits (~quassel@2a02:a467:ccd6:1:bc5b:dbe0:79e5:a909) (Ping timeout: 260 seconds) |
| 23:21:17 | × | emf quits (~emf@2620:10d:c091:480::1:cf46) (Ping timeout: 240 seconds) |
| 23:22:34 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:84c9:5514:9bd3:b2f5) |
| 23:22:43 | <zero> | i never remember how to set a constant inside a list compreension |
| 23:23:00 | × | rusty quits (~rustyboy@82.77.225.165) (Quit: Leaving) |
| 23:23:10 | <zero> | [ (x,y) | x <- ss , y <- ss , let ss = [1..5] ] ? |
| 23:23:52 | <geekosaur> | hm, either one might be using apple's certs instead |
| 23:24:04 | <geekosaur> | although one would think apple would have updated by now, too |
| 23:24:34 | <geekosaur> | zero, should be, yes |
| 23:24:50 | <geekosaur> | > [ (x,y) | x <- ss , y <- ss , let ss = [1..5] ] |
| 23:24:51 | <lambdabot> | error: |
| 23:24:51 | <lambdabot> | • Variable not in scope: ss :: [a] |
| 23:24:51 | <lambdabot> | • Perhaps you meant ‘s’ (imported from Debug.SimpleReflect)error: |
| 23:25:08 | <geekosaur> | mm, I think it's not in scope yet for those |
| 23:25:44 | <zero> | > [ (x,y) | let ss = [0..2] , x <- ss , y <- ss ] |
| 23:25:46 | <lambdabot> | [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] |
| 23:25:55 | <zero> | ah that was it |
| 23:26:15 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 23:27:49 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 23:27:50 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 23:28:17 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 23:28:34 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: Replaced by new connection) |
| 23:28:34 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 23:28:45 | <sshine> | > (,) <$> [0..2] <*> [0..2] |
| 23:28:46 | <lambdabot> | [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] |
| 23:29:36 | <sshine> | > liftA2 (,) [0..2] [0..2] |
| 23:29:37 | <lambdabot> | [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] |
| 23:30:57 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 23:31:22 | → | lavaman joins (~lavaman@98.38.249.169) |
| 23:31:26 | → | foul_owl joins (~kerry@94.140.8.107) |
| 23:31:58 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:dc7f:5982:796e:a1e5) |
| 23:32:13 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 240 seconds) |
| 23:32:56 | → | ksqsf joins (~user@134.209.106.31) |
| 23:34:10 | <yin> | i'm trying the Data.Graph.AStar from the astar library and it's SLOOOOWWW |
| 23:34:40 | <yin> | so slow |
| 23:34:45 | <janus> | yin: did you see that glguy wrote his own astar for aoc? |
| 23:34:55 | <yin> | no! |
| 23:35:05 | <yin> | i want to see it! |
| 23:35:29 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 23:35:56 | <g> | https://glguy.net/advent2021/lib/Advent-Search.html#v:astar click "source" |
| 23:36:06 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 23:36:32 | <yin> | that's it. if i have a son i'm naming him Eric |
| 23:37:37 | × | ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds) |
| 23:43:10 | → | ksqsf joins (~user@134.209.106.31) |
| 23:44:35 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed) |
| 23:44:46 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 23:45:17 | × | wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 240 seconds) |
| 23:46:38 | <jackdk> | https://hackage.haskell.org/package/search-algorithms-0.3.1/docs/Algorithm-Search.html#v:aStar I like this library for search stuff |
| 23:46:45 | <jackdk> | haven't benchmarked it though |
| 23:51:19 | × | Guest|47 quits (~Guest|47@c-73-221-44-172.hsd1.wa.comcast.net) (Quit: Connection closed) |
| 23:52:16 | → | wolfshappen joins (~waff@irc.furworks.de) |
| 23:57:12 | <EvanR> | I copy pasted the Astar from wikipedia |
| 23:57:16 | <EvanR> | no idea how it works |
| 23:58:10 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 23:58:10 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 23:58:10 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:59:06 | × | acidjnk quits (~acidjnk@p200300d0c7271e256ce23fbe5bf2eea3.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
All times are in UTC on 2021-12-21.