Logs on 2022-04-27 (liberachat/#haskell)
| 00:02:21 | <Guest91> | Hrm, I will try that if anyone squawks a lot. But one is a package that the instructor wrote and which looks like it needs updating, so I think I can potentially use this as a prod. |
| 00:03:48 | <geekosaur> | mm, right, if it's a different ghc version that won't fly |
| 00:04:16 | <geekosaur> | thought you meant stuff like base or ghc-prim you can't rebuild, you can only copy |
| 00:05:50 | <Guest91> | Ah, no, none of those. And at least two of them look like they might be abandoned dependencies for other things, not in direct use. |
| 00:07:21 | × | jhagborg quits (~jhagborg@068-187-237-099.res.spectrum.com) (Ping timeout: 276 seconds) |
| 00:08:10 | <dons> | morning all. |
| 00:08:16 | <jackdk> | morning dons. |
| 00:08:32 | <sclv> | mornin |
| 00:10:45 | × | Guest91 quits (~Guest91@caliga.eecs.tufts.edu) (Quit: Client closed) |
| 00:18:03 | <geekosaur> | o/ |
| 00:18:56 | → | lis joins (~quassel@lis.moe) |
| 00:19:10 | <Axman6> | o/ |
| 00:20:14 | × | anomal quits (~anomal@87.227.196.109) (Remote host closed the connection) |
| 00:22:26 | × | stackdroid18 quits (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
| 00:24:14 | × | xff0x_ quits (~xff0x@om126167099166.29.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 00:32:19 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 240 seconds) |
| 00:32:25 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:32:25 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:32:25 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:32:43 | → | xkuru joins (~xkuru@user/xkuru) |
| 00:38:23 | → | jhagborg joins (~jhagborg@068-187-237-099.res.spectrum.com) |
| 00:39:25 | <exarkun> | does (=<<) have a common name |
| 00:39:53 | <Bulby[m]> | extend? |
| 00:40:19 | <hpc> | (>>=) is "bind", so i would probably say "flip bind" |
| 00:40:43 | <geekosaur> | Bulby[m], extend is something else |
| 00:40:46 | <hpc> | honestly, the way i say most haskell stuff out loud is "i need a whiteboard" |
| 00:40:56 | <geekosaur> | ^ |
| 00:41:06 | <Bulby[m]> | always mix them up |
| 00:41:06 | <Bulby[m]> | oh that's monad, not the dual of monadd |
| 00:41:08 | <exarkun> | hpc: :) |
| 00:41:09 | → | off^ joins (~off@50.227.69.228) |
| 00:41:22 | <geekosaur> | right, it's just flipped (>>=), not comonad |
| 00:42:48 | <Bulby[m]> | what are comands again |
| 00:43:35 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 00:45:32 | <Axman6> | @hoogle Comonad |
| 00:45:33 | <lambdabot> | module Control.Comonad |
| 00:45:33 | <lambdabot> | Control.Comonad class Functor w => Comonad w |
| 00:45:33 | <lambdabot> | module Rebase.Control.Comonad |
| 00:46:07 | <Bulby[m]> | not helpful... please define it in english |
| 00:46:23 | <Axman6> | ok, just hold on a second there champ |
| 00:47:16 | <Axman6> | @hoogle (=>>) |
| 00:47:16 | <lambdabot> | Control.Comonad (=>>) :: Comonad w => w a -> (w a -> b) -> w b |
| 00:47:16 | <lambdabot> | Rebase.Prelude (=>>) :: Comonad w => w a -> (w a -> b) -> w b |
| 00:47:16 | <lambdabot> | Language.Fixpoint.Misc (=>>) :: Monad m => m b -> (b -> m a) -> m b |
| 00:48:00 | <Axman6> | https://hackage.haskell.org/package/comonad-5.0.8/docs/Control-Comonad.html |
| 00:48:38 | <Bulby[m]> | i mean that is extreme technically speak to me |
| 00:48:46 | <EvanR> | comonads are like space suits at a nightclub |
| 00:48:50 | <Bulby[m]> | s/technically/technical/ |
| 00:48:53 | <Bulby[m]> | WHAT |
| 00:49:07 | <EvanR> | not to be confused with burritos |
| 00:49:16 | <Axman6> | yeah that's the most accurate answer, particularly if you're going to be so rude |
| 00:49:29 | × | gurkenglas quits (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 246 seconds) |
| 00:49:31 | <Bulby[m]> | oops |
| 00:49:45 | → | vonfry joins (~user@139.227.167.170) |
| 00:49:50 | <Bulby[m]> | yeah saying "not helpful" is rude 😓 |
| 00:49:55 | <Axman6> | it sure is |
| 00:49:59 | × | lis quits (~quassel@lis.moe) (Quit: lis) |
| 00:50:08 | → | lis joins (~quassel@lis.moe) |
| 00:50:23 | <Bulby[m]> | oh well. i'll see if i can find some blog post about it |
| 00:50:25 | <Axman6> | partricularly when you are perfectly capable of using Google or your search engione of choice instead of demending others explain topics to you |
| 00:50:36 | <exarkun> | Bulby[m]: An answer isn't intrinsically helpful or not. It might be helpful to you, or not. You might explain what you don't understand about it. |
| 00:50:59 | → | dostoevsky joins (~5c42c5384@user/dostoevsky) |
| 00:51:04 | <Bulby[m]> | ah |
| 00:51:26 | <EvanR> | this metadiscussion may indicate no one has a good explanation of comonads in a macro right now |
| 00:51:34 | <Bulby[m]> | those answers weren't insightful because they were just type signatures - I would like an explanation of a concept |
| 00:51:50 | lis | is now known as lisq |
| 00:51:59 | <exarkun> | Some might say that the type signatures fully encapsulate the concept. |
| 00:52:05 | <Axman6> | They weren't answers to your question, they were me looking to find where the code is that contains the answers |
| 00:52:11 | <EvanR> | they are similar to monads in that they at their heart an algebraic concept made of signatures and laws |
| 00:52:26 | <Bulby[m]> | well I am not fully trained in reading type signatures 😅 |
| 00:52:32 | <EvanR> | and not something which works by analogy, as hilarious as the nightclub post was |
| 00:52:38 | <Axman6> | then you may not be ready to understand comonads |
| 00:53:11 | <Bulby[m]> | you're right I only half grasp a lot of concepts.... not really "grok" it |
| 00:53:17 | <EvanR> | one way to get closer to an abstract idea is to look at examples, of which there are not many for comonads (in haskell) |
| 00:54:13 | <EvanR> | example 1 is the Store comonad which is a data structure paid with a pointer into the structure |
| 00:54:34 | <EvanR> | example 2 is an infinite stream |
| 00:54:40 | <Axman6> | NonEmpty is probably the first interesting instance people run into |
| 00:55:03 | <EvanR> | s/paid/paired/ |
| 00:55:08 | <Bulby[m]> | what about an empty list makes it not a comonad |
| 00:55:22 | <Axman6> | can you write extract :: [a] -> a? |
| 00:55:31 | <Bulby[m]> | oh |
| 00:55:37 | <EvanR> | the normal list type can't be a comonad |
| 00:55:37 | <Bulby[m]> | i see |
| 00:55:55 | <Bulby[m]> | NonEmpty is the thing constructed with :| right |
| 00:56:14 | <EvanR> | since empty is possible and stops you from implementing extract. Something other languages might cheat at and return null, breaking the abstraction |
| 00:56:22 | <Axman6> | how about you have a go at writing the Comonad instance for NonEmpty - extract :: NonEmpty a -> a shoiuld be easy |
| 00:56:28 | <Bulby[m]> | WE HATE NULL |
| 00:56:44 | <geekosaur> | we don't hate it, we just make it announce itself with Maybe |
| 00:56:49 | <Axman6> | duplicate :: NonEmpty a -> NonEmpty (NonEmpty a) is more interesting, there's many functions with that type |
| 00:56:56 | <geekosaur> | instead of just popping up out of nowhere |
| 00:57:04 | <Bulby[m]> | Axman6: obviously would be head (or the non empty equivilant) |
| 00:57:11 | <Bulby[m]> | geekosaur: maybe is amazing |
| 00:57:17 | <Bulby[m]> | which is why rust is also amazing |
| 00:57:20 | <Bulby[m]> | no null |
| 00:57:23 | <Bulby[m]> | but option |
| 00:57:24 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 276 seconds) |
| 00:57:42 | <EvanR> | i wish people would steal more stuff from haskell than just Maybe xD |
| 00:57:59 | <Bulby[m]> | \o/ yes |
| 00:58:16 | <Axman6> | like a decent type system |
| 00:58:36 | <EvanR> | is haskell the treasure cave in alladin, and Maybe is the magic lamp you should touch nothing but |
| 00:58:45 | <monochrom> | heh |
| 00:58:57 | <Bulby[m]> | Axman6: (NonEmpty a) = [a] : [] ? |
| 00:59:01 | <Bulby[m]> | oops |
| 00:59:08 | <Bulby[m]> | pretend that's a :| |
| 00:59:14 | <Axman6> | data But = But; lamp = Nothing :: Maybe But |
| 00:59:17 | <monochrom> | I don't even hate partial functions, really. |
| 00:59:54 | <monochrom> | But yeah null is more annoying than partial functions. |
| 00:59:55 | <Axman6> | duplicate (a :| xs) = ? :| ?? |
| 01:00:15 | <monochrom> | OK, I feel that way, but I guess it's subjective. |
| 01:00:43 | <jackdk> | Lenses. They should definitely steal lenses (and the other optics). |
| 01:00:51 | <EvanR> | partial functions would be cool if they were guaranteed to crash not loop |
| 01:01:03 | <Axman6> | yeah oop dot syntax is so limited |
| 01:01:35 | <jackdk> | I remember writing ruby years ago, and wanting a function `hget :: k -> Map k v -> v`. When I discovered lens, it was like I'd finally found what I was looking for, implemented by people who thought about the problem thoroughly. |
| 01:01:37 | <monochrom> | Although, recently on discourse a beginner was wondering why head is not [a] -> [a]. They might be thinking straight actually. :) |
| 01:02:25 | <EvanR> | [a] is Maybe on ACID |
| 01:02:35 | → | Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com) |
| 01:02:49 | <Axman6> | not sure how durable it is EvanR |
| 01:02:52 | <EvanR> | lol |
| 01:03:12 | <EvanR> | based |
| 01:03:27 | × | mmhat quits (~mmh@55d4c7b7.access.ecotel.net) (Quit: WeeChat 3.5) |
| 01:10:23 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 256 seconds) |
| 01:10:27 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:16:34 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:16:55 | → | nattiestnate joins (~nate@202.138.250.13) |
| 01:17:04 | × | jhagborg quits (~jhagborg@068-187-237-099.res.spectrum.com) (Read error: Connection reset by peer) |
| 01:17:24 | → | jhagborg joins (~jhagborg@068-187-237-099.res.spectrum.com) |
| 01:19:51 | → | frost joins (~frost@user/frost) |
| 01:21:05 | → | xff0x_ joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
| 01:24:06 | <jackdk> | EvanR: [a] is Maybe (Cofree Maybe a) :) |
| 01:24:45 | × | off^ quits (~off@50.227.69.228) (Remote host closed the connection) |
| 01:28:51 | → | slack1256 joins (~slack1256@191.126.227.217) |
| 01:29:48 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds) |
| 01:30:18 | <dibblego> | [] can be semi-comonad though |
| 01:30:50 | <jackdk> | I think that's called Extend in semigroupoids |
| 01:35:11 | <EvanR> | semi-comonad as a thing changes the question from "what is a _" to "why should I care" because it sounds like you can make up a name for any damn thing xD |
| 01:41:02 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 01:43:40 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 01:50:00 | × | jhagborg quits (~jhagborg@068-187-237-099.res.spectrum.com) (Ping timeout: 272 seconds) |
| 01:50:20 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 01:50:59 | → | jhagborg joins (~jhagborg@068-187-237-099.res.spectrum.com) |
| 01:52:53 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds) |
| 01:53:33 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 01:53:38 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 250 seconds) |
| 01:54:56 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 250 seconds) |
| 01:56:33 | → | andrey__ joins (~andrey@p200300dbcf089700a418461232068800.dip0.t-ipconnect.de) |
| 01:59:05 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:59:08 | × | andrey_ quits (~andrey@p200300dbcf1dd700efb6dcb1d2488e69.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 02:01:09 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 02:02:38 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Ping timeout: 246 seconds) |
| 02:11:56 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 02:13:51 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 02:14:01 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 02:14:17 | × | tremon quits (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in) |
| 02:15:19 | × | vonfry quits (~user@139.227.167.170) (Ping timeout: 240 seconds) |
| 02:17:15 | × | koala_man quits (~vidar@157.146.251.23.bc.googleusercontent.com) (Read error: Connection reset by peer) |
| 02:18:59 | → | koala_man joins (~vidar@157.146.251.23.bc.googleusercontent.com) |
| 02:21:24 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:21:24 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:21:24 | finn_elija | is now known as FinnElija |
| 02:30:55 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
| 02:35:32 | × | td_ quits (~td@94.134.91.110) (Ping timeout: 246 seconds) |
| 02:37:40 | → | td_ joins (~td@muedsl-82-207-238-136.citykom.de) |
| 02:38:39 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds) |
| 02:39:24 | × | inversed_ quits (~inversed@94.13.111.159) (Ping timeout: 272 seconds) |
| 02:40:03 | → | fraznel joins (~fuag1@174.127.249.180) |
| 02:40:55 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 02:41:02 | <fraznel> | hey all, purely academic question. What if I have a structure that has multiple viable implementations of foldable such as a binary tree and i have resion that some would be preferred in some situations over others. Is there a language extension or other way of providing multiple instances of foldable nad selecting one explicitly at the call site? |
| 02:41:52 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 02:43:55 | <[Leary]> | fraznel: That's pretty much what newtypes are for. |
| 02:43:56 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 02:44:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 02:44:59 | → | deadmarshal_ joins (~deadmarsh@95.38.114.81) |
| 02:45:53 | <abastro[m]> | I guess one coukd have `LeftFold Tree` and `RightFold Tree` |
| 02:46:06 | <monochrom> | We solved "Integer is a monoid by + but also a monoid by *" by devising the newtype wrappers Sum and Product. |
| 02:46:16 | <monochrom> | Or maybe worked around, heh. |
| 02:46:40 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:47:36 | <fraznel> | so only through newtypes does an implementation of foldable exist? |
| 02:47:42 | <abastro[m]> | Hey but at least it is functional workaround :D |
| 02:47:56 | <monochrom> | No, only through newtype can you offer multiple choices. |
| 02:48:35 | <monochrom> | If there is no rivaling "standard", we would not newtype-wrap it. Consider Integer and Ord. |
| 02:49:34 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 02:49:49 | → | goepsilongo_ joins (~goepsilon@2603-7000-ab00-62ed-2999-d4f9-6568-086f.res6.spectrum.com) |
| 02:49:51 | × | deadmarshal_ quits (~deadmarsh@95.38.114.81) (Ping timeout: 276 seconds) |
| 02:50:16 | <fraznel> | can i look at source that uses this technique somewhere? hmm, i'm not understanding how newtype works maybe, wouldn't that mean that you would have to have Tree be infix foldable by default but LeftFold Tree havea left instance of foldable etc? |
| 02:50:39 | <abastro[m]> | Oh I should have rather said |
| 02:50:50 | × | goepsilongo quits (~goepsilon@2603-7000-ab00-62ed-8077-381b-a4b0-5dd2.res6.spectrum.com) (Ping timeout: 250 seconds) |
| 02:50:57 | <abastro[m]> | newtype LeftTree = LT Tree |
| 02:50:57 | <abastro[m]> | newtype RightTree = RT Tree |
| 02:51:12 | <abastro[m]> | And implement Foldable instances for LT Tree and RT Tree |
| 02:51:28 | <abastro[m]> | (Now I see why DeriveFoldable/DeriveTraversable is controversial) |
| 02:51:56 | <fraznel> | oh i see now, makes sense :) |
| 02:53:00 | <abastro[m]> | <del>DeriveFoldable is opinionated, we need remove ree</del> |
| 02:53:25 | <abastro[m]> | Btw, for Monoid, there are single instance possible for product types. Why do we not have DeriveMonoid? |
| 02:55:01 | <abastro[m]> | Also DeriveEnum |
| 02:55:09 | <abastro[m]> | (For sum type) |
| 02:55:56 | <[Leary]> | fraznel: BTW, you might find that existing newtypes already give you what you want; e.g. via something like dualFoldMap f = getDual . foldMap (Dual . f) |
| 02:56:59 | <abastro[m]> | Is Foldable instance of Dual sufficiently efficient? |
| 02:57:13 | <abastro[m]> | You know.. e.g. on list, it won't work well. |
| 02:58:43 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Quit: Leaving) |
| 02:58:47 | → | mbuf joins (~Shakthi@122.174.175.185) |
| 02:58:53 | <[Leary]> | We're only using the Monoid instance of Dual, with the a single Foldable instance for the Tree. The performance should be the same as regular foldMap. |
| 02:59:26 | <abastro[m]> | Oh |
| 02:59:32 | <abastro[m]> | I missed that part |
| 03:00:08 | <abastro[m]> | Wait, consider how foldr is implemented |
| 03:01:26 | <abastro[m]> | toList would be even more intrusive |
| 03:02:04 | <fraznel> | I'm not comfy with what the dual of something means, would be into reading any blog post or etc to get used to it. Whatever i read probably wont stick until i find a reason to use it. I thought dual was a category thing that you had to evaluate, can you auto get the dual instances of anything or does it need a "dual" like instance |
| 03:02:48 | <[Leary]> | If Tree is a simple binary tree, then dualFoldMap just sees the reversed tree. Dual a <> Dual b = b <> a. That's all you really need to know here. |
| 03:02:53 | <abastro[m]> | I think dual is just there being interpreted like "Reverse" |
| 03:03:16 | → | inversed joins (~inversed@94.13.111.159) |
| 03:03:31 | <[Leary]> | Err, = Dual (b <> a). |
| 03:03:48 | → | notzmv joins (~zmv@user/notzmv) |
| 03:04:05 | <abastro[m]> | Hm having only `dualFoldMap` avoids problem of foldr/toList |
| 03:05:26 | <fraznel> | in Dual a <> Dual b = Dual (b <> a) why is the Dual qualifier needed in the right hand side |
| 03:06:03 | <fraznel> | if Dual is reverse, oh, nvm |
| 03:07:25 | <monochrom> | both sides need the same wrapper for types to match up. |
| 03:07:54 | <abastro[m]> | Perhaps it has another categorical meaning but I only know about part where it means reverse. "Dual" is overloaded term in math, as well. |
| 03:08:41 | <fraznel> | i miss workin in haskell |
| 03:08:42 | <abastro[m]> | Group dual, category dual, point <-> line dual ... |
| 03:09:11 | <monochrom> | Yeah I think this one is named Dual because the author ran out of good names. |
| 03:09:13 | <fraznel> | the first time i saw Dual was reading about co-monads in a post by ekmett so i think I lumped it in with co-monad stuff in my mind |
| 03:09:37 | <monochrom> | DON'T TRUST MEANINGFUL NAMES |
| 03:10:14 | <abastro[m]> | Hahahahaha |
| 03:10:24 | <abastro[m]> | Naming gives meaning to both the object and the name |
| 03:12:38 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 03:13:48 | × | jhagborg quits (~jhagborg@068-187-237-099.res.spectrum.com) (Ping timeout: 250 seconds) |
| 03:14:28 | <abastro[m]> | "Dual" and "Co-" are two incredibly overloaded terms in matu |
| 03:14:32 | <abastro[m]> | Math* |
| 03:15:24 | × | [Leary] quits (~Leary]@122-58-90-96-vdsl.sparkbb.co.nz) (Remote host closed the connection) |
| 03:15:28 | <fraznel> | good to know, next time i run into co or dual i'll go straight to the instance definitions to reason about em :P |
| 03:20:53 | × | kimjetwav quits (~user@2607:fea8:2362:b400:5885:9431:ca89:9663) (Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)) |
| 03:21:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 03:22:11 | <fraznel> | thanks for the help grokking that stuff :) |
| 03:23:07 | → | abrantesasf joins (~abrantesa@179.217.49.34) |
| 03:24:25 | × | abrantesasf quits (~abrantesa@179.217.49.34) (Remote host closed the connection) |
| 03:25:40 | → | hexfive joins (~eric@50.35.83.177) |
| 03:27:44 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 03:32:06 | → | abastro joins (~abab9579@192.249.26.179) |
| 03:33:39 | <dmj`> | "meaningful names considered harmful" |
| 03:34:42 | × | pooryorick quits (~pooryoric@87-119-174-173.tll.elisa.ee) (Ping timeout: 276 seconds) |
| 03:34:56 | → | pooryorick joins (~pooryoric@87-119-174-173.tll.elisa.ee) |
| 03:39:59 | × | abastro quits (~abab9579@192.249.26.179) (Ping timeout: 256 seconds) |
| 03:42:37 | → | vicfred joins (~vicfred@user/vicfred) |
| 03:47:33 | → | searemind joins (~searemind@122.161.49.249) |
| 03:48:02 | × | searemind quits (~searemind@122.161.49.249) (Client Quit) |
| 03:48:49 | → | abrantesasf joins (~abrantesa@179.217.49.34) |
| 03:49:33 | × | abrantesasf quits (~abrantesa@179.217.49.34) (Remote host closed the connection) |
| 03:52:44 | → | jhagborg joins (~jhagborg@068-187-237-099.res.spectrum.com) |
| 03:52:52 | <EvanR> | it seems tricky to come up with and use unmeaningful names, since they gain meaning through use |
| 03:53:19 | × | nattiestnate quits (~nate@202.138.250.13) (Quit: WeeChat 3.5) |
| 03:53:35 | → | nattiestnate joins (~nate@202.138.250.10) |
| 03:53:46 | × | goepsilongo_ quits (~goepsilon@2603-7000-ab00-62ed-2999-d4f9-6568-086f.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com) |
| 03:56:59 | × | jhagborg quits (~jhagborg@068-187-237-099.res.spectrum.com) (Client Quit) |
| 03:57:19 | → | vonfry joins (~user@139.227.167.170) |
| 03:57:36 | × | vonfry quits (~user@139.227.167.170) (Remote host closed the connection) |
| 04:00:17 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 04:00:38 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 04:01:11 | → | jargon joins (~jargon@174-22-223-120.phnx.qwest.net) |
| 04:03:50 | × | nattiestnate quits (~nate@202.138.250.10) (Quit: WeeChat 3.5) |
| 04:11:23 | → | irfan joins (~irfan@user/irfan) |
| 04:13:29 | <Andrew> | "IO Monad" |
| 04:13:56 | <Andrew> | https://blog.jle.im/entry/io-monad-considered-harmful.html |
| 04:14:12 | <Andrew> | I mean, it is technically a monad behind |
| 04:14:20 | <Andrew> | But there's very little monadic about it |
| 04:18:30 | <monochrom> | Yeah I just say IO. |
| 04:19:16 | <monochrom> | No one teaches school arithmetic by saying "the integer ring" all the time. It's just the integers. |
| 04:19:24 | → | cdman joins (~dcm@27.2.218.68) |
| 04:19:24 | × | cdman quits (~dcm@27.2.218.68) (Changing host) |
| 04:19:24 | → | cdman joins (~dcm@user/dmc/x-4369397) |
| 04:23:16 | <monochrom> | The R^3 differentiable Hausdorf manifold Lesbegue measurable Euclidean metric inner product vector space, defender of the faith, king of Narnia, emperor of the Lone Islands and other realms. >:) |
| 04:29:38 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::aa1d) (Ping timeout: 250 seconds) |
| 04:34:17 | × | jargon quits (~jargon@174-22-223-120.phnx.qwest.net) (Remote host closed the connection) |
| 04:34:49 | → | jargon joins (~jargon@174-22-223-120.phnx.qwest.net) |
| 04:37:50 | → | deadmarshal_ joins (~deadmarsh@95.38.114.81) |
| 04:47:54 | <parsnip> | i thought it was the integer module? |
| 04:50:12 | <Inst[m]> | does anyone know if there's a way to get Haskell to have automatic case fallthrough? |
| 04:50:13 | <Inst[m]> | i.e, if I have a partial function, and I have stacked case-ofs |
| 04:50:27 | <Axman6> | There's not a whole lot that you can do with IO that's useful without using the monad interface to it though |
| 04:50:41 | <Inst[m]> | right now, I'm using case k of {a -> y; _-> case k of {... |
| 04:51:16 | <monochrom> | Axman6: Same could be said of the integer ordered ring but meh. |
| 04:51:34 | <monochrom> | and defender of the faith. |
| 04:51:39 | <monochrom> | I mean >:) |
| 04:53:28 | <monochrom> | integer ordered module principle ideal unique factorization domain ring >:) |
| 04:53:39 | × | deadmarshal_ quits (~deadmarsh@95.38.114.81) (Ping timeout: 240 seconds) |
| 04:54:41 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 04:55:43 | → | img joins (~img@user/img) |
| 04:56:11 | <monochrom> | Ugh, s/module/torsion-free module/ haha |
| 04:57:18 | × | img quits (~img@user/img) (Client Quit) |
| 04:57:37 | <Axman6> | geez man, so loose with your language! be more careful :P |
| 04:57:49 | <Axman6> | Someone might not know what you're talking about! |
| 04:58:44 | → | img joins (~img@user/img) |
| 05:04:14 | <EvanR> | The IO javascript callback chain |
| 05:04:40 | <EvanR> | (know your audience, I guess) |
| 05:07:35 | → | [Leary] joins (~Leary]@122-58-90-96-vdsl.sparkbb.co.nz) |
| 05:10:11 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 05:14:26 | × | liz quits (~liz@host109-151-125-217.range109-151.btcentralplus.com) (Quit: Lost terminal) |
| 05:18:01 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:20:08 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 05:24:04 | × | raym quits (~raym@user/raym) (Ping timeout: 272 seconds) |
| 05:24:19 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 05:29:26 | → | raym joins (~raym@user/raym) |
| 05:34:26 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 05:34:35 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:35:51 | → | michalz joins (~michalz@185.246.204.125) |
| 05:35:58 | → | img joins (~img@user/img) |
| 05:45:34 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
| 05:46:06 | × | jargon quits (~jargon@174-22-223-120.phnx.qwest.net) (Remote host closed the connection) |
| 05:46:11 | × | slack1256 quits (~slack1256@191.126.227.217) (Remote host closed the connection) |
| 05:47:48 | → | Pickchea joins (~private@user/pickchea) |
| 05:48:27 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:49:51 | → | img joins (~img@user/img) |
| 05:52:35 | × | son0p quits (~ff@181.136.122.143) (Ping timeout: 256 seconds) |
| 05:58:16 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 272 seconds) |
| 06:00:12 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 06:10:43 | × | [Leary] quits (~Leary]@122-58-90-96-vdsl.sparkbb.co.nz) (Ping timeout: 256 seconds) |
| 06:15:23 | → | deadmarshal_ joins (~deadmarsh@95.38.114.81) |
| 06:18:13 | → | briandaed joins (~briandaed@109.95.142.93.r.toneticgroup.pl) |
| 06:19:34 | <jonathanx> | Re:lenses. I've been looking into IndexedTraversals, but I'm considering bailing out. I'd like some help implementing the following= "deIndexed :: IndexedTraversal' Int (Vector a) a -> Lens.Traversal' (Vector a) (Int, a)" |
| 06:19:50 | <jonathanx> | Is there a Control.Lens function(s) to do that conversion? |
| 06:19:54 | → | [Leary] joins (~Leary]@122-58-90-96-vdsl.sparkbb.co.nz) |
| 06:31:22 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:f733:1b0a:d908:7e84) |
| 06:33:30 | → | benin joins (~benin@183.82.204.110) |
| 06:36:24 | → | Midjak joins (~Midjak@82.66.147.146) |
| 06:38:42 | <Axman6> | you could do that as a Getter, but not a Traversal |
| 06:38:54 | <Axman6> | unless you really want to be able to change indixes of things |
| 06:39:00 | <Axman6> | indices* |
| 06:39:35 | → | mmhat joins (~mmh@55d4cafc.access.ecotel.net) |
| 06:41:26 | <jonathanx> | Nope, I dont. Hm. |
| 06:44:20 | <jackdk> | Axman6: or as a Fold? |
| 06:44:34 | <Axman6> | possibly |
| 06:44:53 | <Axman6> | Can't remember what the difference is |
| 06:44:55 | × | fraznel quits (~fuag1@174.127.249.180) (Quit: Leaving) |
| 06:48:44 | <jackdk> | Fold lets you compute any monoidal summary over the things you visit, getter locks you to getting the first |
| 06:48:47 | <jackdk> | AIUI |
| 06:48:59 | <Axman6> | Maybe I meant Getting? |
| 06:49:21 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:52:16 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 06:58:36 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 06:59:19 | → | mikoto-chan joins (~mikoto-ch@84.199.144.235) |
| 07:00:17 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 07:00:19 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 07:06:15 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 07:06:17 | → | abastro joins (~abab9579@192.249.26.146) |
| 07:08:29 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:12:44 | → | alp_ joins (~alp@user/alp) |
| 07:16:10 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 272 seconds) |
| 07:17:59 | × | deadmarshal_ quits (~deadmarsh@95.38.114.81) (Ping timeout: 240 seconds) |
| 07:20:49 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 07:24:58 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 07:25:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 07:27:16 | <jackdk> | % :i Fold |
| 07:27:34 | <jackdk> | where is yahb? |
| 07:28:41 | → | coot joins (~coot@213.134.190.95) |
| 07:30:36 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 07:31:03 | <Axman6> | jonathanx: There is a fairly fundamental difference between those two types - the former attached an Int to each a in the vector, and gives you the ability to change that a, but the index is immutable. The latter claimes to let you also change indices (which would be quite interesting if you didn't need to ensure that you had one index for every element of the input vector |
| 07:32:01 | → | chele joins (~chele@user/chele) |
| 07:32:20 | <dminuoso> | jonathanx: mind my asking, why exactly do you want this deIndexed in the first place? |
| 07:32:33 | <dminuoso> | I have a very vague idea of why you might think you need it, it's a smell |
| 07:33:22 | × | coot quits (~coot@213.134.190.95) (Client Quit) |
| 07:34:28 | <dminuoso> | I suspect what you're truly looking for is (<.) or (.>) instead. |
| 07:35:39 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 07:36:09 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:36:49 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 07:41:03 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 276 seconds) |
| 07:46:01 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 07:48:11 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 07:51:42 | → | acidjnk joins (~acidjnk@p200300d0c73b452571655f3915a3d16e.dip0.t-ipconnect.de) |
| 08:02:28 | → | son0p joins (~ff@181.136.122.143) |
| 08:05:28 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 08:06:39 | × | haskl quits (~haskl@user/haskl) (Ping timeout: 240 seconds) |
| 08:08:48 | → | haskl joins (~haskl@user/haskl) |
| 08:09:40 | → | ccntrq joins (~Thunderbi@2a01:e34:eccb:b060:ae12:4cae:f662:1bed) |
| 08:11:54 | × | cosimone quits (~user@93-44-185-79.ip98.fastwebnet.it) (Ping timeout: 272 seconds) |
| 08:12:30 | → | CiaoSen joins (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:14:43 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 08:16:10 | → | dextaa4 joins (~dextaa@user/dextaa) |
| 08:16:30 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:20:12 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 08:24:52 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:26:34 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 240 seconds) |
| 08:26:46 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 08:31:28 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 08:32:13 | × | dextaa4 quits (~dextaa@user/dextaa) (Remote host closed the connection) |
| 08:36:49 | → | deadmarshal_ joins (~deadmarsh@95.38.114.81) |
| 08:41:40 | → | dextaa4 joins (~dextaa@user/dextaa) |
| 08:42:29 | → | xaotuk joins (~sasha@net88-34-245-109.mbb.telenor.rs) |
| 08:53:03 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 08:55:03 | × | mikoto-chan quits (~mikoto-ch@84.199.144.235) (Ping timeout: 256 seconds) |
| 08:57:58 | × | dextaa4 quits (~dextaa@user/dextaa) (Remote host closed the connection) |
| 08:57:59 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 240 seconds) |
| 09:02:18 | → | krappix joins (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) |
| 09:03:37 | → | mikoto-chan joins (~mikoto-ch@37.230.126.249) |
| 09:04:28 | × | abastro quits (~abab9579@192.249.26.146) (Ping timeout: 272 seconds) |
| 09:05:59 | <krappix> | Hello, there is a way to debug a haskell app with stack or cabal ? For example, app installed by cabal, I want to run this app and put some breakpoint in Main.hs in order to figure out how this app work when I run it. |
| 09:07:35 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 09:12:27 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 09:19:51 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 09:22:41 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 09:24:15 | → | kspalaiologos joins (~kspalaiol@user/kspalaiologos) |
| 09:25:03 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 276 seconds) |
| 09:28:12 | → | chddr joins (~Thunderbi@91.226.35.182) |
| 09:29:39 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 09:31:33 | <kuribas> | hmm, in idris you could make liftA_N, where liftA_N 2 == liftA2, liftA_N 3 == liftA3, etc.. |
| 09:31:51 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:32:08 | <kuribas> | or zipWithN, where zipWithN 1 == map, etc... |
| 09:32:08 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 09:32:15 | → | ubert1 joins (~Thunderbi@2a02:8109:9880:303c:2c6d:3d80:b801:5482) |
| 09:34:31 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 09:36:07 | <abastro[m]> | kuribas: this is the main purpose of dependent types, isn't it? |
| 09:36:35 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 09:37:20 | <Maxdamantus> | Not really, because that doesn't depend on runtime values. |
| 09:37:56 | <Maxdamantus> | You could do it in Haskell by making types that represent natural numbers. |
| 09:38:07 | × | mikoto-chan quits (~mikoto-ch@37.230.126.249) (Ping timeout: 256 seconds) |
| 09:38:08 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:39:37 | <kuribas> | you could do it with type families in haskell. |
| 09:40:08 | <Maxdamantus> | (technically, when you make the `zipWithN` that kuribas is talking about in Idris, it will use dependent types, but you might end up always calling `zipWithN` with static `Nat` values, so it's not a very good demonstration of dependent types) |
| 09:40:11 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds) |
| 09:40:12 | <kuribas> | abastro[m]: it's one way to use them |
| 09:40:39 | → | mikoto-chan joins (~mikoto-ch@84.199.144.235) |
| 09:40:49 | <kuribas> | Maxdamantus: what's a "static" Nat value? |
| 09:41:42 | <kuribas> | the difference is that in haskell it would need a type level Nat, while in idris you pass a value level Nat. |
| 09:42:41 | <Maxdamantus> | Sure, so that's why it does technically use dependent types, but since you might always use static values it probably isn't a very good use of them. |
| 09:42:52 | <Maxdamantus> | same thing with `the` |
| 09:42:53 | <kuribas> | well, the concept of type level Nat doesn't exist in idris of course. |
| 09:43:05 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:43:48 | <Maxdamantus> | `the` in Idris uses dynamic typing, but most uses of it probably correspond with `::` in Haskell, which doesn't require dependent typing. |
| 09:43:49 | → | abastro joins (~abab9579@192.249.26.146) |
| 09:44:21 | <Maxdamantus> | the : (t: Type) -> t -> t |
| 09:44:39 | <Maxdamantus> | er, s/dynamic/dependent/ |
| 09:45:10 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 09:45:41 | <kuribas> | part of what makes dependent types interesting is not what you cannot do without it, but also what becomes more ergonomic. |
| 09:45:48 | <kuribas> | Type level programming isn't very ergonomic in haskell. |
| 09:46:10 | <kuribas> | It's fine for simple problems, but can become hairy quickly. |
| 09:46:14 | → | cosimone joins (~user@93-44-185-79.ip98.fastwebnet.it) |
| 09:46:28 | <kuribas> | For example, extending servant. |
| 09:46:54 | → | epolanski joins (uid312403@id-312403.helmsley.irccloud.com) |
| 09:46:57 | <kuribas> | Using servant is fairly easy, but customizing it for your own needs is pretty complicated. |
| 09:48:45 | <kuribas> | A lot of dependently typed stuff can be hacked with haskell, but it usually isn't pretty. |
| 09:48:46 | × | xaotuk quits (~sasha@net88-34-245-109.mbb.telenor.rs) (Read error: Connection reset by peer) |
| 09:48:55 | <kuribas> | For example "singletons". |
| 09:49:11 | <kuribas> | The singleton problem especially arises because type and value level are distinct. |
| 09:50:18 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
| 09:50:44 | → | gurkenglas joins (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) |
| 09:57:02 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 272 seconds) |
| 09:57:43 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 10:01:21 | × | mikoto-chan quits (~mikoto-ch@84.199.144.235) (Ping timeout: 256 seconds) |
| 10:01:57 | × | Flow quits (~none@gentoo/developer/flow) (Remote host closed the connection) |
| 10:02:07 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 10:03:09 | <abastro> | Well I've been to arguments that one does not need singletons-y stuffs |
| 10:05:36 | × | krappix quits (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Ping timeout: 252 seconds) |
| 10:08:01 | → | Flow joins (~none@gentoo/developer/flow) |
| 10:09:27 | × | CiaoSen quits (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 10:13:01 | <chddr> | Hi! Does anyone have a good knowledge of System.Process and is willing to help a little? :) |
| 10:14:57 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:15:49 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 10:15:51 | <chddr> | I can't understand an issue, when I create a process with `std_out = CreatePipe`, then it seems that the output of my process is buffered and hGetLine on output handle blocks the execution of the rest of the program (hSetBuffering to NoBuffering doesn't help) |
| 10:15:52 | <chddr> | But if I specify std_out = Inherit, I can see as my program is executed that it prints in the same places where it buffered before |
| 10:17:24 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:f733:1b0a:d908:7e84) (Ping timeout: 240 seconds) |
| 10:17:26 | → | Brandon_1X joins (~brandon@178-79-138-117.ip.linodeusercontent.com) |
| 10:17:27 | <chddr> | But I want to access std_out of my process as a separate handle, i don't need it printed to std_out of the rest of a program. Any ideas what might be the problem here? |
| 10:17:37 | × | Brandon_1X quits (~brandon@178-79-138-117.ip.linodeusercontent.com) (Client Quit) |
| 10:22:11 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 10:24:38 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 10:26:13 | → | andrey joins (~andrey@p200300dbcf1ab3003d09e35965a7a51b.dip0.t-ipconnect.de) |
| 10:28:43 | × | andrey__ quits (~andrey@p200300dbcf089700a418461232068800.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 10:29:58 | × | xff0x_ quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 272 seconds) |
| 10:31:08 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 10:31:25 | → | Everything joins (~Everythin@37.115.210.35) |
| 10:35:50 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:37:00 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:2363:e5e:a843:8cf3) |
| 10:38:27 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:39:51 | → | img joins (~img@user/img) |
| 10:40:19 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 10:41:00 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:41:45 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds) |
| 10:42:14 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:45:00 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 276 seconds) |
| 10:49:36 | → | CiaoSen joins (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 11:02:42 | × | abastro quits (~abab9579@192.249.26.146) (Ping timeout: 246 seconds) |
| 11:13:22 | → | xff0x_ joins (~xff0x@om126167099166.29.openmobile.ne.jp) |
| 11:13:27 | → | abastro joins (~abab9579@192.249.26.146) |
| 11:14:19 | → | Pickchea joins (~private@user/pickchea) |
| 11:17:12 | × | acidjnk quits (~acidjnk@p200300d0c73b452571655f3915a3d16e.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 11:18:07 | <jackdk> | I am not familiar with these libraries but I would try consuming the child's stdout in a thread |
| 11:18:49 | → | Brandon_IX joins (brandon@2a01:7e00::f03c:92ff:feab:6b7c) |
| 11:19:22 | × | stefan-_ quits (~cri@42dots.de) (Ping timeout: 272 seconds) |
| 11:19:30 | <tomsmeding> | chddr: what child program are you running? |
| 11:19:53 | <tomsmeding> | The default behaviour of most programs is to switch their stdout to block-buffering mode when the output is not connected to a terminal |
| 11:21:03 | <tomsmeding> | compare e.g. `tr a-z A-Z` with `tr a-z A-Z | cat` in your terminal; for the second, copy-paste a longer piece of text a few times :p |
| 11:21:21 | <tomsmeding> | I expect this is the issue you're having, not anything related to System.Process |
| 11:21:48 | → | dhil joins (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) |
| 11:21:58 | <tomsmeding> | note: if you set std_out = Inherit, and your Haskell program has stdout connected to a terminal, then the child's stdout is also connected to a terminal so it stays in line-buffered output mode :p |
| 11:23:03 | → | stefan-_ joins (~cri@42dots.de) |
| 11:23:22 | <tomsmeding> | some programs can be instructed to use line buffering anyway, e.g. GNU grep has `--line-buffered` |
| 11:24:10 | → | abrantesasf joins (~abrantesa@189.115.192.139) |
| 11:24:41 | × | abrantesasf quits (~abrantesa@189.115.192.139) (Remote host closed the connection) |
| 11:25:09 | <tomsmeding> | see also https://stackoverflow.com/a/11337109/1608468 |
| 11:26:25 | <tomsmeding> | and the other answers in that thread, in case they are relevant |
| 11:30:19 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 240 seconds) |
| 11:30:53 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 11:32:47 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:34:09 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 11:36:21 | × | benin quits (~benin@183.82.204.110) (Ping timeout: 276 seconds) |
| 11:38:23 | → | benin joins (~benin@183.82.204.110) |
| 11:38:24 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 11:44:22 | → | xaotuk joins (~sasha@2a06:5b00:15fe:9b00::2) |
| 11:46:44 | × | kspalaiologos quits (~kspalaiol@user/kspalaiologos) (Quit: Leaving) |
| 11:50:04 | → | notzmv joins (~zmv@user/notzmv) |
| 11:52:23 | → | krappix joins (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) |
| 11:55:39 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:59:13 | × | alp_ quits (~alp@user/alp) (Ping timeout: 256 seconds) |
| 12:00:46 | → | searemind joins (~searemind@122.161.49.249) |
| 12:02:18 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 12:02:29 | → | zebrag joins (~chris@user/zebrag) |
| 12:04:16 | → | razetime joins (~quassel@117.254.34.238) |
| 12:05:16 | → | Guest4458 joins (~Guest44@45.78.5.44.16clouds.com) |
| 12:05:34 | × | Guest4458 quits (~Guest44@45.78.5.44.16clouds.com) (Client Quit) |
| 12:10:45 | × | searemind quits (~searemind@122.161.49.249) (Remote host closed the connection) |
| 12:12:17 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 12:13:26 | → | alp_ joins (~alp@user/alp) |
| 12:21:51 | × | hololeap quits (~hololeap@user/hololeap) (Quit: Bye) |
| 12:25:45 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 276 seconds) |
| 12:27:05 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 12:27:41 | <exarkun> | is something like (a -> IO b) -> (b -> IO c) -> a -> IO (b, c) well-known? (maybe not necessarily IO, maybe just a Functor?) |
| 12:28:04 | <exarkun> | (I asked hoogle already) |
| 12:28:04 | → | acidjnk joins (~acidjnk@p200300d0c73b452571655f3915a3d16e.dip0.t-ipconnect.de) |
| 12:29:49 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 12:30:47 | → | Vajb joins (~Vajb@2001:999:504:1dda:267d:6860:bdf7:f68b) |
| 12:31:13 | <jackdk> | exarkun: I am not aware of a name for this thing, but you could build it out of `(>=>)` and `relude`'s `traverseToSnd` |
| 12:33:07 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:33:38 | <exarkun> | cool, thanks |
| 12:35:41 | × | cosimone quits (~user@93-44-185-79.ip98.fastwebnet.it) (Remote host closed the connection) |
| 12:36:22 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 12:37:46 | → | oxide joins (~lambda@user/oxide) |
| 12:38:13 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 12:38:15 | × | raym quits (~raym@user/raym) (Ping timeout: 246 seconds) |
| 12:38:51 | <dminuoso> | exarkun: Yes. |
| 12:39:18 | × | abastro quits (~abab9579@192.249.26.146) (Ping timeout: 246 seconds) |
| 12:39:33 | <dminuoso> | Ah hold on, I didn't spot the (a -> ...) inputs. |
| 12:41:37 | <dminuoso> | It reminds me of `<+> :: Applicative f => f a -> f b -> f (a, b)` as a different way to think of Applicative |
| 12:43:11 | <[exa]> | underrated representation^ |
| 12:43:28 | <dminuoso> | Well it's also not completely honest represetation. |
| 12:44:15 | <geekosaur> | I tried generalizing it to Profunctor and still didn't find anything |
| 12:45:15 | <dminuoso> | p a b -> p b c -> p a (b, c) |
| 12:45:18 | <dminuoso> | Certainly looks a bit more charming |
| 12:45:50 | <dminuoso> | I guess this looks a bit like Strong |
| 12:47:21 | → | abastro joins (~abab9579@192.249.26.146) |
| 12:49:12 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 12:52:56 | <dminuoso> | uncurry' :: Strong p => p a (b -> c) -> p (a, b) c |
| 12:52:57 | <dminuoso> | Mmm |
| 12:54:16 | → | raym joins (~raym@user/raym) |
| 12:54:38 | <exarkun> | now I gotta learn about profunctors but before I can do that I gotta learn about hasks |
| 12:55:57 | <dminuoso> | Honestly you dont. |
| 12:57:03 | <dminuoso> | If Functor is a type that you can fmap over one type variable, and Contravariant is a type that contramap over one type variable, a Profunctor is both a Functor in one and Contravariant in the other. |
| 12:57:06 | <dminuoso> | That's it. |
| 12:57:07 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds) |
| 12:57:41 | <dminuoso> | lmap :: (a -> b) -> p b c -> p a c |
| 12:57:43 | <dminuoso> | rmap :: (b -> c) -> p a b -> p a c |
| 12:57:45 | <dminuoso> | Nothing more. |
| 12:57:50 | <[exa]> | exarkun: I learned profunctors from prolens in a "type implementations for these types" game |
| 12:58:55 | <dminuoso> | You can start by the observation that you can covariantly map over (->) in the output type and contravariantly map over the input type. The Profunctor instance of (->) is nothing more than `lmap` (contravariantly mapping over the input) and `rmap` (covariantly mapping over the output). |
| 13:04:34 | × | mmhat quits (~mmh@55d4cafc.access.ecotel.net) (Quit: WeeChat 3.5) |
| 13:05:09 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 13:14:39 | × | raym quits (~raym@user/raym) (Ping timeout: 240 seconds) |
| 13:20:42 | → | raym joins (~raym@user/raym) |
| 13:20:43 | → | Pickchea joins (~private@user/pickchea) |
| 13:23:56 | × | CiaoSen quits (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 13:24:59 | × | raym quits (~raym@user/raym) (Ping timeout: 240 seconds) |
| 13:26:39 | → | geranim0 joins (~geranim0@modemcable242.171-178-173.mc.videotron.ca) |
| 13:31:00 | → | raym joins (~raym@user/raym) |
| 13:31:22 | → | __monty__ joins (~toonn@user/toonn) |
| 13:36:04 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 13:38:59 | × | abastro quits (~abab9579@192.249.26.146) (Ping timeout: 240 seconds) |
| 13:40:39 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 13:41:43 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 13:42:16 | × | xsarnik quits (xsarnik@lounge.fi.muni.cz) (Ping timeout: 248 seconds) |
| 13:42:28 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 13:43:06 | × | xstill- quits (xstill@fimu/xstill) (Ping timeout: 276 seconds) |
| 13:44:34 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:47:39 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 276 seconds) |
| 13:51:00 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 13:51:00 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 13:51:00 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:51:12 | → | Guest81 joins (~Guest81@103.159.43.230) |
| 13:51:12 | → | xsarnik joins (xsarnik@lounge.fi.muni.cz) |
| 13:51:18 | <Guest81> | Hi |
| 13:51:34 | <[exa]> | o/ |
| 13:51:40 | <Guest81> | What up |
| 13:52:59 | × | Guest81 quits (~Guest81@103.159.43.230) (Client Quit) |
| 13:53:14 | → | Guest81 joins (~Guest81@103.159.43.230) |
| 13:54:09 | × | raym quits (~raym@user/raym) (Ping timeout: 276 seconds) |
| 13:54:43 | → | xstill- joins (xstill@fimu/xstill) |
| 13:54:57 | × | Guest81 quits (~Guest81@103.159.43.230) (Client Quit) |
| 13:55:23 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 13:55:29 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 13:55:32 | → | raym joins (~raym@user/raym) |
| 13:58:24 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 13:58:41 | → | kaph_ joins (~kaph@net-2-42-128-49.cust.vodafonedsl.it) |
| 13:58:50 | × | kaph quits (~kaph@net-2-42-128-49.cust.vodafonedsl.it) (Read error: Connection reset by peer) |
| 14:06:28 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 14:09:55 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 14:10:51 | <shapr> | good MORNING |
| 14:11:03 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 276 seconds) |
| 14:11:12 | <geekosaur> | ohai |
| 14:12:34 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 14:12:41 | <tomsmeding> | good afternoon :) |
| 14:12:41 | <absence> | what could be wrong when "TimeZone minutes summer name <- getCurrentTimeZone" returns the right name, but the offset (minutes) is 0? |
| 14:13:05 | <absence> | also summer is false |
| 14:13:07 | <shapr> | I did a 20 minute presentation on random testing yesterday, was fun https://github.com/shapr/randomtesting |
| 14:13:52 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 14:14:56 | <shapr> | I also got a really cool idea from someone during a test run of the presentation, they said "Could QuickCheck memoize random inputs to make each unique?" |
| 14:15:18 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 14:15:22 | → | zer0bitz joins (~zer0bitz@2001:2003:f444:8f00:d98c:fe22:c3d0:13a8) |
| 14:15:26 | <shapr> | That sounds like an easy change with good benefit? |
| 14:15:56 | <tomsmeding> | each _what_ unique? |
| 14:16:54 | <shapr> | It's easy for QC to generate some number of duplicate inputs in a single run, would be nice if inputs were checked for uniqueness in a particular run. |
| 14:17:12 | <shapr> | like "already tried this input for this run, don't need to try it again" kind of thing |
| 14:17:27 | <tomsmeding> | that would add an Eq constraint to quickCheck I guess |
| 14:17:38 | <tomsmeding> | well, Ord to do it remotely efficiently |
| 14:17:38 | <shapr> | huh, good point |
| 14:17:51 | <tomsmeding> | (to not resort to O(n^2) checking) |
| 14:18:34 | <shapr> | while preparing for this presentation I found https://github.com/nick8325/quickcheck-with-counterexamples |
| 14:19:02 | <shapr> | I'd like to have that as part of a standard testing workflow. |
| 14:19:14 | <tomsmeding> | also the Arbitrary (a -> b) instance is trouble there |
| 14:19:20 | <geekosaur> | absence, can't reproduce that here |
| 14:19:23 | <tomsmeding> | though I guess one should use Fun instead then |
| 14:19:26 | <geekosaur> | Prelude Data.Time.LocalTime> getCurrentTimeZone >>= \(TimeZone {..}) -> return (timeZoneMinutes, timeZoneSummerOnly) |
| 14:19:26 | <geekosaur> | (-240,True) |
| 14:19:50 | <shapr> | Oh, I haven't thought about producing unique functions |
| 14:19:54 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:20:10 | <geekosaur> | (sadly the Show instance for TimeZone is crap) |
| 14:20:14 | <tomsmeding> | well quickcheck has support for generating functions as some kind of decision tree; IIRC that's the 'Fun' type. Those could have Ord easily |
| 14:20:29 | <tomsmeding> | but you'd be forced to use the newtype |
| 14:21:04 | <shapr> | It sounds like a worthwhile blog post if nothing else. |
| 14:21:20 | <shapr> | describe the idea, try it out, see if it helps at all |
| 14:21:40 | <tomsmeding> | I would kind of doubt that duplicate inputs really occur that often with most generators |
| 14:22:02 | <shapr> | Happens often when I pay attention, but I don't have any actual recorded data |
| 14:22:41 | <shapr> | so could be selection bias, I was looking for it when it happened :-) |
| 14:23:09 | <shapr> | tomsmeding: any other prop testing low hanging fruit comes to mind? |
| 14:23:13 | <absence> | geekosaur: yeah, it's definitely not normal |
| 14:23:24 | × | raym quits (~raym@user/raym) (Ping timeout: 276 seconds) |
| 14:23:43 | <shapr> | I'd like to do a demo of *all* the cool tools for prop testing in Haskell |
| 14:23:45 | → | raym joins (~raym@user/raym) |
| 14:24:49 | <geekosaur> | anyway it sounds like it thinks you're in UTC. if I ran that in the context of my IRC client it would do that, but that's because I deliberately run my IRC client in UTC |
| 14:26:02 | <absence> | geekosaur: but then the "name" should've been UTC, and not my local time zone |
| 14:26:30 | <geekosaur> | hrm |
| 14:26:56 | <absence> | hm, actually it seems like "name" just contains the first part of whatever the TZ env variable is set to |
| 14:27:04 | <absence> | i can put garbage in there and it will tell me that's the time zone |
| 14:28:10 | <tomsmeding> | shapr: hmm, indeed small values seem to be generated lots of times |
| 14:28:34 | <geekosaur> | I looked at the implementation and it's doing the right thing via system libc functions, so unless that's somehow jacked up it should be correct |
| 14:28:58 | <tomsmeding> | I told it to test a (Int -> Bool) property 10000 times, and it got zero 323x, -1 242x, ..., 6 140x, ... 37 51x, ... 83 2x |
| 14:29:17 | <tomsmeding> | shapr: smallcheck feels relevant here |
| 14:29:39 | <tomsmeding> | there's also hedgehog but that's mostly a different interface for the same idea as quickcheck |
| 14:30:08 | <janus> | i think the fact that you can choose your distribution and name it is a pretty stark difference |
| 14:30:19 | <tomsmeding> | absence: what does `timedatectl status` return on the command line |
| 14:30:29 | <abastro[m]> | Choose distribution? |
| 14:30:33 | <tomsmeding> | janus: true, the interface is quite different :p |
| 14:31:08 | <absence> | tomsmeding: command not found :D i guess the docker image doesn't have that |
| 14:31:10 | <tomsmeding> | abastro[m]: quickcheck has Arbitrary instances, so there's one instance for one type; hedgehog instead lets you pass a generator function, so you don't need to define a new type if you want to use a different random generator |
| 14:31:19 | <tomsmeding> | docker complicates things |
| 14:31:35 | <tomsmeding> | absence: does `date` do the right thing :p |
| 14:32:10 | <absence> | tomsmeding: it too does the wrong thing |
| 14:32:13 | <tomsmeding> | absence: what does /etc/localtime point to, and what is in /etc/adjtime (not actually sure what the contents of the latter mean, but for comparison) |
| 14:32:27 | <janus> | abastro[m]: yes, for example 'constant' 'linear' and so on: https://www.youtube.com/watch?v=AIv_9T0xKEo&t=21m22s |
| 14:32:43 | <absence> | tomsmeding: they don't exist, there's only a TZ env variable |
| 14:32:56 | <tomsmeding> | absence: does /usr/share/zoneinfo exist |
| 14:33:05 | → | searemind joins (~searemind@122.161.49.249) |
| 14:33:18 | <absence> | tomsmeding: no, but /share/zoneinfo does... let me try to move it |
| 14:33:24 | <tomsmeding> | lol |
| 14:33:25 | <janus> | abastro[m]: if you turn those diagrams 90 deg, they look like distributions, no? |
| 14:33:28 | <geekosaur> | if the date command is misbehaving the same way, you probably aren't going to fix this readily |
| 14:33:50 | <tomsmeding> | absence: I would 'strace -o log.txt date' and find erroring syscalls, but not sure if you have strace :D |
| 14:33:57 | <tomsmeding> | also, not sure if ontopic anymore for #haskell |
| 14:34:04 | <janus> | e.g. for the 'linearFrom' diagram, the yellow line would be the expected value |
| 14:34:30 | <janus> | not sure if i am abusing the word 'distribution' but it seem related |
| 14:34:37 | <absence> | tomsmeding: now i have /usr/share/zoneinfo, and still same problem |
| 14:35:12 | <absence> | tomsmeding: yeah, it's kinda off topic, but not completely. if some syscall fails, why doesn't the haskell function fail? |
| 14:36:31 | <geekosaur> | you would have to study how the libc stuff works to understand that. short answer is, the "syscall" never fails, it just defaults to UTC like you are seeing |
| 14:36:40 | <tomsmeding> | absence: good question, `date` doesn't fail either apparently |
| 14:36:46 | <geekosaur> | this is for historical reasons |
| 14:36:52 | <janus> | absence: you should note that you can't represent tzdb offsets accurately using an integer amount of minutes |
| 14:36:58 | <tomsmeding> | geekosaur: why is "syscall" in scaarequotes |
| 14:36:59 | <janus> | absence: the tzdb will use seconds for LMT |
| 14:37:14 | <geekosaur> | because it's not really a system (kernel) call |
| 14:37:22 | <geekosaur> | the kernel always works in UTC |
| 14:37:38 | <tomsmeding> | I would look at the strace output to find file system accesses that fail |
| 14:37:40 | <janus> | absence: so even if you make it work for current dates, it is gonna break for dates before the adoption of time zones, where LMT is used |
| 14:37:41 | <geekosaur> | user presentation is in userspace |
| 14:37:49 | <tomsmeding> | like, looking up some time zone database file which fails :p |
| 14:37:53 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 14:37:56 | <tomsmeding> | _that_'s the syscalls I meant |
| 14:38:29 | <geekosaur> | also it's complicated by the fact that TZ isn't necessarily looking in the timezone database, there's a TZ syntax to define a timezone in place |
| 14:38:34 | × | searemind quits (~searemind@122.161.49.249) (Remote host closed the connection) |
| 14:38:46 | <tomsmeding> | like, my `date` opens /etc/localtime, and that already doesn't exist on absence's docker image, so I would be curious to see what `date` then tries |
| 14:38:52 | <geekosaur> | TZ=FOO1:30BAR0:45 is legal and defines a timezone |
| 14:39:25 | <janus> | absence: if you wanna get away from depending on so much runtime state, you can compile the tzdb into your application using the tz/tzdata packages that i have taken over |
| 14:39:28 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 14:39:35 | <janus> | @package tz |
| 14:39:35 | <lambdabot> | https://hackage.haskell.org/package/tz |
| 14:41:16 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:42:27 | <absence> | tomsmeding: i put strace in the docker image, and the problem turned out to be that it was looking for the zoneinfo in a completely unexpected place. setting TZDIR works around the issue. interesting that glibc just does the wrong thing in silence, but that's how it is i guess |
| 14:42:50 | <tomsmeding> | absence: glibc is interesting in general |
| 14:43:08 | <tomsmeding> | but nice that you found out :) |
| 14:43:19 | <tomsmeding> | (what was the 'completely unexpected place'?) |
| 14:43:55 | <absence> | janus: thanks, i'll keep that in mind for the future. unfortunately i'm currently just calling code that uses the "standard" time zone stuff |
| 14:43:55 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 14:44:07 | <geekosaur> | as I mentioned earlier, "does the wrong thing in silence" is for historical reasons |
| 14:44:43 | <geekosaur> | the timezone stuff is pretty well specified, even the parts that POSIX left out are specced by other standards becuase so much stuff relies on them |
| 14:44:50 | <geekosaur> | (such as _tzset()) |
| 14:46:21 | → | f-a joins (f2a@f2a.jujube.ircnow.org) |
| 14:46:28 | <absence> | tomsmeding: inside the glibc nix package, but the files are in the tzdata package. there's an open issue on it |
| 14:46:58 | <tomsmeding> | heh |
| 14:46:59 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 240 seconds) |
| 14:47:19 | <tomsmeding> | absence: if you'd said "I'm using docker and nix" from the beginning, I would've tableflipped and had no idea |
| 14:47:29 | <janus> | hahah |
| 14:47:46 | <absence> | geekosaur: historical or not, i would've preferred to get an indication that something was wrong, and not just the wrong answer when the same system call apparently lies about the time zone name |
| 14:48:13 | janus | patiently waits for maerwald to enter the discussion ( think he has opinions on nix? ) |
| 14:48:20 | <absence> | tomsmeding: good to know, i won't mention that in the future ;D |
| 14:48:59 | <tomsmeding> | absence: presumably what's doing the thing here is not a system call; glibc (that `date` uses) reads TZ, looks up that timezone in what it thinks is the db, fails, shrugs, returns 0 with name from TZ, and `date` is none the wiser |
| 14:50:04 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
| 14:50:11 | <absence> | yes.. while indicating some kind of failure would be the best option, the next best would be to not use the name from TZ :) |
| 14:50:25 | <tomsmeding> | I guess :p |
| 14:51:32 | <absence> | anyway, i've learned yet another unix footgun the hard way, so that's fun. thanks for the help :) |
| 14:52:18 | <f-a> | I am battling some Template Haskell (and what I believe is splicing scope) http://paste.debian.net/plain/1239198 |
| 14:52:28 | <f-a> | of course inverting the two lines makes the example work |
| 14:52:35 | <f-a> | is there any other way around it? |
| 14:52:56 | <tomsmeding> | don't think so |
| 14:53:23 | <f-a> | ah! I suspected as much. Disappointing but understandable |
| 14:53:23 | × | Vajb quits (~Vajb@2001:999:504:1dda:267d:6860:bdf7:f68b) (Read error: Connection reset by peer) |
| 14:53:39 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 14:56:40 | <tomsmeding> | f-a: you may try `mkName "hey2"` instead of `'hey2`, but that might fail as well |
| 15:00:58 | → | Guest|30 joins (~Guest|30@p548a4fd5.dip0.t-ipconnect.de) |
| 15:01:00 | × | Guest|30 quits (~Guest|30@p548a4fd5.dip0.t-ipconnect.de) (Client Quit) |
| 15:01:06 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 15:01:36 | <f-a> | mhh alas indeed it still complains • Variable not in scope: hey2 :: Card tomsmeding |
| 15:02:06 | <geekosaur> | tomsmeding is correct, there is no error return (nor any API for one) at the level of libc |
| 15:02:40 | <geekosaur> | f-a, I'm pretty sure that is the TH staging restriction and there's no way around it |
| 15:06:21 | × | zfnmxt quits (~zfnmxtzfn@2001:470:69fc:105::2b32) (Changing host) |
| 15:06:21 | → | zfnmxt joins (~zfnmxtzfn@user/zfnmxt) |
| 15:06:36 | <abastro[m]> | Ahh |
| 15:06:37 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:2363:e5e:a843:8cf3) (Quit: WeeChat 2.8) |
| 15:07:20 | <f-a> | I see, I see, thanks |
| 15:13:58 | × | krappix quits (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Ping timeout: 252 seconds) |
| 15:15:28 | × | cdman quits (~dcm@user/dmc/x-4369397) (Quit: Leaving) |
| 15:19:49 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:21:53 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 15:22:42 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 15:27:20 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 15:31:17 | → | dsrt^ joins (~dsrt@50.227.69.228) |
| 15:33:55 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 15:36:29 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 15:36:43 | × | epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:36:51 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 15:37:33 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 15:37:47 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 15:39:54 | × | xff0x_ quits (~xff0x@om126167099166.29.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 15:44:04 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
| 15:44:35 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 15:45:22 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 272 seconds) |
| 15:47:38 | → | gensyst joins (gensyst@user/gensyst) |
| 15:47:51 | <gensyst> | Is there something like Set, but without the Ord requirement? |
| 15:48:04 | <gensyst> | (I want a list of elements known to be unique) |
| 15:48:09 | <janus> | gensyst: HashSet? |
| 15:49:12 | <geekosaur> | you need *some* constraint to do that. You can choose Ord (Set) or Hashable (HashSet) |
| 15:49:21 | <gensyst> | ok thanks mates |
| 15:49:27 | <geekosaur> | probably one could be done with just Eq but it'd be pretty slow |
| 15:49:56 | <gensyst> | i just wanted a unique "list" of DayOfWeek. i guess i'll just do a newtype of DayOfWeek that implements Ord using fromEnum |
| 15:50:06 | <gensyst> | will do for this purpose i guess |
| 15:50:19 | <gensyst> | (assuming i don't assign any greater purpose to this ord) |
| 15:50:39 | × | ccntrq quits (~Thunderbi@2a01:e34:eccb:b060:ae12:4cae:f662:1bed) (Remote host closed the connection) |
| 15:52:23 | <janus> | maybe it is possible to put the newtype in its own module, not export it and then it would be less likely to be abused |
| 15:53:07 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:53:54 | <f-a> | another TH question: in a module I have got lots of (top level) `:: Int` declarations, is there a way to get a list of those names to generate/splice — say — a list of all of them? |
| 15:55:11 | <gensyst> | janus yeah just internal no worries :D |
| 15:55:32 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 16:00:14 | × | ksqsf[m] quits (~ksqsfmatr@2001:470:69fc:105::1:d8fa) (Quit: You have been kicked for being idle) |
| 16:00:14 | × | AdamS[m] quits (~adamvalko@2001:470:69fc:105::1:d5f0) (Quit: You have been kicked for being idle) |
| 16:00:41 | × | ubert1 quits (~Thunderbi@2a02:8109:9880:303c:2c6d:3d80:b801:5482) (Remote host closed the connection) |
| 16:02:38 | <c_wraith> | f-a: huh. I would have thought there would be, but I can't actually find anything to do that. I've done similar stuff with instances before, but that's a different sort of problem |
| 16:03:33 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:04:28 | <geekosaur> | I think you can go through Q to get the compilation context, which gets you into functions in the ghc package, but that would be painful at best |
| 16:05:22 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 16:05:30 | <tomsmeding> | f-a: fairly sure you can't, quickcheck uses this utter abomination to get all declarations with name "prop_*": https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/src/Test.QuickCheck.All.html#allProperties |
| 16:06:23 | <f-a> | spicy! thanks |
| 16:06:41 | <tomsmeding> | I mean, you could copy that code and do your own thing |
| 16:06:44 | <tomsmeding> | but, y'know |
| 16:08:06 | <tomsmeding> | gensyst: DayOfWeek implements Ord? |
| 16:09:02 | <janus> | sunday is the first day of the week, heathens! :O aarararrgh |
| 16:09:16 | <geekosaur> | @let import Data.Time.LocalTime |
| 16:09:18 | <lambdabot> | /sandbox/tmp/.L.hs:123:1: error: |
| 16:09:18 | <lambdabot> | Data.Time.LocalTime: Can't be safely imported! |
| 16:09:18 | <lambdabot> | The package (time-1.9.3) the module resides in isn't trusted. |
| 16:09:24 | <geekosaur> | bah |
| 16:09:33 | <tomsmeding> | % import Data.Time.LocalTime |
| 16:09:36 | <geekosaur> | % it |
| 16:09:39 | <tomsmeding> | oh yahb is still dead |
| 16:09:39 | <geekosaur> | still dead |
| 16:09:42 | <tomsmeding> | RIP |
| 16:11:46 | <geekosaur> | hm, ghci for me says no Ord nor Hashable instance |
| 16:11:48 | <c_wraith> | I'm surprised reifyModule is so limited. |
| 16:12:21 | <geekosaur> | (with the "time" that comes with 8.10.7 at least) |
| 16:12:49 | <tomsmeding> | new in time-1.11 apparently |
| 16:12:50 | <geekosaur> | as of 9.2.2 Ord was added |
| 16:13:28 | <c_wraith> | I understand why `reifyModule =<< thisModule' is limited - the module isn't complete yet. But if applied to a module that's already compiled, I'd hope for more info. |
| 16:13:35 | <janus> | i am puzzled why Monday is the first enumeration value, but "toEnum 0" is Sunday |
| 16:13:42 | <janus> | why did the time author choose one-indexing? |
| 16:13:49 | <tomsmeding> | geekosaur: 9.2.1 too ;) |
| 16:14:03 | <geekosaur> | I don't have that installed to check :) |
| 16:14:06 | → | dextaa4 joins (~dextaa@user/dextaa) |
| 16:14:08 | <tomsmeding> | janus: that's dodgy |
| 16:14:45 | × | mbuf quits (~Shakthi@122.174.175.185) (Quit: Leaving) |
| 16:14:49 | <tomsmeding> | javascript months all over again, but now for day-of-week |
| 16:14:55 | <geekosaur> | trying to satisfy too many masters, probaly (US vs. Euro) |
| 16:15:10 | <janus> | tomsmeding: what is dodgy about it to you? i don't see Enum specifying any first value. and indeed it shouldn't , since that is for bounded, right? |
| 16:15:10 | <geekosaur> | *probably |
| 16:15:30 | <tomsmeding> | janus: the 1-basedness is dodgy IMO |
| 16:15:32 | <gensyst> | tomsmeding, no it doesn't but my newtype wrapper around it now does |
| 16:15:41 | <tomsmeding> | gensyst: lol yay |
| 16:15:48 | <tomsmeding> | gensyst: it does starting from ghc-9.2.1 |
| 16:15:55 | <gensyst> | lol nice! |
| 16:16:00 | <gensyst> | thanks mates :) |
| 16:16:19 | <gensyst> | i'm scared to upgrade to ghc9.x because of my streamly use |
| 16:16:20 | <tomsmeding> | probably Ord was omitted before in order for the order of constructors not to matter |
| 16:16:27 | × | xaotuk quits (~sasha@2a06:5b00:15fe:9b00::2) (Ping timeout: 240 seconds) |
| 16:16:28 | <gensyst> | streamly could performance degrade suddenly not sure |
| 16:17:00 | <janus> | i guess the Enum class is just super weird and i shouldn't worry about it... |
| 16:17:14 | <tomsmeding> | janus: I think that statement holds in general |
| 16:17:19 | <tomsmeding> | or, it should hold |
| 16:18:00 | <c_wraith> | yeah, the Enum instances for Float and Double should probably never be used. :) |
| 16:18:41 | <c_wraith> | the way Enum is defined, it only really makes sense for Int-like things |
| 16:18:48 | <janus> | c_wraith: is there a way to enforce that with compiler warnings? |
| 16:19:01 | <janus> | or hlint or modulint |
| 16:20:38 | <geekosaur> | I don't think hlint knows enough about types, only about code patterns |
| 16:20:46 | <tomsmeding> | hlint doesn't typecheck |
| 16:20:47 | <EvanR> | does it even make sense for Int-like things... |
| 16:21:30 | <EvanR> | > prev minBound |
| 16:21:32 | <lambdabot> | error: |
| 16:21:32 | <lambdabot> | • Variable not in scope: prev :: t0 -> t |
| 16:21:32 | <lambdabot> | • Perhaps you meant one of these: |
| 16:21:37 | <tomsmeding> | > pred minBound |
| 16:21:37 | <geekosaur> | it should be possibe for it to make sense for anything isomorphic to Int (but ideally, Integer). that doesn't mean it does as implemented |
| 16:21:38 | <lambdabot> | *Exception: Prelude.Enum.().pred: bad argument |
| 16:21:42 | <tomsmeding> | > pred minBound :: Int |
| 16:21:44 | <lambdabot> | *Exception: Prelude.Enum.pred{Int}: tried to take `pred' of minBound |
| 16:23:02 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 16:23:04 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
| 16:23:24 | <janus> | why not return maxBound for 'prev minBound'? |
| 16:23:35 | <tomsmeding> | > minBound - 1 :: Int |
| 16:23:38 | <lambdabot> | 9223372036854775807 |
| 16:23:46 | <tomsmeding> | because the whole point of succ/pred is that they check bounds |
| 16:23:49 | <EvanR> | depends on what laws we're supposed to have |
| 16:24:08 | <EvanR> | yeah "bound" is the give away there xD |
| 16:24:24 | <tomsmeding> | succ is nice for incrementing counters of type Int, because if it ever overflows, at least it'll crash instead of wrap |
| 16:25:26 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 16:25:51 | <EvanR> | sqlite's strategy for incrementing Int, if you try to increment maxBound, go back and roll a random Int until you find an Int not in use, or crash after enough tries xD |
| 16:26:21 | × | Everything quits (~Everythin@37.115.210.35) (Remote host closed the connection) |
| 16:29:46 | × | dsrt^ quits (~dsrt@50.227.69.228) (Remote host closed the connection) |
| 16:29:55 | × | acidjnk quits (~acidjnk@p200300d0c73b452571655f3915a3d16e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 16:30:36 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 16:31:11 | <tomsmeding> | Then you should first define "not in use" lol |
| 16:31:15 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 16:32:13 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 16:32:54 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 16:34:18 | <EvanR> | context would be a table with INTEGER PRIMARY KEY or such |
| 16:36:39 | <tomsmeding> | EvanR: (offtopic) the thing is, the algorithm you describe is linear in the size of the table worst case, but you can do log time if you have a tree index with sizes of each subtree; sqlite (and psql) do have the index, but not the tree sizes and that's dumb |
| 16:36:52 | → | vorpuni joins (~pvorp@2001:861:3881:c690:f0c0:48af:d6b4:5601) |
| 16:37:46 | <tomsmeding> | Not having tree sizes means that SELECT * FROM t OFFSET n; is also linear in n, which is equally dumb |
| 16:37:50 | <tomsmeding> | </rant> |
| 16:41:22 | <EvanR> | how dare you question the universal optimality of "just use a dumb array and loop through it" |
| 16:41:27 | <EvanR> | ism |
| 16:41:29 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:43:20 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:44:33 | → | vicfred joins (~vicfred@user/vicfred) |
| 16:45:43 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 16:46:29 | <EvanR> | (ok not applicable since there's no such thing as an array of size int64) |
| 16:46:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 16:49:05 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
| 16:52:17 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 16:58:35 | <monochrom> | ooohhhh randomization but must not generate duplicates... Knuth's books have a section on that. |
| 16:58:48 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 16:59:21 | × | razetime quits (~quassel@117.254.34.238) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 17:01:58 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 17:03:33 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Quit: alx741) |
| 17:04:22 | → | econo joins (uid147250@user/econo) |
| 17:09:39 | → | CiaoSen joins (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 17:13:58 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:2165:73d6:1630:f174) (Quit: WeeChat 3.5) |
| 17:15:47 | × | CiaoSen quits (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 17:20:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 17:22:43 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 17:30:42 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 17:34:02 | → | werneta joins (~werneta@137.79.197.49) |
| 17:36:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 17:36:27 | × | deadmarshal_ quits (~deadmarsh@95.38.114.81) (Ping timeout: 276 seconds) |
| 17:36:39 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 240 seconds) |
| 17:36:50 | × | irfan quits (~irfan@user/irfan) (Remote host closed the connection) |
| 17:39:14 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:2165:73d6:1630:f174) |
| 17:43:38 | × | acarrico1 quits (~acarrico@dhcp-68-142-48-19.greenmountainaccess.net) (Quit: Leaving.) |
| 17:47:08 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 17:47:47 | <Bulby[m]> | When setting up local hoogle can I search hackage-only packages |
| 17:48:52 | <f-a> | Bulby[m]: does it search anything else? |
| 17:49:13 | <Bulby[m]> | it searches stackage only 🙁 |
| 17:49:29 | <Bulby[m]> | and no hackage docs |
| 17:49:47 | <f-a> | oh |
| 17:50:21 | <dminuoso> | janus: That seems wrong. |
| 17:50:27 | <geekosaur> | the problem with searching hackage is the indexes get too big iirc |
| 17:50:28 | <dminuoso> | Oh gosh. I was scrolled up sorry. |
| 17:50:38 | <dminuoso> | That was re "pred minBound" |
| 17:50:39 | <Bulby[m]> | ... |
| 17:50:54 | <geekosaur> | which is why the default is to search stackage whoich is a reasonable subset |
| 17:51:00 | <Bulby[m]> | can I index only local packages? |
| 17:51:04 | <geekosaur> | yes |
| 17:51:09 | <f-a> | yes |
| 17:51:10 | <f-a> | -l |
| 17:51:15 | <f-a> | when generating |
| 17:51:26 | <Bulby[m]> | would stack throw a wrench in that at all |
| 17:51:28 | <geekosaur> | I forget the incantation but you can tell cabal to create a hoogle index for everything it installs |
| 17:51:39 | <geekosaur> | dunno about stack though, I don't use it |
| 17:51:50 | <geekosaur> | wouldn't surprise me if it had a similar incantation |
| 17:52:45 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:52:58 | <Bulby[m]> | `stack hoogle` why are you installing stuff 😭 |
| 17:53:13 | <geekosaur> | installing a hoogle for stack? |
| 17:53:27 | <geekosaur> | stack has this thing about keeping everything it uses under its own tight control |
| 17:53:38 | <Bulby[m]> | yes. I hope I don't have to do this for each project |
| 17:53:39 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 17:53:51 | <geekosaur> | it should be able to share it |
| 17:54:01 | <Bulby[m]> | it better 🔪 |
| 17:55:25 | <dminuoso> | Im in emacs, how can I stop all HLS processes running? |
| 17:56:09 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 18:02:04 | → | acidjnk joins (~acidjnk@p200300d0c73b452571655f3915a3d16e.dip0.t-ipconnect.de) |
| 18:02:51 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 18:10:35 | → | yauhsien joins (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) |
| 18:11:43 | × | jinsun__ quits (~jinsun@user/jinsun) () |
| 18:12:03 | → | tcsavage joins (~tcsavage@195.213.144.166) |
| 18:16:06 | × | yauhsien quits (~yauhsien@61-231-19-191.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
| 18:16:50 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 18:17:13 | <tomsmeding> | $ ps -eo pid,cmd | grep haskell-language-server | grep -v grep | awk '{print $1}' | xargs kill |
| 18:17:45 | <tomsmeding> | (not being serious0 |
| 18:17:48 | <tomsmeding> | s/0/)/ |
| 18:20:04 | <Bulby[m]> | grep -v grep? |
| 18:20:08 | <Bulby[m]> | lol |
| 18:20:12 | <tomsmeding> | grep will find itself |
| 18:20:38 | <tomsmeding> | I mean, if you actually wanted to make this have any kind of robustness, you'd use ps's built-in functionality for filtering processes |
| 18:20:43 | <Bulby[m]> | what does it do - will it break my system if I run it |
| 18:20:49 | <tomsmeding> | (which, incidentally, I've rarely been able to make work) |
| 18:21:07 | <tomsmeding> | Bulby[m]: it'll kill all HLS processes, including anything else that has 'haskell-language-server' in its command line |
| 18:21:10 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 272 seconds) |
| 18:21:36 | <tomsmeding> | it will likely not break your system, but nevertheless you probably shouldn't run it if you don't have to |
| 18:21:58 | <Bulby[m]> | lol |
| 18:23:39 | <monochrom> | Consider pgrep and pkill. |
| 18:24:06 | → | CiaoSen joins (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 18:24:13 | <tomsmeding> | monochrom: 'pgrep haskell-language-server' returns nothing for me, while there's _definitely_ an HLS running |
| 18:24:25 | <tomsmeding> | and before you ask, 'pgrep haskell-language-server-8.10.7' also returns nothing |
| 18:25:19 | <tomsmeding> | monochrom: https://tomsmeding.com/ss/get/tomsmeding/2nIUHt sorry for text-in-image |
| 18:25:32 | <tomsmeding> | 50% of the time when I try to use pgrep it just... doesn't work |
| 18:25:49 | <Bulby[m]> | yeah wtf |
| 18:27:27 | <monochrom> | That's strange, because if I do "pgrep key", I successfully get one that turns out to be /usr/bin/gnome-keyring-daemon --daemonize --login |
| 18:27:57 | <tomsmeding> | Bulby[m]: more details on "what does it do", for practice reading command lines: 'ps -e' lists all processes, but only the 'pid' and 'cmd' columns; filter on HLS, but not grep itself (which also matches while grep runs, of course); print the first field but ignore leading spaces (different from cut -d' ' -f1); kill all the stuff that comes out |
| 18:28:08 | <tomsmeding> | monochrom: interesting |
| 18:28:49 | <tomsmeding> | monochrom: 'pgrep key' turns up _two_ gnome-keyring-daemon processes for me, with similarly "complex" command lines |
| 18:29:03 | <Bulby[m]> | for me the columns seem to be cut off |
| 18:29:15 | <tomsmeding> | Bulby[m]: on mac? |
| 18:29:20 | <Bulby[m]> | `haskell-languag` |
| 18:29:23 | <Bulby[m]> | on linux |
| 18:29:28 | <monochrom> | It also picks up a "/usr/libexec/gsd-keyboard" and "/usr/libexec/gsd-media-keys" on my ubuntu-laiden laptop. |
| 18:29:31 | <tomsmeding> | Bulby[m]: you're running 'ps -e', not 'ps -eo pid,cmd' |
| 18:29:40 | <Bulby[m]> | oh |
| 18:30:06 | <tomsmeding> | Bulby[m]: default command column is 'comm', which is some crappy AIX legacy compatibility column with limited width; 'cmd' shows the full command |
| 18:30:42 | <tomsmeding> | monochrom: my arch machine doesn't have those, but that's kind of beside the point :p |
| 18:30:44 | × | hexfive quits (~eric@50.35.83.177) (Quit: WeeChat 3.5) |
| 18:30:57 | <tomsmeding> | point is I have no idea what pgrep does |
| 18:31:06 | <Bulby[m]> | haskell-language-server-wrapper is its name |
| 18:31:15 | <geekosaur> | that's just a script |
| 18:31:16 | <Bulby[m]> | odd |
| 18:31:23 | <tomsmeding> | Bulby[m]: that process has a child process with name like 'haskell-language-server-8.10.7' |
| 18:31:46 | <tomsmeding> | if not, then something is going wrong |
| 18:32:06 | <tomsmeding> | the wrapper just detects the project setup and starts the right HLS process, which has a version suffix |
| 18:34:47 | <gensyst> | Is streamly (and other streaming libraries) one of the killer features of Haskell? |
| 18:34:54 | <gensyst> | (What other langs can do this?) |
| 18:34:57 | <gensyst> | this blows my mind |
| 18:35:14 | <gensyst> | others: for loops with state all over the place |
| 18:35:41 | <tomsmeding> | don't Rust iterators try to do a similar thing |
| 18:37:23 | × | kraftwerk28 quits (~kraftwerk@178.62.210.83) (Quit: bruh) |
| 18:38:29 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 18:40:28 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:41:40 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 18:42:13 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 18:43:31 | <shapr> | tomsmeding: I still think memoization of generated values is good low hanging fruit |
| 18:44:58 | <tomsmeding> | shapr: idea: extend `Arbitrary a` with `arbCompare :: a -> a -> Ordering ; default arbCompare :: Ord a => a -> a -> Ordering ; arbCompare = compare` |
| 18:45:06 | <tomsmeding> | (-XDefaultSignatures) |
| 18:45:16 | <tomsmeding> | then only the instances for non-Ord types need to do anything special |
| 18:45:18 | <tomsmeding> | minimal breakage |
| 18:45:53 | × | shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
| 18:46:27 | <tomsmeding> | @tell shapr (alternatively: add an `Ord a` constraint to `quickCheck`, and have `quickCheckNoMemo` without the constraint; but then you can't memoise over arguments but not others) |
| 18:46:27 | <lambdabot> | Consider it noted. |
| 18:46:51 | × | oxide quits (~lambda@user/oxide) (Quit: oxide) |
| 18:56:37 | <gensyst> | tomsmeding, not sure.. |
| 19:00:23 | <Bulby[m]> | killer features? |
| 19:00:33 | <Bulby[m]> | like "good" or "bad"? |
| 19:00:41 | <monochrom> | the good kind |
| 19:03:38 | <monochrom> | I have a cunning plan! Use a Bloom filter. :) |
| 19:04:02 | <f-a> | I am a bit unsure by `location` https://hackage.haskell.org/package/template-haskell-2.10.0.0/docs/Language-Haskell-TH.html#g:2 |
| 19:04:07 | <monochrom> | You don't need guaranteed uniqueness, you just need probably unique. |
| 19:04:28 | <f-a> | does «where the computation is spliced» mean «where I ahve written the function» or «where I am putting $(fun)»? |
| 19:04:50 | <geekosaur> | the latter |
| 19:04:58 | <f-a> | makes sense, thanks |
| 19:05:42 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 19:06:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 19:06:55 | → | xaotuk joins (~sasha@net16-38-245-109.mbb.telenor.rs) |
| 19:07:46 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 19:11:26 | → | shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
| 19:12:39 | <tomsmeding> | monochrom: doesn't a bloom filter have the wrong approximation direction? Like, it will say "definitely not seen" or "maybe seen", whereas what you want is "definitely seen" vs "maybe not seen" |
| 19:13:06 | <EvanR> | I wonder if you formally decreased the database from "guaranteed to work" to "probably works" where probably is incredibly probable, across the board, what kind of improvements you could get. No, not talking about mongo |
| 19:13:08 | <tomsmeding> | if you use a bloom filter to exclude stuff, you're going to skip stuff that you've never _actually_ tried but that happen to match the filter |
| 19:13:13 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 19:13:25 | <shapr> | sounds like I missed some interesting backstory |
| 19:13:47 | <Franciman> | tomsmeding: can't you represent definitely seen as definitely not seen |
| 19:13:48 | → | anomal joins (~anomal@87.227.196.109) |
| 19:13:49 | shapr | checks the logs |
| 19:13:52 | <Franciman> | and maybe seen as maybe not seen? |
| 19:13:58 | <tomsmeding> | shapr: limited :p https://ircbrowse.tomsmeding.com/browse/lchaskell?id=530746#trid530746 |
| 19:14:06 | <EvanR> | shapr, keyword sqlite |
| 19:14:10 | <tomsmeding> | Franciman: not in a boom filter |
| 19:14:15 | <Franciman> | cool |
| 19:14:17 | <monochrom> | tomsmeding: Yeah, there is that issue. |
| 19:14:20 | <tomsmeding> | *bloom |
| 19:14:23 | <tomsmeding> | O.o |
| 19:14:30 | <tomsmeding> | it's not explosive, it's not that bad |
| 19:14:40 | <shapr> | EvanR: eh? sqlite? |
| 19:15:13 | <shapr> | oh, you think QC/Hh could save the generated values into sqlite via https://github.com/nick8325/quickcheck-with-counterexamples ? |
| 19:15:15 | <EvanR> | I think they are talking about generating random unused integers |
| 19:15:16 | <shapr> | hmm |
| 19:15:34 | <tomsmeding> | yeah the talk is about memoisation for quickcheck ;) |
| 19:15:40 | <EvanR> | nevermind! |
| 19:15:45 | <tomsmeding> | currently specialised for integers |
| 19:15:49 | <shapr> | EvanR: sounds like you got it right |
| 19:16:25 | <monochrom> | Please don't be fixated on "it must be memoization". |
| 19:16:41 | <tomsmeding> | right, you only need to "memoise" a boolean |
| 19:16:44 | <shapr> | The goal is "each input is unseen" |
| 19:16:46 | <tomsmeding> | so approximating the set of seen values is fine |
| 19:16:58 | <monochrom> | The Y problem is memoization. The X problem is less chance of duplicates. |
| 19:17:08 | <tomsmeding> | shapr: indeed, but having an approximation that sometimes says "not seen" while it actually is, is fine |
| 19:17:13 | <tomsmeding> | as long as it's usually correct |
| 19:17:27 | <tomsmeding> | monochrom suggested bloom filters, but those have the approximation the other way round |
| 19:19:14 | <dolio> | Franciman: That's the problem with being trained to think in classical logic. Semi-decision problems give you intuitionistic logic. :þ |
| 19:19:24 | <Franciman> | ^^ |
| 19:19:26 | <Franciman> | ahah |
| 19:19:38 | <Franciman> | tru |
| 19:19:56 | <dolio> | So you can't always solve ¬P by solving P and then doing the opposite. |
| 19:20:09 | <dolio> | Or, maybe the other way around. |
| 19:20:15 | <dolio> | Solve P by solving ¬P. |
| 19:20:46 | <monochrom> | :) |
| 19:22:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 19:24:54 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 250 seconds) |
| 19:25:00 | <janus> | dminuoso: if you see Int as a ring, surely prev of minBound should be maxBound. why does it seem wrong to you? You only want it to be a ring if it is unsigned? Just like integer overflow is defined behaviour in C for unsigned types? |
| 19:25:42 | <dminuoso> | The fact that you can see it as that particular ring doesnt mean it should impose the cyclic nature onto every user. |
| 19:26:09 | <janus> | ok, so it is analogous to the argument about monoid |
| 19:26:28 | <janus> | but having it throw an exception also seems to impose a world view upon the user |
| 19:26:35 | <tomsmeding> | especially because when people write Int, they usually intend an approximation of Integer instead of Z/18446744073709551616Z |
| 19:26:52 | <dminuoso> | janus: well that exception is akin to trying `1 <> 1` |
| 19:28:30 | <tomsmeding> | and even if you don't like that usage of Int, a programming language is, unfortunately, intended for humans, not computers :p |
| 19:28:32 | <dminuoso> | I would prefer an pure exception over silently picking *some* value. |
| 19:28:45 | <tomsmeding> | dminuoso++ |
| 19:29:05 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1) |
| 19:29:22 | <monochrom> | Whatever you do, you are imposing your world view upon everyone else. |
| 19:29:27 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 19:29:33 | <monochrom> | It is always personal. |
| 19:29:45 | <monochrom> | The odd is never in your favour. |
| 19:29:47 | <dminuoso> | Perhaps the biggest problem is not the behavior, but your expectancy of Enum here. |
| 19:29:58 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 19:30:18 | <dminuoso> | Enum does not even demand Ord. |
| 19:30:46 | <tomsmeding> | is there an Enum instance where Ord does not correspond to the implied instance over the mapping to Int with fromEnum/toEnum |
| 19:30:49 | <dolio> | Being a ring where addition wraps doesn't imply anything about a linear ordering on the values of said ring. |
| 19:31:24 | <monochrom> | On even days I use Int for its Z/kZ ness. On odd days I use it as small Integer, somehow knowing the range is enough. |
| 19:31:33 | <dminuoso> | dolio: Was not trying to imply that. My point is rather that there's no clear semantics of what `pred minBound` in general would even mean. |
| 19:31:35 | × | gensyst quits (gensyst@user/gensyst) (Quit: Leaving) |
| 19:31:35 | × | cheater quits (~Username@user/cheater) (Read error: Connection reset by peer) |
| 19:32:05 | <monochrom> | All both days I use 8GB RAM as small Turing tape, somehow knowing the range is enough. So there. |
| 19:32:19 | <dolio> | What I'm saying is that it's perfectly consistent to think that arithmetic should wrap and succ should throw an exception on the maximum element. |
| 19:32:20 | → | cheater joins (~Username@user/cheater) |
| 19:32:40 | <monochrom> | Sometimes I go to 16GB RAM, I confess, but that's when it's AOE4. |
| 19:32:41 | <janus> | i sometimes use Word instead of Int, just to avoid the import i'd have to have if i used Word32 or whatever :P |
| 19:32:43 | → | Pickchea joins (~private@user/pickchea) |
| 19:33:06 | <janus> | everybody dirty in their own way :P |
| 19:33:10 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 19:33:22 | <dolio> | dminuoso: I don't think you were contradicting what I meant. |
| 19:33:23 | <dminuoso> | dolio: then I pull the "programming experience teaches" card that reads under/overflow is only defined for unsigned in C. |
| 19:34:14 | <dolio> | I don't pay any credence to what C does. |
| 19:34:34 | <geekosaur> | C does what is convenient for the compiler author |
| 19:34:45 | <geekosaur> | on that platform |
| 19:34:49 | <dminuoso> | The expectancy that arithmeitc should wrap only exists precisely because some languages have given these semantics toyou. |
| 19:35:12 | <dminuoso> | WEll not perhaps you personally, but I claim this will hold true for most users. |
| 19:35:24 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 19:36:12 | <janus> | dminuoso: but people are doing performant elliptic curve cryptography using finite fields. so your assertion only makes sense if you include 'math' in 'some languages' |
| 19:36:59 | <tomsmeding> | if you're doing cryptography you better do whatever is necessary to get absolute guarantees on your working types |
| 19:37:17 | <tomsmeding> | "it would be convenient if the standard Int does what I need" doesn't count there |
| 19:37:18 | <EvanR> | janus, i think it's less about "what Int is really" and what behavior do we want from our types |
| 19:37:38 | <EvanR> | and how to get it |
| 19:37:58 | <dminuoso> | Besides, you might reasonably expect `pred x < x` to hold for Int. |
| 19:38:43 | <janus> | given the choice between pred x < x and 'no partial functions in base', i am still not convinced i wouldn't get further with the latter |
| 19:39:01 | <EvanR> | that's a problem with Enum not Int |
| 19:39:17 | <EvanR> | arguably (a problem) |
| 19:40:10 | <tomsmeding> | janus: all this is subjective, but I, for one, would prefer an exception on overflow than wrapping by default |
| 19:40:27 | <tomsmeding> | one should be able to _get_ wrapping, because it's useful sometimes, but usually it's not intended and then an exception would be nicer |
| 19:40:42 | <Cale> | I don't like succ and pred being in Enum at all, they're silly. |
| 19:40:53 | <tomsmeding> | of course trapping on all wrapping arithmetic is a performance issue so we don't do that, but I still prefer `pred minBound == _|_` over wrapping |
| 19:41:03 | <tomsmeding> | if you want the performant version, use `- 1` |
| 19:41:20 | <dminuoso> | I dont like Enum in the first place. |
| 19:41:28 | <dminuoso> | The whole class has weirdness. |
| 19:41:28 | <dolio> | How do you measure "usually it's not intended"? |
| 19:41:32 | <Cale> | There should be two classes: one for toEnum/fromEnum, and the other for the list .. syntax interpretations |
| 19:41:42 | <EvanR> | I would bet most use cases involve some unchecked proof sitting around that overflow or underflow won't happen so doesn't matter how to handle it. Or else the proof is wrong, fix your code |
| 19:41:51 | <koz> | @pl \(k, v) -> (,) <$> go k <*> go v |
| 19:41:51 | <lambdabot> | uncurry ((((,) <$>) .) . (. go) . (<*>) . go) |
| 19:41:57 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.5) |
| 19:41:57 | <koz> | LOL, yeah nope. |
| 19:42:02 | <geekosaur> | I should dig out my list thread on Enum/Bounded from years ago :) |
| 19:42:06 | <tomsmeding> | dolio: by personal experience, rarely have I written Int while actually expecting, using and accepting wrapping behaviour |
| 19:42:13 | <EvanR> | ^ |
| 19:42:49 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 19:43:14 | <dminuoso> | tomsmeding: Of course now the argument could be made, that you might reasonably expect `pred = (-(1))` to hold |
| 19:43:17 | <EvanR> | because euclid didn't invent geometry on a square tile of size N feet |
| 19:44:06 | <tomsmeding> | :t \go -> uncurry (liftA2 (,)) . bimap go go |
| 19:44:09 | <lambdabot> | Applicative f => (a -> f b) -> (a, a) -> f (b, b) |
| 19:44:12 | <tomsmeding> | koz: ^ ? |
| 19:44:15 | <Cale> | koz: liftA2 (liftA2 (,)) (go . fst) (go . snd) |
| 19:44:16 | <dminuoso> | Cale: toEnum/fromEnum dont belong anywhere. |
| 19:44:17 | <janus> | EvanR: what did euclid believe about the size of the universe ? |
| 19:44:19 | <dminuoso> | Not even a separate class. |
| 19:44:37 | <tomsmeding> | now koz can choose! |
| 19:44:52 | <geekosaur> | euclid wasn't talking about the universe, he was talking about pure geometry |
| 19:44:55 | <EvanR> | janus, are we doing finitism now? xD |
| 19:45:08 | <janus> | yes, i am advancing to the next level |
| 19:45:08 | <tomsmeding> | dminuoso: I _guess_, but /shrug/ (about pred = (-(1))) |
| 19:45:11 | <EvanR> | I use smokescreen and escape |
| 19:45:30 | <koz> | Thanks, that's a bit nicer. Still prefer an explicit lambda. |
| 19:45:35 | <tomsmeding> | eys |
| 19:45:37 | <tomsmeding> | *yes |
| 19:45:43 | → | chexum_ joins (~quassel@gateway/tor-sasl/chexum) |
| 19:45:43 | <koz> | (making your colleagues want to punch you is _not_ a good idea) |
| 19:45:48 | <dminuoso> | tomsmeding: I guess we can file this under "designing programming languages is hard, making choices is harder - but it's very easy to disagree with any design choice" |
| 19:45:53 | <Cale> | (honestly, I also wouldn't go that far with the points-free, though I might convert it to use a single liftA2) |
| 19:45:58 | <geekosaur> | (even in Euclid's time there was an estimate for the Earth's diameter, iirc) |
| 19:46:11 | <koz> | geekosaur: Yep, Aristarches figured that out. |
| 19:46:21 | <koz> | (possible sp of that name) |
| 19:46:22 | <tomsmeding> | koz: I had a nice one a while ago https://ircbrowse.tomsmeding.com/day/lchaskell/2022/04/25?id=527198#trid527198 |
| 19:46:43 | <tomsmeding> | dminuoso: agreed :p, makes me think of https://wiki.haskell.org/Wadler's_Law |
| 19:47:56 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
| 19:48:21 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 19:48:22 | → | tiferrei joins (~tiferrei@user/tiferrei) |
| 19:48:44 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 19:49:34 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 240 seconds) |
| 19:49:34 | <tomsmeding> | like, this is technically semantics, but it's so minor in the overall language that it qualifies for wadler's law IMO |
| 19:49:47 | <janus> | geekosaur: i'd like to read your mailing list post if you find it |
| 19:50:15 | <geekosaur> | haven't been looking, but it was more a point that this debate has been going on *at least* since 2006 |
| 19:50:20 | <geekosaur> | and probvably before |
| 19:50:43 | <geekosaur> | we did work out a reasonable new set of classes, but it died there because no chance of it ever happening |
| 19:50:44 | <janus> | probvably = probably provably? |
| 19:50:50 | <geekosaur> | "probably" |
| 19:50:57 | <geekosaur> | my typing sucks :) |
| 19:50:59 | <janus> | :P |
| 19:51:17 | <janus> | geekosaur: did idris not take some of those ideas? |
| 19:51:33 | <janus> | or purescript? |
| 19:51:50 | <geekosaur> | no idea |
| 19:52:15 | <geekosaur> | tempted to hope they sidestepped the whole question |
| 19:52:25 | <EvanR> | the version of idris I was using just copied the Enum class as is |
| 19:52:39 | <geekosaur> | that they were reasonable didn't mean they were essential |
| 19:52:41 | <geekosaur> | ew |
| 19:52:46 | <EvanR> | except Int was changed to Nat |
| 19:52:59 | × | vorpuni quits (~pvorp@2001:861:3881:c690:f0c0:48af:d6b4:5601) (Ping timeout: 240 seconds) |
| 19:53:10 | <janus> | Welcome to Idris 2. Enjoy yourself! |
| 19:53:10 | <janus> | the Nat (-1) |
| 19:53:11 | <janus> | 0 |
| 19:53:24 | <janus> | doesn't seem like it has negative numbers |
| 19:53:32 | <EvanR> | Nat indeed starts at zero |
| 19:53:43 | <tomsmeding> | (as it should) |
| 19:53:46 | <EvanR> | instead of -2 like homotopy type theory |
| 19:53:51 | <koz> | I believe there was an addendum to Wadler's law about records. :P |
| 19:54:20 | <tomsmeding> | syntax for records is contentious to this very day |
| 19:54:50 | <dolio> | Homotopy levels start at 0. Only category bozos try to move things back to -2. |
| 19:54:54 | <monochrom> | I don't like programmers saying "this is usually unexpected" to mean "this annoys me". |
| 19:55:08 | <tomsmeding> | simply add "... by me" |
| 19:55:28 | <EvanR> | principle of least surprised ... by me |
| 19:55:49 | <Franciman> | dolio: sometimes i've seen them start at -1, with \pi_{-1}(X) = {0} <- trivial group |
| 19:56:26 | <monochrom> | I'm all for voicing "IMO mutable variables are nice", but against bending that to "why would anyone not want mutable variables?" |
| 19:56:59 | <monochrom> | It is always personal. |
| 19:57:48 | <Franciman> | well one reason is that mutability with laziness can be a nightmare |
| 19:57:59 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 19:58:04 | <Franciman> | and completely remove referential transparency for the whole program |
| 19:58:15 | <EvanR> | yet we have MVars that by default accept a lazy value when mutated |
| 19:58:28 | <dolio> | Franciman: is there a point to doing that? Is it just defined the same for every space? |
| 19:59:36 | <Franciman> | EvanR: but the mutation happens strictly, no? |
| 19:59:39 | <Franciman> | it is not delayed |
| 19:59:49 | <Franciman> | you set the new value to a thunk |
| 20:00:00 | × | Brandon_IX quits (brandon@2a01:7e00::f03c:92ff:feab:6b7c) (Changing host) |
| 20:00:00 | → | Brandon_IX joins (brandon@user/Brandon-IX/x-0442192) |
| 20:00:04 | <EvanR> | the IO action stands for that, up to you when it is executed xD |
| 20:00:27 | <Franciman> | dolio: hm not sure, for homology groups it makes sense |
| 20:00:42 | <Franciman> | because of the sequence. Maybe in homotopy is just to copy ahah (joking, but i saw it sometimes) |
| 20:00:42 | <dolio> | Does it actually vary for those? |
| 20:00:55 | <Franciman> | no, it's defined as {0} invariably |
| 20:01:45 | <Franciman> | so you can define \delta (x) = 0 |
| 20:02:00 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:02:19 | <Franciman> | and ker \delta = C_0(X), and im \delta = {0} |
| 20:02:29 | <Franciman> | hence H_0(X) = C_0(X) |
| 20:02:45 | <janus> | seems like idris does have 'pred', but it is only for Nat and 'pred 0 = 0' holds |
| 20:03:04 | <janus> | and underflow on Int wraps |
| 20:03:09 | <dolio> | Oh, so it's a special case for simpler bootstrapping or something. |
| 20:03:12 | <Franciman> | dolio: basically in this way you avoid defining H_0(X) in an ad hoc way |
| 20:03:46 | <Franciman> | and going further you can also define C_{-2} = {0} lol, so you also have H_{-1}(X) = {0} |
| 20:03:59 | <Franciman> | but this seems to be of zero use |
| 20:04:05 | <dolio> | Cubical agda did have a bunch of different natural number types starting at different values at some point, but I think they dropped them and standardized on 0. |
| 20:05:26 | <dolio> | I think one of them started at -1, but I don't remember what used that. |
| 20:05:47 | → | Topsi joins (~Tobias@dyndsl-095-033-094-053.ewe-ip-backbone.de) |
| 20:05:53 | → | nucranium joins (~nucranium@2a02:8010:6173:0:8102:5ccd:28d9:3575) |
| 20:07:23 | <EvanR> | janus, careful because they have overlapping names. There may be pred for Nat in one module, pred in a class from another module |
| 20:08:05 | × | dextaa4 quits (~dextaa@user/dextaa) (Remote host closed the connection) |
| 20:08:10 | <EvanR> | (possibly) |
| 20:08:32 | <janus> | oh. i imported Data.Bits and i get Data.Nat.pred |
| 20:08:55 | <janus> | and yeah, pred is not in the prelude |
| 20:09:42 | <EvanR> | maybe idris 2 dropped Enum xD\ |
| 20:12:04 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4) |
| 20:13:15 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 20:16:39 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:21:22 | → | abrantesasf joins (~abrantesa@177.137.232.91) |
| 20:22:33 | → | nattiestnate joins (~nate@202.138.250.17) |
| 20:24:12 | × | benin quits (~benin@183.82.204.110) (Quit: The Lounge - https://thelounge.chat) |
| 20:29:44 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:30:12 | → | pavonia joins (~user@user/siracusa) |
| 20:32:13 | <remexre> | ugh, does LLVM-backend GHC not reap zombies? |
| 20:32:35 | <remexre> | just checked htop, >1/2 my total assigned PIDs are gcc zombies of HLS |
| 20:34:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 20:35:44 | <geekosaur> | g*c*c? LLVM backend doesn't use gcc, it uses opt and lld |
| 20:36:16 | <geekosaur> | gcc is used for CApiFFI and for foreign export stubs, among other things |
| 20:36:34 | <remexre> | would one of those include template haskell perhaps? |
| 20:36:42 | <geekosaur> | no |
| 20:37:26 | <geekosaur> | ghc stopped compiling via C years ago, HLS doesn't even support versions that do it |
| 20:37:34 | <geekosaur> | (7.x iirc) |
| 20:38:19 | <remexre> | idk how it's happening, but I have screenshots to prove it :P |
| 20:38:43 | <geekosaur> | so the only time gcc is used is when it needs to be compatible with C linkage during FFI |
| 20:39:06 | <geekosaur> | or c2hs/hsc2hs |
| 20:39:48 | × | tiferrei quits (~tiferrei@user/tiferrei) (Remote host closed the connection) |
| 20:40:00 | <remexre> | I don't _think_ I'm using any of those |
| 20:40:02 | <remexre> | definitely not directly |
| 20:40:13 | <remexre> | https://photos.app.goo.gl/hZpoE9LQgF9FVmcN8 anyway |
| 20:40:47 | × | geranim0 quits (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Remote host closed the connection) |
| 20:41:01 | <geekosaur> | I would ask about that in #haskell-language-server |
| 20:41:14 | <remexre> | ok |
| 20:41:41 | → | tiferrei joins (~tiferrei@user/tiferrei) |
| 20:42:53 | → | Guest2725 joins (~Guest27@2601:281:d47f:1590::bc8f) |
| 20:43:39 | × | tiferrei quits (~tiferrei@user/tiferrei) (Remote host closed the connection) |
| 20:44:14 | <Guest2725> | What's the best networking lib for a beginner? `network` recommends `network-simple`, `connection`, or `hookup` |
| 20:47:30 | <exarkun> | a beginner programmer, a beginner haskell programmer, or a beginner network programmer |
| 20:48:47 | <Guest2725> | First one. The goal is implementing toy clients/servers for various protocols |
| 20:49:52 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:55:38 | → | roconnor joins (~roconnor@coq/roconnor) |
| 20:57:09 | × | michalz quits (~michalz@185.246.204.125) (Remote host closed the connection) |
| 21:01:15 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 21:01:58 | × | alp_ quits (~alp@user/alp) (Ping timeout: 250 seconds) |
| 21:08:04 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:13:27 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 21:13:30 | <EvanR> | when I was a beginner I went with sockets.h and man pages |
| 21:14:04 | <EvanR> | and significant flailing |
| 21:16:25 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:16:46 | <janus> | Guest2725: i would work with websockets because then you can get an attractive client that motivates you with a good debugger (browser inspector) |
| 21:16:53 | <janus> | Guest2725: and you get framing for free |
| 21:17:21 | <janus> | but i guess it depends what kinda protocols you want to implement |
| 21:19:05 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 256 seconds) |
| 21:21:09 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 21:23:16 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 21:24:50 | × | chddr quits (~Thunderbi@91.226.35.182) (Ping timeout: 272 seconds) |
| 21:24:55 | <EvanR> | websockets is cool but comes with its own gotchas |
| 21:26:48 | × | nucranium quits (~nucranium@2a02:8010:6173:0:8102:5ccd:28d9:3575) (Ping timeout: 248 seconds) |
| 21:28:30 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 246 seconds) |
| 21:30:15 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 246 seconds) |
| 21:30:32 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 21:31:05 | <EvanR> | Guest2725, note that forkIO threads or the async library, along with GHCs runtime, makes some aspects of networking much nicer without buying into a full netlib suite |
| 21:31:58 | <EvanR> | which I'd think wouldn't work anyway since you're going for "various protocols" |
| 21:35:26 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 21:35:49 | → | chddr joins (~Thunderbi@91.226.35.182) |
| 21:38:06 | <Guest2725> | EvanR Just to make sure I understand, you're recommending plain sockets and Haskell's native async? |
| 21:38:07 | <Guest2725> | janus What does "framing" mean? |
| 21:38:46 | <janus> | Guest2725: many protocols are based on 'messages', but tcp is 'stream' based |
| 21:38:48 | <EvanR> | async is a library built on forkIO threads to make waiting for side tasks easier and deal with corner cases |
| 21:39:37 | <janus> | Guest2725: so something sent in one call to send(2) could be divided up and received over multiple calls to recv(2) |
| 21:39:42 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 246 seconds) |
| 21:39:44 | <janus> | or vice versa |
| 21:40:11 | <Guest2725> | Ohh okay, I gotchu |
| 21:40:44 | <EvanR> | websockets gives you messages, whereas tcp builds a stream interface on the underlying messages of IP xD |
| 21:40:57 | <EvanR> | websocket message -> tcp stream -> internet messages |
| 21:41:00 | <EvanR> | lol |
| 21:41:39 | <EvanR> | "make up your mind" |
| 21:42:09 | <Guest2725> | I desire MOAR ABSTRACTIONS |
| 21:42:31 | <EvanR> | and wait for it, a big use case for websockets is... STREAMING |
| 21:43:22 | <Guest2725> | Hmm yes, abstraction ouroboros |
| 21:44:51 | → | eggplantade joins (~Eggplanta@108.201.191.115) |
| 21:45:49 | → | stackdroid18 joins (14094@user/stackdroid) |
| 21:45:53 | → | zeenk joins (~zeenk@2a02:2f0e:7603:9c01:4e89:6ef1:76e9:3685) |
| 21:47:50 | <monochrom> | Can't blame them. The main use case for internet messages is... streaming, too. See "tcp stream -> internet messages". :) |
| 21:48:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 21:48:49 | <monochrom> | Unpopular opinion: 99% of bandwidth is spent on reinventing message delimiters >:) |
| 21:48:59 | × | eggplantade quits (~Eggplanta@108.201.191.115) (Ping timeout: 240 seconds) |
| 21:49:24 | <geekosaur> | or re-uninventing |
| 21:49:54 | → | king_gs joins (~Thunderbi@187.201.77.157) |
| 21:50:58 | <geekosaur> | flip side this is why so many protocols are text based |
| 21:50:59 | × | chddr quits (~Thunderbi@91.226.35.182) (Remote host closed the connection) |
| 21:51:29 | <Bulby[m]> | nobody likes binary |
| 21:52:27 | × | tcsavage quits (~tcsavage@195.213.144.166) (Quit: tcsavage) |
| 21:53:01 | <janus> | everybody with tooling has no issue with binary, but most people don't have tooling :P |
| 21:54:50 | <janus> | i don't understand, what is the link between text-based and streaming? |
| 21:58:16 | × | zeenk quits (~zeenk@2a02:2f0e:7603:9c01:4e89:6ef1:76e9:3685) (Ping timeout: 248 seconds) |
| 21:58:24 | × | werneta quits (~werneta@137.79.197.49) (Ping timeout: 272 seconds) |
| 21:59:17 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 21:59:26 | → | alp_ joins (~alp@user/alp) |
| 21:59:57 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
| 22:02:34 | <geekosaur> | text is variable length, so fits well with streaming |
| 22:03:05 | <geekosaur> | whereas you need to either pad or break up into segments (or use a length delimited protocol) with message based |
| 22:03:37 | <mrianbloom> | Let's say I have a GADT based expression type that includes a unary operation Op1 :: Unary a b -> Expr a -> Expr b. Where Unary is another GADT with several different operations. I want to write a mapping function that parses the expression tree and replaces any Unary with certain type with another Unary of the same type. Is this possible? |
| 22:05:04 | × | Topsi quits (~Tobias@dyndsl-095-033-094-053.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 22:10:59 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
| 22:13:01 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 22:13:24 | × | Guest2725 quits (~Guest27@2601:281:d47f:1590::bc8f) (Quit: Client closed) |
| 22:13:36 | → | Guest2764 joins (~Guest27@2601:281:d47f:1590::bc8f) |
| 22:13:42 | → | werneta joins (~werneta@137.79.197.49) |
| 22:15:58 | → | xff0x_ joins (~xff0x@om126167099166.29.openmobile.ne.jp) |
| 22:18:01 | × | dhil quits (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
| 22:21:19 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 22:22:40 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 22:22:54 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 22:23:26 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 22:24:42 | → | liz joins (~liz@host109-151-125-217.range109-151.btcentralplus.com) |
| 22:24:42 | × | xaotuk quits (~sasha@net16-38-245-109.mbb.telenor.rs) (Read error: Connection reset by peer) |
| 22:25:36 | × | CiaoSen quits (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 22:27:00 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 276 seconds) |
| 22:28:42 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:28:50 | × | king_gs quits (~Thunderbi@187.201.77.157) (Read error: Connection reset by peer) |
| 22:29:16 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 22:30:18 | → | king_gs joins (~Thunderbi@187.201.77.157) |
| 22:31:43 | × | matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in) |
| 22:31:59 | × | kilolympus quits (~kilolympu@31.205.200.235) (Ping timeout: 240 seconds) |
| 22:31:59 | → | matijja joins (~matijja@193.77.181.201) |
| 22:34:25 | <abastro[m]> | You mean you want to write such function concisely? |
| 22:36:05 | × | matijja quits (~matijja@193.77.181.201) (Client Quit) |
| 22:39:08 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 22:39:21 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 276 seconds) |
| 22:39:52 | → | matijja joins (~matijja@193.77.181.201) |
| 22:40:44 | <mrianbloom> | Yes, or somewhat polymorphically. |
| 22:42:09 | <mrianbloom> | Let me put it this way if I have a function f :: Unary Int Bool -> Unary Int Bool, I'd like to just map over every Unary Int Bool in the expression. |
| 22:42:47 | <geekosaur> | isn't that something like Generics or Uniplate? |
| 22:43:02 | <mrianbloom> | But the expression might also include Unary Float Char and I'd want to ignore those depending on the type of f. |
| 22:44:31 | <mrianbloom> | Really I'm looking for an example of this type of mapping in some existing code that uses GADTs. |
| 22:44:50 | <EvanR> | what does "might include" mean xD |
| 22:44:55 | <mrianbloom> | I |
| 22:44:59 | <EvanR> | is there a dynamic wrapper |
| 22:45:19 | × | Guest2764 quits (~Guest27@2601:281:d47f:1590::bc8f) (Quit: Client closed) |
| 22:45:27 | × | acidjnk quits (~acidjnk@p200300d0c73b452571655f3915a3d16e.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 22:45:50 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 22:45:58 | <EvanR> | since types don't exist at runtime you can't depend directly on it |
| 22:46:03 | <mrianbloom> | Well I have multiple constructors in my Unary data type and they have different inputs and outputs. |
| 22:46:13 | <EvanR> | oh ok dynamic wrapper |
| 22:48:43 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection) |
| 22:49:42 | <mrianbloom> | Sure, maybe the problem is that in a given Expression tree you have Unary wrappers, so to define a function like mapExprOp1 :: (Unary a b -> Unary a b) -> Expr t -> Expr t doesn't work since there is no way to marshall when the mapping actually happens. |
| 22:51:06 | <mrianbloom> | i.e. when I case over an Expr node, I still can't match Unary a b to whatever Unary it's encountering in the tree. |
| 22:52:15 | <mrianbloom> | I might just be using GADTs very wrong :) |
| 22:53:43 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 22:54:21 | <EvanR> | if you case over an Expr t GADT, the t becomes revealed within that case to the type checker, so there's that |
| 22:57:29 | <mrianbloom> | I actually was able to do that sucessfully in another function. Writing a generalized mapping though is complicated it seems. |
| 22:58:41 | <EvanR> | two possibilities when trying to write code but can't figure out the types: what you're doing doesn't make sense, or else it makes sense but the type system isn't good enough to express it, |
| 22:58:45 | <EvanR> | ok at least two possibilities |
| 22:59:35 | <EvanR> | but if you could determine those two cases ahead of time, saves a lot of work xD |
| 22:59:36 | × | akurilin_ quits (uid322841@id-322841.ilkley.irccloud.com) (Quit: Connection closed for inactivity) |
| 23:00:48 | × | king_gs quits (~Thunderbi@187.201.77.157) (Ping timeout: 276 seconds) |
| 23:03:42 | × | werneta quits (~werneta@137.79.197.49) (Ping timeout: 246 seconds) |
| 23:05:49 | → | lbseale_ joins (~quassel@ip72-205-127-212.sb.sd.cox.net) |
| 23:06:32 | × | lbseale_ quits (~quassel@ip72-205-127-212.sb.sd.cox.net) (Changing host) |
| 23:06:32 | → | lbseale_ joins (~quassel@user/ep1ctetus) |
| 23:06:55 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Quit: Leaving) |
| 23:08:47 | × | anomal quits (~anomal@87.227.196.109) (Remote host closed the connection) |
| 23:08:56 | lbseale_ | is now known as lbseale |
| 23:09:06 | → | anomal joins (~anomal@87.227.196.109) |
| 23:10:44 | × | ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec) |
| 23:12:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 23:13:01 | → | raehik joins (~raehik@82.21.176.157) |
| 23:13:06 | × | nattiestnate quits (~nate@202.138.250.17) (Quit: WeeChat 3.5) |
| 23:14:12 | × | lbseale quits (~quassel@user/ep1ctetus) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 23:14:52 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 23:18:22 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 23:21:56 | × | Brandon_IX quits (brandon@user/Brandon-IX/x-0442192) (Quit: WeeChat 3.0) |
| 23:23:19 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 23:24:18 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 23:24:33 | <mrianbloom> | Hmmm... |
| 23:25:13 | × | srk quits (~sorki@user/srk) (Ping timeout: 260 seconds) |
| 23:25:33 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 23:25:48 | × | redb quits (~nmh@136.49.49.211) (Ping timeout: 272 seconds) |
| 23:29:26 | <mrianbloom> | I think I got it, f :: (forall a b . Unary a b -> Unary a b). That just compiled. |
| 23:30:03 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 276 seconds) |
| 23:30:34 | <mrianbloom> | So my map function has type: mapExprOp1 :: (forall a b . Unary a b -> Unary a b) -> Expr t -> Expr t |
| 23:31:13 | <mrianbloom> | You nede Rank2Types enabled for that to work. |
| 23:31:19 | <EvanR> | makes sense |
| 23:31:23 | <mrianbloom> | *need |
| 23:31:55 | <mrianbloom> | Thank you for the emotional support during my time of type-crisis. |
| 23:32:20 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 23:32:23 | → | king_gs joins (~Thunderbi@187.201.77.157) |
| 23:33:08 | <EvanR> | if i understood the situation correctly, you could even change the type from a to a' in the process? |
| 23:34:09 | <mrianbloom> | I'm not sure. I think basically my f function needs to case over every type of Unary constructor in order to type check now. |
| 23:34:21 | <EvanR> | nope never mind I see where a is also used |
| 23:35:53 | <EvanR> | sometimes when editing subexpressions you can get away with (potentially) changing the type |
| 23:36:08 | <EvanR> | if so, you get the non-changing version as a bonus anyway |
| 23:37:19 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 23:38:23 | → | redb joins (~nmh@136.49.49.211) |
| 23:38:34 | → | srk joins (~sorki@user/srk) |
| 23:40:18 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 23:41:48 | × | alp_ quits (~alp@user/alp) (Ping timeout: 240 seconds) |
| 23:43:15 | × | redb quits (~nmh@136.49.49.211) (Ping timeout: 246 seconds) |
| 23:43:34 | × | anomal quits (~anomal@87.227.196.109) (Remote host closed the connection) |
| 23:43:53 | → | anomal joins (~anomal@87.227.196.109) |
| 23:45:19 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 23:46:56 | → | slack1256 joins (~slack1256@191.125.99.87) |
| 23:47:25 | × | fendor[m] quits (~fendormat@2001:470:69fc:105::fcbd) (Ping timeout: 240 seconds) |
| 23:47:25 | × | yosef36 quits (~yosefweis@2001:470:69fc:105::1:e501) (Ping timeout: 240 seconds) |
| 23:47:25 | × | boxscape quits (~boxscape@user/boxscape) (Ping timeout: 240 seconds) |
| 23:47:49 | × | vaibhavsagar[m] quits (~vaibhavsa@2001:470:69fc:105::ffe) (Ping timeout: 240 seconds) |
| 23:47:49 | × | Inst[m] quits (~instrmatr@2001:470:69fc:105::1:903e) (Ping timeout: 240 seconds) |
| 23:47:49 | × | juhp[m] quits (~juhpmatri@2001:470:69fc:105::6e9) (Ping timeout: 240 seconds) |
| 23:48:16 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 23:48:46 | → | juhp[m] joins (~juhpmatri@2001:470:69fc:105::6e9) |
| 23:48:57 | → | vaibhavsagar[m] joins (~vaibhavsa@2001:470:69fc:105::ffe) |
| 23:49:04 | → | Inst[m] joins (~instrmatr@2001:470:69fc:105::1:903e) |
| 23:49:28 | × | abrantesasf quits (~abrantesa@177.137.232.91) (Remote host closed the connection) |
| 23:50:33 | → | yosef36 joins (~yosefweis@2001:470:69fc:105::1:e501) |
| 23:50:43 | → | fendor[m] joins (~fendormat@2001:470:69fc:105::fcbd) |
| 23:50:45 | → | boxscape joins (~boxscape@user/boxscape) |
| 23:51:46 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 23:52:02 | → | redb joins (~nmh@136.49.49.211) |
| 23:52:27 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::aa1d) |
| 23:53:19 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 23:56:13 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 23:56:42 | × | redb quits (~nmh@136.49.49.211) (Ping timeout: 276 seconds) |
| 23:58:27 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 23:58:27 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 23:58:27 | → | wroathe joins (~wroathe@user/wroathe) |
All times are in UTC on 2022-04-27.