Logs on 2022-01-27 (liberachat/#haskell)
| 00:00:40 | → | imalsogreg joins (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) |
| 00:01:45 | × | bb010g quits (~bb010g@2001:470:69fc:105::9a5) (Quit: Client limit exceeded: 20000) |
| 00:03:13 | × | yauhsien_ quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 00:04:42 | × | nomeata quits (~nomeata@2001:470:69fc:105::1:5ed4) (Quit: Client limit exceeded: 20000) |
| 00:05:56 | → | jkaye joins (~jkaye@2601:281:8300:7530:cf1a:5f6d:9faa:a84e) |
| 00:06:00 | → | marquis_andras joins (~marquis_a@124.170.163.166) |
| 00:07:08 | × | marquis_andras quits (~marquis_a@124.170.163.166) (Client Quit) |
| 00:07:24 | → | marquis_andras joins (~marquis_a@124.170.163.166) |
| 00:08:06 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 00:09:55 | → | lbseale_ joins (~ep1ctetus@user/ep1ctetus) |
| 00:09:55 | × | lbseale_ quits (~ep1ctetus@user/ep1ctetus) (Client Quit) |
| 00:11:09 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 00:13:08 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 00:13:59 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 256 seconds) |
| 00:16:54 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 00:20:29 | → | segfaultfizzbuzz joins (~rustisafu@2602:306:cd3c:9350:59e3:db49:aa0a:46e5) |
| 00:22:51 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 00:23:17 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 00:27:28 | × | max22- quits (~maxime@2a01cb0883359800ca42cd4ecfb21dbb.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 00:31:33 | × | Henson quits (~kvirc@107-179-133-201.cpe.teksavvy.com) (Ping timeout: 256 seconds) |
| 00:32:19 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 00:34:02 | × | vglfr quits (~vglfr@88.155.70.5) (Ping timeout: 240 seconds) |
| 00:40:35 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:dc4e:59ab:7b42:4b50) (Remote host closed the connection) |
| 00:49:13 | → | jeetelongname joins (~jeet@88-111-159-26.dynamic.dsl.as9105.com) |
| 00:53:01 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 00:56:14 | × | TonyStone quits (~TonyStone@2603-7080-8607-c36a-65df-a0f5-02cd-1378.res6.spectrum.com) (Remote host closed the connection) |
| 00:56:29 | <Axman6> | I'm struggling a bit, what would be the church encoded equivalent of data Fold a b = forall x. Fold (x -> a -> Either x (Fold a b)) x (x -> b)? |
| 00:56:47 | → | bb010g joins (~bb010g@2001:470:69fc:105::9a5) |
| 00:57:00 | <Axman6> | I have newtype Fold' a b = forall x. Fold' (x -> a -> (x -> r) -> (Fold' a b -> r) -> ((x -> b) -> r) -> r) but I can't tell if that's correct |
| 00:57:02 | → | nomeata joins (~nomeata@2001:470:69fc:105::1:5ed4) |
| 00:57:37 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 00:58:05 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:58:06 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:58:06 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:58:34 | → | TonyStone joins (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com) |
| 00:58:42 | → | yauhsien_ joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 00:58:53 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 01:02:11 | <EvanR> | are you basically just trying to eliminate an explicit Either |
| 01:02:15 | <ski> | forall o. (forall x. (x -> a -> Either x o) -> x -> (x -> b) -> o) -> o -- ? |
| 01:02:25 | <Axman6> | yeah |
| 01:03:03 | <EvanR> | where as ski eliminated the constructor itself instead |
| 01:03:06 | <ski> | i guess replace `Either x (Fold a b)' with `forall o. (x -> o) -> (Fold a b -> o) -> o' ? |
| 01:04:15 | <ski> | (perhaps further replacing `Fold a b -> o' with an equivalent data type) |
| 01:06:02 | <ski> | (in any case, i can't really follow your `newtype' suggestion) |
| 01:07:50 | × | imalsogreg quits (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) (Remote host closed the connection) |
| 01:07:51 | <ski> | (`forall r. x -> a -> (x -> r) -> (Fold a b -> r) -> ((x -> b) -> r) -> r' would be equivalent to `x -> a -> Either3 x (Fold a b) (x -> b))', fwiw) |
| 01:08:02 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 01:10:39 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 01:11:21 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Remote host closed the connection) |
| 01:11:44 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:12:31 | → | frosky_ joins (~froskyarr@203.175.13.219) |
| 01:12:33 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 01:12:40 | × | frosky_ quits (~froskyarr@203.175.13.219) (Client Quit) |
| 01:13:02 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 01:13:16 | <Axman6> | I can't actually figure out how to use this thing... |
| 01:13:32 | × | FroskyArr quits (~froskyarr@203.175.13.219) (Ping timeout: 240 seconds) |
| 01:14:03 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 01:14:12 | → | FroskyArr joins (~froskyarr@203.175.13.219) |
| 01:14:13 | <ski> | which ? |
| 01:14:23 | <Axman6> | given drop :: Int -> Fold a b -> Fold a b, with the data type version, I can just write drop n (Fold step0 x0 done0) = Fold step n done where ... but I have no idea how to "store" the n in the church encoded version |
| 01:14:29 | <ski> | hmm |
| 01:14:36 | ski | actually reads the type |
| 01:16:02 | <ski> | looks like `x' is the internal state, `x -> b' is applied when you don't want to supply any more items (end-of-input), while `x -> a -> Either x (Fold a b)' is applied when you do supply another item (`a') .. and then you either get a new state `x' .. or a new `Fold a b' (which can change the state type to some other type) |
| 01:16:15 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Remote host closed the connection) |
| 01:16:54 | <ski> | (not quite sure where exactly the "change state type (and next-item & end-if-input)" ability is wanted) |
| 01:17:10 | → | cheater joins (~Username@user/cheater) |
| 01:17:27 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 01:17:34 | × | FroskyArr quits (~froskyarr@203.175.13.219) (Client Quit) |
| 01:17:49 | → | FroskyArr joins (~froskyarr@203.175.13.219) |
| 01:17:51 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:18:08 | <Axman6> | yep that sounds about right - I was looking at how to avoid the state in foldl not being able to "shrink", like in the drop example, once n reaches zero, I don't care about it, but in the current foldl implementation it sticks around for the life of the fold |
| 01:19:10 | travisb_ | is now known as travisb |
| 01:19:33 | <ski> | drop n xs fold = xs (\step0 x0 done0 -> let ... in fold step n done) -- ? |
| 01:19:43 | travisb | is now known as abemann |
| 01:19:50 | abemann | is now known as tabemann |
| 01:20:13 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 01:21:46 | → | nunggu joins (~q@user/nunggu) |
| 01:22:17 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 01:25:43 | <ski> | s/step n/step x/ |
| 01:26:22 | <ski> | drop n xs fold = xs (\step0 s0 done0 -> let step (s,n) x = if n <= 0 then (step0 s x,n) else (s,n-1); s = (s0,n); done (s,_) = done0 s in fold step s done) -- i guess |
| 01:28:23 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Remote host closed the connection) |
| 01:28:58 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 01:29:46 | <ski> | drop n xs fold = xs (\step0 s0 done0 -> let step (s,Nothing) x = (step0 s x,Nothing); step (s,Just n) x = (s,if n <= 1 then Nothing else Just (n-1)); s | n <= 0 = (s0,Nothing) | otherwise = (s0,Just n); done (s,_) = done0 s in fold step s done) -- or, i suppose |
| 01:29:57 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Ping timeout: 240 seconds) |
| 01:30:44 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Remote host closed the connection) |
| 01:31:24 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 01:32:45 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 01:33:34 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 01:35:29 | → | Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com) |
| 01:36:33 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Remote host closed the connection) |
| 01:36:50 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 01:40:46 | × | jeetelongname quits (~jeet@88-111-159-26.dynamic.dsl.as9105.com) (Ping timeout: 268 seconds) |
| 01:41:49 | → | lionhairdino joins (~jacoo@121.131.39.82) |
| 01:44:12 | × | _xor quits (~xor@dsl-50-5-233-169.fuse.net) (Read error: Connection reset by peer) |
| 01:45:09 | → | vysn joins (~vysn@user/vysn) |
| 01:45:50 | → | _xor joins (~xor@dsl-50-5-233-169.fuse.net) |
| 01:48:02 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 01:51:27 | × | Gurkenglas quits (~Gurkengla@dslb-090-186-104-244.090.186.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 01:53:47 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Remote host closed the connection) |
| 01:57:57 | × | jkaye quits (~jkaye@2601:281:8300:7530:cf1a:5f6d:9faa:a84e) (Ping timeout: 240 seconds) |
| 01:58:08 | × | segfaultfizzbuzz quits (~rustisafu@2602:306:cd3c:9350:59e3:db49:aa0a:46e5) (Quit: Leaving) |
| 01:58:37 | × | yauhsien_ quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 02:03:08 | → | notzmv joins (~zmv@user/notzmv) |
| 02:03:48 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 02:04:09 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 02:11:00 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 250 seconds) |
| 02:12:07 | × | epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 02:12:30 | → | intersec1 joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 02:15:20 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 250 seconds) |
| 02:15:38 | → | deadmarshal joins (~deadmarsh@95.38.119.169) |
| 02:17:42 | → | Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 02:17:56 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 250 seconds) |
| 02:18:48 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Ping timeout: 250 seconds) |
| 02:19:47 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 256 seconds) |
| 02:20:06 | × | deadmarshal quits (~deadmarsh@95.38.119.169) (Ping timeout: 250 seconds) |
| 02:20:14 | × | xff0x quits (~xff0x@2001:1a81:53ec:e00:f919:e263:9a7f:5670) (Ping timeout: 268 seconds) |
| 02:20:39 | → | joo-_ joins (~joo-_@87-49-45-141-mobile.dk.customer.tdc.net) |
| 02:20:39 | × | joo-_ quits (~joo-_@87-49-45-141-mobile.dk.customer.tdc.net) (Changing host) |
| 02:20:39 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 02:21:59 | → | xff0x joins (~xff0x@2001:1a81:523c:5300:707e:bf72:dc84:30f7) |
| 02:28:20 | × | Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer) |
| 02:28:33 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 02:29:55 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 02:30:15 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 02:32:17 | → | Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 02:33:54 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer) |
| 02:33:59 | <SrPx> | is there any short way to get the first command line argument as an Int, without imports? `main = do { n <- getArg 0 :: IO Int; ... } ` ? |
| 02:34:45 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 02:35:11 | <int-e> | You need to import System.Environment, which has getArgs :: IO [String] |
| 02:36:53 | × | Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 268 seconds) |
| 02:36:54 | <SrPx> | so I need two lines at best, right? |
| 02:37:24 | <SrPx> | except if I could fmap to get the first element of the list and read as int, but I guess that would be hideous |
| 02:39:10 | <int-e> | n <- read . head <$> getArgs may be fine for throwaway code |
| 02:39:43 | <ski> | (or `n <- readIO . head =<< getArgs') |
| 02:40:00 | <SrPx> | `fmap (read.head) getArgs :: IO Int` |
| 02:40:09 | <SrPx> | oh I like your version |
| 02:40:37 | × | bjobjo quits (~bjobjo@user/bjobjo) (Ping timeout: 240 seconds) |
| 02:42:19 | <geekosaur> | and you can avoid imports if you enable -fimplicit-import-qualified and then use System.Environment.getArgs |
| 02:42:37 | <geekosaur> | that's kinda dodgy though (it's really intended for ghci) |
| 02:42:39 | → | bjobjo joins (~bjobjo@user/bjobjo) |
| 02:43:22 | <jackdk> | :t (readMaybe <=< listToMaybe) <$> getArgs |
| 02:43:23 | <lambdabot> | error: |
| 02:43:23 | <lambdabot> | Variable not in scope: readMaybe :: b0 -> Maybe c |
| 02:43:23 | <lambdabot> | error: Variable not in scope: getArgs :: f [b0] |
| 02:43:35 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 256 seconds) |
| 02:43:41 | <jackdk> | % :m + System.Environment Text.Read |
| 02:43:41 | <yahb> | jackdk: |
| 02:43:54 | <jackdk> | % :t (readMaybe <=< listToMaybe) <$> getArgs |
| 02:43:54 | <yahb> | jackdk: Read c => IO (Maybe c) |
| 02:44:14 | <jackdk> | SrPx: ^^ |
| 02:44:15 | <jackdk> | % :m - System.Environment Text.Read |
| 02:44:15 | <yahb> | jackdk: |
| 02:44:37 | <int-e> | yuck |
| 02:44:56 | <int-e> | getArgs >>= \case or something to that effect will be much more readable |
| 02:46:14 | → | andreabedini joins (~andreabed@8s8kj6nfnfll37n1mb0g.ip6.superloop.com) |
| 02:46:47 | <int-e> | (and that'll work reasonably well as long as you only have positional arguments and no switches) |
| 02:46:58 | <jackdk> | you could use a headMaybe from some package but I wanted to confine myself to base |
| 02:49:07 | × | intersec1 quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Read error: Connection reset by peer) |
| 02:51:06 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 02:51:10 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 02:53:48 | → | califax- joins (~califax@user/califx) |
| 02:54:00 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 02:57:43 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Remote host closed the connection) |
| 02:58:00 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 02:58:06 | × | califax quits (~califax@user/califx) (Ping timeout: 276 seconds) |
| 02:58:06 | califax- | is now known as califax |
| 02:58:58 | → | segfaultfizzbuzz joins (~rustisafu@2602:306:cd3c:9350:59e3:db49:aa0a:46e5) |
| 02:59:06 | × | foul_owl quits (~kerry@174-21-143-101.tukw.qwest.net) (Ping timeout: 250 seconds) |
| 02:59:45 | <segfaultfizzbuzz> | very much a haskell noob here. i am interested to try to make some "real world use" of haskell's core language features, so i thought i would try to experiment with streams (and presumably benefit from laziness here?) |
| 03:00:05 | <segfaultfizzbuzz> | so i got a basic conduit http stream to print and am now trying to parse the xml it contains |
| 03:01:07 | <Axman6> | streams are not really about laziness at all, they generally make no use of it |
| 03:01:25 | <segfaultfizzbuzz> | oh really? but laziness is all about codata and infinite data structures...? |
| 03:03:59 | <sm> | laziness can be used for "streaming".. you get some similar benefits, but it's too uncontrolled and can bite you. Streaming libraries do it more robustly. |
| 03:04:28 | <segfaultfizzbuzz> | so streaming libraries follow strict eval? |
| 03:04:37 | × | davros quits (~davros@host86-184-82-149.range86-184.btcentralplus.com) (Ping timeout: 240 seconds) |
| 03:04:50 | <Axman6> | streams are an alternative to lazy-IO (among other things). in the past we might have just used readFile :: FileName -> IO Lazy.ByteString, which would read chunks as they're demanded, but this is difficult to control the behaviour of. streams make this explicit, each chunk from the file is passed explicitly, there's no lazy IO magic to produce each chunk |
| 03:05:39 | <Axman6> | streams allow consumers to say "I need some more input now" and have the upstream code do the work to produce that input, like read the next chunk from a file handle |
| 03:05:45 | × | nunggu quits (~q@user/nunggu) (Remote host closed the connection) |
| 03:05:55 | <segfaultfizzbuzz> | wow ok then i think i should probably split this inquiry in two (1) i still am interested to try to parse an http stream into xml using haskell and (2) i'm curious what a good "real" trial run of laziness might be |
| 03:06:08 | → | nunggu joins (~q@user/nunggu) |
| 03:06:25 | <Axman6> | with lazy IO, consumers believe they are working with a completely pure lazy bytestring, but in reality, when they try to evaluate the next chunk, there's some unsafeInlinePerformIO shenanigans going on to magically read from the file |
| 03:06:38 | <segfaultfizzbuzz> | if i short circuit (1) i'm trying to make this line work: runConduit $ responseBody response $ cursor $/ element "body" .| printC |
| 03:06:59 | <segfaultfizzbuzz> | using conduit and xml-conduit (or libraries you recommend, if those aren't a good choice) |
| 03:07:11 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 03:07:21 | <Axman6> | I'm not familliar with dealing iwht xml with conduits sadly (luckily?) |
| 03:07:26 | <segfaultfizzbuzz> | ha |
| 03:07:32 | <Axman6> | s/ll/l |
| 03:07:54 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 03:08:21 | <Henson> | somebody recommended to me some time ago to use Pipes instead of Conduit, not sure if that is still recommended. |
| 03:08:38 | <Henson> | it's the same idea, but I think easier to get started with than Conduit |
| 03:09:16 | <Henson> | looks like the pipes library isn't as popular as conduit, though |
| 03:10:08 | <Axman6> | I have never managed to make a working program using pipes, it's restrictions make it difficult to write useful programs IMO |
| 03:10:13 | <jackdk> | I particularly like `streaming`, which gives up bidirectional information flow in favour of a really simple type |
| 03:10:16 | <jackdk> | Axman6: ditto |
| 03:10:20 | <Henson> | one of the benefits of stream with pipes or conduit is that you can process really large amounts of data in constant memory, whereas if you try doing that lazily in IO you need to read the entire data into memory. |
| 03:10:32 | <Axman6> | jackdk and I have spoken at length on this, and gome to the same conclusion |
| 03:10:55 | <segfaultfizzbuzz> | so conduit is strictly evaluated...? |
| 03:11:11 | <Henson> | Axman6: so you guys would recommend conduit over pipes, then. |
| 03:11:23 | <Axman6> | Henson: well, the problem with lazy IO is that you _might_ read the whole file into memory, or you might not, and small changes in other parts of your program can change whether that happens or not |
| 03:11:26 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 03:11:59 | <jackdk> | Henson: I prefer streaming. There are things I want to say with conduit that I don't seem to be able to |
| 03:12:12 | <Axman6> | I have used conduit quite a bit and managed to do a lot of real work using it. I haven't had much experience with streaming but IIRC is was also quite nice. Most of the work I've done has been around amazonka which exposes things via conduit |
| 03:12:23 | <segfaultfizzbuzz> | jackdk: wait so streaming is different from conduit...? |
| 03:13:03 | × | td_ quits (~td@94.134.91.245) (Ping timeout: 256 seconds) |
| 03:13:07 | <jackdk> | https://hackage.haskell.org/package/streaming , with a nice workshop at https://github.com/ivan-m/LambdaJAM-Streaming-exercises if the haddocks aren't enough for you |
| 03:13:07 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 03:14:15 | → | foul_owl joins (~kerry@94.140.8.105) |
| 03:14:37 | → | td_ joins (~td@muedsl-82-207-238-147.citykom.de) |
| 03:14:58 | <segfaultfizzbuzz> | " in truth "extracting a list or sequence from IO" is mostly just bad practice pure and simple. " heh |
| 03:16:18 | <jackdk> | Henson: it is relatively easy to convert between the types provided by each package. Because Michael Snoyman built a lot of libraries (wai, warp, http-client, etc), a lot of stuff ends up depending on conduit. |
| 03:16:56 | <jackdk> | If I was doing "a little" streaming, I would suck it up and use `conduit`. If I was doing "a lot of" streaming, I would probably use `streaming` in my code and convert in/out of `conduit` when I needed to |
| 03:16:57 | → | davros joins (~davros@host86-184-82-149.range86-184.btcentralplus.com) |
| 03:17:18 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 03:17:25 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 03:18:18 | <Henson> | jackdk: yeah, I figured conduit might be more popular because it's a dependency of a bunch of Michael's packages. And just skimming through the docs it looks like it's pretty much the same idea. The types look simpler to understand, too, just a Conduit with a pipe operator, not Producer, Pipe, and Consumer with a bunch of different ways of fusing/connecting them together. |
| 03:19:19 | <jackdk> | Producer/Consumer/Pipe are all instances of a more general type, same as Source/Sink/Conduit. That's not really a point of difference |
| 03:19:33 | <Henson> | both Pipe and Conduit (it seems) process data in a conceptually simple way, using "await" to get new data from upstream, and "yield" to send data downstream. Similar conceptually to Python iterators. |
| 03:19:43 | × | pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer) |
| 03:20:02 | <segfaultfizzbuzz> | i'm flipping through the slides here now https://ivan-m.github.io/LambdaJAM-Streaming/#/why-streaming |
| 03:20:59 | <Henson> | Axman6: what restrictions does Pipes have that makes it difficult to write useful programs? |
| 03:21:12 | <jackdk> | I would also suggest that the best library is the one you can understand and use to build a working program. |
| 03:22:03 | → | zaquest joins (~notzaques@5.130.79.72) |
| 03:24:48 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 03:25:41 | <segfaultfizzbuzz> | i mean i'm struggling with everything at the moment lol. i switched over to trying to understand some stream documentation. https://hackage.haskell.org/package/HTTP-4000.3.16/docs/Network-HTTP-Stream.html can this generate a stream from an http request? everything i see here sends a stream in |
| 03:25:46 | <jackdk> | the problem I have with the pipes/conduit model is that your composition actually gets a bit harder: connecting the output of one stream into another's input is a separate operation with its own operators/rules/etc to manipulating the stream itself |
| 03:26:18 | × | james[m]123 quits (~jamesnina@2001:470:69fc:105::1:4203) (Quit: Client limit exceeded: 20000) |
| 03:27:32 | × | int-e quits (~noone@int-e.eu) (Remote host closed the connection) |
| 03:27:47 | <jackdk> | segfaultfizzbuzz: let's back up to your initial problem. You want to make HTTP requests of some server? |
| 03:28:02 | → | james[m]123 joins (~jamesnina@2001:470:69fc:105::1:4203) |
| 03:28:08 | <jackdk> | and you're possibly expecting large response bodies, so you want to stream the response somewhere? |
| 03:28:34 | → | int-e joins (~noone@int-e.eu) |
| 03:29:55 | → | pavonia joins (~user@user/siracusa) |
| 03:30:36 | <segfaultfizzbuzz> | yeah the response is like 100 gb of zipped xml |
| 03:31:01 | <jackdk> | so you want to stream it to disk |
| 03:31:02 | <segfaultfizzbuzz> | but i am trying to build up to that by doing streaming calculations on some trivially sized xml delivered over http |
| 03:31:12 | <segfaultfizzbuzz> | no i want to do everything in ram. just network and ram |
| 03:31:42 | <Axman6> | Henson: I can't remember exqctly what I ran into, but one thing I did want to do was write something that could pipe a bytestring through, and when the bytestring had all been processed, I would return the hash of it - seems simple enough, but IIRC that is impossible to do. In conduit it just had type Conduit ByteString ByteString m (Digent SHA256) or something |
| 03:32:11 | <jackdk> | ok segfaultfizzbuzz, you want to do some streaming computation over this without buffering everything everywhere |
| 03:32:28 | × | retroid_ quits (~retro@2e40edd9.skybroadband.com) (Ping timeout: 250 seconds) |
| 03:33:00 | <segfaultfizzbuzz> | not sure what "everything everywhere" means but yeah the actual calculation i need to do over the file looks like accumulating a few dozen bytes and then writing those few dozen bytes to disk |
| 03:33:24 | <jackdk> | fair. Have a look at https://hackage.haskell.org/package/http-conduit-2.3.8/docs/Network-HTTP-Simple.html |
| 03:33:45 | <segfaultfizzbuzz> | initially i started doing this in rust but ran into some problems and could never figure out whether there was a bug in the rust xml parser i was using or the file itself had some kind of formatting issue (i think it was invalid utf8) |
| 03:34:00 | <segfaultfizzbuzz> | whatever the case, this sounded like the sort of thing that haskellers say haskell is good at so i thought i would just give it a try |
| 03:35:16 | <jackdk> | let's see how we go. There's a note at the top of the linked document about turning on OverloadedStrings to construct the request in the first place, then you'll want to use `httpSource` and `getResponseBody` to get a conduit that represents the response body itself. |
| 03:35:28 | × | cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds) |
| 03:35:43 | → | cheater joins (~Username@user/cheater) |
| 03:35:49 | <segfaultfizzbuzz> | ok i'll try starting from this |
| 03:36:32 | <segfaultfizzbuzz> | i mean ok the example works. should i try to feed this into Text.XML ? |
| 03:36:33 | <jackdk> | if you get stuck, put something in a pastebin and someone should be able to take a look |
| 03:38:24 | <jackdk> | I would look at https://hackage.haskell.org/package/xml-conduit-1.9.1.1/docs/Text-XML-Stream-Parse.html#v:parseBytes which you should be able to connect to the conduit from the response body |
| 03:41:16 | <segfaultfizzbuzz> | thanks i'll give that a try |
| 03:49:22 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 250 seconds) |
| 03:54:29 | <segfaultfizzbuzz> | ok well here is my first attempt: main = httpBS "http://zombo.com" >>= parseBytes def .| printC |
| 03:54:34 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:54d9:91e1:8da8:c09f) |
| 04:00:08 | × | FroskyArr quits (~froskyarr@203.175.13.219) (Remote host closed the connection) |
| 04:00:31 | → | FroskyArr joins (~froskyarr@203.175.13.219) |
| 04:01:57 | <jackdk> | well yeah, anything is possible at zombocom |
| 04:02:22 | <segfaultfizzbuzz> | hahaha even my bad, wrong haskell code |
| 04:04:20 | <segfaultfizzbuzz> | anyway i can't get things to fit. it says can't match ConduitT B8.ByteString c0 m0 () with ConduitM B8.ByteString c0 m0 () |
| 04:04:56 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 04:05:06 | <segfaultfizzbuzz> | i forget, does haskell do implicit type conversion...? no, right? |
| 04:05:32 | <segfaultfizzbuzz> | you would use polymorphism to achieve that or something along those lines...? |
| 04:07:47 | <andreabedini> | segfaultfizzbuzz: that's correct |
| 04:08:01 | × | waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
| 04:09:12 | <segfaultfizzbuzz> | so i see the T there which smells like i need to understand monad transformers to do this stuff perhaps? |
| 04:09:13 | → | retroid_ joins (~retro@2e40edd9.skybroadband.com) |
| 04:09:49 | <segfaultfizzbuzz> | i was reading through Real World Haskell a few days ago and i feel like i finally understood the meaning of the term "monad" once the author used the words "chain" and "inject" |
| 04:11:39 | <Axman6> | you might find this useful to solidify that a bit: https://tomstu.art/refactoring-ruby-with-monads |
| 04:11:44 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Remote host closed the connection) |
| 04:12:42 | <andreabedini> | I am not familiar with Conduit but in this case it looks like ConduitM is an alias for ContuitT, kept for backward compatibility |
| 04:12:45 | <andreabedini> | https://hackage.haskell.org/package/conduit-1.3.4.2/docs/Data-Conduit.html#t:ConduitM |
| 04:13:01 | <andreabedini> | so you might avoid that rabbit hole :) |
| 04:14:11 | → | leungbk joins (~user@2603-8000-1201-2dd2-79d4-db3d-bfd4-b037.res6.spectrum.com) |
| 04:16:38 | <segfaultfizzbuzz> | is an alias...? if it is an alias then why doesn't haskell treat them as the same...? |
| 04:19:15 | <segfaultfizzbuzz> | i mean it says right there in the documentation, type ConduitM = ConduitT so ... do i have to give haskell permission to treat the types as equivalent...? |
| 04:21:46 | × | leungbk quits (~user@2603-8000-1201-2dd2-79d4-db3d-bfd4-b037.res6.spectrum.com) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.0.91)) |
| 04:21:56 | <Axman6> | sounds like your problem might be something else |
| 04:22:26 | <segfaultfizzbuzz> | i'll do a bigger paste if you like |
| 04:23:08 | <segfaultfizzbuzz> | https://paste.rs/FE4.hs |
| 04:24:10 | → | leungbk joins (~user@2603-8000-1201-2dd2-79d4-db3d-bfd4-b037.res6.spectrum.com) |
| 04:24:39 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 04:25:11 | → | mbuf joins (~Shakthi@223.190.239.151) |
| 04:27:00 | → | yauhsien joins (~yauhsien@2402:7500:5e5:b1b6:819e:4473:2cd6:e659) |
| 04:27:17 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Ping timeout: 240 seconds) |
| 04:28:28 | <andreabedini> | segfaultfizzbuzz: you are not reading the error correctly. GHC is saying "I cannot match A, I was expecting B but I got A" |
| 04:29:08 | <andreabedini> | it was expecting IO () but it got a ConduitT i0 Event m0 |
| 04:30:54 | <andreabedini> | in general terms, I think with Conduit you build a pipeline (with types like ConduitT a b c or something) and then you "run" it, turning the pipeline into an IO type (typically, but it doens't have to be IO) |
| 04:31:17 | <asivitz> | is there a good library for serializing a random generator's state? for some reason StdGen doesn't have a Read instance |
| 04:32:23 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 04:32:51 | <dsal> | You can use a different generator, I guess. |
| 04:33:22 | <dsal> | :t randomR |
| 04:33:23 | <lambdabot> | (Random a, RandomGen g) => (a, a) -> g -> (a, g) |
| 04:34:51 | <asivitz> | yea; I assume there has to be an existing library that implements some serializable RandomGen? |
| 04:35:53 | <andreabedini> | asivitz: for context https://github.com/haskell/random/issues/123 |
| 04:37:03 | <jackdk> | segfaultfizzbuzz: Possibly helpful: https://www.irccloud.com/pastebin/tIkjGAtc/Zombo.hs |
| 04:38:08 | <asivitz> | andreabedini: ah ok. well that's definitely what I'm looking for. glad it's being considered. thanks |
| 04:38:09 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 04:38:10 | × | leungbk quits (~user@2603-8000-1201-2dd2-79d4-db3d-bfd4-b037.res6.spectrum.com) (Read error: Connection reset by peer) |
| 04:38:33 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 04:38:46 | → | jmc joins (~jmc@softbank126150248096.bbtec.net) |
| 04:38:52 | <segfaultfizzbuzz> | ah the issue was that i wasn't using .| |
| 04:39:55 | <andreabedini> | segfaultfizzbuzz: glad you sorted it, Conduit has its own operators to combine pieces of a pipeline, I never remember them |
| 04:40:40 | <jackdk> | .| connects the output of one conduit to the input of another. `runConduit :: Monad m => ConduitT () Void m r -> m r` runs a conduit that takes no input from upstream and produces no input downstream (`Void` is an uninhabited type) |
| 04:40:44 | <segfaultfizzbuzz> | your zombo example is almost identical to what i was originally doing, except that it is using runResourceT |
| 04:40:45 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 04:40:46 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 04:40:46 | → | wroathe joins (~wroathe@user/wroathe) |
| 04:41:13 | <jackdk> | I needed that because it complained about no MonadResource instance for IO |
| 04:41:38 | <jackdk> | It closes any open connections, etc |
| 04:42:34 | <jmc> | How do I force-recompile base? I want to get .hie files for it, but Cabal doesn't seem to let me. Compiling from source doesn't work for reasons I hope not to have to get into |
| 04:43:20 | × | yauhsien quits (~yauhsien@2402:7500:5e5:b1b6:819e:4473:2cd6:e659) (Remote host closed the connection) |
| 04:45:25 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 04:46:48 | → | deadmarshal joins (~deadmarsh@95.38.119.169) |
| 04:53:14 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 04:58:16 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 250 seconds) |
| 05:08:31 | → | jao joins (~jao@68.235.43.173) |
| 05:10:54 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 05:15:15 | × | alMalsamo quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 276 seconds) |
| 05:22:35 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 05:24:44 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 05:29:33 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 268 seconds) |
| 05:30:14 | × | jao quits (~jao@68.235.43.173) (Remote host closed the connection) |
| 05:31:07 | → | alMalsamo joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 05:43:37 | <segfaultfizzbuzz> | so in rust there's a trick where you can say let _ : () = foo to make the compiler print out the type of something,... is there an equivalent in haskell? |
| 05:43:37 | → | vglfr joins (~vglfr@46.96.142.183) |
| 05:43:46 | <segfaultfizzbuzz> | substantially all of my debugging is printf |
| 05:44:06 | <segfaultfizzbuzz> | equivalent for compiled code that is, i know about :t for ghci |
| 05:45:29 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 05:46:54 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 05:47:15 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 05:48:06 | → | ensyde joins (~ensyde@2600:1700:2050:1040:c06a:eb2:e18d:4418) |
| 05:49:45 | <ski> | segfaultfizzbuzz : i guess you could add a type ascription `... :: Bool' or something, and it'll complain that `...' is not of type `Bool' (if it isn't), and say something about the type it has inferred for it (often just giving some of the detail, though, like the top-level type constructor) |
| 05:49:49 | <jackdk> | % length (_ ++ [1, 2, 3]) |
| 05:49:54 | <yahb> | jackdk: [Timed out] |
| 05:50:16 | <jackdk> | > length (_ ++ [1, 2, 3]) |
| 05:50:21 | <lambdabot> | error: |
| 05:50:21 | <lambdabot> | • Found hole: _ :: [Integer] |
| 05:50:21 | <lambdabot> | • In the first argument of ‘(++)’, namely ‘_’ |
| 05:50:22 | <ski> | % :t length (?xs ++ [0,1,2]) |
| 05:50:23 | <yahb> | ski: (?xs::[a], Num a) => Int |
| 05:50:44 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 05:51:19 | <jackdk> | segfaultfizzbuzz: there we go. an `_foo` in an expression is a _typed hole_ which will dump (among other things) the type it expects in that space. 99% of my working with haskell is filling in typed holes |
| 05:52:05 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 05:52:32 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 05:55:51 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) |
| 05:57:55 | × | HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection) |
| 05:58:09 | → | HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato) |
| 05:58:25 | <jackdk> | segfaultfizzbuzz: the reverse, where you're like "what is this thing?" I like to either do what ski says and stick a`:: ()` after the expression I'm unsure of (wrapping it in brackets if necessary), or stick a `_ $` in front of the whole thing, which will solve for a function type. That will tell me both what I have and what GHC wants |
| 06:01:51 | → | pottsy joins (~pottsy@129.227.183.244) |
| 06:07:20 | → | wea joins (~wea@node-1w7jr9qkwjp07dpr4fj1qaoky.ipv6.telus.net) |
| 06:08:04 | <wea> | how to actually see/print Alt type https://paste.tomsmeding.com/cYfmnPLO ? |
| 06:08:53 | <wea> | when using `string "asdf"` i get no instance of Show |
| 06:13:17 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
| 06:13:59 | <segfaultfizzbuzz> | jackdk: thanks (and ski, thanks) |
| 06:14:04 | <jackdk> | wea: doesn't lok like you get one. I would try to build one using runAlt : the alternative instance for [] is append, so you could build some kind of strings |
| 06:19:32 | <jackdk> | and probably not a full show instance, just a function `Alt Primitive a -> String` or something that dumps enough to see what's going on |
| 06:21:22 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 06:22:17 | × | segfaultfizzbuzz quits (~rustisafu@2602:306:cd3c:9350:59e3:db49:aa0a:46e5) (Ping timeout: 240 seconds) |
| 06:22:46 | → | img joins (~img@user/img) |
| 06:23:13 | <wea> | kinda lost, is it somethin glike `runAlt (:) (string "ADF")` ? |
| 06:30:11 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 06:30:13 | <EvanR> | :t runAlt |
| 06:30:14 | <lambdabot> | error: Variable not in scope: runAlt |
| 06:31:09 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) (Quit: Leaving) |
| 06:31:25 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) |
| 06:31:35 | → | img joins (~img@user/img) |
| 06:31:58 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 06:33:59 | × | Chewt quits (~hayden@2601:1c0:8101:7310::144a) (Quit: WeeChat 3.4) |
| 06:35:12 | <EvanR> | :t getAlt |
| 06:35:13 | <lambdabot> | forall k (f :: k -> *) (a :: k). Alt f a -> f a |
| 06:35:47 | <jackdk> | nah, it's this one: https://hackage.haskell.org/package/free-4.12.4/docs/Control-Alternative-Free.html looks like wea 's working through jle` 's free alternative regexp blog post |
| 06:37:55 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:42:37 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds) |
| 06:43:37 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:54d9:91e1:8da8:c09f) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:43:52 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 06:44:55 | <jackdk> | wea: sorry, this is actually way harder than I thought: have a look at the `Ap` constructor for `AltF`: `Ap :: f a -> Alt f (a -> b) -> AltF f b`. So if I have a value of type `AltF f b` built with the `Ap` constructor, all I know is _some_ `a` was chosen when the constructor was applied but I don't know what it is |
| 06:46:13 | <jackdk> | what I'd probably do is write functions that print the constructor name `altFName :: AltF f a -> String`but I'm not sure how to dig deeper than that |
| 06:47:47 | × | cherryblossom[m] quits (~cherryblo@2001:470:69fc:105::b789) (Quit: Client limit exceeded: 20000) |
| 06:47:52 | × | afotgkmnzj7asv3r quits (~afotgkmnz@2001:470:69fc:105::c24b) (Quit: Client limit exceeded: 20000) |
| 06:49:13 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 06:49:50 | <wea> | i see, ty |
| 06:50:02 | → | afotgkmnzj7asv3r joins (~afotgkmnz@2001:470:69fc:105::c24b) |
| 06:50:14 | → | cherryblossom[m] joins (~cherryblo@2001:470:69fc:105::b789) |
| 06:53:17 | → | _ht joins (~quassel@2a02:a468:b619:1:fb02:7b89:e577:dc30) |
| 06:53:29 | → | ardell joins (~ardell@user/ardell) |
| 06:54:25 | × | wea quits (~wea@node-1w7jr9qkwjp07dpr4fj1qaoky.ipv6.telus.net) (Remote host closed the connection) |
| 06:54:35 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:54bc:3778:6db0:347c) |
| 06:56:56 | → | jao joins (~jao@68.235.43.173) |
| 07:01:59 | × | jao quits (~jao@68.235.43.173) (Ping timeout: 256 seconds) |
| 07:04:04 | → | rusrushal13 joins (~rusrushal@2409:4056:e98:f867:6156:ffe6:54be:d062) |
| 07:08:42 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 07:09:10 | × | rusrushal13 quits (~rusrushal@2409:4056:e98:f867:6156:ffe6:54be:d062) (Ping timeout: 256 seconds) |
| 07:12:57 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) (Ping timeout: 240 seconds) |
| 07:13:02 | → | xsperry joins (~xs@user/xsperry) |
| 07:16:12 | → | justGhost3 joins (~justache@user/justache) |
| 07:16:17 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 07:16:30 | → | nurupo_ joins (~nurupo.ga@user/nurupo) |
| 07:16:34 | → | codolio joins (~dolio@130.44.130.54) |
| 07:16:40 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 07:16:44 | × | nonzen_ quits (~nonzen@user/nonzen) (Ping timeout: 256 seconds) |
| 07:16:58 | → | nonzen joins (~nonzen@user/nonzen) |
| 07:17:18 | × | dolio quits (~dolio@130.44.130.54) (Ping timeout: 256 seconds) |
| 07:17:18 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 256 seconds) |
| 07:17:18 | × | justGhost quits (~justache@user/justache) (Ping timeout: 256 seconds) |
| 07:17:18 | × | edr quits (~edr@user/edr) (Ping timeout: 256 seconds) |
| 07:17:18 | × | nurupo quits (~nurupo.ga@user/nurupo) (Ping timeout: 256 seconds) |
| 07:17:18 | justGhost3 | is now known as justGhost |
| 07:17:32 | → | ystael joins (~ystael@user/ystael) |
| 07:17:40 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer) |
| 07:17:52 | × | tureba quits (~tureba@tureba.org) (Ping timeout: 256 seconds) |
| 07:17:52 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 07:18:07 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 07:20:01 | nurupo_ | is now known as nurupo |
| 07:20:09 | × | xsperry quits (~xs@user/xsperry) () |
| 07:21:42 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
| 07:22:28 | → | edr joins (~edr@enlo.co) |
| 07:22:29 | × | edr quits (~edr@enlo.co) (Changing host) |
| 07:22:29 | → | edr joins (~edr@user/edr) |
| 07:23:14 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 07:23:44 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 07:24:53 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 07:25:29 | → | Inst joins (~delicacie@2601:6c4:4080:3f80:9d39:f8e3:aac8:5b1b) |
| 07:25:34 | <Inst> | ugh @evanr |
| 07:25:37 | <Inst> | you cowards |
| 07:25:52 | <Inst> | you don't even teach monads in your ANU course |
| 07:26:20 | <EvanR> | why do you think I work at ANU |
| 07:27:29 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 256 seconds) |
| 07:28:36 | → | Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 07:28:56 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer) |
| 07:29:22 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 07:30:05 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 07:30:10 | → | tureba joins (~tureba@tureba.org) |
| 07:30:17 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds) |
| 07:30:45 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 07:31:56 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 07:32:08 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 07:33:09 | × | Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 256 seconds) |
| 07:35:24 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 07:37:12 | → | michalz joins (~michalz@185.246.204.61) |
| 07:37:29 | <Inst> | blame axeman6 |
| 07:37:37 | <Inst> | apparently you were teaching there once upon a time |
| 07:38:02 | <dibblego> | no, and you don't know if monads are taught |
| 07:39:07 | → | fef joins (~thedawn@user/thedawn) |
| 07:40:19 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 07:40:56 | <Inst> | not in the intro course |
| 07:41:03 | <Inst> | or maybe he was talking about you, but w/e |
| 07:41:31 | <Inst> | the intro course iirc had an open course website |
| 07:41:31 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 07:41:40 | <dibblego> | no, also no |
| 07:42:14 | → | thevishy joins (~Nishant@2405:201:f005:c007:4ce:a391:7558:6be8) |
| 07:43:44 | <Inst> | https://cs.anu.edu.au/courses/comp1100/lectures/ |
| 07:44:38 | <Inst> | https://cs.anu.edu.au/courses/comp1100/lectures/ |
| 07:45:00 | <Inst> | https://cs.anu.edu.au/courses/comp1100/labs/ |
| 07:45:51 | <EvanR> | can I get some help here, I can't remember how to refer to the correct proxy to select an instance for KnownSymbol within a GADT pattern match |
| 07:45:59 | <EvanR> | or even what to search for |
| 07:46:15 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 07:46:53 | <EvanR> | some sort of type signature within the pattern or something |
| 07:47:57 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds) |
| 07:48:11 | <EvanR> | wait I found it |
| 07:48:43 | <jackdk> | EvanR: either "type applications" (`Proxy @foo`), a type annotation (`Proxy :: Proxy foo`), plus "scoped type variables" if you need to refer to a type variable from an enclosing type signature |
| 07:49:02 | <EvanR> | right, no foo in scope |
| 07:49:13 | <jackdk> | scoped type variables may save you |
| 07:49:20 | <EvanR> | it's from a hidden variable in the GADT element |
| 07:49:35 | <EvanR> | I see an example of how I did it lying around |
| 07:49:45 | <jackdk> | can you show me? now I'm curious |
| 07:51:49 | <ski> | % data Foo = forall a. Show a => MkF [a] |
| 07:51:49 | <yahb> | ski: |
| 07:51:57 | <ski> | % :t \(MkF (xs :: [a])) -> show (reverse (xs :: [a])) |
| 07:51:57 | <yahb> | ski: Foo -> String |
| 07:52:01 | <ski> | % :t \(MkF @a xs) -> show (reverse (xs :: [a])) |
| 07:52:01 | <yahb> | ski: ; <interactive>:1:3: error: Type applications in patterns are not yet supported |
| 07:52:22 | <jackdk> | ah right . turn on scoped type variables then name them in an annotation on the pattern. thanks. |
| 07:52:31 | <EvanR> | I can show you after it works xD |
| 07:53:21 | <EvanR> | ski are you trying to use type applications to introduce a name for the variable? |
| 07:53:28 | <ski> | yes |
| 07:53:36 | <EvanR> | :thonk: |
| 07:54:10 | <EvanR> | or does the name a already exist |
| 07:54:54 | <EvanR> | (I can't actually use the name that was originally used to define the GADT, since it's not in scope) |
| 07:55:49 | <ski> | @quote lazy.bottoms |
| 07:55:49 | <lambdabot> | newsham says: lazy bottoms thunk empty thoughts |
| 07:56:22 | <ski> | (which name ?) |
| 07:58:00 | <EvanR> | https://paste.tomsmeding.com/FpFT2efP what eventually works |
| 07:58:08 | → | alp joins (~alp@user/alp) |
| 07:58:19 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:59:13 | <EvanR> | (ScopedTypeVariables enabled) |
| 07:59:34 | <ski> | does that really work ? |
| 07:59:37 | <EvanR> | yeah |
| 08:00:54 | <EvanR> | trying to pattern match at the same time as do type annotations doesn't |
| 08:01:36 | × | andreabedini quits (~andreabed@8s8kj6nfnfll37n1mb0g.ip6.superloop.com) (Quit: WeeChat 3.3) |
| 08:07:17 | → | kanin joins (~kanin@2409:8a14:10e7:52d0:4526:1e35:f024:52e7) |
| 08:07:56 | <ski> | % let fieldNames :: RecF f ts -> [String]; fieldNames R0 = []; fieldNames ent@(R1 _ _) = case ent of (R1 x xs :: KnownSymbol n => RecF f ('(n,t) : qs)) -> symbolVal (Proxy :: Proxy n) : fieldNames xs |
| 08:07:57 | <yahb> | ski: |
| 08:08:03 | <ski> | % let fieldNames :: RecF f ts -> [String]; fieldNames R0 = []; fieldNames ent = case ent of (R1 x xs :: KnownSymbol n => RecF f ('(n,t) : qs)) -> symbolVal (Proxy :: Proxy n) : fieldNames xs |
| 08:08:03 | <yahb> | ski: ; <interactive>:26:92: error:; * No instance for (KnownSymbol n) arising from a pattern; * In the pattern: R1 x xs; In the pattern: R1 x xs :: KnownSymbol n => RecF f ('(n, t) : qs); In a case alternative: (R1 x xs :: KnownSymbol n => RecF f ('(n, t) : qs)) -> symbolVal (Proxy :: Proxy n) : fieldNames xs; <interactive>:26:92: error:; * Couldn't match type `ts' with '(n, t) : qs; |
| 08:08:07 | <ski> | curious |
| 08:08:08 | → | Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 08:10:16 | <EvanR> | in your second try, it may be that 'ent' doesn't properly "open" the gadt |
| 08:10:33 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 256 seconds) |
| 08:10:36 | <EvanR> | 2nd equation |
| 08:11:05 | <EvanR> | i.e. even though we know it's R1 it does not |
| 08:14:41 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:2912:7d04:4a3c:64d7) |
| 08:14:57 | × | mvk quits (~mvk@2607:fea8:5cdc:bf00::a2bf) (Ping timeout: 240 seconds) |
| 08:15:34 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:16:56 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 08:17:00 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 08:19:14 | → | Guest98 joins (~Guest98@82.212.88.89) |
| 08:19:17 | × | Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 240 seconds) |
| 08:19:21 | <EvanR> | read about those TREX records from hugs earlier, pretty snazzy |
| 08:19:31 | <EvanR> | beats the hell outta this |
| 08:20:48 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 08:21:19 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 256 seconds) |
| 08:23:34 | <Guest98> | Hi everyone, Im a functional programming beginner, im working through real world haskell, one exercise asks me to write a function to check for a palindrome, I didn't want to do the simple way using the length functions or others, I am having an issue with a pattern but I am not sure why : checkPalindrome (xs ++ ys) is invalid, could someone |
| 08:23:35 | <Guest98> | explain why ? couldn't figure it out online :( |
| 08:24:02 | → | cosimone joins (~user@93-44-184-251.ip98.fastwebnet.it) |
| 08:24:05 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 08:24:40 | <Guest98> | heres the function : https://paste.tomsmeding.com/F6xrDzBB |
| 08:24:41 | → | akegalj joins (~akegalj@141-136-245-236.dsl.iskon.hr) |
| 08:25:11 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 08:25:20 | <Christoph[m]> | Guest98: Pattern matching works with constructors, not with functions. |
| 08:25:32 | <polyphem> | you cant use ++ in pattern matching , how does +++ know where to split the strings |
| 08:25:55 | <Guest98> | right, so pattern matching is only checking for which type constructor is used for some type ? |
| 08:26:47 | <polyphem> | in case of functions accepting lists , you have to match the list constructors [] and (:) , at least |
| 08:26:48 | <EvanR> | some languages have ++ pattern matching somehow xD |
| 08:26:53 | <EvanR> | not haskell |
| 08:27:10 | <Guest98> | Okay |
| 08:27:18 | <EvanR> | yes pattern matching checks the constructor |
| 08:27:24 | <dminuoso> | I want to construct a text from a bytestring via builder by converting bytes into multiple characters. Should I use foldr or foldl'? |
| 08:27:25 | <Guest98> | Thanks everyone, makes sense :) |
| 08:27:42 | <dminuoso> | That is, would I foldr or rather foldl' over the octets of the bytestring? |
| 08:27:51 | <ski> | (Erlang has it as a special case. Mercury as a general case (comparable to view patterns, albeit directly connected to the usual "forward" mode of the function)) |
| 08:28:14 | <EvanR> | for a lazy text, I'd imagine foldr |
| 08:28:21 | → | coot joins (~coot@213.134.190.95) |
| 08:29:08 | <EvanR> | to build a strict text I'd imagine using the library functions not try to do it with foldl' |
| 08:29:21 | <dminuoso> | EvanR: What library function are you referring to? |
| 08:29:34 | EvanR | goes to the haddocks |
| 08:29:35 | <dminuoso> | Does bytestring have some "rebuild" function? |
| 08:30:13 | <dminuoso> | By the way, the bytestring will never exceed 65 bytes if that's relevant. |
| 08:31:02 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 08:31:47 | <EvanR> | really, then I daresay just convert to a list of Word8 and do whatever you want xD |
| 08:31:47 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 08:32:07 | <EvanR> | Data.Text.pack the resulting list of Chars |
| 08:32:19 | <dminuoso> | Mmm, I think Ill rather go through Data.ByteString.fold |
| 08:32:25 | <dminuoso> | Otherwise Id have to rely on GHC to do deforestation |
| 08:32:47 | <dminuoso> | Yeah Data.Text.pack wont work, I cant guarantee this to be UTF8 encoded |
| 08:33:07 | <dminuoso> | Which is why Ill roughly turn non-printable characters into text chunks like '\x00' |
| 08:33:11 | <EvanR> | ah no I wasn't suggesting dumpping the Word8 directly into Chars |
| 08:33:38 | <dminuoso> | Ah I see what you mean. |
| 08:33:50 | <dminuoso> | No that wont work either, as this is not a byte-to-char conversion |
| 08:33:52 | <EvanR> | I don't see a Data.Text method to take a known length vector of Chars or anything |
| 08:34:02 | <dminuoso> | It's actually `Word8 -> Text`, as some bytes get translated into multiple characters |
| 08:34:12 | <EvanR> | it has scanl, but you aren't scanning a source Text |
| 08:34:14 | <dminuoso> | Or rather `Word8 -> Data.Text.Builder` |
| 08:34:28 | <EvanR> | if you have the Builders, then you can just run the final builder |
| 08:34:44 | <dminuoso> | So if I build that builder chain, should I be strict in that? :p |
| 08:34:53 | <dminuoso> | How can I even know this beforehand |
| 08:35:00 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 08:35:14 | <EvanR> | ok, 65 bytes |
| 08:35:22 | <EvanR> | but how much text does it expand to? xD |
| 08:35:36 | <dminuoso> | In almost all cases 65 characters of text. |
| 08:35:46 | <EvanR> | then I don't see a point in being lazy |
| 08:35:53 | <dminuoso> | In the most generate case you'd have 65*4-1 chars of output |
| 08:36:05 | <dminuoso> | degenerate |
| 08:36:17 | <EvanR> | force it now, get a packed up to 65 char strict Text |
| 08:36:17 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 08:36:34 | <dminuoso> | Okay, so Data.ByteString.foldl' it is |
| 08:36:59 | <EvanR> | wait, is the folding function composing builders |
| 08:37:14 | <dminuoso> | Yeah |
| 08:37:38 | <EvanR> | then strictness doesn't matter, but order matters |
| 08:37:39 | <dminuoso> | I can alternatively also just mappend them together, but doing this 65 times seems like a waste of allocations |
| 08:38:01 | <EvanR> | compose them backwards and it ruins your day for a minute |
| 08:38:02 | → | Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 08:38:30 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 08:39:28 | <dminuoso> | Mmm, perhaps I could also use Data.ByteString.concatMap, and then just use pack! |
| 08:39:31 | <EvanR> | because the output will be jumbled |
| 08:39:33 | <dminuoso> | concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString |
| 08:40:01 | <dminuoso> | Ah but no, this will actually force tons of mappends |
| 08:40:02 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Read error: Connection reset by peer) |
| 08:40:36 | <EvanR> | bytestring concat shouldn't do a bunch of intermediate mappends, but I don't see how that gets you to your Text |
| 08:41:02 | <dminuoso> | concatMap f = concat . foldr ((:) . f) [] |
| 08:41:14 | <EvanR> | well, don't do that |
| 08:41:20 | <dminuoso> | Yeah :) |
| 08:41:59 | <EvanR> | note if you had utf8 that wouldn't really help a dumb coercion to Text, since it doesn't use utf8 |
| 08:44:28 | <c_wraith> | sufficiently new versions of text do use UTF-8 |
| 08:44:53 | <EvanR> | orly |
| 08:47:42 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 08:48:36 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7175:fef6:491:2dba) (Remote host closed the connection) |
| 08:49:01 | → | lawt joins (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9) |
| 08:49:42 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 08:51:55 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 08:52:05 | <c_wraith> | https://hackage.haskell.org/package/text-2.0/changelog |
| 08:54:50 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 08:56:37 | <EvanR> | I can't wait to abuse this |
| 08:56:52 | <Guest98> | Is it impossible to use a parametrized type and to check if an instance of that type is equal to another one ?? |
| 08:57:29 | <EvanR> | if the type in question is an instance of Eq you can do it |
| 08:57:45 | <c_wraith> | it's easy to require that two types be the same. It's quite a lot harder to test if two types are the same. |
| 08:58:10 | <EvanR> | ah, two different types |
| 08:58:26 | <Guest98> | is it possible to require for both to be instances of eq ? |
| 08:58:32 | <Guest98> | the same instance of eq even |
| 08:58:48 | <Guest98> | last line here is giving me an error : https://paste.tomsmeding.com/RS0X7dZ6 |
| 08:58:48 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 08:58:53 | <ski> | by "instance of that type", do you mean a value having that type ? |
| 08:59:28 | <EvanR> | myfun :: Eq a => a -> (a,a) -> [a] -> Whatever |
| 08:59:36 | <EvanR> | myfun can test all the a's for equality |
| 08:59:59 | <EvanR> | note they will all be of the same type |
| 09:00:06 | <ski> | Guest98 : yes, add `Eq a => ' just after the `::' for `checkPalindrome' |
| 09:00:19 | <Guest98> | Okay thanks |
| 09:00:41 | <Guest98> | Eq a => just means like where a is an instance of Eq ? |
| 09:00:42 | <ski> | (also, the definition of `getLastElement' has a type error) |
| 09:00:46 | <ski> | yes |
| 09:01:04 | <Guest98> | ah you are right, since it can return [] |
| 09:01:12 | <ski> | instead of `tail(xs)' you can just say `tail xs' |
| 09:01:12 | <Guest98> | will fix, thanks again |
| 09:01:34 | <ski> | but better than that is to replace the `xs' in the pattern with say `(_:xs)', and then `xs' is the tail |
| 09:01:48 | <Guest98> | why is that better ? |
| 09:01:51 | <Guest98> | readability or ? |
| 09:02:05 | → | chomwitt joins (~chomwitt@2a02:587:dc16:6e00:12c3:7bff:fe6d:d374) |
| 09:02:36 | <ski> | when it's reasonable to access parts by pattern-matching, it's usually nicer to do so |
| 09:03:00 | <Guest98> | sure, so its just the standard, ill try to do that moving forward |
| 09:03:23 | <ski> | readability, yes. and the implementation knows that what you're accessing is there, so it doesn't introduce any extra checking (like `tail' possibly would do) |
| 09:03:48 | <ski> | (anyway, you can say just `getLastElement xs', rather than `getLastElement(xs)') |
| 09:04:14 | <ski> | (oh, and ditto for `init') |
| 09:04:38 | <ski> | if you want to, you could replace the pattern `(x:[])' by `[x]' |
| 09:04:59 | <Guest98> | sorry, im just used to parenthesis from my non functional experience lol |
| 09:05:01 | <Guest98> | sure |
| 09:05:56 | <ski> | the problem with `checkPalindrome :: [a] -> Bool' was that it promised to work for *all* types `a', regardless of whether they're instances of `Eq' or not |
| 09:06:05 | <ski> | (not all types are) |
| 09:06:26 | → | d0ku joins (~d0ku@178.43.12.98.ipv4.supernova.orange.pl) |
| 09:06:40 | <Guest98> | i understand, will fix it and get back to you |
| 09:06:41 | <Guest98> | thx |
| 09:07:17 | <dminuoso> | EvanR: https://gist.github.com/dminuoso/3ba87266e2df0729ca575df7132d6d10 |
| 09:07:20 | <dminuoso> | Works like a charm. |
| 09:07:29 | <dminuoso> | And you were right, foldl' and foldr' make a difference here with respect to the order |
| 09:07:51 | <EvanR> | I don't think the prime does anything |
| 09:08:14 | <EvanR> | or doesn't do much |
| 09:08:36 | <EvanR> | and foldr' might be actively bad |
| 09:09:17 | <dminuoso> | It's really frustrating that after a few years of Haskell, I cant say whether the prime does anything, whether foldr' would be good or bad here.. |
| 09:10:11 | <EvanR> | you're using lazy text after all? |
| 09:10:22 | <EvanR> | recalculating |
| 09:10:39 | <dminuoso> | Builder produces lazy text necessarily |
| 09:11:00 | <EvanR> | makes sense |
| 09:11:29 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 09:11:31 | <dminuoso> | I figured it makes much less sense to turn it strict here, the user can always do this if they want |
| 09:11:41 | <dminuoso> | But Im not sure, library decisions. |
| 09:11:56 | <Guest98> | ski all is working now, thanks :) |
| 09:12:02 | <EvanR> | then you have a choice to stream it or solidify it with toStrict |
| 09:12:14 | <dminuoso> | Well if I want to stream it, Id rather give you a Builder |
| 09:12:23 | <dminuoso> | So I guess its either Builder or strict text? |
| 09:13:03 | <EvanR> | lazy text will let you stream it, builder will let you continue to concattenate it in whatever way |
| 09:13:45 | <EvanR> | since it's only like 64 chars I lean toward returning strict |
| 09:13:45 | <dminuoso> | Given the length I think Im fine turning it into a strict text |
| 09:13:47 | <dminuoso> | Yeah |
| 09:14:00 | <dminuoso> | Well, strictly the entirety of the output can be as long as 255 |
| 09:14:14 | <dminuoso> | But realistically this will be as long as usual presentation forms of domains |
| 09:14:16 | <dminuoso> | So 10-20ish |
| 09:14:44 | → | fendor joins (~fendor@77.119.174.56.wireless.dyn.drei.com) |
| 09:14:54 | <EvanR> | there's always some asshat with a domain 400 characters long xD |
| 09:15:23 | <dminuoso> | No, domains cannot be longer than 253/254 characters in the usual presentation |
| 09:15:31 | <EvanR> | ok, url |
| 09:15:52 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 268 seconds) |
| 09:16:17 | <EvanR> | I'm just skeptical on hard bounds for these things |
| 09:17:02 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 09:17:07 | <Guest98> | is init xs o(n) ? |
| 09:17:29 | <Guest98> | or even last xs |
| 09:17:32 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 09:17:32 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 09:17:35 | allbery_b | is now known as geekosaur |
| 09:18:19 | <ski> | yes |
| 09:19:42 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:20:22 | <EvanR> | but init xs is much lazier so the cost doesn't hurt as much |
| 09:20:27 | <EvanR> | potentially |
| 09:20:50 | → | Gurkenglas joins (~Gurkengla@dslb-090-186-104-244.090.186.pools.vodafone-ip.de) |
| 09:20:50 | <Guest98> | hm.. that means my check palindrome is o(n^2).. is there an o(n) way to do it ? I assume reverse xs is also o(n^2) since they are basically linked lists and I dont know of a stack to help with reversing |
| 09:20:50 | <EvanR> | last xs has sticker shock |
| 09:21:21 | <merijn> | Reverse shouldn't be O(n^2)?? |
| 09:21:33 | <EvanR> | Guest98 is using a custom algorithm |
| 09:21:34 | <merijn> | Why would it? |
| 09:21:45 | <Guest98> | how do you reverse a linked list in o(n) without stacks and pointers ? |
| 09:22:07 | <Guest98> | (in haskell, obviously) |
| 09:22:20 | <EvanR> | implement reverse and see xD |
| 09:22:33 | <Guest98> | ok.. ill try |
| 09:22:37 | <EvanR> | (without stacks and pointers) |
| 09:23:06 | <c_wraith> | Notably, do it only with pattern matching and recursion, so you can see the amount of work it's doing |
| 09:23:22 | <Guest98> | noted |
| 09:23:38 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 09:23:44 | <ski> | (what does "without stacks and pointers" mean ?) |
| 09:24:36 | <Guest98> | oh wow |
| 09:24:45 | <Guest98> | wait nvm |
| 09:26:17 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 09:26:18 | <Guest98> | that was easy i guess |
| 09:26:31 | <EvanR> | without stacks means don't use forth. without pointers means don't use C |
| 09:26:34 | <Guest98> | myReverse (x:xs) = myReverse(xs) ++ (x:[]) |
| 09:26:54 | <int-e> | now *that* is quadratic |
| 09:27:05 | <Guest98> | why ? |
| 09:27:21 | <EvanR> | implement ++ and see xD |
| 09:27:45 | <Guest98> | I assumed ++ is o(1) since they are linked lists rofl |
| 09:27:53 | <EvanR> | :thonk: |
| 09:28:10 | <EvanR> | except we only have a pointer to the wrong end |
| 09:28:18 | <EvanR> | and we can't modify either end |
| 09:28:22 | <EvanR> | immutability |
| 09:28:22 | <Guest98> | makes sense |
| 09:28:29 | <int-e> | and even if we had a pointer to the end we can't update the successor |
| 09:28:44 | <Guest98> | i keep forgetting the immutability thing lmao |
| 09:28:46 | <Guest98> | let me try again |
| 09:28:55 | <int-e> | *but* the linked lists we have still work as stacks |
| 09:29:07 | <int-e> | (plural; you can have more than one) |
| 09:29:17 | → | Major_Biscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) |
| 09:30:01 | <Maxdamantus> | A unique immutable list in a linearly typed system could update the successor, and (++) could be O(1). |
| 09:30:15 | <Maxdamantus> | (though that's not the case here) |
| 09:30:29 | <EvanR> | since a list is basically a stack, Guest98 you're allowed to use stacks after all lol |
| 09:30:35 | <EvanR> | so to speak |
| 09:31:05 | <int-e> | I'm mentioning this because I actually think of the linear time list reversal that way |
| 09:31:20 | <EvanR> | yeah I think Guest98 also did |
| 09:31:24 | <int-e> | so /maybe/ it's a view that helps somebody else as well |
| 09:31:33 | <ski> | (s/linearly typed/uniqueness type/) |
| 09:31:45 | <Guest98> | i understand, but im not sure how i would implement that in a [a] -> [a] function |
| 09:31:57 | <Guest98> | let me try though, 2 mins |
| 09:31:58 | <int-e> | you can add a helper |
| 09:32:03 | <Guest98> | whats a helper ? |
| 09:32:10 | <Guest98> | let me search it |
| 09:32:16 | <int-e> | an auxiliary function |
| 09:32:20 | <c_wraith> | you only need to have [a] -> [a] as the interface. You can write a more complex function to use internally |
| 09:32:30 | <ski> | another operations, whose raison d'etre is to help with implementing the operation you're trying to define |
| 09:32:32 | <int-e> | (one that has a different type than [a] -> [a]) |
| 09:33:06 | <Guest98> | oh so like a literal other function |
| 09:33:16 | <Guest98> | let me think for a second then |
| 09:35:20 | → | max22- joins (~maxime@2a01cb08833598003a5001b0ea2a052d.ipv6.abo.wanadoo.fr) |
| 09:36:10 | <EvanR> | funny you can't reverse an infinite list... but... if you had two infinite lists as a zipper, then you can trivially reverse that |
| 09:36:24 | <EvanR> | two can'ts make a can |
| 09:37:26 | <c_wraith> | reversing a list is a global operation - the first observable change is that the first element has been replaced with one that came from far away |
| 09:37:42 | <c_wraith> | reversing a zipper is local: you keep the same neighbors. |
| 09:38:05 | <EvanR> | like captain kirk changing the rules of the test to win |
| 09:39:06 | × | pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 250 seconds) |
| 09:39:30 | <Guest98> | this should be it no ? or am i missing something ? https://paste.tomsmeding.com/5iEskgd8 |
| 09:39:32 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 09:39:42 | <Guest98> | wait nevermind |
| 09:39:44 | <Guest98> | i forgot to update it |
| 09:40:13 | <EvanR> | if the zipper represents a cyclic list, then you get the best of both worlds (local neighbors that are simultaneously far away) |
| 09:40:49 | <Guest98> | THIS should be it: https://paste.tomsmeding.com/HK7PPcrT |
| 09:40:50 | <Guest98> | yes ???? |
| 09:41:07 | → | o joins (~niko@libera/staff/niko) |
| 09:41:13 | <c_wraith> | that'll work. |
| 09:41:35 | <int-e> | yes. except we would normally not pass a tuple in Haskell, just make myReverseHelper :: [a] -> [a] -> [a] instead |
| 09:41:38 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 09:41:48 | <c_wraith> | it's usual to just have two parameters instead of a pair, but that probably won't result in any difference in how it's compiled |
| 09:41:59 | <Guest98> | why ? |
| 09:42:07 | <EvanR> | currying |
| 09:42:11 | <int-e> | the compiler is good at passing multiple arguements so it's the same speed or faster that way |
| 09:42:28 | <Guest98> | alright |
| 09:42:38 | <c_wraith> | also, if the compiler didn't optimize it out, you would be allocating a lot of pairs you don't actually need to |
| 09:43:07 | <Guest98> | i dont get that, you are always calling it with two different parameters so why does it matter if the params are in a pair or not |
| 09:43:30 | <int-e> | naively the pair is its own heap object |
| 09:43:42 | <EvanR> | I would not want a new pair allocating for each loop |
| 09:43:54 | → | zeenk joins (~zeenk@2a02:2f04:a208:c500:649e:b5e2:d15c:7960) |
| 09:43:55 | <int-e> | which needs to be allocated, with a new pair being created every time you call myReverseHelper |
| 09:44:05 | × | fef quits (~thedawn@user/thedawn) (Quit: Leaving) |
| 09:44:10 | <EvanR> | not that that has anything to do with reality after compilation |
| 09:44:14 | <Guest98> | I think i understand |
| 09:44:42 | <EvanR> | rather it's common to curry everything out of a defensive suspicion you'll be partially applying stuff |
| 09:44:53 | <Guest98> | you are saying that (xs, x:ys) is a new pair that would have to be allocated but otherwise id be just suing xs ys directly |
| 09:45:10 | <Guest98> | using not suing* |
| 09:45:15 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 09:45:18 | <EvanR> | also if you don't use a tuple, less parentheses probably |
| 09:45:26 | <EvanR> | definitely less commas |
| 09:45:35 | <Guest98> | let me try and see what i get |
| 09:45:49 | <int-e> | Guest98: yes. though the reality is more complicated because ghc will likely realize that the pair is immediately deconstructed and thus avoid the allocation |
| 09:46:06 | <Guest98> | deconstructed as in pattern matched ? |
| 09:46:17 | <ski> | yes |
| 09:46:27 | → | Topsi joins (~Tobias@dyndsl-091-249-083-234.ewe-ip-backbone.de) |
| 09:46:29 | <int-e> | and then it'll make an auxiliary worker function for myReverseHelper that takes two arguments |
| 09:46:41 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 09:46:43 | <Guest98> | ok i get it |
| 09:47:34 | → | pottsy joins (~pottsy@129.227.183.244) |
| 09:48:00 | <Guest98> | alright fixed |
| 09:48:09 | <EvanR> | if there's a choice between "you can pass 1 arg now or 2 args now" and "you must pass 2 args now", one of these is a superset of the other and I don't even wanna think about it again xD |
| 09:48:35 | <EvanR> | hence currying by default |
| 09:48:40 | <int-e> | We <3 the S in STG. |
| 09:48:47 | <Guest98> | wtf is stg |
| 09:49:01 | <ski> | Spineless Tagless G-machine |
| 09:49:05 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 09:49:10 | <Guest98> | I somehow doubt that |
| 09:49:17 | <int-e> | Guest98: sorry that kind of wasn't for you. |
| 09:49:26 | <Guest98> | oh my mistake |
| 09:49:32 | <ski> | @quote spineless |
| 09:49:33 | <lambdabot> | spopejoy says: That [Spineless Tagless G Machine] will always sound like the villian in an upcoming Ghostbusters sequel to me :) |
| 09:49:44 | <Guest98> | thats actually a thing ? XD |
| 09:50:08 | <c_wraith> | it's part of (an early version of) GHC's evaluation model |
| 09:50:18 | <int-e> | The lack of spine in the argument stack is why passing several arguments at once isn't more expensive than passing a single one in Haskell. |
| 09:51:18 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 09:52:02 | → | Vajb joins (~Vajb@2001:999:50:e6be:1e98:9376:d93e:4506) |
| 09:52:06 | × | ensyde quits (~ensyde@2600:1700:2050:1040:c06a:eb2:e18d:4418) (Quit: Leaving) |
| 09:53:15 | <Guest98> | I am done with this chapter i think, thanks everyone for the help, ill be back if I am stumped on anything again ;) |
| 09:53:16 | × | Vajb quits (~Vajb@2001:999:50:e6be:1e98:9376:d93e:4506) (Read error: Connection reset by peer) |
| 09:53:30 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Ping timeout: 260 seconds) |
| 09:53:33 | × | cynomys quits (~cynomys@user/cynomys) (Remote host closed the connection) |
| 09:53:49 | <Guest98> | I have to say its definitely a very different way of thinking than when I am just writing some c++ or java code, its very cool |
| 09:54:12 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 09:54:27 | <EvanR> | so your reverse function basically walks down the list with a stack |
| 09:54:33 | <Guest98> | Is there any demand for functional programmers ? |
| 09:54:35 | <Guest98> | yes |
| 09:54:36 | <EvanR> | putting whatever it sees on the top |
| 09:54:41 | <EvanR> | done |
| 09:54:46 | <Guest98> | i couldn't think of a different way :( |
| 09:54:53 | <Guest98> | that is also o(n) |
| 09:55:01 | <EvanR> | well there's this |
| 09:55:27 | <EvanR> | > foldl (\stack x -> x : stack) [] [1,2,3,4,5] |
| 09:55:29 | <lambdabot> | [5,4,3,2,1] |
| 09:55:33 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:55:39 | <EvanR> | but it does the same thing |
| 09:56:10 | <Guest98> | sure |
| 09:56:13 | <int-e> | pop from one stack, push on another, repeat until first stack is empty... |
| 09:56:31 | <Guest98> | yep, thats the reverse function i wrote basically |
| 09:56:36 | <EvanR> | the 90s game KLAX |
| 09:56:45 | → | fef joins (~thedawn@user/thedawn) |
| 09:56:52 | × | fef quits (~thedawn@user/thedawn) (Client Quit) |
| 09:57:13 | <Guest98> | I asked if there is any demand for functional programmers and got no response, thats a bad indication :P |
| 09:58:15 | <EvanR> | sorry I have enough |
| 09:58:23 | <dminuoso> | Im sure there is *some* demand. |
| 09:58:39 | <dminuoso> | Quite certain that there's at least one open position on this planet? |
| 09:59:02 | <c_wraith> | obviously there's demand. Otherwise there wouldn't be any. (laziness joke) |
| 09:59:20 | <Guest98> | lmao |
| 09:59:28 | <EvanR> | oooooo snap |
| 09:59:28 | <Guest98> | guess ill see you guys tmw, thanks again, bye. |
| 09:59:37 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 240 seconds) |
| 09:59:41 | × | Guest98 quits (~Guest98@82.212.88.89) (Quit: Client closed) |
| 10:00:07 | × | FroskyArr quits (~froskyarr@203.175.13.219) (Remote host closed the connection) |
| 10:00:38 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 10:00:51 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 10:00:55 | → | FroskyArr joins (~froskyarr@120.239.9.162) |
| 10:02:43 | <EvanR> | that's annoying |
| 10:02:58 | <EvanR> | when did new style Read parsers appear |
| 10:03:06 | <dminuoso> | What is new-style Read? |
| 10:03:07 | <EvanR> | I think I'm too out of date |
| 10:03:11 | <dminuoso> | o.o |
| 10:03:35 | → | ubert1 joins (~Thunderbi@p200300ecdf0994bb4b7b6c6de4b2c475.dip0.t-ipconnect.de) |
| 10:03:36 | <EvanR> | minimal implementation readsPrec or readPrec |
| 10:03:46 | <EvanR> | readPrec is a new kind of parser |
| 10:03:53 | → | fef joins (~thedawn@user/thedawn) |
| 10:04:01 | <EvanR> | https://hackage.haskell.org/package/base-4.16.0.0/docs/Text-Read.html |
| 10:04:12 | → | dut joins (~dut@user/dut) |
| 10:04:30 | → | chele joins (~chele@user/chele) |
| 10:04:41 | <dminuoso> | https://hackage.haskell.org/package/base-4.16.0.0/docs/Text-ParserCombinators-ReadPrec.html#t:ReadPrec |
| 10:04:51 | <dminuoso> | -- Copyright : (c) The University of Glasgow 2002 |
| 10:04:56 | <dminuoso> | That sounds.. old? |
| 10:05:39 | <EvanR> | just did a double take, 4.16 is latest base |
| 10:05:54 | <EvanR> | with haddocks |
| 10:06:47 | → | __monty__ joins (~toonn@user/toonn) |
| 10:06:53 | <dminuoso> | Just wondering since you called it new, but if that module has existed for 20 years? |
| 10:06:59 | <dminuoso> | Merely curious |
| 10:07:13 | → | cyphase joins (~cyphase@user/cyphase) |
| 10:08:01 | <merijn> | I mean, Text.ParserCombinators.ReadP and Text.ParserCombinators.ReadPrec both already exist in base 3.0, so... |
| 10:08:28 | <EvanR> | ‘readPrec’ is not a (visible) method of class ‘Read’ |
| 10:08:48 | <dminuoso> | I feel like I dont know anything. We can have invisible methods? :( |
| 10:09:02 | <dminuoso> | This is too much |
| 10:09:06 | <int-e> | dminuoso: it was converted from .lhs to .hs in 2002, before that it said: % $Id: ReadP.lhs % (c) The University of Glasgow, 1994-2000 |
| 10:09:27 | <int-e> | readPrec != readsPrec |
| 10:09:31 | <EvanR> | well |
| 10:09:36 | <int-e> | you can have class methods that aren't exported |
| 10:09:44 | <int-e> | making them invisible |
| 10:09:54 | <EvanR> | apparently I do have readPrec but I can't implement it without importing Text.Read |
| 10:10:04 | <EvanR> | unlike Show |
| 10:10:22 | <EvanR> | not exactly encouraging |
| 10:11:00 | <int-e> | Well showsPrec is in the Haskell report, readPrec isn't? |
| 10:11:20 | <int-e> | (but readsPrec and readList are) |
| 10:11:29 | × | OscarH quits (~OscarH@2a02:c7f:a0da:ae00:ba27:ebff:fe84:d2f4) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 10:11:32 | <EvanR> | oh it's GHC specific |
| 10:11:44 | → | OscarH joins (~OscarH@90.201.86.195) |
| 10:11:49 | <EvanR> | and highly recommended |
| 10:12:40 | <merijn> | I'd say "not having a Read instance" is highly recommended :p |
| 10:13:20 | <EvanR> | not a fan? |
| 10:13:42 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Remote host closed the connection) |
| 10:13:51 | <int-e> | > read ('"' : repeat ' ') :: Int |
| 10:13:55 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 10:13:58 | <lambdabot> | mueval-core: Time limit exceeded |
| 10:14:16 | <int-e> | > read ('"' : replicate 42 ' ') :: Int |
| 10:14:18 | <lambdabot> | *Exception: Prelude.read: no parse |
| 10:14:34 | <EvanR> | I made a working show instance for this crazy ass type and thought it might be cool to restore it from showed state |
| 10:14:46 | <int-e> | Read is convenient. I think that's about the only positive thing I can say about it. |
| 10:14:46 | <EvanR> | and now it's a rabbit hole |
| 10:15:13 | <int-e> | (to use, not to implement when `deriving` doesn't cut it) |
| 10:15:14 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 10:16:57 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:17:00 | <dminuoso> | merijn: One major thing I dislike about Read, is this coherence between Show and Read that is often assumed. |
| 10:17:10 | <merijn> | EvanR: Read is slow and bad |
| 10:17:38 | <merijn> | It's convenient for some ghetto things while developping. But entirely unsuitable for anything serious |
| 10:17:41 | <int-e> | And this is basically unfixable because the slow and bad things are in the Haskell report. |
| 10:17:45 | <dminuoso> | int-e: I found, if you really want to quickly serialize and deserialize stuff, aesons TH/generics is much better and robust. |
| 10:17:53 | <dminuoso> | Than compared to Show/Read |
| 10:18:18 | <dminuoso> | And you get free interop with other languages as well. |
| 10:19:12 | <EvanR> | all of Read is bad or just Reads stuff |
| 10:19:23 | <EvanR> | the new style parsers are also slow and bad? |
| 10:19:45 | <int-e> | Yes |
| 10:19:49 | <EvanR> | about seriousness, I mean, Show is basically in the same boat |
| 10:20:01 | <merijn> | EvanR: All of it, tbh |
| 10:20:06 | <EvanR> | the output is atrocious by default and typing deriving Show everywhere sucks |
| 10:20:22 | <int-e> | The cardinal error is that everything in the standard and derived instances goes through a Haskell tokenizer (lex :: ReadP...) |
| 10:20:36 | <merijn> | I mean, a custom Read implementation using (mega)parsec might not be bad, but then just use those :p |
| 10:20:49 | <int-e> | which is how read ('"' : replicate 42 ' ') :: Int diverges instead of just giving up at the " |
| 10:21:15 | <int-e> | err not that one, I meant the `repeat ' '` variant. |
| 10:21:59 | <int-e> | but the lexer also means that even when it works, parsing an int doesn't use the simple state machine that it should be using... and it has a profound effect on performance |
| 10:22:53 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 10:22:59 | <int-e> | `Show` is mostly fine, except that without `Read` it's not good for serialization. |
| 10:23:36 | <int-e> | (And of course it's tied to String... which is questionable, but handled surprisingly efficiently in practice) |
| 10:24:07 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:24:56 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 10:29:54 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 10:30:11 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:30:32 | → | tomjaguarpaw joins (~tom@li367-225.members.linode.com) |
| 10:36:33 | × | Athas quits (~athas@sigkill.dk) (Ping timeout: 256 seconds) |
| 10:37:05 | → | lambdap2 joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 10:37:07 | × | fiddlerwoaroof quits (~fiddlerwo@user/fiddlerwoaroof) (Ping timeout: 256 seconds) |
| 10:37:07 | × | lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Ping timeout: 256 seconds) |
| 10:37:07 | × | shanemikel quits (~shanemike@desk.roadwar.net) (Ping timeout: 256 seconds) |
| 10:37:14 | → | Athas joins (athas@sigkill.dk) |
| 10:37:19 | → | sajith_ joins (~sajith@user/sajith) |
| 10:37:41 | × | mjrosenb quits (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 10:37:41 | × | douglaswinship quits (~douglaswi@78.40.148.180) (Ping timeout: 256 seconds) |
| 10:37:41 | × | heath quits (~heath@user/heath) (Ping timeout: 256 seconds) |
| 10:37:41 | × | bcoppens quits (~bartcopp@vpn2.bartcoppens.be) (Ping timeout: 256 seconds) |
| 10:37:41 | × | sajith quits (~sajith@user/sajith) (Ping timeout: 256 seconds) |
| 10:37:45 | → | fiddlerwoaroof joins (~fiddlerwo@user/fiddlerwoaroof) |
| 10:37:47 | → | bcoppens joins (~bartcopp@vpn2.bartcoppens.be) |
| 10:37:49 | → | mjrosenb joins (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net) |
| 10:37:53 | → | douglaswinship joins (~douglaswi@78.40.148.180) |
| 10:37:59 | → | heath joins (~heath@user/heath) |
| 10:38:15 | × | jjhoo quits (~jahakala@user/jjhoo) (Ping timeout: 256 seconds) |
| 10:38:15 | × | myme quits (~myme@40.51-175-185.customer.lyse.net) (Ping timeout: 256 seconds) |
| 10:38:15 | × | lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Ping timeout: 256 seconds) |
| 10:38:15 | lambdap2 | is now known as lambdap |
| 10:38:26 | → | shanemikel joins (~shanemike@desk.roadwar.net) |
| 10:38:37 | → | lambdabot joins (~lambdabot@silicon.int-e.eu) |
| 10:38:37 | × | lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host) |
| 10:38:37 | → | lambdabot joins (~lambdabot@haskell/bot/lambdabot) |
| 10:39:51 | → | myme joins (~myme@40.51-175-185.customer.lyse.net) |
| 10:39:58 | → | jjhoo joins (~jahakala@user/jjhoo) |
| 10:40:23 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 10:40:48 | → | coot joins (~coot@213.134.190.95) |
| 10:43:21 | → | Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 10:43:21 | <dminuoso> | Is there a common idiom to express a law like `pretty . parse ~~~ id` where I want to emphasis "ignoring the Left case of parse"? |
| 10:43:35 | × | phma quits (phma@2001:5b0:211f:5068:5bee:1f6d:8374:247d) (Read error: Connection reset by peer) |
| 10:44:47 | <dminuoso> | I mean I could write: right pretty . parse ~~~ Right |
| 10:44:52 | <dminuoso> | But would that get the point across? |
| 10:45:14 | → | phma joins (phma@2001:5b0:211c:37e8:e22d:196:60ef:f166) |
| 10:46:04 | × | Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer) |
| 10:46:58 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 256 seconds) |
| 10:47:58 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds) |
| 10:49:27 | × | tubogram4 quits (~tubogram@user/tubogram) (Quit: See ya later!) |
| 10:50:33 | → | haskellberryfinn joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 10:52:39 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 10:52:46 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 10:55:42 | <opqdonut> | dminuoso: it's usually simpler to specify `parse . pretty ~~~ id` |
| 10:55:46 | <opqdonut> | so you always start with a valid AST |
| 10:59:08 | <dminuoso> | opqdonut: Shouldn't that read Right though? |
| 10:59:38 | × | jmc quits (~jmc@softbank126150248096.bbtec.net) (Quit: Leaving) |
| 11:00:40 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 11:00:48 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 11:01:03 | <opqdonut> | yeah if parse returns Either Err AST then `parse . pretty ~~~ pure` |
| 11:01:13 | <opqdonut> | or Right if you want concreteness |
| 11:04:57 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 240 seconds) |
| 11:07:14 | → | zer0bitz joins (~zer0bitz@2001:2003:f444:a000:a9ef:8cb1:3f34:9694) |
| 11:07:27 | × | haskellberryfinn quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 250 seconds) |
| 11:08:56 | × | fef quits (~thedawn@user/thedawn) (Remote host closed the connection) |
| 11:09:47 | → | haskellberryfinn joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 11:10:03 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 11:12:28 | × | d0ku quits (~d0ku@178.43.12.98.ipv4.supernova.orange.pl) (Ping timeout: 256 seconds) |
| 11:13:14 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 11:15:04 | → | d0ku joins (~d0ku@178.43.12.98.ipv4.supernova.orange.pl) |
| 11:17:05 | <jackdk> | dminuoso: I have seen these called "round-tripping properties" |
| 11:17:25 | <jackdk> | dminuoso: https://hackage.haskell.org/package/hedgehog-1.1/docs/Hedgehog-Internal-Tripping.html#v:tripping |
| 11:18:51 | <geekosaur> | if we're being formal, I think idempotency? |
| 11:18:59 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 252 seconds) |
| 11:19:10 | × | haskellberryfinn quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 250 seconds) |
| 11:20:14 | <polyphem> | isnt idempotency : f a == f (f a) ? |
| 11:20:14 | <jackdk> | idempotency is P(P(x)) = P(x), no? |
| 11:20:31 | <polyphem> | isomorphic , maybe |
| 11:20:36 | <geekosaur> | yes, but here it'd a compund action that is idempotent |
| 11:21:50 | <geekosaur> | (parse . pretty) is the idempotent function since you should get the same result by doing it twice |
| 11:21:57 | × | kanin quits (~kanin@2409:8a14:10e7:52d0:4526:1e35:f024:52e7) (Ping timeout: 240 seconds) |
| 11:22:07 | <geekosaur> | admittedly that's a somewhat roundabout way of expressing the property |
| 11:22:23 | <polyphem> | geekosaur: yes, in that case it is |
| 11:22:24 | → | fef joins (~thedawn@user/thedawn) |
| 11:22:36 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 11:25:13 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 11:29:15 | × | slowtyper quits (~slowtyper@user/slowtyper) (Ping timeout: 256 seconds) |
| 11:29:28 | <ski> | a retract situation `rectraction . section = id' gives rise to an idempotent `section . retraction' |
| 11:29:37 | → | slowtyper joins (~slowtyper@user/slowtyper) |
| 11:30:02 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 11:30:11 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 250 seconds) |
| 11:32:12 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 11:38:49 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 11:38:58 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 11:43:54 | → | xsperry joins (~xs@user/xsperry) |
| 11:47:46 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
| 11:48:09 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 11:53:16 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 11:53:33 | <tomjaguarpaw> | parse . pretty . parse == parse and pretty . parse . pretty == pretty are stronger conditions than idempotency. That's what I've used in the past. |
| 11:53:51 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 11:55:56 | ski | . o O ( <https://en.wikipedia.org/wiki/Pseudo-inverse> ) |
| 11:57:27 | polyphem | likes skis think bubble notation |
| 11:59:08 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 11:59:46 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:02:20 | → | romesrf joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 12:02:44 | → | mvk joins (~mvk@2607:fea8:5cdc:bf00::a2bf) |
| 12:04:32 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 12:05:16 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Remote host closed the connection) |
| 12:07:47 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 12:08:00 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 12:08:39 | × | ubert1 quits (~Thunderbi@p200300ecdf0994bb4b7b6c6de4b2c475.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 12:08:47 | → | chenqisu1 joins (~chenqisu1@183.217.200.249) |
| 12:09:02 | × | chenqisu1 quits (~chenqisu1@183.217.200.249) (Remote host closed the connection) |
| 12:11:19 | <zzz> | where can i get a searchable list of compiler warnings? |
| 12:11:44 | <dminuoso> | The user manual |
| 12:11:50 | <dminuoso> | https://downloads.haskell.org/~ghc/9.0.1/docs/html/users_guide/using-warnings.html |
| 12:12:21 | <zzz> | i remeber there being a command (?) |
| 12:12:26 | <geekosaur> | there's also a llist of all compiler options which includes all the warning options |
| 12:13:18 | <geekosaur> | ghc --show-options ? |
| 12:13:51 | × | nunggu quits (~q@user/nunggu) (Ping timeout: 276 seconds) |
| 12:14:44 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 12:15:53 | <zzz> | that was it! |
| 12:16:14 | <zzz> | so there's no warning for the use of undefined? |
| 12:16:17 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 12:16:44 | <geekosaur> | none that I'm aware of |
| 12:19:23 | <zzz> | sometimes i fill my code with undefineds and progressively turn them into "defined" code. i was hoping there was a way for the compiler to keep warning me while i still have one or more undefined, in case i forget some |
| 12:19:34 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 12:20:04 | <polyphem> | grep -R undefined ? |
| 12:20:14 | <geekosaur> | search in an editor (or grep) is generally good for that |
| 12:20:38 | <zzz> | polyphem: that's what i'm doing now |
| 12:20:44 | → | fef joins (~thedawn@user/thedawn) |
| 12:20:45 | <geekosaur> | I also do things like `(...) = undefined` and then search for uses of that |
| 12:20:52 | <geekosaur> | it stands out more |
| 12:21:08 | <geekosaur> | and to me reads somewhat better than undefined |
| 12:21:16 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 12:23:03 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 12:25:33 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 12:27:07 | <zzz> | somewhat related question: is there something keeping the type system from detecting if something has type `:: forall a. a` and wouldn't this be iseful for some kind of "bottomlessness check (modulo some infinite recursion?) |
| 12:27:30 | × | alMalsamo quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 276 seconds) |
| 12:28:12 | <zzz> | by detecting i mean warning if there is any possibility of your program evaluating some value :: a |
| 12:28:49 | <geekosaur> | but that also rules out useful things like |
| 12:28:52 | <geekosaur> | :t forever |
| 12:28:53 | <lambdabot> | Applicative f => f a -> f b |
| 12:29:55 | <zzz> | the f is constrained, that would be fine |
| 12:31:23 | <polyphem> | :t id |
| 12:31:25 | <lambdabot> | a -> a |
| 12:32:32 | <zzz> | i'm talking specifically about `:: forall a. a` |
| 12:33:01 | <zzz> | hence the "modulo some infinite recursion" |
| 12:33:43 | <lortabac> | zzz: instead of using undefined, you can use _ and get a warning |
| 12:33:50 | <ski> | @type \(v :: Void) -> case v of {} |
| 12:33:51 | <lambdabot> | Void -> p |
| 12:34:40 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:34:57 | → | tubogram4 joins (~tubogram@user/tubogram) |
| 12:35:09 | <zzz> | > (\(v :: Void) -> case v of {}) Void |
| 12:35:11 | <lambdabot> | error: |
| 12:35:11 | <lambdabot> | • Data constructor not in scope: Void :: Void |
| 12:35:11 | <lambdabot> | • Perhaps you meant one of these: |
| 12:35:29 | × | tubogram4 quits (~tubogram@user/tubogram) (Client Quit) |
| 12:35:33 | <zzz> | > data Void; (\(v :: Void) -> case v of {}) Void |
| 12:35:35 | <lambdabot> | <hint>:1:1: error: parse error on input ‘data’ |
| 12:35:51 | <dminuoso> | zzz: Based on my sketchy understanding, I think it'd be very hard to special case that in. |
| 12:36:18 | <zzz> | how do i get lambdabot to do this? |
| 12:36:24 | × | xkuru quits (~xkuru@user/xkuru) (Remote host closed the connection) |
| 12:36:30 | <dminuoso> | @let data Void |
| 12:36:31 | <lambdabot> | Defined. |
| 12:36:38 | <dminuoso> | > (\(v :: Void) -> case v of {}) Void |
| 12:36:40 | <lambdabot> | error: |
| 12:36:40 | <lambdabot> | Ambiguous occurrence ‘Void’ |
| 12:36:40 | <lambdabot> | It could refer to |
| 12:36:50 | <dminuoso> | @let data MyVoid |
| 12:36:51 | <lambdabot> | Defined. |
| 12:36:58 | <dminuoso> | Now what? |
| 12:37:17 | <zzz> | > data Void; (\(v :: MyVoid) -> case v of {}) MyVoid |
| 12:37:18 | <lambdabot> | <hint>:1:1: error: parse error on input ‘data’ |
| 12:37:26 | <zzz> | > (\(v :: MyVoid) -> case v of {}) MyVoid |
| 12:37:26 | → | tubogram4 joins (~tubogram@user/tubogram) |
| 12:37:28 | <lambdabot> | error: |
| 12:37:28 | <lambdabot> | • Data constructor not in scope: MyVoid :: MyVoid |
| 12:37:28 | <lambdabot> | • Perhaps you meant variable ‘_Void’ (imported from Control.Lens) |
| 12:37:37 | <zzz> | ah |
| 12:37:42 | zzz | facepalms |
| 12:37:53 | <geekosaur> | I thought the point of (My)Void was that there were no data constructors forit? |
| 12:37:56 | <geekosaur> | therefore no values |
| 12:38:21 | <geekosaur> | I think the _ suggestion (unannotated typed hole) was probably best |
| 12:38:32 | <polyphem> | :t Proxy :: Void |
| 12:38:33 | <lambdabot> | error: |
| 12:38:33 | <lambdabot> | Ambiguous occurrence ‘Void’ |
| 12:38:33 | <lambdabot> | It could refer to |
| 12:38:48 | → | xkuru joins (~xkuru@user/xkuru) |
| 12:39:05 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
| 12:39:12 | <dminuoso> | zzz: For what its worth, in my experience what creates *far* more bottoms than undefined, is `read`. |
| 12:39:15 | <geekosaur> | :t Proxy :: MyVoid -- don't think this works |
| 12:39:15 | <lambdabot> | error: |
| 12:39:16 | <lambdabot> | • Couldn't match expected type ‘MyVoid’ with actual type ‘Proxy t0’ |
| 12:39:16 | <lambdabot> | • In the expression: Proxy :: MyVoid |
| 12:39:34 | <geekosaur> | :t Proxy :: Proxy MyVoid -- this does but isn't what was asked |
| 12:39:35 | <lambdabot> | Proxy MyVoid |
| 12:39:40 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:39:50 | <polyphem> | yep |
| 12:40:06 | <dminuoso> | `read` tends to look so innocent, and if thats hidden inside some library, this can cause issues in the entire transitive dependency graph |
| 12:42:12 | <zzz> | ok i see |
| 12:42:21 | × | tubogram4 quits (~tubogram@user/tubogram) (Quit: See ya later!) |
| 12:42:54 | <dminuoso> | Something like `undefined` can easily be addressed by git hooks or perhaps a linter |
| 12:43:11 | <dminuoso> | Or maybe your editor has some tooling for that as well |
| 12:43:21 | → | nunggu joins (~q@user/nunggu) |
| 12:43:24 | → | tubogram4 joins (~tubogram@user/tubogram) |
| 12:43:41 | → | haskellberryfinn joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 12:44:50 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 12:47:50 | <lortabac> | zzz: in alternative you can define your own undefined with a custom warning |
| 12:47:58 | <lortabac> | classy-prelude does it |
| 12:48:57 | <lortabac> | but I think _ is the best way to declare unfinished pieces of code |
| 12:54:47 | → | Pickchea joins (~private@user/pickchea) |
| 12:57:12 | × | jespada quits (~jespada@87.74.36.188) (Quit: Textual IRC Client: www.textualapp.com) |
| 12:59:30 | → | kanin joins (~kanin@2409:8a14:10e7:52d0:e868:e5f3:fdc5:9fd) |
| 13:00:31 | × | kanin quits (~kanin@2409:8a14:10e7:52d0:e868:e5f3:fdc5:9fd) (Max SendQ exceeded) |
| 13:00:58 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 13:01:00 | → | kanin joins (~kanin@2409:8a14:10e7:52d0:e868:e5f3:fdc5:9fd) |
| 13:01:21 | → | mason0 joins (~bc8147f2@cerf.good1.com) |
| 13:01:39 | denbrahe[m] | is now known as denbrahe |
| 13:04:35 | × | max22- quits (~maxime@2a01cb08833598003a5001b0ea2a052d.ipv6.abo.wanadoo.fr) (Ping timeout: 252 seconds) |
| 13:04:35 | × | denbrahe quits (~denbrahem@2001:470:69fc:105::19c0) (Quit: Reconnecting) |
| 13:09:20 | × | kmein quits (~weechat@user/kmein) (Quit: ciao kakao) |
| 13:09:40 | → | kmein joins (~weechat@user/kmein) |
| 13:10:55 | → | fendor_ joins (~fendor@77.119.199.145.wireless.dyn.drei.com) |
| 13:13:54 | × | fendor quits (~fendor@77.119.174.56.wireless.dyn.drei.com) (Ping timeout: 268 seconds) |
| 13:16:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:17:44 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 13:20:30 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 250 seconds) |
| 13:25:07 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:25:57 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 13:27:32 | × | Henson quits (~kvirc@107-179-133-201.cpe.teksavvy.com) (Ping timeout: 240 seconds) |
| 13:28:08 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 13:32:55 | × | ph88 quits (~ph88@2a02:8109:9e00:71d0:3c42:1d7a:5c49:19d9) (Remote host closed the connection) |
| 13:33:18 | → | ph88 joins (~ph88@2a02:8109:9e00:71d0:f12b:1b26:c11c:e722) |
| 13:33:45 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 13:37:44 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 13:38:27 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
| 13:40:08 | → | andreabedini joins (~andreabed@8s8kj6nj5000h5zkmpxr.ip6.superloop.com) |
| 13:45:49 | × | ph88 quits (~ph88@2a02:8109:9e00:71d0:f12b:1b26:c11c:e722) (Quit: Leaving) |
| 13:46:06 | → | ph88 joins (~ph88@95.90.247.31) |
| 13:46:57 | × | Megant quits (megant@user/megant) (Ping timeout: 240 seconds) |
| 13:48:25 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 13:49:05 | → | Megant joins (megant@user/megant) |
| 13:52:35 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 13:54:31 | → | intersec1 joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 13:54:35 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Read error: No route to host) |
| 13:55:13 | <unclechu> | Hey, does anyone has any idea why names of the property tests are snake_cased? |
| 13:55:28 | <unclechu> | https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/Test-QuickCheck.html |
| 13:55:30 | <unclechu> | https://hackage.haskell.org/package/hedgehog-1.0.5/docs/Hedgehog.html |
| 13:55:32 | <unclechu> | Two examples |
| 13:55:51 | <unclechu> | “prop_reverse” for instance |
| 13:56:01 | <maerwald> | does that bother you? |
| 13:56:29 | <geekosaur> | possibly to help avoid collision with exported functions |
| 13:56:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Ping timeout: 240 seconds) |
| 13:56:45 | <geekosaur> | in any case it's just convention, not a requirement |
| 13:57:33 | <unclechu> | geekosaur Okay, but the convention actually is? What’s the point of doing it? |
| 13:57:48 | <unclechu> | What the convention actually is* |
| 13:58:08 | <geekosaur> | how would I know? I'm not the author of either |
| 13:58:26 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:00:50 | × | akegalj quits (~akegalj@141-136-245-236.dsl.iskon.hr) (Quit: Lost terminal) |
| 14:01:37 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:01:40 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 250 seconds) |
| 14:03:11 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:03:18 | <merijn> | quickcheck can auto detect tests starting with prop_ I think? |
| 14:03:44 | → | Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com) |
| 14:03:46 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:04:51 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 14:05:20 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:06:06 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:07:16 | <tomsmeding> | indeed |
| 14:07:41 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:07:49 | <tomsmeding> | using what I now see is, ahem, slightly hacky code |
| 14:07:56 | <tomsmeding> | https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/src/Test.QuickCheck.All.html#allProperties |
| 14:08:18 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 14:08:29 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:09:29 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) (Ping timeout: 252 seconds) |
| 14:10:03 | → | imalsogreg joins (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) |
| 14:10:03 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:11:02 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:12:36 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:12:42 | × | fjmorazan quits (~quassel@user/fjmorazan) (Quit: fjmorazan) |
| 14:13:14 | → | fjmorazan joins (~quassel@user/fjmorazan) |
| 14:13:23 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:13:31 | × | andreabedini quits (~andreabed@8s8kj6nj5000h5zkmpxr.ip6.superloop.com) (Quit: WeeChat 3.3) |
| 14:14:57 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:15:11 | → | max22- joins (~maxime@2a01cb08833598002ebd2aed9b6751c0.ipv6.abo.wanadoo.fr) |
| 14:15:44 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:17:20 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:18:20 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:19:37 | × | max22- quits (~maxime@2a01cb08833598002ebd2aed9b6751c0.ipv6.abo.wanadoo.fr) (Ping timeout: 250 seconds) |
| 14:19:54 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:20:59 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:21:05 | → | RFV joins (~Thunderbi@49.red-88-12-220.dynamicip.rima-tde.net) |
| 14:21:36 | → | fef joins (~thedawn@user/thedawn) |
| 14:21:55 | × | RFV quits (~Thunderbi@49.red-88-12-220.dynamicip.rima-tde.net) (Client Quit) |
| 14:22:18 | × | Major_Biscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 260 seconds) |
| 14:22:32 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:23:34 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:25:09 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:26:13 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:26:34 | × | mncheckm quits (~mncheck@193.224.205.254) (Quit: Leaving) |
| 14:27:46 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:27:51 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 14:28:50 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:30:25 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:31:19 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 14:31:24 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:31:52 | → | coot joins (~coot@213.134.190.95) |
| 14:32:59 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:34:12 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:35:45 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:36:01 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 14:36:02 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 14:36:02 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:36:44 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:38:18 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:38:49 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 14:39:13 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:40:26 | × | Henson quits (~kvirc@107-179-133-201.cpe.teksavvy.com) (Ping timeout: 256 seconds) |
| 14:40:47 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:41:47 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:43:20 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:44:28 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:45:50 | → | jkaye joins (~jkaye@2601:281:8300:7530:ca78:9af1:544b:8917) |
| 14:46:04 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:46:40 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds) |
| 14:47:13 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:47:17 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 14:47:34 | <kuribas> | hmm, any language which has list comprehension has monad syntax... |
| 14:47:49 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41) |
| 14:48:30 | <kuribas> | So if someone claims monads aren't useful, you can point them to this fact. |
| 14:48:41 | × | imalsogreg quits (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) (Remote host closed the connection) |
| 14:48:47 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:49:18 | <romesrf> | kuribas: how is list comprehension is monad syntax? |
| 14:49:57 | <geekosaur> | @undo [ x + 5 | x <- xs ] |
| 14:49:57 | <lambdabot> | concatMap (\ x -> [x + 5]) xs |
| 14:50:06 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:50:25 | <geekosaur> | now remember that concatMap is =<< for lists |
| 14:50:28 | <kuribas> | romesrf: [(x, y) | x <- [1..3], y <- [4..6]] => do x <- [1..3]; y <- [4..6]; pure (x, y) |
| 14:50:31 | → | LiaoTao_ joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 14:50:52 | <kuribas> | romesrf: in fact, you can turn list comprehensions into monads using a syntax extension. |
| 14:50:55 | <kuribas> | in ghc |
| 14:51:24 | <kuribas> | well, generalize the syntax more precisely... |
| 14:51:41 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:52:17 | <dminuoso> | kuribas: I believe that one of the primary problems with monads is the imprecise use of the word. |
| 14:52:30 | <dminuoso> | Like you just excercised |
| 14:52:45 | → | segfaultfizzbuzz joins (~rustisafu@2602:306:cd3c:9350:59e3:db49:aa0a:46e5) |
| 14:52:55 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:52:55 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 14:53:06 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 276 seconds) |
| 14:53:33 | <dminuoso> | Monad in Haskell is not just useful not because it happens to match things we do, but because we can write generalize over it. |
| 14:53:46 | <dminuoso> | The power of "Monad" only happens precisely when you are able to write something akin to: f :: Monad m => ... |
| 14:53:52 | <dminuoso> | That is, something that is polymorphic over *any* such thinig. |
| 14:54:09 | <dminuoso> | Monoids are not useful because we can add numbers together, but because they give us a generalized tool. |
| 14:54:24 | <romesrf> | geekosaur: that's a great explanation :) |
| 14:54:29 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:54:39 | <romesrf> | or rather a great example |
| 14:54:53 | <romesrf> | that showcases it exactly =) |
| 14:55:32 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:55:35 | <kuribas> | dminuoso: sure. I just mean that people who claim they don't need monads, already use them. |
| 14:55:47 | <dminuoso> | "need monads", "use them" |
| 14:55:54 | geekosaur | considers posting the sigfpe link again |
| 14:55:58 | <dminuoso> | This I think is terribly confusing. |
| 14:56:03 | <geekosaur> | "you could have invented monads" |
| 14:56:05 | <romesrf> | geekosaur: what is sigfpe? |
| 14:56:10 | <dminuoso> | A monad is not something you "have" or "use" |
| 14:56:14 | <dminuoso> | Or rather |
| 14:56:15 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 14:56:23 | <kuribas> | romesrf: floating point exception. |
| 14:56:32 | <geekosaur> | http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html |
| 14:56:42 | <romesrf> | hahah |
| 14:56:48 | × | sweater quits (~sweater@206.81.18.26) (Quit: WeeChat 2.8) |
| 14:57:04 | → | sweater joins (~sweater@206.81.18.26) |
| 14:57:08 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 14:57:12 | × | sweater quits (~sweater@206.81.18.26) (Client Quit) |
| 14:57:21 | → | adanwan_ joins (~adanwan@gateway/tor-sasl/adanwan) |
| 14:57:41 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::ee17) |
| 14:58:03 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 14:58:18 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 276 seconds) |
| 14:58:42 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 14:59:23 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Read error: Connection reset by peer) |
| 14:59:38 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:00:02 | <romesrf> | i was wondering what IRC client you use |
| 15:00:14 | → | zmt00 joins (~zmt00@user/zmt00) |
| 15:00:22 | <romesrf> | i have to reconfigure weechat to make all these join/leave messages better |
| 15:00:33 | <geekosaur> | I use hexchat |
| 15:00:39 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:00:42 | <geekosaur> | but I choose to track all the joins/parts |
| 15:00:55 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 15:00:58 | <geekosaur> | I could turn them off but there are enough times when I need to know, so |
| 15:01:33 | <geekosaur> | (among other things, I'm a channel admin) |
| 15:02:03 | <romesrf> | oh! got it |
| 15:02:15 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:03:09 | × | WhateverRabbit quits (~rabbit@206.81.18.26) (Quit: WeeChat 2.8) |
| 15:03:13 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:03:40 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds) |
| 15:04:01 | → | sweater joins (~sweater@206.81.18.26) |
| 15:04:04 | → | Null_A joins (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) |
| 15:04:47 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:05:41 | → | coot joins (~coot@213.134.190.95) |
| 15:05:51 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:07:06 | × | polyphem quits (~rod@2a02:810d:840:8754:ab25:19d5:5fa5:69d5) (Ping timeout: 250 seconds) |
| 15:07:24 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:08:12 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 15:08:27 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:08:30 | <dminuoso> | I need some guidance. I have a powerdns binding library, and inside I expose a `data RRSet = RRSet { rrset_name :: T.Text, ... }`. Now the DNS standards require limited case-insensitivity (case folding on the ASCII-subset of bytes) on nameserver and recursor implementations do limited case-insensitivity. |
| 15:08:42 | <dminuoso> | Do I implement that same case insensitivity on the Eq instance of RRSet? |
| 15:08:55 | <dminuoso> | (Which is essentially just a data structure to read/write DNS records with) |
| 15:09:51 | <merijn> | dminuoso: There's a case-insensitivity newtype for text |
| 15:10:04 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:10:06 | <dminuoso> | merijn: Which would be incorrect, even. |
| 15:10:26 | <dminuoso> | I need a limited case insensitivity which is only insensitive on the code points in the ASCII subset |
| 15:10:32 | <dminuoso> | But not insensitive on the rest |
| 15:10:38 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 15:11:07 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:12:41 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:13:42 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:14:49 | <geekosaur> | I'm confused. isn't the only way to get stuff outside the ASCII subset punycode? |
| 15:14:51 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 15:15:17 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:15:30 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 15:15:43 | <dminuoso> | geekosaur: No, DNS names themselves can be arbitrary bytestrings with just some limitations on their length. |
| 15:16:14 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:16:49 | <imalsogreg> | dminuoso: It looks like the case-insensivite package implements the type of case insensitivity you want? https://hackage.haskell.org/package/case-insensitive-1.2.1.0/docs/src/Data.CaseInsensitive.Internal.html#foldCase So you could wrap `rrset_name` in the `CI` constructor if you want RRsets to compare case-insensitively. |
| 15:17:25 | × | dfg quits (dfg@user/dfg) (Quit: I hate quit messages.) |
| 15:17:26 | <dminuoso> | imalsogreg: Nope, definitely not correct. |
| 15:17:33 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Read error: Connection reset by peer) |
| 15:17:40 | → | dfg joins (dfg@dfg.rocks) |
| 15:17:40 | × | dfg quits (dfg@dfg.rocks) (Changing host) |
| 15:17:40 | → | dfg joins (dfg@user/dfg) |
| 15:17:42 | <dminuoso> | imalsogreg: That would at minimum also casefold latin supplement characters |
| 15:17:51 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:17:54 | × | Null_A quits (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 15:17:55 | <dminuoso> | Which would be non-conforming to DNS RFCs |
| 15:18:10 | <dminuoso> | I mean rolling this myself is not a big deal |
| 15:18:17 | <dminuoso> | Im merely wondering whether RRSet *should* receive that treatment |
| 15:18:55 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:19:12 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 15:19:14 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 15:19:30 | → | Major_Biscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) |
| 15:19:41 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 15:19:45 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 15:20:30 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:20:32 | <imalsogreg> | dminuoso: Will you be writing `foo :: RSSet == bar :: RSSet` a lot - and would you want equality to "mean" equality according to the DNS spec? |
| 15:21:32 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:21:48 | × | raym quits (~raym@user/raym) (Ping timeout: 256 seconds) |
| 15:22:46 | <dminuoso> | geekosaur: The story behind punycode is a bit bizarre, in principle we don't actually need it. My best guess so far is that it exists because plenty software only accepts letter-hyphen-digit-undercore in domain names |
| 15:22:56 | <dminuoso> | say mail clients or servers |
| 15:23:05 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:24:17 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:25:52 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:26:46 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:27:20 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:27:29 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 15:27:30 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 15:27:30 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:27:55 | → | shailangsa joins (~shailangs@host86-185-98-37.range86-185.btcentralplus.com) |
| 15:28:21 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:28:22 | → | polyphem joins (~rod@2a02:810d:840:8754:2622:b61:ec32:bf43) |
| 15:29:21 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 15:29:24 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::ee17) () |
| 15:29:25 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:31:00 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:31:23 | → | Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com) |
| 15:31:48 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 250 seconds) |
| 15:31:59 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 15:32:09 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:32:39 | → | dsrt^ joins (~dsrt@50.231.5.242) |
| 15:33:43 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:33:51 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 15:34:48 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:34:57 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds) |
| 15:36:23 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:36:33 | sajith_ | is now known as sajith |
| 15:37:26 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:39:01 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:39:05 | → | mncheck joins (~mncheck@193.224.205.254) |
| 15:40:05 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:41:42 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:41:50 | × | romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4) |
| 15:42:08 | → | romesrf joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 15:42:23 | → | raym joins (~raym@user/raym) |
| 15:42:51 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:44:28 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:45:40 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:45:49 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 15:47:15 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:47:58 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) |
| 15:48:36 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:49:10 | × | romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4) |
| 15:49:27 | → | romesrf joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 15:50:12 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:51:19 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:52:11 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 15:52:24 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 15:52:54 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:53:54 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:54:07 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 15:54:19 | → | alt-romes joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 15:55:00 | × | Ocelot quits (~ocelot@50-78-208-189-static.hfc.comcastbusiness.net) (Remote host closed the connection) |
| 15:55:31 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:56:38 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:56:56 | × | romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 250 seconds) |
| 15:58:13 | → | betelgeuse9 joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 15:59:13 | × | betelgeuse9 quits (~betelgeus@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer) |
| 15:59:42 | × | mbuf quits (~Shakthi@223.190.239.151) (Quit: Leaving) |
| 16:00:01 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 16:04:10 | × | alt-romes quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4) |
| 16:04:46 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 16:05:37 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 16:08:23 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds) |
| 16:10:30 | → | Codaraxis joins (~Codaraxis@user/codaraxis) |
| 16:10:32 | × | Gurkenglas quits (~Gurkengla@dslb-090-186-104-244.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 16:10:33 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 16:11:30 | × | xff0x quits (~xff0x@2001:1a81:523c:5300:707e:bf72:dc84:30f7) (Ping timeout: 268 seconds) |
| 16:11:54 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 16:13:14 | × | nek0 quits (~nek0@nek0.eu) (Quit: The Lounge - https://thelounge.chat) |
| 16:15:33 | → | yauhsien joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 16:18:17 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 16:18:50 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 16:19:04 | → | romesrf joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 16:19:24 | × | kmein quits (~weechat@user/kmein) (Quit: ciao kakao) |
| 16:19:45 | → | kmein joins (~weechat@user/kmein) |
| 16:19:50 | × | yauhsien quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 16:19:57 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 16:21:48 | × | kmein quits (~weechat@user/kmein) (Client Quit) |
| 16:22:07 | → | kmein joins (~weechat@user/kmein) |
| 16:22:40 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:2912:7d04:4a3c:64d7) (Quit: WeeChat 2.8) |
| 16:24:19 | × | cosimone quits (~user@93-44-184-251.ip98.fastwebnet.it) (Remote host closed the connection) |
| 16:24:47 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 252 seconds) |
| 16:24:51 | → | nek0 joins (~nek0@nek0.eu) |
| 16:24:58 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 16:25:14 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 16:25:39 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 16:25:41 | → | intersect joins (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) |
| 16:26:20 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 16:26:35 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 16:26:42 | → | max22- joins (~maxime@2a01cb0883359800f8f9901a67fcc4eb.ipv6.abo.wanadoo.fr) |
| 16:27:15 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 16:27:38 | × | ptrcmd quits (~ptrcmd@user/ptrcmd) (Remote host closed the connection) |
| 16:28:02 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 16:28:17 | × | intersec1 quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Ping timeout: 240 seconds) |
| 16:29:00 | × | kanin quits (~kanin@2409:8a14:10e7:52d0:e868:e5f3:fdc5:9fd) (Ping timeout: 250 seconds) |
| 16:29:36 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 16:30:45 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) |
| 16:33:29 | → | xff0x joins (~xff0x@2001:1a81:523c:5300:707e:bf72:dc84:30f7) |
| 16:34:39 | <segfaultfizzbuzz> | this question is well beyond what i understand of programming (probably)... but is threading fairly equivalent to labeling of type linearity? |
| 16:35:37 | <romesrf> | what is 'threading'? |
| 16:35:42 | <segfaultfizzbuzz> | meaning, if i had a program with linear types, would the compiler be able to infer how to multithread the application and how to divide work amongst the threads |
| 16:35:56 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 250 seconds) |
| 16:36:07 | → | sha296 joins (~shakil@2409:4060:2e16:5922:8869:e019:69d0:c4b8) |
| 16:36:21 | <segfaultfizzbuzz> | this program would not explicitly create or destroy threads, the compiler or runtime would handle all of that |
| 16:36:46 | <romesrf> | at the moment, linear types are a construct purely on the type system, there are no automatic compiler optimizations - not meaning there couldn't be |
| 16:36:58 | <segfaultfizzbuzz> | my question is theoretical, not practical |
| 16:38:07 | <romesrf> | (just linking to what i said above: https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types) |
| 16:38:32 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 16:38:34 | <merijn> | segfaultfizzbuzz: Realistically, auto-parallelisation is still a pipe dream |
| 16:38:44 | <merijn> | Even in languages where the compiler has the knowledge to do it |
| 16:39:04 | <merijn> | Most projects attempting it turn out to perform fairly badly, compared to hand done stuff |
| 16:39:15 | <segfaultfizzbuzz> | my question is slightly more practical than that, i think--if i am threading things, what am i doing beyond annotating linearity |
| 16:39:27 | <segfaultfizzbuzz> | i suppose there is some kind of task chunking/granularization annotation |
| 16:39:52 | <segfaultfizzbuzz> | merijn: sounds like a great research topic, then ;-) |
| 16:40:09 | <romesrf> | ^^ahaha |
| 16:40:10 | <segfaultfizzbuzz> | unless you think people will defeat computers at go ;-) |
| 16:40:54 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 16:43:09 | <romesrf> | segfaultfizzbuzz: so i'm giving what you said some thought. first I would put things on different terms: |
| 16:43:09 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 16:43:37 | <geekosaur> | it's been a great research topic for a couple decades now, I think |
| 16:44:20 | <romesrf> | is threading "fairly equivalent" to lableing linearity: I would think in terms of can we create threaded programs based on linear types |
| 16:44:46 | <romesrf> | because one thing is a type level concept, and the other is a well... "hardware" level concept |
| 16:44:49 | <segfaultfizzbuzz> | because it seems like a thread is an annotation of like locality and flow of data read/write ...? |
| 16:44:51 | <romesrf> | geekosaur: linear types? |
| 16:44:58 | <geekosaur> | autothreading |
| 16:45:01 | <romesrf> | i see |
| 16:45:07 | × | sha296 quits (~shakil@2409:4060:2e16:5922:8869:e019:69d0:c4b8) (Quit: Leaving) |
| 16:45:42 | <romesrf> | i wrote some research on linear types so i thought you meant that :P |
| 16:45:54 | <romesrf> | autothreading does sound cool |
| 16:46:04 | → | kmein_ joins (~weechat@user/kmein) |
| 16:46:51 | <romesrf> | but stuff like the parallell library with the `using` parallel strategy isn't some sort of autothreading? (even though it's (i assume) written specifically in the library?) |
| 16:47:01 | <romesrf> | manually* |
| 16:47:38 | <geekosaur> | you still need manual annotations with it, plus you need to know which sparks will compute and which will fizzle |
| 16:47:46 | <geekosaur> | which generally requires experimentation |
| 16:49:32 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 240 seconds) |
| 16:49:32 | × | kmein quits (~weechat@user/kmein) (Ping timeout: 252 seconds) |
| 16:50:28 | <romesrf> | segfaultfizzbuzz: a thread as an annotation of locality and flow of data read/write--could you elaborate? |
| 16:50:40 | <romesrf> | i'm trying to create some thoughts on it |
| 16:50:57 | × | flipchan quits (~filip@user/flipchan) (Ping timeout: 240 seconds) |
| 16:51:26 | × | SummerSonw quits (~The_viole@203.77.49.232) (Read error: Connection reset by peer) |
| 16:52:05 | <geekosaur> | seems to me that linearity tells you which parts *can't* thread, but gives you no help in the hard part which is which parts *can* productively be threaded |
| 16:52:19 | <geekosaur> | "productively" being the key word |
| 16:54:43 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 16:55:15 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 16:55:15 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 16:55:15 | → | wroathe joins (~wroathe@user/wroathe) |
| 16:55:24 | → | kanin joins (~kanin@2409:8a14:10e7:fa80:94e5:9c21:2378:713) |
| 16:55:26 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 16:55:26 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 250 seconds) |
| 16:55:26 | × | kanin quits (~kanin@2409:8a14:10e7:fa80:94e5:9c21:2378:713) (Remote host closed the connection) |
| 16:57:25 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 16:59:39 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 17:00:01 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Remote host closed the connection) |
| 17:02:57 | × | ph88 quits (~ph88@95.90.247.31) (Ping timeout: 240 seconds) |
| 17:03:28 | → | CHUD joins (~CHUD@edu7879.kent.ac.uk) |
| 17:05:06 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 17:07:31 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:54bc:3778:6db0:347c) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:07:48 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 17:09:06 | → | jao joins (~jao@static-68-235-44-73.cust.tzulo.com) |
| 17:09:22 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 17:09:26 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 17:12:52 | × | haskellberryfinn quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 17:13:57 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 17:15:44 | <monochrom> | I thought programming since day one was already annotation of locality and sequentiality (sometimes "linear" just means "sequential"). |
| 17:16:19 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 17:16:52 | <segfaultfizzbuzz> | romesf: i mean, if we know how information flows through a program then you know where to localize things right? |
| 17:16:55 | <monochrom> | Talking about threads (and all parallelism and concurrency constructs) instead acknowledges that reality is more sophisticated than sequential PDP-11. |
| 17:17:44 | <segfaultfizzbuzz> | monochrom: that's deep, programming is annotation of locality and sequentiality. |
| 17:18:08 | <monochrom> | Alternatively, it's tautological. |
| 17:18:30 | → | ptrcmd joins (~ptrcmd@user/ptrcmd) |
| 17:18:32 | × | d0ku quits (~d0ku@178.43.12.98.ipv4.supernova.orange.pl) (Ping timeout: 256 seconds) |
| 17:18:50 | × | Major_Biscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 250 seconds) |
| 17:19:01 | <geekosaur> | sometimes the tautologies sound really deep :) |
| 17:19:40 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 17:20:48 | <monochrom> | I might have to credit my observation to Hoare actually. |
| 17:21:34 | <monochrom> | When Hoare worked on parallelism and concurrency, he named his system "communicating sequential processes" (CSP). |
| 17:22:14 | <monochrom> | The idea is that maybe thinking about and using unlimited unstructured concurrency is too hard. |
| 17:22:22 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 17:22:22 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 17:22:22 | → | wroathe joins (~wroathe@user/wroathe) |
| 17:23:07 | <geekosaur> | that fails to surprise me |
| 17:23:40 | → | thomas_ joins (~thomas@2a02:a03f:666e:c500:92eb:d341:15bc:3f3d) |
| 17:23:44 | <geekosaur> | humans have far too little working memory for such tasks |
| 17:23:52 | <monochrom> | So how about limiting to this structure: you have many sequential programs. In each program you can still think sequentially, as in the 1960s. You just now acknowledge that there are other sequential programs too, and that once in a while they have to talk or synchronize. |
| 17:24:09 | <geekosaur> | (I run into limits on mine regularly — and from observation I think I have a bit more working memory than usual) |
| 17:24:44 | <monochrom> | The biggest irony and wisdom is that the name of a concurrent system contains the word "sequential" and no mention of "parallel" or "concurrent" or "side by side" or whatever. |
| 17:25:10 | <geekosaur> | "communicating" does imply it though |
| 17:25:17 | <monochrom> | Yes, but it's very indirect. |
| 17:25:25 | <geekosaur> | although I guess it could mean sequential coprocesses |
| 17:25:35 | <monochrom> | You show this name to an English major, they will never guess. |
| 17:27:32 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 17:27:48 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 17:28:45 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:28:47 | × | thevishy quits (~Nishant@2405:201:f005:c007:4ce:a391:7558:6be8) (Quit: Leaving) |
| 17:29:32 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 17:29:48 | <monochrom> | It is also very appealing algebraically. You now have two monoids. The old monoid (since day one) of sequential composition. The new monoid of parallel composition. |
| 17:31:19 | × | max22- quits (~maxime@2a01cb0883359800f8f9901a67fcc4eb.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 17:32:13 | → | max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) |
| 17:32:32 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 17:32:49 | <segfaultfizzbuzz> | why is it "too hard" to have unlimited unstructured concurrency? |
| 17:33:04 | <EvanR> | try to interpret quantum mechanics |
| 17:33:11 | <EvanR> | just kidding, don't try |
| 17:33:14 | <segfaultfizzbuzz> | in other words why not make the minimum assertions about what you need to do and let the computer/compiler figure out how to do everything |
| 17:33:51 | × | fef quits (~thedawn@user/thedawn) (Remote host closed the connection) |
| 17:34:39 | <EvanR> | (actually a model of the real world would be more structured and limited than unlimited unstructed concurrency) |
| 17:34:40 | <segfaultfizzbuzz> | i can barely do one floating point calculation. in fact, i'm not sure i could do a single floating point calculation without error in less than like an hour |
| 17:35:13 | <segfaultfizzbuzz> | we are starting to talk about machines which can do petaflops |
| 17:35:17 | × | Inst quits (~delicacie@2601:6c4:4080:3f80:9d39:f8e3:aac8:5b1b) (Ping timeout: 240 seconds) |
| 17:35:18 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Ping timeout: 250 seconds) |
| 17:35:31 | <EvanR> | yeah they really doubled down on the things they can do fast |
| 17:35:59 | <EvanR> | it's unfortunate that's floats xD |
| 17:36:09 | <segfaultfizzbuzz> | haha okay, then int64 multiplication if you like |
| 17:37:32 | <EvanR> | complexity theory is all about what you could hope to get done doing some simple task over and over as fast as you can |
| 17:37:51 | → | RFV joins (~Thunderbi@49.red-88-12-220.dynamicip.rima-tde.net) |
| 17:38:20 | → | ph88 joins (~ph88@2a02:8109:9e00:71d0:211a:2c49:de73:b7e4) |
| 17:38:25 | <segfaultfizzbuzz> | anyway sorry to distract: so it is true then that threads are locality and sequentiality annotations (and that's either it, or pretty much it)? |
| 17:38:30 | × | zeenk quits (~zeenk@2a02:2f04:a208:c500:649e:b5e2:d15c:7960) (Quit: Konversation terminated!) |
| 17:38:38 | <EvanR> | if the idea is to have the computer do some exponentially complex task it doesn't matter how fast you can multiply |
| 17:38:58 | <segfaultfizzbuzz> | i mostly don't like complexity theory, it is obsessed with perfectly correct results |
| 17:39:11 | <segfaultfizzbuzz> | and doesn't incorporate the realities of distributions and knowledge about distributions |
| 17:39:33 | <segfaultfizzbuzz> | sometimes perfectly correct results are necessary but frequently they are not in order to perform some kind of reasoning |
| 17:39:35 | × | ph88 quits (~ph88@2a02:8109:9e00:71d0:211a:2c49:de73:b7e4) (Client Quit) |
| 17:39:59 | <segfaultfizzbuzz> | i would say more often than not perfect reasoning is unnecessary. that's probably why our minds reason imperfectly |
| 17:40:08 | <EvanR> | targeted controlled incorrectness? xD like interval analysis or something |
| 17:40:42 | <segfaultfizzbuzz> | probably the reverse, correctness annotation or something |
| 17:41:56 | → | ph88 joins (~ph88@2a02:8109:9e00:71d0:f12b:1b26:c11c:e722) |
| 17:44:40 | → | fef joins (~thedawn@user/thedawn) |
| 17:46:21 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:47:44 | × | RFV quits (~Thunderbi@49.red-88-12-220.dynamicip.rima-tde.net) (Quit: RFV) |
| 17:50:38 | → | Akiva joins (~Akiva@user/Akiva) |
| 17:51:49 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4) |
| 17:53:32 | × | pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 250 seconds) |
| 17:54:18 | → | pottsy joins (~pottsy@129.227.183.244) |
| 17:54:51 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:58:28 | → | Tuplanolla joins (~Tuplanoll@91-159-68-166.elisa-laajakaista.fi) |
| 17:58:57 | × | thomas_ quits (~thomas@2a02:a03f:666e:c500:92eb:d341:15bc:3f3d) (Ping timeout: 240 seconds) |
| 18:00:12 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 18:02:07 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 18:03:06 | × | fef quits (~thedawn@user/thedawn) (Remote host closed the connection) |
| 18:04:40 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 18:05:05 | × | dsrt^ quits (~dsrt@50.231.5.242) (Remote host closed the connection) |
| 18:05:22 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 18:05:22 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 18:05:22 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:06:39 | → | WhateverRabbit joins (~rabbit@206.81.18.26) |
| 18:07:04 | × | CHUD quits (~CHUD@edu7879.kent.ac.uk) (Ping timeout: 256 seconds) |
| 18:07:23 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 18:08:28 | × | intersect quits (~ivoolivei@a109-50-190-38.cpe.netcabo.pt) (Quit: Lost terminal) |
| 18:09:57 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 240 seconds) |
| 18:10:31 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 18:12:05 | → | thomas_ joins (~thomas@2a02:a03f:666e:c500:92eb:d341:15bc:3f3d) |
| 18:12:06 | → | haskellberryfinn joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 18:12:24 | → | ravella joins (~ravella@user/ryanavella) |
| 18:13:26 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 250 seconds) |
| 18:13:39 | × | thomas_ quits (~thomas@2a02:a03f:666e:c500:92eb:d341:15bc:3f3d) (Client Quit) |
| 18:15:30 | → | [_] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 18:15:40 | × | [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 18:15:53 | → | haask joins (~askham@user/haask) |
| 18:16:35 | → | Gurkenglas joins (~Gurkengla@dslb-090-186-104-244.090.186.pools.vodafone-ip.de) |
| 18:16:54 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 250 seconds) |
| 18:20:59 | × | alp quits (~alp@user/alp) (Ping timeout: 250 seconds) |
| 18:23:29 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 18:28:09 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 18:28:10 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Ping timeout: 250 seconds) |
| 18:28:48 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 18:28:52 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 18:32:34 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 18:32:35 | → | burnsidesLlama joins (~burnsides@dhcp168-030.wadham.ox.ac.uk) |
| 18:33:04 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 18:34:57 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 18:39:53 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 18:41:43 | → | econo joins (uid147250@user/econo) |
| 18:42:40 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 18:43:07 | → | ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) |
| 18:46:05 | × | haask quits (~askham@user/haask) (Remote host closed the connection) |
| 18:46:31 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 18:48:52 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 18:51:08 | × | lionhairdino quits (~jacoo@121.131.39.82) (Ping timeout: 250 seconds) |
| 18:51:20 | × | mason0 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout)) |
| 18:51:42 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 18:52:08 | → | coot joins (~coot@213.134.190.95) |
| 18:52:51 | → | neceve joins (~quassel@2.26.93.228) |
| 18:52:52 | × | coot quits (~coot@213.134.190.95) (Read error: Connection reset by peer) |
| 18:53:06 | → | coot joins (~coot@213.134.190.95) |
| 18:55:03 | → | alp joins (~alp@user/alp) |
| 18:59:46 | → | Akiva joins (~Akiva@user/Akiva) |
| 19:04:00 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds) |
| 19:04:32 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 19:05:50 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 19:07:58 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 19:08:14 | × | alp quits (~alp@user/alp) (Read error: Connection reset by peer) |
| 19:08:34 | → | alp joins (~alp@user/alp) |
| 19:09:55 | × | jkaye quits (~jkaye@2601:281:8300:7530:ca78:9af1:544b:8917) (Quit: Leaving) |
| 19:21:13 | → | dsrt^ joins (~dsrt@50.231.5.242) |
| 19:22:47 | → | vicfred joins (~vicfred@user/vicfred) |
| 19:26:37 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 240 seconds) |
| 19:31:55 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 19:38:48 | × | dsrt^ quits (~dsrt@50.231.5.242) (Ping timeout: 250 seconds) |
| 19:39:18 | → | dsrt^ joins (~dsrt@50.231.5.242) |
| 19:40:16 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Remote host closed the connection) |
| 19:40:25 | → | briandaed joins (~root@185.234.208.208.r.toneticgroup.pl) |
| 19:43:04 | → | ymirhotfoot joins (~ymirhotfo@user/ymirhotfoot) |
| 19:44:35 | × | ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection) |
| 19:44:56 | → | ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) |
| 19:47:17 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 19:49:10 | × | ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection) |
| 19:49:30 | → | ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) |
| 19:49:39 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 19:52:37 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 19:54:08 | → | neurocyte0917090 joins (~neurocyte@IP-195080053136.dynamic.medianet-world.de) |
| 19:54:08 | × | neurocyte0917090 quits (~neurocyte@IP-195080053136.dynamic.medianet-world.de) (Changing host) |
| 19:54:08 | → | neurocyte0917090 joins (~neurocyte@user/neurocyte) |
| 19:54:10 | × | ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Ping timeout: 256 seconds) |
| 19:54:54 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 20:02:19 | ← | ymirhotfoot parts (~ymirhotfo@user/ymirhotfoot) () |
| 20:02:35 | → | MoC joins (~moc@user/moc) |
| 20:02:40 | → | haskellb1 joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 20:04:46 | → | ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) |
| 20:04:57 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 240 seconds) |
| 20:05:51 | → | leibniz joins (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) |
| 20:07:19 | → | juhp joins (~juhp@128.106.188.82) |
| 20:09:28 | × | ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Ping timeout: 256 seconds) |
| 20:13:41 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 20:14:10 | → | coot joins (~coot@213.134.190.95) |
| 20:16:31 | → | dextaa_ joins (~dextaa@217.61.225.120) |
| 20:17:26 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 20:18:37 | × | coot quits (~coot@213.134.190.95) (Ping timeout: 240 seconds) |
| 20:18:57 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 20:21:36 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Quit: WeeChat 3.4) |
| 20:22:20 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 20:28:32 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 20:28:42 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Quit: WeeChat 2.2-dev) |
| 20:32:50 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 20:32:52 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 20:32:54 | × | leibniz quits (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) (Quit: Connection closed) |
| 20:33:21 | → | mbomba joins (~mbomba@bras-base-toroon2719w-grc-37-142-114-121-181.dsl.bell.ca) |
| 20:33:58 | → | vysn joins (~vysn@user/vysn) |
| 20:34:38 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 20:35:04 | × | mbomba quits (~mbomba@bras-base-toroon2719w-grc-37-142-114-121-181.dsl.bell.ca) (Client Quit) |
| 20:43:42 | → | arjun joins (~arjun@user/arjun) |
| 20:44:41 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 20:47:18 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:a000:a9ef:8cb1:3f34:9694) (Read error: Connection reset by peer) |
| 20:47:21 | × | nunggu quits (~q@user/nunggu) (Ping timeout: 276 seconds) |
| 20:48:14 | × | FroskyArr quits (~froskyarr@120.239.9.162) (Quit: Leaving) |
| 20:48:55 | → | nunggu joins (~q@user/nunggu) |
| 20:49:56 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 20:53:12 | → | coot joins (~coot@213.134.190.95) |
| 20:54:11 | × | haskellb1 quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Read error: Connection reset by peer) |
| 20:54:43 | <maerwald> | why does '-Wno-endif-labels' not work? |
| 20:55:58 | <geekosaur> | ? |
| 20:56:12 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 20:56:17 | <maerwald> | maybe that's the preprocessor |
| 20:56:48 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 250 seconds) |
| 20:57:00 | → | notzmv joins (~zmv@user/notzmv) |
| 20:57:05 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Client Quit) |
| 21:00:40 | <geekosaur> | you'd probably have to use an option to pass it to cpp. maybe -WP,-Wno-endif-labels but I can't find the list of those options right off the top of my head |
| 21:01:22 | <geekosaur> | worry it's -optP -Wno-endif-labels |
| 21:01:27 | <geekosaur> | wrong program… |
| 21:02:02 | → | zincy joins (~zincy@2a00:23c8:970c:4801:f0bc:c4cb:1665:1c67) |
| 21:02:49 | <geekosaur> | may require an explicit -cpp, not just -XCPP |
| 21:03:00 | <geekosaur> | *sorry |
| 21:03:59 | <maerwald> | yeah, I gave up on that |
| 21:04:03 | <maerwald> | :D |
| 21:05:58 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 260 seconds) |
| 21:07:50 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 21:07:54 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 21:09:04 | × | _ht quits (~quassel@2a02:a468:b619:1:fb02:7b89:e577:dc30) (Remote host closed the connection) |
| 21:11:57 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 21:14:12 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 21:14:43 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Remote host closed the connection) |
| 21:16:26 | × | Topsi quits (~Tobias@dyndsl-091-249-083-234.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 21:16:37 | × | romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4) |
| 21:18:13 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4) |
| 21:24:22 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Quit: ERC (IRC client for Emacs 27.1)) |
| 21:26:35 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 21:28:09 | → | coot joins (~coot@213.134.190.95) |
| 21:28:28 | × | pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 250 seconds) |
| 21:30:57 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 21:33:11 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 21:34:56 | × | jao quits (~jao@static-68-235-44-73.cust.tzulo.com) (Ping timeout: 250 seconds) |
| 21:36:36 | → | alx741 joins (~alx741@157.100.197.240) |
| 21:37:09 | → | jao joins (~jao@static-68-235-44-10.cust.tzulo.com) |
| 21:39:30 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 21:40:45 | → | alMalsamo joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 21:41:15 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 21:42:47 | × | fendor_ quits (~fendor@77.119.199.145.wireless.dyn.drei.com) (Remote host closed the connection) |
| 21:42:53 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 21:43:10 | × | max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Remote host closed the connection) |
| 21:44:01 | → | max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) |
| 21:44:58 | → | alx741 joins (~alx741@157.100.197.240) |
| 21:46:32 | × | ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!) |
| 21:47:12 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 21:47:18 | × | alx741 quits (~alx741@157.100.197.240) (Client Quit) |
| 21:48:04 | <tomsmeding> | maerwald: dealing with some esoteric code? |
| 21:48:28 | <maerwald> | no, just wanted to tell myself where the ifdef ends |
| 21:48:43 | <maerwald> | #endif // Foo |
| 21:48:50 | <maerwald> | it starts throwing warnings |
| 21:48:52 | <tomsmeding> | gcc manpage says that they "should be in comments" |
| 21:48:54 | <tomsmeding> | really? |
| 21:49:13 | <tomsmeding> | the manpage claims that it warns if it's _not_ in a comment, and that it should be in a comment |
| 21:49:19 | <geekosaur> | you do realize // is not a C comment? (unless you declare a recent enough C standard I think) |
| 21:49:20 | <tomsmeding> | or is this not gcc |
| 21:49:51 | <geekosaur> | it's a C++ comment. /* ... */ is a C comment |
| 21:50:46 | × | arjun quits (~arjun@user/arjun) (Remote host closed the connection) |
| 21:50:55 | <tomsmeding> | geekosaur: gcc accepts it starting with -std=c99; -std=c90 rejects it |
| 21:52:25 | <geekosaur> | right but I think we run cpp in -traditional so it doesn't mess things up |
| 21:52:37 | <geekosaur> | which means no -std |
| 21:53:04 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 21:53:05 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 21:53:05 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:53:12 | <geekosaur> | (being unable to do this with clang is why you have to be careful with CPP on Macs) |
| 21:55:39 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:56:36 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
| 22:01:26 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:03:17 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 22:05:18 | × | briandaed quits (~root@185.234.208.208.r.toneticgroup.pl) (Remote host closed the connection) |
| 22:05:28 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 22:05:30 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 22:06:02 | × | haskellberryfinn quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Quit: WeeChat 2.8) |
| 22:09:00 | <ProfSimm> | What's the difference between an imperative program and the IO monad / do notation |
| 22:09:37 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 22:09:44 | → | Guest76 joins (~Guest76@a109-50-190-38.cpe.netcabo.pt) |
| 22:11:00 | <Guest76> | is someone willing to discuss some curry/uncurry laws? |
| 22:11:28 | <monochrom> | I may be able to discuss some curry and uncurry laws. |
| 22:11:38 | <monochrom> | Depends on what you really mean. |
| 22:11:49 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 22:12:40 | <polyphem> | ProfSimm: main :: IO () is a pure value wheras void main is actuall code |
| 22:13:01 | <Guest76> | first, i was looking for some information about applying curry function to a 3 variable scenario, like: function a b c |
| 22:13:54 | <Guest76> | but i ended up applying it 2 times so it becomes, curry(curry( function((a,b),c) )) |
| 22:14:28 | <monochrom> | Sure, the standard library "curry" function handles 2 only. |
| 22:15:07 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 22:15:07 | <monochrom> | Haskell type system is not flexible at all about "n-ary for arbitrary n". |
| 22:15:39 | → | alp joins (~alp@user/alp) |
| 22:15:44 | <Guest76> | the goal of this exercise was to make some pointwise function into point free |
| 22:15:45 | <ProfSimm> | polyphem: it's a pure value but I mean it's technically the source code to an imperative program. |
| 22:16:13 | <maerwald> | what is an imperative program? |
| 22:16:39 | <Guest76> | if i have uncurry(function1 . function2 . function3) . swap = curry(curry( function((a,b),c) )) |
| 22:16:44 | <monochrom> | I recommend working on one specific concrete exercise rather than premature idle wondering about gross generality. |
| 22:17:30 | <Guest76> | could i apply something to cut some curry/uncurry |
| 22:18:02 | <Guest76> | could i pm you? |
| 22:18:07 | <monochrom> | No. |
| 22:18:24 | <maerwald> | :'( |
| 22:18:40 | <monochrom> | I don't understand "uncurry(function1 . function2 . function3) . swap = curry(curry( function((a,b),c) ))". |
| 22:19:01 | <Guest76> | i see, i see |
| 22:19:07 | <monochrom> | I understand the RHS. I think I understand the LHS. I don't understand why you get to assume they are equal. |
| 22:19:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Ping timeout: 240 seconds) |
| 22:19:35 | <monochrom> | I am not even convinced they have compatible types. |
| 22:19:50 | <Guest76> | hum... i see what you are saying |
| 22:20:00 | × | deadmarshal quits (~deadmarsh@95.38.119.169) (Ping timeout: 256 seconds) |
| 22:20:06 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 22:20:34 | × | neceve quits (~quassel@2.26.93.228) (Ping timeout: 256 seconds) |
| 22:21:37 | <monochrom> | If you want to bridge the gap between "f (a,b,c)" and "g a b c", the simplest way is to define your own 3-ary version of curry3 and uncurry3, rather than trying to shoehorn into curry and uncurry. |
| 22:22:11 | <Guest76> | that was my inicial idea |
| 22:22:25 | <polyphem> | ProfSimm: if you understand that an imperative programming style results from an abstraction away from hardware , haskells IO monad is still based on lamda calculus i.e term rewriting , even if do notation "emulates" the feeling of imerativity |
| 22:22:26 | <Guest76> | but for the sake of this academic exercise i don't think is the point |
| 22:22:51 | <monochrom> | Where can I see "this exercise"? |
| 22:23:44 | <ProfSimm> | polyphem: well it not only emulates the feeling of it, but the operation of it, doesn't it |
| 22:24:23 | <Gurkenglas> | :k (->) -- should be *^op -> * -> * :( |
| 22:24:24 | <lambdabot> | * -> * -> * |
| 22:24:47 | <polyphem> | ProfSimm: that's why some say haskell is the "best" imperative language :) |
| 22:25:54 | → | coot joins (~coot@213.134.190.95) |
| 22:26:42 | × | chomwitt quits (~chomwitt@2a02:587:dc16:6e00:12c3:7bff:fe6d:d374) (Remote host closed the connection) |
| 22:26:43 | <polyphem> | ProfSimm: Monads in haskell give you sequencing of actions , i.e a timeline on wich you can chain your actions, whereas pure code has no timly order of execution |
| 22:27:32 | <monochrom> | I agree with maerwald about "which kind of imperative do you have in mind?" |
| 22:27:53 | × | coot quits (~coot@213.134.190.95) (Client Quit) |
| 22:28:06 | × | zincy quits (~zincy@2a00:23c8:970c:4801:f0bc:c4cb:1665:1c67) (Remote host closed the connection) |
| 22:28:10 | <monochrom> | Because sometimes it just means mutable state, some other times it just means I/O, and some other times it means both, and some other times something else entirely. |
| 22:28:54 | → | coot joins (~coot@213.134.190.95) |
| 22:29:01 | <ProfSimm> | monochrom: well it means "time" first, as you noted. Order of cause and effect, and change. Hence mutability. This then allows side-effects as... a side-effect. |
| 22:29:02 | <Guest76> | monochrom it's a rather lengthy page written in portuguese, but its basically a function written in point-wise notation that i have to "translate" in to point-free |
| 22:29:07 | <Guest76> | ty for the help anyways |
| 22:29:16 | <tomsmeding> | @pl \x y z -> f z x y |
| 22:29:16 | <lambdabot> | flip . flip f |
| 22:29:53 | <polyphem> | i guess ProfSimm means imperative in sense of tickyticky execution , telleing the computer what steps to take , step by step , right ProfSimm ? |
| 22:29:56 | <monochrom> | I won't play along with talking in the generality void. |
| 22:30:25 | <monochrom> | And I won't play along with the querent providing zero information and expecting me to give an infinitely informative lecture. |
| 22:31:00 | <geekosaur> | I do not see what pointfree has to do with currying |
| 22:31:08 | <geekosaur> | in this instance |
| 22:31:47 | <tomsmeding> | @pl \a b c d e -> f (a, (b, (c, (d, e)))) |
| 22:31:47 | <lambdabot> | ((((f .) .) .) .) . (. ((. ((. (,)) . (.) . (,))) . (.) . (.) . (,))) . (.) . (.) . (.) . (,) |
| 22:32:08 | <monochrom> | I know someone here who used to do that. But that's when they were unemployed. |
| 22:32:32 | × | vglfr quits (~vglfr@46.96.142.183) (Ping timeout: 240 seconds) |
| 22:33:26 | <Guest76> | just a student here, probably don't know what i should be asking, sorry y'all |
| 22:33:51 | <monochrom> | You could actually post an actual exercise. |
| 22:34:41 | <monochrom> | "I have f x y = x, how to rewrite it in pointfree form" is not hard to type in. |
| 22:35:41 | <maerwald> | polyphem: well, *execution* is all imperative, even in Haskell |
| 22:36:33 | <Guest76> | it goes like this: |
| 22:36:33 | <Guest76> | data X u i = XLeaf u | Node i (X u i) (X u i) deriving Show |
| 22:36:34 | <Guest76> | x2html :: X (Unit String String) (Mode Double) -> (Double, Double) -> String |
| 22:36:34 | <Guest76> | x2html (XLeaf (Image i)) (w,h)= img w h i |
| 22:36:34 | <Guest76> | x2html (XLeaf (Text txt)) _ = txt |
| 22:36:35 | <Guest76> | x2html (Node (Vt i) x1 x2) (w,h) = htab w h ( |
| 22:36:36 | <Guest76> | tr( td w (h*i) (x2html x1 (w, h*i))) ++ |
| 22:36:36 | <Guest76> | tr( td w (h*(1-i)) (x2html x2 (w, h*(1-i)))) |
| 22:36:36 | <Guest76> | ) |
| 22:36:37 | <Guest76> | x2html (Node (Hl i) x1 x2) (w,h) = htab w h ( |
| 22:36:37 | <Guest76> | tr( td (w*i) h (x2html x1 (w*i, h)) ++ |
| 22:36:38 | <Guest76> | td (w*(1-i)) h (x2html x2 (w*(1-i), h))) |
| 22:36:38 | <Guest76> | ) |
| 22:36:39 | <Guest76> | x2html (Node (Vb i) x1 x2) m = x2html (Node (Vt (1 - i)) x1 x2) m |
| 22:36:40 | <Guest76> | x2html (Node (Hr i) x1 x2) m = x2html (Node (Hl (1 - i)) x1 x2) m |
| 22:36:47 | <tomsmeding> | pff |
| 22:37:13 | <tomsmeding> | also |
| 22:37:14 | <tomsmeding> | @where paste |
| 22:37:14 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 22:37:23 | <EvanR> | the sense of time is still there in non-IO computations, when there is unavoidable data dependency on some other thing of the thing you actually want |
| 22:37:40 | × | LiaoTao_ quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 22:37:40 | <EvanR> | one thing must be computed before the other |
| 22:37:57 | <EvanR> | which is why Tardis can only go so far |
| 22:37:57 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 22:38:49 | <EvanR> | laziness is good because when the data dependency isn't there, you aren't limited to an artificial ordering |
| 22:38:52 | <monochrom> | That one is very difficult to convert to pointfree. |
| 22:39:32 | <tomsmeding> | impossible without a helper function that gets the field from an XLeaf, in fact |
| 22:39:52 | <EvanR> | similarly, in IO code, you aren't always limited to an artificial ordering either, see that applicative interface for doing web requests in parallel and operating on the result when / if the components are ready |
| 22:39:58 | <polyphem> | EvanR: yes implicit data dependencies order the evaluation also in pure code, but monad the data dependency is made explicit with >>= |
| 22:39:58 | <monochrom> | I have trouble believing that any reasonable teacher actually wants it. |
| 22:40:17 | <Guest76> | we have one of the best in the field, i belive |
| 22:40:42 | <EvanR> | I guess here we are again forgetting that IO's monadness is tangential esp when considering IO Applicative xD |
| 22:41:49 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 22:42:13 | <monochrom> | Well, the alternative hypothesis is that the student completely misunderstands the homework question. |
| 22:42:15 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 22:42:37 | <monochrom> | Actually extremely high probability given the selection bias. |
| 22:42:46 | <maerwald> | I feel like I'm in a monad tutorial again |
| 22:42:51 | <maerwald> | please NO |
| 22:42:54 | <ephemient> | a perspective: https://conal.net/blog/posts/the-c-language-is-purely-functional - CPP produces C that can be executed sequentially. Haskell produces IO () that can be executed sequentially. |
| 22:43:13 | <EvanR> | I love that post |
| 22:43:36 | <Guest76> | monochrom very high probability indeed, i can assure you ahah |
| 22:45:59 | <polyphem> | ephemient: is the conal.net post down ? |
| 22:46:16 | <EvanR> | conal.net is down : ( |
| 22:46:18 | <Guest76> | i could link the hashlab page, but like i said it is in Portuguese |
| 22:46:36 | × | michalz quits (~michalz@185.246.204.61) (Remote host closed the connection) |
| 22:46:46 | <Guest76> | monochrom ty for your time, sorry to waste it |
| 22:46:48 | <ephemient> | hmm. www.conal.net is up, but my browser "helpfully" copied conal.net without www |
| 22:47:17 | <ephemient> | also http works I guess? |
| 22:47:38 | <monochrom> | Also s/https/http/ |
| 22:47:41 | <polyphem> | http://conal.net/blog/posts/the-c-language-is-purely-functional |
| 22:47:58 | <EvanR> | ah |
| 22:48:12 | <monochrom> | I know some people or software that "helpfully" replace http by https as if I needed it. |
| 22:49:01 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) (Remote host closed the connection) |
| 22:50:32 | <ProfSimm> | polyphem: we're talking about time and change and causality and effect, but actually imperial code doens't strictly run sequentially. |
| 22:50:35 | <codolio> | Note that from the summary, you can tell that the headline is completely false. |
| 22:50:49 | <maerwald> | imperial code? |
| 22:50:50 | <ProfSimm> | polyphem: so actually representing it as a monad which can only apply it sequentially is detrimental |
| 22:50:52 | codolio | is now known as dolio |
| 22:51:09 | <ProfSimm> | maerwald: also imperative * |
| 22:51:14 | <ProfSimm> | :P |
| 22:51:24 | <monochrom> | I won't mind "imperial". "emperor" used to begin as "imperator". :) |
| 22:51:27 | <EvanR> | but Applicative potentially supports parallel |
| 22:51:34 | <ProfSimm> | nais |
| 22:51:50 | <EvanR> | a plus 1 over monads in that sense |
| 22:52:25 | <maerwald> | that's just an old facebook hack that probably is not even a good idea |
| 22:52:50 | <EvanR> | applicative is one way to express a parallel composition in e.g. a hardware circuit |
| 22:53:05 | <EvanR> | compiling to categories |
| 22:53:14 | <monochrom> | Haskell is a republic programming language >:) |
| 22:54:00 | <Benzi-Junior> | hey, I'm having a little problem with xmobar under debian, |
| 22:54:51 | <Benzi-Junior> | when I try to build with a xmobar.hs config it doesnt find the module xmobar |
| 22:57:35 | × | Tuplanolla quits (~Tuplanoll@91-159-68-166.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:58:17 | <EvanR> | I too would like to come up with a joke pertaining to "imperial code" but just can't |
| 22:59:19 | <monochrom> | Try to make a Star Wars joke/reference :) |
| 23:00:19 | <monochrom> | Why do Darth Vader's stormtroopers always miss? Because they're following buggy imperial code. :) |
| 23:01:26 | <monochrom> | Why does Palpatine say that the dark side is more powerful? Because he thinks assmebly language is more powerful than Haskell. :) |
| 23:02:02 | <EvanR> | if programming languages were star wars characters |
| 23:03:06 | <monochrom> | Yoda would be Agda. :) |
| 23:03:19 | <EvanR> | not forth ? |
| 23:03:47 | <dsal> | Mike Tyson uses the forth. |
| 23:03:53 | <pfurla-matrix> | Javascript are the prequel movies |
| 23:03:53 | <monochrom> | haha |
| 23:03:54 | <geekosaur> | Benzi-Junior, try in #xmonad |
| 23:03:54 | <EvanR> | also later yoda was upgraded to actually be able to do stuff |
| 23:04:20 | <polyphem> | javascript would be c3po |
| 23:04:27 | <pfurla-matrix> | who runs Agda code anyways? |
| 23:04:38 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 23:04:57 | <pfurla-matrix> | Javascript would be c3po in pieces |
| 23:05:05 | <pfurla-matrix> | Typescript would be c3po reassembled by Chewie |
| 23:05:08 | <dsal> | r2d2 speaks bf |
| 23:05:21 | <EvanR> | oh god i was kidding |
| 23:05:38 | <monochrom> | "what have I done?" :) |
| 23:06:22 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 260 seconds) |
| 23:07:54 | <byorgey> | "The C ADT is implemented simply as String (or char *, for you type theorists, using a notation from Kleene)" lol |
| 23:08:19 | <Guest76> | monochrom ,about my question earlier, tomsmeding was right, i was missing an out function for the XLeaf type that i need in order to continue with the exercise |
| 23:08:32 | × | alp quits (~alp@user/alp) (Ping timeout: 250 seconds) |
| 23:08:40 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 23:08:40 | × | Null_A quits (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) (Remote host closed the connection) |
| 23:08:54 | → | Null_A joins (~null_a@2601:645:8700:2290:8935:4edf:b32:6553) |
| 23:08:59 | <monochrom> | Oh haha the "char *" comment is golden. |
| 23:09:03 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 23:09:10 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:41be:eda7:26bd:771e) |
| 23:09:18 | → | little_mac_ joins (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) |
| 23:09:25 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:4184:bb26:81f2:501e) (Remote host closed the connection) |
| 23:09:27 | <EvanR> | sadly I can't go to the old C channel and assert that that is what char* means as if I was serious |
| 23:09:53 | <EvanR> | they would lose their shit |
| 23:10:11 | <monochrom> | But you can go to C++ channels and Java channels to tell them that C gets it right >:) |
| 23:10:50 | <EvanR> | next up, char[] is modal logic |
| 23:11:02 | <monochrom> | ooohhhh fancy! |
| 23:12:12 | <EvanR> | (yoda is forth because he puts all his verbs at the end, not because of some lame "may the forth" crap) |
| 23:12:21 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 23:12:23 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 23:12:23 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 23:12:23 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:13:37 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 23:13:55 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds) |
| 23:16:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 23:17:50 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds) |
| 23:22:46 | × | max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Remote host closed the connection) |
| 23:25:48 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 23:28:00 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 256 seconds) |
| 23:28:44 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 23:29:34 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 23:29:47 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 23:44:40 | <jackdk> | what do modal logics correspond to in type systems? if propositional logic corresponds to STLC, what does K correspond to? |
| 23:45:07 | <ski> | it has been associated with staged computation |
| 23:45:43 | <monochrom> | There is a model operator that enjoys a "[] ([] X) -> [] X" laws. It may be a monad. |
| 23:46:05 | <dolio> | That one is a comonad. |
| 23:46:19 | <ski> | Löb's theorem |
| 23:46:42 | <lyxia> | Does anyone know a proof of "phantom = fmap f" ? for phantom :: (Functor f, Contravariant f) => f a -> f b (cf. Data.Functor.Contravariant for the claim) |
| 23:46:45 | × | Cale quits (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 23:46:57 | <ski> | oh sorry, that'd be `[] ([] X -> X) -> [] X' |
| 23:47:16 | <lyxia> | ideally with a free theorem... |
| 23:47:26 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 23:47:49 | <dolio> | The Löb one is neither, I think. |
| 23:48:45 | <monochrom> | Wait, so f is both a covariant functor and a contravariant functor? |
| 23:49:18 | <monochrom> | What is "f" in "fmap f"? |
| 23:49:38 | <monochrom> | Ironically, I was just writing about "var not in scope" in a tutorial on type inference >:) |
| 23:50:41 | <monochrom> | Oh, true for all f. |
| 23:51:16 | <lyxia> | oh yeah, sorry for the name reuse |
All times are in UTC on 2022-01-27.