Logs: liberachat/#haskell
| 2021-06-14 23:04:20 | × | warnz quits (~warnz@2600:1700:77c0:5610:210a:ba95:5325:60a6) (Remote host closed the connection) |
| 2021-06-14 23:06:49 | × | fizbin quits (~fizbin@2601:8a:4080:1280:8c7e:5b3f:79d6:ec26) (Ping timeout: 244 seconds) |
| 2021-06-14 23:09:28 | <DigitalKiwi> | 21:57 ski: in the former, `Int',`Maybe Int' are types, `Maybe |
| 2021-06-14 23:09:28 | × | bfrk quits (~bfrk@200116b8451b0900bae0ed5ddd267e3d.dip.versatel-1u1.de) (Ping timeout: 272 seconds) |
| 2021-06-14 23:10:18 | <DigitalKiwi> | i was very concerned for a minute |
| 2021-06-14 23:10:55 | <monochrom> | You should have faith in ski. :) |
| 2021-06-14 23:13:10 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 2021-06-14 23:13:41 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-14 23:13:42 | <DigitalKiwi> | i have no lack of faith in ski, maybe |
| 2021-06-14 23:15:27 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 2021-06-14 23:15:54 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-14 23:16:30 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-14 23:20:04 | × | tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Remote host closed the connection) |
| 2021-06-14 23:20:08 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 2021-06-14 23:20:46 | × | hemlock quits (~hemlock@2607:fb90:9629:beeb:8fe5:1eb6:ded9:dd19) (Ping timeout: 244 seconds) |
| 2021-06-14 23:21:38 | → | tonyday joins (~user@202-65-93-249.ip4.superloop.com) |
| 2021-06-14 23:21:40 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-14 23:21:42 | → | hemlock joins (~hemlock@2600:8804:4c0a:3200:91a4:77db:aed9:3c83) |
| 2021-06-14 23:22:07 | → | ddellacosta joins (~ddellacos@86.106.121.190) |
| 2021-06-14 23:22:52 | ski | smiles |
| 2021-06-14 23:25:44 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 244 seconds) |
| 2021-06-14 23:26:46 | × | ddellacosta quits (~ddellacos@86.106.121.190) (Ping timeout: 244 seconds) |
| 2021-06-14 23:31:11 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 2021-06-14 23:34:48 | × | chomwitt quits (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) (Ping timeout: 272 seconds) |
| 2021-06-14 23:35:02 | × | oo_miguel quits (~pi@89-72-187-203.dynamic.chello.pl) (Ping timeout: 244 seconds) |
| 2021-06-14 23:35:38 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2021-06-14 23:35:44 | → | oo_miguel joins (~pi@89-72-187-203.dynamic.chello.pl) |
| 2021-06-14 23:37:27 | → | danso joins (~danso@23-233-111-52.cpe.pppoe.ca) |
| 2021-06-14 23:37:58 | → | fendor_ joins (~fendor@77.119.128.134.wireless.dyn.drei.com) |
| 2021-06-14 23:39:53 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Ping timeout: 244 seconds) |
| 2021-06-14 23:40:42 | × | fendor quits (~fendor@77.119.131.39.wireless.dyn.drei.com) (Ping timeout: 268 seconds) |
| 2021-06-14 23:41:12 | → | larryba joins (~bc817c21@217.29.117.252) |
| 2021-06-14 23:41:43 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 2021-06-14 23:42:34 | <larryba> | hi. is there some extension that would allow me to create an operator called | and ~? I'm getting "parse error on input �|�" and "parse error on input �)�". |
| 2021-06-14 23:42:46 | <larryba> | (I know that | is part of haskell syntax, and probably something similar with ~, so it's probably a long shot) |
| 2021-06-14 23:43:03 | <geekosaur> | both are part of haskell syntax and can't be overridden |
| 2021-06-14 23:43:24 | <geekosaur> | even with RebindableSyntax, neither can be made an operator |
| 2021-06-14 23:43:59 | <larryba> | where is ~ used? I don't recall ever seeing it |
| 2021-06-14 23:44:10 | <geekosaur> | it makes a strict pattern lazy |
| 2021-06-14 23:44:20 | <monochrom> | ~? should be OK, HUnit uses ~?= all the time. |
| 2021-06-14 23:44:23 | <geekosaur> | it's also used at type level to express type equality |
| 2021-06-14 23:44:30 | <monochrom> | | is reserved. |
| 2021-06-14 23:44:40 | <monochrom> | But you can make ||||| or something |
| 2021-06-14 23:45:15 | <geekosaur> | right, both can be used as parts of other operators, just not by themsleves |
| 2021-06-14 23:52:12 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-06-14 23:52:24 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-14 23:55:17 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-06-14 23:55:57 | → | ddellacosta joins (~ddellacos@89.46.62.164) |
| 2021-06-14 23:56:44 | → | hmmmas joins (~chenqisu1@183.217.200.246) |
| 2021-06-14 23:59:14 | × | tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Remote host closed the connection) |
| 2021-06-15 00:00:54 | × | ddellacosta quits (~ddellacos@89.46.62.164) (Ping timeout: 264 seconds) |
| 2021-06-15 00:03:02 | × | bilegeek quits (~bilegeek@2600:1008:b041:5047:48ad:ae3d:d2ea:7d42) (Quit: Leaving) |
| 2021-06-15 00:03:03 | → | Axman6 joins (~Axman6@user/axman6) |
| 2021-06-15 00:05:28 | × | zeenk quits (~zeenk@188.26.30.39) (Quit: Konversation terminated!) |
| 2021-06-15 00:07:12 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 2021-06-15 00:10:24 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 00:14:13 | <lbseale> | I'm interested to hear everyone's thoughts on an idea: We're considering how to marshal data between C and Haskell. The size of the of data is small, but there are lot of fields in the record in Haskell (if that makes sense) |
| 2021-06-15 00:14:55 | <lbseale> | On idea is to serialize it into JSON, and just pass a JSON string back and forth, this is currently how we get data into the Haskell program, it's satisfyingly fast |
| 2021-06-15 00:15:23 | <lbseale> | Another option is to make a C Structs that mirror the Haskell records, and pass those back and forth |
| 2021-06-15 00:15:35 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 2021-06-15 00:15:58 | <lbseale> | We've been able to get that working in a toy program, but setting up the Storable instance for the C struct is a bit of a hassle |
| 2021-06-15 00:17:38 | <geekosaur> | there are tools that purport to make that easier but they can be fragile (gcc11 reportedly breaks c2hs, for example) |
| 2021-06-15 00:18:42 | <lbseale> | yeah I was looking at one called storable-record on the Haskell side |
| 2021-06-15 00:19:40 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 244 seconds) |
| 2021-06-15 00:19:51 | <monochrom> | I would expect JSON -> C struct be as much hassle as Haskell record -> Storable. |
| 2021-06-15 00:19:52 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b9b1:9fc2:289f:a533) (Remote host closed the connection) |
| 2021-06-15 00:20:28 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b9b1:9fc2:289f:a533) |
| 2021-06-15 00:20:40 | <lbseale> | interesting, I don't know that much about C, but I work with people who do |
| 2021-06-15 00:20:44 | <glguy> | There are possible advantages to the json approach if you have a particularly flexible data representation; I guess |
| 2021-06-15 00:21:07 | <glguy> | if you had a bunch of lists or map structures or lots of different optional fields, it might be less hassle to go that route |
| 2021-06-15 00:21:12 | <glguy> | but not for simple struct stuff |
| 2021-06-15 00:22:24 | <lbseale> | hmm, yeah it's like 50 fixed fields, in addition to a list of 2 or more big records |
| 2021-06-15 00:22:35 | <monochrom> | But C is a particularly inflexible language for types. |
| 2021-06-15 00:23:46 | → | _73 joins (~user@pool-96-252-123-136.bstnma.fios.verizon.net) |
| 2021-06-15 00:24:38 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b9b1:9fc2:289f:a533) (Ping timeout: 244 seconds) |
| 2021-06-15 00:25:50 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-15 00:30:32 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds) |
| 2021-06-15 00:30:51 | → | fizbin joins (~fizbin@2601:8a:4080:1280:8c7e:5b3f:79d6:ec26) |
| 2021-06-15 00:31:35 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2021-06-15 00:32:00 | → | teaSlurper joins (~chris@81.96.113.213) |
| 2021-06-15 00:34:20 | × | nilof quits (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 272 seconds) |
| 2021-06-15 00:35:32 | → | ddellacosta joins (~ddellacos@86.106.121.203) |
| 2021-06-15 00:35:37 | <_73> | `Couldn't match type ‘a’ with ‘()’`. Why does unit not match with an unconstrained type variable? http://dpaste.com/8Y8GDYVHH |
| 2021-06-15 00:36:55 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-06-15 00:38:26 | → | lisphacker joins (~lisphacke@156.67.241.66) |
| 2021-06-15 00:38:29 | <davean> | _73: That defintion says the function has to return *any* a, not an a of its choice |
| 2021-06-15 00:38:37 | <geekosaur> | it is constrained. `forall a. Foo -> a` means the caller decides what `a` is |
| 2021-06-15 00:38:41 | <davean> | there are things () isn't |
| 2021-06-15 00:38:45 | <davean> | thus it can't be right |
| 2021-06-15 00:38:59 | × | lisphacker quits (~lisphacke@156.67.241.66) (Client Quit) |
| 2021-06-15 00:39:27 | <_73> | ohh. So this doesn't have anything to do with unit. |
| 2021-06-15 00:40:40 | × | ddellacosta quits (~ddellacos@86.106.121.203) (Ping timeout: 272 seconds) |
| 2021-06-15 00:41:07 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 2021-06-15 00:41:12 | <_73> | So really the only thing I can return is undefined right. Because undefined is the only thing that is everything. |
| 2021-06-15 00:41:36 | <geekosaur> | correct |
| 2021-06-15 00:41:53 | <geekosaur> | unless you have a better constraint for a than `forall a. a` |
| 2021-06-15 00:42:06 | <davean> | That does make it a difficult defintion to satisfy, yes |
| 2021-06-15 00:42:30 | <_73> | Ok now I understand forall |
| 2021-06-15 00:43:04 | <janus> | if Foo was Void instead, would it still need a definition? |
| 2021-06-15 00:44:13 | <janus> | surely anything is of type a if Void was constructed |
All times are in UTC.