Newest at the top
2025-03-30 03:06:20 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
2025-03-30 03:06:13 +0200 | <monochrom> | You should look at the binary package and what it does to "instance Binary (Tree e)" |
2025-03-30 03:05:52 +0200 | <haskellbridge> | <thirdofmay18081814goya> any alternative |
2025-03-30 03:05:43 +0200 | <haskellbridge> | <thirdofmay18081814goya> monochrom: what's an alternative? |
2025-03-30 03:04:49 +0200 | <geekosaur> | ^ |
2025-03-30 03:03:53 +0200 | <monochrom> | Unpopular opinion: But Gödel numbers is terribly preoccupied with gross inefficiency. |
2025-03-30 03:01:37 +0200 | sprotte24_ | (~sprotte24@p200300d16f1c4e0098c546d077431e36.dip0.t-ipconnect.de) (Quit: Leaving) |
2025-03-30 03:00:49 +0200 | causal | (~eric@50.35.84.231) (Quit: WeeChat 4.5.1) |
2025-03-30 01:59:37 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-30 01:58:23 +0100 | <haskellbridge> | <thirdofmay18081814goya> not terribly preoccupied with efficiency atm |
2025-03-30 01:58:14 +0100 | <haskellbridge> | <thirdofmay18081814goya> wrt Godel coding, beginning to read http://foibg.com/ijita/vol17/ijita17-1-p02.pdf |
2025-03-30 01:56:20 +0100 | <geekosaur> | (My comment about Gödel coding was only half a joke; it would certainly work but would be overkill and probably extremely inefficient for your purpose) |
2025-03-30 01:55:38 +0100 | <geekosaur> | how you define it would depend on what you intend to do with it |
2025-03-30 01:55:26 +0100 | <geekosaur> | that's a somewhat weird way to put it. I would say that you can define such a function, not that one exists with a particular API |
2025-03-30 01:51:12 +0100 | <haskellbridge> | <thirdofmay18081814goya> what would be the API to access it? |
2025-03-30 01:50:32 +0100 | <haskellbridge> | <thirdofmay18081814goya> so rephrasing: there is an invertible serialization function for "Tree Natural", correct? |
2025-03-30 01:48:49 +0100 | <haskellbridge> | <thirdofmay18081814goya> ah that clears it up, ty |
2025-03-30 01:48:33 +0100 | <Leary> | thirdofmay: |Word| = |Int|; |Natural| = |Integer| = omega |
2025-03-30 01:48:31 +0100 | <lambdabot> | 1000000000000000000000000000000000000000000000000000000000000000000000000000... |
2025-03-30 01:48:30 +0100 | <monochrom> | > 10^100 :: Natural |
2025-03-30 01:48:23 +0100 | <haskellbridge> | <thirdofmay18081814goya> so is there no type that has the size of the set of natural numbers in haskell? |
2025-03-30 01:47:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-30 01:47:06 +0100 | <haskellbridge> | <Bowuigi> Not only implementation-wise, but also because every computation of type Natural is a Natural, including "1 + undefined" |
2025-03-30 01:46:53 +0100 | <haskellbridge> | <thirdofmay18081814goya> no it seems, assuming "Natural" has the size of the set of unsigned integers, it is a finite set too |
2025-03-30 01:45:56 +0100 | <haskellbridge> | <Bowuigi> Also is Natural the same size as the set of natural numbers? It has bottoms too |
2025-03-30 01:44:26 +0100 | <monochrom> | In Haskell2010 it's simulataneously "UB" and "implementation-defined". The exact quote: "The results of exceptional conditions (such as overflow or underflow) on the fixed-precision numeric types are undefined; an implementation may choose error (⊥, semantically), a truncated value, or a special value such as infinity, indefinite, etc." |
2025-03-30 01:44:19 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) ChaiTRex |
2025-03-30 01:44:15 +0100 | <haskellbridge> | <Bowuigi> No, Natural is Integer but unsigned |
2025-03-30 01:44:11 +0100 | <haskellbridge> | <thirdofmay18081814goya> and "| Natural | = | Set of natural numbers |" |
2025-03-30 01:43:47 +0100 | <haskellbridge> | <thirdofmay18081814goya> hm so there's an invertible serialization/deserialization function for "Tree Natural"? (or "Tree Word", assuming I understand correctly that "| Word | = | Natural |"?) |
2025-03-30 01:43:47 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-03-30 01:43:00 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2025-03-30 01:41:42 +0100 | hattckory | (~hattckory@bras-base-toroon4524w-grc-30-70-27-118-207.dsl.bell.ca) (Ping timeout: 276 seconds) |
2025-03-30 01:41:29 +0100 | <monochrom> | You can always try maxBound + 1 |
2025-03-30 01:41:07 +0100 | <lambdabot> | *Exception: Prelude.Enum.succ{Int}: tried to take `succ' of maxBound |
2025-03-30 01:41:05 +0100 | <Leary> | > (succ maxBound :: Int) == minBound |
2025-03-30 01:41:01 +0100 | <haskellbridge> | <Bowuigi> Word kinda makes sense because of machine words, but UInt or Nat would make more sense |
2025-03-30 01:40:54 +0100 | <lambdabot> | True |
2025-03-30 01:40:53 +0100 | <Leary> | > maxBound + (1 :: Int) == minBound |
2025-03-30 01:39:31 +0100 | <haskellbridge> | <Bowuigi> It would overflow I think, in C it is UB but not sure about it in Haskell |
2025-03-30 01:39:30 +0100 | <monochrom> | Unpopular opinion: It is more consistent to s/Word/Nat/ because Int : Nat :: Integer :: Natural |
2025-03-30 01:38:59 +0100 | <monochrom> | Actually in Haskell we don't have a "Nat", we have Word (Data.Word) and Natural (Numeric.Natural). |
2025-03-30 01:38:34 +0100 | <haskellbridge> | <thirdofmay18081814goya> then as a matter of fact, "Int !! (| Int | + 1)" will not be a value of type "Int", correct? |
2025-03-30 01:36:05 +0100 | <haskellbridge> | <thirdofmay18081814goya> a type isomorphic to "Nat + (Nat - { 0 })"* |
2025-03-30 01:35:32 +0100 | <haskellbridge> | <thirdofmay18081814goya> * { 0 }) |
2025-03-30 01:35:05 +0100 | <haskellbridge> | <thirdofmay18081814goya> didn't realize "Int" was finite, I thought it was the type of Nat + (Nat - 1) |
2025-03-30 01:34:53 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 244 seconds) |
2025-03-30 01:34:11 +0100 | <haskellbridge> | <thirdofmay18081814goya> Leary: oh you're fully right then |
2025-03-30 01:33:33 +0100 | <Leary> | (or 2^32 if you live in the past) |
2025-03-30 01:32:35 +0100 | <Leary> | thirdofmay: |Int| = 2^64 |