Logs on 2021-12-08 (liberachat/#haskell)
| 00:00:53 | × | xff0x quits (~xff0x@2001:1a81:52ad:7f00:65a:88aa:1a84:9da4) (Ping timeout: 252 seconds) |
| 00:02:20 | <dsal> | oats: It's actually faster than mine. Neat. |
| 00:02:48 | → | xff0x joins (~xff0x@2001:1a81:52dd:ce00:6ce:d182:5c9e:e129) |
| 00:04:06 | <oats> | dsal, the API for multiset? |
| 00:04:31 | <oats> | https://en.wikipedia.org/wiki/Multiset |
| 00:04:55 | <dsal> | Yeah, I've known about such a thing for a while, but it's never felt like something useful. |
| 00:05:50 | <janus> | seems like you can even have 'where' on case cases |
| 00:05:54 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 00:06:12 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 00:06:12 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Client Quit) |
| 00:06:30 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 00:08:59 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
| 00:10:55 | <EvanR> | really I thought where was only declarations |
| 00:11:01 | × | acidjnk_new quits (~acidjnk@p200300d0c7271e23ace56c846c004ca7.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 00:11:14 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 00:11:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 00:12:12 | <monochrom> | Sometimes it's joyful to take a look at the Haskell Report and discover extra things it supports :) |
| 00:14:10 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 00:15:07 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 265 seconds) |
| 00:18:35 | <janus> | % :t \case {() | n -> 0 where n = True} |
| 00:18:35 | <yahb> | janus: Num p => () -> p |
| 00:18:43 | → | cyphase joins (~cyphase@user/cyphase) |
| 00:18:57 | <janus> | :t \case {() | n -> 0; () | not n -> 1 where n = True} |
| 00:18:58 | <lambdabot> | error: |
| 00:18:58 | <lambdabot> | • Couldn't match expected type ‘Bool’ with actual type ‘Expr’ |
| 00:18:58 | <lambdabot> | • In the expression: n |
| 00:19:15 | <janus> | how do i use where across cases with semicolon and brace based syntax? |
| 00:20:32 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 00:20:37 | → | Topsi joins (~Tobias@dyndsl-095-033-088-108.ewe-ip-backbone.de) |
| 00:21:00 | <geekosaur> | isn't the where on each case alternative? |
| 00:21:01 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 240 seconds) |
| 00:21:10 | <geekosaur> | so the first one is using the n from simple-reflect |
| 00:21:12 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 00:21:58 | <janus> | oh |
| 00:21:59 | <geekosaur> | :t \case { () | n = 0 where n = True; () | not n -> 1 where n = True} |
| 00:22:00 | <lambdabot> | error: parse error on input ‘=’ |
| 00:22:11 | <geekosaur> | :t \case { () | n -> 0 where n = True; () | not n -> 1 where n = True} |
| 00:22:12 | <lambdabot> | error: parse error on input ‘->’ |
| 00:22:21 | <janus> | so in this case i would actually need to use let..in to achieve the desired effect of using a shared biding in guards |
| 00:22:29 | <geekosaur> | yeh |
| 00:22:47 | <geekosaur> | although I too seem to be doing something wrong |
| 00:23:01 | <geekosaur> | :t \case { () | n -> 0 where {n = True}; () | not n -> 1 where {n = True}} |
| 00:23:02 | <lambdabot> | Num p => () -> p |
| 00:23:27 | <janus> | aaah right, like with the let. gotta remember that around anything that uses ..=.. syntax i guess... |
| 00:23:57 | <geekosaur> | any time you have nested layouts (here case vs. where) |
| 00:24:04 | <geekosaur> | more commonly with do vs. let |
| 00:24:46 | → | k60 joins (~user@static.100.218.46.78.clients.your-server.de) |
| 00:25:33 | <janus> | ah right, the case doesn't use equals but it still uses layout |
| 00:26:58 | <geekosaur> | do vs. case can also happen and doesn't involve = at all |
| 00:29:44 | → | pavonia joins (~user@user/siracusa) |
| 00:30:51 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 00:31:01 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds) |
| 00:32:02 | × | doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 265 seconds) |
| 00:32:28 | → | k60` joins (~user@94.25.169.9) |
| 00:33:25 | × | k60 quits (~user@static.100.218.46.78.clients.your-server.de) (Ping timeout: 240 seconds) |
| 00:35:49 | → | juri_ joins (~juri@178.63.35.222) |
| 00:37:33 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 252 seconds) |
| 00:38:09 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 00:39:15 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 00:41:14 | → | cyphase joins (~cyphase@user/cyphase) |
| 00:50:26 | <monochrom> | janus: There is not supposed to be a semicolon between "| guard1 -> e1" and "| guard2 -> e2" |
| 00:51:35 | <monochrom> | Corollary: The two "|"s do not have to be aligned. |
| 00:51:57 | <EvanR> | according this article on STG certain function applications involve a check for stack overflow before pushing arguments, so it can maybe grow stack space |
| 00:52:13 | <EvanR> | seems like the kind of thing you could use a page fault for |
| 00:52:51 | <EvanR> | have the cpu do the check |
| 00:52:57 | <monochrom> | Next, "| guard1 -> e1" and "| guard2 -> e2" shares the same "where", if you have a "where". |
| 00:53:23 | <geekosaur> | notice that they actually made separate case clauses |
| 00:53:44 | <monochrom> | OK yeah. But one doesn't need to. |
| 00:55:46 | <dminuoso> | glguy: How strongly do you feel about not providing some `parse = parseWith defaultOpts` and `parseWith :: ParseOpts -> T.Text -> Either ParseError (Value Position)` |
| 00:55:56 | <dminuoso> | Asking because I think I have it carved out |
| 00:56:24 | <monochrom> | Page fault may be too expensive. |
| 00:56:44 | <geekosaur> | it's how C does it |
| 00:56:47 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 00:57:02 | <geekosaur> | every function has a stack probe which may incur a page fault that rows the stack segment |
| 00:57:07 | <geekosaur> | *grows |
| 00:57:12 | <dminuoso> | The grammar is glued in as well, supporting only a singular style at a given level |
| 00:57:12 | <monochrom> | Also the fear of "what if someone ports GHC to a platform that doesn't have it" but I guess I don't know how important it is. |
| 00:57:24 | <dminuoso> | So mixing -/+/* in a list is not possible |
| 00:57:42 | <geekosaur> | this said, the stack probe method does not play well with per-thread stacks |
| 00:58:12 | <geekosaur> | (typically C threads other than the main thread start with fixed stack sizes that cannot be grown dynamically) |
| 00:58:28 | <monochrom> | That is very sad. |
| 00:58:40 | <EvanR> | mildly flabbergasted |
| 01:03:49 | <monochrom> | Err no, not sad, I have always coded in C without relying on growable stack. |
| 01:04:07 | <monochrom> | If you have given up hope, nothing disappoints you any more. |
| 01:04:25 | × | xff0x quits (~xff0x@2001:1a81:52dd:ce00:6ce:d182:5c9e:e129) (Ping timeout: 265 seconds) |
| 01:04:59 | → | xff0x joins (~xff0x@2001:1a81:52dd:ce00:6a6c:bf95:6ade:ac72) |
| 01:06:20 | → | dmenz joins (~daniel@2804:14d:5cd4:5e94::d) |
| 01:06:53 | <AndreasK> | EvanR: These checks are also used to stop threads. The runtime sets available stack/heap to zero. The function checks, and calls into the rts for gc if there is not enough space. The RTS can suspend the thread. |
| 01:07:17 | <AndreasK> | Not that you couldn't also do that with probes. It's what the JVM does iirc. |
| 01:08:59 | <EvanR> | a thread can also suspend when it tries to push something on the stack? |
| 01:09:34 | <AndreasK> | EvanR: Kinda. For any given piece of code you know how much stack space it needs |
| 01:09:49 | <AndreasK> | so we check for available space first, then do all the pushing |
| 01:09:55 | <monochrom> | Well, last time, we discussed that the time's-up handler fakes "heap full". Perhaps it also fakes "stack full", too. |
| 01:10:21 | <AndreasK> | Yeah iirc it fakes both |
| 01:10:32 | <monochrom> | But it is true that GHC-generated asm code does do "if stack full then call GC else push" |
| 01:11:04 | <monochrom> | in addition to "if heap full then call GC else store data" |
| 01:11:22 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 01:11:46 | <monochrom> | where "call GC" plays the double role of making space and switching to another thread. |
| 01:11:49 | <EvanR> | hopefully the gc doesn't help you with the full stack by removing parts xD |
| 01:11:57 | <AndreasK> | I was mistaken, we only fake the Hp so I guess we can't stop threads on entering stack-using code. |
| 01:12:56 | <glguy> | dminuoso: How about this? https://github.com/glguy/config-value/pull/9 |
| 01:13:52 | <AndreasK> | EvanR: I think there is some kind of optimization ("Stack squeezin") that can safely remove things from your stack for haskell applications. |
| 01:13:56 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 01:14:06 | <dminuoso> | glguy: Ah, I did not know you could have parametrized production rules. This is cool |
| 01:14:52 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:14:52 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 01:14:52 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:14:52 | × | burnsidesLlama quits (~burnsides@dhcp168-017.wadham.ox.ac.uk) (Remote host closed the connection) |
| 01:14:54 | <EvanR> | how does that not violate stack invariant |
| 01:15:19 | <AndreasK> | EvanR: What invariant exactly? |
| 01:15:50 | <EvanR> | N pops after N pushes leaves you with the original stack, I guess |
| 01:15:56 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 268 seconds) |
| 01:18:05 | <monochrom> | Is that like TCO but done during run time and after unnecessary data have been pushed? |
| 01:18:27 | <AndreasK> | I'm trying to find out what it does atm. It's been a while :D |
| 01:19:29 | <glguy> | dminuoso: happy's pretty great ^_^ |
| 01:20:20 | <dminuoso> | But yeah, the PR looks good |
| 01:22:06 | <monochrom> | + - * bullet points form a ring. <duck> |
| 01:22:50 | <dminuoso> | Algebra of lists |
| 01:24:43 | <AndreasK> | monochrom: Seems to be about collapsing multiple update frames next to each other into a single frame. |
| 01:25:27 | <monochrom> | Hrm, update frames, I have a vague memory of those. |
| 01:27:21 | → | lavaman joins (~lavaman@98.38.249.169) |
| 01:28:18 | <monochrom> | I think https://github.com/quchen/stgi explains it. |
| 01:28:39 | <AndreasK> | Squeezing or the frames? |
| 01:29:20 | <monochrom> | The update frames. |
| 01:30:08 | <AndreasK> | Got my hopes up for a moment :D |
| 01:30:37 | <monochrom> | Oh, merging them is "just engineering" >:) |
| 01:30:53 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 01:31:34 | <AndreasK> | It seems stack squeezing transforms [Update T1, Update T2, Update T3] into [Update T1] and in the Heap [T2 = T1, T3 = T1]. |
| 01:31:49 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 01:32:28 | × | Pent quits (sid313808@id-313808.lymington.irccloud.com) (Quit: Updating details, brb) |
| 01:32:41 | → | Pent joins (sid313808@id-313808.lymington.irccloud.com) |
| 01:33:41 | <AndreasK> | And then we can shift up all the frames below Update T3 by however many bytes the removed update frames took up. |
| 01:33:58 | <AndreasK> | And GC will remove the indirections in the heap. |
| 01:34:02 | × | slack1256 quits (~slack1256@191.125.99.72) (Remote host closed the connection) |
| 01:34:12 | <AndreasK> | Surprised it's worth it |
| 01:34:15 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 01:35:21 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 265 seconds) |
| 01:35:21 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds) |
| 01:35:42 | <AndreasK> | EvanR: I guess the key thing being then that nothing is changed *within* any stack frame. So to some code that runs your invariant seems to hold. |
| 01:35:49 | × | nfd quits (~nfd@user/nfd) (Ping timeout: 240 seconds) |
| 01:36:35 | <geekosaur> | sounds like something from the bad old days of 4GB machines :) |
| 01:36:37 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 01:36:59 | <geekosaur> | (or even older days but I doubt any variety of haskell ran on those machines :) |
| 01:37:07 | <AndreasK> | I guess this happens if you have foo = bar; bar = baz; baz = urk; urk = whatever. |
| 01:37:23 | → | dsrt^ joins (~dsrt@wsip-98-188-240-142.mc.at.cox.net) |
| 01:37:24 | → | hololeap joins (~hololeap@user/hololeap) |
| 01:38:33 | <EvanR> | haskell is from the year 1990 right, was 32bit even a thing yet ? xD |
| 01:39:28 | <dsal> | I had a bug in some ocaml code back in the day because ints were 30 bit. |
| 01:39:34 | <geekosaur> | 68020 existed so yes |
| 01:39:34 | <dsal> | then I had a bug in the same code because of 31 bits. |
| 01:39:45 | <int-e> | EvanR: yes, even in x86 land |
| 01:39:52 | <dsal> | By the time I hit 32 bits, it wasn't my bug anymore. |
| 01:40:37 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds) |
| 01:41:08 | <EvanR> | 30 bits, to conveniently store groups of 10 bits for decimals no doubt |
| 01:41:31 | <geekosaur> | 2 bits stolen for GC |
| 01:41:36 | <EvanR> | right just kidding |
| 01:41:58 | <geekosaur> | takes only 4 bits to represent decimals |
| 01:42:14 | <geekosaur> | (oh god, BCD) |
| 01:42:36 | × | InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 265 seconds) |
| 01:42:43 | <AndreasK> | Using the highest bit to indicate if something is an object or an int was (is?) popular. I think the haskell report even says Int's are "at least 30 bit's wide" |
| 01:42:49 | <geekosaur> | when did intel finally jettison ABCD or whatever the instruction was? |
| 01:42:52 | <int-e> | geekosaur: what a waste though when you can stuff 9 digits into 30 bits |
| 01:43:10 | <EvanR> | decimal arithmetic is not supported in 64bit mode |
| 01:43:13 | <geekosaur> | AndreasK, yes and I almost mentioned that |
| 01:43:28 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 01:43:47 | <int-e> | . o O ( The best thing BCD ever gave me was the AAA mnemonic. ) |
| 01:43:49 | × | dmenz quits (~daniel@2804:14d:5cd4:5e94::d) (Ping timeout: 240 seconds) |
| 01:44:56 | <int-e> | Which, actually, is for unpacked BCD, a byte per digit. What a weird thing to have hardware support for :P |
| 01:45:00 | <dsal> | int-e: what's that? |
| 01:45:26 | <geekosaur> | COBOL used to offer that one too |
| 01:45:31 | <geekosaur> | unpacked decimal |
| 01:45:43 | <int-e> | dsal: i386 ... it takes the result of adding two unpacked BCD numbers and does the carry propagation (so some adjustment when the lower byte is larger than 9) |
| 01:46:04 | <dsal> | What's the "AAA" though? |
| 01:46:05 | <int-e> | s/i386/80x86/ |
| 01:46:11 | <dsal> | I assume that means something very different to me. |
| 01:46:17 | <geekosaur> | right, so that was the intel version of the one I mentioned earlier which was probably the zilog mnemonic |
| 01:46:18 | <int-e> | "ASCII Adjust after Addition" |
| 01:46:27 | <dsal> | I didn't even know BCD was a thing in Intel. I didn't use them much. |
| 01:46:30 | <AndreasK> | It seems we only check the last chunk of a stack for squeezing, and only when we pause the thread. So I guess checking for it isn't that expensive. And every update you squeeze out is one less execution of the thunk update code |
| 01:46:34 | <dsal> | Oh interesting. AAaA |
| 01:47:05 | AndreasK | heads of to check how often we actually squeeze |
| 01:47:26 | <geekosaur> | I think DECIMAL was unpacked decimal, COMPUTATIONAL was packed decimal, COMPUTATIONAL-3 was binary? |
| 01:47:39 | <EvanR> | AAAAAaaaaaaaa.... |
| 01:47:43 | <dsal> | nix collect-garbage deletes gmp and libffi which are apparently required. |
| 01:47:52 | <geekosaur> | reasonable reaction to COBOL :þ |
| 01:47:55 | <monochrom> | Hrm, why is it 3 for binary? |
| 01:48:08 | <geekosaur> | ask IBM, 'twas their idea |
| 01:48:16 | <monochrom> | Heh OK! |
| 01:48:21 | <int-e> | Yeah there seems to be an unwritten rule that every architecture needs its own mnemonic for assembly language. |
| 01:48:33 | monochrom | conjures jokes about 3-value logics |
| 01:48:39 | <geekosaur> | I had no idea, just knew that COMP-3 was what every other language used for numbers |
| 01:48:43 | <EvanR> | true false filenotfound |
| 01:48:49 | dsal | thought the same |
| 01:49:24 | <jackdk> | http://www.coboloncogs.org/INDEX.HTM I'm sure you've seen this joke because it is old |
| 01:49:25 | <monochrom> | But yes Intel floating point has native hardware support for 10-digit BCD. |
| 01:49:28 | <int-e> | monochrom: wouldn't it be fun if balanced ternary was the standard hardware number representation |
| 01:49:50 | <monochrom> | \∩/ Cantor sets |
| 01:49:59 | <geekosaur> | I think I was the first one to post it here, back 2007ish |
| 01:50:01 | <int-e> | (no sign bits!) |
| 01:50:08 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:91cd:1543:8918:bc14) |
| 01:50:31 | <EvanR> | unum arithmetic! |
| 01:51:26 | <dsal> | Is there any meaningful way to "see" rules being applied? |
| 01:51:33 | <dsal> | (other than, I guess, core) |
| 01:52:57 | <geekosaur> | -ddump-rule-firings? |
| 01:53:33 | <int-e> | and -ddump-rule-rewrites |
| 01:53:34 | <dsal> | Oh nice! Thanks |
| 01:53:36 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 01:55:11 | <dsal> | Tiny file. Lots of rewrites. |
| 01:55:40 | <int-e> | Oh there's a -drule-check that's supposed to tell you why a rule doesn't fire, I wonder how that works. https://downloads.haskell.org/~ghc/9.0.1/docs/html/users_guide/debugging.html is a fun read |
| 01:56:01 | × | emf_ quits (~emf@2620:10d:c091:480::1:102a) (Ping timeout: 268 seconds) |
| 01:56:12 | <dsal> | Oh cool. It's doing a thing I thought it might do, but couldn't find something that suggested it should. |
| 01:56:42 | <dsal> | I'm doing a length of a filter and was considering rewriting it to a foldr, but GHC already thought of that. |
| 01:57:27 | × | mmhat quits (~mmh@55d4422a.access.ecotel.net) (Quit: WeeChat 3.3) |
| 01:58:09 | <int-e> | yeah build/foldr fusion should be able to do that :P |
| 01:58:35 | <int-e> | but can it go the extra mile and make a foldl'... |
| 01:59:01 | <dsal> | This is an incredibly large amount of output. heh. |
| 02:00:14 | <int-e> | Just for completeness, if you are just interested in which rules are relevant, -ddump-rules is enough. |
| 02:00:27 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:00:31 | <int-e> | Uh |
| 02:00:50 | <int-e> | Sorry, that would be -ddump-rules-firings and that was already mentioned. |
| 02:01:13 | × | kennyd quits (~bc8165b6@cerf.good1.com) (Quit: CGI:IRC (Session timeout)) |
| 02:01:25 | → | trillp joins (~user@69.233.98.238) |
| 02:01:40 | <dsal> | Yeah, though it's a bit harder to understand. |
| 02:01:42 | <dsal> | Rule fired: filter (GHC.List) |
| 02:01:42 | <dsal> | Rule fired: length (GHC.List) |
| 02:01:42 | <dsal> | Rule fired: fold/build (GHC.Base) |
| 02:03:17 | <dsal> | core's a little noisy to read, but it's neat to see what those rules actually do. |
| 02:06:32 | <dsal> | Actually, yeah, that's not too bad as long as I have source available. |
| 02:07:04 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 02:07:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:07:25 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 02:08:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:09:54 | <dsal> | Thanks. I've now confirmed the code was already doing exactly what I was about to rewrite the code to do. |
| 02:13:01 | × | xff0x quits (~xff0x@2001:1a81:52dd:ce00:6a6c:bf95:6ade:ac72) (Ping timeout: 240 seconds) |
| 02:14:50 | × | shailangsa quits (~shailangs@host86-186-136-27.range86-186.btcentralplus.com) (Remote host closed the connection) |
| 02:15:10 | → | xff0x joins (~xff0x@2001:1a81:52f0:d600:c9ec:7be2:e073:b0e) |
| 02:17:50 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:18:19 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 02:28:03 | × | incertia quits (~incertia@d4-50-26-103.nap.wideopenwest.com) (Ping timeout: 256 seconds) |
| 02:39:05 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:39:35 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 02:40:53 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 02:41:50 | → | genieliu joins (~genieliu@103.37.140.38) |
| 02:41:54 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 02:42:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 02:42:16 | × | tito quits (tito@tilde.team) (Ping timeout: 268 seconds) |
| 02:43:26 | → | incertia joins (~incertia@d4-50-26-103.nap.wideopenwest.com) |
| 02:45:10 | → | tito joins (tito@tilde.team) |
| 02:49:32 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3) |
| 02:49:55 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 02:52:05 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Client Quit) |
| 02:53:13 | × | jkaye quits (~jkaye@2601:281:8300:7530:6e92:54cb:12e7:3fa1) (Ping timeout: 252 seconds) |
| 02:53:37 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:53:54 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 02:54:16 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Client Quit) |
| 02:54:35 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 02:54:52 | → | shailangsa joins (~shailangs@host86-186-136-27.range86-186.btcentralplus.com) |
| 02:59:31 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:59:50 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 03:00:03 | × | sander quits (~sander@user/sander) (Quit: So long! :)) |
| 03:00:37 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:91cd:1543:8918:bc14) (Quit: gone to sleep. ZZZzzz…) |
| 03:01:01 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds) |
| 03:01:32 | → | sander joins (~sander@user/sander) |
| 03:02:50 | × | tito quits (tito@tilde.team) (Ping timeout: 265 seconds) |
| 03:05:34 | → | senoraraton joins (~senorarat@192-195-83-130.static.monkeybrains.net) |
| 03:05:49 | → | tito joins (tito@tilde.team) |
| 03:08:14 | → | pfurla joins (~pfurla@201.17.118.230) |
| 03:17:43 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:17:43 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:17:43 | finn_elija | is now known as FinnElija |
| 03:20:46 | × | boxscape_ quits (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 03:21:37 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 03:25:57 | → | dmenz joins (~dmenz@2804:14d:5cd4:5e94::d) |
| 03:26:05 | → | dmenezes joins (~dmenz@2804:14d:5cd4:5e94::d) |
| 03:26:24 | × | dmenezes quits (~dmenz@2804:14d:5cd4:5e94::d) (Remote host closed the connection) |
| 03:32:10 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 03:32:31 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 03:32:37 | × | td_ quits (~td@94.134.91.180) (Ping timeout: 240 seconds) |
| 03:32:39 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 03:34:29 | → | td_ joins (~td@94.134.91.212) |
| 03:34:50 | → | mbuf joins (~Shakthi@223.178.121.64) |
| 03:37:09 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 265 seconds) |
| 03:37:12 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds) |
| 03:37:27 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 03:37:42 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:37:49 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 03:38:02 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:38:10 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 03:38:25 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:38:32 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 03:39:03 | × | JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 252 seconds) |
| 03:42:26 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 03:43:39 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 03:48:53 | <glguy> | dminuoso: do you use/know-about the macro expansion stuff in config-value? |
| 03:54:37 | × | tito quits (tito@tilde.team) (Ping timeout: 240 seconds) |
| 03:55:05 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 03:56:32 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:56:46 | → | tito joins (tito@tilde.team) |
| 03:59:25 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 240 seconds) |
| 04:02:53 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 04:09:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:13:53 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 04:20:40 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:22:13 | × | tito quits (tito@tilde.team) (Ping timeout: 240 seconds) |
| 04:23:27 | → | tito joins (tito@tilde.team) |
| 04:25:28 | → | user0 joins (~aj@langw.roketelkom.co.ug) |
| 04:33:32 | × | Topsi quits (~Tobias@dyndsl-095-033-088-108.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 04:33:53 | → | user01 joins (~aj@154.0.137.32) |
| 04:34:46 | × | pfurla quits (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…) |
| 04:35:01 | × | genieliu quits (~genieliu@103.37.140.38) (Ping timeout: 240 seconds) |
| 04:36:07 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds) |
| 04:37:01 | × | user0 quits (~aj@langw.roketelkom.co.ug) (Ping timeout: 240 seconds) |
| 04:37:52 | → | user0 joins (~aj@129.205.7.82) |
| 04:38:32 | × | user01 quits (~aj@154.0.137.32) (Ping timeout: 265 seconds) |
| 04:38:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:39:27 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 04:40:37 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 04:41:26 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 04:42:07 | × | user0 quits (~aj@129.205.7.82) (Ping timeout: 252 seconds) |
| 04:42:08 | → | user01 joins (~aj@129.205.7.82) |
| 04:45:05 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 04:45:45 | → | nfd joins (~nfd@user/nfd) |
| 04:46:11 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 04:46:14 | × | monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER) |
| 04:51:25 | × | xff0x quits (~xff0x@2001:1a81:52f0:d600:c9ec:7be2:e073:b0e) (Ping timeout: 240 seconds) |
| 04:52:22 | → | xff0x joins (~xff0x@2001:1a81:52f0:d600:cda8:efb:cccc:cf1c) |
| 04:52:33 | × | lechner quits (~lechner@debian/lechner) (Ping timeout: 250 seconds) |
| 04:54:33 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:54:35 | × | user01 quits (~aj@129.205.7.82) (Ping timeout: 252 seconds) |
| 04:54:47 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:54:55 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:55:15 | → | user0 joins (~aj@154.0.137.32) |
| 05:01:18 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:03:40 | → | genieliu joins (~genieliu@103.37.140.38) |
| 05:04:13 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 05:09:01 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds) |
| 05:13:17 | × | genieliu quits (~genieliu@103.37.140.38) (Ping timeout: 252 seconds) |
| 05:13:20 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 05:14:46 | → | img joins (~img@user/img) |
| 05:25:27 | → | lavaman joins (~lavaman@98.38.249.169) |
| 05:26:07 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 05:26:43 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 05:27:49 | × | senoraraton quits (~senorarat@192-195-83-130.static.monkeybrains.net) (Ping timeout: 240 seconds) |
| 05:29:58 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 05:39:50 | → | genieliu joins (~genieliu@103.37.140.24) |
| 05:43:03 | → | monochrom joins (trebla@216.138.220.146) |
| 05:48:13 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 240 seconds) |
| 05:50:09 | → | jinsun joins (~quassel@user/jinsun) |
| 05:52:14 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 05:53:54 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 05:56:03 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 05:56:39 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 05:56:47 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 06:00:05 | → | senoraraton joins (~senorarat@192-195-83-130.static.monkeybrains.net) |
| 06:01:19 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 06:02:53 | res0nat0r8 | is now known as res0nat0r |
| 06:03:54 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:04:34 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 06:09:48 | → | lavaman joins (~lavaman@98.38.249.169) |
| 06:13:42 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 06:13:49 | → | michalz joins (~michalz@185.246.204.40) |
| 06:14:13 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 06:17:25 | → | Everything joins (~Everythin@37.115.210.35) |
| 06:18:13 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:18:48 | → | curiousgay joins (~curiousga@77-120-141-90.kha.volia.net) |
| 06:20:43 | → | kimjetwav joins (~user@2607:fea8:2363:8f00:788b:37b5:7592:32b4) |
| 06:22:32 | → | vicfred joins (~vicfred@user/vicfred) |
| 06:25:49 | × | senoraraton quits (~senorarat@192-195-83-130.static.monkeybrains.net) (Ping timeout: 240 seconds) |
| 06:30:37 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 06:31:22 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:31:22 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 06:31:22 | → | wroathe joins (~wroathe@user/wroathe) |
| 06:36:09 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 06:45:40 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 06:55:39 | × | x88x88x quits (~x88x88x@2001:19f0:5:39a8:5400:3ff:feb6:73cb) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 06:57:16 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 07:01:25 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Ping timeout: 240 seconds) |
| 07:05:29 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 252 seconds) |
| 07:05:46 | × | catern quits (~sbaugh@cpe-98-7-229-235.nyc.res.rr.com) (Ping timeout: 245 seconds) |
| 07:06:02 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 07:09:26 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:11:16 | <int-e> | > unwords $ map (\x -> printf "%.2f" (191 - x/16)) [3011,2989,2965,2944,2934,2886,2875,2863,2851,2850] |
| 07:11:17 | <lambdabot> | "2.81 4.19 5.69 7.00 7.62 10.62 11.31 12.06 12.81 12.88" |
| 07:11:53 | <xerox> | I fell from 12.66 to 12.88, yikes! :) |
| 07:15:33 | → | x88x88x joins (~x88x88x@149.28.53.172) |
| 07:20:02 | → | Merfont joins (~Kaiepi@156.34.44.192) |
| 07:20:48 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 07:21:32 | <int-e> | somehow part 2 is really messing with people :) |
| 07:22:13 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Ping timeout: 240 seconds) |
| 07:22:38 | <xerox> | it messed with me too, I didn't even realize it started snowing 😳 |
| 07:22:47 | <int-e> | almost 2 1/2 hours in and there's still more silver stars (not counting gold stars) than gold stars |
| 07:23:35 | <int-e> | (globally) |
| 07:26:29 | × | dmenz quits (~dmenz@2804:14d:5cd4:5e94::d) (Quit: Leaving) |
| 07:28:28 | <iqubic> | Why doesn't Data.Set have a symetric set difference functon? |
| 07:28:34 | <iqubic> | I'd really like that now. |
| 07:30:01 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 07:35:07 | <int-e> | It has come up but with little activity (at least recently) to make it (or some generization thereof) happen https://mail.haskell.org/pipermail/libraries/2020-June/030633.html |
| 07:35:35 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 07:36:12 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 07:37:36 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 07:38:02 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 07:41:03 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 07:43:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 07:45:01 | → | retroid_ joins (~retro@97e2ba2e.skybroadband.com) |
| 07:46:54 | × | retro_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds) |
| 07:49:49 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 07:53:44 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 07:56:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 07:57:29 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 07:59:27 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:05:44 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 08:06:52 | → | zaquest joins (~notzaques@5.130.79.72) |
| 08:07:36 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:09:16 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:09:34 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:09:58 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:12:21 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 08:14:10 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:14:27 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:14:55 | → | acidjnk_new joins (~acidjnk@p200300d0c7271e233cc6a7b9846dd72b.dip0.t-ipconnect.de) |
| 08:16:07 | → | max22- joins (~maxime@2a01cb08833598006f80219c43541139.ipv6.abo.wanadoo.fr) |
| 08:18:37 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:18:54 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:20:34 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:20:52 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:22:52 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:23:09 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:24:49 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:25:07 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:26:47 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:27:05 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:28:45 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:29:01 | → | chomwitt joins (~chomwitt@2a02:587:dc0d:3700:12c3:7bff:fe6d:d374) |
| 08:29:03 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:32:53 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:33:11 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:36:56 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:37:13 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:38:53 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:39:11 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:41:23 | → | notzmv joins (~zmv@user/notzmv) |
| 08:41:35 | → | retro_ joins (~retro@05412d78.skybroadband.com) |
| 08:41:47 | × | retroid_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds) |
| 08:44:23 | → | ftzm joins (~ftzm@178.249.51.108) |
| 08:45:27 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:47:37 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:47:55 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:49:35 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 08:49:53 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 08:50:14 | → | zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) |
| 08:57:03 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 08:58:01 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:91cd:1543:8918:bc14) |
| 08:59:31 | × | mvk quits (~mvk@2607:fea8:5cdd:f000::9788) (Ping timeout: 252 seconds) |
| 09:01:11 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:01:21 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Ping timeout: 252 seconds) |
| 09:01:28 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:03:24 | <dminuoso> | glguy: I actually did not. Especially the file loading macro seems useful. |
| 09:05:18 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 09:05:21 | <dminuoso> | The freedom you have with expandMacros' seems interest as well, since you could give @load some interesting behavior. |
| 09:06:28 | <dminuoso> | So Im writing a tool right now, that I hope will gain some users outside the Haskell world. Broadly speaking its a configurable authentication proxy for some service, and I've been wondering how to potentially allow JSON configuration in the mix of this. |
| 09:07:31 | × | trillp quits (~user@69.233.98.238) (Remote host closed the connection) |
| 09:09:04 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:09:11 | <dminuoso> | With expandMacros' I could have a neat hook to allow mixing JSON into a config. The config might have some mostly static configuration, and then some more dynamic portion that the user could specify via JSON-encoded config-schema, which then could be mixed in via expandMacros' |
| 09:10:00 | <dminuoso> | With some custom @load that translates the JSON-encoded stuff into config-schema first |
| 09:10:05 | <dminuoso> | I like it. |
| 09:10:54 | → | teo joins (~teo@user/teo) |
| 09:11:16 | <dminuoso> | s/config-schema/config-value/ |
| 09:11:32 | <dminuoso> | These two libraries really are some of my favourite ones on hackage. :) |
| 09:14:57 | → | burnsidesLlama joins (~burnsides@dhcp168-017.wadham.ox.ac.uk) |
| 09:15:48 | → | xkuru joins (~xkuru@user/xkuru) |
| 09:17:34 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 09:17:34 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 09:17:37 | allbery_b | is now known as geekosaur |
| 09:18:33 | → | catern joins (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) |
| 09:21:03 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:21:21 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:24:43 | × | ftzm quits (~ftzm@178.249.51.108) (Quit: Client closed) |
| 09:25:58 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 09:27:38 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:27:55 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:28:59 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:91cd:1543:8918:bc14) (Quit: gone to sleep. ZZZzzz…) |
| 09:32:14 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:32:32 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:34:12 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:34:30 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:36:10 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:36:28 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:36:34 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) |
| 09:37:19 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection) |
| 09:38:39 | × | gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 276 seconds) |
| 09:40:42 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 09:40:55 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:2cfd:b00:73ba:1137) |
| 09:41:00 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 09:41:25 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:44:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 09:46:52 | × | wolfshappen quits (~waff@irc.furworks.de) (Quit: later) |
| 09:47:57 | → | wolfshappen joins (~waff@irc.furworks.de) |
| 09:48:25 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:49:58 | <lortabac> | I have a thread that provides a non-essential feature, currently if an exception occurs in that thread it bubbles up to the toplevel and makes the application crash |
| 09:50:25 | <lortabac> | how can I make it just log a message and kill the thread? |
| 09:50:59 | <[exa]> | can you catch the exception in the thread and let it kill itself? |
| 09:52:25 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 09:52:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:55:02 | <dminuoso> | lortabac: setUncaughtExceptionHandler? |
| 09:56:37 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 09:57:37 | <lortabac> | [exa]: that's what I'm trying to do, but for some reason the exceptions is not caught in the thread |
| 09:57:43 | <lortabac> | *exception |
| 09:57:49 | <dminuoso> | lortabac: Is this an async exception perhaps? |
| 09:58:22 | <dminuoso> | If you're using unliftio/safe-exceptions you couldn't recover from them unless with manual fiddlery |
| 09:58:35 | → | CiaoSen joins (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 09:59:08 | <lortabac> | the thread starts a Prometheus scraping server, in order to test exception handling I'm starting it on a busy port |
| 09:59:59 | <lortabac> | it doesn't look like an async exception to me, but to be honest I don't know |
| 10:00:16 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 10:00:27 | <dminuoso> | lortabac: Which catch facility are you using? Control.Exception? |
| 10:00:39 | <dminuoso> | Or Control.Exception.Safe/UnliftIO.Exception? |
| 10:00:41 | <lortabac> | I tried replacing unliftio with exceptions and I still have the same result |
| 10:00:46 | <lortabac> | I'm using catchAll |
| 10:00:59 | <dminuoso> | lortabac: Ah so if you're using unliftio catch/catchAll, then I suspect you have an async exception |
| 10:01:16 | <dminuoso> | Because they're specifically designed to not be able to recover from async exceptions |
| 10:01:29 | <dminuoso> | You can verify using https://hackage.haskell.org/package/unliftio-0.2.20/docs/UnliftIO-Exception.html#v:isAsyncException |
| 10:02:43 | <lortabac> | I would like to verify, but how do I get the exception in the first place? :D |
| 10:02:56 | <lortabac> | if I can't catch it I can't pass it to that function |
| 10:03:32 | <dminuoso> | Use onException |
| 10:03:49 | → | tom_ joins (~tom@host86-151-99-97.range86-151.btcentralplus.com) |
| 10:03:50 | × | michalz quits (~michalz@185.246.204.40) (Remote host closed the connection) |
| 10:04:20 | <lortabac> | perhaps withException? |
| 10:04:31 | <dminuoso> | Ah, yeah |
| 10:06:15 | × | zincy quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Ping timeout: 252 seconds) |
| 10:06:18 | → | retroid_ joins (~retro@05412d78.skybroadband.com) |
| 10:06:36 | × | tom__ quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Ping timeout: 245 seconds) |
| 10:07:30 | × | retro_ quits (~retro@05412d78.skybroadband.com) (Ping timeout: 268 seconds) |
| 10:08:29 | → | zincy joins (~tom@2a00:23c8:970c:4801:2c67:e51d:1302:54d3) |
| 10:08:46 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 10:10:48 | <lortabac> | the exception handler is never reached |
| 10:10:54 | <lortabac> | I need to investigate more |
| 10:11:04 | × | genieliu quits (~genieliu@103.37.140.24) (Ping timeout: 265 seconds) |
| 10:11:04 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds) |
| 10:11:09 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:11:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 10:12:42 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:d0b4:48a4:6b63:b6a2) |
| 10:13:14 | <dminuoso> | Perhaps there's some exception handler somewhere that directly calls exit(2)? |
| 10:13:52 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 10:13:52 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:14:10 | <lortabac> | dminuoso: that's possible, I'm still not familiar with all the corners of the code base |
| 10:14:59 | <lortabac> | alternatively, I can make the Prometheus mandatory and let it crash, but now I'm curious to understand anyway |
| 10:15:16 | <lortabac> | *the Prometheus scraping server |
| 10:15:25 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 10:15:58 | <dminuoso> | lortabac: You can try looking for `foreign import ccall unsafe "exit"` or `exitImmediately` |
| 10:16:14 | <dminuoso> | But really, only that thread dies? |
| 10:16:21 | <dminuoso> | Or wait, you say the entire process dies right? |
| 10:16:41 | <lortabac> | yes, whatever I put in the handler is never executed |
| 10:16:42 | <dminuoso> | Then I suspect something is calling exit(2) using one of the two methods above |
| 10:16:49 | <lortabac> | and the whole process dies instead |
| 10:17:14 | <dminuoso> | Yeah, look for the above ffi import or uses of `exitImmediately` |
| 10:17:25 | <dminuoso> | Though this could also be hidden inside some dependency |
| 10:17:28 | <dminuoso> | Ugly. |
| 10:18:10 | <lortabac> | yes, I can't find it in our code base |
| 10:20:25 | <dminuoso> | lortabac: Another thing that might be happening is that your main/top thread gets killed away. |
| 10:20:45 | <dminuoso> | Say if there's some inner exception handler that throws an async exception at the main thread. |
| 10:21:05 | <dminuoso> | That is, your spawned thread has some exception handler that signals the main/top thread. |
| 10:21:12 | <lortabac> | this seems quite likely |
| 10:21:25 | <lortabac> | maybe warp does this? |
| 10:21:26 | <tomsmeding> | non-serious suggestion: write a C program that redefines exit(3) and _exit(3), compile that to a shared library, and LD_PRELOAD it so that you can break on that in a debugger |
| 10:23:00 | <dminuoso> | lortabac: Oh I have a theory! |
| 10:23:18 | <dminuoso> | I've tripped into this situation 3 times in tests. And every time I forget about it. |
| 10:23:32 | <lortabac> | maybe it's me who is doing something stupid, I certainly don't exclude this possibility :) |
| 10:25:43 | <dminuoso> | Is your code publically visible or can you share the structure of the test code here? |
| 10:26:28 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 10:27:35 | <lortabac> | I can't share the full code because it's work, but I can paste just the relevant bits |
| 10:30:11 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 10:30:30 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 10:30:52 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 10:31:22 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 265 seconds) |
| 10:33:35 | <lortabac> | dminuoso: https://paste.tomsmeding.com/52npg0c7 |
| 10:33:39 | → | kennyd joins (~bc8165b6@cerf.good1.com) |
| 10:34:41 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 10:36:25 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 10:36:41 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 265 seconds) |
| 10:36:44 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 10:38:45 | × | burnsidesLlama quits (~burnsides@dhcp168-017.wadham.ox.ac.uk) (Remote host closed the connection) |
| 10:39:40 | → | genieliu joins (~genieliu@103.37.140.24) |
| 10:40:17 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 10:41:46 | → | kuribas joins (~user@ptr-25vy0i9qa16kzbd65yl.18120a2.ip6.access.telenet.be) |
| 10:42:31 | → | mmhat joins (~mmh@55d44a9c.access.ecotel.net) |
| 10:44:55 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 10:45:13 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 10:46:53 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 10:47:03 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 10:47:11 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 10:53:48 | → | JimL joins (~quassel@89-162-2-132.fiber.signal.no) |
| 10:55:01 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds) |
| 10:55:23 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:57:57 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 10:58:15 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 10:58:20 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 10:59:20 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 11:01:55 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:02:13 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:03:53 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:04:11 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:07:42 | × | user0 quits (~aj@154.0.137.32) (Ping timeout: 256 seconds) |
| 11:09:12 | → | burnsidesLlama joins (~burnsides@dhcp168-017.wadham.ox.ac.uk) |
| 11:12:41 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:12:56 | → | user0 joins (~aj@154.0.137.32) |
| 11:12:59 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:14:13 | × | burnsidesLlama quits (~burnsides@dhcp168-017.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
| 11:15:00 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 11:16:35 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Client Quit) |
| 11:17:20 | → | darchitect joins (~darchitec@2a00:23c6:3584:df00:7dec:bf13:8fa:748c) |
| 11:18:15 | × | CiaoSen quits (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 11:18:19 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 11:21:11 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:21:29 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:23:26 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:23:43 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:28:01 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:28:20 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:30:00 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:30:18 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:35:52 | → | InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 11:41:13 | × | wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 252 seconds) |
| 11:41:58 | → | wolfshappen joins (~waff@irc.furworks.de) |
| 11:43:23 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 11:44:56 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:45:57 | → | burnsidesLlama joins (~burnsides@dhcp168-017.wadham.ox.ac.uk) |
| 11:46:37 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 240 seconds) |
| 11:47:22 | × | genieliu quits (~genieliu@103.37.140.24) (Ping timeout: 256 seconds) |
| 11:48:43 | → | genieliu joins (~genieliu@103.37.140.24) |
| 11:49:20 | × | burnsidesLlama quits (~burnsides@dhcp168-017.wadham.ox.ac.uk) (Remote host closed the connection) |
| 11:49:28 | → | burnsidesLlama joins (~burnsides@dhcp168-017.wadham.ox.ac.uk) |
| 11:52:21 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:52:39 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 11:52:39 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 11:55:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 11:56:36 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:d013:2c25:702e:efd1) |
| 11:56:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:57:00 | × | InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
| 11:58:49 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 11:59:06 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:00:46 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:01:04 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:01:30 | <dminuoso> | lortabac: Mmm no clue. I'd add careful logging to test some implied assertions you make. |
| 12:01:35 | <dminuoso> | That is, is that thing even called? |
| 12:01:46 | <dminuoso> | Wrap `run` with logging, see if it finished perhaps |
| 12:02:14 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 12:02:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:04:49 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:05:06 | <lortabac> | dminuoso: yes, I'm sure it's called because it works properly with the right port setting |
| 12:05:06 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:06:01 | <dminuoso> | lortabac: Do you ever get past `run`? |
| 12:06:14 | <dminuoso> | i.e. if you do something like `run ... >> hPutStrLn stderr "foo"`, do you get output? |
| 12:07:08 | <dminuoso> | And then I'd also try `run ... `onException` hPutStrLn "exception thrown"` |
| 12:07:19 | <dminuoso> | The intention is to understand how control flow is working here |
| 12:07:53 | <dminuoso> | In addition, you can try customizing `setUncaughtExceptionHandler` on the main thread |
| 12:08:02 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 12:08:09 | <dminuoso> | (Try doing this as late as possible, to avoid any library doing this for you) |
| 12:08:17 | <dminuoso> | Or rather, overwriting any potential library handler that is being installed |
| 12:08:17 | <lortabac> | the actual 'run' is called by the prometheus library, I only call it indirectly through 'serveMetrics' |
| 12:08:29 | <dminuoso> | Sure, then `serveMetrics >> hPutStrLn stderr "foo"` |
| 12:08:32 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:08:49 | <dminuoso> | And: serveMetrics `onException` hPutStrLn stderr "exception thrown" |
| 12:10:37 | <dminuoso> | Also, something like: setUncaughtExceptionHandler (\e -> when (isAsyncException e) (hPutStrLn stderr "main thread killed by async exception") >> hPutStrLn (displayException e)) >> void (async ... serveMetrics)` |
| 12:13:48 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:13:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 12:14:05 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:14:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:17:51 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:18:09 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:19:49 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:20:06 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:20:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 12:20:50 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:21:35 | → | __monty__ joins (~toonn@user/toonn) |
| 12:23:22 | → | bollu joins (uid233390@id-233390.helmsley.irccloud.com) |
| 12:25:18 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 12:26:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 12:26:41 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:28:30 | → | CiaoSen joins (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 12:30:43 | <lortabac> | dminuoso: I think I solved the mystery |
| 12:30:49 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:31:27 | <lortabac> | let me do another couple of tests |
| 12:33:09 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:33:26 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:34:39 | <lortabac> | ok, so everything works as expected, the problem was just my test |
| 12:35:38 | <lortabac> | in order to trigger an exception I ran the metrics server on the same port as another service, but in fact the other service started **later** |
| 12:37:02 | × | nfd quits (~nfd@user/nfd) (Ping timeout: 265 seconds) |
| 12:37:03 | <lortabac> | if I choose a port that is actually busy the exception is caught in the thread as expected |
| 12:38:00 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 265 seconds) |
| 12:41:39 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:41:56 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:45:37 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:45:56 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:47:52 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 12:49:35 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:49:53 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:51:20 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:54:08 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:54:26 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 12:54:44 | → | lechner joins (~lechner@debian/lechner) |
| 12:58:35 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 12:58:53 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:00:33 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:00:51 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:02:31 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:02:48 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:03:37 | × | max22- quits (~maxime@2a01cb08833598006f80219c43541139.ipv6.abo.wanadoo.fr) (Ping timeout: 265 seconds) |
| 13:03:59 | → | InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 13:06:35 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:06:52 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:08:32 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:08:50 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:12:49 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:13:07 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:14:03 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 13:14:39 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 13:16:47 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:17:04 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:17:04 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 13:17:23 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 13:17:41 | → | mncheck joins (~mncheck@193.224.205.254) |
| 13:18:00 | × | zaquest quits (~notzaques@5.130.79.72) (Read error: Connection reset by peer) |
| 13:19:25 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 13:19:27 | → | zaquest joins (~notzaques@5.130.79.72) |
| 13:21:55 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 13:24:59 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan) |
| 13:28:07 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 13:31:19 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:32:45 | → | simendsjo joins (~user@84.211.91.241) |
| 13:34:49 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 13:36:58 | × | acidjnk_new quits (~acidjnk@p200300d0c7271e233cc6a7b9846dd72b.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 13:39:21 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 13:40:58 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:d013:2c25:702e:efd1) (Quit: gone to sleep. ZZZzzz…) |
| 13:43:12 | <merijn> | heh |
| 13:43:18 | <merijn> | Set has a map, but no traverse? |
| 13:43:56 | <merijn> | That's annoying |
| 13:44:13 | × | genieliu quits (~genieliu@103.37.140.24) (Ping timeout: 265 seconds) |
| 13:44:37 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 240 seconds) |
| 13:46:33 | <maerwald> | hmm |
| 13:46:34 | → | acidjnk_new joins (~acidjnk@p200300d0c7271e233cc6a7b9846dd72b.dip0.t-ipconnect.de) |
| 13:47:07 | <maerwald> | merijn: https://github.com/haskell/containers/pull/592 |
| 13:47:12 | <Franciman> | :t traverse |
| 13:47:13 | <lambdabot> | (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) |
| 13:47:21 | × | vgtw_ quits (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) (Ping timeout: 252 seconds) |
| 13:47:41 | <maerwald> | merijn: tldr: don't try to add anything to containers |
| 13:47:45 | → | max22- joins (~maxime@2a01cb088335980011e17f1477c78e4b.ipv6.abo.wanadoo.fr) |
| 13:47:52 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 13:47:57 | <Franciman> | lol |
| 13:48:30 | <maerwald> | took a year to get useful input and then it ended in bikeshedding about CPP pragmas |
| 13:48:57 | <maerwald> | but the fastest version is in that PR |
| 13:49:15 | <merijn> | tbh, I don't really care about speed anyway |
| 13:49:20 | <maerwald> | traverse f s0 = fmap (GHCExts.fromListN (size s0)) . Prelude.traverse f . toList $ s0 |
| 13:49:40 | <maerwald> | that seems to fuse well or so |
| 13:52:13 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 13:53:04 | <Franciman> | if you don't care about speed what's the point of using set? |
| 13:53:06 | <Franciman> | x.x |
| 13:53:25 | → | vgtw joins (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) |
| 13:53:42 | <merijn> | Franciman: Semantics? |
| 13:53:45 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 13:54:08 | <Franciman> | no i mean |
| 13:54:09 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
| 13:54:10 | <Franciman> | you can use map |
| 13:54:12 | <Franciman> | it has traverse |
| 13:54:21 | <merijn> | Franciman: On values, not on keys |
| 13:54:25 | <Franciman> | https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Map-Strict.html#v:traverseWithKey |
| 13:54:43 | <merijn> | Franciman: How would you reconstruct the semantics of "traversing Set" using that? |
| 13:55:02 | <Franciman> | i don't care tbf |
| 13:55:07 | <Franciman> | ops wrong channel |
| 13:55:10 | <Franciman> | merijn: I see |
| 13:55:15 | <Franciman> | I read the type wrongly |
| 13:55:19 | <Franciman> | sorry |
| 13:55:29 | <Franciman> | then you can use a list |
| 13:55:36 | <Franciman> | and continuously traverse it |
| 13:55:46 | <Franciman> | O(n^n) |
| 13:55:48 | <Franciman> | ~ |
| 13:56:40 | × | caubert quits (~caubert@136.244.111.235) (Quit: WeeChat 3.3) |
| 13:56:44 | <Franciman> | https://hackage.haskell.org/package/data-ordlist-0.4.7.0/docs/Data-List-Ordered.html merijn ejony |
| 13:56:54 | <dminuoso> | maerwald: Uh, whats the tldr for that pull request? |
| 13:57:38 | <dminuoso> | Im not sure I understand the claim that this does not add functionality. |
| 13:58:04 | <dminuoso> | Especially given `map f = fromList . List.map f . toList` |
| 13:58:07 | <maerwald> | dminuoso: that contributing to containers is annoying |
| 13:58:13 | <dminuoso> | How does that make it into containers but traverse not? |
| 13:58:42 | <maerwald> | there was some bikeshedding about CPP and ancient GHC versions and then I got no further input on what to do |
| 14:01:41 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 14:04:03 | × | filwisher quits (2e6936c793@2604:bf00:561:2000::170) (Remote host closed the connection) |
| 14:04:03 | × | jkoshy quits (99b9359beb@2604:bf00:561:2000::10f) (Remote host closed the connection) |
| 14:04:03 | × | lukec quits (9dfd4d094e@2604:bf00:561:2000::10e) (Remote host closed the connection) |
| 14:04:04 | × | jakzale quits (6291399afa@user/jakzale) (Remote host closed the connection) |
| 14:05:20 | <Franciman> | btw the semantics of a traverse on set are not so clear. If you don't care about speed |
| 14:05:22 | <Franciman> | just do |
| 14:05:32 | <Franciman> | traverse . toList |
| 14:05:40 | <Franciman> | do your traverse and rebuild your set |
| 14:06:02 | <Franciman> | provlem solved |
| 14:06:06 | <Franciman> | i suppose |
| 14:06:12 | <maerwald> | Franciman: that's what I just posted above |
| 14:06:14 | × | bsima1 quits (9d7e39c8ad@2604:bf00:561:2000::dd) (Remote host closed the connection) |
| 14:06:14 | × | evanrelf quits (3addc196af@2604:bf00:561:2000::f0) (Remote host closed the connection) |
| 14:06:14 | × | samhh quits (7569f027cf@2604:bf00:561:2000::e4) (Remote host closed the connection) |
| 14:06:14 | × | nickdaly-away quits (45ce440a48@2604:bf00:561:2000::e2) (Remote host closed the connection) |
| 14:06:14 | × | sm2n quits (ae95cb1267@user/sm2n) (Remote host closed the connection) |
| 14:06:20 | <maerwald> | that IS the fastest version |
| 14:06:23 | <Franciman> | sorry maerwald I didn't read it |
| 14:06:27 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Ping timeout: 265 seconds) |
| 14:06:33 | → | bsima1 joins (9d7e39c8ad@2604:bf00:561:2000::dd) |
| 14:06:35 | → | filwisher joins (2e6936c793@2604:bf00:561:2000::170) |
| 14:06:35 | → | lukec joins (9dfd4d094e@2604:bf00:561:2000::10e) |
| 14:06:36 | → | samhh joins (7569f027cf@2604:bf00:561:2000::e4) |
| 14:06:40 | <Franciman> | ah nice |
| 14:06:43 | → | nickdaly-away joins (45ce440a48@2604:bf00:561:2000::e2) |
| 14:06:43 | → | jkoshy joins (99b9359beb@2604:bf00:561:2000::10f) |
| 14:06:43 | → | evanrelf joins (3addc196af@2604:bf00:561:2000::f0) |
| 14:06:43 | <Franciman> | then what are we talking about? |
| 14:06:47 | <Franciman> | I am losing time as usual |
| 14:06:49 | <Franciman> | bye |
| 14:06:49 | → | sm2n joins (ae95cb1267@user/sm2n) |
| 14:06:50 | → | jakzale joins (6291399afa@user/jakzale) |
| 14:06:53 | <Franciman> | thanks |
| 14:08:27 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 14:09:40 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:10:36 | <Franciman> | maerwald: sorry is it very efficient because of laziness? |
| 14:10:55 | <maerwald> | I guess it fuses well |
| 14:10:58 | <Franciman> | i think it can be made at least as efficient, without changing the ease of composition with explicit codata and polarisation |
| 14:11:10 | <Franciman> | can't wait to try |
| 14:11:22 | <Franciman> | imagine a streaming list implementation |
| 14:11:30 | <Franciman> | who gives you the elements of the set on demand |
| 14:11:45 | <Franciman> | with linearity you can also get fusion, I believe |
| 14:11:49 | <Franciman> | no more ghc vodoo |
| 14:11:51 | <Franciman> | OH OHHH |
| 14:11:55 | <dminuoso> | " |
| 14:11:57 | <Franciman> | who knows if this makes sense |
| 14:12:04 | <Franciman> | I do wonder |
| 14:12:17 | <dminuoso> | Found type wildcard '_' standing for '_' |
| 14:12:19 | <dminuoso> | Thanks GHC! |
| 14:12:22 | <Franciman> | ^^ |
| 14:12:51 | → | lavaman joins (~lavaman@98.38.249.169) |
| 14:14:09 | → | caubert joins (~caubert@136.244.111.235) |
| 14:17:01 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 14:19:34 | → | xdej joins (~xdej@quatramaran.salle-s.org) |
| 14:20:01 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 14:21:37 | → | jkaye joins (~jkaye@c-71-205-220-154.hsd1.co.comcast.net) |
| 14:27:40 | × | burnsidesLlama quits (~burnsides@dhcp168-017.wadham.ox.ac.uk) (Remote host closed the connection) |
| 14:28:21 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 14:28:45 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 14:29:10 | → | gaff joins (~gaff@49.207.205.24) |
| 14:29:30 | <gaff> | i have some code at https://paste.ofcode.org/3bCeaTekdDQTadp8CPRwV65 |
| 14:30:26 | × | k60` quits (~user@94.25.169.9) (Read error: No route to host) |
| 14:30:30 | <gaff> | to test this code using quickcheck, do you randomly generate leap years then check if the function returns true? |
| 14:31:16 | → | k60`` joins (~user@94.25.169.9) |
| 14:31:28 | <gaff> | i ask this question because one of the pitfalls of using quickcheck is that if you are not careful, you end up duplicating the source code in your tests. |
| 14:31:30 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 14:32:18 | <gaff> | appreciate your help |
| 14:33:02 | × | bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 14:34:41 | <[exa]> | gaff: property test are much better for code where it is not very obvious that the implementation follows the "defining property". Here the defining property is basically same as implementation so I wouldn't care much, the only "gain" you get here is that you are less likely to do the same code error in both the test and code |
| 14:35:26 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 14:35:40 | <[exa]> | "normal" tests that throw in a few years that should be leap and few that should not, just to make sure that the function is sane, would make better sense here to me |
| 14:36:54 | × | k60`` quits (~user@94.25.169.9) (Ping timeout: 265 seconds) |
| 14:36:59 | <[exa]> | if you'd go with quickcheck, you might test that against some kind of standard library that can calculate leap years, but then the question is why not use the library in the first place :] |
| 14:37:23 | × | Techcable quits (~Techcable@168.235.93.147) (Ping timeout: 265 seconds) |
| 14:38:07 | <gaff> | [exa]: ok, i am just trying to learn how to write good properties with quickcheck. in this case, which is deliberately simple, quickcheck can test some invariants, like if `x` is a leap year, so must `4 * x`, etc |
| 14:38:20 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:38:20 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 14:38:20 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:39:09 | <merijn> | Man...today's AoC is surprisingly tricky |
| 14:39:26 | <gaff> | also, quickcheck can generate a whole set of random leap years, so perhaps you can have more confidence in your tests. so that's the plus i see. plus, i learn to write some properties. |
| 14:39:38 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 14:40:24 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 14:41:25 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 14:41:47 | <[exa]> | merijn: the first part looks very prologish |
| 14:41:59 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 14:42:07 | → | jippiedoe joins (~david@2a02-a44c-e14e-1-3090-ba98-2dba-9449.fixed6.kpn.net) |
| 14:42:26 | <[exa]> | gaff: ah yes practicing this would probably make sense |
| 14:42:46 | <merijn> | [exa]: The first part is the non-prolog-y part |
| 14:42:51 | <merijn> | it's the second one that is |
| 14:42:54 | → | doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
| 14:43:02 | <merijn> | Feels very "the tip of my tongue"-y |
| 14:43:19 | <merijn> | I think maybe my problem is that my solution is trying to be overly generic |
| 14:44:09 | × | CiaoSen quits (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 14:44:18 | <gaff> | [exa]: ok |
| 14:45:08 | → | Guest40 joins (~Guest40@ec2-54-215-90-243.us-west-1.compute.amazonaws.com) |
| 14:45:23 | <gaff> | [exa]: what bugs me is that almost all talks on quickcheck start with the same hackneyed example: reverse (reverse xs) = xs |
| 14:47:42 | → | genieliu joins (~genieliu@111.193.167.10) |
| 14:48:19 | <gaff> | [exa]: also, quickcheck properties, if you can write them, are good if you don't know what exactly may be the output of an operation for a random input. |
| 14:48:30 | × | alx741 quits (~alx741@186.178.108.36) (Ping timeout: 265 seconds) |
| 14:49:39 | <dminuoso> | Can someone explain to me why GHC complains that `pat0` is ambiguous here? https://gist.github.com/dminuoso/7ca1d473e20c70b1ddb98fc714f4391c |
| 14:50:46 | <tomsmeding> | dminuoso: type family Inner tag field = r | r -> field where |
| 14:50:55 | <tomsmeding> | with TypeFamilyDependencies |
| 14:51:13 | <tomsmeding> | crucial bit: "NB: ‘Inner’ is a non-injective type family" |
| 14:51:46 | <dminuoso> | tomsmeding: that does not work, that would violate injectivity |
| 14:51:58 | <dminuoso> | See: Inner Descr f = T.Text |
| 14:52:04 | <tomsmeding> | oh |
| 14:52:17 | → | polezaivsani joins (~polezaivs@orangeshoelaces.net) |
| 14:52:20 | <tomsmeding> | oh fair point |
| 14:52:24 | Guest40 | is now known as toeinriver |
| 14:53:01 | × | genieliu quits (~genieliu@111.193.167.10) (Ping timeout: 240 seconds) |
| 14:53:05 | × | gaff quits (~gaff@49.207.205.24) () |
| 14:53:19 | <tomsmeding> | the point is that if you call hasPerm, say as 'hasPerm u f t', then from the types of u, f and t, ghc can infer what 'Inner mode [Authorization tok pat]' should be, but from that it can't infer what tok and pat should be |
| 14:53:30 | <tomsmeding> | tok can be inferred from the final return type, but pat appears nowhere else |
| 14:53:39 | <tomsmeding> | so it's precisely the non-injectivity that makes it fail here |
| 14:53:46 | <dminuoso> | I want it to not care what `pat` is |
| 14:54:18 | <dminuoso> | So previously I had: hasPerm :: (Show tok, Show pat) => [Authorization tok pat] -> T.Text -> GerdM tok |
| 14:54:35 | <dminuoso> | And I turned it into: hasPerm :: User -> PermSelector tok pat -> T.Text -> GerdM tok |
| 14:56:34 | tomsmeding | doesn't know how to get what you want; would say it is impossible but not sure |
| 14:56:41 | <tomsmeding> | add a Proxy :p |
| 14:56:53 | <dminuoso> | Yeah I dont know how to do that |
| 14:57:08 | <tomsmeding> | how to add a proxy to fix this? |
| 14:57:15 | <tomsmeding> | hasPerm :: Proxy pat -> User -> ... |
| 14:57:22 | <dminuoso> | Uh, but why would that.. |
| 14:57:40 | <tomsmeding> | then the signature gets accepted, and at a call site you have to choose a type for 'pat' |
| 14:58:10 | <tomsmeding> | the point was that from knowing Inner mode [Authorization tok pat] ~ t for some concrete t, ghc can't get a concrete type for pat |
| 14:58:16 | <tomsmeding> | and ghc needs concrete types for everything |
| 14:58:22 | <tomsmeding> | Proxy is a data type, so is injective |
| 14:58:27 | <dminuoso> | But if that type variable is not used anywhere, why does it matter in the first place? |
| 14:58:56 | tomsmeding | has to go, sorry |
| 14:59:02 | <dminuoso> | No worries, thanks for your help! |
| 14:59:11 | <tomsmeding> | that's precisely the NoAllowAmbiguousTypes restriction I believe |
| 14:59:43 | <oats> | https://paste.xinu.at/z2e3Dv/ |
| 14:59:43 | <oats> | anyone able to help me figure out why this parser can't parse Day 8? it's something to do with the " | " separator, but I can't figure it out exactly in my testing... |
| 15:00:17 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 15:02:09 | <merijn> | oats: The space combinator consumes the space in front of " | " and doesn't backtrack |
| 15:02:34 | <oats> | oof, that's a little counterintuitive |
| 15:02:37 | <oats> | thanks :) |
| 15:04:48 | → | burnsidesLlama joins (~burnsides@dhcp168-017.wadham.ox.ac.uk) |
| 15:05:05 | × | dsrt^ quits (~dsrt@wsip-98-188-240-142.mc.at.cox.net) (Ping timeout: 252 seconds) |
| 15:05:42 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 15:06:21 | <dminuoso> | space = void $ takeWhileP (Just "white space") isSpace |
| 15:06:30 | <dminuoso> | And takeWhileP does not backtrack? |
| 15:06:33 | → | k60`` joins (~user@94.25.169.9) |
| 15:06:40 | <dminuoso> | The documentation says differently, what am I missing merijn? |
| 15:07:04 | <merijn> | dminuoso: sepBy doesn't backtrack, though |
| 15:07:33 | <merijn> | dminuoso: It doesn't wrap the separator in a try |
| 15:07:38 | → | gustik joins (~gustik@2a01:c844:242f:ba20:72e:7030:46bf:1353) |
| 15:08:10 | dminuoso | finds megaparsec confusing |
| 15:08:20 | <merijn> | In general the backtracking behaviour of megaparsec is poorly explained/documented |
| 15:08:24 | <merijn> | Which is a bummer |
| 15:08:32 | <merijn> | So I mostly debug it via guessing |
| 15:08:49 | → | dsrt^ joins (~dsrt@wsip-98-188-240-142.mc.at.cox.net) |
| 15:09:01 | <oats> | is there a generally agreed upon better megaparsec? |
| 15:09:09 | <merijn> | Part of the reason is the splitting off of parser-combinators |
| 15:09:11 | <merijn> | oats: No |
| 15:09:22 | <dminuoso> | Everything Ive seen in alex/happy looked nice so far |
| 15:09:26 | <merijn> | So parser-combinators has to be parser implementation agnostic |
| 15:10:03 | <dminuoso> | For for something like AoC alex/happy seem like drastic overkill |
| 15:10:14 | × | burnsidesLlama quits (~burnsides@dhcp168-017.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 15:10:54 | <merijn> | At least your parser not working protects you from the rest of today's excercise >.> |
| 15:11:28 | dminuoso | dwindled away into type progamming lands |
| 15:11:37 | → | alx741 joins (~alx741@186.178.108.192) |
| 15:11:39 | <oats> | merijn, uh oh |
| 15:11:43 | <dminuoso> | And it seems my enchanted swork broke when fighting the water daemon of GHC. |
| 15:11:51 | <merijn> | I was trying a nice generic constraint solver, but that's not encoding enough information :\ |
| 15:11:55 | <dminuoso> | The type error diagnostics are slowly defeating me. :( |
| 15:12:12 | <merijn> | and naming things for today is hard :\ |
| 15:12:40 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 15:13:25 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 240 seconds) |
| 15:14:03 | oats | attempts to build a map |
| 15:15:25 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 240 seconds) |
| 15:17:57 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:540e:67c2:47ff:b4e3) |
| 15:18:59 | × | toeinriver quits (~Guest40@ec2-54-215-90-243.us-west-1.compute.amazonaws.com) (Quit: Client closed) |
| 15:20:39 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 15:20:57 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 15:21:56 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 15:21:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 15:21:56 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:23:36 | <__monty__> | merijn: Maybe you're overthinking it? I'm using such stellar names as "zero" and "four". |
| 15:23:54 | <merijn> | __monty__: More for my constraint computation |
| 15:23:57 | <merijn> | Also |
| 15:24:06 | <merijn> | A pox upon the lack of symmetric difference in containers |
| 15:24:42 | <merijn> | Leaving me to compute myself...*again* |
| 15:25:25 | <__monty__> | Doing two differences isn't *that* bad though. Just constant factors ; ) |
| 15:25:40 | <merijn> | It's not two differences, though? |
| 15:25:51 | <merijn> | You need to union, intersect, then difference |
| 15:26:40 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:27:25 | × | shailangsa quits (~shailangs@host86-186-136-27.range86-186.btcentralplus.com) (Ping timeout: 240 seconds) |
| 15:28:03 | <__monty__> | Isn't that disjointUnion? |
| 15:28:12 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:540e:67c2:47ff:b4e3) (Quit: gone to sleep. ZZZzzz…) |
| 15:28:33 | <merijn> | No |
| 15:28:40 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:540e:67c2:47ff:b4e3) |
| 15:29:09 | <merijn> | __monty__: At least the type signature and example of disjointUnion look *nothing* like symmetric difference |
| 15:29:24 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 15:29:46 | <merijn> | Symmetric difference is something like: |
| 15:29:47 | <merijn> | symmDiff s1 s2 = (s1 `S.union` s2) `S.difference` (s1 `S.intersection` s2) |
| 15:30:23 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 15:30:27 | <dminuoso> | tomsmeding: Ohh its starting to slowly hit me. |
| 15:31:07 | <dminuoso> | type PermSelector tok pat = forall mode. PermsF mode -> Inner mode [Authorization tok pat] |
| 15:31:52 | <dminuoso> | Even if use `PermSelector () ()`, the `tok` and `pat` in the resulting part are still ambiguous, because Inner is non-injective. And indeed, if we consider the Descr branch of Inner, I start to see why |
| 15:33:08 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:540e:67c2:47ff:b4e3) (Ping timeout: 252 seconds) |
| 15:33:12 | <dminuoso> | I guess the crux is trying to make PermSelector polymorphic over `mode` |
| 15:33:15 | × | ystael quits (~ystael@user/ystael) (Quit: Lost terminal) |
| 15:33:22 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 15:33:48 | <dminuoso> | Seems like I cant ergonomically have a universally quantified type, if that quantified type goes into into a non-injective type family |
| 15:34:00 | <dminuoso> | It hinders type inference completely |
| 15:34:50 | <__monty__> | merijn: You're right of course. My brain saw what it wanted to see. |
| 15:34:52 | <dminuoso> | So I have an idea. Instead of using `Inner Descr a = T.Text`, I could use `Inner Descr a = Const Text a` |
| 15:35:00 | <dminuoso> | Then I could get the injectivity back |
| 15:35:49 | → | ystael joins (~ystael@user/ystael) |
| 15:38:27 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 15:38:44 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 15:39:07 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 15:40:35 | → | lavaman joins (~lavaman@98.38.249.169) |
| 15:42:25 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 15:42:43 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 15:42:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 15:42:47 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 15:42:47 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:46:20 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 15:47:11 | <boxscape> | Hmm is there any value/prior work in thinking about strictness like an Applicative functor, such that `f <$> Strict x <*> Strict y` is `f $! x $! y`? |
| 15:47:20 | → | boxscape_ joins (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) |
| 15:47:28 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 15:47:43 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 15:48:16 | <boxscape> | (The only reason I'm thinking about this is because I was thinking "Idris's ! notation could also instead be used to indicate that an argument should be evaluated before application" and then was thinking "but maybe you can combine those") |
| 15:48:21 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 15:49:52 | × | kennyd quits (~bc8165b6@cerf.good1.com) (Quit: CGI:IRC (Session timeout)) |
| 15:50:51 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 265 seconds) |
| 15:51:20 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 15:51:36 | × | doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 268 seconds) |
| 15:52:45 | × | simendsjo quits (~user@84.211.91.241) (Ping timeout: 252 seconds) |
| 15:53:18 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 15:54:20 | <sprout_> | merijn: https://github.com/egel-lang/aoc-2021/blob/main/day8/task2.eg <- task 2. took me 3 or 4 hours.. |
| 15:54:36 | <sprout_> | not haskell but close enough, I guess |
| 15:54:46 | <merijn> | I can't look yet, I'm still solving it :p But I think I had the necessary epiphany so it's "just programming" now :p |
| 15:55:01 | <sprout_> | good luck! |
| 15:57:09 | × | acidjnk_new quits (~acidjnk@p200300d0c7271e233cc6a7b9846dd72b.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 15:57:27 | × | mbuf quits (~Shakthi@223.178.121.64) (Quit: Leaving) |
| 15:59:33 | → | CiaoSen joins (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 16:02:15 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 16:02:33 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 16:03:42 | <tomsmeding> | dminuoso: what you say sounds right to me |
| 16:03:47 | <tomsmeding> | the Const hack is a hack though :p |
| 16:03:51 | <tomsmeding> | then I'd prefer a Proxy |
| 16:04:07 | <dminuoso> | tomsmeding: Doesnt work. |
| 16:04:09 | <tomsmeding> | at least that doesn't imply that you're doing anything fancy with the Const, just fixing a type parameter |
| 16:04:20 | <tomsmeding> | (can also add the Proxy argument to the PermSelector instead of hasPerms |
| 16:04:21 | <tomsmeding> | ) |
| 16:04:28 | <dminuoso> | Or rather, it has to be so ubiquitously present with explicit types.. |
| 16:04:33 | <tomsmeding> | right |
| 16:04:54 | <dminuoso> | tomsmeding: With Tagged (which I prefer over Const for this), this becomes visible only in one small part of the code basis where I extract text for visualization |
| 16:05:03 | <dminuoso> | Which means it has much less impact on the general code |
| 16:05:24 | <tomsmeding> | what's Tagged? just 'data Tagged tag a = Tagged a'? |
| 16:05:29 | <dminuoso> | Yeah |
| 16:05:36 | <tomsmeding> | yeah feels semantically better to me |
| 16:05:40 | <tomsmeding> | than Const, that is |
| 16:05:53 | <dminuoso> | Yup, I mean you can omap over it if you like |
| 16:06:07 | <dminuoso> | Not that I really want, but Tagged conveys the intent much better |
| 16:06:11 | <tomsmeding> | assuming that you correctly assessed that a Proxy is unworkable, which I readily assume you did :) |
| 16:06:27 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 16:06:35 | <dminuoso> | tomsmeding: I would have had to pass proxy over a hundred times. |
| 16:06:43 | <tomsmeding> | or if carrying the tag type variable actually makes some semantic sense |
| 16:06:57 | <dminuoso> | With Tagged it's just 4 places that become aware of it |
| 16:07:13 | <tomsmeding> | and in all those hundred times, can the type variable be inferred if you just write 'Proxy' at the call site? |
| 16:07:25 | <dminuoso> | tomsmeding: no |
| 16:07:43 | <dminuoso> | Inference broke everywhere |
| 16:07:49 | <tomsmeding> | ah, then indeed it's unworkable |
| 16:07:55 | <dminuoso> | Basically I had this situation: |
| 16:08:06 | → | shailangsa joins (~shailangs@host86-161-220-126.range86-161.btcentralplus.com) |
| 16:08:25 | <dminuoso> | f :: PermSelector tok () -> tok; f sel = somethingElse sel |
| 16:08:38 | <dminuoso> | And inference for `somethingElse sel` broke on pat being ambiguous |
| 16:08:57 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:2cfd:b00:73ba:1137) (Quit: WeeChat 2.8) |
| 16:09:13 | <dminuoso> | Which seemed ridiculous initially, but the problem was not that I set the second type argument to (), but inside of `type PermSelector` there was this type family |
| 16:09:24 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 16:09:33 | <dminuoso> | type PermSelector tok pat = forall mode. PermsF mode -> Inner mode [Authorization tok pat] |
| 16:10:01 | <tomsmeding> | right, f's type signature fixes the output of that type family |
| 16:10:04 | <tomsmeding> | and only that |
| 16:10:13 | <tomsmeding> | and 'sel' fixes 'mode', which doesn't help here |
| 16:10:27 | <dminuoso> | no, sel does not fix mode |
| 16:10:30 | <dminuoso> | which is the crux of the probel |
| 16:10:52 | <tomsmeding> | ok, "fix" as in relate the type variable to some explicit quantifier |
| 16:11:05 | <tomsmeding> | it's not yet monomorphic, true, but not ambiguous anymore |
| 16:11:06 | <dminuoso> | Ah yeah |
| 16:11:17 | <tomsmeding> | pat, on the other hand, is ambigiuous still |
| 16:11:34 | <tomsmeding> | I think you analysed the problem correctly and should just use Tagged :p |
| 16:11:58 | <dminuoso> | tomsmeding: I hope I do, I dont really understand it, its just some very lose sense of "I think I have an understanding" |
| 16:12:00 | <tomsmeding> | even if my gut doesn't like it for some reason |
| 16:12:12 | <dminuoso> | Well, with Tagged + tyfam fundeps everything just works out |
| 16:12:30 | <dminuoso> | And the pain is little, so I guess it doesnt matter |
| 16:12:57 | <dminuoso> | I need to reduce this into a simplistic reproducer and fight my way through type inference |
| 16:12:57 | <tomsmeding> | I'm fairly sure I understand where the error is coming from, technically (which allows me to suggest a _possible_ fix), but I'm also fairly sure I have no idea how this issue fits in the more general framework of my understanding of haskell -- and that latter thing is what should motivate the _correct_ fix |
| 16:13:34 | → | gaff joins (~gaff@49.207.205.24) |
| 16:13:38 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 16:13:41 | <tomsmeding> | s,correct,correct/idiomatic, |
| 16:13:56 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 16:14:21 | <dminuoso> | I gotta run for now. Ill make a smaller testcase, and then we can perhaps continue this |
| 16:14:29 | <dminuoso> | I'd really like to fully understand what's going on here |
| 16:14:35 | <tomsmeding> | cheers :) |
| 16:14:49 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 16:18:09 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 16:18:24 | → | rookie101 joins (~rookie@165.232.121.13) |
| 16:20:02 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 16:20:34 | → | son0p joins (~ff@181.136.122.143) |
| 16:21:26 | × | alx741 quits (~alx741@186.178.108.192) (Quit: alx741) |
| 16:22:38 | → | alx741 joins (~alx741@186.178.108.192) |
| 16:25:35 | × | gaff quits (~gaff@49.207.205.24) (Quit: Bye ...) |
| 16:26:23 | → | yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) |
| 16:29:43 | × | lyxia quits (~lyxia@poisson.chat) (Quit: WeeChat 3.3) |
| 16:29:59 | → | lyxia joins (~lyxia@poisson.chat) |
| 16:31:14 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 16:31:44 | × | HurdyGurdyBurdy quits (~HurdyGurd@user/hurdygurdyburdy) (Quit: server died; rip) |
| 16:33:11 | → | Axma10079 joins (~Axman6@user/axman6) |
| 16:34:31 | → | HurdyGurdyBurdy joins (~HurdyGurd@user/hurdygurdyburdy) |
| 16:35:28 | × | Axman6 quits (~Axman6@user/axman6) (Ping timeout: 260 seconds) |
| 16:35:43 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 16:37:31 | → | Techcable joins (~Techcable@168.235.93.147) |
| 16:38:42 | → | MoC joins (~moc@user/moc) |
| 16:39:10 | <merijn> | oof |
| 16:39:14 | <merijn> | Finally done with today |
| 16:39:58 | <MoC> | I fully agree with that sentiment. |
| 16:40:03 | → | burnsidesLlama joins (~burnsides@dhcp168-017.wadham.ox.ac.uk) |
| 16:40:08 | <merijn> | Now I need to clean up the nightmare mess that is the code I used to get there xD |
| 16:40:58 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 16:42:34 | → | lavaman joins (~lavaman@98.38.249.169) |
| 16:44:43 | <sprout_> | yah, I don't feel cleaning up the code either... |
| 16:45:01 | <merijn> | oh, now that I have a working solution that part is fairly easy |
| 16:45:17 | <merijn> | Main problem is that I took a lot of shortcuts violating my own rules :p |
| 16:45:24 | <sprout_> | with me it's just moving the packing/unpacking around |
| 16:45:55 | <merijn> | I need to get all the error handling fixed |
| 16:46:19 | <sprout_> | I worked incrementally towards a solution but in the end it's just creating a 'word -> word' and 'word -> int' mapping |
| 16:47:06 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 16:47:12 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 16:47:15 | <sprout_> | the idea is that you only need to create the 'word -> word' permutation map once |
| 16:47:21 | <sprout_> | then it's easy |
| 16:48:09 | <merijn> | Well yeah, but still :p |
| 16:48:53 | <c_wraith> | .... holy crap. after all that time I spent on it last night, I just figured out how to do it as dumb as rocks but actually easy to code. |
| 16:49:44 | <merijn> | c_wraith: My solution isn't super complicated (any more), but I wouldn't call my final solution dumb as rocks, so I'm curious what the dumb as rocks solution is |
| 16:49:48 | <c_wraith> | ... that should have taken me 15 minutes, not the roughly 23 it's going to end up |
| 16:49:55 | <c_wraith> | 23 *hours*, that is |
| 16:50:18 | <c_wraith> | I'll send you a private message |
| 16:51:49 | <darchitect> | I've heard Simon Payton talk about elegant internal language which Haskell compiles down to |
| 16:52:03 | <darchitect> | (presumably lambda calc) |
| 16:52:20 | <darchitect> | does anyone know how to get this representation from ghc ? (for learning purposes) |
| 16:52:21 | <c_wraith> | there are a few levels of internal languages GHC uses |
| 16:52:26 | <c_wraith> | he probably was talking about core |
| 16:52:42 | <merijn> | I would assume he was talking about System F_omega in a talk |
| 16:52:56 | <c_wraith> | well, that the elegant language that core aspires to be :) |
| 16:53:01 | <c_wraith> | *that's |
| 16:53:39 | <darchitect> | I am currently going through the Haskell Book and the first chapter is on lambda calculus, which made me think about my programs in a rather different way |
| 16:54:16 | <darchitect> | and was wondering if I can get a haskell proram to compile down to pure lambda calc |
| 16:54:23 | <darchitect> | but I guess that's not the case ? |
| 16:54:31 | → | neverfindme joins (~hayden@158.123.160.43) |
| 16:54:38 | → | lavaman joins (~lavaman@98.38.249.169) |
| 16:55:11 | <shapr> | darchitect: you could produce STG ? https://github.com/quchen/stgi |
| 16:55:24 | <merijn> | darchitect: tbh, mostly it is. Not to the simply-typed/untyped lambda calculus shown in the Haskell Book |
| 16:55:31 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:55:51 | <monochrom> | "pure lambda calculus" does not have built-in integers, it uses huge functions to mimick huge integers. It is utterly impractical to compile Haskell or any useful language to "pure lambda calculus". |
| 16:56:10 | <merijn> | Well, depends on how you define "pure" lambda calculus |
| 16:56:38 | <monochrom> | Sure, but "the Haskell Book" is cited. We all know what's in its Chapter 1. Or rather, what's not in. |
| 16:57:11 | <darchitect> | yeah yeah there is a mention in the book where they say you can derive numbers with lambda calculus but it was ommited |
| 16:57:17 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 16:57:30 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 16:57:33 | <merijn> | darchitect: I mean, compiling to untyped lambda calculus is fairly straightforward, but rather impractical, so nobody bothers with that |
| 16:57:42 | <monochrom> | But if you allow yourself to add integers and characters and user-defined data types, GHC does that. |
| 16:58:10 | → | dmenz joins (~dmenz@2804:14d:5cd4:5e94::d) |
| 16:58:47 | <monochrom> | I mean if you allow a practical lambda calculus that already comes with those types. |
| 16:59:01 | <darchitect> | yeah I don't have any restrictions just want to play around with the ideas from Chapter 1 and see how they are represented in Haskell |
| 16:59:18 | <darchitect> | can you give me an example representation of a simple haskell program ? |
| 17:00:46 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 17:00:50 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:01:27 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 17:02:22 | <merijn> | tbh, I'm not really sure how to answer that :) |
| 17:02:30 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 17:02:37 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:c8d5:dc72:c642:445d) |
| 17:04:34 | <darchitect> | yeah, no worries I reckon the question is a bit vague anyway :d |
| 17:04:47 | → | Dansk31 joins (~Dansk31@147.114.141.88.rev.sfr.net) |
| 17:05:03 | <darchitect> | nothing important, I just wanted to see if someone has done it before |
| 17:05:36 | <merijn> | darchitect: So one insight is that there isn't really a single "lambda calculus" |
| 17:05:57 | <merijn> | darchitect: Instead there's nearly infinite different lambda calculi based around the rough ideas |
| 17:06:04 | <darchitect> | o.O |
| 17:06:05 | <boxscape> | darchitect: Church encodings are one way to encode data in lambda calculus, but Haskell doesn't actually use it - it has a way to construct data types build in on top of lambda calculus, since it's more efficient https://en.wikipedia.org/wiki/Church_encoding#Church_numerals |
| 17:06:15 | <merijn> | iirc, Haskell Book mostly deals with the "untyped lambda calculus" |
| 17:06:21 | <boxscape> | I guess monochrom more or less said that |
| 17:06:30 | <monochrom> | (There is not even a single "the set of all natural numbers". There are two.) |
| 17:06:51 | <merijn> | darchitect: But there's the Simply Typed Lambda Calculus, etc. All variations of the base idea of the untyped one extended with more toys |
| 17:06:54 | <monochrom> | (More practically, there is not a single "C language" either.) |
| 17:07:07 | <darchitect> | haha thanks guys |
| 17:07:08 | <merijn> | darchitect: The untyped LC is the most popular because it has the smallest number of primitives |
| 17:07:11 | <darchitect> | will look into both |
| 17:07:14 | <darchitect> | of the above |
| 17:07:18 | <merijn> | darchitect: Which makes it mathematically easy to deal with |
| 17:07:19 | <boxscape> | darchitect: you can also compile a program with -ddump-simpl to see the intermediate representation in the Core language (which SPJ was likely talking about), but it's not super readable, since it's not meant for human consumption |
| 17:07:27 | × | dsrt^ quits (~dsrt@wsip-98-188-240-142.mc.at.cox.net) (Ping timeout: 268 seconds) |
| 17:07:35 | <merijn> | darchitect: But also makes it *hopelessly* painful for actual, you know, computation |
| 17:07:50 | <monochrom> | This is what happens to social constructs. https://xkcd.com/927/ |
| 17:08:02 | <darchitect> | ... should have joined irc earlier in my life |
| 17:08:04 | <merijn> | darchitect: So you get ideas like "well, what if instead of having just lambdas and applications, we also have numbers and operations on them?" |
| 17:08:23 | <merijn> | darchitect: You *can* implement numbers and math using just untyped LC, but that sucks |
| 17:09:04 | <darchitect> | got it |
| 17:09:08 | <darchitect> | thanks again |
| 17:09:35 | <merijn> | whereas untyped LC + numbers is drastically more efficient with only a fairly small number of extra primitives. In the end "System F_omega" is the language GHC uses internally, which is a lambda calculus that's extended with a whole bunch of stuff like datatypes, types, and what not |
| 17:09:54 | <merijn> | darchitect: But it still looks a hell of a lot like the untyped LC if you squint a bit |
| 17:10:19 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:c8d5:dc72:c642:445d) (Quit: gone to sleep. ZZZzzz…) |
| 17:10:34 | <merijn> | And converting it into untyped LC basically just means finding LC translations for the extra/added primitives (which we know is doable, we just cannot be bothered) |
| 17:11:12 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:11:23 | <__monty__> | >.< Introduced a newline in my input and suddenly my combinator parser required over 10 GB of memory (killed) : s |
| 17:11:23 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 17:11:59 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 17:12:22 | <monochrom> | \∩/ O(1)-input DoS attacks |
| 17:12:56 | <__monty__> | This is a bit of a sobering experience tbh. I thought I had *some* grasp of parser combinators. |
| 17:13:26 | <__monty__> | Dunning-Kruger effect eliminated. |
| 17:13:27 | <Dansk31> | Hi, are IRC channels the best way to chat anonymously ? |
| 17:13:51 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 17:13:52 | → | nfd joins (~nfd@user/nfd) |
| 17:13:54 | <monochrom> | Do you absolutely need "best" or is good enough good enough? |
| 17:13:55 | <merijn> | Define anonymously |
| 17:14:00 | <__monty__> | Dansk31: Really not the right channel for such a question. Depends a lot on your definition of anonymous. |
| 17:14:26 | <monochrom> | IRC is good enough. I don't know what "best" means. |
| 17:14:36 | <monochrom> | Err, I know. The best way to win is not to play. |
| 17:14:48 | → | bollu joins (uid233390@id-233390.helmsley.irccloud.com) |
| 17:14:53 | <monochrom> | Indeed, I don't even have a Facebook account. |
| 17:15:41 | × | boxscape_ quits (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Quit: Connection closed) |
| 17:16:10 | × | neverfindme quits (~hayden@158.123.160.43) (Remote host closed the connection) |
| 17:16:28 | → | neverfindme joins (~hayden@158.123.160.43) |
| 17:19:39 | × | polezaivsani quits (~polezaivs@orangeshoelaces.net) (Remote host closed the connection) |
| 17:20:46 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 17:21:29 | × | neverfindme quits (~hayden@158.123.160.43) (Remote host closed the connection) |
| 17:21:48 | → | neverfindme joins (~hayden@158.123.160.43) |
| 17:23:06 | × | srk quits (~sorki@user/srk) (Remote host closed the connection) |
| 17:23:21 | → | doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
| 17:23:24 | → | srk joins (~sorki@user/srk) |
| 17:23:47 | <Dansk31> | Thank you for your answers ! |
| 17:24:06 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 17:24:53 | → | polezaivsani joins (~polezaivs@orangeshoelaces.net) |
| 17:26:27 | → | nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
| 17:26:44 | × | nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Client Quit) |
| 17:27:04 | → | nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
| 17:27:19 | <oats> | the best way to chat anonymously is in-person, in a soundproofed faraday cage |
| 17:27:45 | <geekosaur> | define anonymously |
| 17:28:13 | <oats> | oh wait anonymously, I interpreted that as "securely" somehow |
| 17:28:19 | <geekosaur> | that5's not so much anonymous as untappabvle. anonymous probably means the other person doesn't know who you are, which that fails on |
| 17:28:25 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 17:28:39 | <oats> | the best way to chat anonymously is message-in-a-bottle |
| 17:29:14 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 17:30:46 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 17:32:07 | × | CiaoSen quits (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 17:32:09 | <geekosaur> | anyway I would say IRC is not particularly anonymous, although you can provide any user info you want other people can see things like the server's idea of your IP address (unless you have a cloak, but then IRC ops know your IP address and possibly other information for you to get that cloak) |
| 17:32:45 | <geekosaur> | there might be e.g. discord servers oriented around anonymity |
| 17:33:31 | <Dansk31> | Yep I will check that |
| 17:33:36 | <Franciman> | don't they get banned? |
| 17:33:41 | → | zhakupov joins (~zhakupov@static.90.189.158.74.sinor.ru) |
| 17:33:41 | × | alx741 quits (~alx741@186.178.108.192) (Quit: alx741) |
| 17:33:53 | × | Dansk31 quits (~Dansk31@147.114.141.88.rev.sfr.net) () |
| 17:34:59 | <geekosaur> | federated discord servers likely, but I imagine there are others |
| 17:35:21 | <geekosaur> | or servers federated into networks around anonymity |
| 17:38:28 | → | emf joins (~emf@2603-6080-9403-11bf-0000-0000-0000-0007.res6.spectrum.com) |
| 17:40:06 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 17:40:22 | → | emf_ joins (~emf@2620:10d:c091:480::1:7b30) |
| 17:41:02 | × | emf quits (~emf@2603-6080-9403-11bf-0000-0000-0000-0007.res6.spectrum.com) (Read error: Connection reset by peer) |
| 17:42:58 | → | Dansk31 joins (~Dansk31@147.114.141.88.rev.sfr.net) |
| 17:44:26 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:d0b4:48a4:6b63:b6a2) (Remote host closed the connection) |
| 17:45:49 | → | Guest48 joins (~Guest48@wireless-student-pt3-241-129.lut.ac.uk) |
| 17:46:03 | <Guest48> | Hey, is this chat still active? |
| 17:46:14 | <geekosaur> | yes? |
| 17:46:32 | <DigitalKiwi> | no, never |
| 17:47:09 | <DigitalKiwi> | don't listen to geekosaur or any of the other 700+ people that might say otherwise |
| 17:47:10 | × | Guest48 quits (~Guest48@wireless-student-pt3-241-129.lut.ac.uk) (Client Quit) |
| 17:47:53 | <sm> | shhh |
| 17:47:53 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 17:49:01 | × | neverfindme quits (~hayden@158.123.160.43) (Ping timeout: 240 seconds) |
| 17:49:23 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 17:50:25 | → | neverfindme joins (~hayden@158.123.160.43) |
| 17:50:29 | → | zer0bitz_ joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) |
| 17:52:07 | × | neverfindme quits (~hayden@158.123.160.43) (Client Quit) |
| 17:52:13 | × | zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Ping timeout: 240 seconds) |
| 17:52:18 | × | Dansk31 quits (~Dansk31@147.114.141.88.rev.sfr.net) () |
| 17:55:49 | → | lavaman joins (~lavaman@98.38.249.169) |
| 17:57:35 | <DigitalKiwi> | i have been shhh'd twice by as many people in 10 minutes |
| 17:57:41 | <DigitalKiwi> | apparently i'm being onery today |
| 18:01:33 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 18:02:18 | zer0bitz_ | is now known as zer0bitz |
| 18:03:14 | → | simendsjo joins (~user@84.211.91.241) |
| 18:04:05 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 18:05:45 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 18:06:21 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 18:07:17 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 18:07:38 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 18:09:41 | <EvanR> | am I on the right track that learning logic programming would have applications to day 8 of AoC |
| 18:12:29 | → | georgy joins (~bc8165b6@cerf.good1.com) |
| 18:14:24 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 265 seconds) |
| 18:14:32 | → | alx741 joins (~alx741@186.178.108.192) |
| 18:16:03 | → | AlainJourez[m] joins (~sherekahn@2001:470:69fc:105::1:4a71) |
| 18:17:28 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 18:17:31 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 18:17:37 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 18:18:09 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 18:18:44 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:10e5:165:b849:664a) |
| 18:20:51 | <tomsmeding> | I find it funny that Guest48 immediately left after getting that response |
| 18:22:15 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 18:23:17 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Remote host closed the connection) |
| 18:23:26 | <johnjay> | i mean. you told him not to listen to geekosaur at all |
| 18:23:51 | <johnjay> | i guess he won't get help now! |
| 18:25:10 | → | econo joins (uid147250@user/econo) |
| 18:25:49 | <shapr> | tomsmeding: maybe they were disappointed? |
| 18:26:00 | <tomsmeding> | that the chat was active? |
| 18:26:05 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:26:10 | <tomsmeding> | I mean, they got replies from two different people within 2 minutes |
| 18:26:13 | <tomsmeding> | sounds active |
| 18:26:24 | <tomsmeding> | contents of the replies notwithstanding :) |
| 18:26:27 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 18:26:38 | <monochrom> | I doubt that they were even looking for Haskell chat. |
| 18:27:27 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 18:27:51 | × | ProofTechnique quits (sid79547@5.254.36.60) (Ping timeout: 245 seconds) |
| 18:27:51 | × | integral quits (sid296274@user/integral) (Ping timeout: 245 seconds) |
| 18:27:51 | × | nrr__ quits (sid20938@lymington.irccloud.com) (Ping timeout: 245 seconds) |
| 18:27:51 | × | alanz quits (sid110616@uxbridge.irccloud.com) (Ping timeout: 245 seconds) |
| 18:27:51 | × | agander_m quits (sid407952@tinside.irccloud.com) (Ping timeout: 245 seconds) |
| 18:28:11 | × | jonrh quits (sid5185@ilkley.irccloud.com) (Read error: Connection reset by peer) |
| 18:28:12 | × | aria quits (sid380617@lymington.irccloud.com) (Read error: Connection reset by peer) |
| 18:28:16 | × | systemfault quits (sid267009@uxbridge.irccloud.com) (Ping timeout: 245 seconds) |
| 18:28:16 | × | gmc_ quits (sid58314@ilkley.irccloud.com) (Ping timeout: 245 seconds) |
| 18:28:16 | × | cln quits (sid336875@ilkley.irccloud.com) (Ping timeout: 245 seconds) |
| 18:28:24 | × | alinab quits (sid468903@helmsley.irccloud.com) (Read error: Connection reset by peer) |
| 18:28:32 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 18:28:40 | × | truckasaurus quits (sid457088@helmsley.irccloud.com) (Read error: Connection reset by peer) |
| 18:29:00 | → | truckasaurus joins (sid457088@id-457088.helmsley.irccloud.com) |
| 18:29:07 | → | integral joins (sid296274@user/integral) |
| 18:29:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:29:08 | → | gmc_ joins (sid58314@id-58314.ilkley.irccloud.com) |
| 18:29:10 | → | alanz joins (sid110616@id-110616.uxbridge.irccloud.com) |
| 18:29:12 | → | jonrh joins (sid5185@id-5185.ilkley.irccloud.com) |
| 18:29:12 | → | aria joins (sid380617@id-380617.lymington.irccloud.com) |
| 18:29:13 | → | agander_m joins (sid407952@id-407952.tinside.irccloud.com) |
| 18:29:13 | → | cln joins (sid336875@id-336875.ilkley.irccloud.com) |
| 18:29:13 | → | systemfault joins (sid267009@id-267009.uxbridge.irccloud.com) |
| 18:29:14 | → | alinab joins (sid468903@id-468903.helmsley.irccloud.com) |
| 18:29:28 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 18:29:31 | → | nrr__ joins (sid20938@id-20938.lymington.irccloud.com) |
| 18:30:04 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 18:30:08 | → | ProofTechnique joins (sid79547@id-79547.ilkley.irccloud.com) |
| 18:30:18 | gmc_ | is now known as gmc |
| 18:31:12 | × | kuribas quits (~user@ptr-25vy0i9qa16kzbd65yl.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 18:31:52 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:31:52 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 18:31:52 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:34:21 | × | zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 18:35:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 18:35:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:35:55 | <dsal> | EvanR: list monad is pretty easy |
| 18:36:10 | <EvanR> | :thonk: |
| 18:36:42 | → | zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) |
| 18:40:22 | × | yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 18:42:56 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 18:43:02 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 18:43:32 | × | SrPx quits (sid108780@id-108780.uxbridge.irccloud.com) (Ping timeout: 240 seconds) |
| 18:46:44 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 18:46:56 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:47:14 | → | SrPx joins (sid108780@id-108780.uxbridge.irccloud.com) |
| 18:47:50 | × | dmenz quits (~dmenz@2804:14d:5cd4:5e94::d) (Ping timeout: 252 seconds) |
| 18:47:55 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 18:48:13 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection) |
| 18:51:41 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 18:51:54 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 18:51:59 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 18:52:13 | × | deadmarshal quits (~deadmarsh@95.38.228.30) (Ping timeout: 240 seconds) |
| 18:54:08 | <glguy> | dminuoso: https://hackage.haskell.org/package/config-value-0.8.2/changelog |
| 18:54:59 | <tomsmeding> | merijn: day 8 was so easy, part 2 worked on the first compile |
| 18:55:48 | <tomsmeding> | takes 80ms though, probably got c_wraith's "dumb" solution |
| 18:55:57 | <tomsmeding> | hint: 7! is not that large |
| 18:56:15 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 18:56:31 | <dsal> | I'm not entirely sure why mine's so slow. Guess I should profile. It's taking me around 4s on the big input. |
| 18:56:33 | <merijn> | tomsmeding: Yes, but I took offensive to brute force |
| 18:56:42 | <tomsmeding> | :p can relate |
| 18:56:44 | <merijn> | tomsmeding: Which was also c_wraith's solution |
| 18:57:07 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 18:57:10 | <merijn> | tomsmeding: I've got a working (and mostly) cleaned up version which doesn't result to brute force |
| 18:57:22 | <tomsmeding> | cool! |
| 18:57:49 | <merijn> | tomsmeding: (spoilers, obviously) https://github.com/merijn/AdventOfCode/blob/master/Day8.hs |
| 18:58:01 | <tomsmeding> | merijn: (also spoilers) https://git.tomsmeding.com/AOC/tree/2021/8.hs |
| 18:58:08 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 18:58:13 | <merijn> | tomsmeding: Mostly I wanna still clean up simplifyConstraints which currently will just loop infinitely if there's an input with no solutions |
| 18:58:14 | <jkaye> | AoC spoiler question: were there any math-based (or inductive) solutions to today's AoC puzzle? I solved it using a simple rule-based deduction, but I'm thinking there was probably something more elegant |
| 18:58:15 | <tomsmeding> | well, less I gues |
| 18:59:05 | <merijn> | jkaye: I did constraint solving without any hard coded rules |
| 18:59:27 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:59:27 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 18:59:27 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:59:59 | <merijn> | I guess I should also remove the hack solution for the 1st part |
| 19:01:16 | <merijn> | Since it can trivially be reformulated using my current solution |
| 19:01:59 | <bitmapper> | anyone have any ideas of how to do a membership constraint on type level lists? i did this https://gist.github.com/bitmappergit/dccfbce2ff7ca2bc66d51be187f77928 |
| 19:02:35 | <jkaye> | Interesting |
| 19:02:37 | × | max22- quits (~maxime@2a01cb088335980011e17f1477c78e4b.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds) |
| 19:02:50 | <merijn> | jkaye: You can check my link from earlier (spoilers, obviously) |
| 19:02:57 | <dsal> | build with --profile doesn't work on my mac, so I guess I'll profile on LInux |
| 19:02:57 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 19:03:14 | <EvanR> | bitmapper, yes there's a type class based way to say it, I recall from looking at one of the libs |
| 19:03:23 | <merijn> | dsal: Hmm? How/where are you specifying --profile? |
| 19:03:28 | <jkaye> | I basically just wrote a bitwise rule for each number, realizing that regardless of order/value, the bitwise relationships between the numbers always hold |
| 19:03:34 | <merijn> | dsal: Works fine on my mac |
| 19:03:49 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 19:03:58 | <jkaye> | I'll stop now so I don't spoil it for anyone |
| 19:04:01 | <jkaye> | Thanks for sharing |
| 19:04:06 | <monochrom> | There is no single "mac"... >:) |
| 19:04:20 | <EvanR> | for day 8 I made it play clue |
| 19:04:22 | <merijn> | monochrom: Well, hence the question of "how/where" |
| 19:04:35 | tomsmeding | is too tired/lazy to fully understand merijn's code |
| 19:04:37 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 19:04:37 | <dsal> | merijn: `stack build --profile` |
| 19:04:38 | <merijn> | Clearly today's puzzle was just to make the prolog programmers happy :p |
| 19:04:42 | <EvanR> | ^ |
| 19:04:45 | <dsal> | I'm not going to look into it just yet. |
| 19:04:49 | <merijn> | dsal: Shouldn't that be "--enable-profiling"? |
| 19:04:55 | <tomsmeding> | isn't that cabal |
| 19:05:12 | <dsal> | merijn: I think it works typically. It's failing to compile some dependencies. |
| 19:05:15 | <merijn> | tomsmeding: Sure, but that flag is interpreted by Cabal, so non-zero chance of the same in stack :p |
| 19:05:24 | <tomsmeding> | ah |
| 19:05:24 | <merijn> | dsal: could be, I don't use stack :p |
| 19:05:31 | <dsal> | colour > Could not find module ‘Prelude’ |
| 19:05:31 | <dsal> | colour > Perhaps you haven't installed the profiling libraries for package ‘base-4.14.3.0’? |
| 19:05:34 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 19:05:37 | <dsal> | No idea what led to that thing. |
| 19:05:37 | <tomsmeding> | '--profile' has worked for me before |
| 19:05:44 | <tomsmeding> | dsal: how have you installed haskell, system package manager? |
| 19:05:46 | <merijn> | dsal: oh, you have broken GHC install without profiling libs |
| 19:05:46 | <tomsmeding> | use ghcup instead |
| 19:05:48 | <monochrom> | I have long learned to stop guessing how to use stack. |
| 19:05:52 | <dsal> | tomsmeding: Everything insane. :) |
| 19:05:58 | <bitmapper> | merijn: hahaha i was considering pulling out curry! |
| 19:06:00 | <dsal> | The only stuff that works for me right now is nix + stack, and just barely. |
| 19:06:14 | <tomsmeding> | oh wait this is stack of course |
| 19:06:20 | tomsmeding | flees from nix |
| 19:06:48 | <tomsmeding> | but yeah your ghc installation is broken and misses profiling libs |
| 19:06:52 | <merijn> | dsal: If base has no profiling libs, then your GHC install is one without profiling libs, which means either stack or Nix installed a GHC without profiling libs and screwed you |
| 19:07:00 | <tomsmeding> | ^ |
| 19:07:03 | <dsal> | ah, that makes sense. |
| 19:07:17 | <dsal> | I used to have this working, and then nothing worked at all, and then it started working some. So maybe it's not done yet. |
| 19:07:55 | <monochrom> | Is your mac an arm mac, not an intel mac? |
| 19:07:58 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:08:12 | <dsal> | Yes, it's the fanciest ARM |
| 19:08:36 | <dsal> | Chip: Apple M1 Max Total Number of Cores: 10 (8 performance and 2 efficiency) |
| 19:08:55 | <merijn> | I'm glad I'm not you :D |
| 19:08:57 | <dsal> | When I got it, I was having to run all the intel builds. |
| 19:09:13 | <dsal> | My linux machine is pretty plain and boring. It's building all the things right now. |
| 19:09:34 | <merijn> | tbh, it's great that Apple is forcing large parts of tech to support something other than Intel |
| 19:09:47 | <merijn> | But I'm happy I'm not trying to be on that cutting edge xD |
| 19:09:51 | <dsal> | I really like almost everything, but transitions are rough. |
| 19:10:05 | <dsal> | I can run Ableton Live built natively as long as I don't want most of my plugins to work. |
| 19:10:21 | <janus> | amazon is offering gravitron (or whatever its called) too |
| 19:10:28 | <janus> | risc-v is picking up steam |
| 19:10:34 | <dsal> | Oh neat. |
| 19:10:46 | janus | refuses to accept that apple is improving anything :P |
| 19:11:05 | <dsal> | I used to run all my stuff at home on weird ARM-based Linux machines that had almost no support for anything and could build stuff. I'd do GHC builds under QEMU just to get a program I could run on the things. |
| 19:13:18 | <joeyh> | did ghc 9.0.1 change something about forall embedded inside a type, eg type Foo = forall a. (Bar -> a) -> a |
| 19:13:35 | <DigitalKiwi> | hey joeyh! |
| 19:13:39 | <joeyh> | I had to expand such a Foo to make it accept it in a type signature, where it was accepted before |
| 19:13:41 | <joeyh> | hello |
| 19:13:48 | <tomsmeding> | yes, keyword is "simplified subsumption" |
| 19:14:06 | <tomsmeding> | or, hm, you're talking about types |
| 19:14:15 | <DigitalKiwi> | joeyh: how's your arduino project? |
| 19:14:29 | <tomsmeding> | yuo mean expanding the type signature, or having to eta-expand terms of that type? |
| 19:14:48 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 19:15:08 | → | deadmarshal joins (~deadmarsh@95.38.228.30) |
| 19:15:19 | <monochrom> | Still, take a look at "simplified subsumption". |
| 19:15:26 | <joeyh> | tomsmeding: I mean I expanded foo :: X -> Foo to foo :: forall a. X -> (Bar -> a) -> a |
| 19:15:55 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 19:16:12 | <monochrom> | "Did it change something about forall in type aliases?" may be barking up the wrong tree because the other tree is the use site of your type alias. |
| 19:16:13 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 19:16:59 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 19:17:03 | <joeyh> | DigitalKiwi: it works. I've been thinking about expanding the idea to https://zephyrproject.org/ to support a lot more boards |
| 19:17:08 | <tomsmeding> | joeyh: if I write 'data Bar' ; 'type Foo = forall a. (Bar -> a) -> a' ; 'foo :: Int -> Foo; foo = undefined' then ghci-9.0 shouts at me. If I instead write 'foo _ = undefined' then all is fine |
| 19:17:17 | <monochrom> | One of the things simplified subsumption explicitly talks about is that "X -> forall a. Y" is no longer indistinguishable from "forall a. X -> Y" |
| 19:17:28 | <DigitalKiwi> | joeyh: i haven't played with it in a while i should again |
| 19:17:53 | <joeyh> | tomsmeding: sounds like what I sa |
| 19:18:05 | <tomsmeding> | so the point is not the type, but having to eta-expand foo |
| 19:18:08 | <monochrom> | which is going to affect type aliases because if you say "type T = forall a. Y" then it means "X -> T" is distinguishable from "forall a. X -> Y" |
| 19:18:19 | <tomsmeding> | so this actually is the effect of simplified subsumption |
| 19:18:33 | <tomsmeding> | oh, what monochrom says |
| 19:18:54 | <joeyh> | ok, seems intentional breakage then |
| 19:18:59 | <tomsmeding> | yes |
| 19:19:10 | <tomsmeding> | but (almost) always fixable using eta expansion |
| 19:19:12 | <monochrom> | But it is not like, technically strictly speaking, changing the semantics and legality of "type T = forall a. Y". No change there. |
| 19:20:23 | <DigitalKiwi> | https://hackage.haskell.org/package/arduino-copilot for observers wondering what joeyh and i are talking about |
| 19:20:37 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
| 19:21:06 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds) |
| 19:21:10 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 19:21:36 | <joeyh> | DigitalKiwi: I think that copilot is supposed to be getting some better support for typing in the DSL eventually, eg phantom types or something like that. The main thing I feel it needs to be more useful |
| 19:22:46 | <DigitalKiwi> | https://www.dropbox.com/s/2czxqdv8yddll0e/2020-02-27%2011.57.04.mp4?dl=0 this arduino was programmed with haskell |
| 19:23:54 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:25:34 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 19:26:49 | × | nfd quits (~nfd@user/nfd) (Ping timeout: 268 seconds) |
| 19:27:23 | <joeyh> | in arduino-copilot? code would be: main = arduino $ do { b <- input pin12; led := b; pin13 := b } |
| 19:28:11 | → | nfd joins (~nfd@user/nfd) |
| 19:29:44 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 19:30:56 | <dsal> | I'm really surprised parMap isn't using a lot more cores. |
| 19:31:25 | <dsal> | Do I need to do something to make it parMap harder? |
| 19:33:43 | → | rusty joins (~rustyboy@2a02:2f0e:5610:ab00:b16b:f583:26df:4061) |
| 19:34:07 | × | jippiedoe quits (~david@2a02-a44c-e14e-1-3090-ba98-2dba-9449.fixed6.kpn.net) (Quit: Leaving) |
| 19:35:01 | <dsal> | It speeds stuff up in the small case, but not the large case. Really weird. |
| 19:40:00 | × | Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 19:42:29 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:45:48 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:46:01 | <oats> | folds are fun, but sometimes you just wanna `go` |
| 19:47:09 | <monochrom> | haha |
| 19:47:32 | → | gaff joins (~gaff@49.207.205.24) |
| 19:47:40 | × | gaff quits (~gaff@49.207.205.24) (Client Quit) |
| 19:48:52 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:49:02 | × | k60`` quits (~user@94.25.169.9) (Ping timeout: 256 seconds) |
| 19:50:06 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 19:52:50 | <dminuoso> | tomsmeding: https://gist.github.com/dminuoso/ea39c159219afcb4ba56fef01307da12 |
| 19:52:53 | <dminuoso> | This is a small reproducer |
| 19:54:39 | <tomsmeding> | dsal: using sufficiently high +RTS -N? Are your threads allocating once in a while? |
| 19:55:45 | → | k60`` joins (~user@static.100.218.46.78.clients.your-server.de) |
| 19:57:52 | <tomsmeding> | dminuoso: you need some -XDataKinds :p |
| 19:58:06 | <dminuoso> | tomsmeding: Uh, my copy paste skills elude me. |
| 19:58:18 | <dminuoso> | Guess I wasnt entirely scrolled up in my editor there |
| 20:01:18 | → | jonas39 joins (~jonas@pool-108-49-252-36.bstnma.fios.verizon.net) |
| 20:01:50 | <jonas39> | Is it accurate to say that monads are an abstraction on function composition? |
| 20:02:00 | <tomsmeding> | dminuoso: and what's your question about this? why this error or how to fix it nicely? |
| 20:02:27 | <c_wraith> | jonas39: it's more accurate to say that monads are a generalization of function composition |
| 20:02:47 | <c_wraith> | jonas39: or rather that Kleisli categories are, but those are the same thing as monads |
| 20:02:57 | <dminuoso> | tomsmeding: So its funny, as I was staring at it, I begin to realize why I had so much confusion at the end. |
| 20:03:14 | <dminuoso> | There was a spurious AllowAmbiguousTypes, which made me scratch my head so much.. |
| 20:03:30 | <tomsmeding> | which allows the definition but postpones the trouble to call time :p |
| 20:04:17 | <jonas39> | c_wraith: I realized this after learning about kleisli arrows. It is becoming more clear now thanks. |
| 20:04:29 | <dminuoso> | tomsmeding: Right! So roughly what I had was another function `f :: Sel Char -> String; f sel = doc sel`, and GHC kept giving me ambiguitiy errors on `doc sel` |
| 20:04:48 | <dminuoso> | And it seemed to make absolutely no sense, because my `Sel` was already monomorphizeable |
| 20:05:15 | <dminuoso> | Hold on.. |
| 20:05:17 | <dminuoso> | No this works. |
| 20:05:19 | <dminuoso> | Okay Im baffled now. |
| 20:05:28 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 256 seconds) |
| 20:06:13 | <tomsmeding> | doesn't seem to typecheck for me |
| 20:06:16 | <tomsmeding> | even with AAT |
| 20:06:31 | <dminuoso> | Hold on |
| 20:06:48 | → | juhp joins (~juhp@128.106.188.82) |
| 20:06:49 | <dminuoso> | Try this https://gist.github.com/dminuoso/6b9181446eaffac9ceb0771a0e013d3b |
| 20:07:00 | → | mrckndt8 joins (~mrckndt@user/mrckndt) |
| 20:07:00 | <dminuoso> | I mean it seems obvious that this should even type check |
| 20:07:14 | × | jonas39 quits (~jonas@pool-108-49-252-36.bstnma.fios.verizon.net) (Quit: Client closed) |
| 20:07:40 | → | tired- joins (~tired@user/tired) |
| 20:07:44 | → | exarkun_ joins (~exarkun@user/exarkun) |
| 20:08:04 | → | acro_ joins (~acro@user/acro) |
| 20:08:23 | <tomsmeding> | dminuoso: that also typechecks without AAT for me |
| 20:09:41 | <tomsmeding> | dminuoso: added some Proxy to your previous paste https://paste.tomsmeding.com/75qOA3xD |
| 20:09:49 | <tomsmeding> | oh crap wrong code |
| 20:09:54 | → | tristanC_ joins (~tristanC@163.172.94.116) |
| 20:10:10 | <tomsmeding> | dminuoso: this one https://paste.tomsmeding.com/gPdxCvQ6 |
| 20:10:24 | → | df_ joins (~ben@justworks.xyz) |
| 20:10:35 | → | platz_ joins (~platz@40.122.118.113) |
| 20:10:42 | → | Ankhers_ joins (~Ankhers@ec2-54-196-233-138.compute-1.amazonaws.com) |
| 20:11:23 | <dminuoso> | tomsmeding: The reproducer was bad. |
| 20:11:26 | <dminuoso> | Let me try and recreate it again |
| 20:12:51 | × | simendsjo quits (~user@84.211.91.241) (Remote host closed the connection) |
| 20:13:30 | → | relrod_ joins (~relrod@redhat/ansible.staff.relrod) |
| 20:14:30 | × | mrckndt quits (~mrckndt@user/mrckndt) (Quit: Ping timeout (120 seconds)) |
| 20:14:30 | × | tired quits (~tired@user/tired) (Quit: /) |
| 20:14:30 | × | acro quits (~acro@user/acro) (Quit: Bye.) |
| 20:14:30 | × | Ankhers quits (~Ankhers@ec2-54-196-233-138.compute-1.amazonaws.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 20:14:30 | × | w1gz quits (~do@159.89.11.133) (Ping timeout: 260 seconds) |
| 20:14:30 | × | exarkun quits (~exarkun@user/exarkun) (Ping timeout: 260 seconds) |
| 20:14:30 | mrckndt8 | is now known as mrckndt |
| 20:14:30 | × | tristanC quits (~tristanC@user/tristanc) (Ping timeout: 260 seconds) |
| 20:14:31 | × | platz quits (~platz@user/platz) (Ping timeout: 260 seconds) |
| 20:14:31 | × | df quits (~ben@justworks.xyz) (Ping timeout: 260 seconds) |
| 20:14:31 | × | relrod quits (~relrod@redhat/ansible.staff.relrod) (Ping timeout: 260 seconds) |
| 20:14:31 | acro_ | is now known as acro |
| 20:14:31 | Ankhers_ | is now known as Ankhers |
| 20:15:18 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 20:15:27 | → | Akiva joins (~Akiva@user/Akiva) |
| 20:17:01 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 20:18:41 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 20:18:59 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 20:19:38 | × | zhakupov quits (~zhakupov@static.90.189.158.74.sinor.ru) (Ping timeout: 256 seconds) |
| 20:19:41 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Ping timeout: 252 seconds) |
| 20:21:41 | <dminuoso> | tomsmeding: https://gist.github.com/dminuoso/9144f5a72f645896a8a9f7c3d90eb423 |
| 20:22:08 | → | zmt00 joins (~zmt00@user/zmt00) |
| 20:23:03 | <tomsmeding> | I was going b.hs, c.hs locally, now you jump all the way ahead to f, we can't have that |
| 20:23:29 | <dminuoso> | Haha |
| 20:23:39 | <dminuoso> | f.hs is such muscle memory for gist |
| 20:23:57 | <dminuoso> | Let me try and reduce it a bit further |
| 20:25:26 | <dminuoso> | Updated. |
| 20:25:32 | <dminuoso> | yeah, this captures the issue I had very well |
| 20:26:41 | <tomsmeding> | yeah this can be fixed with a proxy |
| 20:26:53 | <tomsmeding> | but indeed ghc can't infer which proxy you mean |
| 20:27:26 | <dminuoso> | I guess by proxy you mean specifying `f (Proxy @Field) sel` right? |
| 20:27:31 | <dminuoso> | It seems the problem is that you end up with: |
| 20:27:38 | <dminuoso> | `Sel () ~ forall. mode. ArgF mode -> Inner mode ()` |
| 20:27:41 | <tomsmeding> | https://paste.tomsmeding.com/KaBp8hul |
| 20:28:04 | <tomsmeding> | oh the ScopedTypeVariables is not needed of course |
| 20:28:13 | <tomsmeding> | was for your earlier, non-reduced example |
| 20:28:24 | <dminuoso> | Or this right |
| 20:28:52 | <dminuoso> | Maybe Im just thrown off by the error message |
| 20:29:05 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 20:29:29 | <tomsmeding> | the issue is that you have a 'sel :: forall mode. ArgF mode -> Inner mode pat', and you're passing it to an argument which has type "forall mode'. ArgF mode' -> Inner mode' pat'" for some pat' |
| 20:30:03 | <tomsmeding> | so GHC has to unify "Inner mode pat" and "Inner mode pat'", but it can't use this unification to deduce anything about pat' because Inner is non-injective |
| 20:31:00 | <tomsmeding> | (recall that a function f is injective if f x = f y => x = y) |
| 20:31:13 | <dminuoso> | Are these two not alpha equivalent? |
| 20:31:34 | <tomsmeding> | sure, you can _choose_ pat' ~ pat and make the constraints work out |
| 20:31:47 | <tomsmeding> | but you have no guarantee that that is the only valid choice for pat' |
| 20:32:00 | <tomsmeding> | because there may be other values for pat' for which Inner mode pat' ~ Inner mode pat |
| 20:32:35 | <tomsmeding> | in fact, I'm indirectly forcing this choice pat' ~ pat by forcing pat' to equal the type parameter of that Proxy, which I set to pat |
| 20:32:41 | <dminuoso> | So I guess one solution would be to newtype Sel intead. |
| 20:32:45 | <tomsmeding> | yes |
| 20:33:12 | <tomsmeding> | that fixes the problem too :p |
| 20:33:23 | <dminuoso> | It seems my naive expectation was constantly "Hey you tool, Im giving you `Sel ()`, and you allow `Sel a`. Work it out!" |
| 20:33:27 | <tomsmeding> | and is probably a nicer solution, depending on the rest of your code |
| 20:33:37 | <tomsmeding> | right, which works for injective type constructors |
| 20:33:40 | <tomsmeding> | but Sel is not |
| 20:33:44 | <tomsmeding> | and newtypes and data types are |
| 20:34:17 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:e6c3:e85f:49be:975c) |
| 20:34:20 | <dminuoso> | tomsmeding: So it seems one other solution would be to fix mode |
| 20:34:31 | <dminuoso> | Because then GHC can resolve the type family, and then do regular plain old unification |
| 20:34:57 | <tomsmeding> | as in, make 'mode' a type parameter to Sel? |
| 20:35:19 | <dminuoso> | No as in: |
| 20:35:41 | <dminuoso> | `f (sel @Field)` |
| 20:35:46 | <dminuoso> | Except for some reason I cant specify that |
| 20:36:31 | <dminuoso> | oh wait |
| 20:36:36 | <dminuoso> | No I begin to see the problem |
| 20:36:59 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 20:37:00 | <dminuoso> | The problem is that `f` demands a polymorphic Sel |
| 20:37:03 | <tomsmeding> | not sure that applies Field to the right type variable |
| 20:37:04 | <dminuoso> | And g has no control over that |
| 20:37:07 | <tomsmeding> | right |
| 20:38:02 | <tomsmeding> | I like the newtype; they are kind of a catch-all solution for type inference issues it seems |
| 20:38:20 | <dminuoso> | newtypes dont work well for my problem domain |
| 20:38:34 | <dminuoso> | Tagged is by far the most ergonomic option |
| 20:38:38 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:38:38 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 20:38:38 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:38:40 | <tomsmeding> | they allow recursive ("infinite") types, and fix type inference surrounding universal quantification and non-injectivity |
| 20:38:45 | <tomsmeding> | ah |
| 20:38:54 | <dminuoso> | tomsmeding: Look at ArgF, do you see why? |
| 20:39:04 | <dminuoso> | Though hold on |
| 20:39:08 | <dminuoso> | Let me give it a try |
| 20:39:14 | <tomsmeding> | 'Sel field1', right? |
| 20:39:23 | <tomsmeding> | or am I brainfarting |
| 20:40:03 | <tomsmeding> | how should I delimit code blocks here on irc |
| 20:40:10 | <tomsmeding> | all the quotes are taken by haskell |
| 20:40:42 | <dminuoso> | tomsmeding: I guess its just mildly annoying that I then have to wrap each field accessor with a newtype. |
| 20:40:44 | <byorgey> | guillemets |
| 20:40:47 | <tomsmeding> | I guess the correct answer is « |
| 20:40:48 | <tomsmeding> | yeah |
| 20:40:51 | <byorgey> | =D |
| 20:41:10 | <tomsmeding> | dminuoso: true |
| 20:41:19 | <geekosaur> | I just use `, it's only ambiguous if the content is a single identifier :) |
| 20:41:37 | <tomsmeding> | but I don't feel like adding a hotkey to my keyboard layout for guillemets :p |
| 20:41:42 | <dminuoso> | tomsmeding: So the two solutions we now have is: newtype on Sel, which means *every* use site has to wrap the selector before passing it around, or we use Tagged + tyfam fundeps, which just imposes a `runTagged` each time you use the `ArgF Descr` style |
| 20:41:48 | <tomsmeding> | geekosaur: true |
| 20:42:01 | <dminuoso> | tomsmeding: Given that the `Field` mode is by far used more, the second approach seems less intrusive |
| 20:42:08 | <dminuoso> | otoh, with newtypes you get far easier diagnostics.. |
| 20:42:17 | exarkun_ | is now known as exarkun |
| 20:42:31 | <tomsmeding> | are you using the selectors as actual selectors as well |
| 20:42:45 | <dminuoso> | Well, only to read fields. |
| 20:42:50 | <tomsmeding> | if not, do the lens thing and define the natural selector names as newtype-wrapped versions of the actual ones |
| 20:42:53 | <tomsmeding> | ah |
| 20:43:06 | <dminuoso> | Let me give you a broad idea what i Have: |
| 20:43:14 | <dminuoso> | To introduce you why I started this whole thing: |
| 20:43:52 | <dminuoso> | tomsmeding: https://gist.github.com/dminuoso/7df4f8ad87906050e08a0c1a0e041234 |
| 20:44:23 | <dminuoso> | Now, I can simply fling a selector around, and the relevant code can first check the authorization, while at the same time logging the correct description using permsDescr |
| 20:44:36 | <dminuoso> | And at the same time, permsDescr is used in the config parser for diagnostics and help output |
| 20:44:44 | <dminuoso> | permTSIGKeyDelete <- optSection' "tsigKeyDelete" auth''spec (descr permTSIGKeyDelete) |
| 20:44:47 | <dminuoso> | Using lines like that |
| 20:44:54 | <tomsmeding> | auth''spec |
| 20:45:02 | <tomsmeding> | but yeah I figured this was for automatic documentation |
| 20:45:13 | <tomsmeding> | or, automatic description of the fields |
| 20:45:17 | <dminuoso> | Indeed. |
| 20:45:53 | <tomsmeding> | so where would the Tagged go exactly, again? |
| 20:46:26 | <dminuoso> | type family Inner tag field = r | r -> tag field where Inner Field f = Maybe f; Inner Descr f = Tagged f T.Text |
| 20:46:32 | <dminuoso> | Note, that by using Tagged we can make the tyfam injective |
| 20:46:41 | <dsal> | tomsmeding: Yeah, I think so, just -N. It seems like an ideal parallel case, but only half my cores spin up. |
| 20:46:43 | → | pfurla_ joins (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) |
| 20:47:05 | <tomsmeding> | dsal: check if your computations allocate |
| 20:47:11 | <dminuoso> | tomsmeding: ah hold on, this gist is mispaste because emacs had a non-reverted buffer |
| 20:47:20 | <tomsmeding> | if a computation doesn't allocate, it doesn't yield to the scheduler, and stuff gets locked up and no more threads get spawned |
| 20:47:51 | <tomsmeding> | I fought with this a while ago, though I had N-1 threads instead of N/2 |
| 20:47:57 | <dminuoso> | tomsmeding: Its updated. |
| 20:48:08 | <tomsmeding> | so the "solution" (read: workaround) was -N$(($(njobs) + 1)) |
| 20:48:25 | <monochrom> | But parMap uses sparks. Do they work differently from threads? |
| 20:48:31 | <dminuoso> | tomsmeding: Also note that Authorization'' is where auth''spec comes from. :p |
| 20:49:14 | <tomsmeding> | monochrom: I wasn't able to get reliably N threads with -N N when I tried a few months ago, in any way whatsoever, if the computations don't allocate often |
| 20:49:43 | × | pfurla_ quits (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) (Client Quit) |
| 20:50:01 | <dsal> | I'm definitely allocating in the work. |
| 20:50:12 | <merijn> | tomsmeding: You can just set the number of capabilities in code? |
| 20:50:13 | <tomsmeding> | dminuoso: oh right, to make Inner injective |
| 20:50:17 | <dminuoso> | Indeed. |
| 20:50:31 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:10e5:165:b849:664a) (Ping timeout: 265 seconds) |
| 20:50:38 | → | smartin joins (~Thunderbi@88.135.18.171) |
| 20:50:42 | <tomsmeding> | merijn: I believe I didn't try that, then, but I feel like that shouldn't do anything different than the -N switch, right? |
| 20:50:48 | <dminuoso> | tomsmeding: This comes at the cost of every time I want to pull the documentation, I have to `runTagged`. But honestly, with newtype *everytime* you wanted to use a selector you'd have to unSel it, and everytime you wanted to pass it you'd have to Sel it. |
| 20:50:56 | <dminuoso> | So ergonomically that seems far worse |
| 20:51:01 | <tomsmeding> | dminuoso: makes sense |
| 20:51:08 | <merijn> | tomsmeding: No, but then you don't have to remember to set flags and compiles with those flags enabled :p |
| 20:51:29 | <tomsmeding> | dminuoso: ah, and it also kind of makes sense: the documentation is just a string, but it's tagged with the type of the thing that it's documenting |
| 20:51:48 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) |
| 20:51:48 | <tomsmeding> | it's not a completely random type that's tucked somewhere just to make inference work out, it actually makes some semantic sense somehow |
| 20:51:51 | <tomsmeding> | I like it |
| 20:51:59 | <tomsmeding> | merijn: that was not my problem :p |
| 20:52:02 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) (Client Quit) |
| 20:52:07 | <tomsmeding> | my problem was that I specify N threads and only N-1 do stuff |
| 20:52:52 | <merijn> | tomsmeding: If N = number of cores, you shouldn't run N threads anyway, for reasons that mean it's not entirely unlikely that only N-1 do stuff :p |
| 20:56:26 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) |
| 20:56:33 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 20:56:59 | <dminuoso> | tomsmeding: Fun thing, I cant have `Field f = f` because of this either. But luckily I want every field wrapped in Maybe anyway! |
| 20:57:15 | <dminuoso> | So instead of putting it into the field, I just toss it into `Inner Field f = Maybe f` instead |
| 20:57:15 | <tomsmeding> | dminuoso: heh yeah |
| 20:57:21 | <tomsmeding> | #hacks |
| 20:57:23 | <dminuoso> | :> |
| 20:57:34 | <tomsmeding> | that indeed seems the appropriate emoji somehow |
| 20:58:54 | → | max22- joins (~maxime@2a01cb088335980012b6a709282cc846.ipv6.abo.wanadoo.fr) |
| 20:59:14 | × | rusty quits (~rustyboy@2a02:2f0e:5610:ab00:b16b:f583:26df:4061) (Quit: Leaving) |
| 20:59:26 | <dsal> | -e200000 got it to burn more cores, but not really go faster. |
| 20:59:34 | <dminuoso> | tomsmeding: Here's another cute trick you can do with this: |
| 20:59:40 | <dminuoso> | describe :: forall a pat. (Typeable a, Tagged a String ~ Inner Descr pat) => Sel pat -> TypeRep |
| 20:59:40 | <dsal> | Oh wait, because I overshot -N |
| 20:59:42 | <dminuoso> | describe _ = typeOf (undefined :: a) |
| 20:59:51 | <dminuoso> | This is another benefit of Tagged |
| 21:00:07 | <dminuoso> | Sadly I have no use for this. :( |
| 21:00:08 | <merijn> | dsal: Did you disbable parallel GC< btw? |
| 21:01:05 | <tomsmeding> | dminuoso: does that work? Like, can ghc infer what `pat` should be there? |
| 21:01:37 | <dminuoso> | Yes |
| 21:01:41 | <dsal> | -qg slows it down a lot. |
| 21:02:00 | <dminuoso> | tomsmeding: https://gist.github.com/dminuoso/28a5b34a92e4dc050313827ed2470ef9 |
| 21:02:05 | <dminuoso> | run this and try `describe field1` |
| 21:02:12 | <dsal> | With `+RTS -N -e200000` it uses all the cores. |
| 21:02:20 | <merijn> | dsal: It *slows down* with -qg? o.O |
| 21:02:33 | <merijn> | dsal: I wanna see the output of +RTS -sstderr |
| 21:02:57 | <dsal> | With -qg it only uses ~1 core. |
| 21:03:05 | <merijn> | For GC... |
| 21:03:18 | <merijn> | It doesn't affect the number of capabilities |
| 21:03:25 | <dminuoso> | tomsmeding: Another solution in this design space would be to attach this documentation string to each field via Tagged and symbols. |
| 21:03:28 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) (Quit: gone to sleep. ZZZzzz…) |
| 21:03:43 | <merijn> | "+RTS -N" without -qg is almost always a mistake |
| 21:03:46 | <dminuoso> | But then I have to Tagged/runTagged fields all over the place. :( |
| 21:03:59 | <tomsmeding> | dminuoso: interesting tradeoff |
| 21:04:37 | <dminuoso> | i.e. so you'd have `data Foo = Foo { field1 :: Tagged "its a field" Char, field2 :: Tagged "another field" Int }` |
| 21:04:54 | <dminuoso> | This incurs far less extensions and is mostly unnoticeable |
| 21:05:14 | <dminuoso> | But if you have any unification errors with those fields, the diagnostics will be a bit noisy |
| 21:05:19 | <dsal> | merijn: this is with -qg https://www.irccloud.com/pastebin/CMwJgYfY/sstdout.txt |
| 21:05:33 | <dminuoso> | Well. Unnoticeable apart from having to runTagged/Tagged everywhere |
| 21:05:34 | <merijn> | 36% productivity oof |
| 21:05:44 | <dminuoso> | But if you use `lenses`, you could hide this away |
| 21:05:49 | <merijn> | What's the code? |
| 21:06:17 | <dsal> | merijn: Do you want something runnable? |
| 21:06:24 | <dminuoso> | tomsmeding: Mmm. Actually this might be tempting |
| 21:06:29 | <tomsmeding> | dminuoso: facepalm of course 'pat' is inferrable, because Inner is now injective so all is sweet |
| 21:06:33 | <dminuoso> | Yup |
| 21:06:44 | <dsal> | This is my aoc day 8. It's a list monad. * each line of input. |
| 21:06:57 | <merijn> | dsal: Not gonna be running it anyway :p |
| 21:07:15 | <tomsmeding> | dminuoso: I also kind of like the type level version, but only you know whether the newtype (un)wrapping is doable or not |
| 21:07:21 | <merijn> | Only looking at IRC to modulate videogame frustration levels xD |
| 21:07:29 | <dsal> | part2 :: [Line] -> Int ; part2 = sum . parMap rseq decodeLine |
| 21:07:49 | <dminuoso> | tomsmeding: Honestly, the more I have worked with this, the more I realize this is black magic to anyone not involved in type families |
| 21:07:58 | <dsal> | decodeLine figures out what map works and then applies it to the "output" section. So it's definitely doing some work. |
| 21:08:04 | <dminuoso> | Nothing about it is clear to unsuspecting users. |
| 21:08:11 | <dsal> | without the -qg (and another 0 of -e) : Productivity 76.4% of total user, 9.4% of total elapsed |
| 21:08:30 | <tomsmeding> | dminuoso: then perhaps the Tagged-with-docs-in-Symbol version is actually more accessible, even if more noisy |
| 21:08:35 | <dsal> | It doesn't actually get *faster*, but it does more. |
| 21:08:41 | <merijn> | dsal: Basically that means you have a giant live set, which I guess isn't surprising with the parMap + rseq |
| 21:08:58 | <dminuoso> | It's sort of annoying we have no way of annotating data types |
| 21:08:58 | <tomsmeding> | dsal: I can relate |
| 21:09:14 | <dsal> | Let me try -N8. I have this asymmetrical multiprocessor thing going on. |
| 21:09:27 | <dsal> | I like that it's working harder. I'd just hope that'd make it go faster. |
| 21:09:38 | <merijn> | But that's also a *giant* time for the problem |
| 21:09:49 | <dsal> | Oh, it says it decided on -N10 |
| 21:09:51 | <merijn> | Isn't the problem simply that decodeLine is super slow |
| 21:10:28 | <dsal> | Sure, if decodeLine is slow, then I'd think using twice as many cores to get the same amount of work done wouldn't take almost the same amount of time. |
| 21:10:32 | <merijn> | 132s, mine is effectively instant doing every line sequentially |
| 21:11:49 | <sprout_> | Imma blow up my laptop with a par_map... |
| 21:11:58 | <dsal> | It's taking me 4s to do the Big Input™ on this machine. Making it more parallel seems to slow it down, but not get it done sooner. |
| 21:12:12 | <dminuoso> | tomsmeding: None of these are really comforting. :( |
| 21:12:28 | <merijn> | dsal: eh, wait |
| 21:12:43 | <merijn> | dsal: Shouldn't it be "parMap rpar" not "parMap rseq"? |
| 21:13:17 | <dsal> | Hmm.... |
| 21:13:26 | <tomsmeding> | dminuoso: I agree |
| 21:13:57 | <dsal> | I'd think rseq would get it done in the spark vs. just like, whatever rpar does. |
| 21:14:12 | <merijn> | rpar makes sparks... |
| 21:14:38 | <merijn> | tbh, I'm not sure, I haven't used parallel much |
| 21:14:45 | <dsal> | sparks are flying... when I turn up -e I get a bunch of thread usage. |
| 21:15:12 | <dsal> | Nothing really changes the amount of time it takes to finish, though |
| 21:16:21 | → | CiaoSen joins (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 21:17:42 | <merijn> | If you're not compute bound this behaviour isn't surprising, though. So the question is "is decodeLine compute bound?" and "if no, how to fix that" |
| 21:17:53 | <dsal> | It does help a lot in smaller data sets. |
| 21:17:59 | <dsal> | It's at the top of my profile |
| 21:18:12 | → | acidjnk_new joins (~acidjnk@p200300d0c7271e730cb547fb259b1246.dip0.t-ipconnect.de) |
| 21:18:24 | <merijn> | Which implies that the difference is dataset size, possibly due to keep too much data alive? |
| 21:18:45 | <dsal> | On the smaller data set, parMap is about 8x faster than fmap. On the larger one, it won't show a difference. |
| 21:18:50 | <merijn> | For comparisong, my max residency is: 571,992 bytes maximum residency |
| 21:19:02 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 21:19:09 | <merijn> | So that's, uh, 2-3 orders of magnitude :) |
| 21:20:53 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 21:21:14 | <sprout_> | https://github.com/egel-lang/aoc-2021/blob/main/day8/task2.eg <- 89 second parallel on the last computation, 29 seconds without par_map ... |
| 21:21:16 | <sprout_> | heh |
| 21:22:50 | <merijn> | dsal: What's decodeLine look like? |
| 21:22:57 | <sprout_> | well doh. guess the overhead of managing 200 threads is substantial... |
| 21:23:02 | <tomsmeding> | merijn: hm, my brute force version has 996224 bytes max residency |
| 21:23:53 | <merijn> | tomsmeding: Get on my level ;) |
| 21:24:09 | <sprout_> | the fastest method so far is just counting digits on each line since those unique identify each other |
| 21:24:21 | <tomsmeding> | :p |
| 21:24:25 | <sprout_> | uh, letters |
| 21:24:40 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 21:24:43 | <tomsmeding> | lol |
| 21:25:02 | <sprout_> | my solution is just picking one of 7! permutations on each line. should be way fast in Haskell too |
| 21:25:23 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:25:33 | <sprout_> | Haskell being roughly two orders faster I think |
| 21:25:35 | <dsal> | That's the "brute force" way. I'm doing a bit less brute |
| 21:26:12 | × | zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 21:26:14 | <merijn> | dsal: I'm not doing any brute force :p |
| 21:26:33 | <dsal> | merijn: I can paste in a bit, but it's basically computing a map in a list monad and then applying that map to the output side to foldl' up a number |
| 21:26:49 | <merijn> | https://paste.tomsmeding.com/nqzcEvju |
| 21:27:11 | <sprout_> | not sure it's that brute force, I precompute the 7! functions from word to digit and that gives 5040/2*2log(10)*small_constant (maps are easily rejected) or 10k comparisons per line |
| 21:27:14 | <dsal> | Is that the large input? |
| 21:27:22 | <merijn> | dsal: That's the large input, yeah |
| 21:27:28 | <dsal> | Neat |
| 21:27:32 | <merijn> | and tbh, not particularly optimised either |
| 21:27:44 | <merijn> | Which is why I'm so curious why it's so slow for you :p |
| 21:27:56 | <merijn> | I'm not using any list monad stuff, though |
| 21:28:06 | <dsal> | I'm doing a bunch of selects to grab digits and guarding as I go |
| 21:28:08 | <sprout_> | 200k comparisons. shouldn't be a problem for Haskell. not sure you even need a map. log(n) lookup is nice but for a container with only 10 elements... |
| 21:28:30 | <merijn> | dsal: https://github.com/merijn/AdventOfCode/blob/master/Day8.hs |
| 21:28:32 | <sprout_> | shouldn't matter. lists should be good enough |
| 21:28:46 | <dsal> | It's not the slow thing that's the issue right now, it's why it's not faster on the large input with parMap (but it's is on the small input) |
| 21:28:46 | × | doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Read error: Connection reset by peer) |
| 21:29:03 | <dsal> | merijn: oh, I should point out that's a criterion run |
| 21:29:30 | <sprout_> | dsal: with Egel it's just likely the OS overhead of managing 200 threads. with Haskell I wouldn't know since that should have it's own scheduler |
| 21:29:32 | <merijn> | dsal: Well, since a lot of time is GC time and GC time is proportional to live set, having parallelism on a large set of input increases the liveset and thus GC time |
| 21:30:06 | <merijn> | dsal: oh, improper caching with criterion can also mess you up, depending on how you're configuring the criterion benchmarks |
| 21:31:29 | <sprout_> | ah. that too. 200 threads competing on access to the same data structures? |
| 21:35:20 | → | Guest97 joins (~Guest97@pool-98-111-246-199.pitbpa.ftas.verizon.net) |
| 21:35:37 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:35:37 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 21:35:37 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:36:36 | <EvanR> | accessing the same immutable data structure shouldn't be an issue |
| 21:38:11 | → | vicfred joins (~vicfred@user/vicfred) |
| 21:38:56 | <dminuoso> | tomsmeding: it took me less time to switch to the Tagged than it took to make a reproducer for the tyfam injectivity issues! |
| 21:39:05 | <dminuoso> | I think I made my decision |
| 21:39:54 | <Guest97> | Question - I need the type-level version of the identity function, that is a type `Ident` of kind `* -> *` where `a = Ident a`. |
| 21:39:54 | <Guest97> | I know its possible to construct this using type synonyms in Scala, but when I tried `type Ident a = a`, I can't seem to use `Ident` as a higher-kinded type. Is there any way to do this? |
| 21:39:56 | <tomsmeding> | dminuoso: the Tagged with docs in a Symbol type param? |
| 21:39:58 | <tomsmeding> | nice! |
| 21:40:06 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 21:40:29 | <dminuoso> | tomsmeding: https://gitlab.com/wobcom/haskell/powerdns-gerd/-/blob/master/lib/PowerDNS/Gerd/Permission/Types.hs#L80-113 |
| 21:40:33 | <tomsmeding> | % :i Data.Functor.Identity -- Guest97 |
| 21:40:34 | <yahb> | tomsmeding: ; <interactive>:1:1: error: Not in scope: `Data.Functor.Identity' |
| 21:40:36 | <awpr> | there's no current way to pass a non-generative type function as a type parameter, if that's what you're looking for. |
| 21:40:41 | <tomsmeding> | % :i Identity -- Guest97 |
| 21:40:41 | <yahb> | tomsmeding: ; <interactive>:1:3: error: parse error (possibly incorrect indentation or mismatched brackets) |
| 21:40:45 | <tomsmeding> | % import Data.Functor.Identity |
| 21:40:45 | <yahb> | tomsmeding: |
| 21:40:49 | <tomsmeding> | % :i Identity |
| 21:40:49 | <yahb> | tomsmeding: type Identity :: * -> *; newtype Identity a = Identity {runIdentity :: a}; -- Defined in `Data.Functor.Identity'; instance Applicative Identity -- Defined in `Data.Functor.Identity'; instance Eq a => Eq (Identity a) -- Defined in `Data.Functor.Identity'; instance Functor Identity -- Defined in `Data.Functor.Identity'; instance Monad Identity -- Defined in `Data.Functor.Identity'; instance Monoid a => |
| 21:40:55 | <merijn> | Guest97: You can't do that without a newtype |
| 21:40:57 | <awpr> | that's not _exactly_ an identity function, unfortunately |
| 21:41:07 | <EvanR> | what about a type family |
| 21:41:08 | <awpr> | representationally yes, but not nominally |
| 21:41:16 | <tomsmeding> | right |
| 21:41:16 | <dminuoso> | Hah I have another cunning plan |
| 21:41:18 | <awpr> | a type family can't be passed as a type parameter |
| 21:41:22 | <dminuoso> | You can use type constructors in infix position too |
| 21:41:23 | <merijn> | EvanR: You can't have partially applied type families as parameter |
| 21:41:26 | <merijn> | EvanR: So...no |
| 21:41:26 | <EvanR> | oah right |
| 21:41:32 | <dminuoso> | That might look nicer, and would avoid needing to wrap the field in parens |
| 21:41:37 | <tomsmeding> | dminuoso: `WithDocs`? |
| 21:41:39 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 21:41:47 | <myShoggoth> | HF November update: https://discourse.haskell.org/t/haskell-foundation-november-update/3797 |
| 21:41:56 | <EvanR> | with dependent haskell we can finally write an identity function at the type level? xD |
| 21:42:04 | <EvanR> | if no, that's ridiculous |
| 21:42:16 | <Guest97> | The only constraint I need to satisfy is that `a = f a` for any a, and I have to be able to use `f` as a typeclass parameter |
| 21:42:30 | <awpr> | not possible IIUC |
| 21:42:51 | <tomsmeding> | yeah |
| 21:43:05 | <Guest97> | thanks |
| 21:43:06 | <Guest97> | I can technically do what I'm trying to do with a newtype, but having to throw another isomorphism into the mix is just annoying |
| 21:43:09 | <awpr> | there are workarounds, though: you can pass a stub type and have the consuming thing apply a type family to it |
| 21:44:11 | <awpr> | `data IdentityF` `type family Apply f (a :: k) :: k` `type instance Apply IdentityF a = a` `class MyClass f a where something :: Apply f a -> Bool` |
| 21:44:32 | <awpr> | then `something @IdentityF @a :: a -> Bool` |
| 21:44:52 | <dminuoso> | tomsmeding: Yeah |
| 21:45:11 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) |
| 21:45:12 | <Guest97> | oh thats actually genius |
| 21:45:12 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:e6c3:e85f:49be:975c) (Quit: WeeChat 2.8) |
| 21:45:52 | <awpr> | (this is often called "defunctionalization", and the `singletons` library takes it to extreme lengths) |
| 21:46:08 | <Guest97> | makes sense |
| 21:47:22 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Remote host closed the connection) |
| 21:48:45 | → | Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
| 21:48:48 | × | alx741 quits (~alx741@186.178.108.192) (Quit: alx741) |
| 21:49:01 | <Guest97> | rn tho I think its easier for me to just use a newtype |
| 21:49:02 | <Guest97> | Reworking the superclass to use the newtype is gonna be way easier than making defunctionalized versions of most of the things its building on anyway |
| 21:49:06 | <Guest97> | thanks for the help tho |
| 21:49:13 | <dminuoso> | tomsmeding: Oh yes, Ive pushed it already. This looks even nicer! |
| 21:49:30 | <dminuoso> | Also cute benefit, the unwrapping functions name: |
| 21:49:37 | <awpr> | yeah I've generally found in the things I've worked on that defunctionalizing ended up being more annoying than just doing the newtype |
| 21:49:38 | <dminuoso> | data newtype WithDocs b (s :: Symbol) = WithDocs { withoutDocs :: b } |
| 21:49:54 | <tomsmeding> | :) |
| 21:49:57 | → | alx741 joins (~alx741@186.178.108.192) |
| 21:50:05 | <dminuoso> | Bikeshedded into oblivion. |
| 21:50:07 | <dminuoso> | Thanks :) |
| 21:50:11 | <tomsmeding> | still see Tagged on the link you sent though |
| 21:50:48 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:51:42 | <dminuoso> | Check again? |
| 21:52:40 | <tomsmeding> | <3 |
| 21:53:08 | <tomsmeding> | a newline got introduced though before the 'Per zone' section |
| 21:53:30 | <tomsmeding> | (noticed because the line highlight now stops one line before the end of the data type |
| 21:53:31 | <tomsmeding> | ) |
| 21:54:08 | <dminuoso> | tomsmeding: Yeah, already fixed that up because I realized I can put `WithDocs` "foo" on a separate line as well |
| 21:54:34 | <dminuoso> | Pushed, if you like to see |
| 21:54:46 | <dminuoso> | I think this is quite acceptable now |
| 21:54:46 | <tomsmeding> | oh that's nice indeed |
| 21:54:55 | <tomsmeding> | quite high, but nice |
| 21:55:11 | <tomsmeding> | alternative would be alignment, but then you get long lines |
| 21:55:22 | <tomsmeding> | bikeshedded into oblivion indeed |
| 21:58:15 | × | Akiva quits (~Akiva@user/Akiva) (Quit: WeeChat 3.3) |
| 21:58:35 | → | Akiva joins (~Akiva@user/Akiva) |
| 21:59:09 | <dminuoso> | tomsmeding: But with this indentation style, I could have kept Tagged! |
| 21:59:31 | <tomsmeding> | nooooo |
| 21:59:34 | <tomsmeding> | this is better |
| 22:00:05 | <dminuoso> | Because this reads `foo :: Maybe [Baz]` at first glance? |
| 22:00:30 | <tomsmeding> | yes, and because WithDocs precisely says what it means |
| 22:00:36 | <tomsmeding> | s/cs/c/ |
| 22:00:53 | × | meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 22:01:34 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 265 seconds) |
| 22:02:18 | × | user0 quits (~aj@154.0.137.32) (Quit: Leaving.) |
| 22:03:24 | → | lavaman joins (~lavaman@98.38.249.169) |
| 22:03:30 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 22:05:10 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 22:05:23 | <dminuoso> | Guess another benefit is that I dont need polykinds |
| 22:05:27 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 22:05:35 | <dminuoso> | Because WithDocs is tied to just (s :: Symbol) |
| 22:06:32 | × | retroid_ quits (~retro@05412d78.skybroadband.com) (Ping timeout: 268 seconds) |
| 22:09:41 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 22:09:58 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 22:10:47 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:13:59 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 22:14:17 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 22:15:42 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 22:15:54 | → | lavaman joins (~lavaman@98.38.249.169) |
| 22:17:57 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 22:18:15 | → | hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com) |
| 22:18:29 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 22:18:38 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 22:20:03 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 22:21:02 | × | jespada quits (~jespada@87.74.37.56) (Ping timeout: 240 seconds) |
| 22:22:13 | × | k60`` quits (~user@static.100.218.46.78.clients.your-server.de) (Ping timeout: 240 seconds) |
| 22:23:21 | → | jespada joins (~jespada@87.74.33.157) |
| 22:23:21 | → | Guest48 joins (~Guest48@wireless-student-pt3-241-129.lut.ac.uk) |
| 22:24:03 | → | retroid_ joins (~retro@05412d78.skybroadband.com) |
| 22:24:08 | → | superstar64 joins (~superstar@2600:1700:ed80:50a0:d250:99ff:fe2c:53c4) |
| 22:24:11 | → | k60`` joins (~user@static.100.218.46.78.clients.your-server.de) |
| 22:25:29 | × | Guest48 quits (~Guest48@wireless-student-pt3-241-129.lut.ac.uk) (Client Quit) |
| 22:25:59 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 22:27:04 | → | jeetelongname joins (~jeet@148.197.248.50) |
| 22:27:27 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) (Quit: gone to sleep. ZZZzzz…) |
| 22:27:30 | × | hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
| 22:28:22 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 22:34:17 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:34:35 | × | bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 22:36:22 | × | k60`` quits (~user@static.100.218.46.78.clients.your-server.de) (Ping timeout: 265 seconds) |
| 22:37:22 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) |
| 22:38:40 | → | Dansk31 joins (~Dansk31@147.114.141.88.rev.sfr.net) |
| 22:39:00 | × | Dansk31 quits (~Dansk31@147.114.141.88.rev.sfr.net) (Client Quit) |
| 22:39:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 22:39:18 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:40:10 | × | sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 256 seconds) |
| 22:41:05 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 22:45:03 | → | Guest40 joins (~Guest40@ec2-54-215-90-243.us-west-1.compute.amazonaws.com) |
| 22:47:47 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) |
| 22:50:37 | × | chomwitt quits (~chomwitt@2a02:587:dc0d:3700:12c3:7bff:fe6d:d374) (Ping timeout: 240 seconds) |
| 22:53:24 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b5e5:6571:976d:7afc) (Ping timeout: 268 seconds) |
| 22:56:32 | × | Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep) |
| 22:56:49 | × | Guest97 quits (~Guest97@pool-98-111-246-199.pitbpa.ftas.verizon.net) (Quit: Client closed) |
| 22:58:18 | Axma10079 | is now known as Axman6 |
| 22:59:24 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 22:59:25 | × | CiaoSen quits (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 23:02:59 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 23:04:13 | × | curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 240 seconds) |
| 23:04:16 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 23:04:34 | relrod_ | is now known as relrod |
| 23:05:33 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 23:06:33 | → | k60`` joins (~user@static.100.218.46.78.clients.your-server.de) |
| 23:08:14 | × | smartin quits (~Thunderbi@88.135.18.171) (Quit: smartin) |
| 23:10:34 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:11:39 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 265 seconds) |
| 23:12:03 | → | waleee joins (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) |
| 23:16:46 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 23:17:49 | × | pfurla quits (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) (Quit: gone to sleep. ZZZzzz…) |
| 23:27:48 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
| 23:29:45 | → | AlexNoo_ joins (~AlexNoo@94.233.241.193) |
| 23:30:13 | × | InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 240 seconds) |
| 23:32:11 | × | Alex_test quits (~al_test@178.34.163.11) (Ping timeout: 252 seconds) |
| 23:32:55 | × | AlexZenon quits (~alzenon@178.34.163.11) (Ping timeout: 252 seconds) |
| 23:33:21 | × | AlexNoo quits (~AlexNoo@178.34.163.11) (Ping timeout: 256 seconds) |
| 23:34:55 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 23:36:32 | → | Alex_test joins (~al_test@94.233.241.193) |
| 23:37:07 | → | AlexZenon joins (~alzenon@94.233.241.193) |
| 23:43:16 | → | pfurla joins (~pfurla@2804:14d:5c5a:9a78:840d:6ccb:3c35:c390) |
| 23:44:41 | <dsal> | One of the more expensive parts of my code is this "select" function. The good news is that if I inline it, it no longer shows up in the profile. |
| 23:44:53 | <dsal> | I manually wrote out what it did in my list monad and it was faster, but grosser. |
| 23:46:54 | <monochrom> | Good that it is actually faster. |
| 23:47:12 | <monochrom> | Because "doesn't show up in profiling, but just as slow" is not progress heh |
| 23:47:44 | → | lavaman joins (~lavaman@98.38.249.169) |
| 23:49:51 | → | zhakupov joins (~zhakupov@static.90.189.158.74.sinor.ru) |
| 23:51:01 | <dsal> | I think the inline select is a little faster. But inlining everything takes all the blame away from the little functions. |
| 23:52:04 | <dsal> | Doing it manually is a lot faster, but gross code. Instead of `(thing, things) <- select stuff; (nextThing, nextThings) <- select things` it's like, `thing <- stuff; let things = filter (/= thing) things` |
| 23:52:20 | <dsal> | (I made an operator to make that slightly better, but only slightly) |
| 23:54:40 | × | zhakupov quits (~zhakupov@static.90.189.158.74.sinor.ru) (Ping timeout: 265 seconds) |
| 23:55:20 | <dsal> | 20% of the runtime of this thing is select. Followed by making a map. I wonder if using a list instead of a map would be faster. |
| 23:58:22 | <dsal> | Hey neat, not making the map made that part not be hot in my profile. I should just delete all this code. |
| 23:59:06 | <dsal> | Woah. Yeah, not using a map is a lot faster than using a map. |
All times are in UTC on 2021-12-08.