2022/08/18

2022-08-18 00:00:09 +0200riverside(~riverside@213.205.241.143) (Remote host closed the connection)
2022-08-18 00:00:27 +0200riverside(~riverside@213.205.241.143)
2022-08-18 00:01:50 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 00:02:05 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net)
2022-08-18 00:03:29 +0200k8yun_(~k8yun@user/k8yun) (Quit: Leaving)
2022-08-18 00:04:39 +0200mmhat(~mmh@p200300f1c722777cee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-08-18 00:05:07 +0200ddellacosta(~ddellacos@89.45.224.216) (Ping timeout: 252 seconds)
2022-08-18 00:09:26 +0200zeenk(~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!)
2022-08-18 00:09:33 +0200king_gs(~Thunderbi@187.201.216.244) (Read error: Connection reset by peer)
2022-08-18 00:10:10 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec)
2022-08-18 00:18:49 +0200acidjnk_new(~acidjnk@p200300d6e7137a5774e66b102b0a005a.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-08-18 00:25:46 +0200mmhat(~mmh@p5081a453.dip0.t-ipconnect.de)
2022-08-18 00:27:08 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-18 00:27:41 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-08-18 00:30:08 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 00:30:20 +0200mmhat(~mmh@p5081a453.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-08-18 00:31:43 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 00:35:15 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec) (Ping timeout: 248 seconds)
2022-08-18 00:35:16 +0200stefan-_(~cri@42dots.de) (Ping timeout: 268 seconds)
2022-08-18 00:38:38 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 00:41:21 +0200jmd_(~jmdaemon@user/jmdaemon)
2022-08-18 00:42:03 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds)
2022-08-18 00:44:19 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
2022-08-18 00:44:19 +0200zachel(~zachel@user/zachel) (Ping timeout: 248 seconds)
2022-08-18 00:44:24 +0200stefan-_(~cri@42dots.de)
2022-08-18 00:46:37 +0200Tuplanolla(~Tuplanoll@91-159-69-12.elisa-laajakaista.fi) (Quit: Leaving.)
2022-08-18 00:48:01 +0200mmhat(~mmh@p200300f1c7248dcdee086bfffe095315.dip0.t-ipconnect.de)
2022-08-18 00:48:10 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 00:50:11 +0200jao(jao@gateway/vpn/protonvpn/jao) (Ping timeout: 248 seconds)
2022-08-18 00:52:01 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-18 00:52:14 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79)
2022-08-18 00:52:41 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 00:54:49 +0200 <Zmijson> I am trying to do some exercises - just beginning with haskell and I am beyond confused at what one wants to do in terms of what it says and types it specifies
2022-08-18 00:56:36 +0200 <Zmijson> any kind patient soul here?
2022-08-18 00:56:39 +0200jao(jao@gateway/vpn/protonvpn/jao)
2022-08-18 00:58:20 +0200 <hpc> what's the exercise?
2022-08-18 00:59:33 +0200 <Zmijson> create a match record between 2 opponents and it gives two styles of doing it
2022-08-18 01:00:01 +0200 <Zmijson> but the type is already defined and its not a 'record' as in the data structure
2022-08-18 01:00:34 +0200 <Zmijson> its type LeagueM t = (t, t) -> Maybe t but I fail to see how a tuple giving an outcome is a 'record'
2022-08-18 01:03:06 +0200 <geekosaur> are you sure they mean "record" as in a record type, vs. a record such that you might print about the outcome of a match?
2022-08-18 01:03:24 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 01:03:44 +0200 <Zmijson> there are a few sub tasks and one is "Give the function that inserts the result of a match into the score
2022-08-18 01:03:45 +0200 <Zmijson> record. If the match result is already present, it is updated."
2022-08-18 01:04:42 +0200 <Zmijson> unless they mean creating variables at runtime of type LeagueM and changing them if one already exists?
2022-08-18 01:04:43 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-08-18 01:04:57 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 01:05:23 +0200 <riverside> but it creates ripples back in time, constantly
2022-08-18 01:05:59 +0200Putonlalla(~sapekiis@it-cyan.it.jyu.fi) (Ping timeout: 252 seconds)
2022-08-18 01:06:25 +0200jao(jao@gateway/vpn/protonvpn/jao) (Ping timeout: 256 seconds)
2022-08-18 01:06:33 +0200Putonlalla(~sapekiis@it-cyan.it.jyu.fi)
2022-08-18 01:06:59 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-08-18 01:07:19 +0200Sgeo(~Sgeo@user/sgeo)
2022-08-18 01:07:54 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net)
2022-08-18 01:08:11 +0200jao(~jao@45.134.213.219)
2022-08-18 01:08:22 +0200 <riverside> like if i say my i's dont work properly
2022-08-18 01:09:56 +0200 <hpc> get glasses then :D
2022-08-18 01:09:58 +0200nate4(~nate@98.45.169.16)
2022-08-18 01:10:25 +0200 <riverside> gay lenses
2022-08-18 01:10:46 +0200tomgus1(~tomgus1@bcdc7f39.skybroadband.com) (Ping timeout: 244 seconds)
2022-08-18 01:10:57 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-18 01:11:00 +0200 <riverside> join the navy
2022-08-18 01:11:06 +0200 <hpc> ?
2022-08-18 01:11:44 +0200 <riverside> theres quite a good joke about the space navy
2022-08-18 01:12:35 +0200jao(~jao@45.134.213.219) (Ping timeout: 252 seconds)
2022-08-18 01:12:35 +0200 <riverside> hidly ho, neighberinos
2022-08-18 01:13:56 +0200 <riverside> my eyes! the goggles do nothing
2022-08-18 01:14:11 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-08-18 01:14:54 +0200nate4(~nate@98.45.169.16) (Ping timeout: 256 seconds)
2022-08-18 01:15:45 +0200 <Zmijson> anyone confident and patient I could dm?
2022-08-18 01:16:06 +0200 <riverside> why, its not like i never get you to do anything for me
2022-08-18 01:16:22 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 01:17:45 +0200 <hpc> @where ops
2022-08-18 01:17:45 +0200 <lambdabot> byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw mniip monochrom quicksilver shachaf shapr ski
2022-08-18 01:18:04 +0200riverside(~riverside@213.205.241.143) (Remote host closed the connection)
2022-08-18 01:18:04 +0200ChanServ+o dibblego
2022-08-18 01:18:55 +0200luffy(~chenqisu1@183.217.201.23)
2022-08-18 01:21:32 +0200 <Zmijson> ?
2022-08-18 01:27:03 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 01:27:15 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-18 01:30:46 +0200tryme13f(~Thunderbi@2001:8a0:7d92:3b01:34e5:5642:a1e2:df48)
2022-08-18 01:31:44 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 01:34:19 +0200 <geekosaur> Zmijson, you say it gives two styles. can you create a pastebin showing those styles and any other related types?
2022-08-18 01:34:22 +0200 <geekosaur> @where paste
2022-08-18 01:34:22 +0200 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2022-08-18 01:37:44 +0200 <Zmijson> https://paste.tomsmeding.com/OTzbBzJG
2022-08-18 01:37:54 +0200 <Zmijson> her it is
2022-08-18 01:37:59 +0200 <Zmijson> here* oops
2022-08-18 01:38:12 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-08-18 01:39:16 +0200 <Zmijson> sorry, stuff missing
2022-08-18 01:39:59 +0200 <Zmijson> https://paste.tomsmeding.com/uVQcgeYm
2022-08-18 01:40:00 +0200 <Zmijson> fixed now
2022-08-18 01:40:03 +0200 <geekosaur> right, by "recorded" I conclude they do not mean a Haskell record but a "people" record, e.g. a list you could print out
2022-08-18 01:40:15 +0200mmhat(~mmh@p200300f1c7248dcdee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-08-18 01:40:48 +0200ChanServ-o dibblego
2022-08-18 01:41:42 +0200ChanServ+o geekosaur
2022-08-18 01:42:23 +0200 <Zmijson> with or without creating a literal list to hold them in?
2022-08-18 01:42:32 +0200geekosaur+b riverside!~riverside@213.205.241.143
2022-08-18 01:42:49 +0200 <Zmijson> can you check whether a record i.e. a variable exists/has been created already without storing it in a list?
2022-08-18 01:43:39 +0200 <zzz> thats a weird question
2022-08-18 01:43:44 +0200 <geekosaur> you need a list or similar to hold the results. part 1 shows what you decided on to hold each style of result
2022-08-18 01:44:51 +0200 <geekosaur> I don't know the full context of this; did this exercise come up in the context of studying lists or sets or maps, etc.?
2022-08-18 01:44:52 +0200 <hpc> instead of having to check if it exists, perhaps instead structure the rest of your code so you aren't potentially adding duplicates in the first place
2022-08-18 01:45:10 +0200geekosaur-o geekosaur
2022-08-18 01:45:16 +0200 <hpc> like if you have a league of only two teams, write your code so it's not going to somehow do two matches instead of one
2022-08-18 01:45:46 +0200 <hpc> or perhaps break the problem down further
2022-08-18 01:46:09 +0200 <hpc> instead of worrying about computing all the match results, instead start by transforming a list of teams into a list of all the matches that should happen
2022-08-18 01:46:24 +0200 <Zmijson> it came up studying types/declaring types
2022-08-18 01:46:27 +0200 <hpc> if you have that, hopefully all the rest of it is just "do something to every element of that list"
2022-08-18 01:46:46 +0200 <Zmijson> I have no list of teams that is the thing
2022-08-18 01:47:01 +0200 <Zmijson> so it would be something like you run it and use the function to create the 'record
2022-08-18 01:47:39 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-18 01:48:10 +0200 <Zmijson> I imagine the overwriting is there so if you were to really use it you can fix an entry if you make a mistake
2022-08-18 01:48:31 +0200 <geekosaur> look at the second style of recording again
2022-08-18 01:48:48 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-18 01:48:52 +0200Guest67(~Guest67@128-193-154-141.ptpg.oregonstate.edu)
2022-08-18 01:48:54 +0200mvk(~mvk@2607:fea8:5ce3:8500::a1ec)
2022-08-18 01:49:13 +0200 <Zmijson> I am but I don't understand it haha
2022-08-18 01:49:14 +0200 <geekosaur> it's keyed by a winning team and contains a list of the dsefeated teams, so you have to update that subsidiary list
2022-08-18 01:49:45 +0200 <Zmijson> but it boils down to just that list
2022-08-18 01:49:50 +0200 <geekosaur> "keyed by" should give you some ideas about appropriate data types
2022-08-18 01:49:54 +0200 <Zmijson> how do you know what team that list belongs to?
2022-08-18 01:50:19 +0200 <geekosaur> it's part of LeagueL
2022-08-18 01:50:53 +0200 <geekosaur> type LeagueL t = t -> [t]
2022-08-18 01:51:13 +0200 <geekosaur> how would you store lists of defeated teams that would make LeagueL easy to implement?
2022-08-18 01:51:18 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 01:51:21 +0200 <geekosaur> hint: "keyed by"
2022-08-18 01:51:37 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 01:51:41 +0200gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2022-08-18 01:51:57 +0200 <Zmijson> a map?
2022-08-18 01:52:00 +0200 <geekosaur> yep
2022-08-18 01:52:15 +0200 <geekosaur> and LeagueL becomes a map lookup
2022-08-18 01:52:53 +0200 <Zmijson> how ._.
2022-08-18 01:53:00 +0200 <Zmijson> I know I am being uber stupid here
2022-08-18 01:53:19 +0200 <Zmijson> but I just don't see how both leagues are datatypes that can hold values/records
2022-08-18 01:54:29 +0200 <geekosaur> but they are. in the first case (LeagueM) about the best you can do is a list of tuples. in the second case (LeagueL) it's a Map of lists
2022-08-18 01:56:05 +0200 <geekosaur> hm, actually you could model LeagueM as a map as well.
2022-08-18 01:56:21 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-08-18 01:56:21 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-08-18 01:56:21 +0200wroathe(~wroathe@user/wroathe)
2022-08-18 01:56:35 +0200 <geekosaur> and LeagueL and LeagueM are the types of lookups in their respective Maps
2022-08-18 01:56:51 +0200ystael(~ystael@user/ystael) (Ping timeout: 248 seconds)
2022-08-18 01:57:00 +0200 <geekosaur> so next step is to determine the types of those maps. luckily, that's pretty much given to you by their definitions
2022-08-18 01:57:29 +0200 <geekosaur> for example, for LeagueL to make sense the Map behind it is Map t [t]
2022-08-18 01:57:47 +0200gentauro(~gentauro@user/gentauro)
2022-08-18 01:59:43 +0200 <geekosaur> and LeagueL itself is almost the type of `Map.lookup myResultLMap`
2022-08-18 02:00:01 +0200 <geekosaur> modulo producing an empty list if the team isn't found in the Map
2022-08-18 02:00:41 +0200 <geekosaur> initL builds the empty Map of that type
2022-08-18 02:01:26 +0200 <geekosaur> hm, actually I'm not sure you';re allowed to use a Map here
2022-08-18 02:01:33 +0200 <Zmijson> I thought initial score would be initL t = []
2022-08-18 02:01:45 +0200 <geekosaur> the problem set says you have Eq, but says nothing about Ord which you need for a Map
2022-08-18 02:01:50 +0200 <geekosaur> so you'd have to use a list
2022-08-18 02:02:33 +0200 <qrpnxz> i'm surprised Ord isn't a superclass of Enum
2022-08-18 02:03:36 +0200haskl(~haskl@user/haskl) (Ping timeout: 268 seconds)
2022-08-18 02:04:20 +0200 <geekosaur> Zmijson, it's a bit more complex than that since `initL :: LeagueL t`, but `type LeagueL t = t -> [t]`, that is, the result of `initL` is a function. (Are you sure you copied that down correctly?)
2022-08-18 02:04:40 +0200 <Zmijson> yes
2022-08-18 02:04:58 +0200tryme13f(~Thunderbi@2001:8a0:7d92:3b01:34e5:5642:a1e2:df48) (Quit: tryme13f)
2022-08-18 02:05:32 +0200 <Zmijson> so initL t = [(t, [])]?
2022-08-18 02:05:56 +0200 <geekosaur> that's not a function
2022-08-18 02:06:16 +0200 <geekosaur> this still doesn't make sense, I don't think you can have an initial value of a function in this context
2022-08-18 02:06:59 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 248 seconds)
2022-08-18 02:07:23 +0200 <geekosaur> it *ought* to be a list. but the type you gave for LeagueL is a function
2022-08-18 02:07:39 +0200vysn(~vysn@user/vysn)
2022-08-18 02:07:57 +0200beteigeuze(~Thunderbi@2001:8a0:7d92:3b01:34e5:5642:a1e2:df48)
2022-08-18 02:08:01 +0200 <geekosaur> unless they have you writing lambda calculus in Haskell, this doesn't actually make a lot of sense
2022-08-18 02:08:50 +0200 <geekosaur> it's even worse for part two, where it's clearly supposed to be a function form a list to a list, not a function from a function to a function
2022-08-18 02:09:07 +0200 <geekosaur> doublecheck your `LeagueL` and `LeagueM`
2022-08-18 02:09:15 +0200 <geekosaur> *from a
2022-08-18 02:09:19 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 02:10:01 +0200 <Zmijson> I even quadruple checked it
2022-08-18 02:10:13 +0200 <Zmijson> I just copied them as they were given
2022-08-18 02:10:50 +0200 <geekosaur> uh, someone else sanity check this please?
2022-08-18 02:11:03 +0200 <geekosaur> am I misreading this completely?
2022-08-18 02:14:48 +0200 <Guest67> which part are you working on?
2022-08-18 02:16:22 +0200 <Zmijson> a start lol
2022-08-18 02:16:42 +0200 <Zmijson> https://paste.tomsmeding.com/uVQcgeYm for ease
2022-08-18 02:19:05 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2022-08-18 02:21:33 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 244 seconds)
2022-08-18 02:22:23 +0200[_][itchyjunk]
2022-08-18 02:24:24 +0200 <Guest67> not sure where you're at with this, but I think you're right that initL t = [] for a start. the type of LeagueL is a function, but type of LeagueL t is a list I think
2022-08-18 02:24:52 +0200 <Zmijson> what would you say for LeagueM?
2022-08-18 02:25:04 +0200 <Guest67> initM or LeagueM?
2022-08-18 02:26:01 +0200 <Guest67> LeagueM is a function, and LeagueM t is a Maybe t
2022-08-18 02:27:31 +0200 <geekosaur[m]> Where did this problem set come from?
2022-08-18 02:28:11 +0200 <Zmijson> I meant initM
2022-08-18 02:29:08 +0200 <Guest67> since initM is of type LeagueM t, you can refer above to see that initM is of type Maybe t
2022-08-18 02:29:41 +0200 <Guest67> which I guess I'd say should be Nothing right?
2022-08-18 02:31:31 +0200chomwitt(~chomwitt@2a02:587:dc16:4100:1289:3f0b:2a03:948d) (Ping timeout: 248 seconds)
2022-08-18 02:31:40 +0200tomgus1(~tomgus1@2a02:c7e:4229:d900:dea6:32ff:fe3d:d1a3)
2022-08-18 02:31:51 +0200 <Guest67> if I'm reading this correctly you're dealing with this kind of abstract "scores record" but you're not actually implementing the scores record yet, just these small parts first
2022-08-18 02:33:29 +0200 <Guest67> it says "Give the value representing the initial state of the scores record" but it almost seems like it means "Give the value representing the initial state of a team on the scores record". Could totally be misunderstanding though
2022-08-18 02:33:34 +0200 <Zmijson> yeah that's what I thought
2022-08-18 02:33:49 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 02:33:50 +0200 <Zmijson> hence I thought it'd be just = Nothing and = []
2022-08-18 02:34:24 +0200 <Guest67> I think start with that for now and come back if down the line it doesn't make sense
2022-08-18 02:34:34 +0200 <Guest67> *come back to it
2022-08-18 02:35:21 +0200 <Zmijson> but that is the thing
2022-08-18 02:35:30 +0200 <Zmijson> it stopped making sense as soon as I read pt 2
2022-08-18 02:35:52 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 02:37:56 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 02:38:27 +0200mvk(~mvk@2607:fea8:5ce3:8500::a1ec) (Ping timeout: 248 seconds)
2022-08-18 02:38:50 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 02:39:17 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 02:39:27 +0200 <arahael> What does 'Control.Monad.Fix.fix' do? I'm trying to find an explaination of it.
2022-08-18 02:40:53 +0200 <arahael> I mean, it's *obviously* not the usual definition of finding a fixed point of a function, least defined or not.
2022-08-18 02:41:07 +0200 <arahael> (Otherwise, it would mean that 'fix (1/)' would give the answer 1)
2022-08-18 02:43:21 +0200x77686d(~x77686d@c-76-18-124-133.hsd1.al.comcast.net)
2022-08-18 02:47:37 +0200 <jackdk> I don't have a solid handle on it, but I read it as letting you build a monadic action that lets you refer to the result being built. With `mdo`, this lets you refer to bound variables that are "after" the current line in the do-expression; I have seen a blog post about using it to implement forward jumps to labels in an assembly DSL (I cannot find it, sorry)
2022-08-18 02:49:26 +0200 <arahael> Unfortunate you can't find that blog post. :(
2022-08-18 02:49:30 +0200 <jackdk> reflex uses it a lot, where you have circular references between your values (usually `Dynamic`s), but because of laziness and the programmer care, you avoid infinite loops at runtime
2022-08-18 02:49:57 +0200 <arahael> I'd love to see an article that explains that.
2022-08-18 02:50:52 +0200 <dsal> I've used fix (and mfix) once or twice.
2022-08-18 02:51:39 +0200 <arahael> I'll never use it unless I know this. :/
2022-08-18 02:51:50 +0200 <jackdk> It is a super niche thing
2022-08-18 02:52:32 +0200 <dsal> Coworker wrote this one: https://rebeccaskinner.net/posts/2021-06-09-getting-to-the-fixed-point.html
2022-08-18 02:52:39 +0200 <dsal> But that's not blog post I was just thinking about.
2022-08-18 02:52:51 +0200 <jackdk> https://git.sr.ht/~jack/reflex-libtelnet/tree/ffea5fa8b372ee57d85220a5c8bc5785b9bcaf92/item/reflex… for an example: `eRemoves` is used in the construction of `dClients`, which is used in the construction of `dClientCloses`, which is used in the construction of `eRemoves`
2022-08-18 02:53:12 +0200 <arahael> dsal: I'll check that one later today - thanks. :)
2022-08-18 02:53:28 +0200 <dsal> Oh, I think I was thinking about this one which isn't about `fix` but recursion schemes: https://blog.sumtypeofway.com/posts/introduction-to-recursion-schemes.html
2022-08-18 02:53:30 +0200 <dsal> Kind of related.
2022-08-18 02:55:14 +0200 <Guest67> Zmijson i take it back, based on the typing i think they were right that initM and initL are supposed to be functions, not just a list or Maybe t, but now I'm not sure how this is supposed to work
2022-08-18 02:56:09 +0200 <jackdk> https://elvishjerricco.github.io/2017/08/22/monadfix-is-time-travel.html
2022-08-18 02:56:28 +0200 <geekosaur> https://downloads.haskell.org/ghc/9.2.4/docs/html/users_guide/exts/recursive_do.html has some things to say about it, I think
2022-08-18 02:56:55 +0200 <elvishjerricco1> jackdk: Glad people are still referencing that one :P
2022-08-18 02:58:08 +0200 <jackdk> ohai elvishjerricco1 , how goes?
2022-08-18 02:58:44 +0200 <elvishjerricco1> Goes well. Been quite a while since I've written on that blog... I should really post something
2022-08-18 03:00:46 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 03:03:12 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 03:03:22 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 03:04:15 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-18 03:05:34 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-18 03:10:25 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-08-18 03:13:02 +0200snak(~snak@221x252x204x99.ap221.ftth.ucom.ne.jp)
2022-08-18 03:15:03 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 256 seconds)
2022-08-18 03:15:50 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79) (Ping timeout: 252 seconds)
2022-08-18 03:15:54 +0200Cale(~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Read error: Connection reset by peer)
2022-08-18 03:16:33 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-08-18 03:16:55 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-08-18 03:17:18 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net) (Ping timeout: 256 seconds)
2022-08-18 03:17:41 +0200kimjetwav(~user@2607:fea8:235e:b600:e431:ef6a:50a6:3d1a)
2022-08-18 03:17:47 +0200 <arahael> Thankks, I'll read those too. :)
2022-08-18 03:18:04 +0200berberman(~berberman@user/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-18 03:18:24 +0200berberman(~berberman@user/berberman)
2022-08-18 03:19:34 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-18 03:20:04 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net)
2022-08-18 03:22:53 +0200x77686d(~x77686d@c-76-18-124-133.hsd1.al.comcast.net) (Quit: Connection closed)
2022-08-18 03:25:40 +0200king_gs(~Thunderbi@187.201.216.244)
2022-08-18 03:28:29 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-08-18 03:30:59 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2022-08-18 03:33:45 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
2022-08-18 03:34:19 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 03:34:51 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
2022-08-18 03:34:57 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79)
2022-08-18 03:39:15 +0200vysn(~vysn@user/vysn) (Ping timeout: 248 seconds)
2022-08-18 03:42:17 +0200 <Guest67> Zmijson i *think* i have a better idea of how your stuff is supposed to work
2022-08-18 03:43:41 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 03:44:10 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 03:45:05 +0200beteigeuze(~Thunderbi@2001:8a0:7d92:3b01:34e5:5642:a1e2:df48) (Ping timeout: 256 seconds)
2022-08-18 03:46:17 +0200haskl(~haskl@user/haskl)
2022-08-18 03:47:04 +0200 <Zmijson> ooh do tell
2022-08-18 03:47:08 +0200 <Zmijson> I am at a loss
2022-08-18 03:49:37 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-08-18 03:49:52 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-08-18 03:50:12 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-08-18 03:50:27 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-08-18 03:50:59 +0200 <Guest67> okay, so starting with p1, initM is of type (t,t) -> Maybe t. This means the way you're gonna return different things based on what initM's input is. Say we have two teams, x and y. a tuple (x,y) means x played against y and won, so initM (x,y) = Maybe x, and initM (x,x) = Nothing
2022-08-18 03:53:13 +0200 <Zmijson> wouldn't the initial value always be Nothing though?
2022-08-18 03:54:33 +0200 <dsal> I've not been paying attention here, but why is there a tuple?
2022-08-18 03:55:11 +0200 <Guest67> okay right yeah, I agree. we can just say that the initial value for any two teams is Nothing
2022-08-18 03:55:13 +0200 <Guest67> https://paste.tomsmeding.com/uVQcgeYm
2022-08-18 03:55:48 +0200 <Guest67> initM :: (t,t) -> Maybe t
2022-08-18 03:56:02 +0200 <Guest67> so initM x y = Nothing
2022-08-18 03:56:09 +0200 <Guest67> err
2022-08-18 03:56:14 +0200 <Guest67> initM (x,y) = Nothing
2022-08-18 03:56:15 +0200 <Guest67> sorry
2022-08-18 03:59:54 +0200 <Axman6> How do I tell cabal to put the compiled executables of a package in a specific location? setting --prefix to ./dist causes cabal install to still copy the executables to ~/.cabal/bin
2022-08-18 04:00:05 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-08-18 04:00:45 +0200 <Zmijson> yeah, that's more or less what I thought
2022-08-18 04:00:55 +0200 <Zmijson> I'd also just do = [] for LeagueL
2022-08-18 04:01:14 +0200 <Axman6> (worth noting I'm using a custom Setup.hs
2022-08-18 04:01:43 +0200 <Guest67> Zmijson yep that sounds good to me
2022-08-18 04:01:46 +0200nate4(~nate@98.45.169.16)
2022-08-18 04:02:48 +0200 <Zmijson> still no idea on pt 2
2022-08-18 04:03:10 +0200 <Zmijson> like do i make empty lists and store stuff there or whut
2022-08-18 04:04:14 +0200 <Guest67> so yeah p2 is interesting because initially it seems like you'd want to make a list or something and store and retrieve values, but I think the point of this part is to show that you can make a data structure just by composing functions and values
2022-08-18 04:04:23 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
2022-08-18 04:06:00 +0200 <Guest67> so for instance you could say: WinnerM (x,y) initM (x,y) and that would return Maybe x I believe
2022-08-18 04:06:58 +0200 <Axman6> Ah, looks like I need cabal install --install-method=copy --installdir=$DIST (https://cabal.readthedocs.io/en/stable/cabal-commands.html#cabal-install)
2022-08-18 04:07:24 +0200nate4(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-08-18 04:08:05 +0200 <Zmijson> Wouldn't you have to specify initM (x,y) to return Just x?
2022-08-18 04:08:24 +0200 <Guest67> oh yes my bad, Just x not Maybe x lol
2022-08-18 04:09:54 +0200 <Guest67> but the idea is that you can not put in the third parameter of WinnerM and pass that in as the second parameter to other WinnerM calls to build out a data structure
2022-08-18 04:11:17 +0200 <Zmijson> so how do you then check if a result already exists and update it
2022-08-18 04:13:18 +0200 <Guest67> first, note at the top of your instructions, you're told each team only goes against each other once. But checking to see if the current score is nothing and updating it is what you have to build out in your function
2022-08-18 04:14:37 +0200 <Zmijson> on an unrelated note - cause ive tried something else in the meantime - is there a way to clear a lisT?
2022-08-18 04:14:42 +0200nate4(~nate@98.45.169.16)
2022-08-18 04:14:49 +0200 <Zmijson> aka remove everything from it
2022-08-18 04:15:52 +0200 <Guest67> well if you have a function that takes in a list, i would say just return []
2022-08-18 04:16:18 +0200 <Zmijson> building a calculator of sorts
2022-08-18 04:16:46 +0200 <Zmijson> so i have a list of ints to keep its state and an input list to perform operations/change the state
2022-08-18 04:17:50 +0200 <Zmijson> and want to be able to clear the state i.e. wipe everything
2022-08-18 04:19:09 +0200 <Guest67> when you say you're keeping its state, what does that look like?
2022-08-18 04:19:13 +0200nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-08-18 04:21:51 +0200 <dsal> Zmijson: you can't change a list.
2022-08-18 04:23:30 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 04:23:37 +0200td_(~td@94.134.91.250) (Ping timeout: 252 seconds)
2022-08-18 04:23:49 +0200 <Zmijson> i opted for a list of ints
2022-08-18 04:25:24 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-08-18 04:25:31 +0200td_(~td@muedsl-82-207-238-008.citykom.de)
2022-08-18 04:27:52 +0200 <Zmijson> hmmmm
2022-08-18 04:27:53 +0200 <Zmijson> actually
2022-08-18 04:28:26 +0200 <Zmijson> can you change a record entry?
2022-08-18 04:28:35 +0200 <Zmijson> or is that also pemanent
2022-08-18 04:28:40 +0200 <Zmijson> permanent
2022-08-18 04:28:46 +0200 <dsal> You can't really change anything (you can, but let's not go there now).
2022-08-18 04:28:52 +0200 <dsal> You mostly just make new things that represent the new state you want.
2022-08-18 04:29:41 +0200 <dsal> So you can take a record and derive a new record from it such that the new one has a different value for a particular field, e.g. `r' = r{someField=2}`, but you haven't modified `r` there, you just have `r` and `r'`
2022-08-18 04:32:54 +0200 <dsal> There are a variety of ways to do the thing. It depends on what you're comfortable with.
2022-08-18 04:33:12 +0200 <dsal> The easiest way to do something like that is to have a function that takes your list and an operation and returns a new list.
2022-08-18 04:33:28 +0200 <dsal> (Assuming something like RPN)
2022-08-18 04:34:26 +0200 <dsal> `add :: [Int] -> [Int]` -- though the only failure mode that makes sense there is to drop the stack and return `[]`. You could also do `Maybe [Int]` as the return, but that's a different kind of problem.
2022-08-18 04:34:26 +0200king_gs(~Thunderbi@187.201.216.244) (Read error: Connection reset by peer)
2022-08-18 04:34:48 +0200 <dsal> add (x:y:xs) = (x+y):xs
2022-08-18 04:35:03 +0200 <dsal> add _ = []
2022-08-18 04:35:46 +0200zxx7529(~Thunderbi@user/zxx7529) (Quit: zxx7529)
2022-08-18 04:35:46 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds)
2022-08-18 04:35:47 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec)
2022-08-18 04:36:22 +0200 <dsal> In this model, `clear = const []`
2022-08-18 04:36:33 +0200 <dsal> (or `clear _ = []` if you prefer)
2022-08-18 04:37:48 +0200 <Guest67> yeah, I think a good perspective to have is you're not really gonna make some sort of state and update it, it's more so that you're gonna take some sort of input in, and process it by composing lots of functions together and sending each one's output to the next
2022-08-18 04:39:17 +0200 <dsal> > let add (x:y:xs) = (x+y):xs; add _ = [] in (add [1, 2, 4], add [1], add (100:add [5, 11]))
2022-08-18 04:39:19 +0200 <lambdabot> ([3,4],[],[116])
2022-08-18 04:40:30 +0200 <dsal> It can feel a bit more mutatey if you're using StateT, but if you're just coming in, that's going to be kind of weird.
2022-08-18 04:40:40 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 04:40:46 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 04:42:03 +0200[_](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-08-18 04:42:30 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-08-18 04:42:47 +0200 <L29Ah> i want a `data Foo a b = Foo !a`
2022-08-18 04:43:00 +0200 <L29Ah> should i write one myself, or there's some idiomatic leftpad to import?
2022-08-18 04:43:11 +0200 <monochrom> Write your own.
2022-08-18 04:43:14 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 04:43:33 +0200 <L29Ah> what about Void, should i write my own or import the leftpad?
2022-08-18 04:43:44 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 04:43:52 +0200 <monochrom> I think Void is already in base.
2022-08-18 04:44:02 +0200 <monochrom> wtf is leftpad?
2022-08-18 04:44:22 +0200 <dolio> Isn't Const in base, too?
2022-08-18 04:44:33 +0200 <dsal> Yeah, that's just Const, but not as a newtype.
2022-08-18 04:44:39 +0200 <monochrom> But Const lacks the !
2022-08-18 04:44:42 +0200 <dsal> monochrom: bad npm joke
2022-08-18 04:44:45 +0200 <dsal> Isn't newtype the ! ?
2022-08-18 04:44:53 +0200 <L29Ah> https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Functor-Const.html ok thanks
2022-08-18 04:44:56 +0200 <jackdk> monochrom: L29Ah is making a joke about how JS programmers import all these tiny libraries that define single functions, and one day someone deleted a package called `left-pad` and broke the internet.
2022-08-18 04:44:58 +0200 <L29Ah> dsal: i believe it is
2022-08-18 04:46:24 +0200 <monochrom> OK newtype is close enough to ! . I forgot that Const is a newtype.
2022-08-18 04:46:36 +0200nate4(~nate@98.45.169.16)
2022-08-18 04:46:54 +0200 <monochrom> I have been teaching a course in which I didn't bother to teach newtype, so my state monad is "data State s a = ..." for example.
2022-08-18 04:47:31 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
2022-08-18 04:49:40 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-08-18 04:49:41 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-08-18 04:50:56 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-08-18 04:51:51 +0200raym(~raym@user/raym) (Remote host closed the connection)
2022-08-18 04:53:41 +0200hughjfchen(~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
2022-08-18 04:54:01 +0200 <dsal> Yeah, for the most part, newtype seems like an unnecessary detail I shouldn't have to think about.
2022-08-18 04:54:03 +0200 <qrpnxz> i wish newtype wasn't a thing personally
2022-08-18 04:54:15 +0200 <qrpnxz> right
2022-08-18 04:55:14 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 04:55:58 +0200 <qrpnxz> though because of how laziness works, it makes sense to be explicit
2022-08-18 04:56:41 +0200raym(~raym@user/raym)
2022-08-18 04:59:34 +0200 <monochrom> What if the language is defined to special-case "if just one data constructor, and just one field, and the field is !ed, then it gets newtype semantics"?
2022-08-18 05:00:05 +0200 <L29Ah> isn't newtype a ! already?
2022-08-18 05:00:18 +0200 <monochrom> No, there is a fringe difference.
2022-08-18 05:00:30 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
2022-08-18 05:00:33 +0200 <monochrom> The Haskell Report has an example.
2022-08-18 05:00:41 +0200 <qrpnxz> monochrom: i like that rule
2022-08-18 05:02:27 +0200tomboy64(~tomboy64@user/tomboy64) (Ping timeout: 248 seconds)
2022-08-18 05:02:47 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-08-18 05:03:53 +0200 <qrpnxz> data NotNew a = NotNew {-# UNPACK #-} !a
2022-08-18 05:04:32 +0200cheater1__(~Username@user/cheater)
2022-08-18 05:04:35 +0200 <jackdk> monochrom: aren't there instances where you want the extra laziness? can't think of any off the top of my head
2022-08-18 05:04:45 +0200cheater(~Username@user/cheater) (Ping timeout: 268 seconds)
2022-08-18 05:04:46 +0200cheater1__cheater
2022-08-18 05:05:03 +0200 <qrpnxz> that's why the rule that it's a newtype if you bang it makes sense
2022-08-18 05:06:03 +0200 <monochrom> (case New bottom of New _ -> ()) ≠ (case Data bottom of Data _ -> ())
2022-08-18 05:06:32 +0200 <monochrom> However, I'm going out on a limb to propose that maybe no one needs that fringe difference.
2022-08-18 05:06:32 +0200raym(~raym@user/raym) (Read error: Connection reset by peer)
2022-08-18 05:07:01 +0200 <qrpnxz> Maybe should be free too. Just have null pointer be Nothing. Every Word8 should point to the same object. These optimization would be amazing, but not done afaik
2022-08-18 05:07:03 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 05:08:46 +0200 <monochrom> However at level 2, that kind of thinking is exactly how we got Perl and PHP. >:)
2022-08-18 05:09:46 +0200 <monochrom> GHC effectively already does "Nothing is null pointer" and "most Char values point to shared objects".
2022-08-18 05:10:59 +0200 <qrpnxz> idk, every time i try to stream Words i get memory explosion. The only new object i could possibly be generating is Word, but i admit to not have technically confirmed this.
2022-08-18 05:11:21 +0200 <monochrom> GHC uses the flyweight pattern for most characters, notably the ASCII ones. You can generate a list of a million English letters, and you won't have a million Char objects, just a million pointers to the same 26 objects.
2022-08-18 05:11:34 +0200raym(~raym@user/raym)
2022-08-18 05:12:13 +0200 <qrpnxz> maybe ghc optimize char better than word
2022-08-18 05:12:15 +0200 <qrpnxz> ironically
2022-08-18 05:12:42 +0200 <monochrom> There is only one object for Nothing. It's shared. Every use site points to the same Nothing. You may as well regard its address as the null address.
2022-08-18 05:12:47 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79) (Quit: Client closed)
2022-08-18 05:13:18 +0200 <qrpnxz> neat
2022-08-18 05:13:19 +0200 <monochrom> It is possible that GHC does something similar to Word8, Int, and small Integer values. I haven't checked. I probably heard.
2022-08-18 05:14:31 +0200 <monochrom> Who says the gang-of-4 design patterns are bad? GHC uses all of them. >:)
2022-08-18 05:14:32 +0200 <Guest67> huh i had no idea, that's pretty cool
2022-08-18 05:15:38 +0200 <qrpnxz> maybe more recent ghc version is better? I noted that it wasn't until kind of recently that Word8 and friend were actually word8 and friend underneath, rather than a whole int for all of them
2022-08-18 05:15:46 +0200 <qrpnxz> for example
2022-08-18 05:16:28 +0200 <qrpnxz> man, it getting late. Good night :)
2022-08-18 05:16:40 +0200tomboy64(~tomboy64@user/tomboy64)
2022-08-18 05:18:50 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-18 05:19:05 +0200_________(~nobody@user/noodly) (Ping timeout: 268 seconds)
2022-08-18 05:19:12 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 05:20:16 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 256 seconds)
2022-08-18 05:20:50 +0200nate4(~nate@98.45.169.16) (Ping timeout: 256 seconds)
2022-08-18 05:21:58 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-08-18 05:23:04 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 05:23:46 +0200hughjfchen(~hughjfche@vmi556545.contaboserver.net)
2022-08-18 05:27:38 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 05:29:07 +0200vglfr(~vglfr@145.224.94.221) (Ping timeout: 248 seconds)
2022-08-18 05:29:53 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec) (Ping timeout: 255 seconds)
2022-08-18 05:30:07 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-08-18 05:31:05 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 05:35:35 +0200Vajb(~Vajb@2001:999:705:3c86:e7ea:442b:1e01:22d8) (Read error: Connection reset by peer)
2022-08-18 05:36:13 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-08-18 05:42:25 +0200fserucas_|eod(~fserucas|@46.50.4.9)
2022-08-18 05:43:25 +0200nilradical(~nilradica@user/naso)
2022-08-18 05:44:39 +0200fserucas|eod(~fserucas|@46.50.4.9) (Ping timeout: 252 seconds)
2022-08-18 05:50:18 +0200vglfr(~vglfr@145.224.94.248)
2022-08-18 05:56:32 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 06:00:15 +0200Everything(~Everythin@37.115.210.35)
2022-08-18 06:01:04 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 06:05:23 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-08-18 06:08:38 +0200Henson(~kvirc@207.136.101.195) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
2022-08-18 06:11:55 +0200gio123(~gio123@94.137.173.75)
2022-08-18 06:17:02 +0200nate4(~nate@98.45.169.16)
2022-08-18 06:18:46 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-08-18 06:19:29 +0200Vajb(~Vajb@2001:999:705:3c86:e7ea:442b:1e01:22d8)
2022-08-18 06:21:37 +0200_________(~nobody@user/noodly)
2022-08-18 06:21:55 +0200nate4(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-08-18 06:22:53 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Quit: _)
2022-08-18 06:23:20 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 06:23:35 +0200Axman6ponders Char having an optimisation where the address for a character encodes its value
2022-08-18 06:23:40 +0200drlkf_(~drlkf@466z.l.time4vps.cloud)
2022-08-18 06:24:38 +0200 <c_wraith> that... isn't compatible with them being lifted
2022-08-18 06:25:08 +0200 <c_wraith> since a Char can be unevaluated in memory
2022-08-18 06:26:16 +0200 <Axman6> sure, you'd need to tag them
2022-08-18 06:26:18 +0200drlkf_(~drlkf@466z.l.time4vps.cloud) (Client Quit)
2022-08-18 06:26:39 +0200drlkf_(~drlkf@466z.l.time4vps.cloud)
2022-08-18 06:26:59 +0200 <c_wraith> but what I mean is you'd need to change the address of the reference
2022-08-18 06:27:01 +0200drlkf_(~drlkf@466z.l.time4vps.cloud) (Client Quit)
2022-08-18 06:27:14 +0200 <c_wraith> Which would interact *really* weirdly with sharing
2022-08-18 06:27:49 +0200 <Axman6> pointerFor :: Char -> Ptr; pointerFor (Char c#) = 0xFFFF + c `unsafeShiftL` 4 + evaluatedChar tag
2022-08-18 06:28:39 +0200 <c_wraith> to maintain call-by-need with sharing, you'd need to both rewrite the thunk and rewrite the pointer
2022-08-18 06:28:51 +0200 <c_wraith> I'm not sure that's going to be a win on average
2022-08-18 06:29:47 +0200 <Axman6> the pointer already does get rewritten when a thunk is evaluated right? ghc already tags pointers to objects if it's known they have been evaluated
2022-08-18 06:30:23 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 06:31:46 +0200 <monochrom> Oh we already have pointer tagging!
2022-08-18 06:32:25 +0200 <monochrom> A GHC pointer encodes both "am I in WHNF?" and "if yes, my value!"
2022-08-18 06:33:05 +0200 <c_wraith> well. it encodes "am I known to be in WHNF?", which is slightly different
2022-08-18 06:33:24 +0200 <monochrom> OK, I mean that.
2022-08-18 06:33:46 +0200 <monochrom> GHC also request 1TB of address space.
2022-08-18 06:34:26 +0200 <c_wraith> Axman6: I think the biggest problem is that it requires an extra "this is a Char" tag. There's only so much tag space available...
2022-08-18 06:34:37 +0200 <monochrom> This means there is easily a huge range of address we can choose so that, for some starting point S, address S+c means the unicode code point is c!
2022-08-18 06:34:37 +0200 <c_wraith> and only so many extra checks that are worth running
2022-08-18 06:34:43 +0200razetime(~quassel@117.193.3.40)
2022-08-18 06:34:43 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 06:35:10 +0200nilradical(~nilradica@user/naso) ()
2022-08-18 06:35:13 +0200 <monochrom> OK it has to be S+c*8 or something, pointer tagging and all that :)
2022-08-18 06:36:10 +0200 <c_wraith> that's still an extra test on every single pointer dereference
2022-08-18 06:36:21 +0200inversed(~inversed@90.209.137.56) (Ping timeout: 252 seconds)
2022-08-18 06:36:21 +0200 <c_wraith> (or a trap on every Char dereference)
2022-08-18 06:37:53 +0200 <monochrom> This would be great for April 1st. :)
2022-08-18 06:38:18 +0200 <c_wraith> uniform runtime representation strikes again! the runtime doesn't know if something is a Char or not!
2022-08-18 06:38:55 +0200gio123(~gio123@94.137.173.75) (Quit: Client closed)
2022-08-18 06:38:56 +0200 <monochrom> "RTS is an equal opportunity evaluator."
2022-08-18 06:41:11 +0200 <Axman6> c_wraith: see my encoding above, take advantage of the bits which are outside of the usable address space
2022-08-18 06:41:31 +0200inversed(~inversed@90.209.137.56)
2022-08-18 06:41:37 +0200 <Axman6> uh, 0xFFFF should have been something like 0xFFFF000000000000
2022-08-18 06:41:50 +0200 <c_wraith> Axman6: you're missing my point. That would require the runtime to check for the pointer being in that address space on every single dereference of every single pointer. not just Chars
2022-08-18 06:43:10 +0200SixDuce(~SixDuce@92.40.184.0.threembb.co.uk)
2022-08-18 06:45:58 +0200 <c_wraith> types have been erased. it doesn't know what type a pointer is to.
2022-08-18 06:46:29 +0200 <Axman6> sure, but the places where that would need to happen are probably exactly the places where we already need to check for tagging
2022-08-18 06:47:02 +0200 <c_wraith> yes. but it's *one more* test.
2022-08-18 06:47:08 +0200 <c_wraith> on every single dereference
2022-08-18 06:48:27 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) ()
2022-08-18 06:48:46 +0200drlkf_(~drlkf@chat.drlkf.net)
2022-08-18 06:48:46 +0200 <Axman6> I reckon there's likely to be a very cheap test, something like x & 0xFFFF000000007 == 0 for the fast case
2022-08-18 06:48:54 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-08-18 06:49:02 +0200 <SixDuce> where is everyone from
2022-08-18 06:49:11 +0200 <SixDuce> English boy here :P
2022-08-18 06:49:31 +0200 <Axman6> The internet
2022-08-18 06:49:33 +0200drlkf_(~drlkf@chat.drlkf.net) (Client Quit)
2022-08-18 06:49:44 +0200 <c_wraith> I mean, this obviously would need benchmarking across a variety of programs. But I suspect Char use isn't in the hot path the way other pointers are
2022-08-18 06:50:08 +0200 <Axman6> except perhaps in GHC :P
2022-08-18 06:50:23 +0200 <jackdk> Axman6: Me too!
2022-08-18 06:50:25 +0200 <Axman6> ghc -Oghc
2022-08-18 06:51:29 +0200 <Axman6> I'm pretty sure we're neighbours jackdk
2022-08-18 06:51:49 +0200 <jackdk> How do you know that Axman6? I'm behind like seven proxies
2022-08-18 06:52:00 +0200 <c_wraith> everyone here is neighbors
2022-08-18 06:53:10 +0200 <jackdk> Makes sense
2022-08-18 06:54:13 +0200 <Axman6> Nah we just cancelled Neighbours
2022-08-18 06:54:20 +0200nilradical(~nilradica@user/naso)
2022-08-18 06:55:18 +0200nilradical(~nilradica@user/naso) (Remote host closed the connection)
2022-08-18 06:55:54 +0200nilradical(~nilradica@user/naso)
2022-08-18 07:01:42 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds)
2022-08-18 07:04:58 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 07:09:20 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 07:12:58 +0200drlkf_(~drlkf@chat.drlkf.net)
2022-08-18 07:17:57 +0200mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 268 seconds)
2022-08-18 07:18:20 +0200snak(~snak@221x252x204x99.ap221.ftth.ucom.ne.jp) (Quit: Client closed)
2022-08-18 07:19:08 +0200nate4(~nate@98.45.169.16)
2022-08-18 07:20:37 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 07:21:40 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 07:23:48 +0200nate4(~nate@98.45.169.16) (Ping timeout: 256 seconds)
2022-08-18 07:26:53 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 07:28:20 +0200 <hololeap> anyone have a guess why my cabal project is trying to download Cabal-3.8? I want to build this using only packages from my linux package manager (trying to test/maintain). I would like to know why Cabal-3.8 is being chosen as opposed to the installed Cabal-3.4. are there any options that will display this?
2022-08-18 07:29:56 +0200mikoto-chan(~mikoto-ch@164.5.249.78)
2022-08-18 07:31:26 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79)
2022-08-18 07:32:39 +0200 <Zmijson> https://paste.tomsmeding.com/vveBk2BH
2022-08-18 07:32:48 +0200 <Zmijson> could anyone tell me why I am getting a parse error
2022-08-18 07:32:50 +0200 <Zmijson> on the last line?
2022-08-18 07:33:32 +0200 <jackdk> Zmijson: probably need to indent L8 so it's not in the same column as the declarations of the instance methods
2022-08-18 07:33:54 +0200 <hololeap> you have a type declaration function with no function definition
2022-08-18 07:34:01 +0200 <hololeap> *type declaration for a function
2022-08-18 07:34:14 +0200 <Zmijson> its further on
2022-08-18 07:34:24 +0200 <Zmijson> its just I was getting a parse error that I couldn't figure out
2022-08-18 07:34:42 +0200Guest67(~Guest67@128-193-154-141.ptpg.oregonstate.edu) (Ping timeout: 252 seconds)
2022-08-18 07:34:44 +0200 <Zmijson> jackdk was completely right
2022-08-18 07:34:53 +0200 <Zmijson> I still can't figure out haskell whitespaces...
2022-08-18 07:36:54 +0200 <hololeap> to the compiler, it looks like (rf <*> ra) is perhaps another case for (pure :: BTree) where you forgot to include the " = ..." part
2022-08-18 07:36:57 +0200 <dsal> There aren't a lot of languages where it makes sense to put a continuation of something on the same column.
2022-08-18 07:37:38 +0200 <hololeap> but if you indent it, it knows it's an argument to Node
2022-08-18 07:37:43 +0200 <hololeap> (on line 7)
2022-08-18 07:37:51 +0200 <jackdk> Zmijson: I've only just started skimming this, but it seems to be quite a good video about the Haskell whitespace rules: https://www.youtube.com/watch?v=uKpPJV0hhCY
2022-08-18 07:37:54 +0200coot(~coot@213.134.176.158)
2022-08-18 07:37:57 +0200 <dsal> Zmijson: That `pure` looks kind of weird. Do you mean for the structure to recurse onto itself?
2022-08-18 07:37:57 +0200chaseleif(~chaseleif@user/chaseleif)
2022-08-18 07:38:25 +0200 <Zmijson> weird as a whole or in terms of spacing
2022-08-18 07:38:27 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 07:38:35 +0200 <dsal> Just conceptually weird.
2022-08-18 07:39:00 +0200 <hololeap> aren't trees usually recursive?
2022-08-18 07:39:02 +0200 <Zmijson> oh so you know my second name
2022-08-18 07:39:17 +0200 <dsal> hololeap: not cyclical
2022-08-18 07:40:04 +0200 <chaseleif> hallo. I just received my book "Learn You a Haskell for Great Good" and I am pretty excited about it. I haven't normally used like a book as a resource for a new language, but this one seems fun
2022-08-18 07:40:11 +0200 <hololeap> oh the let statement at the top...
2022-08-18 07:40:23 +0200 <hololeap> yeah that is strange
2022-08-18 07:40:30 +0200 <jackdk> Does it matter? Looks like it's the zippy applicative for tree. Compare instance Applicative ZipList that goes on forever?
2022-08-18 07:40:38 +0200 <jackdk> chaseleif: welcome, have fun with it!
2022-08-18 07:40:51 +0200 <hololeap> hm, fair enough
2022-08-18 07:40:53 +0200 <dsal> jackdk: Sure, it *can* make sense. I'm just not sure if it does make sense.
2022-08-18 07:41:08 +0200 <chaseleif> thx jackdk. I think I will like it a lot
2022-08-18 07:41:20 +0200 <dsal> I usually don't think of Trees cycling back on themselves.
2022-08-18 07:41:54 +0200 <hololeap> Zmijson: the answer to your question is to move (rf <*> ra) over an indentation
2022-08-18 07:42:13 +0200 <hololeap> now, prepare for nitpicks
2022-08-18 07:42:55 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 07:43:31 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 248 seconds)
2022-08-18 07:43:42 +0200 <dsal> Also, note you can write that: `Node lf f rf <*> Node la a ra = Node (lf <*> la) (f a) (rf <*> ra)
2022-08-18 07:44:11 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-08-18 07:44:56 +0200 <hololeap> I petition using fix from Data.Function, like so: pure x = fix $ \t -> Node t x t
2022-08-18 07:45:13 +0200 <monochrom> Hey I should put that on my exam!
2022-08-18 07:45:34 +0200 <monochrom> But I've already chosen zippy lists and a cool application.
2022-08-18 07:46:22 +0200king_gs(~Thunderbi@187.201.216.244)
2022-08-18 07:48:05 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 07:52:15 +0200king_gs(~Thunderbi@187.201.216.244) (Quit: king_gs)
2022-08-18 07:54:25 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-08-18 07:54:25 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-08-18 07:55:02 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-08-18 07:55:58 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 07:56:09 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 07:56:17 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-18 07:56:55 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 07:57:45 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-18 07:58:53 +0200acidjnk_new(~acidjnk@p200300d6e7137a57b921241ade470604.dip0.t-ipconnect.de)
2022-08-18 07:59:45 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 08:00:04 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-08-18 08:00:30 +0200shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-08-18 08:00:38 +0200SixDuce(~SixDuce@92.40.184.0.threembb.co.uk) (Ping timeout: 256 seconds)
2022-08-18 08:02:53 +0200luffy(~chenqisu1@183.217.201.23) (Ping timeout: 252 seconds)
2022-08-18 08:07:03 +0200 <chaseleif> I should be able to make a compiler for a subset of the C language in Haskell right?
2022-08-18 08:07:05 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-08-18 08:08:28 +0200 <chaseleif> Maybe I can convince our compiler instructor to switch from C to Haskell ... force students to use a new language and do some functional programming (?)
2022-08-18 08:08:34 +0200 <chaseleif> Does this sound like a good idea?
2022-08-18 08:08:36 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds)
2022-08-18 08:09:02 +0200 <chaseleif> C / Lex/Flex / Bison/Yacc
2022-08-18 08:10:09 +0200 <tdammers> writing compilers in Haskell is a good idea, especially for educative purposes; the C/lex/yacc toolchain is kludgy AF, and you can get much cleaner compiler code in Haskell without resorting to code generators and such
2022-08-18 08:10:53 +0200 <chaseleif> Nice
2022-08-18 08:10:55 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2022-08-18 08:11:01 +0200 <tdammers> but I would fully expect your attempts to fail, because most teachers won't throw out their entire curriculum for the year just because one student thinks you should be using a different language
2022-08-18 08:11:28 +0200 <chaseleif> not this semester, but for future semesters
2022-08-18 08:11:54 +0200 <tdammers> oh, OK. worth a shot then, you never know
2022-08-18 08:12:20 +0200 <chaseleif> The compiler course goes hard into regexes and FSM / etc in the beginning ... that time could probably be spent talking about how to do those same things in Haskell
2022-08-18 08:12:42 +0200 <Zmijson> I know a few people who have or had haskell at uni and they said it was by far the most failed module
2022-08-18 08:12:51 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 08:13:06 +0200 <chaseleif> people already have a hard time doing it in C ...
2022-08-18 08:13:10 +0200 <Zmijson> there are also fewer people who can teach it and can teach it well
2022-08-18 08:15:35 +0200 <chaseleif> We have a Principles of Programming Languages course that requires using lambda calculus .. making a lambda calculus calculator. Maybe that should be a prerequisite
2022-08-18 08:17:17 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 08:17:32 +0200 <tdammers> Compilers are easier in Haskell, but if you have to learn Haskell first, it might not be worth it (apart from how learning Haskell makes you a better programmer in general)
2022-08-18 08:18:16 +0200 <chaseleif> That is the thing I am thinking. If you are a programmer then you can do a new language.
2022-08-18 08:18:26 +0200 <Franciman> what about interpreters?
2022-08-18 08:18:32 +0200 <Franciman> are they easier in haskell or standardml?
2022-08-18 08:19:57 +0200ralu19(~ralu@static.211.245.203.116.clients.your-server.de)
2022-08-18 08:20:17 +0200 <dsal> I've only done interpreters in Haskell, but that's the less interesting part.
2022-08-18 08:21:57 +0200ralu1(~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 252 seconds)
2022-08-18 08:21:57 +0200ralu19ralu1
2022-08-18 08:22:05 +0200madnight(~madnight@static.59.103.201.195.clients.your-server.de) (Ping timeout: 268 seconds)
2022-08-18 08:22:07 +0200yahb2(~yahb2@static.56.27.47.78.clients.your-server.de) (Ping timeout: 268 seconds)
2022-08-18 08:22:11 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Ping timeout: 256 seconds)
2022-08-18 08:22:11 +0200bcoppens_(~bartcopp@vpn2.bartcoppens.be) (Ping timeout: 244 seconds)
2022-08-18 08:22:29 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2)
2022-08-18 08:22:54 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79) (Quit: Ping timeout (120 seconds))
2022-08-18 08:23:34 +0200 <chaseleif> So. I will probably just need to make my own solutions in Haskell for all projects and give them to the professor.
2022-08-18 08:23:37 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-08-18 08:23:56 +0200bcoppens(~bartcopp@vpn2.bartcoppens.be)
2022-08-18 08:23:57 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Ping timeout: 268 seconds)
2022-08-18 08:24:18 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79)
2022-08-18 08:24:37 +0200waldo(~waldo@user/waldo)
2022-08-18 08:25:10 +0200madnight(~madnight@static.59.103.201.195.clients.your-server.de)
2022-08-18 08:25:43 +0200MajorBiscuit(~MajorBisc@c-001-019-012.client.tudelft.eduvpn.nl)
2022-08-18 08:29:56 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl)
2022-08-18 08:32:28 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-08-18 08:32:52 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2022-08-18 08:35:03 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:d8c8:b9a1:a839:9254)
2022-08-18 08:37:17 +0200 <tdammers> interpreter, compiler, almost the same thing
2022-08-18 08:37:59 +0200 <Franciman> oh i see you refer to futamura projections
2022-08-18 08:38:14 +0200 <c_wraith> nah, those are much more complex.
2022-08-18 08:38:43 +0200 <tdammers> it's just that between an interpreter and a compiler, only the last few stages are different, the rest is the same
2022-08-18 08:38:43 +0200 <c_wraith> a naive compiler and a naive interpreter are relatively similar amounts of work
2022-08-18 08:38:48 +0200WzC(~Frank@77-162-168-71.fixed.kpn.net)
2022-08-18 08:38:51 +0200 <tdammers> and those last stages are relatively boring
2022-08-18 08:39:19 +0200 <tdammers> of course if we're talking "industry strength", then you get optimization concerns that cut through those layers, and things get messy
2022-08-18 08:39:46 +0200 <hololeap> chaseleif: in my experience, it won't work. they'll ask you to rewrite it or just give you a 0%
2022-08-18 08:40:35 +0200Noinia(~Frank@77-162-168-71.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-18 08:41:07 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-08-18 08:41:39 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 248 seconds)
2022-08-18 08:42:11 +0200mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 248 seconds)
2022-08-18 08:42:35 +0200 <hololeap> that said, try it out in haskell if you want to, but don't expect to change the status quo
2022-08-18 08:43:50 +0200Lord_of_Life_Lord_of_Life
2022-08-18 08:44:50 +0200 <tomsmeding> I'd say a naive compiler is harder than a naive interpreter: an interpreter should implement the semantics of your language, whereas a compiler should tell some other system (i.e. the compilation target machine) to implement the semantics of your language
2022-08-18 08:45:14 +0200 <tomsmeding> but both can be made as hard as you like
2022-08-18 08:45:35 +0200 <tomsmeding> in particular, the limit of making an interpreter more performant is a JIT compiler :p
2022-08-18 08:45:45 +0200 <tomsmeding> hence, they converge in the end
2022-08-18 08:45:47 +0200razetime(~quassel@117.193.3.40) (Ping timeout: 252 seconds)
2022-08-18 08:46:06 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 08:46:09 +0200 <hololeap> a interpreter just has loosened expectations
2022-08-18 08:46:40 +0200razetime(~quassel@117.193.3.40)
2022-08-18 08:46:42 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl) (Remote host closed the connection)
2022-08-18 08:47:51 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-18 08:47:56 +0200 <chaseleif> so sad o_O
2022-08-18 08:47:58 +0200 <sm> how would you appendFile strictly, ie, pause until that file write has finished
2022-08-18 08:48:28 +0200razetime(~quassel@117.193.3.40) (Client Quit)
2022-08-18 08:48:29 +0200 <chaseleif> is there a haskell fflush() :)
2022-08-18 08:48:37 +0200 <tomsmeding> sm: is appendFile not strict?
2022-08-18 08:48:38 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 08:49:07 +0200 <hololeap> use a streaming lib?
2022-08-18 08:49:09 +0200 <tomsmeding> seeing as its implementation is `withFile f AppendMode (\ hdl -> hPutStr hdl txt)`, and withFile closes the file upon exit from the callback
2022-08-18 08:49:09 +0200 <sm> I'm not sure, I am calling appendFile in several places for debug logging, and getting "withFile: resource busy (file is locked)" exceptions
2022-08-18 08:49:11 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl)
2022-08-18 08:49:45 +0200coot(~coot@213.134.176.158)
2022-08-18 08:50:04 +0200 <tomsmeding> (oh that's not quite its posix implementation)
2022-08-18 08:50:30 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 08:50:54 +0200 <hololeap> perhaps you could use a TVar to store the contents?
2022-08-18 08:51:12 +0200coot(~coot@213.134.176.158) (Remote host closed the connection)
2022-08-18 08:51:17 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-08-18 08:51:25 +0200 <tomsmeding> (but the posix implementation -- while more complicated -- seems to also close the file upon exit of withFile)
2022-08-18 08:52:10 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
2022-08-18 08:52:36 +0200coot(~coot@213.134.176.158)
2022-08-18 08:52:37 +0200 <hololeap> sorry, misread...
2022-08-18 08:53:34 +0200 <tomsmeding> sm: I would be more concerned about the atomicity (or not) of appendFile, than its strictness, if you're concurrently calling it on the same file from multiple places
2022-08-18 08:54:08 +0200 <tomsmeding> chaseleif: yes, System.IO.hFlush :p
2022-08-18 08:54:14 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-08-18 08:54:26 +0200 <tomsmeding> but not relevant here because appendFile uses withFile
2022-08-18 08:55:27 +0200 <hololeap> isn't there some low-level mechanism for forcing this, sort of like waitForProcess?
2022-08-18 08:55:41 +0200 <tomsmeding> fsync()? :')
2022-08-18 08:56:02 +0200 <sm> I'm calling it from a few places in single-threaded code. Ie, sequentially. It works with small strings but not if I log anything large. I assume lazy IO is to blame
2022-08-18 08:56:06 +0200 <tomsmeding> but the semantics of withFile _should_ be that it's done when it finishes, and hPutStr shouldn't be lazy
2022-08-18 08:56:11 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 08:56:16 +0200 <tomsmeding> I'd hope _output_ is not lazy IO?
2022-08-18 08:56:25 +0200 <tomsmeding> that would make zero sense
2022-08-18 08:59:10 +0200off^(~off@50.236.139.178)
2022-08-18 08:59:37 +0200yvan-sraka(~yvan-srak@2a0d:e487:112f:fdaa:e3d5:4252:a236:fa84)
2022-08-18 08:59:45 +0200 <hololeap> the question remains how one makes appendFile strict
2022-08-18 09:00:42 +0200 <hololeap> you could have the function run readContents on the same file afterwards, and `seq` the contents
2022-08-18 09:00:55 +0200 <hololeap> *readFile
2022-08-18 09:01:21 +0200 <tomsmeding> under the hopefully false assumption that appendFile is _not_ strict, you mean?
2022-08-18 09:01:47 +0200 <tomsmeding> reading the file in another IO operation wouldn't be connected to the presumably finished write action coming before it in the RTS, so I guess that would change little about appendFil
2022-08-18 09:01:58 +0200 <tomsmeding> hence my statement that lazy IO in output makes zero sense :p
2022-08-18 09:02:51 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-08-18 09:03:47 +0200 <hololeap> I thought *all* IO in base haskell was lazy
2022-08-18 09:04:14 +0200mmhat(~mmh@p200300f1c7086062ee086bfffe095315.dip0.t-ipconnect.de)
2022-08-18 09:04:20 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 09:04:36 +0200 <tomsmeding> hololeap: quote from Prelude docs: > Encoding and decoding errors are always detected and reported, except during lazy I/O (hGetContents, getContents, and readFile), where a decoding error merely results in termination of the character stream, as with other I/O errors.
2022-08-18 09:04:56 +0200 <hololeap> ok, so that's wrong, then
2022-08-18 09:05:07 +0200 <hololeap> (what I said)
2022-08-18 09:06:45 +0200 <tomsmeding> also if you click on the source for e.g. hGetContents, the lazy IO is easy to spot: if uses lazyRead, which starts with the word unsafeInterleaveIO
2022-08-18 09:07:09 +0200 <tomsmeding> *it uses
2022-08-18 09:09:13 +0200 <hololeap> \s -> appendFile /tmp/foo.txt s *> putStrLn "this runs after foo.txt is written"
2022-08-18 09:09:37 +0200 <hololeap> so putStrLn is guaranteed to run after appendFile finishes writing to the file?
2022-08-18 09:09:48 +0200 <tomsmeding> if my understanding is correct, yes
2022-08-18 09:09:58 +0200 <hololeap> I trust your understanding
2022-08-18 09:10:10 +0200 <tomsmeding> not necessarily persisted to disk (that's what fsync(2) and sync(1) are for), but the write(2) call should have finished
2022-08-18 09:10:49 +0200 <hololeap> TIL
2022-08-18 09:11:27 +0200 <tomsmeding> and I think the reason for that is precisely the above: you can't really force a write action, in contrast to a read actioni
2022-08-18 09:11:42 +0200 <tomsmeding> so if you do that lazily, the programmer is helpless
2022-08-18 09:13:48 +0200 <sm> so I'm wondering what's actually going on here. I know from experience that "just trying stuff" will fail to fix it..
2022-08-18 09:14:19 +0200 <hololeap> have you seen 1000 monkeys on typewriters?
2022-08-18 09:14:22 +0200 <tomsmeding> how intractable is copying your project and trying to reduce to a minimal reproducing example
2022-08-18 09:16:27 +0200ddellacosta(~ddellacos@89.45.224.21)
2022-08-18 09:16:29 +0200 <sm> it should be easy to reproduce.. on the other hand it's a bit off task and I should be elsewhere.. perhaps later if no other ideas show up.. thanks
2022-08-18 09:16:31 +0200cfricke(~cfricke@user/cfricke)
2022-08-18 09:17:32 +0200 <sm> (one other data point: sticking in a threadDelay 500000 between appends had no effect)
2022-08-18 09:19:33 +0200off^(~off@50.236.139.178) (Remote host closed the connection)
2022-08-18 09:19:41 +0200 <sm> oh. And I am calling it from unsafePerformIO.
2022-08-18 09:20:15 +0200 <int-e> ugh
2022-08-18 09:20:58 +0200 <int-e> so are you sure you're not nesting those calls by accident? force a -> call the logging function with a string that depends on b -> force b -> call logging function while the first one is running?
2022-08-18 09:21:17 +0200ddellacosta(~ddellacos@89.45.224.21) (Ping timeout: 268 seconds)
2022-08-18 09:21:17 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 09:21:39 +0200 <chaseleif> Did you try the System.IO.hFlush mentioned by tomsmeding ? There should be some mechanism for flushing buffers and it should work
2022-08-18 09:21:58 +0200 <sm> I'll look into that int-e, thanks
2022-08-18 09:22:53 +0200ddellacosta(~ddellacos@143.244.47.84)
2022-08-18 09:23:27 +0200 <sm> and flush, sensibly or not
2022-08-18 09:23:36 +0200 <tdammers> heads up: given infinite time, the number of monkeys is irrelevant (as long as it's greater than zero)
2022-08-18 09:25:08 +0200 <chaseleif> was wenn es 400000 Affen gibt
2022-08-18 09:25:20 +0200zeenk(~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f)
2022-08-18 09:25:44 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 09:25:56 +0200hololeapvotes for that one 1/10 monkey
2022-08-18 09:25:58 +0200 <int-e> Meh, "monkey on a keyboard" isn't giving me the results that I wanted... apparently there's a Piano piece called "Dance Monkey"
2022-08-18 09:26:32 +0200 <hololeap> is it like that scene from Big?
2022-08-18 09:26:42 +0200 <chaseleif> lmao
2022-08-18 09:26:59 +0200ddellacosta(~ddellacos@143.244.47.84) (Ping timeout: 248 seconds)
2022-08-18 09:27:28 +0200 <int-e> Well, https://www.youtube.com/watch?v=-J9O5Yj3-I4 is fun at least.
2022-08-18 09:27:51 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 09:28:09 +0200 <int-e> ("typewriter" works better)
2022-08-18 09:28:51 +0200 <chaseleif> he's not very good but he sure is happy about it
2022-08-18 09:29:13 +0200ddellacosta(~ddellacos@static-198-44-136-47.cust.tzulo.com)
2022-08-18 09:31:23 +0200Zmijson(~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79) (Quit: Client closed)
2022-08-18 09:32:18 +0200 <sm> things will get clearer, but I think int-e is right - nested functions all unsafe-io-logging to the same file
2022-08-18 09:32:37 +0200Axman6adds 1/2^t new monkeys every new time instant t
2022-08-18 09:34:06 +0200nilradical(~nilradica@user/naso) (Remote host closed the connection)
2022-08-18 09:34:20 +0200 <tomsmeding> oof
2022-08-18 09:34:22 +0200 <jackdk> Axman6: make sure to do it with proper FRP so you get continuous time
2022-08-18 09:34:41 +0200 <tomsmeding> yeah the unsafePerformIO was the missing bit of info :p
2022-08-18 09:34:48 +0200nilradical(~nilradica@user/naso)
2022-08-18 09:34:51 +0200 <sm> more precisely: multiple points in a function call tree unsafe-io-logging to the same file.. effectively doing concurrent IO I guess
2022-08-18 09:34:58 +0200 <sm> sorry for leaving out that detail tomsmeding
2022-08-18 09:35:16 +0200 <tomsmeding> yeah not precisely concurrent, but basically what int-e said
2022-08-18 09:35:33 +0200 <tomsmeding> sm: you only know a detail is relevant to solving a problem once you've used it to solve said problem :)
2022-08-18 09:36:08 +0200 <tomsmeding> sm: fix could be: deepseq'ing the string to log before you enter appendFile
2022-08-18 09:36:41 +0200 <tomsmeding> \s -> unsafePerformIO $ evaluate (length (show s)) >> appendFile "log.txt" s
2022-08-18 09:36:43 +0200 <sm> I'll try later and report back. Thanks all!
2022-08-18 09:37:41 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
2022-08-18 09:37:55 +0200 <int-e> Heh, forcing the spine may not be enough. (Though the chance that it works it pretty good.)
2022-08-18 09:38:01 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-08-18 09:38:02 +0200 <tomsmeding> int-e: mind the 'show'
2022-08-18 09:38:16 +0200 <tomsmeding> length (show 'a') /= length (show '\NUL')
2022-08-18 09:38:44 +0200 <tomsmeding> I've thought about this :p
2022-08-18 09:38:53 +0200 <int-e> tomsmeding: I did. Which is why it's *probably* fine. But you can still write `Show` instances for which it won't be enough.
2022-08-18 09:39:11 +0200 <tomsmeding> and note also that I'm using s as an argument to appendFile, hence it's a String, hence it works in this case :p
2022-08-18 09:39:14 +0200 <tomsmeding> but yes, in general it can fail
2022-08-18 09:39:48 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 09:40:03 +0200nilradical(~nilradica@user/naso) (Ping timeout: 252 seconds)
2022-08-18 09:40:39 +0200 <sm> ..or now, since you make it so easy.. yes! That has fixed it, for now at least
2022-08-18 09:41:15 +0200 <tomsmeding> yay
2022-08-18 09:41:36 +0200 <int-e> tomsmeding: You're right, this will work for String.
2022-08-18 09:42:42 +0200 <sm> the working function, FWIW:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/d31c138afa74625256cc7011c5a0cec31f91…)
2022-08-18 09:43:21 +0200 <tomsmeding> sm: neater way to write the same thing is `evaluate (Control.DeepSeq.force s)` :p
2022-08-18 09:43:27 +0200nilradical(~nilradica@user/naso)
2022-08-18 09:43:39 +0200 <sm> nice
2022-08-18 09:43:41 +0200ccntrq(~Thunderbi@172.209.94.92.rev.sfr.net)
2022-08-18 09:43:47 +0200 <tomsmeding> intent is clearer and is slightly faster, but perhaps incurs an extra dependency
2022-08-18 09:43:48 +0200 <int-e> > let s = iterate (\s -> s <> s) (S.singleton ()) !! 64 in (S.null s, S.length s)
2022-08-18 09:43:50 +0200 <lambdabot> error:
2022-08-18 09:43:50 +0200 <lambdabot> Not in scope: ‘S.length’
2022-08-18 09:43:50 +0200 <lambdabot> Perhaps you meant one of these:
2022-08-18 09:44:06 +0200ddellacosta(~ddellacos@static-198-44-136-47.cust.tzulo.com) (Ping timeout: 268 seconds)
2022-08-18 09:44:28 +0200 <int-e> > let s = iterate (\s -> s <> s) (Seq.singleton ()) !! 64 in (Seq.null s, Seq.length s)
2022-08-18 09:44:28 +0200 <tomsmeding> > let s = iterate (\s -> s <> s) (S.singleton ()) !! 64 in (S.null s, S.size s)
2022-08-18 09:44:29 +0200 <lambdabot> (False,1)
2022-08-18 09:44:29 +0200 <lambdabot> (False,0)
2022-08-18 09:44:34 +0200 <tomsmeding> lol
2022-08-18 09:44:37 +0200 <tomsmeding> quiz: which is which
2022-08-18 09:45:33 +0200ddellacosta(~ddellacos@143.244.47.84)
2022-08-18 09:45:47 +0200 <sm> this is great.. reliable logging from a brick app at last
2022-08-18 09:47:47 +0200nilradical(~nilradica@user/naso) (Ping timeout: 248 seconds)
2022-08-18 09:49:11 +0200Pickchea(~private@user/pickchea)
2022-08-18 09:51:47 +0200ddellacosta(~ddellacos@143.244.47.84) (Ping timeout: 252 seconds)
2022-08-18 09:52:16 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-08-18 09:53:15 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-18 09:53:29 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-08-18 09:53:35 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 09:53:51 +0200chaseleifsleeps
2022-08-18 09:53:52 +0200ddellacosta(~ddellacos@89.45.224.60)
2022-08-18 09:55:03 +0200 <chaseleif> I'd say False applied to 1 is false and False applied to 0 is maybe true
2022-08-18 09:56:17 +0200 <chaseleif> @lambdabot ... but it has been a couple years since I did the lambda programming and I haven't actually done any Haskell yet
2022-08-18 09:56:17 +0200 <lambdabot> Unknown command, try @list
2022-08-18 09:56:31 +0200 <chaseleif> @list
2022-08-18 09:56:31 +0200 <lambdabot> What module? Try @listmodules for some ideas.
2022-08-18 09:56:38 +0200 <chaseleif> @list ideas
2022-08-18 09:56:38 +0200 <lambdabot> No module "ideas" loaded
2022-08-18 09:56:44 +0200 <chaseleif> @list clues
2022-08-18 09:56:45 +0200 <lambdabot> No module "clues" loaded
2022-08-18 09:57:17 +0200 <chaseleif> @list chances
2022-08-18 09:57:17 +0200 <lambdabot> No module "chances" loaded
2022-08-18 09:57:30 +0200 <tomsmeding> @botsnack
2022-08-18 09:57:30 +0200 <lambdabot> :)
2022-08-18 09:57:35 +0200 <chaseleif> o_O
2022-08-18 09:57:56 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 09:58:06 +0200 <chaseleif> nighty night
2022-08-18 09:58:10 +0200 <tomsmeding> @pl \a b c d -> a d b c a
2022-08-18 09:58:10 +0200 <lambdabot> flip =<< ((flip . (flip .) . flip) .) . flip
2022-08-18 09:58:54 +0200ddellacosta(~ddellacos@89.45.224.60) (Ping timeout: 268 seconds)
2022-08-18 09:59:50 +0200 <int-e> As I like saying, you can usually recognize pointless style by the abundance of dots.
2022-08-18 10:00:12 +0200ddellacosta(~ddellacos@143.244.47.100)
2022-08-18 10:02:20 +0200cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2022-08-18 10:03:34 +0200nate4(~nate@98.45.169.16)
2022-08-18 10:05:47 +0200cheater(~Username@user/cheater)
2022-08-18 10:06:09 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 10:08:09 +0200coot(~coot@213.134.176.158)
2022-08-18 10:08:35 +0200nate4(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-08-18 10:09:15 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.6)
2022-08-18 10:10:22 +0200yvan-sraka(~yvan-srak@2a0d:e487:112f:fdaa:e3d5:4252:a236:fa84) (Remote host closed the connection)
2022-08-18 10:10:24 +0200ddellacosta(~ddellacos@143.244.47.100) (Ping timeout: 256 seconds)
2022-08-18 10:11:01 +0200fserucas_|eod(~fserucas|@46.50.4.9) (Quit: Leaving)
2022-08-18 10:11:16 +0200fserucas|eod(~fserucas|@46.50.4.9)
2022-08-18 10:11:23 +0200jgeerds(~jgeerds@55d46bad.access.ecotel.net)
2022-08-18 10:12:19 +0200chele(~chele@user/chele)
2022-08-18 10:12:28 +0200johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Ping timeout: 268 seconds)
2022-08-18 10:12:39 +0200ddellacosta(~ddellacos@143.244.47.84)
2022-08-18 10:14:18 +0200akegalj(~akegalj@109.60.125.78)
2022-08-18 10:15:28 +0200nattiestnate(~nate@180.243.14.130)
2022-08-18 10:15:31 +0200raym(~raym@user/raym) (Ping timeout: 248 seconds)
2022-08-18 10:17:24 +0200raym(~raym@user/raym)
2022-08-18 10:21:06 +0200waldo(~waldo@user/waldo) (Ping timeout: 268 seconds)
2022-08-18 10:25:23 +0200akegalj(~akegalj@109.60.125.78) (Quit: leaving)
2022-08-18 10:26:21 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 10:30:50 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 10:30:53 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-18 10:30:56 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 10:31:31 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 10:31:39 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 10:39:27 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 10:40:34 +0200Midjak(~Midjak@82.66.147.146)
2022-08-18 10:41:41 +0200vysn(~vysn@user/vysn)
2022-08-18 10:42:36 +0200zachel(~zachel@user/zachel)
2022-08-18 10:43:11 +0200dsrt^(~dsrt@50.236.139.178)
2022-08-18 10:43:39 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 10:49:37 +0200benin0(~benin@183.82.27.55)
2022-08-18 10:50:26 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-08-18 10:54:18 +0200Midjak(~Midjak@82.66.147.146) (Quit: Leaving)
2022-08-18 10:55:41 +0200waldo(~waldo@user/waldo)
2022-08-18 10:57:54 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 10:58:11 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 268 seconds)
2022-08-18 10:59:49 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 10:59:56 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 11:00:23 +0200__monty__(~toonn@user/toonn)
2022-08-18 11:02:21 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
2022-08-18 11:03:31 +0200ddellacosta(~ddellacos@143.244.47.84) (Ping timeout: 248 seconds)
2022-08-18 11:04:04 +0200akegalj(~akegalj@141-136-174-63.dsl.iskon.hr)
2022-08-18 11:04:14 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 11:05:16 +0200ddellacosta(~ddellacos@89.45.224.164)
2022-08-18 11:08:05 +0200nilradical(~nilradica@user/naso)
2022-08-18 11:12:10 +0200Midjak(~Midjak@82.66.147.146)
2022-08-18 11:18:38 +0200cfricke(~cfricke@user/cfricke)
2022-08-18 11:22:31 +0200kuribas(~user@silversquare.silversquare.eu)
2022-08-18 11:24:02 +0200hmw[at](~hmw@84-113-100-7.cable.dynamic.surfer.at) ()
2022-08-18 11:24:49 +0200spacenautx(~spacenaut@user/spacenautx)
2022-08-18 11:25:47 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-08-18 11:27:10 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-08-18 11:29:14 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 11:32:51 +0200acidjnk_new(~acidjnk@p200300d6e7137a57b921241ade470604.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-08-18 11:33:00 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 11:34:13 +0200ubert(~Thunderbi@178.115.63.14.wireless.dyn.drei.com)
2022-08-18 11:34:29 +0200Pickchea(~private@user/pickchea) (Ping timeout: 268 seconds)
2022-08-18 11:37:32 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 11:37:32 +0200snak(~snak@221x252x204x99.ap221.ftth.ucom.ne.jp)
2022-08-18 11:38:15 +0200snak(~snak@221x252x204x99.ap221.ftth.ucom.ne.jp) (Client Quit)
2022-08-18 11:40:05 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 11:43:54 +0200polyphem(~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17) (Ping timeout: 256 seconds)
2022-08-18 11:44:21 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2022-08-18 11:48:33 +0200luffy(~chenqisu1@183.217.201.23)
2022-08-18 11:49:09 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec)
2022-08-18 11:49:11 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec) (Client Quit)
2022-08-18 11:52:07 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 11:54:14 +0200nilradical(~nilradica@user/naso) (Remote host closed the connection)
2022-08-18 11:54:51 +0200nilradical(~nilradica@user/naso)
2022-08-18 11:55:59 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-08-18 12:00:23 +0200nilradical(~nilradica@user/naso) (Ping timeout: 268 seconds)
2022-08-18 12:00:41 +0200yvan-sraka(~yvan-srak@2a0d:e487:39f:d228:4908:8fff:f815:671e)
2022-08-18 12:01:25 +0200mvk(~mvk@2607:fea8:5ce3:8500::a1ec)
2022-08-18 12:03:11 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 12:13:01 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-08-18 12:16:57 +0200polyphem(~rod@2a02:810d:840:8754:b8df:14dd:e983:6c04)
2022-08-18 12:19:31 +0200luffy(~chenqisu1@183.217.201.23) (Ping timeout: 268 seconds)
2022-08-18 12:24:08 +0200mvk(~mvk@2607:fea8:5ce3:8500::a1ec) (Ping timeout: 256 seconds)
2022-08-18 12:24:42 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 256 seconds)
2022-08-18 12:29:14 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-08-18 12:31:13 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 12:33:20 +0200nate4(~nate@98.45.169.16)
2022-08-18 12:35:21 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 12:36:13 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 12:37:55 +0200nate4(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-08-18 12:39:43 +0200acidjnk_new(~acidjnk@p200300d6e7137a57f55b7c3ed0139901.dip0.t-ipconnect.de)
2022-08-18 12:40:15 +0200nilradical(~nilradica@user/naso)
2022-08-18 12:40:34 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 12:44:19 +0200nilradical(~nilradica@user/naso) (Ping timeout: 248 seconds)
2022-08-18 12:45:29 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-08-18 12:46:04 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 12:54:01 +0200waldo(~waldo@user/waldo) (Ping timeout: 252 seconds)
2022-08-18 12:56:18 +0200mrkajetanp(~mrkajetan@2a01:4b00:ea36:6c00:7994:941c:3f5d:2b88) (Ping timeout: 240 seconds)
2022-08-18 12:56:48 +0200 <dminuoso> Hi. I want to implement a limited case-folding on short bytestrings as this is the primary bottleneck in my current project.
2022-08-18 12:57:33 +0200 <dminuoso> Until now I did a naive `foldCase (Label l) = Label (BS.map foldCase_ l) where foldCase_ x = case x of 0x41 -> c2w 'a' ...`
2022-08-18 12:59:49 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 13:01:16 +0200 <dminuoso> Should I rather look into streaming bytes akin to what `text` has?
2022-08-18 13:02:48 +0200nilradical(~nilradica@user/naso)
2022-08-18 13:02:59 +0200acidjnk_new(~acidjnk@p200300d6e7137a57f55b7c3ed0139901.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-08-18 13:04:22 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 13:08:51 +0200kuribas(~user@silversquare.silversquare.eu) (Ping timeout: 248 seconds)
2022-08-18 13:10:09 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-08-18 13:10:32 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 13:10:39 +0200 <tomsmeding> dminuoso: ascii only?
2022-08-18 13:11:00 +0200 <dminuoso> tomsmeding: yeah
2022-08-18 13:11:12 +0200 <dminuoso> Ah it turns out I just had to do some inlining, now it performs
2022-08-18 13:11:17 +0200 <tomsmeding> ah :)
2022-08-18 13:19:15 +0200 <tomsmeding> with some vector intrinsics you might be able to do a whole bunch of characters at the same time :p
2022-08-18 13:23:30 +0200waldo(~waldo@user/waldo)
2022-08-18 13:27:37 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net)
2022-08-18 13:29:39 +0200waldo(~waldo@user/waldo) (Ping timeout: 248 seconds)
2022-08-18 13:31:02 +0200akegalj(~akegalj@141-136-174-63.dsl.iskon.hr) (Ping timeout: 268 seconds)
2022-08-18 13:33:15 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 13:34:27 +0200dsrt^(~dsrt@50.236.139.178) (Ping timeout: 248 seconds)
2022-08-18 13:37:32 +0200 <dminuoso> tomsmeding: Yeah, I dont think its worth the effort
2022-08-18 13:37:41 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 13:37:41 +0200 <dminuoso> I got a different bottlneck now in the serialization direction.
2022-08-18 13:40:04 +0200ddellacosta(~ddellacos@89.45.224.164) (Ping timeout: 256 seconds)
2022-08-18 13:41:58 +0200waldo(~waldo@user/waldo)
2022-08-18 13:42:04 +0200ddellacosta(~ddellacos@143.244.47.100)
2022-08-18 13:42:10 +0200acidjnk_new(~acidjnk@p200300d6e7137a5770c6fecd35188867.dip0.t-ipconnect.de)
2022-08-18 13:42:22 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 13:42:40 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 13:43:33 +0200yvan-sraka(~yvan-srak@2a0d:e487:39f:d228:4908:8fff:f815:671e) (Remote host closed the connection)
2022-08-18 13:45:06 +0200polyphem(~rod@2a02:810d:840:8754:b8df:14dd:e983:6c04) (Ping timeout: 244 seconds)
2022-08-18 13:45:50 +0200 <dminuoso> Given an bytestring containing ascii text, is there a way to unsafely build a text out of this?
2022-08-18 13:46:17 +0200polyphem(~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17)
2022-08-18 13:46:19 +0200xstill_(xstill@fimu/xstill) (Quit: Ping timeout (120 seconds))
2022-08-18 13:46:19 +0200xsarnik(xsarnik@lounge.fi.muni.cz) (Quit: Ping timeout (120 seconds))
2022-08-18 13:46:27 +0200waldo(~waldo@user/waldo) (Ping timeout: 252 seconds)
2022-08-18 13:47:00 +0200xsarnik(xsarnik@lounge.fi.muni.cz)
2022-08-18 13:47:06 +0200xstill_(xstill@fimu/xstill)
2022-08-18 13:48:04 +0200dsrt^(~dsrt@50.236.139.178)
2022-08-18 13:50:01 +0200 <dminuoso> Presumably I can just copy the bytestring to a byte array, and use `text ba 0 0` from Data.Text.Internal?
2022-08-18 13:50:21 +0200Cale(~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com)
2022-08-18 13:52:51 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-08-18 13:57:51 +0200yvan-sraka(~yvan-srak@37.171.140.201)
2022-08-18 13:58:14 +0200waldo(~waldo@user/waldo)
2022-08-18 14:00:01 +0200SixDuce(~SixDuce@92.40.185.179.threembb.co.uk)
2022-08-18 14:00:35 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 14:02:06 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-08-18 14:02:35 +0200waldo(~waldo@user/waldo) (Ping timeout: 252 seconds)
2022-08-18 14:04:46 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-18 14:10:37 +0200nilradical(~nilradica@user/naso) ()
2022-08-18 14:12:55 +0200ubert(~Thunderbi@178.115.63.14.wireless.dyn.drei.com) (Remote host closed the connection)
2022-08-18 14:17:08 +0200waldo(~waldo@user/waldo)
2022-08-18 14:21:04 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-08-18 14:22:50 +0200waldo(~waldo@user/waldo) (Ping timeout: 268 seconds)
2022-08-18 14:24:22 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 14:25:23 +0200 <qrpnxz> dminuoso: yep, you can do that. That really your bottleneck tho? That ascii should validate super fast
2022-08-18 14:25:52 +0200kuribas(~user@silversquare.silversquare.eu)
2022-08-18 14:26:26 +0200 <qrpnxz> and do you really even need it to be Text
2022-08-18 14:26:58 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 14:28:30 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 14:33:55 +0200yaroot(~yaroot@p2550227-ipngn11101souka.saitama.ocn.ne.jp) (Remote host closed the connection)
2022-08-18 14:34:33 +0200yaroot(~yaroot@p2550227-ipngn11101souka.saitama.ocn.ne.jp)
2022-08-18 14:40:49 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-18 14:41:23 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 14:45:15 +0200dsrt^(~dsrt@50.236.139.178) (Ping timeout: 256 seconds)
2022-08-18 14:47:30 +0200ddellacosta(~ddellacos@143.244.47.100) (Ping timeout: 256 seconds)
2022-08-18 14:49:34 +0200ddellacosta(~ddellacos@143.244.47.71)
2022-08-18 14:51:24 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-08-18 14:57:52 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 14:58:19 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 15:01:38 +0200yvan-sraka(~yvan-srak@37.171.140.201) (Remote host closed the connection)
2022-08-18 15:02:17 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 15:02:44 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
2022-08-18 15:03:31 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net) (Ping timeout: 248 seconds)
2022-08-18 15:03:53 +0200dsrt^(~dsrt@50.236.139.178)
2022-08-18 15:03:59 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-08-18 15:05:22 +0200nate4(~nate@98.45.169.16)
2022-08-18 15:06:18 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 15:10:27 +0200nate4(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-08-18 15:13:59 +0200Alex_test(~al_test@94.233.241.197) (Quit: ;-)
2022-08-18 15:16:22 +0200AlexZenon(~alzenon@94.233.241.197) (Quit: ;-)
2022-08-18 15:17:11 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-08-18 15:17:27 +0200AlexNoo(~AlexNoo@94.233.241.197) (Quit: Leaving)
2022-08-18 15:19:18 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 15:21:58 +0200mikoto-chan(~mikoto-ch@164.5.249.78)
2022-08-18 15:25:04 +0200Everything(~Everythin@37.115.210.35) ()
2022-08-18 15:25:05 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-08-18 15:25:20 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-08-18 15:26:31 +0200xff0x(~xff0x@2405:6580:b080:900:1c9b:f65e:b2b1:c205)
2022-08-18 15:27:34 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net)
2022-08-18 15:28:12 +0200ddellacosta(~ddellacos@143.244.47.71) (Ping timeout: 268 seconds)
2022-08-18 15:28:45 +0200AlexNoo(~AlexNoo@94.233.241.197)
2022-08-18 15:28:53 +0200AlexZenon(~alzenon@94.233.241.197)
2022-08-18 15:30:01 +0200ddellacosta(~ddellacos@143.244.47.84)
2022-08-18 15:31:37 +0200Alex_test(~al_test@94.233.241.197)
2022-08-18 15:32:47 +0200dsrt^(~dsrt@50.236.139.178) (Ping timeout: 252 seconds)
2022-08-18 15:32:53 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-08-18 15:33:13 +0200 <dminuoso> qrpnxz: Yes its my bottleneck.
2022-08-18 15:33:52 +0200 <dminuoso> I think Ill go the road of unsafely constructing a bytearray
2022-08-18 15:34:34 +0200 <dminuoso> THat might be a good reason to go to text-2.0, as I can simply reuse the buffer since its UTF8 now
2022-08-18 15:34:49 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 15:38:24 +0200SixDuce(~SixDuce@92.40.185.179.threembb.co.uk) (Remote host closed the connection)
2022-08-18 15:38:29 +0200coot(~coot@213.134.176.158)
2022-08-18 15:40:00 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-08-18 15:41:10 +0200 <dminuoso> For a few reasons it would be wonderful to have the text Stream mechanism for ByteString :(
2022-08-18 15:41:49 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 15:47:05 +0200dsrt^(~dsrt@50.236.139.178)
2022-08-18 15:47:15 +0200dsrt^(~dsrt@50.236.139.178) (Remote host closed the connection)
2022-08-18 15:49:37 +0200 <tomsmeding> dminuoso: that validation is slower than the case mapping?
2022-08-18 15:50:06 +0200 <tomsmeding> I guess it's possible -- case mapping can be vectorised -- but I would be (positively) surprised if GHC manages to do that vectorisation in a useful manner
2022-08-18 15:52:03 +0200xff0x(~xff0x@2405:6580:b080:900:1c9b:f65e:b2b1:c205) (Ping timeout: 248 seconds)
2022-08-18 15:52:27 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net)
2022-08-18 15:52:40 +0200jakalx(~jakalx@base.jakalx.net)
2022-08-18 15:56:27 +0200 <dminuoso> tomsmeding: The thing is, right now Im using text builders to construct chunks together from bytestring
2022-08-18 15:56:28 +0200ystael(~ystael@user/ystael)
2022-08-18 15:56:42 +0200 <dminuoso> Background is, I have lists of bytestrings that represent domain names, and Im rewriting a pretty printer for these domains
2022-08-18 15:57:02 +0200 <dminuoso> (that is, each list is a domain, where an item represents an individual domain label)
2022-08-18 15:57:13 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2022-08-18 15:57:21 +0200 <dminuoso> Im trying to find the fastest possible way to turn them into Text for presentation
2022-08-18 15:58:32 +0200 <dminuoso> In that process there's a bit of escaping going on, so ideally I would want to stream all bytes, mapping them into one or multiple other bytes
2022-08-18 15:58:46 +0200 <dminuoso> Very much similar to how `caseConvert` works in `text`
2022-08-18 15:59:17 +0200 <dminuoso> Roughly 40% of my entire program time is spent in pprDomain
2022-08-18 15:59:22 +0200 <tomsmeding> ._.
2022-08-18 16:00:14 +0200 <tomsmeding> if this process really takes 40% of your entire program time, I would drop down into the lowest level loop possible
2022-08-18 16:00:46 +0200 <tomsmeding> interesting problem to have though!
2022-08-18 16:01:21 +0200 <tomsmeding> might even try to write it in C, but I'm never sure about the overhead of a C FFI call in haskell
2022-08-18 16:01:51 +0200 <dminuoso> Just slap `unsafe` on it without giving it a thought. Most FFI users on hackage do this too!
2022-08-18 16:01:54 +0200 <geekosaur> very low if it's "unsafe"
2022-08-18 16:01:57 +0200 <tomsmeding> :p
2022-08-18 16:02:31 +0200 <dminuoso> To me the word `unsafe` always suggested that it improved safety, a kind of "this ffi is unsafe, please be extra careful" :)
2022-08-18 16:02:46 +0200 <geekosaur> yeh, that confused me at first as well
2022-08-18 16:03:17 +0200mastarija(~mastarija@2a05:4f46:e03:6000:d321:6dad:692e:8acc)
2022-08-18 16:03:24 +0200 <dminuoso> tomsmeding: I think an alternate solution might be using `bytebuild` (which happens to be in my transitive dependency tree already)
2022-08-18 16:03:52 +0200 <dminuoso> Or maybe I should just directly build a byte array!
2022-08-18 16:04:00 +0200 <dminuoso> Huh. That might actually be the smartest thing to do.
2022-08-18 16:04:24 +0200 <tomsmeding> not sure what it entails, but "directly building a byte array" sounds like a good thing to do :p
2022-08-18 16:04:48 +0200 <tomsmeding> if you end up wanting to try the FFI approach, I'd be interested in writing some SIMD code for it
2022-08-18 16:04:49 +0200 <dminuoso> I would just foldM over the bytes in the bytestring, and manipulate the bytearray inside ST?
2022-08-18 16:05:12 +0200 <tomsmeding> I tried mutably updating vectors in ST before and it was very slow, multiple times slower than a tight C loop
2022-08-18 16:05:16 +0200 <tomsmeding> but maybe I did it the wrong way
2022-08-18 16:05:22 +0200 <tomsmeding> (I probably did)
2022-08-18 16:06:18 +0200 <raehik> What's the recommended CPP way to determine if the target arch is Windows? I have an `#if mingw32_HOST_OS` floating around, but I feel that might not be best
2022-08-18 16:06:42 +0200 <tomsmeding> isn't there just a WINDOWS define? perhaps __WINDOWS__?
2022-08-18 16:06:57 +0200 <tomsmeding> ah no, _WIN32
2022-08-18 16:07:00 +0200 <mastarija> does anyone know if there's some servant proxying library? Basically, I want to define a raw endpoint e.g. newserver.com/old/api/under/new/url/xxxxx and have servant pass the request to the oldserver.com/xxxxx
2022-08-18 16:07:40 +0200 <raehik> tomsmeding: yesss I think I've seen _WIN32 before. going to try that and use it if it works. thanks!
2022-08-18 16:08:23 +0200 <tomsmeding> raehik: in case some time in the future you forget and want to ask again: https://duckduckgo.com/?q=cpp+detect+windows
2022-08-18 16:08:24 +0200 <tomsmeding> ;)
2022-08-18 16:09:07 +0200 <raehik> Oh! you got me I was thinking too narrowly, assuming it might be Haskell-specific
2022-08-18 16:09:14 +0200 <tomsmeding> nah cpp is cpp
2022-08-18 16:09:24 +0200 <raehik> googled "haskell CPP windows" and got nothing xd
2022-08-18 16:09:49 +0200 <tomsmeding> that's also the annoying part of it -- cpp doesn't understand haskell syntax, so certain things go wrong subtly if you enable -XCPP :D
2022-08-18 16:10:00 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-08-18 16:10:18 +0200 <geekosaur> and it's worse on os x because it understands ANSI C syntax instead
2022-08-18 16:10:18 +0200 <tomsmeding> also the reason why ghc calls the preprocessor with -traditional, apparently that reduces the amount of shenanigans
2022-08-18 16:11:55 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-18 16:12:29 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 16:13:26 +0200Furor(~colere@about/linux/staff/sauvin) (Remote host closed the connection)
2022-08-18 16:14:17 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
2022-08-18 16:14:42 +0200Furor(~colere@about/linux/staff/sauvin)
2022-08-18 16:16:04 +0200yvan-sraka(~yvan-srak@37.166.167.112)
2022-08-18 16:17:32 +0200FurorColere
2022-08-18 16:17:34 +0200marquis_andras(~marquis_a@27-32-245-27.tpgi.com.au) (Ping timeout: 268 seconds)
2022-08-18 16:17:46 +0200 <merijn> the problem is that CPP is fundamentally incompatible with haskell code
2022-08-18 16:18:12 +0200 <merijn> To the point that GHC resorts to using non-standard legacy CPP modes to get behaviour that somewhat resembles "working"
2022-08-18 16:18:25 +0200 <tomsmeding> the -traditional that I mentioned
2022-08-18 16:18:27 +0200 <c_wraith> the thing that seems to cause the most problems is '
2022-08-18 16:18:41 +0200 <merijn> raehik: Hold on, I think I can dramatically simplify your problem
2022-08-18 16:18:44 +0200 <c_wraith> CPP assumes it only appears inside quoted strings or as char literals
2022-08-18 16:19:00 +0200 <merijn> raehik: You can have cabal detect windows and define your own CPP value and check that
2022-08-18 16:19:03 +0200 <merijn> Much simpler
2022-08-18 16:19:45 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-08-18 16:20:03 +0200 <raehik> hm! cool. I want to be lazy for this occassion because it's a testing bug not a program one
2022-08-18 16:20:06 +0200 <merijn> raehik: Just have a conditional on the OS in the cabal file that does "ghc-options: -DWINDOWS=1" (or whatever)
2022-08-18 16:20:35 +0200 <merijn> Since option fields are monoidal you can just use cabal to conditionally append that based on the OS
2022-08-18 16:20:36 +0200 <tomsmeding> isn't the syntax `if os(windows):` or something?
2022-08-18 16:20:42 +0200 <merijn> tomsmeding: Something like that, yeah
2022-08-18 16:20:50 +0200ec(~ec@gateway/tor-sasl/ec) (Quit: ec)
2022-08-18 16:20:51 +0200 <merijn> Consult cabal docs for exact details
2022-08-18 16:20:55 +0200 <tomsmeding> ah without the :
2022-08-18 16:21:09 +0200 <tomsmeding> search for "OS Specific" here https://hackage.haskell.org/package/base-4.17.0.0/base.cabal
2022-08-18 16:23:05 +0200shriekingnoise(~shrieking@186.137.167.202)
2022-08-18 16:23:11 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:d8c8:b9a1:a839:9254) (Quit: WeeChat 2.8)
2022-08-18 16:24:11 +0200marquis_andras(~marquis_a@27-33-131-201.tpgi.com.au)
2022-08-18 16:25:15 +0200 <raehik> fab, bookmarked
2022-08-18 16:26:04 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-18 16:26:53 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-18 16:32:17 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-08-18 16:33:34 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
2022-08-18 16:40:16 +0200zebrag(~chris@user/zebrag)
2022-08-18 16:41:38 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-08-18 16:43:05 +0200yvan-sraka(~yvan-srak@37.166.167.112) (Remote host closed the connection)
2022-08-18 16:44:29 +0200zaquest(~notzaques@5.130.79.72)
2022-08-18 16:44:38 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 16:45:36 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl) (Remote host closed the connection)
2022-08-18 16:49:03 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2022-08-18 16:49:06 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 16:50:00 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 16:54:26 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 17:02:01 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 17:06:57 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 17:06:59 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.6)
2022-08-18 17:07:43 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-08-18 17:09:16 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 17:09:23 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 17:09:55 +0200acidjnk_new(~acidjnk@p200300d6e7137a5770c6fecd35188867.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-08-18 17:10:09 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 17:23:21 +0200Vajb(~Vajb@2001:999:705:3c86:e7ea:442b:1e01:22d8) (Read error: Connection reset by peer)
2022-08-18 17:23:29 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-08-18 17:24:19 +0200ddellacosta(~ddellacos@143.244.47.84) (Ping timeout: 248 seconds)
2022-08-18 17:25:58 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 17:26:10 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 17:26:11 +0200ddellacosta(~ddellacos@89.45.224.125)
2022-08-18 17:26:40 +0200Topsi(~Topsi@dyndsl-095-033-089-069.ewe-ip-backbone.de)
2022-08-18 17:28:00 +0200jakalx(~jakalx@base.jakalx.net)
2022-08-18 17:28:13 +0200johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
2022-08-18 17:31:25 +0200CiaoSen(~Jura@p200300c95738a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
2022-08-18 17:33:03 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 17:38:38 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 17:42:36 +0200ddellacosta(~ddellacos@89.45.224.125) (Ping timeout: 256 seconds)
2022-08-18 17:44:33 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 17:44:38 +0200ddellacosta(~ddellacos@143.244.47.84)
2022-08-18 17:45:19 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 17:46:39 +0200kuribas(~user@silversquare.silversquare.eu) (Read error: Connection reset by peer)
2022-08-18 17:46:50 +0200 <tomsmeding> geekosaur: I may well remember incorrectly, but I think it was you who asked for less clicks for saving files on the playground; there's less clicks now! https://play-haskell.tomsmeding.com
2022-08-18 17:46:53 +0200kuribas(~user@silversquare.silversquare.eu)
2022-08-18 17:47:13 +0200 <geekosaur> I did, yes.
2022-08-18 17:47:40 +0200 <tomsmeding> funny how posting a link here on irc gets you a bunch of Lounge requests :p https://tomsmeding.com/ss/get/tomsmeding/nFdP7v
2022-08-18 17:47:41 +0200chele(~chele@user/chele) (Quit: Leaving)
2022-08-18 17:47:56 +0200 <tomsmeding> geekosaur: the alert() is kinda clunky, was too lazy to make it do something nicer
2022-08-18 17:48:11 +0200 <tomsmeding> the whole backend has been rewritten as well, but the user sees little of that :)
2022-08-18 17:48:35 +0200 <tomsmeding> it's now horizontally scalable, i.e. I can spin up another worker server and attach it to this thing at will
2022-08-18 17:52:14 +0200ddellacosta(~ddellacos@143.244.47.84) (Ping timeout: 256 seconds)
2022-08-18 17:53:58 +0200ddellacosta(~ddellacos@89.45.224.177)
2022-08-18 17:57:59 +0200 <tomsmeding> other misc improvement: GHC output is now shown also if the program successfully compiled, so {-# OPTIONS -Wall #-} actually does something now
2022-08-18 17:59:29 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-08-18 18:00:06 +0200coltenwebb[m](~coltenweb@2001:470:69fc:105::2:17c7) (Quit: You have been kicked for being idle)
2022-08-18 18:10:47 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 18:12:27 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 18:12:53 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 18:14:42 +0200nate4(~nate@98.45.169.16)
2022-08-18 18:19:47 +0200nate4(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-08-18 18:19:47 +0200ryantrinkle(~ryan@209.91.209.121) (Read error: Connection reset by peer)
2022-08-18 18:22:37 +0200acidjnk_new(~acidjnk@p200300d6e7137a5105821a742c1d7cd6.dip0.t-ipconnect.de)
2022-08-18 18:25:29 +0200jgeerds(~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 252 seconds)
2022-08-18 18:25:38 +0200mmhat(~mmh@p200300f1c7086062ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-08-18 18:27:50 +0200FragByte(~christian@user/fragbyte) (Quit: Quit)
2022-08-18 18:29:49 +0200FragByte(~christian@user/fragbyte)
2022-08-18 18:30:52 +0200kuribas(~user@silversquare.silversquare.eu) (Remote host closed the connection)
2022-08-18 18:33:22 +0200 <qrpnxz> looks like zero-copy utf-8 stream parser working now :D
2022-08-18 18:33:32 +0200_xor(~xor@74.215.182.83)
2022-08-18 18:33:40 +0200vglfr(~vglfr@145.224.94.248) (Read error: Connection reset by peer)
2022-08-18 18:33:44 +0200 <qrpnxz> takes about 80% the time as the copying one
2022-08-18 18:34:33 +0200vglfr(~vglfr@145.224.94.248)
2022-08-18 18:35:06 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-18 18:35:08 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-18 18:39:13 +0200ryantrinkle(~ryan@2607:f00:3:14c0:7c6b:7160:d1ff:3f7)
2022-08-18 18:41:19 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 18:41:20 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 18:46:25 +0200stef204(~stef204@user/stef204)
2022-08-18 18:48:10 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-18 18:48:40 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 18:50:36 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-08-18 18:52:43 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-08-18 18:56:51 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-08-18 18:57:28 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-08-18 18:57:47 +0200benin0(~benin@183.82.27.55) (Quit: The Lounge - https://thelounge.chat)
2022-08-18 18:58:45 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 19:02:51 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
2022-08-18 19:05:13 +0200econo(uid147250@user/econo)
2022-08-18 19:06:37 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-18 19:07:06 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 19:07:42 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-08-18 19:07:53 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-08-18 19:09:01 +0200MajorBiscuit(~MajorBisc@c-001-019-012.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.5)
2022-08-18 19:11:25 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 19:11:40 +0200freemint(~freemint@2001:638:904:ffe8:339b:2f0c:7daf:5607)
2022-08-18 19:14:49 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-08-18 19:15:47 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds)
2022-08-18 19:16:01 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-08-18 19:18:58 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 19:20:09 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-18 19:20:54 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-18 19:23:57 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 19:26:18 +0200biberu(~biberu@user/biberu)
2022-08-18 19:27:12 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 19:28:36 +0200yvan-sraka(~yvan-srak@2a0d:e487:43f:ef01:360:ba9b:e406:79e4)
2022-08-18 19:35:21 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 19:35:22 +0200yvan-sraka(~yvan-srak@2a0d:e487:43f:ef01:360:ba9b:e406:79e4) (Remote host closed the connection)
2022-08-18 19:35:57 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 256 seconds)
2022-08-18 19:38:20 +0200Pickchea(~private@user/pickchea)
2022-08-18 19:38:50 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-08-18 19:39:47 +0200ryantrinkle(~ryan@2607:f00:3:14c0:7c6b:7160:d1ff:3f7) (Ping timeout: 248 seconds)
2022-08-18 19:40:37 +0200ryantrinkle(~ryan@2607:f00:3:14c0:7c6b:7160:d1ff:3f7)
2022-08-18 19:40:50 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e)
2022-08-18 19:41:04 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Client Quit)
2022-08-18 19:41:46 +0200gmg(~user@user/gehmehgeh)
2022-08-18 19:44:42 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
2022-08-18 19:44:43 +0200vglfr(~vglfr@145.224.94.248) (Read error: Connection reset by peer)
2022-08-18 19:44:49 +0200etra0(~quassel@186-78-151-203.baf.movistar.cl)
2022-08-18 19:45:33 +0200vglfr(~vglfr@145.224.94.248)
2022-08-18 19:51:23 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 19:52:08 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 19:57:28 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-08-18 20:01:59 +0200mastarija(~mastarija@2a05:4f46:e03:6000:d321:6dad:692e:8acc) (Quit: WeeChat 3.5)
2022-08-18 20:04:38 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-08-18 20:05:59 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 20:06:21 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 20:06:25 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 20:06:39 +0200Vajb(~Vajb@2001:999:705:3c86:e7ea:442b:1e01:22d8)
2022-08-18 20:07:37 +0200jgeerds(~jgeerds@55d46bad.access.ecotel.net)
2022-08-18 20:13:03 +0200Solid(~slot@xmonad/slotThe)
2022-08-18 20:16:18 +0200 <zzz> tomsmeding: what's a Lounge request?
2022-08-18 20:17:50 +0200 <dminuoso> Mmm, Im experience some weird bugs with pattern synonyms breaking interference,.
2022-08-18 20:18:43 +0200malte(~malte@mal.tc) (Ping timeout: 248 seconds)
2022-08-18 20:19:42 +0200 <Solid> When defining e.g. an IsString instance for some type function, why do I have to write `instance x ~ Text => IsString (F x)` instead of `instance IsString (F Text)`? To my mind, the latter is just a reformulation of the former
2022-08-18 20:20:01 +0200malte(~malte@mal.tc)
2022-08-18 20:21:03 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-18 20:21:06 +0200 <geekosaur> zzz, TheLoungs is another front-end for IRC (like Matrix)
2022-08-18 20:21:10 +0200 <geekosaur> *TheLounge
2022-08-18 20:21:24 +0200 <geekosaur> among other things clients fetch url previews automatically
2022-08-18 20:21:40 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-18 20:21:44 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net) (Quit: WeeChat 3.5)
2022-08-18 20:21:45 +0200 <geekosaur> Solid, did you enable FlexibleInstances?
2022-08-18 20:21:50 +0200 <dminuoso> This is the code in question, along with the diagnostic, and the result of adding :: _ to two separate places: https://gist.github.com/dminuoso/411af42513c3c97cdbd772de63fff805
2022-08-18 20:22:23 +0200 <geekosaur> technically a type variable is required, not a concrete type, in instance declarations
2022-08-18 20:22:32 +0200 <dminuoso> Before BS used the pattern synonym this would infer just fine. Adding an explicit type ascription helps
2022-08-18 20:22:36 +0200 <Solid> geekosaur: yes; it compiles but then complains about an ambiguous type variable (despite giving me only one possible instance)
2022-08-18 20:22:40 +0200 <geekosaur> that said, there are some ramifications that make the two not quite identical
2022-08-18 20:23:00 +0200 <dminuoso> Im utterly confused how GHC can correctly infer `ptr :: Ptr Word8` but not `plusPtr ptr off`
2022-08-18 20:23:12 +0200nattiestnate(~nate@180.243.14.130) (Quit: WeeChat 3.6)
2022-08-18 20:24:15 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 20:26:21 +0200 <dminuoso> Solid: It can greatly improve inferred types in some situations
2022-08-18 20:27:49 +0200stef204(~stef204@user/stef204) (Quit: WeeChat 3.6)
2022-08-18 20:28:51 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-08-18 20:29:58 +0200 <dminuoso> Solid: https://gist.github.com/dminuoso/411af42513c3c97cdbd772de63fff805 is a nice and brief example of how this might work out.
2022-08-18 20:30:14 +0200 <dminuoso> Is F, by any chance, a type family?
2022-08-18 20:32:03 +0200 <Solid> no it's just a normal Type -> Type data type
2022-08-18 20:32:17 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 20:32:24 +0200 <dminuoso> Just wondering because you said "for some type function" :)
2022-08-18 20:33:00 +0200 <Solid> Type -> Type is a type function, isn't it? :>
2022-08-18 20:33:07 +0200 <dminuoso> Hold on now.
2022-08-18 20:33:45 +0200 <dminuoso> I guess it is *shrugs*
2022-08-18 20:35:50 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 20:38:11 +0200Inst(~Inst@2601:6c4:4080:3f80:e0a9:7049:576:28ef) (Read error: Connection reset by peer)
2022-08-18 20:38:31 +0200Inst(~Inst@2601:6c4:4080:3f80:8497:52c0:a7ea:bbfa)
2022-08-18 20:39:59 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 20:44:35 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 268 seconds)
2022-08-18 20:48:31 +0200 <[Leary]> dminuoso: Just looking at the types of `plusPtr` and `copyPtrToMutableByteArray`, it seems pretty clear why the type is ambiguous. If it were inferred, that would suggest some kind of defaulting for `Prim` (which may or may not exist, I don't know).
2022-08-18 20:51:41 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 20:53:01 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 20:56:24 +0200alphabeta(~kilolympu@90.206.106.191) (Ping timeout: 256 seconds)
2022-08-18 20:56:26 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:be19:499e:afb3:a829)
2022-08-18 20:56:56 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 21:00:34 +0200kilolympus(~kilolympu@90.206.106.191)
2022-08-18 21:01:50 +0200beteigeuze(~Thunderbi@168.182.177.239)
2022-08-18 21:04:52 +0200 <zzz> can i have data declarations inside where clauses?
2022-08-18 21:05:59 +0200 <zzz> i was under the impression we could but maybe i'm mistaken?
2022-08-18 21:06:44 +0200 <int-e> We can't. There may be a language proposal for that somewhere.
2022-08-18 21:06:46 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-18 21:07:05 +0200 <int-e> well, except for type classes, which technically have where clauses
2022-08-18 21:07:48 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-18 21:07:55 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 21:08:01 +0200 <int-e> (but of a different kind then the ones for bindings)
2022-08-18 21:08:36 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-18 21:09:00 +0200 <zzz> yeah...
2022-08-18 21:10:09 +0200 <tomsmeding> zzz: what geekosaur said
2022-08-18 21:12:11 +0200 <geekosaur> I noticed Matrix only downloaded it once and sent it to all clients (see "Synapse")
2022-08-18 21:14:11 +0200kilolympus(~kilolympu@90.206.106.191) (Ping timeout: 248 seconds)
2022-08-18 21:15:16 +0200kilolympus(~kilolympu@90.206.106.191)
2022-08-18 21:17:55 +0200 <tomsmeding> geekosaur: I guess it might be every client, but then why are the top two hits ( https://tomsmeding.com/ss/get/tomsmeding/nFdP7v ) from the same IP?
2022-08-18 21:17:59 +0200 <tomsmeding> two clients in the same subnet?
2022-08-18 21:18:37 +0200 <geekosaur> huh, that's odd
2022-08-18 21:19:08 +0200pavonia(~user@user/siracusa)
2022-08-18 21:20:43 +0200 <geekosaur> it might be two from the same IP, at that, considering how I use matrix
2022-08-18 21:21:05 +0200 <geekosaur> (so right now I'll appear as two clients from the same IP, one being my phone on wifi)
2022-08-18 21:21:15 +0200 <tomsmeding> geekosaur: my reverse proxy (caddy) logs more info, and it seems the two requests are identical apart from the Accept-Language headers
2022-08-18 21:21:32 +0200 <geekosaur> (but one is hexchat and the other Element)
2022-08-18 21:21:48 +0200 <tomsmeding> one (the first) has 'cs-CZ,cs;q=0.9', while the other has 'en-US,en;q=0.9,cs;q=0.8'
2022-08-18 21:22:17 +0200 <tomsmeding> perhaps phone (in czech) and desktop (in english) of the same person?
2022-08-18 21:22:27 +0200 <geekosaur> maybe
2022-08-18 21:22:41 +0200 <tomsmeding> it almost feels like this is too much info to store about people even
2022-08-18 21:22:55 +0200 <geekosaur> looks like the other lounge hits all have distinct IPs from a quick look
2022-08-18 21:23:01 +0200 <tomsmeding> seems so
2022-08-18 21:29:07 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
2022-08-18 21:30:08 +0200tobyGuest7711
2022-08-18 21:30:08 +0200Guest7711(~toby@137.220.84.171) (Killed (calcium.libera.chat (Nickname regained by services)))
2022-08-18 21:30:21 +0200toby_(~toby@137.220.84.171)
2022-08-18 21:31:24 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-08-18 21:33:29 +0200Topsi(~Topsi@dyndsl-095-033-089-069.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-08-18 21:33:50 +0200beteigeuze(~Thunderbi@168.182.177.239) (Quit: beteigeuze)
2022-08-18 21:33:55 +0200hellwolf(~hellwolf@7-41-50-84.sta.estpak.ee) (Ping timeout: 268 seconds)
2022-08-18 21:34:05 +0200beteigeuze(~Thunderbi@168.182.177.239)
2022-08-18 21:34:08 +0200 <qrpnxz> i change a data structure to see if i can make it better, it benches a little slower. Okay, but i made a few changes so i revert them one by one to see which is the slow one. I end up reverting to exactly the same data structure, but now benches slower than the original (identical) structure. Me: 😐. Clearly changing the name tells ghc to compile worse code?
2022-08-18 21:34:32 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-18 21:34:56 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-18 21:35:06 +0200 <qrpnxz> and the original structure is in another module, so if anything *that* should be slower :/
2022-08-18 21:35:19 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:be19:499e:afb3:a829) (Quit: WeeChat 2.8)
2022-08-18 21:36:26 +0200stef204(~stef204@user/stef204)
2022-08-18 21:39:43 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-18 21:46:16 +0200beteigeuze(~Thunderbi@168.182.177.239) (Ping timeout: 256 seconds)
2022-08-18 21:52:13 +0200hippoid(~idris@c-98-220-13-8.hsd1.il.comcast.net)
2022-08-18 21:53:41 +0200fserucas|eod(~fserucas|@46.50.4.9) (Quit: Leaving)
2022-08-18 21:56:21 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-18 21:58:00 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl)
2022-08-18 22:01:49 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl) (Remote host closed the connection)
2022-08-18 22:07:14 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
2022-08-18 22:08:22 +0200mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 256 seconds)
2022-08-18 22:10:38 +0200ddellacosta(~ddellacos@89.45.224.177) (Ping timeout: 256 seconds)
2022-08-18 22:10:46 +0200ccntrq(~Thunderbi@172.209.94.92.rev.sfr.net) (Read error: Connection reset by peer)
2022-08-18 22:15:50 +0200zeenk(~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!)
2022-08-18 22:16:04 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 22:16:11 +0200nate4(~nate@98.45.169.16)
2022-08-18 22:17:39 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
2022-08-18 22:21:15 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-18 22:21:16 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 244 seconds)
2022-08-18 22:21:22 +0200nate4(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-08-18 22:25:11 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy)
2022-08-18 22:25:36 +0200stef204(~stef204@user/stef204) (Quit: WeeChat 3.6)
2022-08-18 22:31:22 +0200etra0(~quassel@186-78-151-203.baf.movistar.cl) (Remote host closed the connection)
2022-08-18 22:31:51 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
2022-08-18 22:33:24 +0200stef204(~stef204@user/stef204)
2022-08-18 22:33:47 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 22:34:34 +0200 <zzz> i'm going to state the obvious, but something changed
2022-08-18 22:35:56 +0200geekosaurwonders about alignment and/or what's in the info table
2022-08-18 22:36:53 +0200coot(~coot@213.134.176.158)
2022-08-18 22:37:11 +0200ddellacosta(~ddellacos@86.106.143.177)
2022-08-18 22:37:54 +0200king_gs(~Thunderbi@2806:103e:29:da7a:dcd8:4aff:49f5:5eec)
2022-08-18 22:40:04 +0200 <darkling> Or the benchmarking fixture is more variable than expected.
2022-08-18 22:40:23 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-18 22:41:47 +0200ddellacosta(~ddellacos@86.106.143.177) (Ping timeout: 252 seconds)
2022-08-18 22:43:30 +0200ddellacosta(~ddellacos@143.244.47.84)
2022-08-18 22:44:51 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds)
2022-08-18 22:46:25 +0200stef204(~stef204@user/stef204) (Quit: WeeChat 3.6)
2022-08-18 22:46:54 +0200bgamari(~bgamari@64.223.226.174) (Ping timeout: 256 seconds)
2022-08-18 22:48:18 +0200bgamari(~bgamari@64.223.169.142)
2022-08-18 22:49:07 +0200ddellacosta(~ddellacos@143.244.47.84) (Ping timeout: 268 seconds)
2022-08-18 22:50:52 +0200ddellacosta(~ddellacos@89.45.224.86)
2022-08-18 22:51:14 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl)
2022-08-18 22:53:32 +0200zeenk(~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f)
2022-08-18 22:56:31 +0200drlkf(~drlkf@drlkf.net) (Quit: drlkf)
2022-08-18 22:57:59 +0200 <NemesisD> in `foo = Foo { foo_name = ??? }` is there something i could fill in for `???` that would get the name of the binding its in, `foo`?
2022-08-18 22:58:58 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-18 22:59:06 +0200 <geekosaur> bindings are usually recursive, so if you're careful `foo` should work
2022-08-18 22:59:32 +0200mikoto-chan(~mikoto-ch@mobile-access-bceefe-131.dhcp.inet.fi)
2022-08-18 22:59:47 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl) (Remote host closed the connection)
2022-08-18 23:00:00 +0200 <geekosaur> there's no generic thing like `this` in some OO languages though
2022-08-18 23:01:23 +0200merijn(~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-08-18 23:01:46 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl)
2022-08-18 23:02:29 +0200 <NemesisD> yeah i figured this would need TH or somehting. in other words how could i write the function `myName` such that i could do `foo = let name = $(myName) in Foo { foo_name = name, ... }` and reuse it
2022-08-18 23:03:27 +0200 <geekosaur> I think TH would stop you because of binding groups?
2022-08-18 23:03:40 +0200 <geekosaur> maybe not
2022-08-18 23:04:02 +0200 <NemesisD> i don't even know what that is lol
2022-08-18 23:04:02 +0200alternateved(~user@staticline-31-183-146-203.toya.net.pl) (Remote host closed the connection)
2022-08-18 23:04:21 +0200 <geekosaur> oh, you want the binding name as a String, don't you? not sure how you'd do that in TH
2022-08-18 23:04:35 +0200 <geekosaur> I suspect you'd have only an internal identifier at that point
2022-08-18 23:05:17 +0200 <NemesisD> yeah exactly. ok. i'm not committed to using TH for it specifically but i assume there isn't another way either?
2022-08-18 23:05:54 +0200biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2022-08-18 23:06:00 +0200 <geekosaur> I don't think there is
2022-08-18 23:06:12 +0200 <geekosaur> unless there's some hack involving quasiquoters
2022-08-18 23:06:35 +0200 <NemesisD> fair enough. i can just type it manually.
2022-08-18 23:07:29 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 23:08:04 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 23:08:35 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Quit: WeeChat 3.5)
2022-08-18 23:08:38 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-08-18 23:12:12 +0200drlkf_(~drlkf@chat.drlkf.net) (Quit: drlkf_)
2022-08-18 23:12:31 +0200drlkf(~drlkf@chat.drlkf.net)
2022-08-18 23:12:37 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-08-18 23:13:21 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 23:13:29 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
2022-08-18 23:16:49 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-08-18 23:17:23 +0200ddellacosta(~ddellacos@89.45.224.86) (Ping timeout: 248 seconds)
2022-08-18 23:17:48 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
2022-08-18 23:19:34 +0200ddellacosta(~ddellacos@143.244.47.100)
2022-08-18 23:20:44 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-18 23:20:53 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 23:21:23 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 23:22:43 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-08-18 23:22:49 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
2022-08-18 23:23:13 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-08-18 23:23:31 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
2022-08-18 23:23:41 +0200drlkf(~drlkf@chat.drlkf.net) (Quit: drlkf)
2022-08-18 23:23:59 +0200drlkf(~drlkf@chat.drlkf.net)
2022-08-18 23:24:09 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-08-18 23:24:20 +0200kilolympus(~kilolympu@90.206.106.191) (Quit: See you later! :))
2022-08-18 23:32:46 +0200zeenk(~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!)
2022-08-18 23:35:19 +0200king_gs(~Thunderbi@2806:103e:29:da7a:dcd8:4aff:49f5:5eec) (Quit: king_gs)
2022-08-18 23:37:05 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-18 23:41:20 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net)
2022-08-18 23:41:57 +0200king_gs(~Thunderbi@2806:103e:29:da7a:dcd8:4aff:49f5:5eec)
2022-08-18 23:41:57 +0200king_gs(~Thunderbi@2806:103e:29:da7a:dcd8:4aff:49f5:5eec) (Client Quit)
2022-08-18 23:44:29 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 23:45:28 +0200kannon(~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
2022-08-18 23:46:20 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-18 23:46:46 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-18 23:47:45 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
2022-08-18 23:50:59 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-18 23:53:34 +0200matthewmosior(~matthewmo@173.170.253.91) (Remote host closed the connection)
2022-08-18 23:53:41 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-18 23:54:20 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-08-18 23:57:13 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr)
2022-08-18 23:58:23 +0200k8yun(~k8yun@user/k8yun)