Logs on 2020-11-13 (freenode/#haskell)
| 00:00:01 | × | AstroDroid quits (~AstroDroi@84.39.117.57) () |
| 00:07:52 | × | machinedgod quits (~machinedg@207.253.244.210) (Quit: Reconnecting) |
| 00:08:16 | → | machinedgod joins (~machinedg@207.253.244.210) |
| 00:10:07 | → | crdrost joins (~crdrost@2601:646:8280:85f0:6046:db55:79c6:4622) |
| 00:11:55 | × | star_cloud quits (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 00:11:55 | × | stree quits (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) (Quit: Caught exception) |
| 00:12:13 | → | stree joins (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) |
| 00:13:21 | → | star_cloud joins (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) |
| 00:13:31 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) |
| 00:16:02 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 00:17:02 | × | argent0 quits (~argent0@168.227.98.81) (Quit: leaving) |
| 00:17:35 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 00:18:28 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-2-77.w83-200.abo.wanadoo.fr) (Ping timeout: 272 seconds) |
| 00:19:22 | → | christo joins (~chris@81.96.113.213) |
| 00:20:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:21:11 | × | veverak quits (~squirrel@ip-89-102-98-161.net.upcbroadband.cz) (Quit: WeeChat 2.3) |
| 00:21:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 00:24:13 | × | sim590 quits (~sim590@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 264 seconds) |
| 00:24:58 | → | taio joins (~enrik@p200300ceaf3ada00997810ade8eb1ff9.dip0.t-ipconnect.de) |
| 00:25:31 | → | squirrel1 joins (~squirrel@ip-89-102-98-161.net.upcbroadband.cz) |
| 00:25:45 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-107-7.w86-212.abo.wanadoo.fr) |
| 00:26:42 | × | jespada quits (~jespada@90.254.245.49) (Ping timeout: 272 seconds) |
| 00:27:54 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:28:54 | → | hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 00:29:10 | → | jespada joins (~jespada@90.254.245.49) |
| 00:30:18 | squirrel1 | is now known as veverak |
| 00:31:03 | × | hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
| 00:32:30 | <taio> | Hello; I have a question about the understanding of instances: Since instances are automatically (implicitly) loaded from modules, it is not possible to manually determine which instance is to be used. consequently "orphaned" instances lead to conflicts. But why didn't a rule be introduced that local instances within a module are preferred over global ones? If the functions are called in another module, the local |
| 00:32:32 | <taio> | instances are always used for these functions. |
| 00:32:42 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 00:33:49 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 00:33:52 | <Axman6> | there is only allowed to be one instance of a class for a type |
| 00:34:07 | <Axman6> | and that mean globally |
| 00:34:26 | <Axman6> | s* |
| 00:37:28 | → | jespada_ joins (~jespada@90.254.245.49) |
| 00:38:09 | <taio> | I know ... but I asked whether it would be unproblematic to introduce local instances that would be preferred for all functions of the respective module. |
| 00:38:21 | × | jespada quits (~jespada@90.254.245.49) (Ping timeout: 256 seconds) |
| 00:38:56 | <monochrom> | Your mechanism allows two code paths to see and use two different instances for the same type and the same class. |
| 00:39:20 | <monochrom> | Any mechanism that achieves that will have to answer the following question: |
| 00:40:23 | <monochrom> | On one code path I use one Ord instance of Int to build a binary search tree containing Ints. Clearly, this binary search tree makes sense only under the comparator I used when it's built. |
| 00:41:12 | <monochrom> | I now pass this binary search tree to the other code path. It uses, nay, assumes, a different comparator. Now it tries to use this other incompatible comparator to try to do BST lookup. |
| 00:41:23 | <monochrom> | WHAT THE HELL IS WITH THAT? |
| 00:44:02 | <monochrom> | https://open.kattis.com/problems/outofsorts |
| 00:44:03 | × | hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
| 00:44:57 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 00:45:14 | → | coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) |
| 00:46:21 | → | hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 00:47:17 | hekkaidekapus_ | is now known as hekkaidekapus |
| 00:47:51 | <taio> | this situation would only occur if I used the functions from that module where local instances are defined. If I don't want these alternative implementations, then I won't use the functions. |
| 00:48:12 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 00:49:10 | <monochrom> | I'm passing one data structure from one module to another. What function? |
| 00:49:43 | <monochrom> | The recipient module is using its own function to try to make sense of this binary tree. |
| 00:49:52 | <monochrom> | And that's exactly the wrong thing to do. |
| 00:51:47 | <monochrom> | Alternatively, tell me how your mechanism forbids me from doing what I said I planned to do. |
| 00:52:49 | → | hcchien joins (~hcchien@217.146.82.202) |
| 00:54:09 | <SrPx> | What is a good / efficient structure to represent bitstring? I.e., equivalent of: `data Bits = Empty | Bit0 Bits | Bit1 Bits` ? With fast pattern-matching, concatenation and equality? |
| 00:54:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 00:54:58 | <SrPx> | And appending of a bit* |
| 00:55:38 | <taio> | the instance would be selected indirectly via the functions: |
| 00:55:40 | <taio> | Module M1 has its own instance for Ord T, which overshadows the global instance Ord T ONLY for functions of this module. the module M1 has the sorting function s. |
| 00:55:53 | <taio> | Everywhere outside of this module where I call s from M1, the local instance Ord T is used. That is predictable and known. I don't understand what's problematic about that. |
| 00:56:22 | <hpc> | SrPx: store it in ByteString and build your operations on that |
| 00:56:43 | <SrPx> | but isn't ByteString slow for concatenation and appending? |
| 00:57:10 | <SrPx> | says cons is O(n) on docs https://hackage.haskell.org/package/bytestring-0.11.0.0/docs/Data-ByteString.html |
| 00:57:27 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:57:35 | → | conal joins (~conal@64.71.133.70) |
| 00:58:11 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 00:58:12 | <monochrom> | The BST insert function is in M1. Which comparator does it use? The BST lookup function is outside M1. Which comparator does it use? |
| 00:58:16 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Ping timeout: 258 seconds) |
| 00:59:51 | <taio> | ok i think i understand what you mean now. In my module M1 I could use a function of another module, which expects this global instance Ord T in order to work as expected. |
| 01:00:45 | <monochrom> | You could. But people won't. |
| 01:01:40 | <monochrom> | If I s/Ord/Monad/ to create another example, you will have a hard time convincing people to "don't do that". |
| 01:02:53 | <monochrom> | If M1 has its own instance Monad (State s), and outside M1 there is another, you really can't convince people to "don't write '>>=' both inside M1 and outside; or if you do, don't let the two pieces of code ever see each other". |
| 01:03:18 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 01:04:14 | <monochrom> | People will really be writing code like M1.a1 Outside.>>= some_f, where M1.a1 is defined with M1.>>= |
| 01:04:24 | <monochrom> | Hilarity shall ensue. |
| 01:05:37 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 01:09:18 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 01:13:22 | <taio> | hmmm ok; |
| 01:13:23 | <taio> | another idea: |
| 01:13:25 | <taio> | A mechanism is introduced to take over an existing type class - possibly under a new name - in another module so that the methods are in a different namespace. |
| 01:13:26 | <taio> | The advantage would be that all existing instances are also taken over, but can be overwritten by new instances according to the existing rules. |
| 01:13:28 | <taio> | The selection would be made via the namespace. |
| 01:15:43 | × | ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Ping timeout: 240 seconds) |
| 01:18:03 | → | ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 01:20:10 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) |
| 01:20:12 | × | borne quits (~fritjof@200116b86423eb004fbf5cd6c83663b1.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 01:20:28 | <unclechu> | hey, can someone remind me what `|` means here? `type Demote k = (r :: Type) | r -> k` |
| 01:21:04 | <taio> | for example like this: adopt Ord as My Ord |
| 01:21:06 | <taio> | instance My Ord ... where ... |
| 01:23:08 | → | TxGuy joins (~coffee2th@172-125-238-23.lightspeed.rcsntx.sbcglobal.net) |
| 01:24:28 | × | TxGuy quits (~coffee2th@172-125-238-23.lightspeed.rcsntx.sbcglobal.net) (Client Quit) |
| 01:25:46 | <monochrom> | https://mail.haskell.org/pipermail/haskell-cafe/2017-May/127147.html |
| 01:26:49 | × | devalot quits (~ident@mail.pmade.com) (Quit: ZNC - http://znc.in) |
| 01:27:08 | <monochrom> | (highest density of puns in a title ever, heehee) |
| 01:27:25 | <dsal> | unclechu: It's just a sum type like Bool |
| 01:27:27 | <dsal> | @src Bool |
| 01:27:27 | <lambdabot> | data Bool = False | True deriving (Eq, Ord) |
| 01:28:38 | dsal | suddenly very distracted by that deriving list |
| 01:28:45 | <dsal> | I'm glad I don't have to write base |
| 01:29:02 | → | Lord_of_Life joins (~Lord@46.217.223.48) |
| 01:30:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:30:28 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 01:30:35 | <solonarv> | dsal: no, that is not a sum type (cc: unclechu ) |
| 01:30:49 | × | Lord_of_Life_ quits (~Lord@46.217.216.229) (Ping timeout: 264 seconds) |
| 01:31:12 | <solonarv> | that's an injectivity annotation (InjectiveTypeFamilies), which uses similar syntax to FunctionalDependencies |
| 01:31:31 | <dsal> | I just noticed `type` there. Been writing wrong language all day. |
| 01:31:35 | <monochrom> | fancy |
| 01:32:22 | <dsal> | Sorry for spreading my confusion. |
| 01:32:23 | <solonarv> | both (r :: Type) and r -> k would be illegal syntax in that position of a data declaration |
| 01:32:28 | <monochrom> | Yeah I suffer a bit of language mix-up too. After having written a fair amount of Racket, I wrote in C "(for i=0" |
| 01:32:35 | <monochrom> | and "(if i==0" |
| 01:33:32 | <dsal> | solonarv: Yeah, I'm at my least smart of the day. |
| 01:33:40 | <dsal> | I was writing go all day. |
| 01:34:07 | <solonarv> | same tbh, I've been up for 20 hours now and had a bunch of various brain-using things to do all day |
| 01:34:17 | <monochrom> | Further in the past, when I was writing both Java and Haskell, I wrote "public class Ord where" |
| 01:34:45 | <monochrom> | Aw, up for 20 hours, that kills, you need sleep. |
| 01:34:52 | <unclechu> | solonarv: thanks |
| 01:34:58 | dsal | is having a sleep deprivation conversation in another chat |
| 01:35:04 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 258 seconds) |
| 01:35:34 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:35:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 01:35:45 | <taio> | ok thanks for answering... |
| 01:35:51 | <monochrom> | Actually a short nap helps tremendously. |
| 01:36:45 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 240 seconds) |
| 01:37:55 | <monochrom> | My experience leads me to hypothesize that if you are working hard and sleep-deprived like this, if you are OK with taking short naps, your body switches to the uber-sleep mode, giving you the much fabled superpower of uber-sleep. |
| 01:38:00 | <hekkaidekapus> | Another sleepless here: taio, fancy a paper? |
| 01:40:16 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:40:17 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 01:41:14 | <taio> | hm I'm not an academic. it's just an idea of mine. and I wonder if that would be possible or unproblematic. |
| 01:42:26 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) |
| 01:42:44 | <hekkaidekapus> | taio: “Type classes in Haskell” by C.V. Hall, K. Hammomd, S.L.P. Jones and P.L. Wadler <http://web.mit.edu/ghc/old.ghc/programatica/tools.old/semantics/Overloading/Related/p109-hall.pdf> |
| 01:44:07 | <hekkaidekapus> | You can skip the gnary parts and you will still get the gist of why you wanted to do was fundamentally problematic. |
| 01:44:08 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 01:45:32 | <hekkaidekapus> | Caveat: That paper covers what is now known as ‘Haskell 98’. Since 1998, there have been many additions to instance resolution mechanics. |
| 01:46:35 | × | jathan quits (~jathan@69.61.93.38) (Quit: WeeChat 2.3) |
| 01:46:36 | <hekkaidekapus> | *S.L. Peyton Jones |
| 01:46:43 | <taio> | well Idris has "named implementations" and it seems to work, to have proven itself. |
| 01:46:47 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) (Client Quit) |
| 01:46:57 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 258 seconds) |
| 01:47:13 | <hekkaidekapus> | Idris is a whole other beast. |
| 01:48:24 | <unclechu> | i have a GADT `Stdout ∷ α `OneOf` '[ 'Play, 'Render ] ⇒ Backend α` (where `OneOf` is a type family which constrain an element to be in a list). |
| 01:48:26 | <unclechu> | i want to define a type-class which would convert type-level values to runtime values so i defined it like this: `class ToVal (α ∷ τ) where toVal ∷ Proxy (α ∷ τ) → τ` |
| 01:48:27 | <unclechu> | but this `instance ToVal ('Stdout ∷ Backend 'Play) where toVal Proxy = Stdout` fails with `it has an unpromotable context ‘OneOf α '[ 'Play, 'Render]’` |
| 01:48:34 | <unclechu> | can i do something about it? |
| 01:49:15 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) |
| 01:50:02 | × | kish` quits (~oracle@unaffiliated/oracle) (Remote host closed the connection) |
| 01:51:02 | × | neightchan quits (~natechan@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 01:52:27 | <unclechu> | i cannot define any type with that constrainer constructor: `type Test = '[ 'Stdout ] :: [Backend 'Play]` fails with “unpromotable context” |
| 01:52:40 | → | blankhart joins (~blankhart@pool-100-35-219-3.nwrknj.fios.verizon.net) |
| 01:53:01 | → | nahcetan joins (~natechan@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 01:53:58 | <unclechu> | constrained* |
| 01:55:15 | × | Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 260 seconds) |
| 01:56:37 | × | electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
| 01:56:52 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 01:59:36 | × | taio quits (~enrik@p200300ceaf3ada00997810ade8eb1ff9.dip0.t-ipconnect.de) (Quit: Konversation terminated!) |
| 02:00:11 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:00:11 | × | Collateral quits (~Collatera@4e69b241.skybroadband.com) (Ping timeout: 246 seconds) |
| 02:00:26 | × | Hijiri quits (~Hijiri@104.236.61.10) (Ping timeout: 272 seconds) |
| 02:06:32 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:07:19 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 02:07:40 | <blankhart> | let is treated as a core language construct rather than as sugar for a lambda and application in some presentations like write you a haskell. is let generalization the reason for this? are there others? |
| 02:09:26 | <monochrom> | That and recursion. |
| 02:09:51 | <dolio> | What does it mean to be a 'core language construct'? The dynamic semantics in Haskell are given in terms of other things, but the type checking is different. |
| 02:10:05 | <dolio> | In the Haskell report, I mean. |
| 02:10:51 | × | tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Remote host closed the connection) |
| 02:10:51 | <blankhart> | fair, i was just referring to type checking |
| 02:12:15 | → | devalot joins (~ident@mail.pmade.com) |
| 02:12:22 | → | sim590 joins (~sim590@modemcable090.207-203-24.mc.videotron.ca) |
| 02:13:55 | → | tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io) |
| 02:14:12 | <blankhart> | monochrom, is the recursion point that you need to separate out let in order to have proper binding groups? i am not quite there yet in studying this so the question may be premature |
| 02:14:34 | <blankhart> | but that is what i took you to mean |
| 02:14:54 | <blankhart> | oh nevermind i think i see |
| 02:15:21 | <blankhart> | you can't have a recursive (anonymous) lambda |
| 02:15:50 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) |
| 02:15:52 | <monochrom> | :) |
| 02:15:55 | <unclechu> | correct me if my assumption if i’m wrong: using GADTs with constraints on type-level is currently impossible in haskell? |
| 02:16:02 | <unclechu> | is my assumption is wrong* |
| 02:16:19 | <unclechu> | if my assumption*.. you get it |
| 02:19:17 | → | g-belmonte joins (~g-belmont@2804:14c:8786:9312:3638:eaf5:dc36:146d) |
| 02:19:25 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 264 seconds) |
| 02:21:42 | → | erisco joins (~erisco@d24-57-249-233.home.cgocable.net) |
| 02:22:31 | → | conal joins (~conal@64.71.133.70) |
| 02:24:39 | <bqv> | unclechu: per my simple understanding, yes |
| 02:25:13 | <unclechu> | bqv: okay, thanks |
| 02:25:50 | <unclechu> | bqv: is there any chance you know whether it is supported in idris for instance? |
| 02:26:08 | <bqv> | No clue :p |
| 02:29:32 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 02:32:36 | × | xsperry quits (~as@unaffiliated/xsperry) (Ping timeout: 256 seconds) |
| 02:34:18 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 256 seconds) |
| 02:36:02 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds) |
| 02:36:10 | × | lucasb quits (uid333435@gateway/web/irccloud.com/x-lsuvezrsvbepowff) (Quit: Connection closed for inactivity) |
| 02:36:23 | → | Unhammerd joins (~Unhammer@gateway/tor-sasl/unhammer) |
| 02:38:23 | × | Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds) |
| 02:41:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 02:45:28 | <unclechu> | to overcome this i added additional *promotable* type `data SBackend = SStdout | ...etc` |
| 02:46:05 | <unclechu> | and added a type class `class SBackendVal (α ∷ Operation) (β ∷ SBackend) where sBackendVal ∷ Proxy β → Backend α` |
| 02:46:49 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 02:47:07 | × | xff0x quits (~fox@2001:1a81:53be:a900:e888:cf37:a0ae:58b2) (Ping timeout: 260 seconds) |
| 02:49:01 | → | xff0x joins (~fox@2001:1a81:53f2:4b00:a4e6:ede5:b1af:2468) |
| 02:49:49 | × | m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 258 seconds) |
| 02:50:50 | → | jedws joins (~jedws@101.184.175.183) |
| 02:51:08 | <MarcelineVQ> | "<unclechu> bqv: is there any chance you know whether it is supported in idris for instance?" constraints on the actual "data ..." line or constraints on the data constructors that follow it? Could be more fruitful to say what/why you're wanting to do instead of whether it's possible |
| 02:51:49 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 264 seconds) |
| 02:52:21 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 02:52:59 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 02:59:27 | <MarcelineVQ> | That being said though yes you can use gadts with constraints at the type level in idris |
| 02:59:55 | → | Audentity joins (~Audentity@4e69b241.skybroadband.com) |
| 03:00:01 | × | hcchien quits (~hcchien@217.146.82.202) () |
| 03:00:03 | <MarcelineVQ> | Do you need that class or would a type family do the job you're after? |
| 03:02:28 | × | solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Ping timeout: 258 seconds) |
| 03:05:05 | <unclechu> | MarcelineVQ: less boilerplate for instance. more flexibility. in my case i had to add an another type which mostly just duplicates original type |
| 03:05:27 | × | g-belmonte quits (~g-belmont@2804:14c:8786:9312:3638:eaf5:dc36:146d) (Quit: Leaving) |
| 03:06:15 | <unclechu> | MarcelineVQ: type families do not exist in runtime. i was writing a type class in order to be able to make a runtime value from type-level value. |
| 03:06:34 | <unclechu> | just to shift it from type-level to runtime level in other words |
| 03:07:02 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 03:07:07 | × | clog quits (~nef@bespin.org) (Ping timeout: 260 seconds) |
| 03:07:23 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 03:08:26 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:10:35 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 03:11:47 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 03:13:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 03:17:23 | → | aarvar joins (~foewfoiew@50.35.43.33) |
| 03:26:14 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 258 seconds) |
| 03:26:51 | → | Tario joins (~Tario@201.192.165.173) |
| 03:27:48 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 03:28:23 | → | Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) |
| 03:31:58 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 246 seconds) |
| 03:35:50 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:38:09 | → | jedws joins (~jedws@101.184.175.183) |
| 03:38:51 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) (Ping timeout: 260 seconds) |
| 03:43:25 | × | elliott_ quits (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 03:43:35 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) |
| 03:47:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:49:22 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 272 seconds) |
| 03:50:08 | × | machinedgod quits (~machinedg@207.253.244.210) (Ping timeout: 260 seconds) |
| 03:50:18 | → | elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) |
| 03:55:39 | → | Guest87092 joins (~variable@139.28.218.148) |
| 03:57:59 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 03:58:01 | lagothrix | is now known as Guest77095 |
| 03:58:01 | × | Guest77095 quits (~lagothrix@unaffiliated/lagothrix) (Killed (hitchcock.freenode.net (Nickname regained by services))) |
| 03:58:07 | → | lagothrix joins (~lagothrix@unaffiliated/lagothrix) |
| 03:58:13 | × | theDon quits (~td@muedsl-82-207-238-200.citykom.de) (Ping timeout: 246 seconds) |
| 04:00:09 | × | haasn quits (~nand@mpv/developer/haasn) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 04:00:13 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 04:00:16 | → | theDon joins (~td@muedsl-82-207-238-116.citykom.de) |
| 04:00:21 | → | Rudd0 joins (~Rudd0@185.189.115.98) |
| 04:01:36 | → | haasn joins (~nand@mpv/developer/haasn) |
| 04:01:43 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 04:01:57 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-ezpbwntcbzeneljs) (Quit: Connection closed for inactivity) |
| 04:08:06 | × | ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection) |
| 04:08:35 | × | crdrost quits (~crdrost@2601:646:8280:85f0:6046:db55:79c6:4622) (Quit: This computer has gone to sleep) |
| 04:08:41 | → | ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 04:08:43 | → | Tario joins (~Tario@201.192.165.173) |
| 04:08:58 | × | erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: Leaving) |
| 04:09:21 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 04:09:41 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:11:37 | × | texasmynsted quits (~texasmyns@212.102.45.118) (Read error: Connection reset by peer) |
| 04:13:47 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 260 seconds) |
| 04:15:49 | × | darjeeling_ quits (~darjeelin@122.245.210.116) (Ping timeout: 264 seconds) |
| 04:16:14 | → | darjeeling_ joins (~darjeelin@122.245.210.116) |
| 04:18:48 | → | whatisRT joins (~whatisRT@2002:5b41:6a33:0:d89f:d10e:927a:2962) |
| 04:21:06 | → | jakob_ joins (~textual@p200300f49f16220035a786c99145f1b1.dip0.t-ipconnect.de) |
| 04:22:22 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 04:24:28 | × | texasmynsted_ quits (~texasmyns@99.96.221.112) (Ping timeout: 246 seconds) |
| 04:26:42 | × | verement quits (~anonymous@cpe-76-167-229-223.san.res.rr.com) (Quit: verement) |
| 04:27:26 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 04:27:48 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 04:27:51 | → | texasmynsted joins (~texasmyns@99.96.221.112) |
| 04:32:27 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) (Ping timeout: 260 seconds) |
| 04:33:20 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 04:33:27 | × | elliott_ quits (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Read error: Connection reset by peer) |
| 04:34:11 | → | elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) |
| 04:34:27 | × | acidjnk_new quits (~acidjnk@p200300d0c718f66175ef21b7256ec1f4.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 04:34:46 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 04:35:39 | → | verement joins (~anonymous@cpe-76-167-229-223.san.res.rr.com) |
| 04:35:48 | → | jedws joins (~jedws@101.184.175.183) |
| 04:35:57 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds) |
| 04:38:50 | × | nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving) |
| 04:39:06 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 04:39:43 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 04:42:02 | <jakob_> | Hey people, beginner question here: I want to look for a specific constructor in a list and i'm not sure whats the elegant way to do it. Here is what i came up with https://pastebin.com/e5QX1wpr Is there a nicer way to achieve what i want? |
| 04:42:32 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:43:28 | → | jedws joins (~jedws@101.184.175.183) |
| 04:43:30 | <bqv> | looks about as good as you'll get, to me |
| 04:45:20 | × | jedws quits (~jedws@101.184.175.183) (Client Quit) |
| 04:45:55 | → | conal joins (~conal@64.71.133.70) |
| 04:47:36 | <jakob_> | actually the type MyNum has a lot of constructors (in my non example code its MyValue) and i want a check for every constructor. That would mean writing a lot these isMy... functions |
| 04:48:58 | <bqv> | well in that case, why not make a newtyped Eq instance which only compares the constructor |
| 04:50:15 | <bqv> | then you can do e.g. any (\x -> TypeOf x == MyRationalType) |
| 04:50:26 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 04:50:52 | × | conal quits (~conal@64.71.133.70) (Ping timeout: 256 seconds) |
| 04:54:16 | <jakob_> | ah, that sounds like a neat idea. I'll try it |
| 04:54:45 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 240 seconds) |
| 04:55:27 | × | renzhi quits (~renzhi@2607:fa49:655f:e600::28da) (Ping timeout: 260 seconds) |
| 04:55:52 | <dsal> | > [Left 1, Left 2, Left 3, Right 4, Left 5] ^? folded . _Right -- jakob_ non-beginner answer for LOL |
| 04:55:54 | <lambdabot> | Just 4 |
| 04:56:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:56:57 | <bqv> | lenses solve everything |
| 04:57:27 | <dsal> | The cause of, and solution to... |
| 05:01:06 | <dsal> | `myDouble :: MyNum -> Just Double` is probably more useful, though. |
| 05:01:15 | <dsal> | er, Maybe |
| 05:01:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 05:02:39 | → | clog joins (~nef@bespin.org) |
| 05:04:47 | × | polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 260 seconds) |
| 05:07:18 | → | jedws joins (~jedws@101.184.175.183) |
| 05:07:57 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 05:07:57 | → | Jonkimi727406120 joins (~Jonkimi@119.123.240.220) |
| 05:10:25 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 05:11:01 | <jakob_> | bqv this is not what you suggested i suppose? https://pastebin.com/m5gh6TrS |
| 05:11:31 | <bqv> | ah, not quite |
| 05:11:49 | <jakob_> | i thought so ;) |
| 05:12:23 | <jakob_> | do you have a hint what you would go for |
| 05:12:23 | × | motte quits (~weechat@unaffiliated/motte) (Ping timeout: 260 seconds) |
| 05:12:37 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds) |
| 05:13:10 | <dsal> | bqv's suggestion involved making a newtype called TypeOf |
| 05:13:49 | <bqv> | jakob_: think i overthought that one, pastebin.com/z4SvV5wr |
| 05:15:02 | <dsal> | I still think the is* model is probably not great. |
| 05:15:43 | <bqv> | hard to tell, without more info |
| 05:16:38 | <jakob_> | dsal yes, the maybe version might be helpful indeed. I'll try it after i got this one working |
| 05:16:50 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 05:17:24 | <dsal> | e.g.: |
| 05:17:26 | <bqv> | it's probably simpler codewise, thanks to makePrisms |
| 05:17:43 | <dsal> | > myInteger (MyDouble 3) |
| 05:17:45 | <lambdabot> | Nothing |
| 05:17:50 | <dsal> | > myInteger (MyInteger 3) |
| 05:17:52 | <lambdabot> | Just 3 |
| 05:17:55 | <dsal> | :t myInteger |
| 05:17:56 | <lambdabot> | MyNum -> Maybe Integer |
| 05:18:02 | <dsal> | :t isJust . myInteger |
| 05:18:03 | <lambdabot> | MyNum -> Bool |
| 05:18:15 | → | uhrenmacher joins (~uhrenmach@p4fc078af.dip0.t-ipconnect.de) |
| 05:18:24 | → | jedws joins (~jedws@101.184.175.183) |
| 05:18:50 | <bqv> | i just suggested the more direct route because it's a lot less boilerplate |
| 05:18:55 | × | uhrenmacher quits (~uhrenmach@p4fc078af.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 05:20:07 | <dsal> | Sure, it's a shorter path to the stated goal. I just don't like the goal. :) |
| 05:20:27 | <bqv> | simple questions get simple answers :p |
| 05:20:41 | <dsal> | Yeah, I'm trying to remember how to write a prism by hand. |
| 05:20:49 | <bqv> | :t prism |
| 05:20:51 | <lambdabot> | (Choice p, Applicative f) => (b -> t) -> (s -> Either t a) -> p a (f b) -> p s (f t) |
| 05:20:52 | <bqv> | :t prism' |
| 05:20:53 | <lambdabot> | (Choice p, Applicative f) => (b -> s) -> (s -> Maybe a) -> p a (f b) -> p s (f s) |
| 05:23:45 | <jakob_> | bvq https://pastebin.com/d30J3Usw thanks for the hint. |
| 05:25:05 | × | denisse quits (~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection) |
| 05:25:25 | → | denisse joins (~spaceCat@gateway/tor-sasl/alephzer0) |
| 05:26:39 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@66.115.189.209) |
| 05:30:07 | <koz_> | :t confusing |
| 05:30:09 | <lambdabot> | Applicative f => LensLike (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data.Functor.Yoneda.Yoneda f)) s t a b -> LensLike f s t a b |
| 05:30:35 | <Axman6> | :t confusing traverse |
| 05:30:36 | <lambdabot> | (Applicative f, Traversable t) => LensLike f (t a) (t b) a b |
| 05:30:36 | × | whatisRT quits (~whatisRT@2002:5b41:6a33:0:d89f:d10e:927a:2962) (Read error: Connection reset by peer) |
| 05:31:07 | → | day_ joins (~Unknown@unaffiliated/day) |
| 05:33:01 | <bqv> | confusing is confusing |
| 05:33:37 | <bqv> | aiui it's effect isn't visible at type-level so it's weird |
| 05:34:11 | × | Jonkimi727406120 quits (~Jonkimi@119.123.240.220) (Ping timeout: 265 seconds) |
| 05:34:29 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:34:40 | × | day quits (~Unknown@unaffiliated/day) (Ping timeout: 265 seconds) |
| 05:34:40 | day_ | is now known as day |
| 05:35:00 | <Axman6> | it's secret make go faster juice |
| 05:35:19 | <bqv> | :D |
| 05:38:35 | <koz_> | :t confusing fmap |
| 05:38:37 | <lambdabot> | Applicative f => LensLike f (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data.Functor.Yoneda.Yoneda f) a) (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data. |
| 05:38:37 | <lambdabot> | Functor.Yoneda.Yoneda f) b) a b |
| 05:42:30 | <bqv> | :t lens . has . confusing . elements |
| 05:42:31 | <lambdabot> | error: |
| 05:42:31 | <lambdabot> | • Couldn't match type ‘Gen a’ |
| 05:42:31 | <lambdabot> | with ‘(a0 |
| 05:42:37 | <bqv> | darn |
| 05:42:42 | <bqv> | that worked on a repl |
| 05:43:21 | <bqv> | :: (Traversable t1, Functor f) => (Int -> Bool) -> (t1 a -> b -> t2) -> (Bool -> f b) -> t1 a -> f t2 |
| 05:44:24 | → | AbhayAysola joins (312587e9@49.37.135.233) |
| 05:45:12 | <koz_> | What package(s) did those identifiers come from? |
| 05:45:16 | → | Jonkimi727406120 joins (~Jonkimi@119.123.240.220) |
| 05:45:21 | <koz_> | I think lambdabot might have something else for one or more of them. |
| 05:45:30 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 05:45:33 | <koz_> | :t is |
| 05:45:34 | <lambdabot> | error: |
| 05:45:34 | <lambdabot> | • Variable not in scope: is |
| 05:45:34 | <lambdabot> | • Perhaps you meant one of these: |
| 05:45:37 | <koz_> | :( |
| 05:45:39 | <bqv> | they'll all be from lens, for me |
| 05:45:42 | <Axman6> | % :t lens . has . confusing . elements |
| 05:45:42 | <yahb> | Axman6: ; <interactive>:1:26: error:; * Variable not in scope: elements :: a -> LensLike (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda (Const Control.Monad.RWS.Any)) (Data.Functor.Yoneda.Yoneda (Const Control.Monad.RWS.Any))) s s a0 a0; * Perhaps you meant one of these: `Q.elements' (imported from Test.QuickCheck), `Lens.elements' (imported from Control.Lens), `element' (imported from |
| 05:45:45 | × | monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER) |
| 05:46:00 | hackage | trade-journal 0.0.2 - https://hackage.haskell.org/package/trade-journal-0.0.2 (JohnWiegley) |
| 05:46:24 | <koz_> | A better question: what does 'lens . has . confusing . elements' do? |
| 05:46:44 | <bqv> | that's above my pay grade |
| 05:46:56 | × | AbhayAysola quits (312587e9@49.37.135.233) (Remote host closed the connection) |
| 05:47:17 | <dsal> | has confuses me without needing confusing |
| 05:47:50 | <koz_> | :t has |
| 05:47:51 | <lambdabot> | Getting Any s a -> s -> Bool |
| 05:48:05 | <koz_> | Isn't that just like, generalized member? |
| 05:48:22 | <koz_> | (also, 'Getting Any' makes me giggle) |
| 05:48:40 | <bqv> | it's true if the prism matches |
| 05:48:42 | <bqv> | that's all i know |
| 05:49:59 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds) |
| 05:50:11 | × | benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-jujlikfcmwauxivg) (Quit: Connection closed for inactivity) |
| 05:50:52 | → | jathan joins (~jathan@69.61.93.38) |
| 05:57:58 | → | monochrom joins (trebla@216.138.220.146) |
| 06:00:02 | × | Guest87092 quits (~variable@139.28.218.148) () |
| 06:02:14 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@66.115.189.209) (Quit: Leaving) |
| 06:06:51 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-odsmdwwzesbrmhor) |
| 06:09:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 06:12:07 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 256 seconds) |
| 06:12:19 | × | Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection) |
| 06:14:28 | <dminuoso> | jakob_: Do you want to extract all values matching that constructor? |
| 06:14:45 | <dminuoso> | Or just determine whether any value in the list was constructed with the given constructor? |
| 06:16:38 | <jakob_> | dminuoso i don't care about the values, just about the constructors |
| 06:17:26 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 06:17:45 | <bqv> | if you wanna get real spicy, you could probably use Typeable to get the constructor name |
| 06:18:07 | <dminuoso> | % anyLeft xs = any [x | Left x <- xs ] |
| 06:18:08 | <yahb> | dminuoso: ; <interactive>:88:18: error:; * Couldn't match expected type `a1 -> Bool' with actual type `[a]'; * In the first argument of `any', namely `[x | Left x <- xs]'; In the expression: any [x | Left x <- xs]; In an equation for `anyLeft': anyLeft xs = any [x | Left x <- xs]; * Relevant bindings include; xs :: [Either a b] (bound at <interactive>:88:9); anyLeft :: [Eithe |
| 06:18:28 | <dminuoso> | oh |
| 06:18:39 | <dminuoso> | % anyLeft xs = not (null [x | Left x <- xs ]) |
| 06:18:39 | <yahb> | dminuoso: |
| 06:19:40 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 06:19:51 | <dminuoso> | % anyLeft' = has (folded . _Left) |
| 06:19:52 | <yahb> | dminuoso: |
| 06:20:47 | <bqv> | % anyLeft [Left 1, Right 2] |
| 06:20:47 | <yahb> | bqv: True |
| 06:20:50 | <bqv> | neat |
| 06:20:58 | <bqv> | list comprehensions are magic |
| 06:21:21 | <dminuoso> | They're really just a bit more mathy looking interface for Monad. |
| 06:21:28 | <dminuoso> | (And some MonadPlus) |
| 06:21:59 | <bqv> | yeah, i've used list in do form |
| 06:22:07 | <bqv> | but i didn't realise you could guard in a comprehension |
| 06:22:14 | × | reallymemorable quits (~quassel@2601:180:8300:8fd0:c5df:6e57:bcff:c1bb) (Ping timeout: 264 seconds) |
| 06:22:54 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 06:23:06 | <jakob_> | dminuoso nice! List comprehensions for the win :) |
| 06:23:10 | <jakob_> | thx |
| 06:24:01 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds) |
| 06:26:56 | × | echoreply quits (~echoreply@unaffiliated/echoreply) (Quit: WeeChat 1.9.1) |
| 06:27:23 | → | echoreply joins (~echoreply@unaffiliated/echoreply) |
| 06:27:50 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 06:28:34 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:30:37 | × | Jonkimi727406120 quits (~Jonkimi@119.123.240.220) (Ping timeout: 258 seconds) |
| 06:31:46 | <dsal> | I almost never use comprehensions for some reason. |
| 06:32:20 | <bqv> | i used a do list yesterday |
| 06:32:31 | <bqv> | because feels nicer than comprehension form |
| 06:32:39 | <bqv> | and i needed a guard |
| 06:32:57 | <dsal> | Haskell and emacs both seem to have this thing in common where there are so many things I can't even remember what all the things are. Not so much that I don't know how to use them, but that I forget they exist. |
| 06:33:13 | <dsal> | Yeah, do + guard is pretty awesome for lists. |
| 06:33:21 | → | ggole joins (~ggole@2001:8003:8119:7200:cd0:562c:261b:241d) |
| 06:33:26 | <jakob_> | about list comprehensions: i thought they were implemented in terms of map and concat? Nothing to to with monads |
| 06:33:56 | <bqv> | if that were the case, what dminuoso did would be impossible, i think |
| 06:35:31 | × | mmohammadi9812 quits (~mmohammad@80.210.53.226) (Quit: Quit) |
| 06:35:39 | <jakob_> | https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-420003.11 |
| 06:35:59 | <dsal> | haskell tutorials often confuse what a thing is with what you can do with the thing. |
| 06:36:11 | <bqv> | dsal: i find azure cloud also has that feature. unfortunately it comes in the "everything is constantly broken in an obscure way, and what isn't broken is only working due to the most unsightly of hacks" edition |
| 06:36:41 | <dsal> | I can't even read the "new features we've added to AWS" emails anymore. |
| 06:37:25 | <dsal> | Does lambdabot have an undo for list comprehensions? |
| 06:37:43 | <dsal> | @miscomprehend [x | x <- [1..], odd ] |
| 06:37:43 | <lambdabot> | Unknown command, try @list |
| 06:39:19 | <dsal> | @undo do { Just x <- xs; pure x } |
| 06:39:19 | <lambdabot> | xs >>= \ a -> case a of { Just x -> pure x; _ -> fail ""} |
| 06:39:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:40:20 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:40:30 | <dsal> | > let xs = [Left 1, Right 2, Left 3, Right 4] in do { Right x <- xs; pure x } |
| 06:40:32 | <lambdabot> | [2,4] |
| 06:40:41 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 06:40:50 | <dsal> | > let xs = [Left 1, Right 2, Left 3, Right 4] in [ x | Left x <- xs ] |
| 06:40:52 | <lambdabot> | [1,3] |
| 06:41:13 | → | feliocrat joins (~feliocrat@95.70.185.239) |
| 06:43:22 | <dsal> | I used this mechanism of guarding yesterday, and still don't ever think about it. |
| 06:43:30 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-kihpfdwzdbjfjvbb) (Quit: Connection closed for inactivity) |
| 06:44:59 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 06:45:27 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 06:49:53 | <suzu_> | thats pretty cool |
| 06:50:18 | <bqv> | "miscomprehend" lmao |
| 06:53:01 | <koz_> | uncomprehend, surely? |
| 06:53:08 | <koz_> | Which would be like... 'misunderstand'? |
| 06:54:36 | → | asheshambasta joins (~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be) |
| 06:55:46 | × | coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 256 seconds) |
| 06:56:36 | → | aki_ joins (~aki_@139.28.218.148) |
| 06:57:49 | <dsal> | It was the nearest word I could find at the time. |
| 06:58:54 | <dsal> | I can't find that thing I thought I did yesterday. It's the one where you use are in a monad and you want a maybe monad real quick that's also a guard, so you `Just x <- pure (some maybe monad stuff)` |
| 06:59:45 | <dsal> | @undo do { Just x <- pure someMaybeMonadStuff; do x } -- I guess that's the same, but it feels different. |
| 06:59:45 | <lambdabot> | pure someMaybeMonadStuff >>= \ a -> case a of { Just x -> x; _ -> fail ""} |
| 07:00:20 | <dsal> | Also, I just said `do x` when I meant `pure x` |
| 07:00:23 | × | hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection) |
| 07:00:47 | → | hekkaidekapus joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 07:01:08 | <dsal> | @undo do { Just x <- pure maybeGetMeSomeAction; x } |
| 07:01:08 | <lambdabot> | pure maybeGetMeSomeAction >>= \ a -> case a of { Just x -> x; _ -> fail ""} |
| 07:01:47 | <dsal> | If I'm ever seen in public again, that's gonna be on my shirt. |
| 07:02:35 | <bqv> | ha |
| 07:03:43 | <dsal> | This is another case of undo killing magic, though. |
| 07:04:57 | <bqv> | @pf \a -> case a of { Just x -> x; _ -> fail "" } |
| 07:04:57 | <lambdabot> | Maybe you meant: pl bf |
| 07:05:06 | <bqv> | @pl \a -> case a of { Just x -> x; _ -> fail "" } |
| 07:05:06 | <lambdabot> | (line 1, column 17): |
| 07:05:06 | <lambdabot> | unexpected '{' |
| 07:05:06 | <lambdabot> | expecting variable, "(", operator or end of input |
| 07:05:24 | <bqv> | i get it, because pointless. oh you. |
| 07:05:44 | <bqv> | @pl \a -> case a of Just x -> x; _ -> fail ""; |
| 07:05:44 | <lambdabot> | (line 1, column 26): |
| 07:05:44 | <lambdabot> | unexpected '>' |
| 07:05:44 | <lambdabot> | expecting operator |
| 07:05:48 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:05:59 | <dsal> | That's weird. It doesn't seem to like case. |
| 07:06:19 | <bqv> | indeed |
| 07:06:56 | <dsal> | :t fromMaybe (fail "") |
| 07:06:57 | <lambdabot> | MonadFail m => Maybe (m a) -> m a |
| 07:07:37 | <bqv> | nice |
| 07:15:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:15:24 | → | xerox_ joins (~xerox@unaffiliated/xerox) |
| 07:17:00 | × | alx741 quits (~alx741@186.178.110.202) (Ping timeout: 258 seconds) |
| 07:17:56 | → | zoran119 joins (~zoran119@124-169-22-52.dyn.iinet.net.au) |
| 07:19:19 | <bqv> | dsal: is AWS any less blackbox-y than azure? |
| 07:19:56 | <bqv> | tbh even if it is it's still a cloud and at this point i think i just hate clouds |
| 07:20:02 | bqv | young man shouts at cloud |
| 07:22:19 | → | dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) |
| 07:26:52 | <dsal> | Haha. I don't know azure at all. I know a little AWS and some of Google cloud from the inside. I use aws some. |
| 07:29:40 | × | Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
| 07:29:58 | → | alx741 joins (~alx741@186.178.110.152) |
| 07:31:08 | → | borne joins (~fritjof@200116b86489f5004fbf5cd6c83663b1.dip.versatel-1u1.de) |
| 07:31:34 | × | jedws quits (~jedws@101.184.175.183) (Quit: Textual IRC Client: www.textualapp.com) |
| 07:35:46 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 07:38:01 | × | blankhart quits (~blankhart@pool-100-35-219-3.nwrknj.fios.verizon.net) (Ping timeout: 246 seconds) |
| 07:41:00 | × | jakob_ quits (~textual@p200300f49f16220035a786c99145f1b1.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 07:42:12 | → | z0 joins (~z0@188.251.69.121) |
| 07:43:25 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 07:43:57 | <z0> | hi. when using ghcid with the -l flag, is it possible to get coloured hlint output? |
| 07:46:10 | → | mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com) |
| 07:46:52 | → | jakob_ joins (~textual@p200300f49f162200e1f79f04dc8b19b7.dip0.t-ipconnect.de) |
| 07:47:02 | → | chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) |
| 07:47:12 | → | vilpan joins (~0@212.117.1.172) |
| 07:47:28 | → | Sanchayan joins (~Sanchayan@2401:4900:3309:dec3:efb6:6366:cb4:cbe4) |
| 07:48:27 | <dminuoso> | jakob_: map and concat are the Monad interface of list. |
| 07:48:35 | <dminuoso> | map is just fmap, and concat is join |
| 07:48:49 | <dminuoso> | and equivalently concatMap (the combination of those two) is just (=<<)/(>>=) |
| 07:49:30 | <dminuoso> | dsal: also, you can just undo list comprehensions |
| 07:49:41 | <dminuoso> | @undo [x | Just x <- xs] |
| 07:49:41 | <lambdabot> | concatMap (\ a -> case a of { Just x -> [x]; _ -> []}) xs |
| 07:53:14 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 07:55:31 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 07:58:35 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 07:59:46 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 07:59:48 | → | knupfer joins (~Thunderbi@200116b8249e5f00a4b9fafffef91ebc.dip.versatel-1u1.de) |
| 08:00:39 | × | knupfer quits (~Thunderbi@200116b8249e5f00a4b9fafffef91ebc.dip.versatel-1u1.de) (Remote host closed the connection) |
| 08:00:47 | → | knupfer joins (~Thunderbi@200116b8249e5f0024181441028bf74f.dip.versatel-1u1.de) |
| 08:06:32 | × | borne quits (~fritjof@200116b86489f5004fbf5cd6c83663b1.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 08:09:07 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 08:11:26 | × | dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 258 seconds) |
| 08:12:09 | → | alp joins (~alp@2a01:e0a:58b:4920:3450:37c2:436b:8f86) |
| 08:12:20 | → | borne joins (~fritjof@200116b86489f5004fbf5cd6c83663b1.dip.versatel-1u1.de) |
| 08:18:13 | × | Lord_of_Life quits (~Lord@46.217.223.48) (Changing host) |
| 08:18:13 | → | Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 08:19:22 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 08:19:54 | → | jedws joins (~jedws@101.184.175.183) |
| 08:19:56 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) |
| 08:24:55 | × | hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 08:25:53 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 08:29:49 | × | thebnq quits (~bnq@herrokitty.com) (Ping timeout: 256 seconds) |
| 08:29:56 | → | thebnq joins (~bnq@herrokitty.com) |
| 08:30:51 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 08:34:23 | <bqv> | Do any of you have tricks to make cloud-like dev a ...better experience? Is it just suffering from horizon to horizon, or is there hope somewhere? |
| 08:34:54 | × | mojtaba__ quits (~bquest_12@5.200.109.144) (Quit: Leaving) |
| 08:35:01 | → | gproto23 joins (~gproto23@unaffiliated/gproto23) |
| 08:35:06 | <dminuoso> | From experience, and Im saying this as a company that is building out their own data center, cloud rarely offers reasonable advantages. |
| 08:35:38 | × | todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 272 seconds) |
| 08:35:42 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 08:36:13 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:36:29 | <dminuoso> | You have unpredictable costs, and a cost scaling that favors the cloud provider not you (cloud is only cheaper if you need to scale *down* not *up) |
| 08:36:39 | <dminuoso> | You have semantics that dont fit into traditional tooling |
| 08:37:22 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-mfqotttnhsysdcxs) (Quit: Connection closed for inactivity) |
| 08:37:54 | <dminuoso> | But really, the cost part is amazing. You first get tricked into thinking "this is cheaper because the cost scales with usage", just to realize this works in both directions later on... |
| 08:38:04 | → | jedws joins (~jedws@101.184.175.183) |
| 08:38:09 | <dminuoso> | (And it turns out, bare metal is just cheaper if you need to scale up) |
| 08:38:51 | <bqv> | Excellent |
| 08:39:03 | → | todda7 joins (~torstein@ppp-2-84-17-169.home.otenet.gr) |
| 08:39:34 | <bqv> | Saved so I can parrot that to my coworkers someday… |
| 08:40:16 | <dminuoso> | Another thing is, most problems don't have a high variability in terms of performance needs |
| 08:40:46 | <dminuoso> | You usually have a narrow corridor in which you fluctuate. For most problems you dont need to randomly scale between "10 users today, 20 million tomorrow |
| 08:41:09 | × | jedws quits (~jedws@101.184.175.183) (Client Quit) |
| 08:41:36 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 08:41:44 | <dminuoso> | Also, cloud providers heavily force you into a vendor lockin |
| 08:42:06 | × | Audentity quits (~Audentity@4e69b241.skybroadband.com) (Ping timeout: 258 seconds) |
| 08:42:16 | → | Audentity_ joins (~Audentity@4e69b241.skybroadband.com) |
| 08:42:45 | <dminuoso> | You want their elastic computing resources? You better also use their elastic storage solution. And their elastic backup solutions. Oh and any analystics only works with their tools now |
| 08:42:56 | <dminuoso> | You want to build and deploy? You're forced onto their tooling too |
| 08:43:33 | → | jedws joins (~jedws@101.184.175.183) |
| 08:43:40 | <dminuoso> | And that doesn't even begin to discuss the data privacy needs. |
| 08:44:30 | hackage | lentil 1.4.1.0 - frugal issue tracker https://hackage.haskell.org/package/lentil-1.4.1.0 (fffaaa) |
| 08:44:47 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Client Quit) |
| 08:44:56 | <dminuoso> | Fun fact, most of Amazons profits actually comes from AWS, not Marketplace. |
| 08:45:02 | <dminuoso> | They are *that* darn profitable. |
| 08:45:05 | × | todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 240 seconds) |
| 08:45:58 | → | todda7 joins (~torstein@ppp-2-84-17-169.home.otenet.gr) |
| 08:46:31 | <merijn> | dminuoso: Well, it also depends on how much fancy stuff you buy into |
| 08:46:39 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 08:47:03 | <merijn> | My brother just got hired at a new place after doing AWS for a long time and his first reaction was "wow...you guys are wasting a lot of money on AWS..." |
| 08:47:10 | → | jakov joins (~jakov@95.168.120.30) |
| 08:47:21 | <merijn> | People just don't wanna think about performance engineering |
| 08:47:38 | <dminuoso> | merijn: Sure, AWS can be done cheaply with great care. But amazon counts on you not doing that. |
| 08:47:53 | <dminuoso> | And if you're lazy, bare metal is just cheaper. |
| 08:47:58 | <merijn> | I'm gonna go out and estimate that a solid 80-90% of all workloads can *easily* be handled by a single (beefy) machine |
| 08:48:03 | <dminuoso> | Indeed. |
| 08:48:09 | <dminuoso> | That is the silver bullet. |
| 08:48:19 | <merijn> | "ooh, no, we've got big data" |
| 08:48:34 | <merijn> | Fucking BS...there's like maybe 3 companies that have big data |
| 08:48:49 | <dminuoso> | merijn: Much of the "cloud or kubernetes" problem space addresses problems virtually noone has. |
| 08:48:59 | <merijn> | The rest just have incompetent software engineers and/or are too cheap to bother |
| 08:49:01 | <dminuoso> | Like, kubernetes is an incredibly amazing thing |
| 08:49:13 | <dminuoso> | If your problem is "how do I manage hundreds of services deployed to tens of thousands of nodes" |
| 08:49:20 | <dminuoso> | Problems everybody has in their day jobs, right? |
| 08:49:21 | <merijn> | dminuoso: oh, lemme look up a quote I saw recently |
| 08:49:22 | <dminuoso> | ;) |
| 08:49:51 | → | kuribas joins (~user@ptr-25vy0iaeei1zsuhust9.18120a2.ip6.access.telenet.be) |
| 08:49:56 | <merijn> | dminuoso: https://twitter.com/rothgar/status/1317524239218397185 |
| 08:50:16 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 08:50:20 | <dminuoso> | Haha that's a good one |
| 08:50:59 | <dminuoso> | Its the same with "high availability" |
| 08:51:01 | <merijn> | All the latest hype "ecosystems" are just pointless for most people |
| 08:51:15 | <dminuoso> | A well maintained single node has better high availability than piss-poor "Im gonna slap HAProxy ontop of this" |
| 08:51:30 | <merijn> | dminuoso: It's like people adopting Hadoop |
| 08:51:50 | × | jakov quits (~jakov@95.168.120.30) (Quit: leaving) |
| 08:51:55 | <merijn> | Spoiler: 80% of hadoop solutions I've seen/encountered are *slower* than a single node solution |
| 08:52:31 | <dminuoso> | (not to mention that high availability is a too broad term, what does that even mean? automatic failover? do we need active/active? active/passive? Or maybe we have differences wrt to writing/reading? Or maybe we want load sharing instead? |
| 08:52:56 | <kuribas> | merijn: brilliant |
| 08:52:58 | <dminuoso> | Trying to get the automatic failover right tends to introduce a lot of moving parts |
| 08:53:19 | <dminuoso> | like, if you add haproxy, you again have a single point of failure, and it must detect non-operatoinality |
| 08:53:39 | <kuribas> | merijn: wasn't there a company that rewrote all their scala code using hadoop in pure haskell running on a single machine, and found that everything was faster? |
| 08:54:11 | <dminuoso> | merijn: here we strive for a particular model of load sharing and automatic failover |
| 08:54:51 | <merijn> | dminuoso: Good failover requires robust software, but nobody has that :p |
| 08:55:07 | <merijn> | kuribas: I wouldn't be surprised |
| 08:55:09 | <dminuoso> | if service A needs to talk to service B, we just replicate service B a few times. A then maintains a pool of possible B targets, and implements load sharing by randomizing which B target to talk to |
| 08:55:21 | <kuribas> | merijn: ah, it was this one: https://tech.channable.com/posts/2019-10-04-why-we-decided-to-go-for-the-big-rewrite.html |
| 08:55:22 | <dminuoso> | If B emits failures, we mark them as temporarily dead and remove them from the pool for a while |
| 08:55:37 | <dminuoso> | so the high availability comes from *engineering* |
| 08:55:42 | <kuribas> | merijn: ah, spark, not hadoop |
| 08:55:44 | <dminuoso> | not "add random software ontop of it" |
| 08:55:58 | <merijn> | During my internship we were asked to benchmark Apache Spark (runs on Hadoop) and GraphX (runs on Spark) and found *negative* scaling |
| 08:56:06 | → | Yumasi joins (~guillaume@2a01cb09b06b29ea5faf5572fb93fcc2.ipv6.abo.wanadoo.fr) |
| 08:56:09 | <merijn> | i.e. it got slower the more nodes you added to the cluster |
| 08:56:25 | <dminuoso> | merijn: The usual cost of implementing the above, about 50 lines of haskell. Reliable failover with some good load sharing! |
| 08:56:30 | <merijn> | kuribas: Spark runs on hadoop :p |
| 08:56:43 | <dminuoso> | Only requirements: stateless services! |
| 08:58:52 | <kuribas> | I wonder how many problems cannot be solved on a single instance. |
| 08:58:58 | <kuribas> | or at least subdivided easily |
| 08:59:07 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 09:00:01 | × | aki_ quits (~aki_@139.28.218.148) () |
| 09:00:16 | → | raichoo joins (~raichoo@213.240.178.58) |
| 09:00:25 | <merijn> | kuribas: One of my favourite graph processing papers was just a bunch of guys going: So we bought a machine with 1 TB RAM and filled it with TBs of high speed SSDs and our graph processing framework outperforms clusters of 100s of servers |
| 09:00:32 | <dminuoso> | kuribas: DNS servers! |
| 09:00:53 | <dminuoso> | If you operate an authoritative name server, it is required to have at least two of them. |
| 09:01:28 | <merijn> | dminuoso: I mean, back in the early 2000s there were people hobbying on MUDs that supported hot copy-over, but major companies in 2020 can't manage to update stuff without downtime >.> |
| 09:01:30 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 09:02:28 | → | jsmolic joins (~jakov@95.168.121.30) |
| 09:02:41 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 09:02:50 | × | jsmolic quits (~jakov@95.168.121.30) (Client Quit) |
| 09:03:05 | <kuribas> | merijn: I have been lectured many time how great our lisp platform is, in that you can hot-patch everything in real-time. But when the system goes down, it takes two hours to restart. |
| 09:03:11 | <kuribas> | which happened a few times already |
| 09:03:13 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 09:03:39 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 09:03:44 | <merijn> | Wow... |
| 09:03:56 | <merijn> | 20+ Haskell openings in EU |
| 09:04:22 | → | bitmagie joins (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) |
| 09:04:26 | × | Sanchayan quits (~Sanchayan@2401:4900:3309:dec3:efb6:6366:cb4:cbe4) (Quit: leaving) |
| 09:04:34 | <kuribas> | maybe I should apply there... |
| 09:04:41 | <kuribas> | I wonder if they allow 4/5 |
| 09:05:00 | <dminuoso> | merijn: facebook has hot code replacement with haskell :P |
| 09:05:21 | <dminuoso> | but in general, updating a live system is complicated |
| 09:05:50 | <dminuoso> | Especially if there's multiple parts, because you cant generally execute an update atomically |
| 09:06:01 | <merijn> | kuribas: THat's what negotiation is for ;) |
| 09:06:16 | <dminuoso> | What does 4/5 mean? |
| 09:06:23 | <kuribas> | dminuoso: 4 day workweek |
| 09:06:25 | <merijn> | dminuoso: I assume 32 hour work week |
| 09:06:30 | <kuribas> | yes |
| 09:06:39 | <dminuoso> | ah |
| 09:07:01 | <merijn> | Looks like they're mostly in Scandinavia so, that's probably negotiable |
| 09:07:13 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds) |
| 09:08:50 | <dminuoso> | merijn: Oh and regarding our earlier discussion with "single node", my current project involves a "servant api + postgres" server. |
| 09:09:20 | <dminuoso> | Since all but one systems only need read-only, we've decided to duplicate the servant+postgres onto every sever that needs to talk to my API |
| 09:09:36 | <dminuoso> | So there's one master servant+postgres, and everything else receives postgres streaming replicatoin |
| 09:10:39 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 09:10:41 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 09:10:56 | <dminuoso> | so if any node fails, everyone else can still talk to their local API running on a local database |
| 09:11:19 | <dminuoso> | that way, we remove the network dependency from the service, and have higher resilience of any single node failing |
| 09:11:52 | <dminuoso> | (this service is a mission critical piece in our infrastructure, we just cant take the chance of a singular node going down at the wrong time( |
| 09:12:27 | → | jsmolic joins (~jakov@95.168.121.30) |
| 09:12:44 | → | britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) |
| 09:13:03 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 09:13:22 | <kuribas> | dminuoso: that's why most of our code is written with lists instead of structs, because structs cannot be updated easily. |
| 09:13:35 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 09:13:41 | → | Franciman joins (~francesco@host-82-56-223-169.retail.telecomitalia.it) |
| 09:13:55 | <kuribas> | dminuoso: but it decreases readability, because (car foo) isn't clear on what car means. |
| 09:14:45 | <kuribas> | I feel it's a lot of effort to solve a problem that is not a problem (hot reloading). |
| 09:15:12 | <kuribas> | with a stateless service we could just restart the app in seconds. |
| 09:16:50 | → | theoneyouknow joins (~quassel@95.168.121.30) |
| 09:16:56 | × | atbd quits (~atbd@68.166.138.88.rev.sfr.net) (Quit: leaving) |
| 09:17:02 | → | avdb joins (~avdb@ip-213-49-124-119.dsl.scarlet.be) |
| 09:17:23 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 260 seconds) |
| 09:18:11 | × | z0 quits (~z0@188.251.69.121) (Quit: leaving) |
| 09:18:41 | → | invaser1 joins (~Thunderbi@46-133-153-250.mobile.vf-ua.net) |
| 09:21:47 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds) |
| 09:21:47 | invaser1 | is now known as invaser |
| 09:29:44 | × | britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep) |
| 09:31:10 | × | jneira quits (5127ac76@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.172.118) (Ping timeout: 258 seconds) |
| 09:31:15 | → | m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) |
| 09:34:18 | → | whatisRT joins (~whatisRT@2002:5b41:6a33:0:d89f:d10e:927a:2962) |
| 09:34:28 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 09:37:16 | → | akegalj joins (~akegalj@93-138-135-85.adsl.net.t-com.hr) |
| 09:37:32 | × | gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 260 seconds) |
| 09:37:55 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 09:39:21 | <tomsmeding> | kuribas: no wonder you're longing to program in haskell |
| 09:39:31 | <kuribas> | tomsmeding: yeah :) |
| 09:42:22 | × | cow-orker quits (~foobar@pogostick.net) (Remote host closed the connection) |
| 09:47:25 | <benschza> | Are there any Arrows or Yampa gurus online today? :) Solved the purely Haskell related type issue I had yesterday with all of your help, but have another query somebody with Yampa experience could probably advise on. |
| 09:49:33 | → | ubert joins (~Thunderbi@p200300ecdf1e535be6b318fffe838f33.dip0.t-ipconnect.de) |
| 09:50:04 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 09:53:34 | → | invaser1 joins (~Thunderbi@31.148.23.125) |
| 09:54:36 | × | jespada_ quits (~jespada@90.254.245.49) (Ping timeout: 256 seconds) |
| 09:56:08 | → | coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) |
| 09:57:05 | → | jespada joins (~jespada@90.254.245.49) |
| 09:57:19 | × | invaser quits (~Thunderbi@46-133-153-250.mobile.vf-ua.net) (Ping timeout: 246 seconds) |
| 09:57:19 | invaser1 | is now known as invaser |
| 10:00:35 | × | akegalj quits (~akegalj@93-138-135-85.adsl.net.t-com.hr) (Quit: leaving) |
| 10:00:42 | × | knupfer quits (~Thunderbi@200116b8249e5f0024181441028bf74f.dip.versatel-1u1.de) (Remote host closed the connection) |
| 10:00:51 | → | knupfer joins (~Thunderbi@200116b8249e5f0010c5e6f6682b8ccf.dip.versatel-1u1.de) |
| 10:00:57 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Remote host closed the connection) |
| 10:02:01 | × | texasmynsted quits (~texasmyns@99.96.221.112) (Ping timeout: 264 seconds) |
| 10:03:02 | × | xff0x quits (~fox@2001:1a81:53f2:4b00:a4e6:ede5:b1af:2468) (Ping timeout: 264 seconds) |
| 10:03:39 | → | xff0x joins (~fox@2001:1a81:53f2:4b00:f0ff:5175:9775:725d) |
| 10:05:55 | <dminuoso> | Why cant I have recursive imports |
| 10:05:57 | <dminuoso> | *sigh* |
| 10:06:39 | <dminuoso> | *circular |
| 10:06:57 | <merijn> | dminuoso: I know, right |
| 10:07:09 | <merijn> | dminuoso: Take time off work to fix it in GHC! :> |
| 10:07:42 | <dminuoso> | merijn: Oh I had a large discussion with Ryan and some other about it a while ago. Let me summarize the feasibility for you: |
| 10:07:44 | <dminuoso> | Yeah uh.. no. |
| 10:08:23 | <dminuoso> | That's one of the things C/C++ at least got right. |
| 10:08:30 | <dminuoso> | Or semi right, anyhow. |
| 10:08:52 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 10:09:25 | <merijn> | What? Not having modules or imports at all? :p |
| 10:09:32 | × | bitmagie quits (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) (Quit: bitmagie) |
| 10:10:17 | <dminuoso> | Well, separating declaration and definition lets you set up circular things easily |
| 10:10:41 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) (Ping timeout: 256 seconds) |
| 10:11:04 | <dminuoso> | (the problems are essentially deferred to the linker) |
| 10:12:03 | <dminuoso> | and our linkers *can* handle circular linking |
| 10:12:12 | <dminuoso> | (say via --start-group) |
| 10:12:41 | → | texasmynsted joins (~texasmyns@99.96.221.112) |
| 10:15:27 | → | dmiles joins (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 10:16:52 | × | Ferdirand quits (~max@2001:4c78:2012:5000::2) (Ping timeout: 260 seconds) |
| 10:17:02 | → | Ferdirand joins (~max@2001:4c78:2012:5000::2) |
| 10:23:54 | × | dustinm quits (~dustinm@static.38.6.217.95.clients.your-server.de) (Quit: Leaving) |
| 10:24:10 | → | dustinm joins (~dustinm@static.38.6.217.95.clients.your-server.de) |
| 10:28:12 | → | Suigintou joins (~Suigintou@84.39.117.57) |
| 10:31:17 | → | ech joins (~user@gateway/tor-sasl/ech) |
| 10:34:47 | ← | jsmolic parts (~jakov@95.168.121.30) () |
| 10:35:36 | × | theoneyouknow quits (~quassel@95.168.121.30) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 10:36:16 | → | Sanchayan joins (~Sanchayan@2401:4900:3309:dec3:efb6:6366:cb4:cbe4) |
| 10:37:25 | → | bitmagie joins (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) |
| 10:42:16 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) () |
| 10:45:49 | × | avdb quits (~avdb@ip-213-49-124-119.dsl.scarlet.be) (Quit: WeeChat 2.9) |
| 10:48:20 | gproto023 | is now known as gproto23 |
| 10:51:45 | × | bitmagie quits (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) (Quit: bitmagie) |
| 10:52:56 | → | cow-orker joins (~foobar@pogostick.net) |
| 10:54:18 | → | theoneyouknow joins (~quassel@95.168.121.30) |
| 10:54:24 | × | theoneyouknow quits (~quassel@95.168.121.30) (Client Quit) |
| 10:54:40 | → | jsmolic joins (~quassel@95.168.121.30) |
| 10:57:32 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 10:57:37 | <royal_screwup21> | hello |
| 10:57:59 | → | acidjnk_new joins (~acidjnk@p200300d0c718f669e4bb3e68b1aef453.dip0.t-ipconnect.de) |
| 10:58:00 | <royal_screwup21> | I'm trying to understand what snippet does and how to run the runFSM functions: https://ideone.com/iHDBvv |
| 10:58:08 | <royal_screwup21> | could someone give me a quick example? |
| 10:58:37 | × | whatisRT quits (~whatisRT@2002:5b41:6a33:0:d89f:d10e:927a:2962) (Ping timeout: 260 seconds) |
| 11:00:03 | → | DavidEichmann joins (~david@43.240.198.146.dyn.plus.net) |
| 11:03:32 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 11:08:35 | <ski> | call it on an `FSM state input output', and a list of successive `input's ? |
| 11:08:39 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 265 seconds) |
| 11:10:28 | <royal_screwup21> | ski ah hmm...could you give me a bare bones example of something I could copy-paste into ghci? :) I'm not really sure I understand what's going on in that snippet (i'm a complete beginner) |
| 11:10:52 | → | christo joins (~chris@81.96.113.213) |
| 11:11:43 | <ski> | start by defining an example FSM |
| 11:12:32 | <ski> | exampleFSM :: FSM Int Char Char |
| 11:12:43 | <ski> | exampleFSM = FSM start trans accept out |
| 11:12:46 | <ski> | where |
| 11:12:54 | <ski> | start = ... |
| 11:13:00 | × | rprije quits (~rprije@124.148.131.132) (Ping timeout: 265 seconds) |
| 11:13:10 | <ski> | trans state input = ..state..input.. |
| 11:13:18 | <ski> | accept = [...] |
| 11:13:30 | <royal_screwup21> | ski thanks, I will try that out :) |
| 11:13:31 | <ski> | out = ... |
| 11:14:04 | <ski> | (seems `runFSM' doesn't use the `out' part .. so you could probably set it to `undefined', so far) |
| 11:15:15 | <ski> | you could use other types (e.g. user-defined) for the state type, and the input and output symbol/token types, if you wanted to |
| 11:15:27 | <ski> | e.g. you could define |
| 11:16:04 | <ski> | data ExampleState = S0 | S1 | S2 | S3 | S4 deriving (Eq,Show) |
| 11:16:15 | <ski> | and then use `ExampleState' in place of `Int' |
| 11:16:36 | <royal_screwup21> | ahh I see, for now I'd prefer using the built in types to keep things simple :) |
| 11:16:42 | ski | nods |
| 11:17:36 | <vilpan> | merijn: you mentioned 20+ Haskell openings in EU. Is there a dedicated site/aggregator? |
| 11:18:19 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-odsmdwwzesbrmhor) (Quit: Connection closed for inactivity) |
| 11:18:28 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:19:15 | <royal_screwup21> | ski I've got this so far https://ideone.com/pH4Czq do I have to define my custom arbitrary function for trans? |
| 11:19:23 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 11:20:00 | <ski> | yes |
| 11:20:24 | <royal_screwup21> | hmm |
| 11:21:08 | → | bitmagie joins (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) |
| 11:22:12 | × | alp quits (~alp@2a01:e0a:58b:4920:3450:37c2:436b:8f86) (Ping timeout: 260 seconds) |
| 11:22:16 | <ski> | `trans' needs to be able to handle the state `0', and any states that can be reached from that state (by using `trans') |
| 11:22:57 | <Uniaika> | (“fuck the state” – trans people) |
| 11:23:09 | <royal_screwup21> | ski I just did trans state input = state + 1 |
| 11:24:17 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 11:25:11 | <ski> | hm, in that case you don't really have *finite* number of states, do you ? |
| 11:25:25 | <ski> | @quote is.no.state |
| 11:25:25 | <lambdabot> | MonadState says: Do not try to change the state; that's impossible. Instead only try to realize the truth: There is no state. |
| 11:28:04 | <ski> | royal_screwup21 : you could cap the state at some number, like `9' e.g. |
| 11:28:28 | <ski> | > iterate (\n -> min 9 (n + 1)) 0 |
| 11:28:31 | <lambdabot> | [0,1,2,3,4,5,6,7,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9... |
| 11:31:39 | <royal_screwup21> | ski I've found an example like so https://ideone.com/UKDuIo all I want to do is run it against the runFSM function, just to get a feel fro what's happening |
| 11:32:42 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 11:33:37 | × | Yumasi quits (~guillaume@2a01cb09b06b29ea5faf5572fb93fcc2.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 11:34:49 | <ski> | royal_screwup21> runFSM isEven [Zero,Zero,One,Zero,One] |
| 11:35:02 | × | acidjnk_new quits (~acidjnk@p200300d0c718f669e4bb3e68b1aef453.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 11:35:14 | <ski> | (btw, i would write `Moore (const ())') |
| 11:35:38 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 11:37:45 | <royal_screwup21> | ski thanks a lot for the pointers :) |
| 11:38:02 | <royal_screwup21> | I don't quite understand what's going on in this line: `out = Moore $ const ()` |
| 11:39:44 | <ski> | replace it by : |
| 11:39:50 | <ski> | out = Moore (const ()) |
| 11:39:52 | <ski> | or |
| 11:40:03 | <ski> | out = Moore (\_ -> ()) |
| 11:40:06 | <ski> | or |
| 11:40:10 | <ski> | out = Moore moore |
| 11:40:10 | × | Sanchayan quits (~Sanchayan@2401:4900:3309:dec3:efb6:6366:cb4:cbe4) (Quit: leaving) |
| 11:40:13 | <ski> | where |
| 11:40:19 | <ski> | moore _ = () |
| 11:40:39 | <ski> | royal_screwup21 : do any of those three versions make it clearer ? |
| 11:40:59 | × | revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Quit: Lost terminal) |
| 11:41:03 | <royal_screwup21> | so it's a function that takes something and returns...()? |
| 11:41:14 | <royal_screwup21> | what is the ()? Is it null in haskell? |
| 11:41:31 | <royal_screwup21> | (hard to google :( ) |
| 11:41:32 | <ski> | oh, well, i suppose you'd have to put the `moore _ = ()' part after the `where' above where you define `trans' |
| 11:41:44 | <ski> | there is no "null" in Haskell |
| 11:41:59 | <ski> | `()' is the empty tuple, the zero-tuple |
| 11:42:17 | <ski> | just like `(x,y)' is the two-tuple, the pair, containing `x' and `y' as components |
| 11:42:21 | <royal_screwup21> | ah ok |
| 11:42:42 | <ski> | an `n'-tuple has `n' components. a pair, a two-tuple has two components, a zero-tuple has zero components |
| 11:43:30 | <royal_screwup21> | yup gotcha, thanks :) |
| 11:43:45 | <royal_screwup21> | I don't really get that definiton though: |
| 11:43:46 | <royal_screwup21> | data OutFunc state input output |
| 11:43:47 | <royal_screwup21> | = Moore (state -> output) |
| 11:43:47 | <royal_screwup21> | | Mealy (state -> input -> output) |
| 11:44:02 | <royal_screwup21> | like, how am I meant to instantiate it and then apply it? |
| 11:44:16 | <ski> | (if you have done any linear algebra with matrices and vectors, you could compare the zero-tuple to an "empty" vector with no coefficients in it, being a vector in ⌜ℝ⁰⌝, a zero-dimensional vector space) |
| 11:44:58 | <royal_screwup21> | so I know I can do something like `thing = Moore (\x -> x)` |
| 11:45:14 | <royal_screwup21> | but now how do I actually run it against an input? |
| 11:46:28 | <ski> | the type `()' corresponds more or less to the type `void' in C,C++,Java,C#. also to empty `struct' type (`struct {}', no components), in C,C++,C# (or rather, extensions that allow it). it has a single value (also written `()', in Haskell) |
| 11:47:03 | <ski> | you'd typically use `()' as an output (or part of an output), when you don't have any interesting information to put there |
| 11:47:07 | → | martinsos joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 11:47:18 | <royal_screwup21> | yup all that makes sense, it's just an empty tuple |
| 11:47:18 | ← | martinsos parts (~user@cpe-188-129-116-164.dynamic.amis.hr) () |
| 11:47:59 | <ski> | `thing = Moore (\x -> x)' would not work, if you have `isEven :: FSM EvenState Binary ()' |
| 11:48:27 | <royal_screwup21> | ski I just created an arbitrary function, not related to isEeven |
| 11:48:43 | <royal_screwup21> | I just want to understand how to run `thing` some input |
| 11:48:52 | <ski> | because then your `state' type is `EvenState' and your `output' type is `()', and your moore function should have type `state -> output', that is `EvenState -> ()', but `\x -> x' does not have this type |
| 11:49:26 | <ski> | <royal_screwup21> but now how do I actually run it against an input? |
| 11:49:32 | <ski> | i already answered this : |
| 11:49:33 | <ski> | <ski> royal_screwup21> runFSM isEven [Zero,Zero,One,Zero,One] |
| 11:50:21 | <royal_screwup21> | but that's the runFSM function. I want to run `thing` which of type `thing :: OutFunc output input output` |
| 11:51:40 | × | niko quits (~niko@freenode/staff/ubuntu.member.niko) (Ping timeout: 619 seconds) |
| 11:52:29 | <ski> | oh |
| 11:53:05 | <ski> | well, it could be a `Mealy' transition function |
| 11:53:33 | <ski> | so, i think you'd have to provide both a state and an input |
| 11:53:50 | <ski> | er, s/transition/output/ |
| 11:54:01 | → | carlomagno joins (~cararell@148.87.23.6) |
| 11:54:07 | <ski> | you could try to define |
| 11:54:08 | → | alp joins (~alp@2a01:e0a:58b:4920:ed84:e1ea:bd3d:3a34) |
| 11:54:22 | <ski> | output :: OutFunc state input output -> state -> input -> output |
| 11:54:42 | → | roconnor joins (~roconnor@host-184-164-7-99.dyn.295.ca) |
| 11:54:52 | <royal_screwup21> | hmm so I've done this on ghci: thing = Moore (\x -> x). My understand is that I've defined a function (wrapped in a variant) that takes an x and returns back an x |
| 11:54:55 | <ski> | and then you could call `output thing E0 Zero', e.g. |
| 11:55:07 | <royal_screwup21> | basically, how do I run that function? |
| 11:55:12 | × | ubert quits (~Thunderbi@p200300ecdf1e535be6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 11:55:33 | <ski> | you need to pattern-match, to extract the function from the variant alternative, from the data constructor |
| 11:55:41 | <royal_screwup21> | ahh ok |
| 11:55:57 | <ski> | but in general, it could be either a `Moore' or a `Mealy', and you should most probably cover both cases |
| 11:55:57 | <royal_screwup21> | that makes sense, thanks! |
| 11:56:12 | <ski> | and defining a function like `output' may help with this |
| 11:56:16 | <royal_screwup21> | I'm not really sure what the point is of having it in the fsm... |
| 11:56:24 | × | carlomagno1 quits (~cararell@148.87.23.13) (Ping timeout: 272 seconds) |
| 11:56:32 | <royal_screwup21> | the runFSM function doesn't seem to use it |
| 11:56:46 | <royal_screwup21> | is it just there to confuse the beginner? |
| 11:57:10 | <ski> | well, according to the definitions at <https://en.wikipedia.org/wiki/Mealy_machine> and <https://en.wikipedia.org/wiki/Moore_machine>, those two kinds of finite state machines both contain output functions, not just transition functions |
| 11:57:27 | × | Suigintou quits (~Suigintou@84.39.117.57) (Remote host closed the connection) |
| 11:57:36 | <ski> | i dunno why `runFSM' is as it is |
| 11:57:40 | <ski> | one could have imagined |
| 11:58:22 | <ski> | runFSM :: Eq state => FSM state input output -> [input] -> ([output],state,Bool) |
| 11:58:43 | <royal_screwup21> | that makes a lot more sense yup |
| 11:58:59 | <dminuoso> | What does the Bool track? |
| 11:59:18 | <ski> | so that it doesn't only give you the resulting `state' (with a `Bool'ean for telling whether it's an accepting state) after feeding in the list of `input's, but so that you'd also get a corresponding list of `output's |
| 11:59:31 | <ski> | dminuoso : whether the resulting state is an accepting state |
| 12:00:03 | <dminuoso> | Ah |
| 12:04:38 | → | dennisb joins (~dennisb@89-160-106-195.cust.bredband2.com) |
| 12:06:04 | × | hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Quit: hekkaidekapus) |
| 12:07:59 | → | hekkaidekapus joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 12:10:47 | × | dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 260 seconds) |
| 12:11:06 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 12:12:57 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 12:13:12 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 12:13:39 | × | invaser quits (~Thunderbi@31.148.23.125) (Quit: invaser) |
| 12:14:09 | <royal_screwup21> | I'm looking at a dataype like so: `data BinState = S0 | S1 | S2 deriving (Enum, Eq, Show)` |
| 12:14:29 | <royal_screwup21> | is the name completely random, or is there logic to it? binary implies 2 but there's 3 variants |
| 12:16:56 | × | jakob_ quits (~textual@p200300f49f162200e1f79f04dc8b19b7.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 12:17:02 | <dminuoso> | royal_screwup21: Bin could also stand for bin. |
| 12:17:11 | <dminuoso> | Or its an abbreviation |
| 12:17:17 | <royal_screwup21> | bin as in bin-packing? |
| 12:17:21 | <Uniaika> | royal_screwup21: what's the context? |
| 12:17:44 | → | dmiles joins (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 12:17:49 | <dminuoso> | royal_screwup21: bin as in bucket |
| 12:17:54 | <dminuoso> | trash bin |
| 12:18:32 | <ski> | what's the corresponding FSM ? |
| 12:20:13 | <bqv> | is it ocaml that has that curious semantic of needing to pass () to a member function to call it |
| 12:20:15 | × | dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Read error: Connection reset by peer) |
| 12:20:25 | <royal_screwup21> | the correspoding fsm is this: https://ideone.com/fb90Ir |
| 12:20:44 | <ski> | bqv : not that i recall |
| 12:20:58 | <bqv> | what language am i thinking of then... |
| 12:21:36 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 12:21:36 | → | dmiles joins (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 12:22:29 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) |
| 12:24:52 | → | kish` joins (~oracle@unaffiliated/oracle) |
| 12:24:58 | <ski> | bqv : hm, maybe F# ? |
| 12:25:09 | <bqv> | oh |
| 12:25:11 | <bqv> | yes |
| 12:25:13 | <bqv> | that's the one |
| 12:25:57 | <bqv> | i suppose that's just a "feature" of working under the CLR |
| 12:26:44 | <kuribas> | that's true for any language with side effects |
| 12:26:52 | <ski> | kuribas : no |
| 12:26:59 | <dminuoso> | https://github.com/cdepillabout/pretty-simple/blob/master/Setup.hs |
| 12:27:15 | <dminuoso> | Gaah! For that bit of code, this is dragging Cabal into the setup for dependencies.. |
| 12:27:22 | <kuribas> | how would you otherwise know when to exectute the side-effects? For example "f ()" vs "f" |
| 12:27:47 | <ski> | see e.g. <https://caml.inria.fr/pub/docs/manual-ocaml/objectexamples.html>. the body of a parameterless method is not evaluated until it is called |
| 12:28:25 | <ski> | a method call is a different construct than an ordinary function call |
| 12:29:47 | <ski> | royal_screwup21 : hm, ok. doesn't really seem to be related to binary something, apart from accepting bits as inputs |
| 12:30:12 | × | dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 260 seconds) |
| 12:31:11 | <bqv> | ocaml is a fascinating language. why isn't it more used? |
| 12:31:37 | bqv | . o O ( same reason haskell isn't ) |
| 12:32:19 | → | dmiles joins (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 12:32:21 | <ski> | OCaml has one of the more interesting object type, and class, system |
| 12:32:52 | → | Deide joins (~Deide@217.155.19.23) |
| 12:33:05 | <ski> | it can handle "binary methods" and "cloning methods", that is a method which accepts, or returns, a method of the same type as the object on which it's invoked on |
| 12:33:49 | <ski> | when these are used, the object type that results from a subclass need not be a subtype of the type that results from the corresponding superclass |
| 12:33:57 | → | jchia_ joins (~jchia@45.32.62.73) |
| 12:35:37 | → | Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se) |
| 12:35:58 | × | ambiso9 quits (~ambiso@209.182.239.205) (Quit: Ping timeout (120 seconds)) |
| 12:35:59 | <bqv> | it is used less widely than even haskell, though |
| 12:36:08 | <bqv> | are there shortcomings? |
| 12:36:14 | <bqv> | or is it just nerd tax |
| 12:36:17 | → | ambiso9 joins (~ambiso@209.182.239.205) |
| 12:36:41 | <Uniaika> | tooling |
| 12:36:52 | <ski> | (so if class `C' has a method `m' of type `Self -> bool', then an object instantiated from this class will have `C -> bool' as type of this method. then, if `D' is a subclass of `C', then the type of the method `m' for an object instantiated from this class will be `D -> bool') |
| 12:38:01 | × | ashbreeze quits (~mark@72-161-252-32.dyn.centurytel.net) (Ping timeout: 264 seconds) |
| 12:38:35 | <bqv> | Uniaika: howso? |
| 12:39:39 | × | jchia_ quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 12:40:17 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 12:40:30 | → | jchia_ joins (~jchia@45.32.62.73) |
| 12:40:54 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 12:41:54 | × | jchia_ quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 12:42:16 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 12:42:51 | → | jchia_ joins (~jchia@45.32.62.73) |
| 12:44:34 | × | jchia_ quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 12:45:28 | → | jchia_ joins (~jchia@58.32.37.146) |
| 12:46:35 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) |
| 12:46:40 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds) |
| 12:49:46 | × | p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 256 seconds) |
| 12:50:10 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
| 12:54:12 | → | AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl) |
| 12:54:46 | <ggole> | The OO parts of OCaml are neat, but they don't see much use in practice |
| 12:59:58 | <kuribas> | how does it compare to F# ? |
| 13:00:10 | <kuribas> | in F# it's useful because .NET uses OO |
| 13:00:54 | <carbolymer> | I have a dozen of executables in my stack project, can I tell stack to *not* build them and not copy them, during stack build --test ? installing of executables takes longer than execution of tests.... |
| 13:05:12 | <maerwald> | use `stack test`? |
| 13:05:24 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:05:26 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 13:06:42 | → | nbloomf joins (~nbloomf@76.217.43.73) |
| 13:07:15 | <ggole> | They're pretty different, not that I've ever seriously used F#. |
| 13:08:06 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 13:08:19 | <carbolymer> | maerwald, stack test is the same as stack build --test |
| 13:08:33 | <maerwald> | that's a bummer |
| 13:09:26 | → | _ashbreeze_ joins (~mark@72-161-252-32.dyn.centurytel.net) |
| 13:10:18 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 13:11:00 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 260 seconds) |
| 13:11:41 | × | nbloomf quits (~nbloomf@76.217.43.73) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:13:25 | × | jchia1 quits (~jchia@58.32.71.83) (Ping timeout: 264 seconds) |
| 13:14:40 | → | jchia joins (~jchia@45.32.62.73) |
| 13:15:12 | <bqv> | ggole: i don't think anyone has |
| 13:15:12 | → | christo joins (~chris@81.96.113.213) |
| 13:15:51 | → | Yumasi joins (~guillaume@2a01cb09b06b29ea5faf5572fb93fcc2.ipv6.abo.wanadoo.fr) |
| 13:16:51 | × | jchia quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 13:17:37 | × | _ashbreeze_ quits (~mark@72-161-252-32.dyn.centurytel.net) (Ping timeout: 264 seconds) |
| 13:17:53 | → | jchia joins (~jchia@45.32.62.73) |
| 13:18:07 | <carbolymer> | even `stack build --test project:test:project-lib` builds and copies executables god knows why |
| 13:18:34 | × | solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Quit: Lost terminal) |
| 13:18:47 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 13:18:53 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 13:19:54 | × | jchia quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 13:20:11 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 13:20:20 | → | jchia joins (~jchia@45.32.62.73) |
| 13:21:21 | × | jchia quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 13:22:11 | → | jchia joins (~jchia@45.32.62.73) |
| 13:23:12 | × | jchia quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 13:23:48 | → | jchia joins (~jchia@45.32.62.73) |
| 13:24:45 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 240 seconds) |
| 13:25:37 | × | Yumasi quits (~guillaume@2a01cb09b06b29ea5faf5572fb93fcc2.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 13:26:19 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 13:27:30 | → | neiluj joins (~jco@43.245.204.77.rev.sfr.net) |
| 13:27:30 | × | neiluj quits (~jco@43.245.204.77.rev.sfr.net) (Changing host) |
| 13:27:30 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 13:29:16 | × | jchia quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 13:29:25 | <royal_screwup21> | what's the time complexity of adding an element to the a list, like `x: my_list`? |
| 13:29:47 | → | jchia joins (~jchia@58.32.36.109) |
| 13:29:58 | <royal_screwup21> | for context, I am wondering what's the complexity of `before` and `after` functions here https://ideone.com/jqgyfk |
| 13:29:58 | <bqv> | cons is O(1) |
| 13:30:20 | <bqv> | anything else needs a scan |
| 13:32:36 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 13:32:52 | × | bitmagie quits (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) (Quit: bitmagie) |
| 13:33:10 | → | bitmagie joins (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) |
| 13:35:23 | × | bitmagie quits (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) (Client Quit) |
| 13:35:32 | × | gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 260 seconds) |
| 13:36:03 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 13:37:50 | <royal_screwup21> | hmm |
| 13:37:52 | → | bitmagie joins (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) |
| 13:38:45 | <royal_screwup21> | I'm looking at an impl of ziplist, which I'm told has parallels to a doubly linked list. I understand lists in haskell, and I know what doubly linked lists are, but I fail to see what the impl has to do with a dll |
| 13:38:49 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) |
| 13:38:50 | → | Whome joins (0c986a83@12.152.106.131) |
| 13:38:53 | <royal_screwup21> | https://ideone.com/baFQja |
| 13:39:27 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 13:40:47 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 13:41:26 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 13:42:58 | <lyxia> | you can move both forward and backwards in constant time |
| 13:45:37 | <royal_screwup21> | if I have a list [1,2,3] and I want to append 4 to it - how can I do this? |
| 13:45:44 | <royal_screwup21> | I want the output to be [1,2,3,4] |
| 13:45:52 | × | DavidEichmann quits (~david@43.240.198.146.dyn.plus.net) (Ping timeout: 256 seconds) |
| 13:46:11 | <xerox_> | @hoogle [a] -> [a] -> [a] |
| 13:46:12 | <lambdabot> | Prelude (++) :: [a] -> [a] -> [a] |
| 13:46:12 | <lambdabot> | Data.List (++) :: [a] -> [a] -> [a] |
| 13:46:12 | <lambdabot> | GHC.Base (++) :: [a] -> [a] -> [a] |
| 13:46:31 | hackage | phonetic-languages-examples 0.5.0.0 - A generalization of the uniqueness-periods-vector-examples functionality. https://hackage.haskell.org/package/phonetic-languages-examples-0.5.0.0 (OleksandrZhabenko) |
| 13:46:39 | <royal_screwup21> | hmm is there a O(1) way to do it |
| 13:47:02 | → | DavidEichmann joins (~david@62.110.198.146.dyn.plus.net) |
| 13:47:08 | <xerox_> | unfortunately, in general no |
| 13:48:53 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
| 13:48:54 | → | hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) |
| 13:49:24 | <dminuoso> | royal_screwup21: btw, thats better called a zipper than a ziplist |
| 13:49:41 | × | jchia__ quits (~jchia@58.32.37.146) (Quit: Leaving.) |
| 13:49:42 | <royal_screwup21> | dminuoso why do you say that? |
| 13:49:44 | <dminuoso> | We have a newtype ZipList which provides an alternate Alternative instance for [], but it's unrelated to your thing |
| 13:50:01 | <dminuoso> | (or zipper list, list zipper, those are fine names) |
| 13:50:37 | <dminuoso> | (The general idea is usually called zippers and extends well to trees as well as lists) |
| 13:50:54 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4085:c5d6:bbdf:5f4e) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:50:57 | <dminuoso> | in case of lists the implementation is just trivial and obvious |
| 13:51:58 | → | Beetstra1 joins (~Beetstra@178.162.212.214) |
| 13:54:56 | × | Zetagon quits (~leo@c151-177-52-233.bredband.comhem.se) (Ping timeout: 256 seconds) |
| 13:55:20 | → | fendor_ joins (~fendor@178.165.131.115.wireless.dyn.drei.com) |
| 13:55:58 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 13:57:29 | → | luke joins (~luke@bitnomial/staff/luke) |
| 13:57:58 | × | fendor quits (~fendor@178.165.129.175.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 13:59:23 | → | Qui_Sum1 joins (~Qui_Sum@178.162.212.214) |
| 13:59:59 | <ski> | royal_screwup21 : i would not make that `Show' instance for `ZipElem' |
| 14:00:43 | <royal_screwup21> | ski why not? |
| 14:01:33 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 14:03:20 | <ski> | because it doesn't output valid Haskell expressions of type `ZipElem a'. because it doesn't handle precedence correctly. because that `show' can't be pre-inverse of a `read', because `read' is supposed to ignore extra wrapping brackets |
| 14:03:48 | <ski> | `Show' is not intended for pretty-printing |
| 14:04:42 | × | luke quits (~luke@bitnomial/staff/luke) (Quit: sleep) |
| 14:04:45 | → | machinedgod joins (~machinedg@207.253.244.210) |
| 14:04:52 | <ski> | > read "(((False)))" :: Bool |
| 14:04:54 | <lambdabot> | False |
| 14:05:37 | → | st8less joins (~st8less@2603:a060:11fd:0:48e3:54d2:40b:a73f) |
| 14:05:49 | <ski> | if you define |
| 14:06:07 | <ski> | toZipList :: [a] -> a -> [a] -> ZipList a |
| 14:06:29 | <ski> | toZipList ls x rs = ZL (reverse ls) x rs |
| 14:06:44 | <ski> | then you could do |
| 14:06:53 | <ski> | instance Show a => Show (ZipList a) |
| 14:06:55 | <ski> | where |
| 14:07:16 | <ski> | showsPrec p (ZL ls x rs) = showsPrec (p > 10) |
| 14:07:34 | <ski> | $ showString "toZipList " |
| 14:07:48 | <ski> | . showsPrec 11 (reverse ls) |
| 14:07:53 | <ski> | . showsChar ' ' |
| 14:07:59 | <ski> | . showsPrec 11 x |
| 14:08:00 | <ski> | . showsChar ' ' |
| 14:08:05 | <ski> | . showsPrec 11 rs |
| 14:08:56 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 14:09:44 | <ski> | and then `show (insertBefore 0 (insertAfter 1 (insertBefore 2 (newZipList 3))))' would evaluate to `"toZipList [2] 0 [1,3]"' |
| 14:10:26 | <royal_screwup21> | ski hmm yeah you're right |
| 14:10:36 | <royal_screwup21> | it seems really weird |
| 14:10:41 | <royal_screwup21> | the currrent impl |
| 14:11:50 | <ski> | that `Show' instance would generate mostly readable output, getting relatively close to what your pretty-printing intended, while still generating a valid Haskell expression |
| 14:12:17 | <royal_screwup21> | ski I'm not sure I understand what's wrong with wrt to precedence |
| 14:12:26 | <ski> | of course, you can do your own pretty-printing as well (or instead), if you like. but please don't put that pretty-printing into `Show' |
| 14:12:45 | <royal_screwup21> | so if the ziplist is [1, 2] 3 [5]. Then when I run "before", I should get "1" |
| 14:12:58 | → | gproto0023 joins (~gproto23@unaffiliated/gproto23) |
| 14:14:52 | <royal_screwup21> | that is, will it turn into [2] 1 [3,5] |
| 14:15:25 | <ski> | `Show' instances are intended to work together with each other. if you declare an instance for a type, then it will automatically be combined with other existing instances, like for `Maybe',`[]',`Ratio',&c. whenever the user asks to show an input of a type combining your data type with these other types .. you have to consider how such interactions can look like. if you deviate from generating Haskell |
| 14:15:32 | <ski> | expressions in `Show', then you will get weird mixes of Haskell and non-Haskell syntax, as a result of such combinations |
| 14:15:42 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 265 seconds) |
| 14:16:02 | <ski> | royal_screwup21 : "so if the ziplist is [1, 2] 3 [5]" -- what do you mean by this ? do you mean `ZL [1,2] 3 [5]', or do you mean `ZL [2,1] 3 [5]' ? |
| 14:16:24 | <ski> | (it's not at all clear which you intended) |
| 14:16:29 | <royal_screwup21> | the former |
| 14:17:17 | <ski> | so, yes, `before (toZipList [2,1] 3 [5])' will return `toZipList [2] 1 [3,5]' |
| 14:17:38 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-pozlvwyabhwikscl) (Quit: Connection closed for inactivity) |
| 14:17:45 | <ski> | iow, `before (ZL [1,2] 3 5)' will return `ZL [2] 1 [3,5]' -- this is the same thing |
| 14:20:19 | <royal_screwup21> | ski the core idea behind this impl is that preprending an element to a list is inexpensive, whereas append is expensive -- am i thinking correctly? |
| 14:21:41 | → | blankhart joins (~blankhart@pool-100-35-219-3.nwrknj.fios.verizon.net) |
| 14:23:05 | × | Qui_Sum1 quits (~Qui_Sum@178.162.212.214) () |
| 14:25:01 | <ski> | royal_screwup21 : yes, that's correct |
| 14:25:06 | <royal_screwup21> | ok cool :) |
| 14:25:15 | <royal_screwup21> | thanks for much for all your help - much appreciated |
| 14:25:55 | × | bitmagie quits (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) (Quit: bitmagie) |
| 14:26:52 | <ski> | "I'm not sure I understand what's wrong with wrt to precedence" -- hmm, not the best example, but consider `NotFocus (-3) % Focus 2', of type `Ratio (ZipElem Int)'. if you `show' this, you would presumably get `" -3 % (2)"', where that negation isn't protected by brackets, while precedence indicates that it ought to be |
| 14:27:26 | → | bitmagie joins (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) |
| 14:27:59 | <ski> | i'm sure you can construct better (that is, worse) examples, but i was trying to think of one that's in the base library |
| 14:28:52 | × | neiluj quits (~jco@unaffiliated/neiluj) (Ping timeout: 256 seconds) |
| 14:29:06 | <merijn> | ski: eh...did you use ZipList for a list zipper? That seems needlessly confusing, given the existing ZipList... |
| 14:29:07 | × | bitmagie quits (~Thunderbi@200116b8068f010041b23aab865e3023.dip.versatel-1u1.de) (Client Quit) |
| 14:29:18 | <ski> | the point is that `Show' is supposed to protect parts (like your `x' in `NotFocus x' and `Focus x') with wrapping brackets, if required to force the intended reading, due to precedence of operators |
| 14:29:37 | <geekosaur> | merijn, royal_screwup21 did and was already told about the collision |
| 14:29:41 | <merijn> | ah |
| 14:29:49 | <ski> | merijn : "<dminuoso> royal_screwup21: btw, thats better called a zipper than a ziplist","<dminuoso> We have a newtype ZipList which provides an alternate Alternative instance for [], but it's unrelated to your thing" |
| 14:31:43 | <ski> | royal_screwup21 : usually, except in very simple cases, when you're writing a `Show' instance manually, you should define `showsPrec', not `show' |
| 14:33:17 | <ski> | you can define `show' if each possible value is "atomic", never requires wrapping brackets. e.g. `data Bool = False | True' has only "constant data constructors", none of them are parameterized, they don't take arguments, don't have components |
| 14:36:04 | <ski> | royal_screwup21 : oh, and sorry. `showsChar' above should be `showChar' |
| 14:36:28 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 14:36:31 | <royal_screwup21> | :) |
| 14:38:18 | <ski> | sometimes it makes sense to not expose the implementation (in your case the `ZL' data constructor) in the `Show' instance. but then, imho, one ought to output an expression in terms of the exported operations, the public API, of the module (assuming the data type itself is exported) |
| 14:38:32 | × | darjeeling_ quits (~darjeelin@122.245.210.116) (Ping timeout: 260 seconds) |
| 14:38:52 | → | britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) |
| 14:38:58 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 14:39:07 | → | renzhi joins (~renzhi@2607:fa49:655f:e600::28da) |
| 14:39:11 | <ski> | @let tabulate :: Ix i => (i,i) -> (i -> e) -> Array i e; tabulate ix f = listArray ix [f i | i <- range ix] |
| 14:39:12 | <lambdabot> | Defined. |
| 14:39:40 | <ski> | > tabulate (0,7) (\i -> i^2 + 1) |
| 14:39:41 | <lambdabot> | error: |
| 14:39:41 | <lambdabot> | Ambiguous occurrence ‘tabulate’ |
| 14:39:41 | <lambdabot> | It could refer to |
| 14:39:46 | <ski> | > L.tabulate (0,7) (\i -> i^2 + 1) |
| 14:39:48 | <lambdabot> | array (0,7) [(0,1),(1,2),(2,5),(3,10),(4,17),(5,26),(6,37),(7,50)] |
| 14:40:51 | <ski> | that's an example. `Array' is an abstract data type, so its `Show' instance displays an array value in terms of the `array' operation for constructing them (note that i called `listArray', now `array', above. `listArray' is another operation for constructing them) |
| 14:40:55 | <ski> | @type array |
| 14:40:57 | <lambdabot> | Ix i => (i, i) -> [(i, e)] -> Array i e |
| 14:40:59 | <ski> | @type listArray |
| 14:41:00 | <lambdabot> | Ix i => (i, i) -> [e] -> Array i e |
| 14:42:02 | <ski> | (`listArray' assumes the elements come in a standard order. `array' doesn't assume that, you can list index-element pairs in any order) |
| 14:42:13 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 14:45:19 | → | neiluj joins (~jco@43.245.204.77.rev.sfr.net) |
| 14:47:05 | → | jakob_ joins (~textual@p200300f49f16220038ce51646f783e30.dip0.t-ipconnect.de) |
| 14:47:53 | ← | jakalx parts (~jakalx@base.jakalx.net) ("Disconnected: closed") |
| 14:49:40 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 14:50:08 | → | Amras joins (~Amras@unaffiliated/amras0000) |
| 14:51:05 | → | darjeeling_ joins (~darjeelin@122.245.208.31) |
| 14:51:24 | → | christo joins (~chris@81.96.113.213) |
| 14:51:56 | → | Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se) |
| 14:52:06 | → | manjaro-user joins (~manjaro-u@109.77.71.163) |
| 14:53:47 | → | motte joins (~weechat@unaffiliated/motte) |
| 14:54:22 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 256 seconds) |
| 14:54:36 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 14:56:29 | → | avdb joins (~avdb@ip-213-49-124-119.dsl.scarlet.be) |
| 14:57:13 | × | gproto0023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 264 seconds) |
| 15:00:42 | <motte> | hi, how can i find all possible combinations of a nested list? the result should contain only one element from a given index |
| 15:00:54 | → | lucasb joins (uid333435@gateway/web/irccloud.com/x-oypdzthrgbpglsbk) |
| 15:01:09 | <motte> | e.g. [[1,2], [4,5]] should turn into [[1,2], [1,5], [2,4], [2,5]] |
| 15:01:54 | <merijn> | > traverse sequence [[1,2], [4,5]] |
| 15:01:56 | <lambdabot> | error: |
| 15:01:56 | <lambdabot> | • Ambiguous type variables ‘f0’, |
| 15:01:56 | <lambdabot> | ‘a0’ arising from a use of ‘show_M31303913069... |
| 15:01:59 | <merijn> | aww |
| 15:02:26 | × | xff0x quits (~fox@2001:1a81:53f2:4b00:f0ff:5175:9775:725d) (Ping timeout: 264 seconds) |
| 15:03:52 | <xerox_> | > sequence [[1,2],[4,5]] |
| 15:03:54 | <lambdabot> | [[1,4],[1,5],[2,4],[2,5]] |
| 15:04:05 | <merijn> | rats, it *is* just sequence? |
| 15:04:18 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 15:04:35 | <motte> | oh i messed it up, the result should be [[1,4], [1,5], [2,4], [2,5]] |
| 15:04:40 | <xerox_> | ding! |
| 15:05:24 | <merijn> | xerox_: I thought that first, but thought the type didn't match >.> |
| 15:06:25 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds) |
| 15:07:24 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) () |
| 15:07:33 | → | conal joins (~conal@66.115.157.159) |
| 15:08:28 | <motte> | huh it really is sequence |
| 15:08:56 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-vehblmdtqrevxqug) |
| 15:09:13 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
| 15:09:22 | <bqv> | well what d'you know, it really is just sequence |
| 15:09:27 | → | mtothem joins (~mtothem@h-213-180.A392.priv.bahnhof.se) |
| 15:09:29 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection) |
| 15:09:44 | ← | jsmolic parts (~quassel@95.168.121.30) ("https://quassel-irc.org - Chat comfortably. Anywhere.") |
| 15:09:54 | → | bifunc2 joins (bifunc2@gateway/vpn/protonvpn/bifunc2) |
| 15:10:02 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 15:11:02 | <bifunc2> | What's a good way to find a bytestring b between two bytestrings b1, b2? (b1 < b < b2) |
| 15:11:14 | <bifunc2> | is there any library for this? |
| 15:11:21 | <bifunc2> | (of course, Nothing, if none exists) |
| 15:11:55 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 15:13:12 | <Uniaika> | bifunc2: like, a substring? |
| 15:13:15 | × | alp quits (~alp@2a01:e0a:58b:4920:ed84:e1ea:bd3d:3a34) (Ping timeout: 272 seconds) |
| 15:13:33 | <ski> | find common prefix, then take middle point of next two bytes (assuming the first one has at least one more) ? |
| 15:13:47 | × | borne quits (~fritjof@200116b86489f5004fbf5cd6c83663b1.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 15:13:53 | <hekkaidekapus> | > traverse permutations [[1, 2], [4, 5]] -- motte: <== Not what you asked about but may come handy. |
| 15:13:55 | <lambdabot> | [[[1,2],[4,5]],[[1,2],[5,4]],[[2,1],[4,5]],[[2,1],[5,4]]] |
| 15:14:23 | → | Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net) |
| 15:14:25 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 15:14:27 | → | xff0x joins (~fox@2001:1a81:53f2:4b00:f0ff:5175:9775:725d) |
| 15:17:02 | × | jakob_ quits (~textual@p200300f49f16220038ce51646f783e30.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 15:18:07 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 15:18:12 | <motte> | hekkaidekapus: haha that's exactly what i was currently working on |
| 15:18:39 | <hekkaidekapus> | oh, sorry for the spoiler! |
| 15:19:26 | <motte> | hekkaidekapus: it's good, thanks |
| 15:19:49 | → | polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
| 15:20:10 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
| 15:20:32 | → | revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) |
| 15:20:41 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 15:22:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 15:26:55 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 15:27:01 | <motte> | so now i'm trying to run length $ traverse permutations on [[a]], where the length of the outer list is 9 and the length of the inner list is 4 and this very quickly takes away all of my ram |
| 15:27:50 | × | LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Remote host closed the connection) |
| 15:28:05 | <pjb> | motte: permutations is exponential… |
| 15:28:44 | <motte> | pjb: yes, i realize that, but couldn't haskell discard the already calculated part of the list? |
| 15:28:48 | → | texasmyn_ joins (~texasmyns@185.229.59.75) |
| 15:29:31 | texasmyn_ | is now known as texasmynsted_ |
| 15:29:52 | <pjb> | I don't know what prevents it to do that. |
| 15:30:03 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:30:20 | × | texasmynsted quits (~texasmyns@99.96.221.112) (Killed (cherryh.freenode.net (Nickname regained by services))) |
| 15:30:20 | texasmynsted_ | is now known as texasmynsted |
| 15:30:37 | → | texasmynsted_ joins (~texasmyns@99.96.221.112) |
| 15:31:25 | <pjb> | motte: but you can compute it directly as the factorial of the length of the original lists. |
| 15:31:37 | → | reallymemorable joins (~quassel@2601:180:8300:8fd0:c5df:6e57:bcff:c1bb) |
| 15:31:56 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 15:32:11 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) |
| 15:32:52 | <merijn> | motte: Where are you running that? i.e. in ghci? |
| 15:33:10 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 15:33:35 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 15:34:01 | <bifunc2> | ski thank you this is the key |
| 15:34:34 | <motte> | merijn: yes, ghci |
| 15:34:34 | → | comerijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 15:35:31 | <motte> | merijn: seems to be the same when i compile it |
| 15:36:21 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 15:36:37 | <motte> | although i'm very surprised to see that it uses all of my 8 threads..? |
| 15:36:45 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds) |
| 15:36:54 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 15:37:19 | → | nbloomf joins (~nbloomf@76.217.43.73) |
| 15:37:19 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 15:37:25 | × | nbloomf quits (~nbloomf@76.217.43.73) (Client Quit) |
| 15:37:29 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-91-208.revip7.asianet.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:37:39 | <comerijn> | Did you compile with -O2? |
| 15:37:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 15:39:20 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 272 seconds) |
| 15:39:59 | <motte> | comerijn: yes |
| 15:40:29 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 272 seconds) |
| 15:40:56 | <comerijn> | Ok, then no clue without seeing code :) |
| 15:40:58 | × | knupfer quits (~Thunderbi@200116b8249e5f0010c5e6f6682b8ccf.dip.versatel-1u1.de) (Quit: knupfer) |
| 15:41:32 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 15:41:37 | × | veverak quits (~squirrel@ip-89-102-98-161.net.upcbroadband.cz) (Quit: WeeChat 2.3) |
| 15:41:37 | × | neiluj quits (~jco@43.245.204.77.rev.sfr.net) (Ping timeout: 256 seconds) |
| 15:41:44 | → | wtw joins (~wtw@unaffiliated/wtw) |
| 15:42:03 | × | ech quits (~user@gateway/tor-sasl/ech) (Ping timeout: 240 seconds) |
| 15:42:42 | <hekkaidekapus> | motte, comerijn: with `print $ length $ traverse permutations [[(1 :: Int) .. 4], [5 .. 13]]` |
| 15:42:56 | <hekkaidekapus> | I get: |
| 15:42:59 | <hekkaidekapus> | 8709120 |
| 15:43:09 | <hekkaidekapus> | 0.81user 0.04system 0:00.86elapsed 99%CPU (0avgtext+0avgdata 155892maxresident)k |
| 15:43:24 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 15:43:31 | ← | Whome parts (0c986a83@12.152.106.131) () |
| 15:45:08 | <dsal> | dminuoso: re: big data: http://dustin.sallings.org/2014/02/04/bigdata.html |
| 15:45:45 | → | bidabong joins (uid272474@gateway/web/irccloud.com/x-plghuymdrvvlqwlm) |
| 15:49:53 | → | baidobz joins (2d56c95b@45.86.201.91) |
| 15:50:42 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Quit: leaving) |
| 15:52:42 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 15:54:09 | → | texasmyn_ joins (~texasmyns@185.229.59.3) |
| 15:54:10 | → | ech joins (~user@gateway/tor-sasl/ech) |
| 15:55:09 | → | texasmy__ joins (~texasmyns@2600:6c40:700:5fb3:e17e:7475:52b9:a754) |
| 15:55:54 | → | fendor__ joins (~fendor@178.115.130.14.wireless.dyn.drei.com) |
| 15:56:23 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 15:56:26 | texasmy__ | is now known as texasmynsted__ |
| 15:56:29 | → | squirrel1 joins (~squirrel@ip-89-102-98-161.net.upcbroadband.cz) |
| 15:56:49 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 15:56:58 | × | texasmynsted quits (~texasmyns@185.229.59.75) (Killed (moon.freenode.net (Nickname regained by services))) |
| 15:56:58 | texasmynsted__ | is now known as texasmynsted |
| 15:57:01 | squirrel1 | is now known as veverak |
| 15:57:16 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds) |
| 15:58:41 | → | liaar0402 joins (258f376a@37.143.55.106) |
| 15:58:58 | × | texasmyn_ quits (~texasmyns@185.229.59.3) (Ping timeout: 272 seconds) |
| 15:58:58 | × | fendor_ quits (~fendor@178.165.131.115.wireless.dyn.drei.com) (Ping timeout: 272 seconds) |
| 15:59:17 | × | liaar0402 quits (258f376a@37.143.55.106) (Remote host closed the connection) |
| 15:59:43 | <baidobz> | Hi everybody, I'm trying to run an IO action, that returns Either, for each element in a list and would like to stop evaluation as soon as one is Left. I tried using fmap and sequence but the later actions are still evaluated and the calculation does not short-circuit. Is the issue that bind in IO is strict? |
| 16:00:08 | → | benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-dkapzzdvbagqfebh) |
| 16:04:52 | <tomsmeding> | baidobz: can you share the relevant piece of code? It may indeed be that your issue is that bind in IO is strict |
| 16:05:28 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 16:07:05 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 240 seconds) |
| 16:07:11 | × | bifunc2 quits (bifunc2@gateway/vpn/protonvpn/bifunc2) (Quit: -) |
| 16:08:53 | <ski> | baidobz : fwiw, in general, instead of `sequence (fmap f xs)', you can do `mapM f xs'. but from what you're saying, it sounds like you want to use `ExceptT'. but let's see the code ? |
| 16:09:39 | <tomsmeding> | I suspect that the relevant code looks like 'sequence <$> mapM action list' |
| 16:09:42 | <mtothem> | How can i import a local haskell module to my xmonad.hs? |
| 16:09:48 | <ski> | (something like `runExceptT (mapM (ExceptT . f) xs)') |
| 16:09:59 | → | Ariakenom joins (~Ariakenom@h-82-196-111-82.NA.cust.bahnhof.se) |
| 16:10:07 | <ski> | mtothem : `import MyModule' ? |
| 16:10:15 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 16:10:57 | × | quinn quits (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Ping timeout: 244 seconds) |
| 16:11:07 | <ski> | tomsmeding : hm, sounds likely |
| 16:11:51 | <mtothem> | I've been trying to do that. but it doesn't work for some reason. it does in other projects. so maybe xmonad does something differently i'm thinking |
| 16:12:02 | <ski> | what is the other file named ? |
| 16:12:19 | <mtothem> | `colorscheme.hs` ski |
| 16:12:36 | <ski> | try naming it `ColorScheme.hs', and do `import ColorScheme' ? |
| 16:12:41 | → | Sanchayan joins (~Sanchayan@171.61.102.109) |
| 16:13:04 | <tomsmeding> | (the initial letter of a module name must be a capital letter, the "S" doesn't matter) |
| 16:13:27 | × | Sanchayan quits (~Sanchayan@171.61.102.109) (Read error: Connection reset by peer) |
| 16:13:30 | <mtothem> | `Could not find module ColorScheme` |
| 16:13:31 | <ski> | (unless it's the main module of an executable) |
| 16:13:49 | <tomsmeding> | (or you're using a case-insensitive file system, like is the default on macOS) |
| 16:13:51 | <ski> | you renamed the file ? |
| 16:13:54 | <ski> | yea |
| 16:14:09 | × | berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
| 16:14:38 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 16:16:26 | → | quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) |
| 16:17:11 | <baidobz> | tomsmeding: ski: This is what I'm playing around with now: https://pastebin.com/A2MhUdC8 |
| 16:18:06 | <tomsmeding> | baidobz: yes try ski's suggestion with ExceptT |
| 16:18:07 | <baidobz> | Basically I would like to short-circuit the processing of the list elements in IO upon any error |
| 16:18:29 | ski | low fours tomsmeding |
| 16:18:29 | <tomsmeding> | (import Control.Monad.Except from the 'mtl' package) |
| 16:18:56 | <ski> | baidobz : but first replace `sequence (map f xs)' by `mapM f xs' |
| 16:19:16 | <tomsmeding> | (not necessary, it means the same, but it's neater) |
| 16:19:20 | <baidobz> | Great I'll try that, thank you |
| 16:21:02 | <ski> | baidobz : you could change the signature to `runFoo :: Text -> ExceptT MyErr IO Text', if you like to |
| 16:21:52 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 16:22:12 | <ski> | (if it's likely that you'd want to call `runFoo' in a context where you'd want to continue doing some possibly-aborting execution (assuming the `runFoo' invocation didn't abort), then i'd do that) |
| 16:22:59 | <baidobz> | Indeed that worked! How come it does not work with a plain map and sequence? Where does the short-circuiting logic come from? |
| 16:23:04 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 16:23:39 | <tomsmeding> | ExceptT explicitly stops executing remaining monadic actions if a Left occurs |
| 16:23:43 | <baidobz> | The bind of MonadError? |
| 16:24:04 | <tomsmeding> | normally, the mapM (or in your original version, the 'sequence') would first evaluate all monadic actions, and only when those are complete return the resulting list |
| 16:24:05 | <tomsmeding> | yup |
| 16:24:06 | → | zaquest joins (~notzaques@5.128.210.178) |
| 16:24:10 | × | zaquest quits (~notzaques@5.128.210.178) (Read error: Connection reset by peer) |
| 16:24:30 | <ski> | it comes from using the `ExceptT' version of `sequence'/`mapM', which ultimately comes from the `Applicative' / `Monad' instance for `ExceptT' being short-circuiting |
| 16:25:15 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 16:26:30 | <ski> | (`traverse' (or `sequenceA') is a version of `mapM' (or `sequence') which only requires `Applicative', not `Monad'. back when `sequence'/`mapM' was defined, `Applicative' didn't exist yet, so now you have both those, and `sequenceA'/`traverse') |
| 16:27:15 | <ski> | baidobz : `MonadError' doesn't come to play here |
| 16:27:46 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 16:28:45 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 16:29:43 | → | gproto0023 joins (~gproto23@unaffiliated/gproto23) |
| 16:30:38 | × | kav quits (~kari@dsl-hkibng42-56733f-225.dhcp.inet.fi) (Ping timeout: 264 seconds) |
| 16:30:40 | → | zaquest joins (~notzaques@5.128.210.178) |
| 16:31:01 | → | Martinsos joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 16:31:26 | <baidobz> | Super interesting. I'm looking at the Haddock and mtl's sources to try and find the relevant definition in the code now |
| 16:32:05 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds) |
| 16:32:18 | <tomsmeding> | https://hackage.haskell.org/package/transformers-0.5.6.2/docs/src/Control.Monad.Trans.Except.html#line-212 |
| 16:32:25 | <baidobz> | I guess it's in transformers |
| 16:32:37 | <baidobz> | Yes! Thanks :) |
| 16:33:20 | <tomsmeding> | it's refreshing how readable basic definitions like these are, the short-circuiting is actually evident in the definition of >>= (which is only 5 lines) |
| 16:33:36 | <tomsmeding> | contrast with e.g. C++ standard libraries... |
| 16:34:10 | <baidobz> | Indeed it's very simple and clear |
| 16:34:48 | <baidobz> | I used to do lots of template meta-programming in C++ and I don't miss it |
| 16:35:01 | → | Chi1thangoo joins (~Chi1thang@87.112.60.168) |
| 16:35:17 | × | conal quits (~conal@66.115.157.159) (Quit: Computer has gone to sleep.) |
| 16:35:49 | <baidobz> | Thanks a lot for your quick help! |
| 16:36:12 | → | Martinsos_ joins (~Martinsos@cpe-188-129-116-164.dynamic.amis.hr) |
| 16:36:55 | <baidobz> | Can I also ask: is there a situation (different Monad?) where my naive approach with sequence would work out similarly due to laziness or does sequence/mapM always evaluate all monadic actions? |
| 16:37:28 | <comerijn> | baidobz: The ordering of effects is independent of laziness |
| 16:37:34 | <ski> | it always executes all the actions (performing all the effects) |
| 16:37:59 | <comerijn> | baidobz: The Monad/Applicative instance of, say, IO are always in sequential order |
| 16:38:01 | <ski> | but yes, non-strictness is a separate thing |
| 16:38:48 | <solonarv> | well, no. sequence [System.Exit.exit, putStrLn "hello"] will not output hello to the terminal, for a counterexample |
| 16:38:49 | × | Martinsos_ quits (~Martinsos@cpe-188-129-116-164.dynamic.amis.hr) (Client Quit) |
| 16:38:59 | <comerijn> | baidobz: So yes, sequence and mapM guarantee that all the actions are done by the time the sequence/mapM is done |
| 16:39:03 | <comerijn> | solonarv: >.> |
| 16:39:15 | ← | Martinsos parts (~user@cpe-188-129-116-164.dynamic.amis.hr) ("ERC (IRC client for Emacs 27.1)") |
| 16:39:21 | <comerijn> | solonarv: That's not a contradiction, anyway |
| 16:39:31 | hackage | polysemy-methodology-composite 0.1.0.0 - Functions for using polysemy-methodology with composite. https://hackage.haskell.org/package/polysemy-methodology-composite-0.1.0.0 (locallycompact) |
| 16:39:47 | <comerijn> | solonarv: exit happens in sequential order with the rest :p |
| 16:39:49 | <solonarv> | depending on which Monad instance is being used, the later ones may or may not be exexucted, or evaluated |
| 16:40:03 | <solonarv> | (however the *order* does not depend on which instance is in play) |
| 16:40:29 | <ski> | oh, good example. i suppose one should say that each action is executed, provided all the previous ones terminated normally |
| 16:40:44 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:b423:9089:de01:217e) |
| 16:41:01 | hackage | polysemy-methodology-composite 0.1.1.0 - Functions for using polysemy-methodology with composite. https://hackage.haskell.org/package/polysemy-methodology-composite-0.1.1.0 (locallycompact) |
| 16:41:04 | → | xerox_ joins (~xerox@unaffiliated/xerox) |
| 16:41:14 | <solonarv> | they're executed in order, but an action might say "exit immediately, nothing after me gets executed" or even "everything after me happens twice" or "everything after me happens on another thread" |
| 16:41:32 | <ski> | (obviously when executing `do foo; undefined; bar', `bar' will not be executed, at least in general) |
| 16:42:00 | <ski> | yes, which is exactly what `ExceptT' does (the "nothing after me gets executed" part) |
| 16:42:31 | hackage | polysemy-methodology-composite 0.1.2.0 - Functions for using polysemy-methodology with composite. https://hackage.haskell.org/package/polysemy-methodology-composite-0.1.2.0 (locallycompact) |
| 16:42:41 | <solonarv> | yep; the other two can be accomplished by Cont / ContT, and probably also by a number of other monads |
| 16:42:56 | <ski> | yep (i see how one could accomplish it) |
| 16:43:25 | × | avdb quits (~avdb@ip-213-49-124-119.dsl.scarlet.be) (Ping timeout: 240 seconds) |
| 16:43:28 | <baidobz> | Great points, that makes sense |
| 16:43:31 | hackage | cabal-file 0.1.1 - Cabal file access https://hackage.haskell.org/package/cabal-file-0.1.1 (JensPetersen) |
| 16:45:46 | → | Martinsos joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 16:46:06 | ← | Martinsos parts (~user@cpe-188-129-116-164.dynamic.amis.hr) () |
| 16:46:25 | <motte> | hekkaidekapus: >[[(1 :: Int) .. 4], [5 .. 13]] |
| 16:46:29 | <ski> | in `do n <- [1 .. 9]; d <- [2 .. n-1]; guard (n `mod` d == 0); return (n,d)', for some choice of `n' (namely `1'), everything after `d <- [2 .. n-1]' will be executed zero times (iow, we abort that choice of `n'), and for some other choices of `n', what's after will be executed several times |
| 16:47:31 | <ski> | (and then, similarly, for different choices of `d', what comes after the `guard' invocation may be executed once or not at all) |
| 16:47:43 | <ski> | > do n <- [1 .. 9]; d <- [2 .. n-1]; guard (n `mod` d == 0); return (n,d) |
| 16:47:45 | <lambdabot> | [(4,2),(6,2),(6,3),(8,2),(8,4),(9,3)] |
| 16:48:09 | <motte> | hekkaidekapus: the list i was talking about was more like replicate 9 [1..4] |
| 16:48:26 | <ski> | (it computes composite numbers less than ten, paired with possible proper divisors) |
| 16:49:45 | <motte> | hekkaidekapus: so main = print $ length $ traverse permutations $ replicate 9 [1..4] , which quickly eats all my ram, even with -O2 |
| 16:50:09 | → | knupfer joins (~Thunderbi@200116b8249e5f0024d540c2b38d8e9b.dip.versatel-1u1.de) |
| 16:50:32 | → | Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) |
| 16:51:13 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Ping timeout: 260 seconds) |
| 16:53:38 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 16:55:50 | → | kav joins (~kari@dsl-hkibng42-56733f-225.dhcp.inet.fi) |
| 16:58:11 | → | alp joins (~alp@2a01:e0a:58b:4920:888e:a635:2469:ca8a) |
| 16:58:50 | × | Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection) |
| 16:58:55 | → | christo joins (~chris@81.96.113.213) |
| 16:59:16 | × | raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal) |
| 16:59:42 | × | comerijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 16:59:46 | → | Martinsos_ joins (uid473568@gateway/web/irccloud.com/x-ofadbekegfkzcelc) |
| 17:00:42 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 17:02:00 | hackage | beam-automigrate 0.1.0.0 - DB migration library for beam, targeting Postgres. https://hackage.haskell.org/package/beam-automigrate-0.1.0.0 (abrar) |
| 17:03:30 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 258 seconds) |
| 17:04:06 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-tcyoqfqkxtjwjlrv) |
| 17:07:31 | → | LKoen_ joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 17:07:49 | → | Martinsos joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 17:08:24 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 17:09:19 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 17:09:26 | <Martinsos> | join /nickserv |
| 17:10:21 | × | gproto0023 quits (~gproto23@unaffiliated/gproto23) (Read error: Connection reset by peer) |
| 17:10:25 | × | LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Ping timeout: 264 seconds) |
| 17:11:44 | → | gproto0023 joins (~gproto23@unaffiliated/gproto23) |
| 17:12:37 | × | Martinsos quits (~user@cpe-188-129-116-164.dynamic.amis.hr) (Quit: ERC (IRC client for Emacs 27.1)) |
| 17:12:37 | Martinsos_ | is now known as Martinsos |
| 17:13:56 | → | Martinso` joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 17:14:05 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds) |
| 17:14:40 | Martinso` | is now known as Martinsos` |
| 17:14:52 | → | conal joins (~conal@66.115.157.159) |
| 17:14:59 | × | Martinsos` quits (~user@cpe-188-129-116-164.dynamic.amis.hr) (Client Quit) |
| 17:15:39 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 17:15:46 | × | Martinsos quits (uid473568@gateway/web/irccloud.com/x-ofadbekegfkzcelc) () |
| 17:16:17 | × | chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 17:17:19 | → | crdrost joins (~crdrost@c-98-207-102-156.hsd1.ca.comcast.net) |
| 17:17:48 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 17:20:23 | → | conal_ joins (~conal@64.71.133.70) |
| 17:20:23 | → | electricityZZZZ joins (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) |
| 17:20:23 | × | gproto0023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 260 seconds) |
| 17:20:58 | × | conal quits (~conal@66.115.157.159) (Ping timeout: 260 seconds) |
| 17:27:31 | × | texasmynsted quits (~texasmyns@2600:6c40:700:5fb3:e17e:7475:52b9:a754) () |
| 17:28:14 | → | Martinsos joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 17:28:23 | ← | Martinsos parts (~user@cpe-188-129-116-164.dynamic.amis.hr) ("ERC (IRC client for Emacs 27.1)") |
| 17:29:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:34:27 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 17:35:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 17:35:03 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 17:35:45 | → | gproto0023 joins (~gproto23@unaffiliated/gproto23) |
| 17:35:57 | → | machined1od joins (~machinedg@207.253.244.210) |
| 17:36:07 | × | machinedgod quits (~machinedg@207.253.244.210) (Remote host closed the connection) |
| 17:38:12 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 260 seconds) |
| 17:40:10 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 17:41:30 | hackage | stack-all 0.1 - CLI tool for building across Stackage major versions https://hackage.haskell.org/package/stack-all-0.1 (JensPetersen) |
| 17:44:50 | × | jespada quits (~jespada@90.254.245.49) (Quit: Leaving) |
| 17:51:41 | → | jakob_ joins (~textual@p57b0eae0.dip0.t-ipconnect.de) |
| 17:51:42 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 17:52:51 | → | Tario joins (~Tario@201.192.165.173) |
| 17:54:44 | → | kwantuM joins (1f971d5a@31-151-29-90.dynamic.upc.nl) |
| 17:55:11 | <kwantuM> | hey, I was wondering if someone could explain what the (I# x#) syntax means. I was looking at the data.bits source |
| 17:55:44 | <glguy> | kwantuM: in that context # is just another letter |
| 17:56:11 | <glguy> | I# is a constructor and x# is a variable there. |
| 17:56:31 | <glguy> | The convention is that unboxed things have a # in their names |
| 17:56:31 | <kwantuM> | so why is the # used? |
| 17:56:38 | <kwantuM> | oh okay, thanks! |
| 17:57:25 | × | kwantuM quits (1f971d5a@31-151-29-90.dynamic.upc.nl) (Remote host closed the connection) |
| 17:59:26 | → | raichoo joins (~raichoo@dslb-178-001-022-086.178.001.pools.vodafone-ip.de) |
| 17:59:49 | × | alp quits (~alp@2a01:e0a:58b:4920:888e:a635:2469:ca8a) (Ping timeout: 272 seconds) |
| 18:00:22 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 18:00:56 | × | todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 265 seconds) |
| 18:01:34 | × | Zetagon quits (~leo@c151-177-52-233.bredband.comhem.se) (Remote host closed the connection) |
| 18:01:51 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Remote host closed the connection) |
| 18:01:55 | <hekkaidekapus> | motte: Yeah, that will blow up quickly. The oneliner we are using is useful for short lists. Perhaps approach your problem from another perspective. Define a list (a set, really) and build up permutations σ₁, σ₂, σ₃… based only on indices. Then work on those σs to pick elements from the set as you like. |
| 18:02:19 | → | gproto023 joins (~gproto23@unaffiliated/gproto23) |
| 18:02:21 | × | vilpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 18:02:32 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 18:02:43 | × | gproto0023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds) |
| 18:03:37 | → | texasmynsted joins (~texasmyns@2600:6c40:700:5fb3:f092:e5c5:68d2:d761) |
| 18:06:29 | × | APic quits (apic@apic.name) (Ping timeout: 268 seconds) |
| 18:06:41 | → | wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) |
| 18:06:46 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 18:06:49 | × | w1gz quits (~do@159.89.11.133) (Quit: WeeChat 2.8) |
| 18:07:22 | → | APic joins (apic@apic.name) |
| 18:08:12 | × | texasmynsted quits (~texasmyns@2600:6c40:700:5fb3:f092:e5c5:68d2:d761) (Remote host closed the connection) |
| 18:08:23 | × | bliminse quits (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) (Ping timeout: 256 seconds) |
| 18:08:47 | → | texasmynsted joins (~texasmyns@64.44.55.44) |
| 18:09:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:13:45 | × | TommyC quits (~TommyC@unaffiliated/sepulchralbloom) (Ping timeout: 240 seconds) |
| 18:13:55 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Quit: leaving) |
| 18:15:12 | → | todda7 joins (~torstein@ppp-2-84-17-169.home.otenet.gr) |
| 18:18:51 | × | britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep) |
| 18:22:01 | hackage | telegram-bot-simple 0.3.4 - Easy to use library for building Telegram bots. https://hackage.haskell.org/package/telegram-bot-simple-0.3.4 (swamp_agr) |
| 18:22:24 | × | LKoen_ quits (~LKoen@9.253.88.92.rev.sfr.net) (Remote host closed the connection) |
| 18:22:57 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 18:26:18 | → | TommyC joins (~TommyC@unaffiliated/sepulchralbloom) |
| 18:27:45 | → | nados joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 18:35:09 | → | jneira joins (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) |
| 18:35:11 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 18:35:15 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Read error: Connection reset by peer) |
| 18:36:36 | → | Tario joins (~Tario@201.192.165.173) |
| 18:36:51 | × | dhouthoo quits (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9) |
| 18:37:21 | → | rusua joins (uid124537@gateway/web/irccloud.com/x-tapvwonhsgfjpqka) |
| 18:38:01 | × | jakob_ quits (~textual@p57b0eae0.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 18:38:27 | → | teardown_ joins (~user@gateway/tor-sasl/mrush) |
| 18:39:05 | × | renzhi quits (~renzhi@2607:fa49:655f:e600::28da) (Ping timeout: 272 seconds) |
| 18:39:51 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 18:40:55 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 18:41:03 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds) |
| 18:41:06 | → | avdb joins (~avdb@ip-213-49-124-119.dsl.scarlet.be) |
| 18:41:39 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 18:43:40 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 18:43:56 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 18:44:51 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:45:15 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 18:45:17 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:46:00 | → | jmcarthur joins (~jmcarthur@104.140.53.251) |
| 18:46:27 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 260 seconds) |
| 18:46:33 | → | alp joins (~alp@2a01:e0a:58b:4920:d528:e132:73d:7a39) |
| 18:48:23 | × | teardown_ quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds) |
| 18:49:21 | → | _ashbreeze_ joins (~mark@72-161-252-32.dyn.centurytel.net) |
| 18:49:34 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 18:50:14 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds) |
| 18:51:11 | → | chaosmasttter joins (~chaosmast@p200300c4a70f620139da516dba2d2a81.dip0.t-ipconnect.de) |
| 18:51:34 | → | leungbk joins (~user@2605:e000:1315:706:6194:c9aa:33f:2f0) |
| 18:54:30 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 18:56:19 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds) |
| 18:56:36 | → | lestrrat joins (~lestrrat@217.146.82.202) |
| 19:03:22 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds) |
| 19:03:26 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 19:04:11 | × | _ashbreeze_ quits (~mark@72-161-252-32.dyn.centurytel.net) (Read error: Connection reset by peer) |
| 19:04:45 | → | _ashbreeze_ joins (~mark@72-161-252-32.dyn.centurytel.net) |
| 19:05:22 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 19:06:26 | → | britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) |
| 19:07:08 | → | zincy__ joins (~tom@2a00:23c8:970a:3501:9884:7ab1:3658:f1fb) |
| 19:10:05 | × | jmcarthur quits (~jmcarthur@104.140.53.251) (Ping timeout: 240 seconds) |
| 19:10:14 | × | asheshambasta quits (~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be) (Ping timeout: 264 seconds) |
| 19:10:40 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 19:10:46 | × | Rudd0 quits (~Rudd0@185.189.115.98) (Ping timeout: 258 seconds) |
| 19:10:56 | × | zincy_ quits (~tom@2a00:23c8:970a:3501:d0cd:312d:55de:c707) (Ping timeout: 246 seconds) |
| 19:12:25 | × | aarvar quits (~foewfoiew@50.35.43.33) (Ping timeout: 246 seconds) |
| 19:13:13 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 19:13:17 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-rtfvtwxlaflqdsii) |
| 19:13:55 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 19:15:02 | × | britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep) |
| 19:15:59 | → | britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) |
| 19:16:14 | × | MarcelineVQ quits (~anja@198.254.202.72) (Ping timeout: 256 seconds) |
| 19:16:28 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 19:17:21 | × | acowley quits (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) (Read error: Connection reset by peer) |
| 19:17:31 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 19:17:55 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:17:57 | × | _ashbreeze_ quits (~mark@72-161-252-32.dyn.centurytel.net) (Read error: Connection reset by peer) |
| 19:18:42 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 19:18:49 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 264 seconds) |
| 19:19:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:19:24 | → | _ashbreeze_ joins (~mark@72-161-252-32.dyn.centurytel.net) |
| 19:24:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 19:25:32 | × | knupfer quits (~Thunderbi@200116b8249e5f0024d540c2b38d8e9b.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 19:27:03 | × | cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Ping timeout: 240 seconds) |
| 19:29:05 | × | manjaro-user quits (~manjaro-u@109.77.71.163) (Ping timeout: 240 seconds) |
| 19:29:58 | × | britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep) |
| 19:30:48 | × | stree quits (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) (Quit: Caught exception) |
| 19:30:48 | × | star_cloud quits (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) (Read error: Connection reset by peer) |
| 19:30:55 | → | britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) |
| 19:31:05 | → | stree joins (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) |
| 19:31:48 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 19:32:09 | → | cantstanya joins (~chatting@gateway/tor-sasl/cantstanya) |
| 19:32:58 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Remote host closed the connection) |
| 19:32:59 | → | star_cloud joins (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) |
| 19:33:11 | × | britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Client Quit) |
| 19:38:45 | → | w1gz joins (~do@159.89.11.133) |
| 19:40:01 | <sm[m]> | friends.. could you guess why doing writeIORef in this yesod test suite blocks the test ? https://paste.tomsmeding.com/HfUbmN1S |
| 19:41:38 | → | bliminse joins (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) |
| 19:41:39 | → | britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) |
| 19:41:59 | <sm[m]> | the test causes this line to run, which presumably reads from the IORef: App {appOpts = opts, appJournal} <- getYesod |
| 19:42:50 | <sm[m]> | or rather, that appJournal IORef does get read from, during the test |
| 19:43:26 | × | avdb quits (~avdb@ip-213-49-124-119.dsl.scarlet.be) (Quit: WeeChat 2.9) |
| 19:43:42 | <tomsmeding> | add more putStrLn until you find the exact statement that blocks :p |
| 19:44:06 | <sm[m]> | and yes, if I comment out the read it's fine. The write followed by the read soon after causes it to block |
| 19:45:49 | <sm[m]> | probably is this running in threaded mode. Perhaps I need atomicWriteIORef.. |
| 19:46:22 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 246 seconds) |
| 19:47:00 | <sm[m]> | no change. Darn. |
| 19:49:43 | × | juri_ quits (~juri@178.63.35.222) (Ping timeout: 260 seconds) |
| 19:52:01 | <sm[m]> | well, I've read https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-IORef.html carefully but nowhere does it say that IORef operations can block. Is it normal ? |
| 19:53:42 | <sm[m]> | I don't even have to writeIORef - if I newIORef with this value, then try to read, it also hangs. Hmm. |
| 19:54:25 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 19:55:05 | <monochrom> | AFAIK writeIORef doesn't block. |
| 19:55:25 | <monochrom> | and even more strongly, it doesn't block other threads either |
| 19:56:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:56:45 | × | blankhart quits (~blankhart@pool-100-35-219-3.nwrknj.fios.verizon.net) (Ping timeout: 240 seconds) |
| 19:57:06 | → | moet joins (~moet@mobile-166-170-42-250.mycingular.net) |
| 19:57:29 | <moet> | can i add a `{-# WARNING .. #-}` pragma on a function body in a class instance? |
| 19:57:44 | <moet> | gets a parse error currently, so i guess the answer is no, but i just wanted to confirm |
| 19:59:02 | × | dragestil quits (~quassel@185.137.175.104) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 19:59:26 | <monochrom> | Does the GHC user's guide say something about this? |
| 20:00:25 | <sm[m]> | monochrom: thanks |
| 20:00:40 | → | jakob_ joins (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) |
| 20:01:22 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 20:01:40 | <sm[m]> | I think what I'm writing must have a circular reference or an infinite loop, but darned if I can see it.. |
| 20:01:44 | <moet> | monochrom: it's kind of unclear, but it says "You can attach a warning to a function, class, type, or data constructor, with the following top-level declarations" |
| 20:02:14 | <moet> | and "You can only attach to entities declared at top level in the module being compiled" |
| 20:02:41 | <moet> | which might be construed to mean that it doesn't include a typeclass instance function because that's "declared" elsewhere, in the module where the typeclass is located? |
| 20:03:22 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 20:04:59 | × | conal_ quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 20:06:19 | → | conal joins (~conal@64.71.133.70) |
| 20:06:53 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 20:07:26 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:08:53 | → | avdb joins (~avdb@ip-213-49-124-119.dsl.scarlet.be) |
| 20:09:27 | → | conal joins (~conal@64.71.133.70) |
| 20:17:31 | × | jneira quits (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) (Ping timeout: 260 seconds) |
| 20:17:37 | × | wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 20:21:17 | → | rprije joins (~rprije@124.148.131.132) |
| 20:22:58 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:26:04 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 20:27:05 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 20:27:28 | × | LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Remote host closed the connection) |
| 20:29:36 | → | davr0s joins (~davrs@host81-147-72-1.range81-147.btcentralplus.com) |
| 20:29:40 | × | ggole quits (~ggole@2001:8003:8119:7200:cd0:562c:261b:241d) (Quit: Leaving) |
| 20:30:25 | → | shadowdao joins (~user@unaffiliated/shadowdaemon) |
| 20:30:35 | × | avdb quits (~avdb@ip-213-49-124-119.dsl.scarlet.be) (Quit: avdb) |
| 20:30:52 | → | avdb joins (~avdb@ip-213-49-124-119.dsl.scarlet.be) |
| 20:30:53 | × | solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Ping timeout: 258 seconds) |
| 20:31:08 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 20:31:19 | × | davr0s quits (~davrs@host81-147-72-1.range81-147.btcentralplus.com) (Remote host closed the connection) |
| 20:31:27 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 20:31:29 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 20:33:58 | × | leungbk quits (~user@2605:e000:1315:706:6194:c9aa:33f:2f0) (Remote host closed the connection) |
| 20:34:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 20:34:29 | → | leungbk` joins (~user@cpe-104-33-52-83.socal.res.rr.com) |
| 20:38:05 | × | gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds) |
| 20:39:20 | → | anthonyw joins (~anthonyw@c-24-10-252-98.hsd1.ut.comcast.net) |
| 20:41:51 | × | crdrost quits (~crdrost@c-98-207-102-156.hsd1.ca.comcast.net) (Quit: This computer has gone to sleep) |
| 20:46:35 | × | jakob_ quits (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 20:47:03 | × | rusua quits (uid124537@gateway/web/irccloud.com/x-tapvwonhsgfjpqka) (Quit: Connection closed for inactivity) |
| 20:47:10 | → | jakob_ joins (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) |
| 20:47:21 | × | jakob_ quits (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) (Client Quit) |
| 20:47:23 | × | livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds) |
| 20:47:45 | → | jakob_ joins (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) |
| 20:48:04 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 20:48:09 | × | jakob_ quits (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) (Client Quit) |
| 20:48:11 | → | Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 20:48:15 | → | livvy joins (~livvy@gateway/tor-sasl/livvy) |
| 20:48:43 | → | jakob_ joins (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) |
| 20:48:48 | × | Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 260 seconds) |
| 20:48:55 | × | jakob_ quits (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) (Client Quit) |
| 20:49:23 | → | jakob_ joins (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) |
| 20:49:41 | × | jakob_ quits (~textual@p200300f49f1622007c6473fefbd3b832.dip0.t-ipconnect.de) (Client Quit) |
| 20:50:11 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
| 20:51:00 | → | renzhi joins (~renzhi@2607:fa49:655f:e600::28da) |
| 20:52:43 | × | anthonyw quits (~anthonyw@c-24-10-252-98.hsd1.ut.comcast.net) (Quit: leaving) |
| 20:53:07 | × | clog quits (~nef@bespin.org) (Ping timeout: 258 seconds) |
| 20:54:31 | <dminuoso> | sm[m]: Compile with profiling, flip on `+RTS -xc -RTS` and see where it hangs? |
| 20:55:08 | <dminuoso> | (That is, then send SIGINT to it when it hangs) |
| 20:55:49 | → | clog joins (~nef@bespin.org) |
| 20:56:25 | → | Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
| 20:57:43 | × | Franciman quits (~francesco@host-82-56-223-169.retail.telecomitalia.it) (Quit: Leaving) |
| 20:58:57 | <sm[m]> | dminuoso: good idea, but I think I've found it. My "simple" value-generating action is going wrong when called with unusual programmatic arguments. Not exactly sure why it hangs but I can see it going off the rails |
| 21:00:02 | × | lestrrat quits (~lestrrat@217.146.82.202) () |
| 21:00:06 | <sm[m]> | ie, it was the value and what the code under test does with it, nothing to do with the IORef activity |
| 21:00:30 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 21:00:31 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 21:00:46 | → | crdrost joins (~crdrost@c-98-207-102-156.hsd1.ca.comcast.net) |
| 21:01:19 | <sm[m]> | tests breaking stuff already \o/ |
| 21:01:25 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 21:02:48 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 21:03:38 | × | coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 21:04:56 | × | cgfbee quits (~bot@oc1.itim-cj.ro) (Ping timeout: 244 seconds) |
| 21:04:57 | × | keep_learning quits (~keep_lear@43.231.26.152) (Quit: Leaving) |
| 21:05:32 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 21:06:51 | × | recon_- quits (~quassel@2602:febc:0:b6::6ca2) (Quit: No Ping reply in 180 seconds.) |
| 21:07:11 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 21:07:18 | → | jonatanb_ joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 21:07:40 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 21:08:07 | → | recon_- joins (~quassel@2602:febc:0:b6::6ca2) |
| 21:09:11 | → | WeChanTonio joins (~WeChanTon@186-130-20-31.ftth.glasoperator.nl) |
| 21:10:30 | hackage | hyper-haskell-server 0.2.3.0, hyper-extra 0.2.0.0, hyper 0.2.1.0 (HeinrichApfelmus): https://qbin.io/longer-equal-cbm8 |
| 21:10:43 | × | avdb quits (~avdb@ip-213-49-124-119.dsl.scarlet.be) (Quit: avdb) |
| 21:12:11 | → | cgfbee joins (~bot@oc1.itim-cj.ro) |
| 21:13:31 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Quit: cosimone) |
| 21:14:44 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 21:15:56 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 21:18:36 | → | conal joins (~conal@64.71.133.70) |
| 21:20:19 | × | britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep) |
| 21:22:37 | → | BluePass joins (~BluePass@185.163.110.116) |
| 21:22:37 | × | chrpape` quits (~user@2a01:4f9:c010:632d::1) (Read error: Connection reset by peer) |
| 21:27:59 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 21:28:19 | → | jakob_ joins (~textual@p57b0eae0.dip0.t-ipconnect.de) |
| 21:30:12 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 272 seconds) |
| 21:30:27 | → | conal joins (~conal@64.71.133.70) |
| 21:34:31 | × | raichoo quits (~raichoo@dslb-178-001-022-086.178.001.pools.vodafone-ip.de) (Quit: Lost terminal) |
| 21:35:13 | × | pavonia quits (~user@unaffiliated/siracusa) (Read error: Connection reset by peer) |
| 21:39:47 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 21:41:23 | × | jonatanb_ quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 21:42:04 | → | WeChan-Tonio joins (~WeChanTon@186-130-20-31.ftth.glasoperator.nl) |
| 21:42:53 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 21:43:00 | ← | WeChanTonio parts (~WeChanTon@186-130-20-31.ftth.glasoperator.nl) ("Leaving") |
| 21:43:01 | × | entel quits (uid256215@botters/entel) () |
| 21:43:20 | → | entel joins (uid256215@botters/entel) |
| 21:44:20 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:b423:9089:de01:217e) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 21:44:57 | ← | WeChan-Tonio parts (~WeChanTon@186-130-20-31.ftth.glasoperator.nl) () |
| 21:53:31 | × | thc202 quits (~thc202@unaffiliated/thc202) (Quit: thc202) |
| 21:53:35 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-rtfvtwxlaflqdsii) (Quit: Connection closed for inactivity) |
| 21:56:45 | × | machined1od quits (~machinedg@207.253.244.210) (Ping timeout: 256 seconds) |
| 21:58:57 | → | chrpape joins (~user@2a01:4f9:c010:632d::1) |
| 21:59:19 | × | chrpape quits (~user@2a01:4f9:c010:632d::1) (Client Quit) |
| 22:00:30 | → | Rudd0 joins (~Rudd0@185.189.115.98) |
| 22:01:00 | → | chrpape joins (~user@2a01:4f9:c010:632d::1) |
| 22:02:30 | × | st8less quits (~st8less@2603:a060:11fd:0:48e3:54d2:40b:a73f) (Quit: WeeChat 2.7.1) |
| 22:03:36 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 22:04:02 | → | conal joins (~conal@64.71.133.70) |
| 22:07:07 | × | kish` quits (~oracle@unaffiliated/oracle) (Ping timeout: 260 seconds) |
| 22:08:15 | → | jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) |
| 22:08:56 | × | chaosmasttter quits (~chaosmast@p200300c4a70f620139da516dba2d2a81.dip0.t-ipconnect.de) (Quit: WeeChat 2.9) |
| 22:10:23 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 22:17:23 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:20:13 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 260 seconds) |
| 22:20:17 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 22:23:27 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 22:27:21 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 22:29:02 | → | PatrcikGrey joins (4d2d3763@77-45-55-99.sta.asta-net.com.pl) |
| 22:29:41 | <PatrcikGrey> | Hello everyone, nice to meet all of you, I tried to google it but failed, so maybe some of you will know the answer: |
| 22:30:12 | <PatrcikGrey> | Do you know any successful uses of haskell in object detection?(especially people detection) |
| 22:31:25 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 264 seconds) |
| 22:31:31 | <PatrcikGrey> | Tried to find some libraries/code/companies but its pretty weak compared to c++, however I would really want to do it in functional way. |
| 22:31:43 | × | livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds) |
| 22:32:30 | → | livvy joins (~livvy@gateway/tor-sasl/livvy) |
| 22:32:57 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 22:33:14 | ← | PatrcikGrey parts (4d2d3763@77-45-55-99.sta.asta-net.com.pl) () |
| 22:33:20 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Read error: Connection reset by peer) |
| 22:33:22 | → | PatrcikGrey joins (4d2d3763@77-45-55-99.sta.asta-net.com.pl) |
| 22:33:54 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Remote host closed the connection) |
| 22:34:21 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 22:37:40 | → | pfurla joins (~pfurla@238.15.195.173.client.static.strong-in52.as13926.net) |
| 22:38:55 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 22:39:22 | <texasmynsted> | What is object detection? |
| 22:40:00 | hackage | polysemy-methodology 0.1.7.0 - Domain modelling algebra for polysemy https://hackage.haskell.org/package/polysemy-methodology-0.1.7.0 (locallycompact) |
| 22:41:59 | <texasmynsted> | Maybe just use an object detection lib from C and call that from Haskell? |
| 22:42:40 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 22:43:07 | → | conal joins (~conal@64.71.133.70) |
| 22:43:27 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 22:43:31 | hackage | polysemy-extra 0.1.5.0 - Extra Input and Output functions for polysemy.. https://hackage.haskell.org/package/polysemy-extra-0.1.5.0 (locallycompact) |
| 22:45:12 | × | feliocrat quits (~feliocrat@95.70.185.239) (Remote host closed the connection) |
| 22:45:31 | hackage | polysemy-extra 0.1.6.0 - Extra Input and Output functions for polysemy.. https://hackage.haskell.org/package/polysemy-extra-0.1.6.0 (locallycompact) |
| 22:47:30 | hackage | polysemy-extra 0.1.6.1 - Extra Input and Output functions for polysemy.. https://hackage.haskell.org/package/polysemy-extra-0.1.6.1 (locallycompact) |
| 22:53:06 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 22:58:05 | × | mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 258 seconds) |
| 23:03:49 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 23:03:58 | <edwardk> | PatrcikGrey: hrmm |
| 23:04:11 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 256 seconds) |
| 23:04:22 | <edwardk> | PatrcikGrey: https://www.youtube.com/watch?v=Zlt6EJVdUN8 was written in haskell |
| 23:04:31 | <edwardk> | not people |
| 23:04:40 | <edwardk> | but 3d shape recognition, motion planning, etc. |
| 23:06:30 | <edwardk> | there's also http://lumi.guide/ the folks there are doing stuff for figuring out numbers of bikes in parking garages with computer vision / haskell |
| 23:07:46 | <edwardk> | PatrcikGrey: neither is exactly what you want, which sounds like you're looking for something like, what, opencv bindings? |
| 23:09:30 | hackage | polysemy-vinyl 0.1.3.1 - Functions for mapping vinyl records in polysemy. https://hackage.haskell.org/package/polysemy-vinyl-0.1.3.1 (locallycompact) |
| 23:11:10 | × | kuribas quits (~user@ptr-25vy0iaeei1zsuhust9.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 23:12:12 | × | dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Read error: Connection reset by peer) |
| 23:13:31 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 23:20:15 | → | stackdimes joins (~stackdime@185.192.70.122) |
| 23:21:19 | <moet> | PatrcikGrey: i've used the opencv bindings, of which there are several. You'll have to do some work to wrap them for a "functional" style if that's what you're after. |
| 23:22:31 | hackage | polysemy-vinyl 0.1.4.0 - Functions for mapping vinyl records in polysemy. https://hackage.haskell.org/package/polysemy-vinyl-0.1.4.0 (locallycompact) |
| 23:28:25 | → | luke joins (~luke@bitnomial/staff/luke) |
| 23:29:27 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 23:29:53 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 23:30:15 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 260 seconds) |
| 23:31:17 | → | o1lo01ol_ joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 23:32:33 | × | pfurla quits (~pfurla@238.15.195.173.client.static.strong-in52.as13926.net) (Ping timeout: 260 seconds) |
| 23:33:18 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 23:34:13 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 246 seconds) |
| 23:34:28 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 23:34:31 | × | jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 23:34:47 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 23:36:05 | × | luke quits (~luke@bitnomial/staff/luke) (Quit: sleep) |
| 23:40:23 | × | LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 23:42:14 | × | stackdimes quits (~stackdime@185.192.70.122) (Quit: WeeChat 2.9) |
| 23:42:25 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 23:43:32 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 23:43:52 | <xe4> | is there an equivalent of headMay for Vector? |
| 23:44:21 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 23:44:28 | <glguy> | xe4: v !? 0 |
| 23:44:34 | <edwardk> | !?0 |
| 23:44:40 | <edwardk> | beat me to it |
| 23:45:01 | <glguy> | and instead of pulling in a dependency for headMay there's listToMaybe in base |
| 23:45:04 | <edwardk> | clearly the solution is first to install lens... |
| 23:45:16 | <glguy> | Like it wasn't already installed o.O ? |
| 23:45:23 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
| 23:45:26 | <edwardk> | it is gauche to assume =) |
| 23:45:53 | <xe4> | hey! that worked, thanks glguy and edwardk for paying attention to the channel :) |
| 23:46:30 | → | juri_ joins (~juri@178.63.35.222) |
| 23:47:32 | <xe4> | maybe I should use List until it proves to be a problem |
| 23:48:37 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 260 seconds) |
| 23:48:54 | × | DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Ping timeout: 272 seconds) |
| 23:49:38 | <sm[m]> | how would you convert a UTCTime (or a POSIXTime, AKA NominalDiffTime, AKA seconds since epoch) to a ClockTime ? |
| 23:49:48 | <sm[m]> | in a total way ? |
| 23:51:20 | <sm[m]> | to construct a ClockTime, you need an Integer. POSIXTime/NominalDiffTime doesn't have an Integral instance, so toInteger is out |
| 23:52:01 | <sm[m]> | I solved this before by read . show, which is crap |
| 23:53:43 | <sm[m]> | aha.. I can round it |
| 23:57:31 | <sm[m]> | though, that'll be accurate only to a second. properFraction could work better |
| 23:58:09 | × | o1lo01ol_ quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 23:58:27 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
All times are in UTC on 2020-11-13.