Logs on 2023-02-03 (liberachat/#haskell)
| 00:03:20 | → | pavonia joins (~user@user/siracusa) |
| 00:05:22 | zero | is now known as yin |
| 00:05:33 | × | kitzman quits (~kitzman@user/dekenevs) (Quit: C-x C-c) |
| 00:13:58 | × | Kuttenbrunzer quits (~Kuttenbru@2a02:8108:8b80:1d48::315c) (Quit: Where is it) |
| 00:19:06 | → | jargon joins (~jargon@174-22-223-224.phnx.qwest.net) |
| 00:23:49 | × | acidjnk_new3 quits (~acidjnk@p200300d6e715c415c5e18632e1ef72b2.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 00:24:11 | <Axman6> | juri_: could compensated arithmetic be useful? Ed has the compensated package whicht akes care of tracking the error of calculations and doesn't need to do all maths twice (just close to it) |
| 00:24:35 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds) |
| 00:24:40 | Axman6 | double double FOIL and trouble... |
| 00:27:39 | → | freeside joins (~mengwong@103.252.202.170) |
| 00:29:40 | × | turlando quits (~turlando@user/turlando) (Quit: No Ping reply in 180 seconds.) |
| 00:30:55 | → | turlando joins (~turlando@user/turlando) |
| 00:35:12 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 00:39:27 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
| 00:40:29 | → | zebrag joins (~chris@user/zebrag) |
| 00:43:15 | × | king_gs quits (~Thunderbi@2806:103e:29:34e5:e14a:21d9:ac2e:2240) (Ping timeout: 260 seconds) |
| 00:49:15 | → | king_gs joins (~Thunderbi@187.201.2.248) |
| 00:52:14 | × | zeenk quits (~zeenk@2a02:2f04:a214:1e00::7fe) (Quit: Konversation terminated!) |
| 00:59:20 | × | codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 246 seconds) |
| 01:01:20 | → | ddellacosta joins (~ddellacos@86.106.143.219) |
| 01:03:34 | → | caryhartline joins (~caryhartl@2600:1700:2d0:8d30:a932:353f:91f2:f048) |
| 01:04:18 | × | Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:08:31 | → | thongpv joins (~thongpv87@14.179.159.25) |
| 01:10:51 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 01:12:54 | → | troydm joins (~troydm@user/troydm) |
| 01:12:55 | × | king_gs quits (~Thunderbi@187.201.2.248) (Read error: Connection reset by peer) |
| 01:13:11 | → | king_gs joins (~Thunderbi@2806:103e:29:34e5:c1c4:cdf:cabc:3345) |
| 01:21:01 | × | turlando quits (~turlando@user/turlando) (Ping timeout: 252 seconds) |
| 01:21:41 | → | turlando joins (~turlando@user/turlando) |
| 01:36:31 | × | xff0x quits (~xff0x@2405:6580:b080:900:195f:ac6f:f6a2:3431) (Ping timeout: 248 seconds) |
| 01:40:04 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 01:40:48 | × | mei quits (~mei@user/mei) (Ping timeout: 248 seconds) |
| 01:41:17 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 01:42:25 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 01:42:38 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 01:42:38 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 01:42:38 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:44:09 | → | mei joins (~mei@user/mei) |
| 01:47:47 | × | cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 252 seconds) |
| 01:47:59 | → | cods joins (~fred@82-65-232-44.subs.proxad.net) |
| 01:49:59 | × | gurkenglas quits (~gurkengla@dynamic-046-114-182-034.46.114.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 01:54:02 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 01:56:58 | × | yrlnry quits (~yrlnry@2600:4040:738e:5400:87d:f2d:382e:ac3d) (Read error: Connection reset by peer) |
| 01:58:17 | → | yrlnry joins (~yrlnry@2600:4040:738e:5400:87d:f2d:382e:ac3d) |
| 02:00:52 | → | bilegeek joins (~bilegeek@2600:1008:b065:4d4e:37b2:1ed7:a9d0:2c6f) |
| 02:04:22 | → | Guest75 joins (~Guest75@178.141.149.12) |
| 02:19:17 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 02:20:03 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds) |
| 02:20:43 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 02:28:34 | → | vgtw joins (~vgtw@user/vgtw) |
| 02:31:34 | → | disco-dave[m] joins (~disco-dav@2001:470:69fc:105::2:1892) |
| 02:35:46 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 02:36:05 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 02:43:24 | × | vgtw quits (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
| 02:44:09 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:45:28 | → | vgtw joins (~vgtw@user/vgtw) |
| 02:47:32 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 246 seconds) |
| 02:49:09 | × | vgtw quits (~vgtw@user/vgtw) (Client Quit) |
| 02:49:14 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 02:49:43 | → | mechap joins (~mechap@user/mechap) |
| 02:50:37 | → | vgtw joins (~vgtw@user/vgtw) |
| 02:56:57 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 02:58:56 | → | razetime joins (~Thunderbi@117.193.4.182) |
| 02:59:05 | → | jimmy2shoots joins (~igloo@071-085-131-232.res.spectrum.com) |
| 02:59:14 | × | jimmy2shoots quits (~igloo@071-085-131-232.res.spectrum.com) (Client Quit) |
| 02:59:35 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds) |
| 03:09:55 | × | td_ quits (~td@i53870916.versanet.de) (Ping timeout: 252 seconds) |
| 03:11:56 | → | td_ joins (~td@i5387090B.versanet.de) |
| 03:22:42 | → | pragma- joins (~chaos@user/pragmatic-chaos) |
| 03:24:13 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 03:29:54 | × | jero98772 quits (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb) (Remote host closed the connection) |
| 03:34:03 | × | Guest75 quits (~Guest75@178.141.149.12) (Ping timeout: 260 seconds) |
| 03:36:29 | → | mikoto-chan joins (~mikoto-ch@2001:999:60c:3d81:b055:1b0d:b7c7:2a51) |
| 03:37:44 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:37:44 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:37:44 | finn_elija | is now known as FinnElija |
| 03:40:10 | → | renatofdds joins (~user@user/renatofdds) |
| 03:42:49 | × | jargon quits (~jargon@174-22-223-224.phnx.qwest.net) (Remote host closed the connection) |
| 03:43:06 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
| 03:45:01 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b571:9acb:283f:a733) |
| 03:48:49 | × | mikoto-chan quits (~mikoto-ch@2001:999:60c:3d81:b055:1b0d:b7c7:2a51) (Ping timeout: 252 seconds) |
| 03:50:47 | → | mikoto-chan joins (~mikoto-ch@85-76-133-194-nat.elisa-mobile.fi) |
| 03:53:50 | ← | renatofdds parts (~user@user/renatofdds) () |
| 03:54:53 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
| 03:55:06 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 03:55:17 | × | bilegeek quits (~bilegeek@2600:1008:b065:4d4e:37b2:1ed7:a9d0:2c6f) (Quit: Leaving) |
| 03:58:27 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b571:9acb:283f:a733) (Remote host closed the connection) |
| 03:59:20 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b571:9acb:283f:a733) |
| 04:12:42 | × | opticblast quits (~Thunderbi@172.58.80.152) (Quit: opticblast) |
| 04:12:59 | → | opticblast joins (~Thunderbi@172.58.82.233) |
| 04:13:55 | × | opticblast quits (~Thunderbi@172.58.82.233) (Read error: Connection reset by peer) |
| 04:14:19 | → | opticblast joins (~Thunderbi@172.58.82.233) |
| 04:29:11 | → | falafel joins (~falafel@2607:fb91:1449:aea0:14d8:1ad5:a3d2:34a) |
| 04:32:49 | × | king_gs quits (~Thunderbi@2806:103e:29:34e5:c1c4:cdf:cabc:3345) (Ping timeout: 252 seconds) |
| 04:35:31 | → | merijn joins (~merijn@86.86.29.250) |
| 04:40:07 | × | merijn quits (~merijn@86.86.29.250) (Ping timeout: 252 seconds) |
| 04:42:39 | → | king_gs joins (~Thunderbi@187.201.2.248) |
| 04:43:27 | × | hounded quits (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) (Quit: Leaving) |
| 04:43:27 | × | hounded_woodstoc quits (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) (Quit: Leaving) |
| 05:10:21 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 05:11:00 | × | king_gs quits (~Thunderbi@187.201.2.248) (Read error: Connection reset by peer) |
| 05:11:44 | → | king_gs joins (~Thunderbi@2806:103e:29:34e5:acd5:8705:774f:5c3a) |
| 05:11:59 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
| 05:17:04 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 05:18:28 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 05:39:34 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 05:44:32 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 248 seconds) |
| 05:54:39 | × | thongpv quits (~thongpv87@14.179.159.25) (Ping timeout: 248 seconds) |
| 05:58:35 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 06:02:44 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 06:05:59 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:06:39 | × | opticblast quits (~Thunderbi@172.58.82.233) (Ping timeout: 260 seconds) |
| 06:09:30 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 06:16:50 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 06:29:29 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:31:16 | → | trev_ joins (~trev@109-252-35-99.nat.spd-mgts.ru) |
| 06:38:39 | × | falafel quits (~falafel@2607:fb91:1449:aea0:14d8:1ad5:a3d2:34a) (Ping timeout: 255 seconds) |
| 06:41:28 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 06:42:51 | × | Inst quits (~Inst@2601:6c4:4081:54f0:6ca9:ab81:4dc0:f885) (Read error: Connection reset by peer) |
| 06:43:13 | → | Inst joins (~Inst@2601:6c4:4081:54f0:d621:5cdd:9051:c240) |
| 06:43:48 | → | kenran joins (~user@user/kenran) |
| 06:45:15 | → | michalz joins (~michalz@185.246.207.217) |
| 06:48:08 | → | falafel joins (~falafel@2607:fb91:1449:aea0:14d8:1ad5:a3d2:34a) |
| 06:49:00 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 255 seconds) |
| 06:56:18 | → | Guest75 joins (~Guest75@178.141.149.12) |
| 06:58:26 | → | Varoo joins (~Varoo@117.203.246.41) |
| 07:03:27 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:08:26 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 07:08:37 | × | falafel quits (~falafel@2607:fb91:1449:aea0:14d8:1ad5:a3d2:34a) (Ping timeout: 252 seconds) |
| 07:09:43 | × | king_gs quits (~Thunderbi@2806:103e:29:34e5:acd5:8705:774f:5c3a) (Ping timeout: 252 seconds) |
| 07:10:49 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
| 07:10:49 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 07:12:39 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 07:16:10 | × | troydm quits (~troydm@user/troydm) (Ping timeout: 252 seconds) |
| 07:21:30 | → | johnw joins (~johnw@2600:1700:cf00:db0:44e6:2d71:3c2a:1669) |
| 07:26:10 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:da1d:7c03:5fef:8e2d) |
| 07:30:52 | <sm> | what would you think is better: |
| 07:30:52 | <sm> | `data Date = ExactDate Day | FlexDate Day` or |
| 07:30:52 | <sm> | `data Date = Date Day Bool` ? |
| 07:32:32 | <dminuoso> | sm: The first. |
| 07:32:39 | <dminuoso> | Or hold on |
| 07:32:41 | <dminuoso> | Or you can do: |
| 07:32:54 | <dminuoso> | `data DateMode = Exact | Flex` and `data Date = Date Day DateMode` |
| 07:33:16 | <dminuoso> | sm: I tend to favour `data Date = ExactDate Day | FlexDate Day` *if* I have optics around already. |
| 07:33:39 | <dminuoso> | Because you can conjure up an unsafe lens into that day more easily |
| 07:34:55 | <dminuoso> | sm: https://gist.github.com/dminuoso/e30354344fe15998c283e28d16fcd99c |
| 07:38:18 | <dminuoso> | Without optics, it really depends on your access type. Separate constructors increases the likelihood that consumer sites discriminate the mode (if that is frequently important). With a singular constructor accessing the day is a bit faster and potentially more convenient, but you can also just use a `getDay :: Date -> Day` function, even with view patterns if you like this in a pattern match |
| 07:38:19 | <dminuoso> | position |
| 07:39:59 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 260 seconds) |
| 07:40:37 | <sm> | dminuoso: that all made sense until your paste. Lost me there! |
| 07:43:56 | <dminuoso> | sm: In your case it would be: day :: Lens Date Day; day = unsafeSingular (_ExactDate `failingT` _FlexDate) |
| 07:44:01 | <dminuoso> | Sorry, *Lens' |
| 07:44:36 | <dminuoso> | This can be useful if you you have a large, possibly nested, sum type in which some particular structure appears along every constructor |
| 07:46:15 | <dminuoso> | i.e. if in its true sums of products representation, each summand would have a field of that type |
| 07:47:16 | <sm> | ok.. types are relatively small and lens not much used in this project, I'll keep it simple. I'm not sure which of these (three) simple types is preferable. It doesn't matter much, but it's going to be a lot of edits so hope I pick the right one |
| 07:48:27 | <dminuoso> | sm: I would just remove `data Date = Date Day Bool` entirely from the options |
| 07:48:35 | × | danza quits (~francesco@151.53.13.66) (Ping timeout: 252 seconds) |
| 07:48:46 | <dminuoso> | It's very tedious inband signalling, where the value of bool says absolutely nothing about its provenance |
| 07:49:03 | <sm> | ok, Date Day DateMode looks good then |
| 07:49:31 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:51:10 | <sm> | I could argue it both ways, Bool or DateMode. No matter |
| 07:51:18 | <sm> | thanks! |
| 07:53:05 | → | gurkenglas joins (~gurkengla@dynamic-046-114-182-034.46.114.pool.telefonica.de) |
| 07:53:15 | <dminuoso> | sm: Sure, on a theoretic level DateMode suffers from boolean blindness as well, but assuming some very rudimentary discipline where dont copy the world with functions like `filterX :: (a -> DateMode) -> [a] -> [a]`, then the meaning of `FlexMode` should usualy be clear |
| 07:53:36 | <dminuoso> | especially if you limit the places where you generate such values to some domain specific code |
| 07:54:34 | <dminuoso> | a True can mean anything, maybe two strings are equal, or maybe one list is larger than the other (or the other way?!) |
| 07:55:21 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 07:56:59 | <sm> | the codebase and context are small here |
| 07:57:22 | × | Varoo quits (~Varoo@117.203.246.41) (Ping timeout: 252 seconds) |
| 07:57:41 | <sm> | actually my original doubt was are any of these worse storage- or laziness-wise ? |
| 07:57:55 | <sm> | or are they all roughly equivalent ? |
| 07:58:39 | <sm> | I mean, is the two-constructor ADT equivalent to the single constructor one. I'm guessing so |
| 07:59:25 | <dminuoso> | sm: well, they can encode different things with respect to lazyness of course. |
| 07:59:36 | <dminuoso> | with the one-constructor version the date mode can be kept lazy |
| 07:59:42 | <dminuoso> | *not lazy |
| 07:59:59 | <dminuoso> | because to extract the date, you have to discriminate on the date mode first (via constructor selection) |
| 08:00:29 | → | codaraxis joins (~codaraxis@user/codaraxis) |
| 08:00:47 | <dminuoso> | other than that, the two-constructor form is the true sums of products representation of the one-constructor + nested nullary form |
| 08:00:55 | → | kassouni joins (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) |
| 08:01:09 | → | danza joins (~francesco@151.35.43.42) |
| 08:01:32 | <dminuoso> | (or I guess just "sums of products") |
| 08:02:19 | <dminuoso> | On a technical level, it seems that even with the outer-two-constructor form you should be able to extract the Day without discriminating the constructor |
| 08:03:56 | <dminuoso> | But as far as I know, we dont have an explicit way to describe this access, such as `f :: Date -> T; f (_ day) = ...` |
| 08:04:16 | → | codaraxis__ joins (~codaraxis@user/codaraxis) |
| 08:05:09 | × | codaraxis__ quits (~codaraxis@user/codaraxis) (Remote host closed the connection) |
| 08:06:55 | × | danza quits (~francesco@151.35.43.42) (Ping timeout: 248 seconds) |
| 08:07:39 | sm | makes it real obvious: |
| 08:07:39 | sm | data Date = Date Day ExactOrFlex |
| 08:07:39 | sm | data ExactOrFlex = Exact | Flex |
| 08:08:00 | × | codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 248 seconds) |
| 08:10:22 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:11:18 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 08:12:33 | → | troydm joins (~troydm@user/troydm) |
| 08:16:15 | → | emmanuelux joins (~emmanuelu@user/emmanuelux) |
| 08:20:14 | → | danza joins (~francesco@151.37.98.0) |
| 08:20:16 | × | shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 248 seconds) |
| 08:25:28 | × | razetime quits (~Thunderbi@117.193.4.182) (Ping timeout: 252 seconds) |
| 08:27:13 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b571:9acb:283f:a733) (Remote host closed the connection) |
| 08:30:52 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 08:31:48 | <sm> | what silly mistake am I making here, which I can't figure out from docs ? |
| 08:31:48 | <sm> | instance Functor Date where fmap f (Date d ef) = Date (f d) ef |
| 08:31:48 | <sm> | "Expected kind ‘* -> *’, but ‘Date’ has kind ‘*’, In the first argument of ‘Functor’, namely ‘Date’" |
| 08:32:37 | <c_wraith> | The error message sort of says it all |
| 08:32:51 | <c_wraith> | Only type constructors that take an argument can be an instance of Functor |
| 08:33:16 | <c_wraith> | The Date type doesn't have a type argument, so it can't be an instance of Functor |
| 08:33:35 | <sm> | bah |
| 08:33:49 | <sm> | thank you |
| 08:36:07 | → | juri__ joins (~juri@79.140.120.190) |
| 08:37:11 | × | sloorush quits (~sloorush@52.187.184.81) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 08:37:53 | × | juri_ quits (~juri@84-19-175-179.pool.ovpn.com) (Ping timeout: 246 seconds) |
| 08:41:14 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds) |
| 08:42:00 | × | juri__ quits (~juri@79.140.120.190) (Read error: Connection reset by peer) |
| 08:43:29 | → | razetime joins (~Thunderbi@117.193.4.182) |
| 08:44:04 | × | ft quits (~ft@p4fc2a257.dip0.t-ipconnect.de) (Quit: leaving) |
| 08:45:36 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 08:45:57 | → | freeside joins (~mengwong@103.252.202.170) |
| 08:47:42 | → | akegalj joins (~akegalj@93-139-137-183.adsl.net.t-com.hr) |
| 08:53:49 | → | avicenzi joins (~avicenzi@2a00:ca8:a1f:b004::c32) |
| 08:56:29 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds) |
| 08:57:46 | → | juri_ joins (~juri@84-19-175-179.pool.ovpn.com) |
| 09:00:12 | × | JhonPedroza[m] quits (~jfpedroza@2001:470:69fc:105::2:e2a4) (Quit: You have been kicked for being idle) |
| 09:01:06 | → | thongpv joins (~thongpv87@14.179.159.25) |
| 09:01:47 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 09:05:55 | → | acidjnk_new3 joins (~acidjnk@p200300d6e715c4384c61433e25d9b335.dip0.t-ipconnect.de) |
| 09:10:35 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 09:14:06 | × | kassouni quits (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 09:14:43 | × | Guest75 quits (~Guest75@178.141.149.12) (Ping timeout: 260 seconds) |
| 09:15:45 | → | freeside joins (~mengwong@103.252.202.170) |
| 09:16:49 | × | danza quits (~francesco@151.37.98.0) (Ping timeout: 260 seconds) |
| 09:17:36 | → | kassouni joins (~kassouni@2601:646:400:68b0:18dc:d2:c373:8213) |
| 09:20:04 | → | EvanR_ joins (~EvanR@user/evanr) |
| 09:20:15 | × | EvanR quits (~EvanR@user/evanr) (Ping timeout: 252 seconds) |
| 09:20:28 | × | gurkenglas quits (~gurkengla@dynamic-046-114-182-034.46.114.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 09:22:11 | × | kassouni quits (~kassouni@2601:646:400:68b0:18dc:d2:c373:8213) (Client Quit) |
| 09:23:44 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 09:23:56 | → | mmhat joins (~mmh@p200300f1c707be79ee086bfffe095315.dip0.t-ipconnect.de) |
| 09:27:42 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b571:9acb:283f:a733) |
| 09:30:03 | → | danza joins (~francesco@37.102.50.60) |
| 09:31:59 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b571:9acb:283f:a733) (Ping timeout: 252 seconds) |
| 09:32:26 | → | MajorBiscuit joins (~MajorBisc@145.94.153.3) |
| 09:33:07 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:41:41 | → | kassouni joins (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) |
| 09:47:57 | → | kuribas joins (~user@ptr-17d51emhfv4hfc1jc5w.18120a2.ip6.access.telenet.be) |
| 09:55:26 | → | teo joins (~teo@user/teo) |
| 10:04:15 | → | zeenk joins (~zeenk@2a02:2f04:a214:1e00::7fe) |
| 10:05:14 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds) |
| 10:11:10 | → | __monty__ joins (~toonn@user/toonn) |
| 10:23:07 | × | thongpv quits (~thongpv87@14.179.159.25) (Ping timeout: 248 seconds) |
| 10:23:35 | → | chele joins (~chele@user/chele) |
| 10:27:42 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:28:48 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:f424:933a:fcd6:76ad) |
| 10:31:03 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 10:33:12 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:f424:933a:fcd6:76ad) (Ping timeout: 252 seconds) |
| 10:37:39 | × | razetime quits (~Thunderbi@117.193.4.182) (Quit: See You Space Cowboy) |
| 11:04:32 | → | kitzman joins (~kitzman@user/dekenevs) |
| 11:07:12 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 11:11:58 | × | caryhartline quits (~caryhartl@2600:1700:2d0:8d30:a932:353f:91f2:f048) (Quit: caryhartline) |
| 11:12:08 | × | kassouni quits (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 11:12:58 | → | kassouni joins (~kassouni@2601:646:400:68b0:18dc:d2:c373:8213) |
| 11:13:36 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 11:18:15 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 11:18:57 | × | mikoto-chan quits (~mikoto-ch@85-76-133-194-nat.elisa-mobile.fi) (Quit: WeeChat 3.6) |
| 11:26:27 | → | freeside_ joins (~mengwong@103.252.202.170) |
| 11:26:27 | × | mmhat quits (~mmh@p200300f1c707be79ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8) |
| 11:27:14 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 246 seconds) |
| 12:01:20 | → | xff0x joins (~xff0x@2405:6580:b080:900:e7c5:c7:8d46:6e81) |
| 12:04:00 | × | freeside_ quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds) |
| 12:14:23 | × | ubert quits (~Thunderbi@p548c8ef0.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 12:18:33 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:18:39 | → | freeside joins (~mengwong@103.252.202.170) |
| 12:23:13 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:27:57 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Quit: WeeChat 3.8) |
| 12:29:05 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 12:30:34 | <merijn> | hmm, I see random-fu has a Categorical distribution for weighted sampling, but it doesn't really do sampling without replacement. Anyone happen to know any algorithms for implementing sampling without replacement on top of that? |
| 12:33:38 | <maerwald[m]> | merijn: did you know d_type is not portable? |
| 12:34:25 | <merijn> | ENOCONTEXT |
| 12:35:26 | <maerwald[m]> | JFS just returns DT_UNKNOWN |
| 12:35:51 | <merijn> | I don't even know what JFS is? |
| 12:36:11 | <maerwald[m]> | Journaling filesystem's |
| 12:36:49 | <merijn> | I feel there's a whole lotta implicit context to this question/comment that I'm too tired/distracted to infer :) |
| 12:36:57 | <maerwald[m]> | It's older than ext2 |
| 12:37:16 | <maerwald[m]> | merijn: my application is busted on JFS, lol |
| 12:37:28 | <merijn> | ok, so JFS is a specific filesystem and I'm assuming this is some posix compat horror story? :p |
| 12:37:28 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 12:37:43 | <maerwald[m]> | And we just had a PR in unix to add DirType to the API |
| 12:38:16 | <maerwald[m]> | Except now your app only works on some filesystems |
| 12:39:06 | <maerwald[m]> | Now I need a separate syscall for every file... |
| 12:39:06 | × | mrmonday quits (~robert@what.i.hope.is.not.a.tabernaevagant.es) (Quit: .) |
| 12:39:10 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 12:39:51 | → | jeetelongname joins (~jeet@148.197.248.56) |
| 12:41:00 | → | mrmonday joins (~robert@what.i.hope.is.not.a.tabernaevagant.es) |
| 12:42:04 | × | kassouni quits (~kassouni@2601:646:400:68b0:18dc:d2:c373:8213) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 12:43:25 | × | __monty__ quits (~toonn@user/toonn) (Ping timeout: 268 seconds) |
| 12:44:02 | <merijn> | maerwald[m]: After consulting religious scripture I've got even worse news for you |
| 12:44:36 | <merijn> | maerwald[m]: Only d_ino and d_name are required (and thus portable) according to posix.1 |
| 12:44:45 | <merijn> | Everything else is implementation defined |
| 12:47:52 | × | akegalj quits (~akegalj@93-139-137-183.adsl.net.t-com.hr) (Quit: leaving) |
| 12:51:53 | <maerwald[m]> | So how would you deal with it at runtime |
| 12:53:40 | <maerwald[m]> | I'm not sure there's a sensible mechanism |
| 12:53:49 | × | jeetelongname quits (~jeet@148.197.248.56) (Ping timeout: 260 seconds) |
| 12:53:51 | <merijn> | You don't |
| 12:54:10 | <merijn> | You gotta handle it at compile time for autoconf misery :p |
| 12:54:21 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 12:54:49 | <kuribas> | the joy of unhygienic macros. |
| 12:54:52 | <maerwald[m]> | This is not compile time. |
| 12:55:10 | <maerwald[m]> | I don't compile my app against JFS :P |
| 12:55:21 | <merijn> | maerwald[m]: oh, you mean how to handle DT_UNKNOWN? |
| 12:55:23 | <maerwald[m]> | It just returns nonsense for d_type |
| 12:56:07 | <maerwald[m]> | Yeah, it's normally used to know when the stream is done |
| 12:57:05 | <merijn> | I mean, maybe that's just a bug in the kernel module for JFS :p |
| 12:57:16 | <merijn> | Either way, I don't see how you can really "handle" it |
| 12:59:57 | × | L29Ah[x] quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 256 seconds) |
| 13:07:07 | × | yrlnry quits (~yrlnry@2600:4040:738e:5400:87d:f2d:382e:ac3d) (Remote host closed the connection) |
| 13:08:15 | → | yrlnry joins (~yrlnry@pool-108-36-173-41.phlapa.fios.verizon.net) |
| 13:16:18 | → | rekahsoft joins (~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca) |
| 13:17:57 | × | danza quits (~francesco@37.102.50.60) (Ping timeout: 268 seconds) |
| 13:21:02 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 246 seconds) |
| 13:22:39 | × | kuribas quits (~user@ptr-17d51emhfv4hfc1jc5w.18120a2.ip6.access.telenet.be) (Ping timeout: 248 seconds) |
| 13:27:53 | <maerwald> | merijn: I'm guessing musl shoves some compatibility code over the filesystem thing |
| 13:28:21 | <maerwald> | or is it the kernel deciding |
| 13:28:34 | <maerwald> | because I build against musl |
| 13:30:38 | → | Guest|50 joins (~Guest|50@128.243.2.19) |
| 13:30:44 | → | danza joins (~francesco@37.102.50.60) |
| 13:31:07 | <mauke> | wait, d_ino is standard? |
| 13:31:18 | <mauke> | I thought only the name was reliable |
| 13:32:10 | <maerwald> | jeez |
| 13:33:11 | × | Guest|50 quits (~Guest|50@128.243.2.19) (Client Quit) |
| 13:36:17 | → | freeside joins (~mengwong@103.252.202.170) |
| 13:38:40 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 248 seconds) |
| 13:39:50 | <geekosaur> | I recall that being an issue with reiserfs because it used a large hash for d_ino which wasn't POSIX compatible |
| 13:40:57 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds) |
| 13:42:04 | → | freeside joins (~mengwong@103.252.202.170) |
| 13:43:39 | × | trev_ quits (~trev@109-252-35-99.nat.spd-mgts.ru) (Remote host closed the connection) |
| 13:45:39 | maerwald | waiting for jail jokes |
| 13:47:06 | <geekosaur> | "beats your wife" jokes, and SuSE dropped it like a hot potato after having all but switched to it |
| 13:51:59 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds) |
| 13:56:28 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb) |
| 14:01:31 | × | FragByte quits (~christian@user/fragbyte) (Quit: Quit) |
| 14:01:49 | → | FragByte joins (~christian@user/fragbyte) |
| 14:05:13 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:05:47 | × | FragByte quits (~christian@user/fragbyte) (Client Quit) |
| 14:05:55 | × | rekahsoft quits (~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca) (Remote host closed the connection) |
| 14:06:36 | → | rekahsoft joins (~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca) |
| 14:06:46 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 14:08:14 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 14:10:26 | <jean-paul[m]> | Given a record constructor and a list of string/value pairs, is there a way to process the list in order - or should I just build a Map and pull fields out of it (either in the order the constructor requires or pull them all out and use the record syntax to call it)? |
| 14:11:48 | → | Midjak joins (~Midjak@82.66.147.146) |
| 14:15:41 | → | elevenkb joins (~elevenkb@105.184.125.233) |
| 14:16:27 | → | akegalj joins (~akegalj@89-164-123-86.dsl.iskon.hr) |
| 14:20:28 | → | freeside joins (~mengwong@103.252.202.170) |
| 14:22:01 | × | elevenkb quits (~elevenkb@105.184.125.233) (Quit: Client closed) |
| 14:23:52 | <maerwald> | merijn: https://paste.tomsmeding.com/tQhp7pfA |
| 14:24:55 | <maerwald> | that works if we always get DT_UNKNOWN for unsupported d_type |
| 14:25:02 | <maerwald> | I'm not sure where that is defined though |
| 14:25:10 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 268 seconds) |
| 14:25:50 | → | freeside joins (~mengwong@103.252.202.170) |
| 14:26:36 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 14:41:44 | <merijn> | jean-paul[m]: You can use sortOn |
| 14:41:57 | <merijn> | :t sortOn |
| 14:41:58 | <lambdabot> | Ord b => (a -> b) -> [a] -> [a] |
| 14:42:41 | <jean-paul[m]> | True. My ordering is pretty arbitrary, I guess the sort function would be as ugly as what I have to do w/o it. |
| 14:42:43 | <merijn> | jean-paul[m]: oh, wait, you mean strings corresponding to record fields? |
| 14:42:54 | <jean-paul[m]> | no, there's a mapping |
| 14:43:17 | <merijn> | ok, then you need to be a bit more specific about what exactly you wanna do, because it's unclear to me |
| 14:43:22 | <jean-paul[m]> | I'm probably prematurely optimizing, it's easy enough to just build a Map and then lookup stuff in it |
| 14:43:55 | <jean-paul[m]> | https://gist.github.com/exarkun/11fdedc5a3854a5f598c07696a0b906e is what I have now |
| 14:43:55 | × | tomku quits (~tomku@user/tomku) (Read error: Connection reset by peer) |
| 14:47:35 | <jean-paul[m]> | I thought maybe instead of building the map I could handle each tuple as it came somehow (but I see lots of things that get in the way of that working, so I asked) |
| 14:48:43 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 14:49:31 | → | tomku joins (~tomku@user/tomku) |
| 14:51:33 | × | yrlnry quits (~yrlnry@pool-108-36-173-41.phlapa.fios.verizon.net) (Read error: Connection reset by peer) |
| 14:52:52 | <Profpatsch> | What’s the easiest way to use Data.Data to say “check recursively whether all subfields of type T in a value use a specific constructor of T |
| 14:52:52 | → | Joao003 joins (~Joao003@2804:840:8312:3400:bc73:fa44:9f4e:9fda) |
| 14:54:35 | <Profpatsch> | So something like data T = A T | B T gfold (\case { A t -> gfold t; B _ -> All False }) (val :: T) |
| 14:54:45 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:54:56 | → | yrlnry joins (~yrlnry@2600:4040:738e:5400:87d:f2d:382e:ac3d) |
| 14:55:18 | <Profpatsch> | should return Sum True iff all Ts are A recursively |
| 14:57:14 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 268 seconds) |
| 14:57:28 | <Profpatsch> | Give it another constructor C so it is finite |
| 14:58:43 | <Profpatsch> | maybe https://hackage.haskell.org/package/generics-sop-0.5.1.2/docs/Generics-SOP.html#v:hcfoldMap |
| 15:00:26 | <[Leary]> | jean-paul[m]: There are various things you could do, but they'd mostly be for the worse. One option would be to write a `parseExtensionField :: (B.ByteString, B.Bytestring) -> URIExtension -> Either String URIExtension` and use it to fold down your list over some default record. |
| 15:02:03 | <Profpatsch> | Oh I think gmapQ wtih a function to Bool and then `and` the result |
| 15:02:43 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:04:04 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:05:16 | <Profpatsch> | no that’s not it, it’s a forall Data d |
| 15:05:28 | <jean-paul[m]> | [Leary]: Thanks. I think I see how that could work. I think I would probably also need to track what had been filled as I fold because mostly there aren't sensible defaults so missing fields should be errors. Feels like a bunch more bookkeeping, I'll let the computer do the work for now. |
| 15:07:29 | → | hounded joins (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) |
| 15:07:41 | <merijn> | jean-paul[m]: So, this is for a parser? |
| 15:07:43 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
| 15:07:49 | → | hounded_woodstoc joins (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) |
| 15:08:00 | <jean-paul[m]> | merijn: yes |
| 15:08:17 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 15:08:17 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 15:08:17 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:08:39 | <merijn> | jean-paul[m]: Not sure if it exactly fits your use case, but parser-combinators has Control.Monad.Permutation for parsing any permutation of a fixed number of fields |
| 15:08:40 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 15:08:46 | <jean-paul[m]> | an earlier stage pulled a bunch of netstring-encoded pairs out of a ByteString |
| 15:08:56 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 15:09:00 | <merijn> | https://hackage.haskell.org/package/parser-combinators-1.3.0/docs/Control-Monad-Permutations.html |
| 15:12:59 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 15:13:31 | <[Leary]> | jean-paul[m]: There are nice tricks with "higher kinded data" for this kind of thing. You can have a `base :: YourRecord Maybe` where every field is Nothing, then map pairs to `base{field=Just value}` and lift <|> over the type to combine them all. |
| 15:15:56 | <merijn> | [Leary]: Like Permutation? ;) |
| 15:17:13 | → | ft joins (~ft@p4fc2a257.dip0.t-ipconnect.de) |
| 15:21:58 | × | Joao003 quits (~Joao003@2804:840:8312:3400:bc73:fa44:9f4e:9fda) (Quit: Leaving) |
| 15:22:11 | → | thongpv joins (~thongpv87@2402:9d80:368:85a6:1abd:cb53:feec:3e50) |
| 15:23:32 | → | Varoo joins (~Varoo@117.203.246.41) |
| 15:23:36 | <Profpatsch> | Ah I can solve it with a fix (\f d -> case cast d of { A t -> f t; B _ -> False; C -> True }) |
| 15:23:59 | <Profpatsch> | err and add a Just around everything and Nothing means it’s not of type T |
| 15:24:41 | <Profpatsch> | fix (\f d -> case cast d of { JUst (A t) -> f t; Just (B _ )-> False; Just C -> True; Nothing -> True }) |
| 15:25:45 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
| 15:29:45 | × | Varoo quits (~Varoo@117.203.246.41) (Read error: Connection reset by peer) |
| 15:30:32 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 268 seconds) |
| 15:30:41 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 15:31:05 | <segfaultfizzbuzz> | what are the major factors which drive the need for out-of-order execution in a program? |
| 15:31:27 | → | varoo joins (~varoo@117.203.246.41) |
| 15:32:03 | → | zebrag joins (~chris@user/zebrag) |
| 15:35:16 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:36:17 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 15:36:52 | × | matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:37:25 | <merijn> | segfaultfizzbuzz: In general? Load balancing |
| 15:38:09 | <merijn> | and/or latency hiding, although you can argue those two are two different perspectives on the same thing |
| 15:38:32 | → | kuribas joins (~user@ptr-17d51en5pcqxlnvqlnm.18120a2.ip6.access.telenet.be) |
| 15:39:01 | <segfaultfizzbuzz> | load balancing across cores...? |
| 15:39:19 | <segfaultfizzbuzz> | what, how can latency be "hid"? |
| 15:40:45 | → | matijja joins (~matijja@193.77.181.201) |
| 15:41:12 | → | shriekingnoise joins (~shrieking@186.137.175.87) |
| 15:42:24 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 15:43:34 | <merijn> | segfaultfizzbuzz: Depends a bit on where the question comes from :p That's true "in general", but if this is secretly a laziness question, then that has different answers :p |
| 15:44:24 | <segfaultfizzbuzz> | ha ok |
| 15:47:12 | <merijn> | Laziness is (often) implemented in ways the result in "execution out of order", but the *goal* is non-strictness. On the other hand, there is "out of order" behaviour in many strict settings too |
| 15:47:26 | × | yrlnry quits (~yrlnry@2600:4040:738e:5400:87d:f2d:382e:ac3d) (Quit: Leaving...) |
| 15:48:15 | × | danza quits (~francesco@37.102.50.60) (Ping timeout: 248 seconds) |
| 15:50:07 | <kuribas> | I am implementing Union in my sql library. It just occurs to me that the difficulty aren't the types, it's building a consistent model. |
| 15:50:34 | <kuribas> | The ease of dynamic languages is that they don't require consistency, so appear simpler. |
| 15:50:58 | <kuribas> | At least, assuming people get past the initial learning curve. |
| 15:51:27 | × | tessier_ quits (~treed@98.171.210.130) (Ping timeout: 265 seconds) |
| 15:51:29 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:e5a0:a2ae:d060:9326) (Quit: use-value) |
| 15:51:48 | <kuribas> | Same with dependent types. Once you understand curry-howard, reasoning about DT isn't that hard, at least not harder than a complicated type level haskell program. |
| 15:51:51 | <kuribas> | easier I'd say. |
| 15:52:21 | <kuribas> | If I get "stuck" with the types, it's just because I don't have a consistent model in my mind. |
| 15:53:00 | → | tessier joins (~treed@98.171.210.130) |
| 15:53:25 | <kuribas> | And after adding "spec" to a clojure program, it looks exactly like a typed haskell program, with all the redundancy that they complain about. |
| 15:53:25 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 15:53:29 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds) |
| 15:54:35 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 15:58:32 | → | freeside joins (~mengwong@103.252.202.170) |
| 15:59:25 | <jean-paul[m]> | sounds right. |
| 15:59:49 | <segfaultfizzbuzz> | merijn: hmm ok |
| 16:01:03 | <Profpatsch> | ergh my solution above is wrong, it doesn’t recurse in the nothing case |
| 16:01:49 | → | irrgit joins (~irrgit@86.106.90.226) |
| 16:01:50 | → | danza joins (~francesco@37.102.116.190) |
| 16:02:18 | <Profpatsch> | I think what I want is Lens.template |
| 16:03:10 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds) |
| 16:03:50 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 268 seconds) |
| 16:05:17 | → | mechap joins (~mechap@user/mechap) |
| 16:08:38 | → | freeside joins (~mengwong@103.252.202.170) |
| 16:09:33 | → | ystael joins (~ystael@user/ystael) |
| 16:11:45 | → | analoq joins (~yashi@user/dies) |
| 16:13:18 | × | finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer) |
| 16:16:40 | → | roconnor joins (~quassel@coq/roconnor) |
| 16:20:49 | × | troydm quits (~troydm@user/troydm) (Ping timeout: 252 seconds) |
| 16:21:14 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:da1d:7c03:5fef:8e2d) (Quit: WeeChat 2.8) |
| 16:24:59 | × | dsrt^ quits (~tj99@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection) |
| 16:28:23 | × | avicenzi quits (~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 264 seconds) |
| 16:30:42 | <segfaultfizzbuzz> | okay so if i decompile a random binary program, can i decompile into any language? can i decompile into haskell? |
| 16:33:24 | <darkling> | Probably not easily. I'd imagine that ghc-compiled code looks very different to, say, g++-compiled code, and your decompiler is going to have real problems producing something usable or understandable if it's expecting one and gets the other. |
| 16:34:09 | × | MajorBiscuit quits (~MajorBisc@145.94.153.3) (Quit: WeeChat 3.6) |
| 16:34:34 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
| 16:35:09 | <segfaultfizzbuzz> | decompilation "always" targets C? |
| 16:35:51 | <segfaultfizzbuzz> | i think part of what i am thinking is that there is a lot of attention dedicated to what is the best language to compile into machine code, but i don't see a lot of discussion of the opposite direction |
| 16:35:52 | <darkling> | It's a nice easy target. You can probably find decompilers for other languages if you look hard enough. |
| 16:36:10 | <segfaultfizzbuzz> | and i mean that as a constraint for the design of a language |
| 16:36:25 | <segfaultfizzbuzz> | constraint or guideline or somesuch |
| 16:37:13 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 16:37:19 | <merijn> | segfaultfizzbuzz: decompilation doesn't really exist |
| 16:37:31 | <segfaultfizzbuzz> | merijn: elaborate plz? |
| 16:37:39 | <merijn> | It's just "trying to invent code that would compile to something resembling this assembly" |
| 16:38:00 | <merijn> | The more predictable the "X -> assembly" mapping is, the easier you can invent a conceivable mapping in reverse |
| 16:38:25 | <segfaultfizzbuzz> | right along with guidelines like "make the code cognitively easy to interpret" and "make the code fairly compact" |
| 16:38:30 | <merijn> | But considering there's infinitely many (at least, hypothetically) languages and program sequence that can result in the same assembly |
| 16:38:47 | <merijn> | you have know way of reallying knowing what the origin was |
| 16:39:01 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8) |
| 16:39:01 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:4054:34b8:499a:7d46) |
| 16:39:16 | <merijn> | But the mapping from Haskell to assembly is pretty complicated and hard to predict, so reversing "to haskell" is kinda hard |
| 16:43:55 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 252 seconds) |
| 16:44:11 | <darkling> | It's hard enough going to C. And then harder understanding what the code's actually about when you don't have any variable or function names... |
| 16:44:45 | <segfaultfizzbuzz> | ok but you can probably start by digging through common C libraries and matching stuff up,... |
| 16:45:02 | <segfaultfizzbuzz> | you can probably get like 50+% of most stuff like that |
| 16:45:25 | <darkling> | Oh, it's possible to work out what's happening eventually, but the semantics of the code is very much a human-mediated things. |
| 16:45:29 | <darkling> | s/things/thing/ |
| 16:45:49 | <geekosaur> | you should study decompilation of games, which has been going on for decades. you'll find out just how hard this really is |
| 16:46:13 | <darkling> | Or even just try decompiling something yourself, by hand. :) |
| 16:46:22 | <segfaultfizzbuzz> | ok, is there a specific game you would suggest looking at? super mario? |
| 16:47:22 | <segfaultfizzbuzz> | darkling: yeah i still haven't wrapped my head around what "semantics" is |
| 16:47:22 | <geekosaur> | https://www.hklaw.com/en/insights/publications/2022/03/decompiling-zelda-an-introduction-to-understanding-machine-code for example |
| 16:47:37 | <darkling> | Try BBC Elite. There's already a decompiled version of it, with full annotations and commentsm so you can check afterwards how close you were. :) |
| 16:48:02 | <darkling> | segfaultfizzbuzz: semantics is what the code *means*. It's the human understanding of what it's doing. |
| 16:48:48 | <segfaultfizzbuzz> | geekosaur: haha from a law firm |
| 16:49:03 | <segfaultfizzbuzz> | yes i have difficulty understanding what meaning is as silly as that sounds |
| 16:49:28 | <segfaultfizzbuzz> | i have realized that a lot of people seem to suppose that humans have supernatural powers whereas i don't feel this is true |
| 16:49:37 | <darkling> | Not just "I've got a loop and it's adds this thing from this array to that thing from that array", but "I'm adding two vectors together to offset my 3D model into the enemy's position in the game model" |
| 16:50:06 | <darkling> | ^^ example of semantic understanding |
| 16:50:26 | → | cheater_ joins (~Username@user/cheater) |
| 16:50:53 | <segfaultfizzbuzz> | okay but "semantic canonicalization" can take care of a lot of that ...? |
| 16:51:04 | → | kenran` joins (~user@user/kenran) |
| 16:51:09 | <segfaultfizzbuzz> | there are only so many types and there are only so many desirable operations to perform on those types |
| 16:51:35 | <segfaultfizzbuzz> | like in engineering, everything is an oscillator but with many different names and coefficients |
| 16:51:38 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 16:52:13 | <darkling> | Try it. |
| 16:52:43 | × | kenran quits (~user@user/kenran) (Ping timeout: 252 seconds) |
| 16:52:59 | × | cheater quits (~Username@user/cheater) (Ping timeout: 264 seconds) |
| 16:53:02 | cheater_ | is now known as cheater |
| 16:57:44 | × | kenran` quits (~user@user/kenran) (Remote host closed the connection) |
| 16:58:08 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 17:00:08 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 17:01:16 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:02:59 | <segfaultfizzbuzz> | i guess this also goes to show, if you get a binary you can't really have any idea what it does lol |
| 17:03:26 | → | kurbus joins (~kurbus@user/kurbus) |
| 17:05:38 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 17:06:39 | <geekosaur> | indeed. especially if it does things like patching its own code on the fly (or allows an attacker to do so via e.g. overflowing the stack) |
| 17:07:07 | <segfaultfizzbuzz> | lol |
| 17:07:47 | <segfaultfizzbuzz> | are there legitimate uses of self-modifying programs? |
| 17:08:04 | × | Profpatsch quits (~Profpatsc@static.88-198-193-255.clients.your-server.de) (Quit: WeeChat 3.7.1) |
| 17:08:11 | <segfaultfizzbuzz> | maybe some kind of copy protection or something? |
| 17:08:32 | → | trev_ joins (~trev@109.252.35.99) |
| 17:09:17 | → | __monty__ joins (~toonn@user/toonn) |
| 17:09:48 | <segfaultfizzbuzz> | just ran across this quote "The first $400 million High NA tool will be completed at ASML in the first half of 2023." -- wow that's an expensive machine lol |
| 17:09:52 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds) |
| 17:09:52 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 17:10:06 | <geekosaur> | games used to do it a lot to save on memory |
| 17:10:29 | <segfaultfizzbuzz> | geekosaur: i suppose we could say in the modern era here |
| 17:10:50 | × | danza quits (~francesco@37.102.116.190) (Ping timeout: 260 seconds) |
| 17:10:59 | <geekosaur> | it's avoided these days in part because it's hard to understand the result |
| 17:11:36 | <darkling> | Also busts the instruction cache in ways you don't really want to do these days. |
| 17:12:17 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds) |
| 17:15:26 | <segfaultfizzbuzz> | seems like stamping out self modifying code would be a good thing for an operating system design (or maybe that can be set up in silicon...?) |
| 17:16:43 | <geekosaur> | largely done already |
| 17:16:51 | <segfaultfizzbuzz> | oh? |
| 17:17:04 | <geekosaur> | I don't think many OSes give you a writable text/code segment these days |
| 17:17:24 | <segfaultfizzbuzz> | ha |
| 17:17:37 | <geekosaur> | and likewise tend to disable execution out of data segments |
| 17:18:30 | → | razetime joins (~Thunderbi@117.193.4.182) |
| 17:19:19 | × | razetime quits (~Thunderbi@117.193.4.182) (Remote host closed the connection) |
| 17:20:35 | <segfaultfizzbuzz> | is there a mechanism by which i can safely allow my application users to write haskell code and use it with my haskell application? |
| 17:22:05 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 17:22:31 | → | freeside joins (~mengwong@103.252.202.170) |
| 17:22:43 | → | danza joins (~francesco@151.74.157.188) |
| 17:23:03 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:23:47 | × | thongpv quits (~thongpv87@2402:9d80:368:85a6:1abd:cb53:feec:3e50) (Read error: Connection reset by peer) |
| 17:23:58 | <analoq> | i'm having some trouble parsing a json dict with aeson for which i do not know the keynames. i found some approaches but they were rather old and didn't look very concise. what it comes down to is "https://dpaste.com/57AJDXQRS.txt" |
| 17:27:41 | <analoq> | initially i thought i could simply describe this a la `data MyJson = {easilyParsableDict}` and magically get a hash map, but that's not going to happen apparently |
| 17:30:27 | → | king_gs joins (~Thunderbi@187.201.2.248) |
| 17:34:06 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 17:36:40 | <geekosaur> | I thought you could just parse it to a Value which has a HashMap inside it? |
| 17:38:08 | × | king_gs quits (~Thunderbi@187.201.2.248) (Quit: king_gs) |
| 17:38:18 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8) |
| 17:40:00 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:f424:933a:fcd6:76ad) |
| 17:40:58 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds) |
| 17:42:55 | <sm> | segfaultfizzbuzz: not really |
| 17:43:38 | <sm> | you can let them write (unsafe) haskell scripts which call your code as a library |
| 17:43:44 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 17:43:51 | <segfaultfizzbuzz> | ha that's not happening |
| 17:44:33 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 17:44:40 | <sm> | there's also https://hackage.haskell.org/package/hint which looks actually maintained |
| 17:45:29 | <segfaultfizzbuzz> | sm: interesting |
| 17:45:31 | × | bhall quits (~brunohall@138.199.22.101) (Ping timeout: 265 seconds) |
| 17:45:50 | <sm> | and there's an embedded lua interpreter that allows scripting with lua (pandoc does this) |
| 17:46:39 | <segfaultfizzbuzz> | i kinda don't like lua and javascript ,i am wondering if there is something more haskelly i can use, like maybe elm |
| 17:47:37 | <sm> | yes there's elm and purescript |
| 17:47:55 | <segfaultfizzbuzz> | but then i don't want them to write format C:\ in elm |
| 17:48:05 | → | bhall joins (~brunohall@138.199.22.101) |
| 17:48:56 | <sm> | not embedded in your haskell app though |
| 17:49:56 | <segfaultfizzbuzz> | sm: hmm? |
| 17:49:59 | <monochrom> | This is where you find that the very intuitive ("intuitive") "not arbitrary code, some security is in order" translates to a million lines of code because "not arbitrary" is vague and entails a million corner cases. |
| 17:51:28 | <segfaultfizzbuzz> | haha so basically i need to use ai ;-P |
| 17:55:16 | × | danza quits (~francesco@151.74.157.188) (Ping timeout: 252 seconds) |
| 17:56:36 | <segfaultfizzbuzz> | i think the moment that ai starts to become the basis of computer security will be the moment i go back to pen and paper |
| 17:56:47 | → | freeside joins (~mengwong@103.252.202.170) |
| 17:58:55 | → | econo joins (uid147250@user/econo) |
| 18:00:51 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 18:01:27 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 18:08:13 | × | akegalj quits (~akegalj@89-164-123-86.dsl.iskon.hr) (Quit: leaving) |
| 18:09:00 | <tomsmeding> | analoq: as geekosaur said, parse it to a Value (from Data.Aeson) |
| 18:09:26 | <analoq> | tomsmeding: ty i'll look into that |
| 18:10:05 | <tomsmeding> | analoq: you don't get a straight HashMap for peculiar reasons, but Data.Aeson.KeyMap has all the methods you need |
| 18:14:36 | → | jonathanx joins (~jonathan@94.234.101.18) |
| 18:16:52 | <geekosaur> | "peculiar"? I thought it was the HashMap lost key ordering, which may be significant? |
| 18:17:12 | × | varoo quits (~varoo@117.203.246.41) (Quit: Probably got disconnect dure to unstable internet) |
| 18:17:29 | <tomsmeding> | geekosaur: wasn't it related to hashmap dossing, like the one and only cve in aeson? |
| 18:17:38 | → | varoo joins (~varoo@2401:4900:5d26:fa0:9796:d49e:2797:1d1c) |
| 18:17:57 | <geekosaur> | I would expect that fix to be to HashMap since it would also affect other consumers |
| 18:19:55 | → | falafel joins (~falafel@2607:fb91:143f:e47f:6cd4:3764:846a:ef34) |
| 18:20:34 | × | teo quits (~teo@user/teo) (Ping timeout: 252 seconds) |
| 18:20:41 | × | falafel quits (~falafel@2607:fb91:143f:e47f:6cd4:3764:846a:ef34) (Read error: Connection reset by peer) |
| 18:21:06 | → | falafel joins (~falafel@2607:fb91:143f:e47f:6cd4:3764:846a:ef34) |
| 18:22:37 | <geekosaur> | segfaultfizzbuzz, re AI in computer security, pretty sure that began several decades ago (Firewall-1, back in the 90s even) |
| 18:23:28 | <segfaultfizzbuzz> | geekosaur: "basis of" |
| 18:24:12 | <segfaultfizzbuzz> | but yeah i should probably go to office depot and get some pens |
| 18:24:26 | <jean-paul[m]> | "AI in the 90s" didn't mean the same thing as "AI" means now (like "AI in the 70s" didn't mean the same thing as ...) |
| 18:24:37 | <segfaultfizzbuzz> | clarification: office depot or officemax |
| 18:24:55 | <segfaultfizzbuzz> | i don't buy pens at staples though their bic pens are much worse than the officemax bic pens |
| 18:24:59 | <tomsmeding> | geekosaur: https://frasertweedale.github.io/blog-fp/posts/2021-10-12-aeson-hash-flooding-protection.html |
| 18:25:13 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 18:25:17 | <tomsmeding> | this is the only decent explanation with context that I've seen, see also the cs-syd link at the top for explanation on the vulnerability |
| 18:26:29 | × | falafel quits (~falafel@2607:fb91:143f:e47f:6cd4:3764:846a:ef34) (Ping timeout: 255 seconds) |
| 18:26:35 | × | jonathanx quits (~jonathan@94.234.101.18) (Ping timeout: 264 seconds) |
| 18:26:47 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 18:27:12 | <geekosaur> | interesting |
| 18:27:25 | <tomsmeding> | I dunno why the fix isn't in HashMap, as you said |
| 18:27:34 | <tomsmeding> | apparently the fix is to switch to Map? |
| 18:27:50 | <tomsmeding> | and they made the thing opaque to facilitate future changes or something? |
| 18:27:50 | × | varoo quits (~varoo@2401:4900:5d26:fa0:9796:d49e:2797:1d1c) (Read error: Connection reset by peer) |
| 18:27:54 | <geekosaur> | so I saw. that sounds somewhat odd to me |
| 18:28:12 | <tomsmeding> | I guess the standard fix for this is to randomise the hash, which is somewhat awkward in haskell |
| 18:28:15 | <tomsmeding> | maybe that's why they did this |
| 18:28:54 | <tomsmeding> | though a `{-# NOINLINE seed #-} seed :: Int ; seed = unsafePerformIO randomIO` isn't too bad |
| 18:28:55 | → | varoo joins (~varoo@117.203.246.41) |
| 18:30:12 | <geekosaur> | but you need to apply it to the Hashable class's instances |
| 18:30:32 | <tomsmeding> | oh of course |
| 18:30:36 | → | jonathanx joins (~jonathan@94.234.101.18) |
| 18:30:38 | <tomsmeding> | that ain't gonna fly |
| 18:30:38 | × | jonathanx quits (~jonathan@94.234.101.18) (Read error: Connection reset by peer) |
| 18:32:04 | → | jonathanx joins (~jonathan@178.174.176.109) |
| 18:32:27 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 18:32:36 | <geekosaur> | especially that `Int` instance which just returns the value |
| 18:32:59 | <tomsmeding> | though I suspect just xor'ing in the seed at the end could be fine if the hash is then `mod`'ed with some odd prime |
| 18:33:12 | × | varoo quits (~varoo@117.203.246.41) (Client Quit) |
| 18:33:22 | <tomsmeding> | but maybe that's weak for some reason |
| 18:35:17 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Client closed) |
| 18:40:50 | → | kassouni joins (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) |
| 18:42:34 | → | gurkenglas joins (~gurkengla@dynamic-046-114-179-193.46.114.pool.telefonica.de) |
| 18:43:26 | <tomsmeding> | segfaultfizzbuzz: consider Dhall |
| 18:43:38 | <tomsmeding> | never used it, but it may accidentally be what you want |
| 18:44:15 | <segfaultfizzbuzz> | tomsmeding: i will take a look thanks |
| 18:44:45 | <segfaultfizzbuzz> | seems weird that "my application needs to be programmable" is not a first-line concern for languages/ecosystems |
| 18:45:09 | <tomsmeding> | applications don't typically need to be programmable :p |
| 18:45:42 | <tomsmeding> | applications are typically intended to be used by non-programmers, and the ones that aren't are instead architected as modular components that the user can script together manually |
| 18:46:05 | <tomsmeding> | of course this doesn't cover all applications, but for those it seems the industry has settled on lua being acceptable :p |
| 18:46:19 | <tomsmeding> | or not caring that the user can shoot themselves in the foot with IO |
| 18:49:29 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 18:50:25 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
| 18:50:43 | <sm> | "safe languages" are not a common concern generally |
| 18:50:59 | <segfaultfizzbuzz> | i like the ease of writing correct code with elm and think my users could probably make it work |
| 18:51:14 | <segfaultfizzbuzz> | like it's not that hard for amateurs, i think |
| 18:51:17 | <sm> | and when they are, apps usually implement their own |
| 18:51:37 | <sm> | (a DSL) |
| 18:51:45 | <glguy> | I rather like exposing Lua as my app's scripting language |
| 18:51:48 | <segfaultfizzbuzz> | sm: what? backends don't run code...? |
| 18:52:03 | <segfaultfizzbuzz> | i would totally use an elm-lua if someone made it lol |
| 18:52:33 | <sm> | no, backends don't run arbitrary user code usually |
| 18:54:01 | <sm> | for obviously reasons.... this is 2023 not 1970 :) |
| 18:54:13 | <sm> | s/obviously/obvious/ |
| 18:54:46 | <tomsmeding> | sm: but then segfaultfizzbuzz would say, but why don't they run user code in a safe language?? |
| 18:55:50 | <tomsmeding> | the only instance I know of an application that runs user code where effects need to be controlled is PC games |
| 18:56:01 | <tomsmeding> | and in practice they apparently either use lua or implement their own |
| 18:56:06 | <sm> | some do run custom DSLs they have implemented. I'm not thinking of a common "safe" language that's common across apps |
| 18:56:15 | <tomsmeding> | lua? |
| 18:56:39 | <sm> | is that safe ? I don't see web apps running user lua |
| 18:56:41 | <tomsmeding> | I thought you could configure the lua interpreter to just not put any IO stuff in the top-level environment, effectively disallowing any IO |
| 18:56:52 | <segfaultfizzbuzz> | i mean a "programmable backend" sounds like essential functionality, then you can have a safe language, have a sandbox, or maybe if you are really serious use some kind of hardware isolation, like execute a lambda on another bit of hardware or something |
| 18:57:27 | <tomsmeding> | segfaultfizzbuzz: I'm confused -- you _either_ have a safe language, _or_ sandbox + etc., right? |
| 18:57:40 | <tomsmeding> | https://play-haskell.tomsmeding.com exists |
| 18:57:43 | <sm> | yes, lua seems safe enough for use in desktop apps at least |
| 18:57:44 | <tomsmeding> | it uses sandboxing |
| 18:57:51 | <segfaultfizzbuzz> | uh, i suppose you could combine those |
| 18:57:59 | <tomsmeding> | but the entire point of that playground is to _allow_ full haskell |
| 18:58:19 | <tomsmeding> | segfaultfizzbuzz: you could, but it would be unnecessary |
| 18:58:25 | <segfaultfizzbuzz> | i mean aren't there like mom and pop web hosting companies that let you submit php scripts which they run dynamically? |
| 18:58:29 | <tomsmeding> | the point of using a safe language is to not need a sandbox, right? |
| 18:58:34 | <tomsmeding> | segfaultfizzbuzz: yes, they sandbox |
| 18:58:39 | <segfaultfizzbuzz> | i don't know if that is still practiced |
| 18:58:42 | <tomsmeding> | very much |
| 18:58:46 | <sm> | segfaultfizzbuzz: hell no |
| 18:58:55 | <[exa]> | segfaultfizzbuzz: they host dockers now |
| 18:58:56 | <segfaultfizzbuzz> | sm: dynamic php from the webhost is dead? |
| 18:59:18 | <tomsmeding> | https://www.one.com/en/hosting/php |
| 18:59:30 | <tomsmeding> | not sure how many people use this, but it's very much not dead |
| 18:59:42 | <sm> | you can upload php scripts to a web hosting account you own and are legally responsible for, sure. You can't run your own php on someone else's web app generally |
| 18:59:44 | <[exa]> | segfaultfizzbuzz: safely putting people's php insanities into a nice opaque box is a step forward |
| 18:59:47 | × | zeenk quits (~zeenk@2a02:2f04:a214:1e00::7fe) (Quit: Konversation terminated!) |
| 19:00:02 | <tomsmeding> | oh right |
| 19:00:23 | × | kassouni quits (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:00:37 | <sm> | you can probably do it within limits in specialised places like repl.it |
| 19:01:01 | <tomsmeding> | (which uses sandboxing) |
| 19:01:22 | <segfaultfizzbuzz> | ok well someone was questioning whether it was "worthwhile" to have a programmable backend, and i think it is fairly self-evident that the answer to this question is yes, but i would entertain counterarguments to that |
| 19:01:53 | <tomsmeding> | segfaultfizzbuzz: define "backend" |
| 19:02:10 | <tomsmeding> | as in, what purposes do you have in mind |
| 19:02:37 | <segfaultfizzbuzz> | well for example a user might want to define a custom dashboard |
| 19:02:44 | <segfaultfizzbuzz> | and then allow other people on a system to use it |
| 19:02:53 | <segfaultfizzbuzz> | i could have some kind of very constrained list of options |
| 19:03:04 | <segfaultfizzbuzz> | but at some point you cross a threshold, and you say ok, just write a program |
| 19:03:05 | → | merijn joins (~merijn@86.86.29.250) |
| 19:03:27 | → | ardell joins (~ardell@user/ardell) |
| 19:03:29 | <sm> | yes indeed. Haskell would be too much power for that use case |
| 19:04:02 | <sm> | you'd probably provide your own DashboardScript |
| 19:04:22 | <segfaultfizzbuzz> | sm: but then,... why would that be a "language" unto itself |
| 19:04:52 | <segfaultfizzbuzz> | it will need a type system and control flow and all that, and it's not like i would invent all of that myself |
| 19:05:25 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 19:05:30 | <segfaultfizzbuzz> | i would probably (?) mostly just define a variety of return types which are acceptable (?) and a few other things,... |
| 19:05:37 | <mauke> | https://en.wikipedia.org/wiki/Inner-platform_effect |
| 19:06:15 | <darkling> | Yeah, it's rare that you actually need that kind of power in user configuration. |
| 19:06:54 | <sm> | I question whether dashboard building requires a type system, but of course YMMV |
| 19:06:55 | <darkling> | For the dashboard example, we've got Grafana at work. I don't think we've needed anything more than the MS log query language or SQL. |
| 19:07:07 | <segfaultfizzbuzz> | mauke: i recognize and appreciate this phenomenon, but i don't think that this is accurate |
| 19:08:01 | × | merijn quits (~merijn@86.86.29.250) (Ping timeout: 252 seconds) |
| 19:08:03 | <segfaultfizzbuzz> | i suppose another take on this is that once you need programmability then you need a programmer and not a general user |
| 19:08:29 | <sm> | will there be an existing language you can reuse, that can be made safe enough and usable enough for your users at acceptable cost ? Yes maybe, lua might be one. Is there a functional haskell-like one ? Not sure, elm, purescript and dhall have been suggested, I suspect only dhall is suitable for embedding |
| 19:09:09 | <tomsmeding> | dhall's entire point is to be embedded, right? The only things someone could hold against it for this purpose are 1. totality and 2. ability to do web requests (not sure if you can turn this off) |
| 19:10:04 | × | gurkenglas quits (~gurkengla@dynamic-046-114-179-193.46.114.pool.telefonica.de) (Ping timeout: 260 seconds) |
| 19:10:13 | <segfaultfizzbuzz> | 2 is almost certainly a dealbreaker |
| 19:10:24 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 19:10:26 | <segfaultfizzbuzz> | yeah i actually think i may have identified something novel and useful here |
| 19:10:45 | → | gurkenglas joins (~gurkengla@dynamic-046-114-179-193.46.114.pool.telefonica.de) |
| 19:10:50 | <tomsmeding> | for the dashboard example it would need to run in the browser though |
| 19:11:11 | <tomsmeding> | no reason you cannot also create an interpreter for your new SFFB language in JS though |
| 19:11:34 | <segfaultfizzbuzz> | on a related note do languages (haskell, dhall) provide any method of accounting for resource usage, so i can say "this function may not use more than 10 seconds of compute time, and if it tries to then kill it" |
| 19:11:55 | <sm> | in practical terms, you almost always want a custom language constrained to your use case simply for usabliity |
| 19:11:59 | <tomsmeding> | segfaultfizzbuzz: https://hackage.haskell.org/package/base-4.17.0.0/docs/System-Timeout.html#v:timeout |
| 19:12:19 | <segfaultfizzbuzz> | tomsmeding: nice, thanks |
| 19:12:25 | <tomsmeding> | though the FFI throws a wrench in that, see the haddocks |
| 19:12:51 | <glguy> | dhall's being total deosn't mean it won't consume more resources than you're willing to give it, and it's complicated enough to write something like a a function that produces the list of perfect numbers from 1 to N |
| 19:13:09 | <glguy> | but the restrictions mean that your programs are probably more confusing than they would have been to achieve the same results |
| 19:13:35 | <glguy> | it's not clear to me what itch it scratches |
| 19:14:18 | <sm> | +1 |
| 19:17:56 | <tomsmeding> | maybe the point is that writing something that takes a lot of computation is unnatural in dhall? |
| 19:18:32 | <segfaultfizzbuzz> | another thing i was thinking was allowing my users to compile webassembly (eg in the browser) and upload that, and then i would run the webassembly... |
| 19:18:55 | <segfaultfizzbuzz> | that would separate the problem of deciding on a particular language, i think, although i'm not quite sure how webassembly would interface to my application |
| 19:18:55 | <tomsmeding> | segfaultfizzbuzz: if you allow that, just let them run javascript |
| 19:19:26 | <tomsmeding> | though you may the right that wasm itself doesn't get to do any IO... |
| 19:19:32 | <tomsmeding> | *you may be right |
| 19:20:11 | <tomsmeding> | compile GHC to webassembly, put that on your webpage, let your users write haskell, compile that to wasm using in-browser GHC, then run that |
| 19:20:20 | <tomsmeding> | /s because GHC will be gigabytes of wasm |
| 19:20:33 | <tomsmeding> | and /s because, y'know, wtf |
| 19:21:04 | <[exa]> | tomsmeding: honestly you'd be better off just running an x86 vm with a linux with ghc |
| 19:21:16 | <tomsmeding> | :'') |
| 19:21:38 | <tomsmeding> | https://bellard.org/jslinux/ |
| 19:21:46 | <[exa]> | precisely that one. |
| 19:22:14 | <tomsmeding> | I mean, nobody else has the right combination of stupidity and genius to build that |
| 19:22:33 | <segfaultfizzbuzz> | haha |
| 19:23:05 | <tomsmeding> | mind, "stupidity" only to the extent that it is worth questioning whether you _should_ |
| 19:23:14 | <segfaultfizzbuzz> | so basically https://www.youtube.com/watch?v=qybUFnY7Y8w |
| 19:24:06 | <tomsmeding> | more like https://www.youtube.com/watch?v=uNjxe8ShM-8 |
| 19:24:14 | <segfaultfizzbuzz> | music kinda sucks tho sorry lol |
| 19:24:26 | <segfaultfizzbuzz> | lol |
| 19:24:40 | → | mvk joins (~mvk@2607:fea8:5caa:ac00::f944) |
| 19:26:33 | <sm> | https://github.com/dbohdan/embedded-scripting-languages |
| 19:27:12 | <segfaultfizzbuzz> | tomsmeding: i dare you to be the first to compile haskell to powerpoint https://www.youtube.com/watch?v=LArkm4v5mWA |
| 19:28:00 | <tomsmeding> | that is hilarious, I didn't know about pptcc |
| 19:28:47 | <segfaultfizzbuzz> | the laziest powerpoint is where you make the slides while you are presenting |
| 19:29:08 | <tomsmeding> | that's called a blackboard talk |
| 19:29:47 | <tomsmeding> | that "good first issue" tag on this one is just great https://github.com/TomWildenhain/pptcc/issues/4 |
| 19:29:48 | <darkling> | Just use an OHP. :) |
| 19:30:45 | <segfaultfizzbuzz> | haha |
| 19:31:00 | <segfaultfizzbuzz> | haha how to delete someone else's github repository lol |
| 19:31:10 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8) |
| 19:31:28 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 19:31:33 | <tomsmeding> | segfaultfizzbuzz: I do wonder whether pptcc can handle indirect jumps through a register |
| 19:31:41 | <tomsmeding> | ghc is quite keen on generating those instructions |
| 19:33:05 | × | gurkenglas quits (~gurkengla@dynamic-046-114-179-193.46.114.pool.telefonica.de) (Ping timeout: 255 seconds) |
| 19:33:09 | <segfaultfizzbuzz> | tomsmeding: i dont know what that means. historically i was afraid of learning x86 asm because i thought ISAs would have a very high churn rate... empirically this has turn out to be mostly false |
| 19:33:12 | <segfaultfizzbuzz> | *turned |
| 19:33:21 | <tomsmeding> | segfaultfizzbuzz: jmp (*rax) |
| 19:33:41 | <tomsmeding> | i.e. jump to the address given by the value of a register |
| 19:34:21 | <tomsmeding> | any kind of dynamic dispatch usually compiles to this, including e.g. virtual calls in C++ |
| 19:34:35 | <tomsmeding> | and thunks are kind of the epitome of dynamic dispatch |
| 19:35:45 | <sm> | that embedded-scripting-languages list is great, recommended |
| 19:36:08 | <segfaultfizzbuzz> | yeah i am browsing |
| 19:36:31 | sm | went down a few rabbit holes |
| 19:37:38 | <tomsmeding> | > optional, optimistic (succeed-by-default) static type checking |
| 19:37:41 | <tomsmeding> | what is that supposed to mean :p |
| 19:39:06 | <segfaultfizzbuzz> | succeed by default lol |
| 19:39:20 | <segfaultfizzbuzz> | that's part of the compile by default paradigm |
| 19:39:46 | <sm> | "a simple, but convenient scripting language that integrated well with Rust." - we need that for Haskell |
| 19:40:47 | <sm> | have needed it for ever. An on ramp to full Haskell |
| 19:40:56 | <segfaultfizzbuzz> | sm: tbh i think the haskell community should rebuild from scratch with rust integration as a first design principle |
| 19:41:19 | <tomsmeding> | segfaultfizzbuzz: the Rust type system is not very compatible with Haskell's |
| 19:41:22 | <segfaultfizzbuzz> | and be more assertive about what the language is defined as |
| 19:41:37 | <segfaultfizzbuzz> | tomsmeding: the question then is whether it is irreconcilable rather than whether it is compatible today |
| 19:42:15 | <sm> | that certainly might happen but it won't be called haskell |
| 19:43:49 | <segfaultfizzbuzz> | then call it lleksah and make a voice assistant with it |
| 19:45:01 | <segfaultfizzbuzz> | do away with all of this language extension stuff and don't be afraid to be opinionated about how to write code |
| 19:46:16 | <sm> | tomsmeding: I tried to find out what "optional, optimistic (succeed-by-default) static type checking" means, beats me too :) |
| 19:46:53 | <sm> | segfaultfizzbuzz: Elm is the extreme of that isn't it |
| 19:47:11 | <segfaultfizzbuzz> | WHAT https://dreamix-video-editing.github.io/ |
| 19:48:59 | → | troydm joins (~troydm@user/troydm) |
| 19:50:17 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 19:50:43 | <tomsmeding> | sm: this, presumably, but unclear what the actual semantics of this are https://github.com/PistonDevelopers/dyon/issues/236 |
| 19:51:56 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 19:52:07 | <sm> | interesting |
| 19:52:39 | <sm> | more: https://www.piston.rs/dyon-tutorial/types.html |
| 19:53:20 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 19:53:33 | <segfaultfizzbuzz> | unfortunately gluon seems kinda abandoned (??) |
| 19:55:28 | → | mechap joins (~mechap@user/mechap) |
| 19:56:13 | <tomsmeding> | sm: this is wacky https://www.piston.rs/dyon-tutorial/in-types.html |
| 19:56:29 | <tomsmeding> | "I wanted channels but hacked them in in a dumb way"? |
| 19:57:19 | <sm> | woah |
| 19:59:35 | × | trev_ quits (~trev@109.252.35.99) (Remote host closed the connection) |
| 19:59:38 | <glguy> | That makes me think of https://en.wikipedia.org/wiki/COMEFROM |
| 19:59:57 | <tomsmeding> | glguy: it did for me to, but then I realised it's really a channels implementation, not a control flow construct |
| 20:00:01 | <tomsmeding> | the syntax is just wacky |
| 20:00:18 | <segfaultfizzbuzz> | lol comefrom comes with a time machine? |
| 20:01:12 | <segfaultfizzbuzz> | lol and DONT instruction |
| 20:01:24 | <tomsmeding> | @hackage acme-dont |
| 20:01:24 | <lambdabot> | https://hackage.haskell.org/package/acme-dont |
| 20:02:10 | <glguy> | > C-INTERCAL also provides the COME FROM instruction, written DO COME FROM (line); CLC-INTERCAL and the most recent C-INTERCAL versions also provide computed COME FROM (DO COME FROM expression) and NEXT FROM, which is like COME FROM but also saves a return address on the NEXT STACK.[4] |
| 20:02:12 | <lambdabot> | <hint>:1:51: error: parse error on input ‘,’ |
| 20:02:13 | <sm> | it's quite interesting to see how a tricky statically typed language like rust has been adapted for scripting |
| 20:02:18 | <glguy> | I need to wrap my head around computed come from now |
| 20:02:51 | <tomsmeding> | glguy: put an irc colour reset byte before the > to make lambdabot skip it |
| 20:02:52 | <segfaultfizzbuzz> | sm: if there was a nice wasm interface it would be great for compiling to wasm |
| 20:05:01 | → | Sciencentistguy1 joins (~sciencent@hacksoc/ordinary-member) |
| 20:06:09 | <monochrom> | tomsmeding: Oh haha great trick |
| 20:06:38 | <tomsmeding> | I'm surprised noone has yet asked me how I did that |
| 20:06:41 | × | Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 252 seconds) |
| 20:06:41 | Sciencentistguy1 | is now known as Sciencentistguy |
| 20:07:07 | <geekosaur> | I figured it immediately |
| 20:07:17 | <tomsmeding> | right maybe I shouldn't be surprised |
| 20:07:27 | <monochrom> | Hey good idea for @ too |
| 20:07:58 | <juri_> | how do you do, fellow haskellers! |
| 20:08:33 | <segfaultfizzbuzz> | juri_: hello there |
| 20:08:38 | <sm> | > I thought a space worked |
| 20:08:46 | <tomsmeding> | it does, but it shows up |
| 20:08:53 | <tomsmeding> | can't have imperfections like that |
| 20:09:12 | <segfaultfizzbuzz> | juri_: https://en.wikipedia.org/wiki/File:Obiwan1.jpg |
| 20:09:15 | <sm> | yessir, quite right |
| 20:09:29 | <sm> | god forbid anyone should fix lambdabot |
| 20:09:50 | <tomsmeding> | sm: how do you fix lambdabot for this |
| 20:10:34 | <sm> | I would switch to a different char, > is too common for indicating quotes |
| 20:10:56 | <tomsmeding> | » or just use this |
| 20:11:50 | <sm> | ! ARGS would work well |
| 20:12:00 | <tomsmeding> | also standard bot char |
| 20:12:20 | <mauke> | no, this is a literate channel |
| 20:14:00 | <darkling> | So you pipe the channel to weave to get the discussion, and to tangle to get the code? :) |
| 20:15:46 | <tomsmeding> | isn't a literate document typically suppose to be coherent |
| 20:20:45 | <darkling> | Ocelot pipe cleaner? |
| 20:24:53 | <tomsmeding> | when I search that, I get "Including results for 'best pipe cleaners'" |
| 20:25:11 | <tomsmeding> | not sure how "ocelot" is seen as a typo for "best" |
| 20:25:27 | <darkling> | I mean, ocelots *are* the best... |
| 20:31:20 | → | Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
| 20:34:05 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 20:43:21 | <jonathanx> | I'm using recursion-schemes, and have multiple algebras (let's say 3) that each fit inside of a cata. I want to combine them, and fold my datastructure in 3 distinct ways with the same fold. How do I go about this? My first thought was to upgrade to a zygomorphism, but that "only" give me the different values for the "children" of my tree-like data structure. I'm probably missing something basic.. |
| 20:50:24 | <tomsmeding> | jonathanx: 'Base t' is a Functor |
| 20:50:33 | <tomsmeding> | (assuming 'Recursive t') |
| 20:51:00 | <tomsmeding> | if f1 and f2 are algebras, then '\x -> (f1 (fst <$> x), f2 (snd <$> x))' is also an algebra |
| 20:51:33 | <tomsmeding> | there is probably some cute generalisation of this, my instinct says Representable but that's probably wrong, and not sure if you _should_ |
| 20:52:21 | <tomsmeding> | :t \f1 f2 -> \x -> (f1 (fst <$> x), f2 (snd <$> x)) |
| 20:52:22 | <lambdabot> | Functor f => (f a1 -> a2) -> (f b1 -> b2) -> f (a1, b1) -> (a2, b2) |
| 20:54:14 | <tomsmeding> | @pl \x -> (f1 (fmap fst x), f2 (fmap snd x)) |
| 20:54:14 | <lambdabot> | ap ((,) . f1 . fmap fst) (f2 . fmap snd) |
| 20:54:23 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 248 seconds) |
| 20:54:26 | <tomsmeding> | meh this one is nicer |
| 20:54:28 | <tomsmeding> | :t \f1 f2 -> liftA2 (,) (f1 . fmap fst) (f2 . fmap snd) |
| 20:54:29 | <lambdabot> | Functor f => (f b1 -> a) -> (f b2 -> b3) -> f (b1, b2) -> (a, b3) |
| 20:54:39 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 20:55:26 | → | kassouni joins (~kassouni@2601:646:400:68b0:18dc:d2:c373:8213) |
| 20:56:40 | oldfashionedcow | is now known as username233 |
| 20:56:45 | username233 | is now known as username234 |
| 20:56:55 | username234 | is now known as oldfashionedcow |
| 21:01:35 | × | kassouni quits (~kassouni@2601:646:400:68b0:18dc:d2:c373:8213) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 21:01:39 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 21:02:39 | → | Hammdist joins (~Hammdist@67.169.114.135) |
| 21:02:55 | × | ddellacosta quits (~ddellacos@86.106.143.219) (Ping timeout: 248 seconds) |
| 21:02:56 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 21:07:08 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 21:12:42 | <jonathanx> | right, so smash them into a tuple basically? Makes sense. |
| 21:12:57 | <tomsmeding> | I mean, it's what going to happen anyway |
| 21:13:07 | <tomsmeding> | I'm not sure if it makes sense to make this a StrictPair |
| 21:13:14 | <tomsmeding> | data StrictPair a b = StrictPair !a !b |
| 21:13:45 | <tomsmeding> | if things don't inline that might give a minor performance increase |
| 21:18:56 | × | mvk quits (~mvk@2607:fea8:5caa:ac00::f944) (Ping timeout: 248 seconds) |
| 21:20:23 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 21:26:04 | × | phma quits (~phma@host-67-44-208-156.hnremote.net) (Read error: Connection reset by peer) |
| 21:26:05 | <segfaultfizzbuzz> | so semantics maps language (or is it understanding?) to like... what happens in RAM or something? or maybe to "program observables" (light switch ends up turning on, when i look in the database some entry is there)? |
| 21:26:58 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 21:27:02 | → | phma joins (~phma@2001:5b0:210d:59b8:b6b0:7ecf:e3da:b5e5) |
| 21:27:56 | <geekosaur> | intent to implementation, I'd say |
| 21:28:00 | <darkling> | Semantics at its simplest would be, I've written x+y in my code -- what is that actually doing? Is it adding two numbers together? Is it concatenating two strings? Is it merging two sets? |
| 21:28:41 | <mauke> | generally? semantics = meaning |
| 21:29:04 | <segfaultfizzbuzz> | what is meaning lol |
| 21:29:11 | <darkling> | I just gave an example... |
| 21:29:50 | <segfaultfizzbuzz> | so is it internal (steps taken) or outcome-based (list ends up sorted)? |
| 21:30:04 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Ping timeout: 260 seconds) |
| 21:30:31 | <mauke> | oh, like operational semantics vs. denotational semantics? |
| 21:31:04 | <jackdk> | would you like big-step operational semantics, small step operational semantics, or denotational semantics, or some other type that I've not heard of? |
| 21:31:27 | EvanR_ | is now known as EvanR |
| 21:31:27 | <EvanR> | if you map the program to "what steps the cpu takes" or something, that's filed under operational semantics |
| 21:31:27 | × | EvanR quits (~EvanR@user/evanr) (Remote host closed the connection) |
| 21:31:41 | → | EvanR joins (~EvanR@user/evanr) |
| 21:34:52 | × | Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection) |
| 21:36:08 | × | esph quits (~weechat@user/esph) (Ping timeout: 252 seconds) |
| 21:41:06 | → | Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
| 21:43:31 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 252 seconds) |
| 21:45:41 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 21:46:24 | → | opticblast joins (~Thunderbi@172.58.82.233) |
| 21:46:48 | × | ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!) |
| 21:48:19 | <tomsmeding> | segfaultfizzbuzz: whatever meaning you wish -- operational semantics is how to execute the program, denotational semantics is a variant that describes how to map the program into sets and functions (roughly) |
| 21:48:54 | <tomsmeding> | but if you design some program analysis that computes, say, one number from a program, then that analysis can also be called a semantics |
| 21:49:07 | <tomsmeding> | because it really is one possible meaning for the program text (the syntax) |
| 21:52:28 | <monochrom> | Generally, semantics maps programs to whatever you think you already understand. |
| 21:53:29 | <monochrom> | The first corollary being different people from different backgrounds will choose different targets. This is why there are so many semantics. |
| 21:54:41 | <monochrom> | It is not all that different from "what's the meaning of English". |
| 21:55:11 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 248 seconds) |
| 21:55:33 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 21:55:39 | <monochrom> | If someone asks you "what does 'car' mean?" you explain in terms of what they already know. Or at least you think you do that. |
| 21:56:10 | <darkling> | Anyone want to talk semiotics? ;) |
| 21:57:18 | <EvanR> | game semantics |
| 21:57:47 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 252 seconds) |
| 21:58:02 | <monochrom> | https://mail.haskell.org/pipermail/haskell-cafe/2011-January/088315.html |
| 21:59:04 | × | CAT_S quits (apic@brezn3.muc.ccc.de) (Read error: Connection reset by peer) |
| 21:59:06 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 22:03:39 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 22:04:11 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 22:04:13 | <segfaultfizzbuzz> | (pardon the disconnect :) ) |
| 22:05:06 | × | kitzman quits (~kitzman@user/dekenevs) (Quit: C-x C-c) |
| 22:07:45 | → | kitzman joins (~kitzman@user/dekenevs) |
| 22:08:41 | <segfaultfizzbuzz> | "a semantic" is a program invariant, perhaps? |
| 22:08:55 | → | bilegeek joins (~bilegeek@2600:1008:b024:9ac8:31f:a878:7a7e:b80e) |
| 22:11:02 | <dminuoso> | segfaultfizzbuzz: I think talking about semantics in general can be incredibly vague. |
| 22:11:07 | <dminuoso> | Let's pick a concrete example. |
| 22:12:02 | <dminuoso> | Often, operational semantics maps programs to steps taken on an abstract machine. |
| 22:12:07 | <segfaultfizzbuzz> | dminuoso: right the combination of that and sematics being apparently incredibly important is why i am asking about this |
| 22:12:16 | <segfaultfizzbuzz> | dminuoso: along with the definition of the abstract machine...? |
| 22:12:20 | <dminuoso> | Right |
| 22:12:48 | <dminuoso> | So operational semantics would entail first defining some kind of abstract machine, its behavior, some rules that govern it maybe - often this is done in a vague and suggestive fashion |
| 22:12:56 | <segfaultfizzbuzz> | are they a "projection" of the program or intended to be an "isomorphism" of the program? |
| 22:14:07 | <dminuoso> | As for operational semantics, I would say just a mapping (i.e. function), given that its trivial in most programming languages to map two different programs to the exact same operational steps |
| 22:14:38 | <dminuoso> | In haskell it could be something mundane as say `let a = 1; b = 2 in ...` vs `let b = 2; a = 1 in ...` |
| 22:14:49 | → | CAT_S joins (apic@brezn3.muc.ccc.de) |
| 22:15:09 | <dminuoso> | Which is clearly two different expressions, and yet they will map to the same operational behavior |
| 22:15:28 | <dminuoso> | well "clearly different" at least on a textual input level, anyhow |
| 22:15:45 | <segfaultfizzbuzz> | ah right because programs aren't canonicalized--you can't tell if two functions do the same thing |
| 22:16:01 | <segfaultfizzbuzz> | but with semantics,... maybe you can, or you can more easily tell whether two functions do the same thing? |
| 22:16:10 | <segfaultfizzbuzz> | *can't **easily** tell |
| 22:16:14 | <dminuoso> | ideally dont talk about "semantics" without prefixing it with some qualifier |
| 22:16:30 | <segfaultfizzbuzz> | like quantum semantics |
| 22:16:46 | <dminuoso> | 23:16:01 segfaultfizzbuzz | but with semantics,... maybe you can, or you can more easily tell whether two functions do the same thing? |
| 22:16:49 | <dminuoso> | Ah yes, absolutely! |
| 22:16:54 | <dminuoso> | Depending on the semantics |
| 22:17:01 | <segfaultfizzbuzz> | so semantics are "more canonicalized" than programs |
| 22:17:05 | <dminuoso> | denotational semantics can be a tool you can utilize to that end, *exactly* |
| 22:17:11 | <dminuoso> | Do you know what denotational semantics are? |
| 22:17:30 | <segfaultfizzbuzz> | i have seen the term thrown around, but this post here makes me think it is talking about category theory |
| 22:17:36 | <dminuoso> | So in denotational semantics you map programs to mathematical objects. |
| 22:17:45 | <dminuoso> | The cool thing now is |
| 22:17:52 | <segfaultfizzbuzz> | and the five or so times i have tried to read about category theory, all i see is renamed graph theory with specific graph rules which i don't find to be very interesting and my eyes cross |
| 22:18:02 | <dminuoso> | If you can show that a given function truthfully maps to a mathematical object, you can infer properties back |
| 22:18:30 | <segfaultfizzbuzz> | so it's a math-decompiler for functions |
| 22:18:45 | <dminuoso> | sure, and if you do this as a programmer yourself, its called denotational design |
| 22:18:57 | <dminuoso> | where you design functions, maybe an entire api, while mapping things to mathematical objects |
| 22:18:59 | <dminuoso> | its not complicated either |
| 22:19:02 | <dminuoso> | https://www.youtube.com/watch?v=bmKYiUOEo2A |
| 22:19:11 | <dminuoso> | Is a great talk from conal elliott I think you might find enjoyable |
| 22:19:12 | <segfaultfizzbuzz> | but you "cannot write a program with only semantics"? |
| 22:19:19 | <dminuoso> | "with only semantics" |
| 22:19:23 | <dminuoso> | doesnt really seem to make sense |
| 22:19:44 | <EvanR> | maybe you mean write a program with NO semantics xD |
| 22:19:50 | <segfaultfizzbuzz> | well the "best" programming language would be canonicalized |
| 22:19:55 | <EvanR> | this is kind of what you can do in category theory |
| 22:20:04 | <dminuoso> | what do you mean by "canonicalized"? |
| 22:20:16 | <segfaultfizzbuzz> | i can write several different implementations of the same function |
| 22:20:22 | <segfaultfizzbuzz> | but i don't really care about this, i care about what the function does |
| 22:20:47 | <EvanR> | there's always some kind of concrete thing to compare against |
| 22:20:49 | <darkling> | That's the (denotational?) semantics of the function. |
| 22:21:02 | <dminuoso> | segfaultfizzbuzz: thinking in terms of what a function *does* goes into operational semantics |
| 22:21:20 | <EvanR> | e.g. what is "what the function does", is it a set of associative pairs defining the function. That itself is some concrete thing |
| 22:21:23 | <dminuoso> | because "doing something" usually implies some kind of steps on a machine, say instructions on a cpu, steps on an abstract machine, something along these lines |
| 22:21:32 | <segfaultfizzbuzz> | understood, the question was "what do you mean by canonicalized?" and my answer to this is that ideally there would be a very strong one-to-one correspondence between a function and what it performed |
| 22:21:40 | <segfaultfizzbuzz> | whereas ordinarily this is many-to-one |
| 22:22:26 | <dminuoso> | mmm, are you talking about a "do one thing well" kind of philosophy? |
| 22:22:27 | <segfaultfizzbuzz> | dminuoso: i mean i'm not aware of a purpose for absolutely unconditionally pure programs, unless you are some kind of meditation expert |
| 22:23:10 | <EvanR> | in haskell you don't need impure programs, so you can get the benefits of pure programs any time |
| 22:23:20 | <segfaultfizzbuzz> | dminuoso: sorry i didn't mean to get sidetracked on this issue, except maybe for the question of why a programming language would deviate from the most abstract possible semantics |
| 22:23:56 | <mauke> | the most abstract possible semantics is () |
| 22:25:36 | <segfaultfizzbuzz> | mauke: sounds like that would be good for a meditation app or something |
| 22:25:46 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 22:31:55 | <segfaultfizzbuzz> | ok i will disappear for a little but will be checking whatever folks say |
| 22:32:26 | <dminuoso> | segfaultfizzbuzz: Do give the talk from Conal Elliott I linked above a try |
| 22:32:39 | <dminuoso> | It might be helpful to get an idea of what denotational design is |
| 22:32:56 | <segfaultfizzbuzz> | i glanced at it, i will try to watch it later. interesting that "functional" was a preceding term |
| 22:33:02 | <dminuoso> | It's one of finer and easier examples, because both the source code and the mathematical models involved are *very* simple |
| 22:33:13 | <dminuoso> | So it should be great for a wide audience |
| 22:35:07 | <dminuoso> | There's also a bunch of tools that let you go the other way around, where you just describe a mathematical model, and then have a tool extract code for you that satisfies that mathematical model. |
| 22:35:27 | <dminuoso> | So this idea of denotational design can in both directions |
| 22:37:06 | ← | pragma- parts (~chaos@user/pragmatic-chaos) (Bye!) |
| 22:37:44 | × | kuribas quits (~user@ptr-17d51en5pcqxlnvqlnm.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1)) |
| 22:40:37 | → | gurkenglas joins (~gurkengla@dynamic-046-114-179-193.46.114.pool.telefonica.de) |
| 22:40:50 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 22:40:58 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 22:42:19 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 22:42:53 | × | Hammdist quits (~Hammdist@67.169.114.135) (Quit: Client closed) |
| 22:43:29 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 22:44:57 | → | enthropy joins (~enthropy@66.7.90.250) |
| 22:46:23 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 248 seconds) |
| 22:48:21 | <geekosaur> | btw,mauke was a bit extreme but serious. if you abstract away too much, your program won't solve the problem, it'll only solve something that is missing too many details to be useful |
| 22:48:43 | <geekosaur> | flip side, abstract away too little and you're doing something the computer ought to be doing for you |
| 22:51:15 | <geekosaur> | Haskell has staked out a part of the abstraction space where as much as possible we say what but not how. many other languages prefer to make it easier for you to express the how in various ways |
| 22:53:51 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 22:55:04 | × | michalz quits (~michalz@185.246.207.217) (Remote host closed the connection) |
| 22:57:31 | → | mvk joins (~mvk@2607:fea8:5caa:ac00::f944) |
| 23:00:26 | → | kassouni joins (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) |
| 23:08:55 | × | tessier quits (~treed@98.171.210.130) (Ping timeout: 252 seconds) |
| 23:10:43 | → | tessier joins (~treed@98.97.142.157) |
| 23:12:21 | × | Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:13:48 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 23:15:11 | × | slack1256 quits (~slack1256@186.11.59.217) (Ping timeout: 248 seconds) |
| 23:16:50 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 23:21:04 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 248 seconds) |
| 23:31:23 | × | Alex_test quits (~al_test@178.34.160.79) (Ping timeout: 260 seconds) |
| 23:32:16 | × | AlexZenon quits (~alzenon@178.34.160.79) (Ping timeout: 248 seconds) |
| 23:35:26 | → | Alex_test joins (~al_test@178.34.160.79) |
| 23:37:00 | → | AlexZenon joins (~alzenon@178.34.160.79) |
| 23:39:11 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 248 seconds) |
| 23:41:03 | × | kassouni quits (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 23:41:05 | × | theproffesor quits (~theproffe@user/theproffesor) (Ping timeout: 260 seconds) |
| 23:41:38 | → | kassouni joins (~kassouni@2601:646:400:68b0:f5a4:b4c5:300f:d7b8) |
| 23:44:19 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
| 23:46:57 | × | tessier quits (~treed@98.97.142.157) (Ping timeout: 268 seconds) |
| 23:48:32 | → | tessier joins (~treed@98.171.210.130) |
| 23:50:04 | × | gurkenglas quits (~gurkengla@dynamic-046-114-179-193.46.114.pool.telefonica.de) (Ping timeout: 260 seconds) |
| 23:59:31 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
All times are in UTC on 2023-02-03.