Logs: freenode/#haskell
| 2021-03-15 18:48:40 | <WarzoneCommand> | so I did something like: sizeOf _ = 1 + max(sizeOf @v, 2*sizeOf @Int + sizeOf @v). But so how do I determine the alignment? |
| 2021-03-15 18:48:55 | <WarzoneCommand> | or at least that is what I would expect the size to be |
| 2021-03-15 18:53:51 | <geekosaur> | I slightly misspoke earlier, because of unaligned memory accesses which are at best slower on some CPUs and at worst throw machine exceptions; you should assume the latter. |
| 2021-03-15 18:55:55 | → | geowiesnot_bis joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2021-03-15 18:56:21 | <geekosaur> | and your 1 + becomes sizeOf Int + to avoid everything else being unaligned. plus I think you meant sizeOf @k for the second one? but k may not have a fixed size so that won't work anyway |
| 2021-03-15 18:57:06 | → | dfeuer joins (~dfeuer@pool-173-79-253-62.washdc.fios.verizon.net) |
| 2021-03-15 18:57:13 | <geekosaur> | er, sizeOf @Int |
| 2021-03-15 18:57:33 | <WarzoneCommand> | euh yes I meant sizeOf @k in the second part. |
| 2021-03-15 18:58:17 | <WarzoneCommand> | hmm, but so in that case I would bascially use the amount of space for *both* options simulataneously? |
| 2021-03-15 18:58:22 | → | is_null joins (~jpic@pdpc/supporter/professional/is-null) |
| 2021-03-15 18:59:17 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 2021-03-15 18:59:35 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 2021-03-15 19:00:34 | × | texasmynsted quits (~texasmyns@99.96.221.112) (Remote host closed the connection) |
| 2021-03-15 19:00:39 | <WarzoneCommand> | let me maybe clarify again, because my earlier typo was confusing. Why would: '1 + max(sizeOf @v, 2*sizeOf @Int + sizeOf @k) not suffice? |
| 2021-03-15 19:01:22 | <WarzoneCommand> | (i.e. as long as k and v are storable themselves / it is known how much space they will use beforehand that should not be an issue sholuld it?) |
| 2021-03-15 19:01:54 | <geekosaur> | the 1+ means 1 byte for a discriminator and now you get a SIGBUS or equivalent accessing the rest on almost all platforms. I suggested using a CInt instead |
| 2021-03-15 19:01:56 | × | geowiesnot_bis quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-03-15 19:02:00 | × | fuzzypixelz quits (2ec10464@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Connection closed) |
| 2021-03-15 19:02:12 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 2021-03-15 19:02:47 | <geekosaur> | hence sizeOf @Int |
| 2021-03-15 19:03:28 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 2021-03-15 19:03:55 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 240 seconds) |
| 2021-03-15 19:04:34 | <WarzoneCommand> | Hmm, I see |
| 2021-03-15 19:05:13 | <Gurkenglas> | @let VeryLazyNaturals = S VeryLazyNaturals -- All you get get out of these is a confirmation that they're in a set of form [n..]. |
| 2021-03-15 19:05:14 | <lambdabot> | .L.hs:173:1: error: |
| 2021-03-15 19:05:14 | <lambdabot> | Not in scope: data constructor ‘VeryLazyNaturals’ |
| 2021-03-15 19:05:14 | <lambdabot> | | |
| 2021-03-15 19:05:26 | <Gurkenglas> | @let data VeryLazyNaturals = S VeryLazyNaturals -- :( |
| 2021-03-15 19:05:27 | <lambdabot> | Defined. |
| 2021-03-15 19:05:46 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 2021-03-15 19:06:05 | <geekosaur> | The rest, if it's Storable… try it, I guess. |
| 2021-03-15 19:06:54 | → | Sgeo_ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 2021-03-15 19:07:07 | → | urodna_ joins (~urodna@unaffiliated/urodna) |
| 2021-03-15 19:07:26 | <tomsmeding> | Gurkenglas: can you give a terminating value of that type? |
| 2021-03-15 19:07:53 | <Gurkenglas> | tomsmeding, well no, then you can get more than such a confirmation out of them |
| 2021-03-15 19:08:05 | × | bitmagie quits (~Thunderbi@200116b806606900d512802029b5d408.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2021-03-15 19:08:13 | <Gurkenglas> | but i can write you a getter and a value and itll behave as i said |
| 2021-03-15 19:08:16 | → | vicfred_ joins (~vicfred@unaffiliated/vicfred) |
| 2021-03-15 19:08:17 | <tomsmeding> | in the usual terminology, a type that has no terminating value is empty |
| 2021-03-15 19:08:30 | <tomsmeding> | okay that makes no sense in haskell |
| 2021-03-15 19:08:34 | <Gurkenglas> | then i would like to use the unusual terminology |
| 2021-03-15 19:08:35 | → | dorkside6 joins (~tdbgamer@208.190.197.222) |
| 2021-03-15 19:08:39 | <tomsmeding> | ye s:p |
| 2021-03-15 19:08:40 | <tomsmeding> | *yes |
| 2021-03-15 19:08:52 | → | Sorna joins (~Sornaensi@077213203030.dynamic.telenor.dk) |
| 2021-03-15 19:08:54 | <dolio> | Those aren't naturals. |
| 2021-03-15 19:09:05 | <tomsmeding> | okay, try 2: there is only one value of VeryLazyNaturals |
| 2021-03-15 19:09:08 | <tomsmeding> | namely 'fix S' |
| 2021-03-15 19:09:12 | → | tstat_ joins (~tstat@104.131.113.212) |
| 2021-03-15 19:09:37 | <tomsmeding> | and hence it contains no information |
| 2021-03-15 19:09:46 | → | valdyn_ joins (valdyn@c6a7cbb3.vpn.njalla.net) |
| 2021-03-15 19:10:01 | → | nitrix_ joins (~nitrix@haskell/developer/nitrix) |
| 2021-03-15 19:10:03 | → | aforemny_ joins (~aforemny@static.248.158.34.188.clients.your-server.de) |
| 2021-03-15 19:10:04 | → | gekh0 joins (~gkh@thor.kevinhill.nl) |
| 2021-03-15 19:10:04 | → | xarian joins (~xarian@104.236.81.162) |
| 2021-03-15 19:10:07 | <dolio> | There's only one fully defined value. |
| 2021-03-15 19:10:07 | → | jluttine_ joins (~jluttine@85-23-95-149.bb.dnainternet.fi) |
| 2021-03-15 19:10:22 | → | gargawel_ joins (~gael@212.83.144.58) |
| 2021-03-15 19:10:27 | → | dmwit_ joins (~dmwit@pool-173-66-86-32.washdc.fios.verizon.net) |
| 2021-03-15 19:10:36 | → | Zemyla_ joins (~zemyla@ec2-54-196-11-2.compute-1.amazonaws.com) |
| 2021-03-15 19:10:51 | → | drakonis- joins (~drakonis@unaffiliated/drakonis) |
| 2021-03-15 19:11:15 | <Gurkenglas> | :t (isatleast, five) |
| 2021-03-15 19:11:16 | <lambdabot> | (Int -> VeryLazyNaturals -> (), VeryLazyNaturals) |
| 2021-03-15 19:11:21 | → | haskell_1 joins (~twain@168.61.46.105) |
| 2021-03-15 19:11:22 | → | stux|RC-- joins (stux2@grid9.quadspeedi.net) |
| 2021-03-15 19:11:23 | × | valdyn quits (valdyn@c6a7cbb4.vpn.njalla.net) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | jluttine quits (~jluttine@85-23-95-149.bb.dnainternet.fi) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | aforemny quits (~aforemny@static.248.158.34.188.clients.your-server.de) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | drakonis quits (~drakonis@unaffiliated/drakonis) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | tstat quits (~tstat@104.131.113.212) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | asm89 quits (~asm89@unaffiliated/asm89) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | xarian_ quits (~xarian@104.236.81.162) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | haskell_enthusia quits (~twain@168.61.46.105) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | msgctl quits (~msgctl@ometochtli.centzontotochtin.org) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | urodna quits (~urodna@unaffiliated/urodna) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | Benzi-Junior quits (~BenziJuni@88-149-67-143.du.xdsl.is) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | dmwit quits (~dmwit@pool-173-66-86-32.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | gargawel quits (~gael@212.83.144.58) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | fiddlerwoaroof quits (~fiddlerwo@unaffiliated/fiddlerwoaroof) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | stux|RC-only quits (stux2@grid9.quadspeedi.net) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | landonf quits (landonf@mac68k.info) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | Zemyla quits (~zemyla@ec2-54-196-11-2.compute-1.amazonaws.com) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | tessier quits (~treed@kernel-panic/copilotco) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | dorkside quits (~tdbgamer@208.190.197.222) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Read error: Connection reset by peer) |
| 2021-03-15 19:11:23 | × | Hi-Angel quits (~constanti@broadband-188-32-15-112.ip.moscow.rt.ru) (Read error: Connection reset by peer) |
| 2021-03-15 19:11:23 | × | nitrix quits (~nitrix@haskell/developer/nitrix) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | lightandlight quits (sid135476@gateway/web/irccloud.com/x-mibnuuqzjpebbkzx) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | gekh quits (~gkh@thor.kevinhill.nl) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | × | malthe quits (~mborch@46.101.103.63) (Ping timeout: 256 seconds) |
| 2021-03-15 19:11:23 | valdyn_ | is now known as valdyn |
| 2021-03-15 19:11:30 | <Gurkenglas> | > isatleast 3 five |
| 2021-03-15 19:11:31 | → | tessier_ joins (~treed@kernel-panic/copilotco) |
| 2021-03-15 19:11:32 | <lambdabot> | () |
| 2021-03-15 19:11:32 | → | Hi-Angel joins (~constanti@broadband-188-32-15-112.ip.moscow.rt.ru) |
| 2021-03-15 19:11:34 | → | malthe joins (~mborch@46.101.103.63) |
| 2021-03-15 19:11:38 | → | fiddlerwoaroof_ joins (~fiddlerwo@unaffiliated/fiddlerwoaroof) |
| 2021-03-15 19:11:46 | dorkside6 | is now known as dorkside |
All times are in UTC.