2023-06-28 00:00:16 +0200 | smoge | (~smoge@2603-7000-4b42-1100-a4e2-7fcb-30b3-1956.res6.spectrum.com) |
2023-06-28 00:01:10 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 258 seconds) |
2023-06-28 00:03:09 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-06-28 00:07:32 +0200 | acidjnk | (~acidjnk@p200300d6e7072f30f5f19602a84c17f0.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2023-06-28 00:11:40 +0200 | hisa38 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Quit: The Lounge - https://thelounge.chat) |
2023-06-28 00:11:53 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 00:12:13 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 00:14:32 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-28 00:15:00 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2023-06-28 00:15:32 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds) |
2023-06-28 00:16:34 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 00:19:26 +0200 | michalz | (~michalz@185.246.207.221) (Remote host closed the connection) |
2023-06-28 00:20:02 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 00:23:06 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-06-28 00:23:52 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 00:24:14 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 00:26:09 +0200 | <nick__> | I'm trying to play around with Aeson and parsing json. One of the issues I'm having is making these types reasonably polymorphic. My first idea was to take a string that was to be parsed into JSON--or encoded to json--(but may be malformed or something) into its own type using the type keyword, but then instances of String is also of the JsonType. How can I use newtype with JsonType to be |
2023-06-28 00:26:10 +0200 | <nick__> | recognized with any function of the String type (either by casting it or whatever), I understand about using deriving and type classes, but I'm looking for JsonType to be a subset of String, but I don't even know if this is possible. |
2023-06-28 00:26:18 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-167-060.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-06-28 00:28:01 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-28 00:30:00 +0200 | ncf | . o O ( https://reasonablypolymorphic.com ) |
2023-06-28 00:30:27 +0200 | azimut_ | (~azimut@gateway/tor-sasl/azimut) |
2023-06-28 00:31:28 +0200 | Pickchea | (~private@user/pickchea) (Client Quit) |
2023-06-28 00:31:55 +0200 | <ncf> | i don't understand the question |
2023-06-28 00:32:23 +0200 | Square2 | (~Square@user/square) (Ping timeout: 264 seconds) |
2023-06-28 00:32:32 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-06-28 00:33:08 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Remote host closed the connection) |
2023-06-28 00:33:30 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 00:33:46 +0200 | <monochrom> | The "type" keyword totally does not mean its own type. |
2023-06-28 00:34:02 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-06-28 00:34:16 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 00:34:35 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 00:34:41 +0200 | <monochrom> | What is "JsonType"? |
2023-06-28 00:35:18 +0200 | <monochrom> | This is what's wrong with natural language and why one posts actual code. |
2023-06-28 00:36:53 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
2023-06-28 00:38:57 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2023-06-28 00:40:36 +0200 | tom_ | (~tom@host81-151-255-71.range81-151.btcentralplus.com) |
2023-06-28 00:41:11 +0200 | tom__ | (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Read error: Connection reset by peer) |
2023-06-28 00:41:41 +0200 | me-the-fl00f | (~me-the-fl@62.240.154.125) |
2023-06-28 00:44:59 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 264 seconds) |
2023-06-28 00:45:51 +0200 | me-the-fl00f | (~me-the-fl@62.240.154.125) (Quit: me-the-fl00f) |
2023-06-28 00:46:40 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2023-06-28 00:48:04 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 00:48:25 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 00:49:59 +0200 | <chromoblob> | uncomputable reals don't exist |
2023-06-28 00:50:23 +0200 | peddie | (~peddie@2001:470:69fc:105::25d) |
2023-06-28 00:50:23 +0200 | jean-paul[m] | (~jean-paul@2001:470:69fc:105::d1ab) |
2023-06-28 00:50:30 +0200 | <chromoblob> | prove me wrong |
2023-06-28 00:50:35 +0200 | VarikValefor[m] | (~varikvale@2001:470:69fc:105::a5d) |
2023-06-28 00:51:32 +0200 | siraben | (~siraben@user/siraben) |
2023-06-28 00:51:43 +0200 | bgamari[m] | (~bgamari@2001:470:69fc:105::c7b9) |
2023-06-28 00:51:44 +0200 | supersven[m] | (~supersven@2001:470:69fc:105::31b6) |
2023-06-28 00:52:29 +0200 | geekosaur[m] | (~geekosaur@xmonad/geekosaur) |
2023-06-28 00:52:41 +0200 | joyfulmantis[m] | (~joyfulman@2001:470:69fc:105::3:400a) |
2023-06-28 00:52:53 +0200 | lilpotent_jlemen | (~lilpotent@2001:470:69fc:105::3:6eb6) |
2023-06-28 00:54:32 +0200 | canta1 | (~canta@cvm0.d5k.one) (Quit: WeeChat 3.5) |
2023-06-28 00:54:46 +0200 | canta | (~canta@user/canta) |
2023-06-28 00:55:00 +0200 | Nokurn | (~jeremiah@cpe-76-86-186-227.socal.res.rr.com) |
2023-06-28 00:55:11 +0200 | DustinStiles[m] | (~duwstiles@2001:470:69fc:105::3:699b) |
2023-06-28 00:55:37 +0200 | <monochrom> | You are right. Congrats. |
2023-06-28 00:57:40 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) |
2023-06-28 00:58:33 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 01:02:02 +0200 | <EvanR> | how did we end up with 'type' does not actually create a new type. It's like typedef in C |
2023-06-28 01:02:52 +0200 | <EvanR> | typedef doesn't define a type, sorry. disclaimer you hopefully get when introduced to C |
2023-06-28 01:03:00 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 250 seconds) |
2023-06-28 01:03:32 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-28 01:03:44 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 01:03:50 +0200 | <geekosaur> | "data" defines a type, "type" defines an alias. clear as mud. |
2023-06-28 01:04:01 +0200 | lilpotent_jlemen | (~lilpotent@2001:470:69fc:105::3:6eb6) () |
2023-06-28 01:04:03 +0200 | <c_wraith> | at least newtype defines a new type |
2023-06-28 01:04:04 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:04:06 +0200 | <EvanR> | all that's missing is a keyword alias which defines data |
2023-06-28 01:07:33 +0200 | <hpc> | data is just an instance of a type, so i vote for "type instance" :D |
2023-06-28 01:07:41 +0200 | <monochrom> | This is why SML says "datatype". >:D |
2023-06-28 01:07:42 +0200 | <EvanR> | nick__, you probably don't want to try to setup String to be accept as a JSON value or anything. Instead parse a String to get your desired type or a parse error |
2023-06-28 01:07:42 +0200 | me-the-floof | (~me-the-fl@62.240.154.125) |
2023-06-28 01:08:11 +0200 | <EvanR> | then write your other functions to take your desired type and not String |
2023-06-28 01:08:49 +0200 | me-the-floof | (~me-the-fl@62.240.154.125) (Client Quit) |
2023-06-28 01:10:02 +0200 | <EvanR> | unless you're talking about going the other direction, String -> JSON, which always works |
2023-06-28 01:11:58 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 01:12:20 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:13:57 +0200 | <sm> | @where+ kbin https://kbin.social/m/haskell/newest |
2023-06-28 01:13:57 +0200 | <lambdabot> | Okay. |
2023-06-28 01:14:29 +0200 | <sm> | @where+ lemmy https://lemmy.world/c/haskell@kbin.social/data_type/Post/sort/New/page/1 |
2023-06-28 01:14:29 +0200 | <lambdabot> | It is forever etched in my memory. |
2023-06-28 01:15:05 +0200 | sm[i] | (~smi]@plaintextaccounting/sm) |
2023-06-28 01:15:42 +0200 | dcoutts | (~duncan@79.137.104.194) |
2023-06-28 01:16:12 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-28 01:22:37 +0200 | <EvanR> | (er, thanks to monochrom's notes, I now have to disclaim that infinite Strings can't be JSONed I don't think) |
2023-06-28 01:23:12 +0200 | <EvanR> | (or bottoming Strings) |
2023-06-28 01:23:32 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 245 seconds) |
2023-06-28 01:24:14 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 01:24:21 +0200 | lilpotent_jlemen | (~lilpotent@2001:470:69fc:105::3:6eb6) |
2023-06-28 01:24:38 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:25:05 +0200 | Benzi-Junior | (~BenziJuni@88-149-64-112.du.xdsl.is) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-06-28 01:27:23 +0200 | jmdaemon | (~jmdaemon@user/jmdaemon) |
2023-06-28 01:30:22 +0200 | Benzi-Junior | (~BenziJuni@dsl-149-64-112.hive.is) |
2023-06-28 01:33:29 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 01:33:49 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:35:29 +0200 | Midjak | (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
2023-06-28 01:36:07 +0200 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
2023-06-28 01:38:56 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 01:39:18 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:42:52 +0200 | <dolio> | I suspect some ZFC-definable reals aren't computable. |
2023-06-28 01:43:07 +0200 | <dolio> | I suppose that could be wrong, though. |
2023-06-28 01:43:59 +0200 | <dolio> | Oh, actually, there are examples, aren't there? Like Chaitin's constant? |
2023-06-28 01:45:55 +0200 | smoge | (~smoge@2603-7000-4b42-1100-a4e2-7fcb-30b3-1956.res6.spectrum.com) (Quit: Client closed) |
2023-06-28 01:45:58 +0200 | mauke_ | (~mauke@user/mauke) |
2023-06-28 01:47:15 +0200 | <hpc> | well that's one of the weirdest math things i have ever read |
2023-06-28 01:47:44 +0200 | mauke | (~mauke@user/mauke) (Ping timeout: 252 seconds) |
2023-06-28 01:47:44 +0200 | mauke_ | mauke |
2023-06-28 01:47:45 +0200 | <c_wraith> | yeah. Chaitin's constant and a few other numbers are uniquely-defined but non-computable |
2023-06-28 01:49:05 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
2023-06-28 01:50:33 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 01:50:54 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:54:08 +0200 | ddellacosta | (~ddellacos@146.70.171.100) (Quit: WeeChat 3.8) |
2023-06-28 01:55:26 +0200 | dcoutts | (~duncan@79.137.104.194) (Ping timeout: 250 seconds) |
2023-06-28 01:56:30 +0200 | Typedfern | (~Typedfern@60.red-83-37-32.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
2023-06-28 01:56:45 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 01:56:54 +0200 | Typedfern | (~Typedfern@60.red-83-37-32.dynamicip.rima-tde.net) |
2023-06-28 01:56:58 +0200 | defanor | (~defanor@tart.uberspace.net) (Server closed connection) |
2023-06-28 01:57:03 +0200 | haritz | (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) |
2023-06-28 01:57:03 +0200 | haritz | (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) (Changing host) |
2023-06-28 01:57:04 +0200 | haritz | (~hrtz@user/haritz) |
2023-06-28 01:57:07 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 01:57:14 +0200 | defanor | (~defanor@tart.uberspace.net) |
2023-06-28 01:58:02 +0200 | Nokurn | (~jeremiah@cpe-76-86-186-227.socal.res.rr.com) (Ping timeout: 250 seconds) |
2023-06-28 01:58:23 +0200 | <Logio> | I think I've seen a claim (and maybe a proof) that the set of non-computable numbers was even dense in the reals |
2023-06-28 01:58:51 +0200 | <EvanR> | this page has an illustration of the first few approximations to an uncomputable number, based on whether such and such turing machine halts or doesn't halt https://en.wikipedia.org/wiki/Specker_sequence |
2023-06-28 01:59:44 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 240 seconds) |
2023-06-28 02:00:30 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) |
2023-06-28 02:01:04 +0200 | <Logio> | Oh, the proof I remembered is nearly trivial, since the set of computable numbers is obviously countable, yet the reals are not |
2023-06-28 02:01:07 +0200 | <ncf> | Logio: surely ℝ \ a countable subset is dense in ℝ |
2023-06-28 02:01:18 +0200 | <Logio> | ncf: exactly |
2023-06-28 02:01:42 +0200 | <dolio> | Well, that's pretty expected depending on what you mean, because the reals are uncountable, and algorithms are countable. But the point above was that someone is supposed to point out an uncomputable real, and the things you can point out are also countable. |
2023-06-28 02:02:20 +0200 | <EvanR> | the things you can point out are countable? |
2023-06-28 02:02:28 +0200 | <dolio> | Yeah. |
2023-06-28 02:02:29 +0200 | <c_wraith> | assuming you use language to do the pointing, yhes |
2023-06-28 02:02:32 +0200 | <EvanR> | alrighty |
2023-06-28 02:02:55 +0200 | <c_wraith> | Unless you know a language capable of embedding infinite information in a finite string... |
2023-06-28 02:02:57 +0200 | <EvanR> | that might just devolve into ultrafinitism |
2023-06-28 02:03:14 +0200 | <EvanR> | the things you can point out is actually finite for many reasons |
2023-06-28 02:03:18 +0200 | <dolio> | Well, I'm allowing some idealism. |
2023-06-28 02:03:30 +0200 | <dolio> | Just not the usual amount of BS idealism. |
2023-06-28 02:06:50 +0200 | <EvanR> | but yeah if you try to equate reals with possibly infinite list of Bool, and haskell can compute any computable list of Bool, and you enumerate them all in a lazy list, you can use a diagonal argument to argue we missed something. Whatever it is is uncomputable by definition |
2023-06-28 02:07:35 +0200 | cheater | (~Username@user/cheater) (Quit: Going offline, see ya! (www.adiirc.com)) |
2023-06-28 02:07:37 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 02:07:56 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 02:08:39 +0200 | <EvanR> | that's totally wrong because the argument involves going over that diagonal |
2023-06-28 02:09:16 +0200 | <EvanR> | clearly something strange in the neighborhood though |
2023-06-28 02:10:58 +0200 | <dolio> | The diagonal argument shows you can't enumerate every computable list of bools. |
2023-06-28 02:12:11 +0200 | <EvanR> | so you can't enumerate all [Bool] producing haskell programs? |
2023-06-28 02:12:49 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) (Read error: Connection reset by peer) |
2023-06-28 02:12:50 +0200 | <dolio> | Not every [Bool] program is a computable list of booleans. |
2023-06-28 02:12:55 +0200 | <dolio> | Some of them diverge. |
2023-06-28 02:13:23 +0200 | <dolio> | In the Bool part of the list part. |
2023-06-28 02:13:34 +0200 | <EvanR> | so the naive version of the list contains bombs that mess up a literate attempt to show the diagonal |
2023-06-28 02:13:42 +0200 | <EvanR> | literal |
2023-06-28 02:14:52 +0200 | <dolio> | If your [[Bool]] contains entries that diverge somewhere, then it doesn't meet the specification to begin with. |
2023-06-28 02:15:08 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-06-28 02:15:09 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-06-28 02:15:09 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-28 02:15:25 +0200 | <dolio> | So it doesn't matter what the diagonal-taking program does with it. |
2023-06-28 02:16:26 +0200 | cheater | (~Username@user/cheater) |
2023-06-28 02:17:10 +0200 | <EvanR> | attempt to filter those out with a timeout or exception handler xD |
2023-06-28 02:20:20 +0200 | <dolio> | Anyhow, this all works entirely in the computable world, for boolean streams. The computable bit streams are computably uncountable. |
2023-06-28 02:20:34 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) |
2023-06-28 02:21:28 +0200 | <EvanR> | I failed to show that there's an uncomputable stream |
2023-06-28 02:21:37 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 02:21:57 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 02:22:21 +0200 | <dolio> | Well, it's even easier to define Chaitin's bit stream, I think. |
2023-06-28 02:23:33 +0200 | <dolio> | The real number has something fancy going on to somehow be related to probability or something. |
2023-06-28 02:29:33 +0200 | Nokurn | (~jeremiah@cpe-76-86-186-227.socal.res.rr.com) |
2023-06-28 02:32:23 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) |
2023-06-28 02:33:50 +0200 | random-jellyfish | (~random-je@user/random-jellyfish) |
2023-06-28 02:35:48 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 02:36:02 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 245 seconds) |
2023-06-28 02:36:08 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 02:37:59 +0200 | o-90 | (~o-90@gateway/tor-sasl/o-90) |
2023-06-28 02:38:11 +0200 | o-90 | (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection) |
2023-06-28 02:43:37 +0200 | <[Leary]> | Chaitin's constant is a bit complicated. Instead you can just directly encode a halting oracle into the digits of a real number. |
2023-06-28 02:45:32 +0200 | <EvanR> | is that what the specker sequence above is doing |
2023-06-28 02:46:06 +0200 | Nokurn | (~jeremiah@cpe-76-86-186-227.socal.res.rr.com) (Ping timeout: 260 seconds) |
2023-06-28 02:51:27 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 02:51:49 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 02:52:17 +0200 | hisa38 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) |
2023-06-28 02:52:28 +0200 | <[Leary]> | EvanR: No, that construction is also less direct---it needs to be, since it has a more specific goal. |
2023-06-28 02:53:10 +0200 | smoge | (~smoge@2603-7000-4b42-1100-a4e2-7fcb-30b3-1956.res6.spectrum.com) |
2023-06-28 03:05:22 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 03:05:43 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 03:07:11 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds) |
2023-06-28 03:11:33 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2023-06-28 03:12:48 +0200 | myxos | (~myxos@cpe-65-28-251-121.cinci.res.rr.com) (Quit: myxos) |
2023-06-28 03:13:01 +0200 | myxos | (~myxos@cpe-65-28-251-121.cinci.res.rr.com) |
2023-06-28 03:14:59 +0200 | jmdaemon | (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds) |
2023-06-28 03:15:07 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-28 03:17:39 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2023-06-28 03:19:05 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 03:19:26 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 03:19:32 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 246 seconds) |
2023-06-28 03:23:10 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 03:27:56 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
2023-06-28 03:32:20 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 03:32:40 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 03:34:52 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds) |
2023-06-28 03:35:05 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) (Ping timeout: 240 seconds) |
2023-06-28 03:36:38 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 252 seconds) |
2023-06-28 03:37:24 +0200 | hisa381 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) |
2023-06-28 03:38:47 +0200 | hisa38 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Ping timeout: 246 seconds) |
2023-06-28 03:38:48 +0200 | hisa381 | hisa38 |
2023-06-28 03:44:22 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds) |
2023-06-28 03:44:31 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 03:44:51 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 03:53:11 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) |
2023-06-28 03:53:11 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host) |
2023-06-28 03:53:11 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-06-28 03:56:44 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 03:57:04 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 04:08:16 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 04:08:35 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 04:08:48 +0200 | xff0x | (~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 258 seconds) |
2023-06-28 04:11:19 +0200 | bilegeek | (~bilegeek@2600:1008:b09c:efb7:b7bf:5045:f083:53f7) (Quit: Leaving) |
2023-06-28 04:15:07 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-28 04:15:51 +0200 | dsrt^ | (~dsrt@24.125.210.85) |
2023-06-28 04:16:36 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2023-06-28 04:17:24 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 04:18:16 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
2023-06-28 04:18:24 +0200 | talismanick | (~user@2601:204:ef01:8ca0::a3e7) |
2023-06-28 04:19:22 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 245 seconds) |
2023-06-28 04:20:44 +0200 | <talismanick> | Is servant-errors superseded by another package? It doesn't work with base >4.14 |
2023-06-28 04:21:24 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 04:21:44 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 04:22:37 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2023-06-28 04:22:37 +0200 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2023-06-28 04:22:37 +0200 | finn_elija | FinnElija |
2023-06-28 04:22:38 +0200 | Katarushisu0 | (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) |
2023-06-28 04:22:47 +0200 | Katarushisu | (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 264 seconds) |
2023-06-28 04:22:47 +0200 | Katarushisu0 | Katarushisu |
2023-06-28 04:27:29 +0200 | td_ | (~td@i5387090F.versanet.de) (Ping timeout: 240 seconds) |
2023-06-28 04:27:43 +0200 | <jackdk> | I have never seen that package before in my life. I tend to use the UVerb stuff in modern servant if I need to be precise about returned codes, but I don't know if that solves your problem. |
2023-06-28 04:29:40 +0200 | td_ | (~td@i5387093D.versanet.de) |
2023-06-28 04:30:05 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-28 04:30:25 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 04:44:33 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-28 04:44:55 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-28 04:45:43 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
2023-06-28 04:49:40 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) |
2023-06-28 04:50:56 +0200 | czy | (~user@host-140-26.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Remote host closed the connection) |
2023-06-28 04:51:22 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 250 seconds) |
2023-06-28 04:51:55 +0200 | <siraben> | can people on the libera side hear me? |
2023-06-28 04:53:45 +0200 | <glguy> | yeah |
2023-06-28 04:54:25 +0200 | czy | (~user@host-140-26.ilcub310.champaign.il.us.clients.pavlovmedia.net) |
2023-06-28 04:56:17 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) |
2023-06-28 04:56:17 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host) |
2023-06-28 04:56:17 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-06-28 04:56:58 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2023-06-28 04:57:08 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) |
2023-06-28 04:59:35 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 05:02:45 +0200 | k`` | (~user@136.56.140.2) |
2023-06-28 05:04:03 +0200 | <k``> | Is there any particular reason that ByteString uses a foreign pointer while Text uses a ByteArray#? |
2023-06-28 05:04:35 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) |
2023-06-28 05:06:52 +0200 | myme | (~myme@2a01:799:d60:e400:5ad3:735a:f98b:c82b) (Ping timeout: 245 seconds) |
2023-06-28 05:12:30 +0200 | <EvanR> | ByteStrings are in pinned memory so they can interact with FFI, there's that |
2023-06-28 05:13:59 +0200 | <probie> | I don't know the reason, but given that `ShortByteString` uses a `ByteArray#`, this was definitely a deliberate choice for `ByteString` |
2023-06-28 05:15:02 +0200 | <k``> | Oh, that's an interesting tradeoff. |
2023-06-28 05:15:48 +0200 | <siraben> | great the bridge is back. is anyone using aarch64 ghc and does profiling work for you? |
2023-06-28 05:15:50 +0200 | <siraben> | specificalyl on macos |
2023-06-28 05:16:00 +0200 | aweinstock | (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) (Ping timeout: 260 seconds) |
2023-06-28 05:19:11 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
2023-06-28 05:19:11 +0200 | EvanR | (~EvanR@user/evanr) (Ping timeout: 264 seconds) |
2023-06-28 05:27:19 +0200 | <glguy> | This might not help you at all, but Without getting that computer, I only know hpc was working |
2023-06-28 05:29:43 +0200 | aforemny | (~aforemny@2001:9e8:6cee:a800:d2af:9715:31a9:a2bb) |
2023-06-28 05:30:37 +0200 | aforemny_ | (~aforemny@2001:9e8:6cc7:2c00:369b:8740:ed39:83be) (Ping timeout: 245 seconds) |
2023-06-28 05:31:24 +0200 | <dolio> | I think FFI was the original motivation. |
2023-06-28 05:31:48 +0200 | <dolio> | Although ByteArray# might not have been all there at the time. |
2023-06-28 05:32:45 +0200 | falafel | (~falafel@2607:fb91:86c:d890:90bb:9d24:bff:51c5) |
2023-06-28 05:37:11 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds) |
2023-06-28 05:41:20 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-28 05:42:15 +0200 | <jackdk> | k``: it might be so that `ByteString`s can share data e.g., when you slice out a substring. This is implied by e.g., the haddock for `Data.ByteString.copy`: https://hackage.haskell.org/package/bytestring-0.11.4.0/docs/Data-ByteString.html#v:copy |
2023-06-28 05:43:10 +0200 | <dolio> | You can do that with ByteArray#, too. |
2023-06-28 05:44:15 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 05:45:41 +0200 | <jackdk> | Ah, TIL. |
2023-06-28 05:45:45 +0200 | <jackdk> | Thanks. |
2023-06-28 05:46:44 +0200 | <dolio> | It's just a matter of sharing the underlying array. They basically just change the offset/length when slicing. |
2023-06-28 05:47:26 +0200 | <probie> | dolio: I'm fairly sure you're right about it not being available. `ByteArray#` first appears in base 4.11 (which is from 2018) |
2023-06-28 05:49:05 +0200 | <dolio> | I think there were some shenanigans early on that you might not be able to do anymore, too. |
2023-06-28 05:49:29 +0200 | <dolio> | Like, I think you could get an mmaped bytestring. |
2023-06-28 05:52:54 +0200 | <probie> | You can use `Data.ByteString.Unsafe.unsafePackAddressLen` on something which has been mmap-ed |
2023-06-28 05:55:33 +0200 | phma | (~phma@host-67-44-208-154.hnremote.net) (Read error: Connection reset by peer) |
2023-06-28 05:55:58 +0200 | phma | (~phma@host-67-44-208-154.hnremote.net) |
2023-06-28 06:02:55 +0200 | davetapley | (sid666@id-666.uxbridge.irccloud.com) (Server closed connection) |
2023-06-28 06:03:07 +0200 | davetapley | (sid666@id-666.uxbridge.irccloud.com) |
2023-06-28 06:05:36 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-06-28 06:06:04 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Remote host closed the connection) |
2023-06-28 06:06:26 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 06:18:35 +0200 | falafel | (~falafel@2607:fb91:86c:d890:90bb:9d24:bff:51c5) (Ping timeout: 264 seconds) |
2023-06-28 06:27:27 +0200 | <Axman6> | siraben: you might get better responses if you actually state what problem you're having |
2023-06-28 06:29:20 +0200 | <siraben> | Axman6: I get errors like this |
2023-06-28 06:29:20 +0200 | <siraben> | Could not find module ‘Prelude’ |
2023-06-28 06:29:20 +0200 | <siraben> | Perhaps you haven't installed the profiling libraries for package ‘base-4.17.1.0’? |
2023-06-28 06:29:20 +0200 | <siraben> | Use -v (or `:set -v` in ghci) to see a list of the files searched for. |
2023-06-28 06:29:32 +0200 | <siraben> | when I try to run cabal run project --enable-profiling |
2023-06-28 06:30:23 +0200 | <Axman6> | Hmm, that does seem like the profiling libraries haven't been installed, I would've assumed that GHC releases would |
2023-06-28 06:31:58 +0200 | k`` | (~user@136.56.140.2) (Ping timeout: 260 seconds) |
2023-06-28 06:33:09 +0200 | <siraben> | I'm using Haskell installed via Nix on aarch64-darwin |
2023-06-28 06:35:44 +0200 | <Axman6> | Is there a nix... flag to also install profiling libraries? This sounds more like a nix issue than a ghc one if it's not installing all the libraries |
2023-06-28 06:36:39 +0200 | <jackdk> | Generally nixpkgs haskell builds profiling stuff in the same derivations as the regular versions - I usually see it compile most packages twice for this reason. siraben can you please pastebin the nix expression you are using to get GHC? |
2023-06-28 06:36:42 +0200 | <jackdk> | @where paste |
2023-06-28 06:36:42 +0200 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
2023-06-28 06:40:06 +0200 | bcoppens_ | (~bartcopp@vpn2.bartcoppens.be) (Ping timeout: 255 seconds) |
2023-06-28 06:41:02 +0200 | <Axman6> | siraben: this line looks relevant in https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/development/compilers/ghc/common-hadrian.ni… enableProfiledLibs ? !stdenv.targetPlatform.isAarch64 |
2023-06-28 06:41:31 +0200 | <jackdk> | that comment is likely a restriction imposed by nixpkgs hydra builder rather than anything fundamental |
2023-06-28 06:42:10 +0200 | <Axman6> | yeah - does that mean it could be built locally then? |
2023-06-28 06:44:19 +0200 | <jackdk> | possibly/probably, though you'll have to figure out what calls into that function and how to override the argumetn |
2023-06-28 06:45:39 +0200 | bcoppens | (~bartcopp@vpn2.bartcoppens.be) |
2023-06-28 06:46:28 +0200 | jargon | (~jargon@184.101.72.124) (Remote host closed the connection) |
2023-06-28 06:46:34 +0200 | <siraben> | Ah I see. I'm going to just override it and recompile everything then |
2023-06-28 06:54:58 +0200 | bliminse | (~bliminse@user/bliminse) (Server closed connection) |
2023-06-28 06:55:12 +0200 | bliminse | (~bliminse@user/bliminse) |
2023-06-28 06:55:18 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
2023-06-28 07:07:48 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) |
2023-06-28 07:08:03 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 07:08:22 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 260 seconds) |
2023-06-28 07:10:37 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
2023-06-28 07:15:44 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 07:16:10 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-06-28 07:17:55 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
2023-06-28 07:19:51 +0200 | trev | (~trev@user/trev) |
2023-06-28 07:20:30 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 07:21:49 +0200 | dcoutts | (~duncan@79.137.104.194) |
2023-06-28 07:21:56 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) |
2023-06-28 07:22:35 +0200 | Guest6356 | (~nacho@181.46.138.68) |
2023-06-28 07:24:27 +0200 | falafel | (~falafel@2607:fb91:86c:d890:8617:efee:edaf:5e3d) |
2023-06-28 07:31:10 +0200 | dcoutts | (~duncan@79.137.104.194) (Read error: Connection reset by peer) |
2023-06-28 07:31:49 +0200 | dcoutts | (~duncan@79.137.104.194) |
2023-06-28 07:37:07 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
2023-06-28 07:39:59 +0200 | michalz | (~michalz@185.246.207.203) |
2023-06-28 07:40:08 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-28 07:44:56 +0200 | <Guest6356> | :quit |
2023-06-28 07:45:00 +0200 | Guest6356 | (~nacho@181.46.138.68) (Quit: leaving) |
2023-06-28 07:45:26 +0200 | nacho_ | (~nacho@181.46.138.68) |
2023-06-28 07:45:46 +0200 | nacho_ | (~nacho@181.46.138.68) (Client Quit) |
2023-06-28 07:45:53 +0200 | falafel | (~falafel@2607:fb91:86c:d890:8617:efee:edaf:5e3d) (Ping timeout: 246 seconds) |
2023-06-28 07:48:57 +0200 | nut | (~nut@176-151-21-224.abo.bbox.fr) |
2023-06-28 07:49:40 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-06-28 08:11:41 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
2023-06-28 08:12:00 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
2023-06-28 08:16:02 +0200 | <mzg> | Guest6356 had strong ghci habits |
2023-06-28 08:22:47 +0200 | priesvitne_sklo | (~priesvitn@192.216.99.34.bc.googleusercontent.com) |
2023-06-28 08:23:59 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
2023-06-28 08:24:12 +0200 | dcoutts | (~duncan@79.137.104.194) (Ping timeout: 240 seconds) |
2023-06-28 08:25:08 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) |
2023-06-28 08:25:26 +0200 | mauke | (~mauke@user/mauke) (Ping timeout: 250 seconds) |
2023-06-28 08:29:46 +0200 | shriekingnoise | (~shrieking@186.137.175.87) (Ping timeout: 250 seconds) |
2023-06-28 08:29:46 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Client Quit) |
2023-06-28 08:31:10 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) |
2023-06-28 08:31:56 +0200 | <Axman6> | I feel like I should a tear, hackersdelight.org seems to have expired at some point and now has some french, probably squatting, website on it |
2023-06-28 08:34:53 +0200 | <Axman6> | should shed* |
2023-06-28 08:39:44 +0200 | <mzg> | what was that? |
2023-06-28 08:40:10 +0200 | <Axman6> | the website for the book Hacker's Delight, the bit twiddling bible |
2023-06-28 08:42:10 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 08:42:15 +0200 | <jackdk> | http://web.archive.org/web/20180609102750/http://www.hackersdelight.org/ Axman6 |
2023-06-28 08:46:46 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-28 08:46:47 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
2023-06-28 08:46:51 +0200 | acidjnk | (~acidjnk@p200300d6e7072f43f126f466c3390846.dip0.t-ipconnect.de) |
2023-06-28 08:47:07 +0200 | dcoutts | (~duncan@212.187.244.83) |
2023-06-28 08:47:25 +0200 | <Axman6> | yeah I know, just a shame it's gone. I imagine the page to calculate magic numbers for division by constants no longer works (though I hasve acquired the secret knowledge elsewhere, so no longer need such tools - I'm basically a wizard now) |
2023-06-28 08:51:19 +0200 | <Axman6> | > 1 :: Word |
2023-06-28 08:51:21 +0200 | <lambdabot> | 1 |
2023-06-28 08:51:58 +0200 | <Axman6> | :t (.&.) |
2023-06-28 08:51:59 +0200 | <lambdabot> | Bits a => a -> a -> a |
2023-06-28 08:52:11 +0200 | <Hecate> | oh my fucking god |
2023-06-28 08:52:28 +0200 | <Hecate> | Axman6: I unfortunately understand everything that's written on the squatted page |
2023-06-28 08:52:42 +0200 | <Hecate> | it's automatically-generated SEO content |
2023-06-28 08:52:51 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 08:52:57 +0200 | jespada | (~jespada@207.188.139.183) |
2023-06-28 08:53:24 +0200 | gaze___ | (sid387101@id-387101.helmsley.irccloud.com) (Server closed connection) |
2023-06-28 08:53:33 +0200 | gaze___ | (sid387101@id-387101.helmsley.irccloud.com) |
2023-06-28 08:54:29 +0200 | <Axman6> | Yeah I figured :( |
2023-06-28 08:55:43 +0200 | jespada_ | (~jespada@207.188.139.183) |
2023-06-28 08:57:30 +0200 | jespada | (~jespada@207.188.139.183) (Ping timeout: 250 seconds) |
2023-06-28 08:57:33 +0200 | ec | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2023-06-28 08:58:20 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 08:58:28 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:b445:5ef3:652d:413b) |
2023-06-28 08:59:18 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2023-06-28 08:59:50 +0200 | SanchayanMaity | (sid478177@id-478177.hampstead.irccloud.com) (Server closed connection) |
2023-06-28 08:59:59 +0200 | SanchayanMaity | (sid478177@id-478177.hampstead.irccloud.com) |
2023-06-28 09:03:12 +0200 | random-jellyfish | (~random-je@user/random-jellyfish) (Quit: Client closed) |
2023-06-28 09:04:11 +0200 | <jade[m]> | is there some nice combinator for `f x = a >>= \p -> unless p (f x)`? Essentially a monadic loop. |
2023-06-28 09:04:43 +0200 | <jade[m]> | I thought about repeat/takeWhile and then a sequence but that doesn't really work because the Bool comes from the bind |
2023-06-28 09:04:44 +0200 | <jackdk> | Axman6: http://web.archive.org/web/20180628171849/http://www.hackersdelight.org/magic.htm seems to be implemented only with client-side JS |
2023-06-28 09:04:45 +0200 | edwtjo | (~edwtjo@fsf/member/edwtjo) (Ping timeout: 240 seconds) |
2023-06-28 09:06:45 +0200 | <dsal> | jade[m]: There's a bunch in here: https://hackage.haskell.org/package/monad-loops-0.4.3/docs/Control-Monad-Loops.html |
2023-06-28 09:06:48 +0200 | <jade[m]> | jade[m]: rather `f x = a >>= \y -> unless (p y) (f x)` |
2023-06-28 09:07:08 +0200 | <jade[m]> | dsal: Thanks, I'm gonna see if I can find it |
2023-06-28 09:08:09 +0200 | jespada | (~jespada@207.188.139.183) |
2023-06-28 09:09:58 +0200 | <jackdk> | at what point does `x` get used for anything? |
2023-06-28 09:10:04 +0200 | jespada_ | (~jespada@207.188.139.183) (Ping timeout: 250 seconds) |
2023-06-28 09:10:27 +0200 | titibandit | (~titibandi@user/titibandit) (Remote host closed the connection) |
2023-06-28 09:10:38 +0200 | <jade[m]> | oh right |
2023-06-28 09:10:41 +0200 | <jade[m]> | it's used in a |
2023-06-28 09:10:53 +0200 | <jade[m]> | `f x = a x >>= \y -> unless (p y) (f x)` |
2023-06-28 09:11:15 +0200 | <c_wraith> | all these free variables hurt my soul |
2023-06-28 09:11:31 +0200 | <jade[m]> | and now I messed up fixity ... imagine parantheses around the a x |
2023-06-28 09:11:38 +0200 | <jade[m]> | c_wraith: I sincerely apologize |
2023-06-28 09:12:41 +0200 | <c_wraith> | Like, I don't know what free variables are supposed to not be free. |
2023-06-28 09:12:52 +0200 | <c_wraith> | I assume p should be bound. |
2023-06-28 09:13:19 +0200 | <jackdk> | so... `x :: a -> m b`, `p :: b -> Bool` but because everything's parametric you could just ask for an `m Bool`? |
2023-06-28 09:13:55 +0200 | <jade[m]> | jackdk: I think so (?) that'd be `whileM` in the package that was suggested |
2023-06-28 09:14:41 +0200 | <jade[m]> | c_wraith: yeah, they should all be bound, I just basically abstracted from my concrete example where these are other functions in the module |
2023-06-28 09:14:42 +0200 | <c_wraith> | well. it'd be whileM_ unless you actually want all the intermediate results |
2023-06-28 09:14:54 +0200 | <jade[m]> | right |
2023-06-28 09:15:00 +0200 | <jackdk> | `foo m = fix $ \loop -> m >>= bool loop (pure ())` |
2023-06-28 09:23:24 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) (Remote host closed the connection) |
2023-06-28 09:24:38 +0200 | dcoutts | (~duncan@212.187.244.83) (Ping timeout: 260 seconds) |
2023-06-28 09:27:43 +0200 | dcoutts | (~duncan@212.187.244.83) |
2023-06-28 09:32:11 +0200 | edwtjo | (~edwtjo@h-155-4-52-185.A213.priv.bahnhof.se) |
2023-06-28 09:32:11 +0200 | edwtjo | (~edwtjo@h-155-4-52-185.A213.priv.bahnhof.se) (Changing host) |
2023-06-28 09:32:11 +0200 | edwtjo | (~edwtjo@fsf/member/edwtjo) |
2023-06-28 09:32:16 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-06-28 09:35:19 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-28 09:35:50 +0200 | dcoutts_ | (~duncan@185.201.60.47) |
2023-06-28 09:37:48 +0200 | Xe | (~cadey@tailscale/xe) (Ping timeout: 250 seconds) |
2023-06-28 09:38:38 +0200 | dcoutts | (~duncan@212.187.244.83) (Ping timeout: 260 seconds) |
2023-06-28 09:39:02 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-28 09:39:20 +0200 | oo_miguel | (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) |
2023-06-28 09:39:41 +0200 | <jade[m]> | with parsec I can't find a way to say "any token but eof" |
2023-06-28 09:40:20 +0200 | <jade[m]> | I just want to skip tokens that aren't recognized, but that'd consume EOF and mess up the rest of the parser |
2023-06-28 09:40:35 +0200 | <dminuoso> | satisfy |
2023-06-28 09:41:11 +0200 | <Hecate> | looks like `satisfy` yes |
2023-06-28 09:41:30 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection) |
2023-06-28 09:41:51 +0200 | <dminuoso> | Ah actually no |
2023-06-28 09:41:52 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 09:41:54 +0200 | <dminuoso> | eof is not an actual token. |
2023-06-28 09:41:59 +0200 | <dminuoso> | That's the first confusion here. |
2023-06-28 09:42:11 +0200 | <dminuoso> | https://hackage.haskell.org/package/parsec-3.1.16.1/docs/src/Text.Parsec.Combinator.html#eof |
2023-06-28 09:42:13 +0200 | <jade[m]> | yeah eof is defined as notFollowedBy anyToken |
2023-06-28 09:42:16 +0200 | hisa387 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) |
2023-06-28 09:42:44 +0200 | <dminuoso> | jade[m]: So dont worry about "eof" because it cant be consumed. |
2023-06-28 09:43:15 +0200 | <dminuoso> | If your parser is already at the end, there's another bug |
2023-06-28 09:43:25 +0200 | <dminuoso> | Likely too much backtracking |
2023-06-28 09:43:56 +0200 | <c_wraith> | well, it's parsec. probably the fact that it doesn't truly backtrack |
2023-06-28 09:43:57 +0200 | <jade[m]> | hm, but when I do `parseFoo <|> (anyToken *> parseFoo)` I get an `unexpected end of input` |
2023-06-28 09:44:23 +0200 | hisa38 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Ping timeout: 264 seconds) |
2023-06-28 09:44:23 +0200 | hisa387 | hisa38 |
2023-06-28 09:44:29 +0200 | <jade[m]> | I suppose im not sure what "consumes" means |
2023-06-28 09:45:00 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 240 seconds) |
2023-06-28 09:46:04 +0200 | <dminuoso> | jade[m]: Hard to say with just a snippet. |
2023-06-28 09:46:14 +0200 | <dminuoso> | Chances are your total parser is more than just that, right? |
2023-06-28 09:46:26 +0200 | <c_wraith> | In general, you should know that parsec is *far* less compositional than its api suggests |
2023-06-28 09:46:30 +0200 | <jade[m]> | let me try to cook up a minimal reproducible example |
2023-06-28 09:46:46 +0200 | <chromoblob> | "far less compositional than api suggests" scary |
2023-06-28 09:46:48 +0200 | <dminuoso> | <|> is very sneaky in that it only choses the right side, if the left side has not consumed any input. |
2023-06-28 09:47:16 +0200 | <jade[m]> | dminuoso: so can I just `try` the left side? |
2023-06-28 09:47:28 +0200 | <dminuoso> | Maybe, I dont know your grammar and the rest of your parser. |
2023-06-28 09:47:35 +0200 | <c_wraith> | well, it's necessary but not sufficient. |
2023-06-28 09:47:47 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) |
2023-06-28 09:47:47 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host) |
2023-06-28 09:47:47 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-06-28 09:47:48 +0200 | <dminuoso> | In parser combinators I found that `try foo <|> bar` or some equivalent tends to be horrid for a variety of reasons. |
2023-06-28 09:47:59 +0200 | <c_wraith> | "sufficient" is a factor of your entire grammar because... as I said, parsec is not compositional |
2023-06-28 09:47:59 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds) |
2023-06-28 09:48:02 +0200 | <dminuoso> | Manual lookahead and then making a decision tends to be better for sanity and diagnostics. |
2023-06-28 09:48:29 +0200 | <jade[m]> | alright, thank you |
2023-06-28 09:49:16 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2023-06-28 09:50:01 +0200 | <chromoblob> | you can't enumerate all computable reals due to undecidability of halting, right? |
2023-06-28 09:50:20 +0200 | <dminuoso> | jade[m]: You could think of <|> as alternating with a lookahead of the first token, irrespective of what your actual combinators express. |
2023-06-28 09:51:16 +0200 | <jade[m]> | hm |
2023-06-28 09:51:40 +0200 | <dminuoso> | And `try` turns it into infinite lookahead. |
2023-06-28 09:52:47 +0200 | <dminuoso> | chromoblob: computable numbers form an infinite set. |
2023-06-28 09:53:10 +0200 | <dminuoso> | Do you care to enumerate them in finite time? |
2023-06-28 09:53:26 +0200 | <c_wraith> | chromoblob: you can enumerate all possible programs, of which all computable reals are a subset. What you can't do is filter out duplicates or programs that do other things. |
2023-06-28 09:53:50 +0200 | <c_wraith> | chromoblob: that is, you can't specify the exact subset that are computable reals |
2023-06-28 09:54:13 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-28 09:56:59 +0200 | <c_wraith> | I suppose I should say you can't compute the subset which make up computable reals. You can specify them, with vague references to a halting oracle. |
2023-06-28 09:59:51 +0200 | <chromoblob> | so if we disregard oracles, can this "imply" in a sense that set of CR is less than N, yet countable? |
2023-06-28 10:00:03 +0200 | <chromoblob> | i mean, introduce a new notion |
2023-06-28 10:00:19 +0200 | <c_wraith> | I have no idea what you mean by "less than N" there. |
2023-06-28 10:00:36 +0200 | <chromoblob> | if i don't believe in uncomputable functions |
2023-06-28 10:00:49 +0200 | <chromoblob> | there is an injection but not surjection into N |
2023-06-28 10:01:06 +0200 | <dminuoso> | chromoblob: Both are countable. |
2023-06-28 10:01:21 +0200 | <dminuoso> | The distinction you seem to be trying to get at is countable vs uncountable |
2023-06-28 10:01:25 +0200 | <chromoblob> | no no |
2023-06-28 10:01:48 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-06-28 10:02:04 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) |
2023-06-28 10:02:08 +0200 | <dminuoso> | Proving that no surjection onto N (which is countable itself) can exist is pretty much a proof of countability |
2023-06-28 10:02:18 +0200 | <dminuoso> | s/countability/uncountability/ |
2023-06-28 10:02:29 +0200 | <c_wraith> | it's really about computability, not countability |
2023-06-28 10:02:34 +0200 | <chromoblob> | sorry i mean |
2023-06-28 10:02:43 +0200 | <c_wraith> | Is there a surjection? yes. Is it computable? no. |
2023-06-28 10:03:18 +0200 | <chromoblob> | and if we postulate that no uncomputable functions exist? |
2023-06-28 10:03:25 +0200 | <c_wraith> | I think that's the idea you're hunting for. computable mappings only. |
2023-06-28 10:04:16 +0200 | <chromoblob> | sorry my mistake, i mean, there is no computable injection from N to CR |
2023-06-28 10:04:30 +0200 | <chromoblob> | that's what i mean by "less" |
2023-06-28 10:04:34 +0200 | <chromoblob> | yet CR is countable |
2023-06-28 10:04:40 +0200 | <chromoblob> | that is, it is less than uncounable |
2023-06-28 10:04:44 +0200 | <dminuoso> | chromoblob: I think thats hard to postulate, since there is at least one program that enumerates them all. I think its self evident that it exists, you just cant find it. |
2023-06-28 10:05:10 +0200 | <c_wraith> | dminuoso: I don't think that's true, if you require a "program" to be finite. |
2023-06-28 10:05:16 +0200 | <dminuoso> | c_wraith: thats fair. |
2023-06-28 10:06:12 +0200 | <dminuoso> | 10:04:15 chromoblob | sorry my mistake, i mean, there is no computable injection from N to CR |
2023-06-28 10:06:16 +0200 | <dminuoso> | s/injection/surjection |
2023-06-28 10:06:29 +0200 | <chromoblob> | ahhh right right |
2023-06-28 10:06:57 +0200 | <dminuoso> | uncomputably countable. |
2023-06-28 10:07:04 +0200 | <c_wraith> | chromoblob: Anyway, this is an area that's not usually considered. Set theory rarely actually interacts with computability. |
2023-06-28 10:07:15 +0200 | cfricke | (~cfricke@user/cfricke) |
2023-06-28 10:07:40 +0200 | <c_wraith> | I'm not sure what you'd find if you go exploring in that wilderness. |
2023-06-28 10:07:58 +0200 | <dminuoso> | That is, until monochrom opens up his laptop in the evening and decides this to be a great master thesis for one of his poor souls. |
2023-06-28 10:07:59 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
2023-06-28 10:09:09 +0200 | <c_wraith> | it's an area that exposes the social aspect of math. Unless you find some really interesting result, you probably won't get many people interested in what you find. |
2023-06-28 10:09:43 +0200 | <chromoblob> | yeah i just want to restrict myself to "computable mathematics" |
2023-06-28 10:09:56 +0200 | <chromoblob> | i don't believe in uncomputable objects |
2023-06-28 10:10:20 +0200 | <chromoblob> | :D |
2023-06-28 10:10:22 +0200 | <c_wraith> | the computable reals themselves are difficult for that. |
2023-06-28 10:10:37 +0200 | <c_wraith> | Because while the numbers themselves might be computable, equality on them is not. |
2023-06-28 10:10:48 +0200 | <chromoblob> | i'm fiiiine with that |
2023-06-28 10:10:52 +0200 | <c_wraith> | What's the use of numbers you can't check for equality? |
2023-06-28 10:11:30 +0200 | <dminuoso> | I ask myself the same thing about PHP and strings. |
2023-06-28 10:11:51 +0200 | <chromoblob> | well i won't use computable reals for everything, for something i might want to use "number forms", that are just like normal numbers, except they don't exist in the same sense that CRs exist, they are only forms |
2023-06-28 10:12:07 +0200 | <c_wraith> | ah, PHP has found a solution. If it doesn't know what you mean by "equality", it just makes something up! |
2023-06-28 10:12:35 +0200 | <chromoblob> | in other words, i don't want to pretend that one single equality or something else is defined for everything |
2023-06-28 10:12:44 +0200 | <dminuoso> | c_wraith: Oh even when the semantics should be crystal clear it still makes something up. |
2023-06-28 10:12:57 +0200 | <chromoblob> | but maybe what i say is just syntactic nonsense |
2023-06-28 10:13:06 +0200 | <dminuoso> | In PHP the strings '9223372036854775807' and 9223372036854775808' are considered equal. |
2023-06-28 10:13:14 +0200 | <dminuoso> | Because why not. |
2023-06-28 10:14:05 +0200 | <c_wraith> | Pfft, like Haskell's any better. |
2023-06-28 10:14:06 +0200 | <c_wraith> | > 2**53 == 2**53 + 1 |
2023-06-28 10:14:08 +0200 | <lambdabot> | True |
2023-06-28 10:14:48 +0200 | <c_wraith> | (ok, yes. it's better in practice) |
2023-06-28 10:15:06 +0200 | <dminuoso> | c_wraith: That very explicitly taps into Floating. |
2023-06-28 10:15:17 +0200 | <dminuoso> | But I guess you have a fair point. |
2023-06-28 10:15:28 +0200 | <dminuoso> | In PHP mostly strings are sort of polymorphic. |
2023-06-28 10:15:48 +0200 | <dminuoso> | That is, they arent really strings. They are "(re)monomorphized" every time you use it. |
2023-06-28 10:15:49 +0200 | <c_wraith> | and you are right. You have to opt in to that silliness more explicitly in Haskell. That really is better. |
2023-06-28 10:16:24 +0200 | <c_wraith> | Like, I had to choose ** as my operator to opt in! |
2023-06-28 10:17:11 +0200 | <dminuoso> | For what its worth, you had me there for a moment. Although I had not used ** before in Haskell, it felt natural since its sometimes used instead of (^) for power. I had to look up (**) first |
2023-06-28 10:17:18 +0200 | <dminuoso> | In other languages I meant |
2023-06-28 10:17:53 +0200 | smoge | (~smoge@2603-7000-4b42-1100-a4e2-7fcb-30b3-1956.res6.spectrum.com) (Ping timeout: 246 seconds) |
2023-06-28 10:18:42 +0200 | <dminuoso> | And I guess in a world where OverloadedStrings is almost omnipresent, let a = "9223372036854775807"; b = "9223372036854775808" in ... a == b could easily lead to the same result. |
2023-06-28 10:18:50 +0200 | <c_wraith> | > 2^^53 == 2^^53 + 1 -- If I'd used this version, you would have known something was up immediately |
2023-06-28 10:18:52 +0200 | <lambdabot> | True |
2023-06-28 10:19:11 +0200 | <dminuoso> | Gosh, what is (^^) |
2023-06-28 10:19:24 +0200 | <c_wraith> | turns out Haskell has 3 exponentiation operators! |
2023-06-28 10:19:43 +0200 | <dminuoso> | Good thing Haskell isnt use much for numbers, like finance. |
2023-06-28 10:19:56 +0200 | <dminuoso> | Or maybe that's the reason why. |
2023-06-28 10:20:10 +0200 | <c_wraith> | That's... certainly related to the reason why! |
2023-06-28 10:20:17 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2023-06-28 10:21:11 +0200 | ccapndave | (~ccapndave@xcpe-62-167-164-19.cgn.res.adslplus.ch) |
2023-06-28 10:21:15 +0200 | <dminuoso> | Next presentation at Haskell eXchange 2023: Serokell presents 2 new exponentiation operators in base |
2023-06-28 10:21:45 +0200 | <c_wraith> | I like that. I can't even predict what they'd do, so it would be perfect! |
2023-06-28 10:22:05 +0200 | <int-e> | dminuoso: they actually (finally) changed that in php 8.0.0 |
2023-06-28 10:22:11 +0200 | acidjnk | (~acidjnk@p200300d6e7072f43f126f466c3390846.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
2023-06-28 10:22:45 +0200 | <dminuoso> | int-e: Im almost certain they did not. |
2023-06-28 10:22:48 +0200 | <int-e> | I guess "hash collisions" of the shape "1302E3748121" == "29183E38769" were too dangerous? |
2023-06-28 10:23:00 +0200 | <dminuoso> | What they did fix was various comparisons between numbers and non-numbers |
2023-06-28 10:23:04 +0200 | <dminuoso> | To make them less JavaScripty. |
2023-06-28 10:23:39 +0200 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) |
2023-06-28 10:23:52 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) |
2023-06-28 10:24:06 +0200 | <int-e> | Well I tested your example and the strings are considered different when using ==. |
2023-06-28 10:24:11 +0200 | <dminuoso> | Mmm |
2023-06-28 10:24:36 +0200 | <int-e> | see also https://www.php.net/manual/en/language.operators.comparison.php |
2023-06-28 10:25:12 +0200 | <dminuoso> | Whats funny is that '' /= 0 being in PHP 8.0 now has the consequence that now '' is less than 0. |
2023-06-28 10:25:15 +0200 | <int-e> | I'm confused, because the docs agree with you for "numeric strings" |
2023-06-28 10:26:45 +0200 | <int-e> | (FWIW, the actual version I'm testing is 8.2.5) |
2023-06-28 10:28:47 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) (Ping timeout: 264 seconds) |
2023-06-28 10:29:56 +0200 | <dminuoso> | int-e: https://onlinephp.io/c/3f6cb |
2023-06-28 10:30:29 +0200 | <dminuoso> | Curious. |
2023-06-28 10:30:36 +0200 | <dminuoso> | Maybe there is a PHP option to influence this |
2023-06-28 10:30:48 +0200 | dcoutts_ | (~duncan@185.201.60.47) (Remote host closed the connection) |
2023-06-28 10:31:28 +0200 | <dminuoso> | Seems like it was altered in 5.4 a long time ago. Ah what a shame. |
2023-06-28 10:31:29 +0200 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-06-28 10:33:38 +0200 | <int-e> | so the docs have been wrong ever since? |
2023-06-28 10:33:59 +0200 | <int-e> | (fun) |
2023-06-28 10:35:39 +0200 | <chromoblob> | dminuoso: "" |
2023-06-28 10:35:51 +0200 | <chromoblob> | crud |
2023-06-28 10:36:47 +0200 | chele | (~chele@user/chele) |
2023-06-28 10:37:04 +0200 | <dminuoso> | int-e: To be absolutely blunt, Im not convinced this behavior in PHP is really that poor. |
2023-06-28 10:37:31 +0200 | <chromoblob> | dminuoso: "there is at least one program that enumerates them all" thing is, i assumed this yesterday, and arrived at a contradiction, and went to sleep thinking i discovered a hole in logic or proof of ultrafinitism or something. i woke up in morning, continued thinking and only then noticed that this step might be wrong :) |
2023-06-28 10:37:34 +0200 | <dminuoso> | In Haskell most programmers are desensitized to just add fromIntegral/realToFrac until things compile |
2023-06-28 10:37:53 +0200 | <dminuoso> | We're certainly not riding the moral high horse here. |
2023-06-28 10:37:58 +0200 | <int-e> | The current behavior? It's probably workable. |
2023-06-28 10:38:14 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 10:38:32 +0200 | <dminuoso> | chromoblob: It depends on whether we admit infinite programs or not. |
2023-06-28 10:38:47 +0200 | <int-e> | The surprise was not comparing two strings as string, and that's gone now. |
2023-06-28 10:38:48 +0200 | <dminuoso> | chromoblob: If we admit them, there is an infinite number of programs that enumerate them all. |
2023-06-28 10:39:42 +0200 | <dminuoso> | chromoblob: That program would contain all programs that itself produces a computable real. |
2023-06-28 10:39:49 +0200 | <chromoblob> | infinite program, as in, productive program whose source is infinite uncomputable string? |
2023-06-28 10:39:54 +0200 | <dminuoso> | Yeah. |
2023-06-28 10:39:57 +0200 | <chromoblob> | hehe |
2023-06-28 10:40:09 +0200 | <int-e> | (Well, to me. I'm sure that some people coming from modern Python will be surprised by the lack of built-in big integers.) |
2023-06-28 10:40:19 +0200 | <dminuoso> | chromoblob: but like I said, that is not computable either. So you cant find it. |
2023-06-28 10:40:21 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) (Read error: Connection reset by peer) |
2023-06-28 10:40:24 +0200 | Feuermagier_ | (~Feuermagi@user/feuermagier) |
2023-06-28 10:40:24 +0200 | Feuermagier_ | Feuermagier |
2023-06-28 10:40:39 +0200 | <dminuoso> | but even if it was computable, the fact that it would be infinite would be another issue |
2023-06-28 10:41:01 +0200 | <chromoblob> | if it was computable, it would be equivalent to a finite program |
2023-06-28 10:41:42 +0200 | <chromoblob> | just execute the output of the finite program that computes it. |
2023-06-28 10:44:16 +0200 | <chromoblob> | oh, you mean being able to execute infinite programs |
2023-06-28 10:44:20 +0200 | Midjak | (~Midjak@82.66.147.146) |
2023-06-28 10:44:20 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-28 10:46:26 +0200 | <dminuoso> | There is fields that research computability on infinite data. |
2023-06-28 10:47:42 +0200 | <chromoblob> | does this have applications? |
2023-06-28 10:48:08 +0200 | azimut_ | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-06-28 10:48:54 +0200 | <merijn> | Keeps roaming gangs of mathematicians of the street? |
2023-06-28 10:51:22 +0200 | <chromoblob> | listen if you EVER try to divide by 0 we will beat you up so hard that you won't be able to tell false and true apart |
2023-06-28 10:53:27 +0200 | <mniip> | is the kmettiverse accepting new features or is it all frozen in only necessary maintenance mode? |
2023-06-28 10:54:32 +0200 | <int-e> | . o O ( 640k features are enough for anybody ) |
2023-06-28 10:57:23 +0200 | <mniip> | maybe what I'm looking for already exists |
2023-06-28 10:58:16 +0200 | CiaoSen | (~Jura@2a05:5800:296:4300:664b:f0ff:fe37:9ef) |
2023-06-28 10:58:48 +0200 | barcisz | (~barcisz@79.191.69.198.ipv4.supernova.orange.pl) |
2023-06-28 10:58:54 +0200 | <mniip> | you can implement `accum :: (a -> b -> a) -> f a -> [(Rep f, b)] -> f a` for any representable f |
2023-06-28 10:59:16 +0200 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) (Ping timeout: 250 seconds) |
2023-06-28 10:59:17 +0200 | <mniip> | but this generic implementation would be inefficient for e.g. a Vector (length-indexed) |
2023-06-28 10:59:33 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2023-06-28 10:59:52 +0200 | ubert1 | (~Thunderbi@2a02:8109:abc0:6434:ed16:f40d:d3f1:21f0) |
2023-06-28 11:00:14 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-28 11:01:40 +0200 | ccapndave | (~ccapndave@xcpe-62-167-164-19.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-06-28 11:04:35 +0200 | <tomsmeding> | mniip: would that scatter the bs onto the f a, combining values using the function? |
2023-06-28 11:04:48 +0200 | <mniip> | yes |
2023-06-28 11:05:18 +0200 | <tomsmeding> | why would that be inefficient for a length-length vector |
2023-06-28 11:06:56 +0200 | ccapndave | (~ccapndave@xcpe-62-167-164-19.cgn.res.adslplus.ch) |
2023-06-28 11:07:50 +0200 | <tomsmeding> | *length-indexed |
2023-06-28 11:07:51 +0200 | <tomsmeding> | brain |
2023-06-28 11:08:23 +0200 | acidjnk | (~acidjnk@p200300d6e7072f4300b5bf6655a1513c.dip0.t-ipconnect.de) |
2023-06-28 11:09:00 +0200 | <int-e> | mniip: do you mean `Key f`? |
2023-06-28 11:09:35 +0200 | danse-nr3 | (~francesco@151.37.79.114) |
2023-06-28 11:10:20 +0200 | <mniip> | Data.Functor.Rep (from adjunctions, the more used package, uses Rep f) |
2023-06-28 11:10:50 +0200 | <mniip> | tomsmeding, because vector has an efficient "accum" method that uses a mutable vector under the hoo |
2023-06-28 11:10:51 +0200 | <mniip> | d |
2023-06-28 11:10:59 +0200 | m5zs7k | (aquares@web10.mydevil.net) (Ping timeout: 246 seconds) |
2023-06-28 11:11:06 +0200 | <int-e> | meh that's confusing |
2023-06-28 11:11:31 +0200 | <tomsmeding> | mniip: ah right, your point is that you can implement accum _generically_ |
2023-06-28 11:11:46 +0200 | <tomsmeding> | but then it will be inefficient for basically everything that's not a cons list |
2023-06-28 11:11:58 +0200 | <tomsmeding> | and even for those |
2023-06-28 11:12:04 +0200 | <int-e> | especially considering that representable-functors is *also* be ekmett |
2023-06-28 11:12:45 +0200 | m5zs7k | (aquares@web10.mydevil.net) |
2023-06-28 11:13:05 +0200 | <tomsmeding> | mniip: how would you implement your accum such that it can accumulate into a cons list (of fixed length, I guess) in time O(list length + number of new values) |
2023-06-28 11:13:26 +0200 | <tomsmeding> | that's surely the easiest case to get efficient, and even there it won't be |
2023-06-28 11:15:08 +0200 | <mniip> | you mean the "slow" kind of length-indexed vector? |
2023-06-28 11:15:13 +0200 | <tomsmeding> | yeah |
2023-06-28 11:15:42 +0200 | <tomsmeding> | data Vec n a where { Nil :: Vec 0 a ; Cons :: a -> Vec n a -> Vec (1 + n) a } |
2023-06-28 11:15:51 +0200 | <int-e> | . o O ( accum' :: Ord (Rep f) => ... ) |
2023-06-28 11:15:57 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-163-231.46.114.pool.telefonica.de) |
2023-06-28 11:16:41 +0200 | ccapndave | (~ccapndave@xcpe-62-167-164-19.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-06-28 11:16:57 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 11:18:21 +0200 | <tomsmeding> | Enum (Rep f) |
2023-06-28 11:18:25 +0200 | <mniip> | use the ordering of Rep (Vec n a) that corresponds to the linked list structure to construct a Map (Rep (Vec n a)) (Endo a) that can be zipped with the list |
2023-06-28 11:18:47 +0200 | <mniip> | can't do much better I'm afraid |
2023-06-28 11:18:50 +0200 | <tomsmeding> | mniip: sure, but that's an implementation that's specific to Vec |
2023-06-28 11:18:58 +0200 | <mniip> | exactly |
2023-06-28 11:19:07 +0200 | <tomsmeding> | if you allow that, you can also do well for actual length-indexed Vec |
2023-06-28 11:19:10 +0200 | <mniip> | the specific implementation of accum is a customization point |
2023-06-28 11:19:17 +0200 | <mniip> | hence typeclass |
2023-06-28 11:19:20 +0200 | <tomsmeding> | using the mutable vector |
2023-06-28 11:19:53 +0200 | <mniip> | I guess I never brought that up in this conversation |
2023-06-28 11:20:00 +0200 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2023-06-28 11:20:04 +0200 | <mniip> | I want a typeclass on top of Representable whose method is accum |
2023-06-28 11:20:06 +0200 | <tomsmeding> | but like, if you allow it to be a typeclass, then there's no problem |
2023-06-28 11:20:20 +0200 | ccapndave | (~ccapndave@xcpe-62-167-164-19.cgn.res.adslplus.ch) |
2023-06-28 11:20:38 +0200 | <mniip> | another method could be (//) with a default of = accum (const id) |
2023-06-28 11:20:45 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
2023-06-28 11:21:46 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 11:22:51 +0200 | Lord_of_Life_ | Lord_of_Life |
2023-06-28 11:24:32 +0200 | ccapndave | (~ccapndave@xcpe-62-167-164-19.cgn.res.adslplus.ch) (Ping timeout: 240 seconds) |
2023-06-28 11:25:56 +0200 | <mniip> | even for a generic implementation there are a couple ways to do things that aren't strictly better than eachother |
2023-06-28 11:26:32 +0200 | <mniip> | you can tabulate-foldl: accum f r xs = tabulate \i -> foldl' f (index i r) $ map snd $ filter ((== i) . fst) |
2023-06-28 11:26:39 +0200 | <mniip> | or you can foldl-tabulate: accum f = foldl' \r (i, x) -> tabulate \j -> if i == j then f (index j r) x else index j r |
2023-06-28 11:27:14 +0200 | ft | (~ft@p508db151.dip0.t-ipconnect.de) (Quit: leaving) |
2023-06-28 11:27:18 +0200 | <mniip> | the first one is a good consumer of the list but will produce many intermediate copies of the functor |
2023-06-28 11:27:41 +0200 | <mniip> | the second one will not copy the functor but will retain the list in memory |
2023-06-28 11:28:04 +0200 | <mniip> | oops |
2023-06-28 11:28:06 +0200 | <mniip> | vice versa |
2023-06-28 11:29:03 +0200 | <mniip> | foldl-tabulate will fold well, tabulate-foldl will tabulate well |
2023-06-28 11:36:51 +0200 | <int-e> | I guess a full-blown abstraction would give you a mutable representation that lives in ST, along with thaw and freeze. |
2023-06-28 11:37:55 +0200 | <int-e> | Rather than this minimalistic function-based interface that is basically good for memoization and nothing else. |
2023-06-28 11:38:56 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-28 11:40:25 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 11:44:05 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 11:47:07 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-28 11:48:29 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2023-06-28 11:51:05 +0200 | jstolarek | (~jstolarek@staticline-31-183-152-161.toya.net.pl) |
2023-06-28 11:52:21 +0200 | jstolarek | (~jstolarek@staticline-31-183-152-161.toya.net.pl) (Client Quit) |
2023-06-28 11:52:48 +0200 | <ncf> | why not https://hackage.haskell.org/package/array-0.5.5.0/docs/Data-Array-IArray.html ? |
2023-06-28 11:52:57 +0200 | <ncf> | can Vector implement that? |
2023-06-28 11:53:16 +0200 | <int-e> | it's not about vector... vectors are just an example |
2023-06-28 11:53:49 +0200 | kupenske_oplatky | (~priesvitn@192.216.99.34.bc.googleusercontent.com) |
2023-06-28 11:56:18 +0200 | priesvitne_sklo | (~priesvitn@192.216.99.34.bc.googleusercontent.com) (Ping timeout: 260 seconds) |
2023-06-28 11:57:00 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 11:57:32 +0200 | <mniip> | ncf, IArray is more about using a big datatype like Int as an index and selecting a subrange of it |
2023-06-28 11:57:47 +0200 | <mniip> | Representable is about using an index that's exactly as large as it needs to be |
2023-06-28 11:58:03 +0200 | <jade[m]> | for all it's beauty and simplicity in concept ... parser combinators are really fucking annoying to work with so far |
2023-06-28 11:58:26 +0200 | <jade[m]> | it's probably just a biased view because I kinda suck ... but there's so many things that you expect to work that just don't |
2023-06-28 11:59:34 +0200 | barcisz | (~barcisz@79.191.69.198.ipv4.supernova.orange.pl) (Quit: Connection closed) |
2023-06-28 12:02:35 +0200 | <merijn> | jade[m]: like? |
2023-06-28 12:03:26 +0200 | <merijn> | Also, the ease and pleasantness of parser combinators is strongly correlated with how well designed/thought out your grammar is :p |
2023-06-28 12:03:37 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-06-28 12:04:38 +0200 | <jade[m]> | I have no issues besides "ignoring" things, specifically saying "any other character besides .,<>[]+- is a comment" |
2023-06-28 12:04:55 +0200 | <jade[m]> | which is a fucking pain so far |
2023-06-28 12:05:36 +0200 | <merijn> | It shouldn't be? |
2023-06-28 12:05:39 +0200 | <jade[m]> | I'm currently trying to use a parser that simply ignores all characters that are not those explicitly, but then I have issues with eof again ... |
2023-06-28 12:06:34 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds) |
2023-06-28 12:07:13 +0200 | <ncf> | are you using parser combinators to parse brainfuck? |
2023-06-28 12:07:19 +0200 | <ncf> | why not like, filter |
2023-06-28 12:07:46 +0200 | <jade[m]> | ncf: just for fun |
2023-06-28 12:07:55 +0200 | <jade[m]> | and to like learn them |
2023-06-28 12:07:57 +0200 | <ncf> | oh ok |
2023-06-28 12:08:14 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 12:08:18 +0200 | <jade[m]> | yeah, I could just filter and then map |
2023-06-28 12:08:29 +0200 | <jade[m]> | with some minor parsing for loops |
2023-06-28 12:08:43 +0200 | <jade[m]> | s/minor/minor, manual/ |
2023-06-28 12:08:54 +0200 | barcisz | (~barcisz@79.191.69.198.ipv4.supernova.orange.pl) |
2023-06-28 12:10:32 +0200 | mikoto-chan | (~mikoto-ch@2001:999:250:4dd:a906:9bc2:bbb9:3aff) |
2023-06-28 12:11:03 +0200 | nut | (~nut@176-151-21-224.abo.bbox.fr) (Quit: WeeChat 3.5) |
2023-06-28 12:11:56 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-28 12:12:38 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 12:13:27 +0200 | talismanick | (~user@2601:204:ef01:8ca0::a3e7) (Remote host closed the connection) |
2023-06-28 12:13:40 +0200 | talismanick | (~user@2601:204:ef01:8ca0::a3e7) |
2023-06-28 12:16:07 +0200 | <merijn> | jade[m]: part of the problem is that brainfuck is so simple you get almost no off the convenience/power of parser combinators |
2023-06-28 12:16:13 +0200 | <merijn> | So of course it's gonna feel kinda scuffed |
2023-06-28 12:16:49 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) |
2023-06-28 12:17:13 +0200 | <jade[m]> | that's fair, yeah |
2023-06-28 12:17:22 +0200 | <mniip> | you'd have catMaybes <$> many ((Just <$> ((Inc <$ char '+') <|> ...)) <|> (Nothing <$ anyChar)) |
2023-06-28 12:17:28 +0200 | <mniip> | I don't see what the problem is |
2023-06-28 12:18:06 +0200 | <merijn> | mniip: That's because you're an expert ;) |
2023-06-28 12:18:12 +0200 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) |
2023-06-28 12:18:21 +0200 | <mniip> | an advanced intermediate beginner maybe |
2023-06-28 12:19:09 +0200 | talismanick | (~user@2601:204:ef01:8ca0::a3e7) (Read error: Connection reset by peer) |
2023-06-28 12:19:22 +0200 | talismanick | (~user@2601:204:ef01:8ca0::a3e7) |
2023-06-28 12:22:47 +0200 | <jade[m]> | <mniip> "you'd have catMaybes <$> many..." <- I wanted to try something along those lines but was too stupid haha |
2023-06-28 12:23:05 +0200 | <jade[m]> | I always forget catMaybes as a way to build a list from optional values |
2023-06-28 12:23:49 +0200 | <jade[m]> | thanks |
2023-06-28 12:25:23 +0200 | <jade[m]> | <mniip> "an advanced intermediate..." <- what does that make me, heh |
2023-06-28 12:26:09 +0200 | <mniip> | in lieu of "how to learn haskell in less that 5 years", I've been using haskell for about a decade now and sometimes I still feel like I know nothing |
2023-06-28 12:26:13 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 12:26:35 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) |
2023-06-28 12:28:12 +0200 | <jade[m]> | I guess that makes sense with the depth that haskell has |
2023-06-28 12:28:29 +0200 | <merijn> | mniip: See, I think all the people writing the complicated type level singletons stuff know nothing instead :p |
2023-06-28 12:29:34 +0200 | <jade[m]> | It just gives me some kind of existential crisis to hear all of this after learning haskell for like a year or so haha |
2023-06-28 12:29:52 +0200 | <mniip> | using parser combinators after a year is a good milestone |
2023-06-28 12:29:57 +0200 | <merijn> | Haskell is as complicated as you make it |
2023-06-28 12:30:04 +0200 | <merijn> | And some people just make it too complicated :p |
2023-06-28 12:30:15 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 12:30:30 +0200 | <mniip> | I hope that's not a stab at representable functors :P |
2023-06-28 12:31:11 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) (Ping timeout: 264 seconds) |
2023-06-28 12:31:39 +0200 | <jade[m]> | mniip: My journey so far has been fun, but I don't think follows the usual direction of learning haskell. I learned the basics and once I learned dependent types (sort of) existed went into those head-first with the ... expected ... outcome |
2023-06-28 12:32:01 +0200 | <jade[m]> | took a step back and learned the more usual things |
2023-06-28 12:33:20 +0200 | <jade[m]> | The biggest milestone was probably finally understanding monads which happened way to late and was sort of underwhelming |
2023-06-28 12:33:29 +0200 | <jade[m]> | "it's *just* that?" |
2023-06-28 12:33:40 +0200 | <merijn> | jade[m]: If it was underwhelming that probably means you got it right now :p |
2023-06-28 12:34:40 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 260 seconds) |
2023-06-28 12:35:10 +0200 | <jade[m]> | but yeah, sorry for my rambling up there haha |
2023-06-28 12:35:35 +0200 | <jade[m]> | tl;dr I love haskell it's just really complicated |
2023-06-28 12:35:36 +0200 | <ncf> | one does not simply understand monads |
2023-06-28 12:38:19 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2023-06-28 12:38:51 +0200 | <mniip> | you mean they're literally just monoids in the category of endofunctors? |
2023-06-28 12:39:56 +0200 | <jade[m]> | that originally took a bit longer to understand than the general concept but I think I get that one too (sort of, maybe, perhaps) by now |
2023-06-28 12:41:49 +0200 | <dminuoso> | If it hadnt been for that shrouded mystery of monads, I wouldnt have learned Haskell. |
2023-06-28 12:42:24 +0200 | <mniip> | I mean that's unironically how I think of them occasionally |
2023-06-28 12:42:55 +0200 | <mniip> | being able to "flatten" an arbitrary number of layers (maybe 0) into 1 in an associative/unital way |
2023-06-28 12:43:04 +0200 | <dminuoso> | The primary reason I learned it was because I felt challenged by the Haskell Book slogan "Perhaps you were just looking for the 18 billionth* monad tutorial, certain that this time around you will understand monads once and for all." and told myself, "Okay, whats the big fuzz. Let me just jump in and learn Monads without this book direcftly" |
2023-06-28 12:43:58 +0200 | __monty__ | (~toonn@user/toonn) |
2023-06-28 12:44:12 +0200 | <dminuoso> | And indeed, I dived into category theory for some 2-3 weeks, understood the joke somewhat, went back to the editor, and was unable to do anything with IO. |
2023-06-28 12:44:29 +0200 | <dminuoso> | It was very inefficent learning. |
2023-06-28 12:45:22 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) |
2023-06-28 12:46:38 +0200 | <mniip> | an interesting nuance is that programmers and mathematicians use monads for rather different purposes |
2023-06-28 12:46:45 +0200 | <mniip> | almost opposite purposes you could say |
2023-06-28 12:46:53 +0200 | <dminuoso> | mniip: The strange part about the mathematics of monad is that the laws that look a) beautiful but unrelatable in category theory, b) ugly and unrelatable in terms of (>>=) is just stuff we take for granted. |
2023-06-28 12:47:05 +0200 | <ncf> | mniip: why opposite? |
2023-06-28 12:47:12 +0200 | mikoto-chan | (~mikoto-ch@2001:999:250:4dd:a906:9bc2:bbb9:3aff) (Quit: WeeChat 3.8) |
2023-06-28 12:47:16 +0200 | <dminuoso> | Very roughly the associativity law is just another way of phrasing "inlining things doesnt alter the meaning" |
2023-06-28 12:47:49 +0200 | <dminuoso> | Or moving things into separate "routines/functions" does not alter the meaning. |
2023-06-28 12:48:09 +0200 | <mniip> | so there's a variety of ways to split a monad into an adjunction. Programmers mostly care about the kleisli category of a monad, which is sort of the initial splitting; mathematicians care about the category of algebras, which is the terminal splitting |
2023-06-28 12:48:35 +0200 | <ncf> | ah, that opposite |
2023-06-28 12:48:38 +0200 | <dminuoso> | mniip: Do you have a favoured view on applicatives? Do you also think of them as monoids in the category of endofunctors? |
2023-06-28 12:48:57 +0200 | <mniip> | no, it's weird and relates to strength of monads |
2023-06-28 12:49:22 +0200 | <mniip> | I almost never think about day convolutions if that's what you're asking |
2023-06-28 12:49:36 +0200 | <__monty__> | /wg 14 |
2023-06-28 12:49:49 +0200 | <__monty__> | Nothing to see here, carry on. |
2023-06-28 12:50:24 +0200 | <mniip> | rather I think of them as lax monoidal functors |
2023-06-28 12:50:39 +0200 | <mniip> | you have a family of liftA{n} that associate as much as possible |
2023-06-28 12:52:38 +0200 | <jade[m]> | I just sit there, banging two rocks together being like "`<*>` go brr" |
2023-06-28 12:52:48 +0200 | <jade[m]> | very different perspectives |
2023-06-28 12:53:12 +0200 | <mniip> | any non-recursive applicative computation can be rewritten as a liftA{n} of some "root" effects and a combining function, where n is statically known |
2023-06-28 12:53:47 +0200 | <danse-nr3> | what do you mean by liftA{n} there? |
2023-06-28 12:53:58 +0200 | <mniip> | the recursive case isn't qualitatively different it's just that you can't always untie an infinite knot :P |
2023-06-28 12:54:04 +0200 | <ncf> | :t liftA2 |
2023-06-28 12:54:06 +0200 | <lambdabot> | Applicative f => (a -> b -> c) -> f a -> f b -> f c |
2023-06-28 12:54:07 +0200 | <mniip> | liftA2, liftA3 etc |
2023-06-28 12:54:13 +0200 | <mniip> | liftA0 = pure, liftA1 = fmap |
2023-06-28 12:54:45 +0200 | <danse-nr3> | right was kind of obvious, thanks |
2023-06-28 12:57:48 +0200 | <danse-nr3> | i almost never use those liftA{n} functions |
2023-06-28 12:59:10 +0200 | barcisz | (~barcisz@79.191.69.198.ipv4.supernova.orange.pl) (Quit: Connection closed) |
2023-06-28 12:59:14 +0200 | <danse-nr3> | possibly because they are equivalent to composing with <$> and <*>? That approach looks more readable to me |
2023-06-28 13:00:31 +0200 | <mniip> | depends on if you're doing horizontal or vertical composition |
2023-06-28 13:00:55 +0200 | <mniip> | :t liftA2 . liftA2 . liftA2 |
2023-06-28 13:00:56 +0200 | <lambdabot> | (Applicative f1, Applicative f2, Applicative f3) => (a -> b -> c) -> f1 (f2 (f3 a)) -> f1 (f2 (f3 b)) -> f1 (f2 (f3 c)) |
2023-06-28 13:01:34 +0200 | <danse-nr3> | oooh |
2023-06-28 13:04:30 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 250 seconds) |
2023-06-28 13:05:08 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 240 seconds) |
2023-06-28 13:06:05 +0200 | <danse-nr3> | although a type like f3 (f2 (f1 a)) ... makes me think of monad stacks, otherwise it seems uncommon to compose through that many layers. Probably i have a view still attached to object-orientation, where adding a wrapper type, albeit polymorphic, still means one tends to keep functions on "enclosed" types inside an abstraction. But then, even the concept of "type wrapper" and "enclosed" types in an object-oriented perspective on these |
2023-06-28 13:06:25 +0200 | xff0x | (~xff0x@2405:6580:b080:900:18df:4359:44d4:6329) |
2023-06-28 13:06:33 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-06-28 13:06:42 +0200 | <danse-nr3> | * come from an object-oriented perspective on these |
2023-06-28 13:07:29 +0200 | <danse-nr3> | this mindset is hard to change ^^; |
2023-06-28 13:08:11 +0200 | <mniip> | I've seen people implement ad-hoc combinators like <<*>> on the spot |
2023-06-28 13:08:18 +0200 | <dminuoso> | I tend to think of Applicative as a conceptual parallelized mappend in the sense of liftA2 (,) |
2023-06-28 13:08:24 +0200 | <dminuoso> | % :t liftA2 (,) |
2023-06-28 13:08:25 +0200 | <yahb2> | <interactive>:1:1: error: ; Variable not in scope: liftA2 :: (a0 -> b0 -> (a0, b0)) -> t |
2023-06-28 13:08:29 +0200 | <dminuoso> | % import Control.Applicative |
2023-06-28 13:08:29 +0200 | <yahb2> | <no output> |
2023-06-28 13:08:31 +0200 | <dminuoso> | % :t liftA2 (,) |
2023-06-28 13:08:31 +0200 | <yahb2> | liftA2 (,) :: Applicative f => f a -> f b -> f (a, b) |
2023-06-28 13:08:42 +0200 | <dminuoso> | So often I think of this being the signature method of Applicative |
2023-06-28 13:08:43 +0200 | <mniip> | uncurry |
2023-06-28 13:09:05 +0200 | <mniip> | :t uncurry (liftA2 (,)) |
2023-06-28 13:09:06 +0200 | <lambdabot> | Applicative f => (f a, f b) -> f (a, b) |
2023-06-28 13:09:31 +0200 | <dminuoso> | Sure that works too. |
2023-06-28 13:09:32 +0200 | <mniip> | this is essentially the definition of "lax monoidal" |
2023-06-28 13:09:36 +0200 | <danse-nr3> | what confuses me about Applicative is that purescript has quite different definitions for these, and i tend to like those |
2023-06-28 13:09:47 +0200 | <danse-nr3> | * them |
2023-06-28 13:09:59 +0200 | <ncf> | :t pure @() |
2023-06-28 13:10:01 +0200 | <lambdabot> | error: |
2023-06-28 13:10:01 +0200 | <lambdabot> | Pattern syntax in expression context: pure@() |
2023-06-28 13:10:01 +0200 | <lambdabot> | Did you mean to enable TypeApplications? |
2023-06-28 13:10:03 +0200 | <mniip> | you have a Hom(FA (x) FB, F (A (x) B)), natural in A, B |
2023-06-28 13:10:03 +0200 | <dminuoso> | mniip: Im not too deeply familiar. In my mind its just that liftA2 (,) fully encapsulates the notion of parallel effects. |
2023-06-28 13:10:14 +0200 | <dminuoso> | Hence diamond. |
2023-06-28 13:10:31 +0200 | <mniip> | what does purescript use? |
2023-06-28 13:11:05 +0200 | <danse-nr3> | hmm have to look them up, but the diverging holds my mind from taking these abstractions too seriously |
2023-06-28 13:11:15 +0200 | <mniip> | dminuoso, same but in an 'n-ary' sense as opposed to a binary operation and a unit |
2023-06-28 13:11:33 +0200 | <mniip> | the difference between liftA2 and liftA2 (,) is just yoneda |
2023-06-28 13:12:27 +0200 | <dminuoso> | Right, the n-ary generalization stems from the isomorphism ((a,b),c) ~~~ (a,(b,c)) |
2023-06-28 13:12:40 +0200 | <dminuoso> | Regarding yoneda, Ill have to ponder about that relationship |
2023-06-28 13:12:54 +0200 | <danse-nr3> | purescript's Applicative just defines pure https://pursuit.purescript.org/packages/purescript-prelude/3.0.0/docs/Control.Applicative, being based on an Apply with apply :: forall b a. f (a -> b) -> f a -> f b |
2023-06-28 13:13:03 +0200 | <mniip> | I think they're called lawvere theories? |
2023-06-28 13:13:29 +0200 | <ncf> | that's just splitting the typeclass into two |
2023-06-28 13:13:53 +0200 | <danse-nr3> | yes, probably, but everyone's brain is different, that is quite meaningful to me |
2023-06-28 13:13:59 +0200 | <ncf> | pointed endofunctor and... semigroup in the category of endofunctors? |
2023-06-28 13:14:23 +0200 | acidjnk | (~acidjnk@p200300d6e7072f4300b5bf6655a1513c.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
2023-06-28 13:14:31 +0200 | <mniip> | rather than talking about a limited set of fixed arity operations (e.g. nullary pure and binary liftA2), you talk about operations of all arities at once |
2023-06-28 13:16:45 +0200 | <mniip> | been a while since I've read the relevant literature, but I find it useful to think about e.g. "ternary concatenation" on equal grounds with binary concatenation |
2023-06-28 13:16:59 +0200 | <mniip> | just the kinda lawvere vibe of it |
2023-06-28 13:17:30 +0200 | CiaoSen | (~Jura@2a05:5800:296:4300:664b:f0ff:fe37:9ef) (Ping timeout: 260 seconds) |
2023-06-28 13:18:34 +0200 | <mniip> | re: Applicative/Apply, there's a zoo of intermediate typeclasses you could come up with |
2023-06-28 13:18:40 +0200 | <mniip> | sometimes I wish haskell had more, but oh well |
2023-06-28 13:18:44 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 240 seconds) |
2023-06-28 13:19:47 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) |
2023-06-28 13:19:47 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host) |
2023-06-28 13:19:47 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-06-28 13:20:49 +0200 | <danse-nr3> | i was lost many messages ago, but intuitively i think if one has more essential, split classes, then they can be composed and made up a more powerful foundation. But of course purescript came later so it was easier for them |
2023-06-28 13:22:03 +0200 | <mniip> | groups have a few axioms, and you can pretty much toggle them on and off at will, yielding different algebraic objects |
2023-06-28 13:22:13 +0200 | <mniip> | e.g. this cube https://commons.wikimedia.org/wiki/File:Magma_to_group4.svg |
2023-06-28 13:22:29 +0200 | <mniip> | some of these tend to come up more, but doesn't mean the others are useless |
2023-06-28 13:23:25 +0200 | <ncf> | https://en.wikipedia.org/wiki/Template:Group-like_structures |
2023-06-28 13:23:31 +0200 | <mniip> | should we have a class for each of them? Should we have free constructions for every irreducible arrow? for every arrow? |
2023-06-28 13:23:51 +0200 | <mniip> | I don't know the answer |
2023-06-28 13:24:13 +0200 | <ncf> | i was investigating "free monad on a semigroupad" the other day |
2023-06-28 13:24:38 +0200 | <ncf> | i.e. the endofunctor equivalent of Semigroup a => Monoid (Maybe a) |
2023-06-28 13:25:05 +0200 | <ncf> | turns out it's a bit annoying because you need a sort of "quasijoin" operation m (Either a (m a)) -> m a |
2023-06-28 13:25:48 +0200 | <mniip> | by "semigroupad" you mean join but no return? |
2023-06-28 13:25:53 +0200 | <ncf> | yeah |
2023-06-28 13:26:08 +0200 | <mniip> | so you just need to adjoin an identity? |
2023-06-28 13:26:26 +0200 | <ncf> | yes, that's what Either a (m a) does |
2023-06-28 13:26:30 +0200 | <mniip> | doesn't data Free s a = Pure a | Effectful (s a) - |
2023-06-28 13:26:33 +0200 | <mniip> | yeah exactly |
2023-06-28 13:26:41 +0200 | <ncf> | now implement join |
2023-06-28 13:27:09 +0200 | <mniip> | ah of course |
2023-06-28 13:27:36 +0200 | <ncf> | it's quite interesting that you don't run into this problem with the usual "free monad on a (pointed) endofunctor" |
2023-06-28 13:28:00 +0200 | <ncf> | lists turn out to be better behaved than Maybes at the endofunctor-with-composition level |
2023-06-28 13:28:11 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
2023-06-28 13:28:57 +0200 | <mniip> | it's moreso that the free monad reassociates 1 + M + M.M + ... as 1 + M.(1 + M.( ... )) |
2023-06-28 13:29:12 +0200 | <ncf> | yeah |
2023-06-28 13:29:27 +0200 | <mniip> | or rather, that the first can be reassocaited into the second but not necessarily the other way around |
2023-06-28 13:30:04 +0200 | <ncf> | if M preserves coproducts then it works out, but that's rarely the case |
2023-06-28 13:30:21 +0200 | <ncf> | funnily enough i couldn't find an M that doesn't have a quasijoin : M.(1 + M) → M |
2023-06-28 13:31:15 +0200 | <ncf> | (obviously every monad has that, so i was looking among the `Bind`s-that-aren't-Monads, which there aren't many in haskell) |
2023-06-28 13:31:32 +0200 | <ncf> | notably Map k has that |
2023-06-28 13:33:41 +0200 | <mniip> | what about lists of even length |
2023-06-28 13:34:41 +0200 | <mniip> | it's a semigroupad because concatMap preserves the property, but you cannot join [pure (), [(), ()]] |
2023-06-28 13:35:14 +0200 | xff0x | (~xff0x@2405:6580:b080:900:18df:4359:44d4:6329) (Ping timeout: 260 seconds) |
2023-06-28 13:36:56 +0200 | xff0x | (~xff0x@2405:6580:b080:900:18df:4359:44d4:6329) |
2023-06-28 13:37:29 +0200 | <ncf> | oh nice |
2023-06-28 13:37:42 +0200 | <ncf> | clearly i didn't look very hard lol |
2023-06-28 13:37:50 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) |
2023-06-28 13:38:00 +0200 | CiaoSen | (~Jura@2a05:5800:296:4300:664b:f0ff:fe37:9ef) |
2023-06-28 13:41:02 +0200 | <mniip> | example from someone else: also Const Void |
2023-06-28 13:42:38 +0200 | ceoltb^ | (~ceoltb@24.125.210.85) (Ping timeout: 250 seconds) |
2023-06-28 13:43:05 +0200 | gemmaro | (~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) |
2023-06-28 13:43:22 +0200 | ceoltb^ | (~ceoltb@24.125.210.85) |
2023-06-28 13:43:33 +0200 | <ncf> | why doesn't absurd work? |
2023-06-28 13:44:21 +0200 | <mniip> | hmm? |
2023-06-28 13:44:56 +0200 | <mniip> | oh sorry, you do have quasijoin, it's just an example of a semigroupad |
2023-06-28 13:45:02 +0200 | <ncf> | right |
2023-06-28 13:45:48 +0200 | <ncf> | i think Const s is always an example if s is a semigroup |
2023-06-28 13:46:21 +0200 | <ncf> | er wait i'm thinking of Apply |
2023-06-28 13:51:01 +0200 | mon_aaraj | (~montchncs@2001:470:69fc:105::8e6b) (Server closed connection) |
2023-06-28 13:51:16 +0200 | mon_aaraj | (~montchncs@2001:470:69fc:105::8e6b) |
2023-06-28 13:51:44 +0200 | gnyeki | (~gnyeki@user/gnyeki) (Ping timeout: 250 seconds) |
2023-06-28 13:51:52 +0200 | gnyeki | (~gnyeki@li578-216.members.linode.com) |
2023-06-28 13:51:52 +0200 | gnyeki | (~gnyeki@li578-216.members.linode.com) (Changing host) |
2023-06-28 13:51:52 +0200 | gnyeki | (~gnyeki@user/gnyeki) |
2023-06-28 13:53:46 +0200 | mncheck-m | (~mncheck@193.224.205.254) (Read error: Connection reset by peer) |
2023-06-28 13:53:54 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 250 seconds) |
2023-06-28 13:54:06 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-06-28 13:59:58 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 14:00:22 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-06-28 14:03:47 +0200 | shailangsa | (~shailangs@host86-186-142-69.range86-186.btcentralplus.com) |
2023-06-28 14:04:38 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 14:08:21 +0200 | arkeet` | (~arkeet@moriya.ca) |
2023-06-28 14:08:38 +0200 | arkeet | (~arkeet@moriya.ca) (Ping timeout: 250 seconds) |
2023-06-28 14:08:38 +0200 | arkeet` | arkeet |
2023-06-28 14:11:08 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2023-06-28 14:14:54 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-28 14:14:57 +0200 | mmhat | (~mmh@p200300f1c722e40aee086bfffe095315.dip0.t-ipconnect.de) |
2023-06-28 14:14:58 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-06-28 14:16:02 +0200 | flupe15 | (~flupe@145.94.32.126) |
2023-06-28 14:16:45 +0200 | <flupe15> | Hello! Could anyone help me diagnose this regression in Haskell's type families over GADTS? https://gist.github.com/flupe/08a4c945723cd42fd1f7ddf8f20a2545 |
2023-06-28 14:16:52 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 250 seconds) |
2023-06-28 14:17:21 +0200 | <flupe15> | This code typechecked fine with GHC 8.10 but 9 and above no longer allows this "simple" code, as unifying indices properly seem to no longer work as required |
2023-06-28 14:17:52 +0200 | <flupe15> | has there been a known change to type-family/GADT pattern-matching unification? |
2023-06-28 14:19:03 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 14:19:25 +0200 | danse-nr3 | (~francesco@151.37.79.114) (Read error: Connection reset by peer) |
2023-06-28 14:20:49 +0200 | mmhat | (~mmh@p200300f1c722e40aee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 4.0.0) |
2023-06-28 14:26:44 +0200 | gensyst | (~gensyst@user/gensyst) |
2023-06-28 14:26:50 +0200 | connrs | (~connrs@user/connrs) (Ping timeout: 250 seconds) |
2023-06-28 14:27:05 +0200 | connrs_ | (~connrs@user/connrs) |
2023-06-28 14:27:11 +0200 | <gensyst> | Why is memory profiling (-hc) showing me this https://litter.catbox.moe/9r7mh7.png but top showing me over 5 GB of memory usage? How could this be happening? |
2023-06-28 14:27:42 +0200 | <gensyst> | According to the profile, the memory goes to max around 2 gigs and then drops, repeatedly |
2023-06-28 14:27:51 +0200 | <gensyst> | but according to top, the memory grows steadily and never drops |
2023-06-28 14:28:04 +0200 | connrs_ | connrs |
2023-06-28 14:28:22 +0200 | <gensyst> | s/2 gigs/1.5 gigs |
2023-06-28 14:30:54 +0200 | <lortabac> | gensyst: have you read this? https://downloads.haskell.org/ghc/latest/docs/users_guide/hints.html#hints-os-memory |
2023-06-28 14:32:21 +0200 | <merijn> | gensyst: because nothing is ever it simple as it seems and top's number aren't incorrect, just wildly poinltess/misleading |
2023-06-28 14:32:48 +0200 | <lortabac> | gensyst: also https://downloads.haskell.org/ghc/latest/docs/users_guide/runtime_control.html?highlight=delay#rts… |
2023-06-28 14:33:51 +0200 | <merijn> | I mean, there is, essentially 0 value in returning memory to the OS, beyond "making top show lower numbers" |
2023-06-28 14:34:18 +0200 | <merijn> | Well, I guess if you had truly giant livesets for a short while, returning stuff might ease pressure on swap |
2023-06-28 14:34:29 +0200 | <lortabac> | in general it's a bad idea to monitor an application's memory usage with top |
2023-06-28 14:34:36 +0200 | <lortabac> | in general I use EKG |
2023-06-28 14:34:40 +0200 | <gensyst> | lortabac, merijn thanks so much - no i had not seen that crucial info! |
2023-06-28 14:34:55 +0200 | <gensyst> | however, shouldn't there be at least SOME drop in top memory use, based on those profile drops? |
2023-06-28 14:35:00 +0200 | <gensyst> | or no drops at all? |
2023-06-28 14:35:02 +0200 | <gensyst> | (by default) |
2023-06-28 14:36:09 +0200 | <lortabac> | I don't know |
2023-06-28 14:36:31 +0200 | <merijn> | gensyst: Depends which top column you're looking at? |
2023-06-28 14:36:44 +0200 | <gensyst> | merijn, MEM% |
2023-06-28 14:36:51 +0200 | <gensyst> | sorry %MEM |
2023-06-28 14:38:56 +0200 | codolio | (~dolio@130.44.134.54) |
2023-06-28 14:38:58 +0200 | dolio | (~dolio@130.44.134.54) (Ping timeout: 250 seconds) |
2023-06-28 14:39:11 +0200 | <gensyst> | i'm literally seeing 50% memory use, just because i run it long enough, (even though profiling imagine shows no leaks, as mentioned) |
2023-06-28 14:39:30 +0200 | <gensyst> | is this expected? is this happening because linux memory management is smart enough? |
2023-06-28 14:39:43 +0200 | <gensyst> | and e.g. it would get freed if other programs wanted the ram? |
2023-06-28 14:39:57 +0200 | <gensyst> | but it stays at 50% and grows even more because nobody else wants the memory? |
2023-06-28 14:40:06 +0200 | xff0x | (~xff0x@2405:6580:b080:900:18df:4359:44d4:6329) (Ping timeout: 260 seconds) |
2023-06-28 14:41:32 +0200 | <merijn> | I need to check what top's MEM even refers too |
2023-06-28 14:41:48 +0200 | <mniip> | flupe15, you need to either enable CUSKs (deprecated I think?), or write a standalone kind signature: type ConsTree :: forall a n b. Tree a n -> BRAL a n b -> BRAL a n (Bsucc b); type family ConsTree t ral where ... |
2023-06-28 14:41:49 +0200 | xff0x | (~xff0x@ai098135.d.east.v6connect.net) |
2023-06-28 14:42:44 +0200 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2023-06-28 14:43:00 +0200 | <_________> | gensyst: you can have no memory leaks and unbounded memory usage at the same time. if the memory usage of your program grows over time you might have a problem ;) |
2023-06-28 14:43:15 +0200 | <merijn> | The profile isn't unbounded, though |
2023-06-28 14:43:21 +0200 | <merijn> | At any rate, this is weird |
2023-06-28 14:43:47 +0200 | <merijn> | According to my top manual,. %MEM is showing resident memory |
2023-06-28 14:43:56 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds) |
2023-06-28 14:44:17 +0200 | <merijn> | So if the profile is going up to 1.2GB then this has to be some tiny machine with 3-4 GB RAM? Is this a Pi or something? |
2023-06-28 14:44:36 +0200 | <merijn> | Or, alternate hypothesis |
2023-06-28 14:44:43 +0200 | <merijn> | You have a memory leak in non-Haskell code |
2023-06-28 14:45:02 +0200 | <jade[m]> | <mniip> "you'd have catMaybes <$> many..." <- I tried this btw and have the same issues with unexpected eof's when it should (?) work |
2023-06-28 14:45:09 +0200 | <gensyst> | it's machine with 20gb ram. only haskell code. |
2023-06-28 14:45:11 +0200 | <jade[m]> | im probably doing something stupidly wrong |
2023-06-28 14:45:20 +0200 | <merijn> | gensyst: *something* is off |
2023-06-28 14:45:21 +0200 | <mniip> | jade[m], what parsing combinator library are you using |
2023-06-28 14:45:33 +0200 | <merijn> | There's no way that profile of 1.2GB should report 50% RES o.O |
2023-06-28 14:45:46 +0200 | <merijn> | jade[m]: Are you terminating your parser with eof? |
2023-06-28 14:45:47 +0200 | <mniip> | there's a good chance you're being bitten by unintuitive semantics of <|> |
2023-06-28 14:45:54 +0200 | incertia | (~incertia@209.122.71.127) (Ping timeout: 250 seconds) |
2023-06-28 14:46:05 +0200 | incertia_ | (~incertia@209.122.71.127) |
2023-06-28 14:46:06 +0200 | <jade[m]> | that's what I was pointed at before and it didn't really help |
2023-06-28 14:46:11 +0200 | <jade[m]> | merijn: yes |
2023-06-28 14:46:26 +0200 | <merijn> | Can you pastebin the entire code and test input + error? |
2023-06-28 14:46:29 +0200 | incertia_ | incertia |
2023-06-28 14:46:32 +0200 | <jade[m]> | jade[m]: I tried `try` but I was also told that wasn't gonna be enozgh |
2023-06-28 14:46:39 +0200 | <jade[m]> | merijn: sure, give me a second |
2023-06-28 14:46:52 +0200 | <mniip> | does the "comment" anyChar perchance take precedence over ']' |
2023-06-28 14:46:53 +0200 | <gensyst> | Apologies for mentioning 50% (that was a number from another production program). In my example program, it was lower. merijn, it should report a max of 4x right? 4.8gb max. So that's in line with the 5gb i mentioned in my first comment above. right? |
2023-06-28 14:47:00 +0200 | <lortabac> | flupe15: I'd open an issue on the GHC repo |
2023-06-28 14:47:14 +0200 | <flupe15> | mniip: thanks indeed a standalone kind signature did the trick! still, given the errors produced by ghc i wouldn't have expected this to be the problem |
2023-06-28 14:47:39 +0200 | <merijn> | gensyst: Can you run the test with "+RTS -sstderr" and pastebin the output? |
2023-06-28 14:48:02 +0200 | <mniip> | I'm not 100% sure what it's trying to do without CUSKs or StandaloneKindSignatures |
2023-06-28 14:48:25 +0200 | <jade[m]> | mniip: it shouldn't as I first try to parse one of `+-<>,.` and then `[` stuff `]` *and then* anything else |
2023-06-28 14:48:29 +0200 | <jade[m]> | but let me just paste this |
2023-06-28 14:49:05 +0200 | <mniip> | yes but if you have "[foo]" then it might parse ] as a comment and then be like where's the closing ]? |
2023-06-28 14:49:59 +0200 | <jade[m]> | https://paste.tomsmeding.com/qogYMcXD |
2023-06-28 14:50:05 +0200 | <mniip> | if you have stuff = `+-<>,.` <|> `[` stuff `]` <|> anything else, then the inner invocation of stuff will consider ] a comment and break the outer |
2023-06-28 14:50:48 +0200 | <mniip> | yes that's exactly what's going on in your code |
2023-06-28 14:51:25 +0200 | <jade[m]> | ok, what can I do about that= |
2023-06-28 14:51:29 +0200 | <jade[m]> | s/=/? |
2023-06-28 14:52:07 +0200 | <ncf> | exclude ] from comments, or `try` harder |
2023-06-28 14:52:30 +0200 | <mniip> | refactor the grammar |
2023-06-28 14:53:11 +0200 | <jade[m]> | I'll try, thanks for the hints |
2023-06-28 14:53:20 +0200 | <jade[m]> | pun not intended |
2023-06-28 14:53:54 +0200 | <mniip> | loop = `[` (manyTill `]` atom); atom = `+-<>,.` | loop | comment |
2023-06-28 14:54:12 +0200 | Guest|65 | (~Guest|65@130.41.120.97) |
2023-06-28 14:54:48 +0200 | <mniip> | your issue would be solved if you had a fully backtracking parser (as ncf alluded to), but I think in this case that would be prohibitively expensive |
2023-06-28 14:55:12 +0200 | <jade[m]> | yeah, at that point I would be much better off just doing it manually |
2023-06-28 14:56:54 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) (Ping timeout: 260 seconds) |
2023-06-28 14:58:16 +0200 | <jade[m]> | mniip: this is already what my AST looks like, atleast |
2023-06-28 14:58:51 +0200 | <mniip> | `Z = many Y <* X` corresponds to `Z -> W X, W -> Y W | epsilon` aka `Z -> Y Z | X` |
2023-06-28 14:59:25 +0200 | <mniip> | you want `Z -> X | Y Z` instead, so that considering ] a closing bracket rather than a comment is the leftmost derivation |
2023-06-28 14:59:37 +0200 | <mniip> | that's what `Z = manyTill X Y` does |
2023-06-28 15:00:02 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 15:00:14 +0200 | <jade[m]> | ok that actually makes a lot of sense (I think) |
2023-06-28 15:00:28 +0200 | <jade[m]> | we recently had grammars in class and it was explained horribly |
2023-06-28 15:02:48 +0200 | <mniip> | caveat: "]" is still a valid program because it will be considered a comment |
2023-06-28 15:04:40 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) (Remote host closed the connection) |
2023-06-28 15:05:12 +0200 | <jade[m]> | and you'd solve that by saying "a comment is anything but ]"? |
2023-06-28 15:06:42 +0200 | <mniip> | can't think of any other good way |
2023-06-28 15:07:06 +0200 | <ncf> | you could separate lexing from parsing, as the former is really just filter |
2023-06-28 15:07:25 +0200 | <mniip> | you could use a syntactic monoid :) |
2023-06-28 15:07:33 +0200 | <ncf> | then you don't have to deal with comments in parsing at all, so no risk of treating ] as a comment |
2023-06-28 15:08:06 +0200 | <ncf> | mniip: wouldn't that only recognise regular languages |
2023-06-28 15:08:26 +0200 | <mniip> | it wouldn't be a finite monoid |
2023-06-28 15:08:32 +0200 | <ncf> | oh right |
2023-06-28 15:08:49 +0200 | <mniip> | this is like the bicyclic monoid but with data |
2023-06-28 15:08:57 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 245 seconds) |
2023-06-28 15:09:58 +0200 | <mniip> | I guess the bottom line is that you should make up your mind, what comes first: the balanced paren structure of [ ], or the fact that everything that doesn't parse is a comment? |
2023-06-28 15:10:10 +0200 | <mniip> | these are conflicting requirements |
2023-06-28 15:10:57 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Remote host closed the connection) |
2023-06-28 15:11:20 +0200 | <jade[m]> | mhm I understand |
2023-06-28 15:11:28 +0200 | <jade[m]> | this was very helpful, thanks a bunch |
2023-06-28 15:11:43 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 15:16:57 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) |
2023-06-28 15:18:27 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 15:21:52 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
2023-06-28 15:23:08 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2023-06-28 15:23:10 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds) |
2023-06-28 15:23:59 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2023-06-28 15:24:01 +0200 | shriekingnoise | (~shrieking@186.137.175.87) |
2023-06-28 15:25:47 +0200 | mechap | (~mechap@user/mechap) (Ping timeout: 264 seconds) |
2023-06-28 15:26:15 +0200 | mechap | (~mechap@user/mechap) |
2023-06-28 15:29:05 +0200 | ystael | (~ystael@user/ystael) |
2023-06-28 15:29:14 +0200 | <mniip> | jade[m], https://play.haskell.org/saved/RzdgtGxy |
2023-06-28 15:30:39 +0200 | <jade[m]> | Thanks for making me feel stupid 😭 |
2023-06-28 15:30:47 +0200 | <jade[m]> | (/j) |
2023-06-28 15:31:46 +0200 | flupe15 | (~flupe@145.94.32.126) (Quit: Client closed) |
2023-06-28 15:32:16 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 250 seconds) |
2023-06-28 15:32:34 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) |
2023-06-28 15:32:34 +0200 | dibblego | (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host) |
2023-06-28 15:32:35 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-06-28 15:33:38 +0200 | <ncf> | cute |
2023-06-28 15:34:05 +0200 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
2023-06-28 15:34:05 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-06-28 15:34:06 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-06-28 15:34:06 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-28 15:34:06 +0200 | <mniip> | this is really useful if you want to have efficient updating of syntax highlighting as you edit, or intellisense |
2023-06-28 15:34:08 +0200 | <mniip> | for brainfuck |
2023-06-28 15:34:31 +0200 | <ncf> | definitely must-haves |
2023-06-28 15:36:15 +0200 | <ncf> | tentative explanation: a (potentially incomplete) brainfuck program has the form ...]...]...[...[... where each of the ... stands for a valid brainfuck program; Syn represents that, where the first series of ... before ] are in the first list and the last series of ... after [ are in the second list; you can then combine Syns recursively in a straightforward way, and extract a valid program from a |
2023-06-28 15:36:16 +0200 | <ncf> | Syn if both lists are empty (thus [] are balanced) |
2023-06-28 15:37:00 +0200 | <ncf> | each character embeds as a Syn, where ] has a single incomplete program to the left and nothing in the middle and vice-versa for [ |
2023-06-28 15:41:21 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-28 15:43:06 +0200 | canta | (~canta@user/canta) (Ping timeout: 250 seconds) |
2023-06-28 15:43:32 +0200 | df | (~ben@justworks.xyz) (Ping timeout: 250 seconds) |
2023-06-28 15:44:24 +0200 | mei | (~mei@user/mei) (Ping timeout: 250 seconds) |
2023-06-28 15:45:25 +0200 | df | (~ben@justworks.xyz) |
2023-06-28 15:46:21 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-28 15:48:37 +0200 | mei | (~mei@user/mei) |
2023-06-28 15:50:28 +0200 | Guest|65 | (~Guest|65@130.41.120.97) (Ping timeout: 250 seconds) |
2023-06-28 15:51:45 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
2023-06-28 15:53:06 +0200 | captnemo | (~captnemo@193.32.127.239) |
2023-06-28 15:54:22 +0200 | cfricke | (~cfricke@user/cfricke) (Ping timeout: 250 seconds) |
2023-06-28 15:54:32 +0200 | stallmanator2 | (~stallmana@user/stallmanator) |
2023-06-28 15:54:40 +0200 | cfricke | (~cfricke@user/cfricke) |
2023-06-28 15:55:52 +0200 | canta | (~canta@user/canta) |
2023-06-28 15:56:06 +0200 | stallmanator | (~stallmana@user/stallmanator) (Ping timeout: 250 seconds) |
2023-06-28 15:56:06 +0200 | stallmanator2 | stallmanator |
2023-06-28 15:58:32 +0200 | ridcully_ | (~ridcully@p57b52f2c.dip0.t-ipconnect.de) |
2023-06-28 15:58:35 +0200 | amir | (sid22336@user/amir) (Server closed connection) |
2023-06-28 15:58:44 +0200 | amir | (sid22336@user/amir) |
2023-06-28 16:00:00 +0200 | ridcully | (~ridcully@p57b52f2c.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2023-06-28 16:00:17 +0200 | haritz | (~hrtz@user/haritz) (Quit: ZNC 1.8.2+deb2 - https://znc.in) |
2023-06-28 16:00:29 +0200 | haritz | (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) |
2023-06-28 16:00:30 +0200 | haritz | (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host) |
2023-06-28 16:00:30 +0200 | haritz | (~hrtz@user/haritz) |
2023-06-28 16:02:10 +0200 | jle` | (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 250 seconds) |
2023-06-28 16:03:09 +0200 | Xe | (~cadey@tailscale/xe) |
2023-06-28 16:04:01 +0200 | jle` | (~jle`@cpe-23-240-75-236.socal.res.rr.com) |
2023-06-28 16:04:19 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 16:05:01 +0200 | andreas303 | (andreas303@is.drunk.and.ready-to.party) (Server closed connection) |
2023-06-28 16:05:07 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2023-06-28 16:05:08 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2023-06-28 16:05:12 +0200 | allbery_b | geekosaur |
2023-06-28 16:05:21 +0200 | andreas303 | (andreas303@is.drunk.and.ready-to.party) |
2023-06-28 16:07:22 +0200 | barcisz | (~barcisz@public-gprs657031.centertel.pl) |
2023-06-28 16:10:07 +0200 | gemmaro | (~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) (Remote host closed the connection) |
2023-06-28 16:12:15 +0200 | johnw | (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Ping timeout: 260 seconds) |
2023-06-28 16:16:46 +0200 | YoungFrog | (~youngfrog@2a02:a03f:ca07:f900:9506:825b:e271:15c3) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in) |
2023-06-28 16:17:06 +0200 | YoungFrog | (~youngfrog@2a02:a03f:ca07:f900:3d0c:c380:8be9:54d4) |
2023-06-28 16:22:06 +0200 | xff0x | (~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 250 seconds) |
2023-06-28 16:24:12 +0200 | xff0x | (~xff0x@ai098135.d.east.v6connect.net) |
2023-06-28 16:24:35 +0200 | ubert | (~Thunderbi@p200300ecdf0b5713a8f894b1f77d0827.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
2023-06-28 16:24:36 +0200 | barcisz | (~barcisz@public-gprs657031.centertel.pl) (Quit: Connection closed) |
2023-06-28 16:24:36 +0200 | ubert1 | ubert |
2023-06-28 16:25:19 +0200 | ub | (~Thunderbi@p200300ecdf0b57c57ef837ab9eeb4127.dip0.t-ipconnect.de) |
2023-06-28 16:27:05 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) |
2023-06-28 16:27:26 +0200 | danse-nr3 | (~francesco@151.35.81.64) |
2023-06-28 16:29:43 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-28 16:30:24 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 16:33:06 +0200 | acidjnk | (~acidjnk@p200300d6e7072f43a445df600121d0b6.dip0.t-ipconnect.de) |
2023-06-28 16:34:11 +0200 | cfricke | (~cfricke@user/cfricke) (Ping timeout: 264 seconds) |
2023-06-28 16:37:11 +0200 | CiaoSen | (~Jura@2a05:5800:296:4300:664b:f0ff:fe37:9ef) (Ping timeout: 246 seconds) |
2023-06-28 16:37:14 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 260 seconds) |
2023-06-28 16:42:35 +0200 | mithromdir | (uid591745@user/mithromdir) |
2023-06-28 16:45:04 +0200 | anpad | (~pandeyan@user/anpad) (Ping timeout: 250 seconds) |
2023-06-28 16:45:15 +0200 | pandeyan | (~pandeyan@135-180-53-134.fiber.dynamic.sonic.net) |
2023-06-28 16:47:32 +0200 | biberu\ | (~biberu@user/biberu) |
2023-06-28 16:49:07 +0200 | <Guillaum[m]> | Do you know an easy way to detect that a symbol is imported from a reexport and that it exists another import which may reduce my dependencies. For example, if I import "foo" in module C from module B, but that's actually a reexport from module A, importing it directly from A instead of B would lead to reduced dependencies, rebuild, ... |
2023-06-28 16:50:42 +0200 | ByronJohnson | (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Ping timeout: 250 seconds) |
2023-06-28 16:51:08 +0200 | biberu | (~biberu@user/biberu) (Ping timeout: 250 seconds) |
2023-06-28 16:51:08 +0200 | biberu\ | biberu |
2023-06-28 16:52:19 +0200 | ByronJohnson | (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) |
2023-06-28 16:54:32 +0200 | nick__ | (~nick@2600:8807:9084:7800:700f:eda2:f145:7a7) (Ping timeout: 240 seconds) |
2023-06-28 16:54:39 +0200 | ddellacosta | (~ddellacos@146.70.168.100) |
2023-06-28 16:55:54 +0200 | simpleauthority | (~simpleaut@user/simpleauthority) (Ping timeout: 250 seconds) |
2023-06-28 16:57:04 +0200 | simpleauthority | (~simpleaut@user/simpleauthority) |
2023-06-28 16:57:52 +0200 | dminuoso_ | (~dminuoso@user/dminuoso) |
2023-06-28 16:58:15 +0200 | dminuoso | (~dminuoso@user/dminuoso) (Read error: Connection reset by peer) |
2023-06-28 17:02:24 +0200 | opqdonut | (opqdonut@pseudo.fixme.fi) (Ping timeout: 250 seconds) |
2023-06-28 17:02:31 +0200 | opqdonut | (opqdonut@pseudo.fixme.fi) |
2023-06-28 17:05:59 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:b445:5ef3:652d:413b) (Quit: WeeChat 2.8) |
2023-06-28 17:08:54 +0200 | lawt | (~lawt@129.159.36.129) (Ping timeout: 250 seconds) |
2023-06-28 17:09:20 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 250 seconds) |
2023-06-28 17:09:34 +0200 | tomku | (~tomku@user/tomku) |
2023-06-28 17:10:51 +0200 | lawt | (~lawt@129.159.36.129) |
2023-06-28 17:12:48 +0200 | Midjak | (~Midjak@82.66.147.146) (Ping timeout: 250 seconds) |
2023-06-28 17:16:59 +0200 | <mniip> | Guillaum[m], this might backfire because some reexports are intentional |
2023-06-28 17:17:12 +0200 | <mniip> | I don't suppose you want to import Map from Data.Map.Internal, or seq from GHC.Prim |
2023-06-28 17:18:35 +0200 | captnemo | (~captnemo@193.32.127.239) (Ping timeout: 264 seconds) |
2023-06-28 17:19:16 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 17:19:18 +0200 | jespada | (~jespada@207.188.139.183) (Ping timeout: 250 seconds) |
2023-06-28 17:19:42 +0200 | mechap | (~mechap@user/mechap) (Ping timeout: 260 seconds) |
2023-06-28 17:20:35 +0200 | mechap | (~mechap@user/mechap) |
2023-06-28 17:24:04 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
2023-06-28 17:24:04 +0200 | jespada | (~jespada@207.188.139.183) |
2023-06-28 17:24:54 +0200 | codolio | dolio |
2023-06-28 17:24:56 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Ping timeout: 250 seconds) |
2023-06-28 17:27:08 +0200 | fweht | (uid404746@id-404746.lymington.irccloud.com) |
2023-06-28 17:28:22 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
2023-06-28 17:28:27 +0200 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) |
2023-06-28 17:28:51 +0200 | ubert | (~Thunderbi@2a02:8109:abc0:6434:ed16:f40d:d3f1:21f0) (Remote host closed the connection) |
2023-06-28 17:28:51 +0200 | ub | ubert |
2023-06-28 17:29:04 +0200 | ubert1 | (~Thunderbi@2a02:8109:abc0:6434:9beb:5d8a:2bea:fc3b) |
2023-06-28 17:29:42 +0200 | gnyeki | (~gnyeki@user/gnyeki) (Ping timeout: 250 seconds) |
2023-06-28 17:31:26 +0200 | gnyeki | (~gnyeki@li578-216.members.linode.com) |
2023-06-28 17:31:26 +0200 | gnyeki | (~gnyeki@li578-216.members.linode.com) (Changing host) |
2023-06-28 17:31:26 +0200 | gnyeki | (~gnyeki@user/gnyeki) |
2023-06-28 17:31:43 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2023-06-28 17:37:37 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2023-06-28 17:39:49 +0200 | mauke | (~mauke@user/mauke) |
2023-06-28 17:40:10 +0200 | captnemo | (~captnemo@193.32.127.239) |
2023-06-28 17:46:02 +0200 | barcisz | (~barcisz@pw-wifi1.wifi.pw.edu.pl) |
2023-06-28 17:49:52 +0200 | <gensyst> | What is the max memory usage of a Map (Data.Map.Strict) with 10,000 entries of type Map (ByteString, ByteString) Word16? |
2023-06-28 17:50:05 +0200 | <gensyst> | where both bytestrings are max 5 bytes long. |
2023-06-28 17:50:22 +0200 | <merijn> | gensyst: oh! |
2023-06-28 17:50:52 +0200 | <merijn> | gensyst: You never posted the "+RTS -sstderr" output, but *this* question gives me a whole new hypothesis |
2023-06-28 17:50:56 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 250 seconds) |
2023-06-28 17:51:09 +0200 | <merijn> | gensyst: are you, by any chance, parsing large-ish bytestrings into short chunks? |
2023-06-28 17:51:49 +0200 | <gensyst> | merijn, I'm only parsing files line by line (and those two bytestrings are just a part of each line) |
2023-06-28 17:52:02 +0200 | <gensyst> | but yeah those files are hundreds of megs each, but i don't see the problem because i'm streaming through them |
2023-06-28 17:52:09 +0200 | <gensyst> | i.e. nt reading them into ram at once |
2023-06-28 17:52:12 +0200 | <gensyst> | not* |
2023-06-28 17:52:18 +0200 | <merijn> | gensyst: Except...you might be :) |
2023-06-28 17:52:23 +0200 | <mauke> | theoretically unbounded |
2023-06-28 17:52:38 +0200 | <merijn> | gensyst: Chunks of ByteString are just indices into the bytestring you are parsing them from |
2023-06-28 17:52:52 +0200 | <merijn> | and the original BS can't be GCed until the references are |
2023-06-28 17:53:09 +0200 | <merijn> | gensyst: So, depending on how you parse those short 5 byte chunks, they *might* be keeping the entire line alive |
2023-06-28 17:53:18 +0200 | <merijn> | gensyst: Which would explain the giant saw-tooth memory profile |
2023-06-28 17:53:36 +0200 | <merijn> | gensyst: See also: https://hackage.haskell.org/package/bytestring-0.11.4.0/docs/Data-ByteString.html#v:copy |
2023-06-28 17:54:00 +0200 | <merijn> | gensyst: Additionally, for very short chunks there is also the ShortByteString type, which should have less overhead |
2023-06-28 17:54:41 +0200 | <mauke> | alternatively, Word64 |
2023-06-28 17:55:13 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) |
2023-06-28 17:57:19 +0200 | <gensyst> | thanks! this is very interesting. i'll look into this |
2023-06-28 17:57:33 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2023-06-28 17:58:28 +0200 | Sciencentistguy3 | (~sciencent@hacksoc/ordinary-member) |
2023-06-28 18:00:02 +0200 | Sciencentistguy | (~sciencent@hacksoc/ordinary-member) (Ping timeout: 250 seconds) |
2023-06-28 18:00:02 +0200 | Sciencentistguy3 | Sciencentistguy |
2023-06-28 18:00:46 +0200 | solaire | (~solaire@024-158-116-019.res.spectrum.com) |
2023-06-28 18:00:51 +0200 | zmt00 | (~zmt00@user/zmt00) |
2023-06-28 18:02:00 +0200 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 240 seconds) |
2023-06-28 18:02:11 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2023-06-28 18:05:47 +0200 | chele | (~chele@user/chele) (Remote host closed the connection) |
2023-06-28 18:06:32 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) (Remote host closed the connection) |
2023-06-28 18:07:02 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-06-28 18:08:15 +0200 | captnemo | (~captnemo@193.32.127.239) (Quit: WeeChat 3.8) |
2023-06-28 18:08:30 +0200 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1)) |
2023-06-28 18:08:42 +0200 | danse-nr3 | (~francesco@151.35.81.64) (Ping timeout: 250 seconds) |
2023-06-28 18:15:29 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 240 seconds) |
2023-06-28 18:16:45 +0200 | <gensyst> | merijn, This was it! Just adding copy for those two bytestrings fixed entire memory bloat. Thank you. |
2023-06-28 18:18:43 +0200 | connrs_ | (~connrs@user/connrs) |
2023-06-28 18:18:49 +0200 | captnemo | (~captnemo@193.32.127.239) |
2023-06-28 18:19:06 +0200 | connrs | (~connrs@user/connrs) (Ping timeout: 250 seconds) |
2023-06-28 18:19:12 +0200 | connrs_ | connrs |
2023-06-28 18:20:55 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-06-28 18:20:55 +0200 | captnemo | (~captnemo@193.32.127.239) (Remote host closed the connection) |
2023-06-28 18:21:18 +0200 | captnemo | (~captnemo@193.32.127.239) |
2023-06-28 18:24:57 +0200 | nick__ | (~nick@wsip-174-78-110-18.pn.at.cox.net) |
2023-06-28 18:25:21 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-28 18:26:18 +0200 | jespada | (~jespada@207.188.139.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-06-28 18:27:08 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-28 18:29:37 +0200 | <nick__> | I'm trying to make type b polymorphic with type a. I can do this easily using "type B = A" but then any function definition that is say b -> b a also will fit in. I assume I need to do something like "newtype B = A B", but then it seems that B isn't polymorphic with A and I get type errors. I could implement type classes, but I want B to be a subset of A but no object A to be a B. |
2023-06-28 18:31:52 +0200 | ddellacosta | (~ddellacos@146.70.168.100) (Ping timeout: 240 seconds) |
2023-06-28 18:34:03 +0200 | ddellacosta | (~ddellacos@146.70.166.10) |
2023-06-28 18:35:05 +0200 | nckx | (~nckx@tobias.gr) (Changing host) |
2023-06-28 18:35:05 +0200 | nckx | (~nckx@guix/contributor/nckx) |
2023-06-28 18:36:46 +0200 | barcisz | (~barcisz@pw-wifi1.wifi.pw.edu.pl) (Quit: Connection closed) |
2023-06-28 18:39:20 +0200 | titibandit | (~titibandi@user/titibandit) (Remote host closed the connection) |
2023-06-28 18:40:20 +0200 | thegeekinside | (~thegeekin@189.217.90.138) (Ping timeout: 250 seconds) |
2023-06-28 18:40:39 +0200 | thegeekinside | (~thegeekin@189.217.90.138) |
2023-06-28 18:44:05 +0200 | <ncf> | the key word you're looking for is "subtyping", and haskell does not have that |
2023-06-28 18:44:54 +0200 | <ski> | nick__ : it's unclear what you mean by "polymorphic" |
2023-06-28 18:45:06 +0200 | michalz | (~michalz@185.246.207.203) (Ping timeout: 250 seconds) |
2023-06-28 18:45:07 +0200 | <ncf> | yes it took me ages to parse |
2023-06-28 18:45:09 +0200 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
2023-06-28 18:45:18 +0200 | <ski> | what does "B isn't polymorphic with A" even mean ? |
2023-06-28 18:45:50 +0200 | michalz | (~michalz@185.246.207.217) |
2023-06-28 18:46:04 +0200 | <glguy> | I feel like I'd know about it if we did, but do we have something in base for doing checked numeric conversions where you get a Nothing if the value doesn't fit into the target type? |
2023-06-28 18:46:08 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-06-28 18:46:16 +0200 | <glguy> | other than me manually doing the bounds checks first |
2023-06-28 18:46:19 +0200 | <ski> | "I want B to be a subset of A but no object A to be a B." -- this implies that no object is of type `B', btw |
2023-06-28 18:47:47 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-28 18:48:42 +0200 | <Guillaum[m]> | mniip: you are right. Well, guess I'll have to write a manual tool with more smartness. |
2023-06-28 18:49:18 +0200 | <glguy> | Perhaps this is what we have: https://hackage.haskell.org/package/int-cast |
2023-06-28 18:49:47 +0200 | kupenske_oplatky | (~priesvitn@192.216.99.34.bc.googleusercontent.com) (Ping timeout: 264 seconds) |
2023-06-28 18:51:58 +0200 | ripspin | (~chatzilla@1.145.136.115) |
2023-06-28 18:52:02 +0200 | <nick__> | ski : what I mean by polymorphic is any time a appears in a function definition b can be used as an a as well. Literally the definition of the world b has "multiple forms." But I'm not looking for an equivalence between a and b (i.e. using type B = A). I'm looking for an implication (i.e. if I have a B, then I can give you an A, but if I give you an A, then it is not necessarily a B). |
2023-06-28 18:55:30 +0200 | <nick__> | "I want B to be a subset of A but no object A to be a B." -- this implies that no object is of type `B', btw" -- Not following you here. If you instantiate an object B then you have an object B, but it can also be an object A. If you instantiate an object A, then you do not necessarily get an object B (though, it does not mean that it can't be converted to an object B at least logically). |
2023-06-28 18:57:07 +0200 | <int-e> | But you wrote that you want "no object A to be a B". Evidently that's not what you meant. |
2023-06-28 18:58:40 +0200 | <nick__> | Yes that's correct |
2023-06-28 18:58:43 +0200 | tomsmeding | (~tomsmedin@static.21.109.88.23.clients.your-server.de) (Server closed connection) |
2023-06-28 18:58:58 +0200 | tomsmeding | (~tomsmedin@static.21.109.88.23.clients.your-server.de) |
2023-06-28 18:59:32 +0200 | <nick__> | the compiler would reject any object A with a function definition of B, but the comiler will not reject an object B when fed into a type definition of func :: A -> A |
2023-06-28 18:59:34 +0200 | danse-nr3 | (~francesco@151.35.67.174) |
2023-06-28 18:59:49 +0200 | ddrone[m] | (~ddronemat@2001:470:69fc:105::3:70d5) (Server closed connection) |
2023-06-28 19:00:02 +0200 | ddrone[m] | (~ddronemat@2001:470:69fc:105::3:70d5) |
2023-06-28 19:00:53 +0200 | <nick__> | ugh pasting shit from vim is such a pain, why do all pastebin sites suck. |
2023-06-28 19:02:00 +0200 | <ncf> | yes that particular shape of polymorphism is called subtyping. haskell has parametric polymorphism and typeclasses |
2023-06-28 19:02:41 +0200 | <nick__> | since it seems like there's some confusion here's what I'm looking to avoid https://paste.tomsmeding.com/vyVC1pY3 |
2023-06-28 19:02:49 +0200 | <nick__> | everything is equivalent |
2023-06-28 19:03:04 +0200 | <nick__> | I want String2 to imply String, but String to not imply String2 |
2023-06-28 19:03:06 +0200 | <nick__> | That's all |
2023-06-28 19:03:46 +0200 | <nick__> | ncf: so what I'm looking for is impossible in Haskell correct? |
2023-06-28 19:04:01 +0200 | <ncf> | yes |
2023-06-28 19:04:06 +0200 | <jade[m]> | why would you want that indirection |
2023-06-28 19:04:25 +0200 | <jade[m]> | is there any reasonable use-case where using a newtype isn't sufficient |
2023-06-28 19:04:26 +0200 | <nick__> | it doesn't matter why I'd want it if its impossible |
2023-06-28 19:04:38 +0200 | <nick__> | yes |
2023-06-28 19:04:42 +0200 | <nick__> | when using type is sufficient |
2023-06-28 19:04:44 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-28 19:04:59 +0200 | <mniip> | haskell has subtyping via specialization |
2023-06-28 19:05:03 +0200 | <ncf> | well you don't actually want to have a String2 type that's a subtype of String for no reason. what are you trying to accomplish? |
2023-06-28 19:05:31 +0200 | <mniip> | you can implicitly turn a `(forall a. F a)` into a `F ()` but not the other way around |
2023-06-28 19:11:33 +0200 | <nick__> | The thing is you can have mnay different kinds of strings. If you have a string of a regular form, it can be helpful keep that string separate from instances that may be malformed. For example, maybe you have an application that outputs yaml, json, or whatever. If the application encodes that string itself, then we can be sure its properly formed (assuming the code is correct), where if you're |
2023-06-28 19:11:34 +0200 | <nick__> | taking that string from an untrusted source (say from IO or something), then it doesn't make sense to make that a String2, but rather just a String. However, its inconvienient to create two functions for each String and String2. It makes more sense to write one function for a String, and String2 will just be recognized as a String. However, if you input a String into a function definition of |
2023-06-28 19:11:36 +0200 | <nick__> | String2, then I would expect the compiler to fail because if I verified that the String was properly formed, I would have made it a String2, and therefore the compiler will complain and rightfully so. I'm not really sure why asking this question is so confusing, what am I not communicating to you. |
2023-06-28 19:12:14 +0200 | <mniip> | In haskell you use newtypes for this purpose |
2023-06-28 19:12:16 +0200 | <jade[m]> | that sounds like a newtype wrapper |
2023-06-28 19:12:27 +0200 | <nick__> | But really, I'm not trying to examine the implementation details. I'm asking a specific question about haskell and types |
2023-06-28 19:12:41 +0200 | <mniip> | And yes you explicitly unwrap a VerifiedString into a String |
2023-06-28 19:12:42 +0200 | mechap | (~mechap@user/mechap) (Ping timeout: 245 seconds) |
2023-06-28 19:12:49 +0200 | <nick__> | the problem with using newtype though is that it then does not complain when you have a function definition using String2 |
2023-06-28 19:13:55 +0200 | mechap | (~mechap@user/mechap) |
2023-06-28 19:14:23 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2023-06-28 19:14:33 +0200 | <mniip> | type is a transparent alias and newtype is an opaque one |
2023-06-28 19:14:46 +0200 | <nick__> | https://paste.tomsmeding.com/UnpSeLJH |
2023-06-28 19:14:49 +0200 | <mniip> | You're asking for something that is half transparent half opaque? |
2023-06-28 19:15:00 +0200 | <nick__> | look charIter2 does not fail for String or [Char] |
2023-06-28 19:15:05 +0200 | <nick__> | That is not the functionality I'm looking for |
2023-06-28 19:15:44 +0200 | <nick__> | I'm looking for charIter to succeed with String String2 [Char] but charIter must fail with String and [Char] and only succeed with String2 |
2023-06-28 19:16:11 +0200 | <nick__> | however, when you use newtype, then using charIter2 with String2 gives a type error. |
2023-06-28 19:17:11 +0200 | <mniip> | newtype is how people normally do it |
2023-06-28 19:17:36 +0200 | <nick__> | https://paste.tomsmeding.com/W5h4KT61 |
2023-06-28 19:17:36 +0200 | <mniip> | subtyping is fundamentally in conflict with bidirectional type inference |
2023-06-28 19:18:13 +0200 | <nick__> | Now with that newtype declaration String2 breask when trying to use charIter, resulting in having to create two different functions that do the same thing. |
2023-06-28 19:18:48 +0200 | <nick__> | but using newtype I think you have to use typeclasses correct? |
2023-06-28 19:18:57 +0200 | <nick__> | and implement each one |
2023-06-28 19:18:59 +0200 | <mniip> | "have to"? |
2023-06-28 19:19:06 +0200 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2023-06-28 19:19:22 +0200 | <nick__> | well otherwise how would the compiler know how to apply a String function to String2? |
2023-06-28 19:19:35 +0200 | <mniip> | You tell it explicitly to unwrap |
2023-06-28 19:19:39 +0200 | <nick__> | look at my last pastebin |
2023-06-28 19:19:43 +0200 | <nick__> | it breaks using newtype |
2023-06-28 19:19:47 +0200 | <mniip> | I know |
2023-06-28 19:20:04 +0200 | <ncf> | yes, if you want to be able to call the same function on String and String2 you need a typeclass |
2023-06-28 19:20:38 +0200 | <ncf> | sadly IsString only has fromString |
2023-06-28 19:20:42 +0200 | <nick__> | but then you got to do something like deriving (Show) or whatever functionality you want to be applied, and change the function definitions accordingly? |
2023-06-28 19:21:02 +0200 | <nick__> | you can't just use charIter :: String -> IO() correct? |
2023-06-28 19:21:35 +0200 | <ncf> | yeah, if you want to use charIter :: String -> IO () then you have to use charIter . toString |
2023-06-28 19:22:09 +0200 | <nick__> | resulting in two functions which is the newtype wrapper you're talking about? |
2023-06-28 19:22:37 +0200 | <nick__> | Its still better than copy/pasting the entire function though |
2023-06-28 19:23:20 +0200 | <mniip> | Depending on the use case I would not even define a second function |
2023-06-28 19:23:27 +0200 | <mniip> | Just unwrap at use sites |
2023-06-28 19:24:14 +0200 | byte | (~byte@user/byte) (Quit: Quitting...) |
2023-06-28 19:24:34 +0200 | byte | (~byte@user/byte) |
2023-06-28 19:24:39 +0200 | <mniip> | If that's prohibitive, make a helper function |
2023-06-28 19:25:01 +0200 | <jade[m]> | with a newtype you can also coerce |
2023-06-28 19:25:03 +0200 | <mniip> | If it's imperative that the two functions be named the same, make a typeclass method |
2023-06-28 19:25:19 +0200 | <mniip> | coerce kind of defeats the purpose of the newtype somewhat |
2023-06-28 19:26:22 +0200 | ubert1 | (~Thunderbi@2a02:8109:abc0:6434:9beb:5d8a:2bea:fc3b) (Remote host closed the connection) |
2023-06-28 19:26:58 +0200 | <mniip> | Again, XY problem here, what do you *actually* need to do? |
2023-06-28 19:29:35 +0200 | <nick__> | this is what I actually need to do |
2023-06-28 19:29:41 +0200 | <nick__> | I'm not sure what your question is |
2023-06-28 19:29:53 +0200 | <nick__> | I want to understand how the typing system works |
2023-06-28 19:30:16 +0200 | <nick__> | Not following why you need an actual usecase, its just about not having a million type definitions everywhere |
2023-06-28 19:30:29 +0200 | <jade[m]> | you can just use the type itself then |
2023-06-28 19:30:32 +0200 | <nick__> | yo |
2023-06-28 19:30:37 +0200 | <nick__> | that doesn't work |
2023-06-28 19:30:41 +0200 | <nick__> | because its an equivalence |
2023-06-28 19:30:46 +0200 | <nick__> | I might as well not have String2 then |
2023-06-28 19:30:54 +0200 | <nick__> | because everything is just like String |
2023-06-28 19:30:57 +0200 | <jade[m]> | yes, type is an alias |
2023-06-28 19:31:04 +0200 | <nick__> | exactly I dont want an alias |
2023-06-28 19:31:08 +0200 | <nick__> | I've said as much |
2023-06-28 19:31:11 +0200 | <mniip> | Ok so, "how the typesystem works" is we have opaque and transparent aliases |
2023-06-28 19:31:17 +0200 | <mniip> | But not whatever you want |
2023-06-28 19:31:29 +0200 | <nick__> | that means nothing to me, perhaps you could explain? |
2023-06-28 19:31:38 +0200 | <nick__> | how that even relates to what I'm doing |
2023-06-28 19:32:12 +0200 | <mauke> | you're not doing anything, you're just trying to understand the type system |
2023-06-28 19:32:13 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
2023-06-28 19:32:31 +0200 | <nick__> | yeah so I can properly use types and not have a million function definitions everywhere |
2023-06-28 19:32:43 +0200 | <mniip> | newtype is opaque: you need to explicitly wrap and unwrap, type is transparent: both happen implicitly |
2023-06-28 19:32:44 +0200 | mechap | (~mechap@user/mechap) (Quit: WeeChat 4.0.0) |
2023-06-28 19:32:49 +0200 | <jade[m]> | I think they are asking for what you acttually need |
2023-06-28 19:32:54 +0200 | <mauke> | well, the easiest way to not have a million definitions is ... to not do that |
2023-06-28 19:33:01 +0200 | <mniip> | You want one side to be explicit and the other implicit, we don't have that |
2023-06-28 19:33:19 +0200 | <nick__> | mauke: exactly! |
2023-06-28 19:33:28 +0200 | <nick__> | now you're speaking my language! |
2023-06-28 19:33:37 +0200 | <mauke> | <nick__> ugh pasting shit from vim is such a pain <- if you're running vim locally, you should be able to use its clipboard integration (even in a terminal) |
2023-06-28 19:33:54 +0200 | <mauke> | also known as "+y |
2023-06-28 19:34:32 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-28 19:36:58 +0200 | AlexNoo_ | (~AlexNoo@94.233.241.5) |
2023-06-28 19:37:25 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 19:38:24 +0200 | AlexZenon | (~alzenon@178.34.150.66) (Ping timeout: 250 seconds) |
2023-06-28 19:39:14 +0200 | ft | (~ft@p508db151.dip0.t-ipconnect.de) |
2023-06-28 19:39:53 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2023-06-28 19:40:12 +0200 | AlexNoo | (~AlexNoo@178.34.150.66) (Ping timeout: 240 seconds) |
2023-06-28 19:40:47 +0200 | Alex_test | (~al_test@178.34.150.66) (Ping timeout: 264 seconds) |
2023-06-28 19:42:52 +0200 | <nick__> | Is this what you guys are talking about? https://paste.tomsmeding.com/mbX5n9OW |
2023-06-28 19:43:05 +0200 | <nick__> | I'm just trying to figure out how you handle this type of issue? |
2023-06-28 19:43:34 +0200 | AlexZenon | (~alzenon@94.233.241.5) |
2023-06-28 19:44:22 +0200 | <jade[m]> | don't use the show instance for that |
2023-06-28 19:44:37 +0200 | <jade[m]> | just unwrap the newtype via a pattern match |
2023-06-28 19:44:39 +0200 | <nick__> | well I've been asking how you guys would handle it |
2023-06-28 19:44:42 +0200 | <nick__> | so how would you do it? |
2023-06-28 19:44:50 +0200 | <mauke> | pattern matching |
2023-06-28 19:44:56 +0200 | <nick__> | example? |
2023-06-28 19:45:04 +0200 | <jade[m]> | charIter2 (String2 str) = ... |
2023-06-28 19:45:06 +0200 | <mauke> | or record syntax with implicit accessors that do the matching for you |
2023-06-28 19:45:28 +0200 | <nick__> | oh how would a record syntax look? |
2023-06-28 19:45:48 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-06-28 19:45:59 +0200 | <mauke> | newtype String2 = String2{ fromString2 :: String } |
2023-06-28 19:46:43 +0200 | <mauke> | which tells the compiler to generate the equivalent of: fromString2 x = case x of String2 s -> s |
2023-06-28 19:47:28 +0200 | <nick__> | yeah, so you've created a type that is a String2 but has a name/value pair that is a String? |
2023-06-28 19:47:39 +0200 | <nick__> | is how I'm reading that? |
2023-06-28 19:47:46 +0200 | <jade[m]> | that's what records are, yeah |
2023-06-28 19:48:00 +0200 | <nick__> | yeah I guess that makes sense |
2023-06-28 19:48:08 +0200 | <jade[m]> | essentially just giving names to fields inside a datatype |
2023-06-28 19:48:09 +0200 | <nick__> | just seems unintuitive |
2023-06-28 19:48:16 +0200 | <jade[m]> | with no runtime overhead |
2023-06-28 19:48:21 +0200 | <jade[m]> | (afaik) |
2023-06-28 19:48:26 +0200 | ripspin | (~chatzilla@1.145.136.115) (Remote host closed the connection) |
2023-06-28 19:48:43 +0200 | <mauke> | I wouldn't call it a name/value pair because at runtime it's just the value |
2023-06-28 19:48:57 +0200 | <jade[m]> | yeah that's what I was trying to express |
2023-06-28 19:49:01 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2023-06-28 19:49:23 +0200 | <mauke> | in particular, operationally fromString2 is the identity function |
2023-06-28 19:49:39 +0200 | Alex_test | (~al_test@94.233.241.5) |
2023-06-28 19:49:59 +0200 | <nick__> | So wait, lets say you had an int included in the record as well. Is it still just the two values? or is it a datatype that contains two values? |
2023-06-28 19:50:02 +0200 | <mniip> | "how you guys would handle it" is a completely different question that has also been answered earlier |
2023-06-28 19:50:19 +0200 | <mauke> | nick__: that's a compiler error because newtype can only wrap exactly one thing |
2023-06-28 19:50:22 +0200 | <mniip> | here's a more practical example: https://paste.tomsmeding.com/ZO7L4NbL |
2023-06-28 19:50:26 +0200 | <nick__> | ah true |
2023-06-28 19:50:27 +0200 | <nick__> | ok |
2023-06-28 19:50:30 +0200 | <jade[m]> | nick__: two fields would not allow you to use `newtype` |
2023-06-28 19:50:48 +0200 | <nick__> | yeah that's on the wikipage I remember |
2023-06-28 19:51:05 +0200 | <mauke> | so the use of a record field name with newtype is slightly cheeky |
2023-06-28 19:51:23 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2023-06-28 19:51:46 +0200 | <mniip> | god I wish GHC would just let me define a newtype gadt where the only field is a coercion |
2023-06-28 19:53:55 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-06-28 19:54:14 +0200 | solaire | (~solaire@024-158-116-019.res.spectrum.com) (Ping timeout: 246 seconds) |
2023-06-28 19:55:11 +0200 | solaire | (~solaire@024-158-116-019.res.spectrum.com) |
2023-06-28 19:56:42 +0200 | fweht | (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-28 19:58:57 +0200 | EvanR | (~EvanR@user/evanr) |
2023-06-28 20:01:20 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-06-28 20:01:20 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-06-28 20:01:20 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-28 20:03:56 +0200 | AlexNoo_ | AlexNoo |
2023-06-28 20:09:23 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2023-06-28 20:11:50 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2023-06-28 20:12:22 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2023-06-28 20:16:58 +0200 | danse-nr3 | (~francesco@151.35.67.174) (Ping timeout: 250 seconds) |
2023-06-28 20:19:35 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) |
2023-06-28 20:22:21 +0200 | totbwf | (sid402332@id-402332.uxbridge.irccloud.com) (Server closed connection) |
2023-06-28 20:22:35 +0200 | totbwf | (sid402332@id-402332.uxbridge.irccloud.com) |
2023-06-28 20:23:57 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:296e:3128:9bb:592b) (Ping timeout: 245 seconds) |
2023-06-28 20:24:29 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
2023-06-28 20:25:40 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) |
2023-06-28 20:28:09 +0200 | mechap | (~mechap@user/mechap) |
2023-06-28 20:30:34 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 260 seconds) |
2023-06-28 20:32:02 +0200 | ubert | (~Thunderbi@p200300ecdf0b57c57ef837ab9eeb4127.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
2023-06-28 20:33:49 +0200 | ubert | (~Thunderbi@p548c89d1.dip0.t-ipconnect.de) |
2023-06-28 20:35:14 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 260 seconds) |
2023-06-28 20:37:04 +0200 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
2023-06-28 20:39:28 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
2023-06-28 20:51:54 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-28 21:04:14 +0200 | gensyst | (~gensyst@user/gensyst) (Quit: Leaving) |
2023-06-28 21:07:06 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) |
2023-06-28 21:11:25 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) |
2023-06-28 21:14:20 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 21:17:14 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) (Ping timeout: 260 seconds) |
2023-06-28 21:17:50 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-28 21:18:25 +0200 | taupiqueur | (~taupiqueu@2a02-8440-721b-8c5d-393a-ef3b-a3c7-d0b1.rev.sfr.net) |
2023-06-28 21:18:27 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) (Remote host closed the connection) |
2023-06-28 21:20:45 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-28 21:21:59 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Remote host closed the connection) |
2023-06-28 21:22:43 +0200 | reach | (~reach@74.12.129.40) |
2023-06-28 21:25:38 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 21:36:21 +0200 | pavonia | (~user@user/siracusa) |
2023-06-28 21:40:02 +0200 | captnemo | (~captnemo@193.32.127.239) (Quit: WeeChat 3.8) |
2023-06-28 21:42:53 +0200 | jero98772 | (~jero98772@2800:484:1d7f:5d36::4) |
2023-06-28 21:45:52 +0200 | reach | (~reach@74.12.129.40) (Remote host closed the connection) |
2023-06-28 21:46:11 +0200 | hisa38 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Ping timeout: 264 seconds) |
2023-06-28 21:46:15 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) |
2023-06-28 21:47:52 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2023-06-28 21:54:18 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
2023-06-28 22:01:17 +0200 | trev | (~trev@user/trev) (Quit: trev) |
2023-06-28 22:03:40 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 258 seconds) |
2023-06-28 22:04:22 +0200 | jero98772 | (~jero98772@2800:484:1d7f:5d36::4) (Ping timeout: 260 seconds) |
2023-06-28 22:07:08 +0200 | reach | (~reach@bras-base-toroon2643w-grc-19-74-12-129-40.dsl.bell.ca) (Ping timeout: 240 seconds) |
2023-06-28 22:08:49 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-06-28 22:08:51 +0200 | hisa38 | (~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) |
2023-06-28 22:17:20 +0200 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2023-06-28 22:17:55 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2023-06-28 22:18:26 +0200 | remedan | (~remedan@ip-94-112-0-18.bb.vodafone.cz) (Ping timeout: 246 seconds) |
2023-06-28 22:25:09 +0200 | robobub | (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-28 22:31:05 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) |
2023-06-28 22:35:52 +0200 | danse-nr3 | (~francesco@151.37.109.27) |
2023-06-28 22:36:21 +0200 | remedan | (~remedan@ip-94-112-0-18.bb.vodafone.cz) |
2023-06-28 22:37:47 +0200 | Alex_test | (~al_test@94.233.241.5) (Ping timeout: 264 seconds) |
2023-06-28 22:39:30 +0200 | AlexZenon | (~alzenon@94.233.241.5) (Ping timeout: 240 seconds) |
2023-06-28 22:39:50 +0200 | AlexNoo | (~AlexNoo@94.233.241.5) (Ping timeout: 260 seconds) |
2023-06-28 22:48:30 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) |
2023-06-28 23:02:30 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) |
2023-06-28 23:04:34 +0200 | merijn | (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2023-06-28 23:05:30 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 260 seconds) |
2023-06-28 23:06:44 +0200 | geranim0 | (~geranim0@modemcable182.140-177-173.mc.videotron.ca) (Remote host closed the connection) |
2023-06-28 23:07:36 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
2023-06-28 23:08:59 +0200 | foul_owl | (~kerry@71.212.137.212) (Ping timeout: 264 seconds) |
2023-06-28 23:10:43 +0200 | josias | (~mottmatri@2001:470:69fc:105::b6c) (Server closed connection) |
2023-06-28 23:10:55 +0200 | josias | (~mottmatri@2001:470:69fc:105::b6c) |
2023-06-28 23:10:57 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-163-231.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-06-28 23:15:28 +0200 | tinwood | (~tinwood@canonical/tinwood) (Server closed connection) |
2023-06-28 23:15:41 +0200 | tinwood | (~tinwood@general.default.akavanagh.uk0.bigv.io) |
2023-06-28 23:15:42 +0200 | tinwood | (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host) |
2023-06-28 23:15:42 +0200 | tinwood | (~tinwood@canonical/tinwood) |
2023-06-28 23:16:30 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2023-06-28 23:17:44 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-28 23:19:02 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 260 seconds) |
2023-06-28 23:22:16 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-28 23:23:13 +0200 | foul_owl | (~kerry@157.97.134.168) |
2023-06-28 23:25:49 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-28 23:39:00 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2023-06-28 23:39:45 +0200 | ddellacosta | (~ddellacos@146.70.166.10) (Quit: WeeChat 3.8) |
2023-06-28 23:40:09 +0200 | michalz | (~michalz@185.246.207.217) (Remote host closed the connection) |
2023-06-28 23:40:18 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |
2023-06-28 23:41:12 +0200 | sphynx | (~xnyhps@2a02:2770:3:0:216:3eff:fe67:3288) (Server closed connection) |
2023-06-28 23:41:25 +0200 | sphynx | (~xnyhps@2a02:2770:3:0:216:3eff:fe67:3288) |
2023-06-28 23:44:42 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-06-28 23:46:09 +0200 | FinnBoat | (~user@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) |
2023-06-28 23:57:28 +0200 | FinnBoat | (~user@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) (Remote host closed the connection) |
2023-06-28 23:58:58 +0200 | mizlan | (~mizlan@c-73-63-223-227.hsd1.ca.comcast.net) |