Logs on 2023-01-18 (liberachat/#haskell)
| 00:00:19 | <monochrom> | "cabal install" wants to be building for installing a finished product, but you can clearly see that it is unfair to ask end users to compile source code from scratch. |
| 00:01:21 | → | laalyn joins (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) |
| 00:01:39 | <monochrom> | xmonad is OK with it because xmonad's config files are Haskell source code and requires end users to compile it anyway. |
| 00:02:36 | <monochrom> | I wouldn't be surprised if cabal was designed for the xmonad model right from day one. |
| 00:04:06 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
| 00:05:27 | <hpc> | monochrom: the distinction you're looking for there i think is "building" vs "packaging" |
| 00:05:33 | <hpc> | like gcc vs rpmbuild |
| 00:05:38 | <hpc> | or maybe make vs rpmbuild |
| 00:06:00 | <monochrom> | yeah |
| 00:07:17 | <Joao003> | monochrom what is your problem |
| 00:09:24 | <monochrom> | No, what is your problem? |
| 00:10:42 | <Joao003> | didnt ask |
| 00:10:47 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 00:11:33 | <mauke> | ? you literally did ask |
| 00:12:32 | <hpc> | how can problems be real if questions aren't real? |
| 00:13:11 | <Joao003> | i didnt ask for my problem lol |
| 00:13:32 | <mauke> | no, that was monochrom. pay attention |
| 00:13:37 | <geekosaur> | romes[m] asked a question before you joined |
| 00:14:22 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 00:14:46 | <romes[m]> | <hpc> "or maybe make vs rpmbuild" <- That's a good analogy |
| 00:14:51 | <Joao003> | you code in haskell? name all builtins in prelude /s |
| 00:15:20 | <EvanR> | there aren't any |
| 00:15:20 | <romes[m]> | 0 |
| 00:15:21 | <geekosaur> | enough |
| 00:15:31 | ChanServ | sets mode +o geekosaur |
| 00:15:45 | <Joao003> | wth geekosaur |
| 00:16:57 | <Joao003> | guys |
| 00:17:21 | <Joao003> | % let alternatingCaps = zipWith ($) (cycle [toUpper, toLower]) |
| 00:17:21 | <yahb2> | <no output> |
| 00:17:44 | <Joao003> | % alternatingCaps "look at this" |
| 00:17:44 | <yahb2> | "LoOk aT ThIs" |
| 00:25:59 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 246 seconds) |
| 00:28:48 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 00:33:09 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 00:34:18 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 00:41:08 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 00:42:51 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 260 seconds) |
| 00:44:06 | → | fizbin_ joins (~fizbin@user/fizbin) |
| 00:44:48 | → | fizbin__ joins (~fizbin@user/fizbin) |
| 00:45:04 | × | pagnol quits (~user@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 256 seconds) |
| 00:48:49 | × | fizbin_ quits (~fizbin@user/fizbin) (Ping timeout: 260 seconds) |
| 00:56:56 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 00:56:56 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 00:56:56 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:10:34 | × | fizbin__ quits (~fizbin@user/fizbin) (Ping timeout: 256 seconds) |
| 01:10:45 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 01:10:47 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:12:07 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 01:12:56 | → | califax joins (~califax@user/califx) |
| 01:15:40 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds) |
| 01:16:55 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:20:03 | → | fizbin__ joins (~fizbin@user/fizbin) |
| 01:21:53 | → | talismanick joins (~talismani@campus-021-055.ucdavis.edu) |
| 01:26:00 | <talismanick> | If I wanted to munge data in Git packfiles or SQLite files, which libraries offer the least resistance? cereal? |
| 01:27:32 | <talismanick> | (for the latter, I'd let SQLite handle it & call using rel8 or Esqueleto, but that's not the point here) |
| 01:30:52 | × | xff0x_ quits (~xff0x@ai084091.d.east.v6connect.net) (Ping timeout: 272 seconds) |
| 01:32:03 | × | Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 01:36:55 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 01:37:35 | × | boxscape_ quits (~boxscape_@81.191.27.107) (Ping timeout: 256 seconds) |
| 01:37:44 | <jackdk> | talismanick: I would generally use cereal for binary wrangling yea. Note that you don't have to use the `Serialize` class and can call `runGet` or whatever on a decoder of type `Get a`. (I generally don't like serialisation typeclasses, but put up with them). `binary` has a bad instance for `Double` so I generally avoid it. |
| 01:38:04 | <jackdk> | talismanick: another option is to parse with something like `attoparsec` and build using bytestring builders |
| 01:38:30 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:e4d3:d382:a4fe:296c) (Ping timeout: 255 seconds) |
| 01:39:13 | <talismanick> | jackdk: Thanks for the advice. I actually took the 2nd approach, but working with bytestrings feels rickety in a rather unHaskell way |
| 01:39:14 | <jackdk> | talismanick: I tend to favour the former option e.g. https://git.sr.ht/~jack/codec-hostile-waters/tree/master/item/src/Codec/Game/HostileWaters/Mng.hs |
| 01:39:34 | <talismanick> | (the first time I tried binary parsing in Haskell) |
| 01:40:32 | <talismanick> | jackdk: So, not a fan of, say, Aeson? Preferred alternative to that? |
| 01:41:55 | <talismanick> | or approach, generally - I don't imagine there is anything comparable to Aeson in programmer-hours of effort expended |
| 01:42:30 | <jackdk> | talismanick: I use aeson and suck it up. But I make heavy use of newtype wrappers to ensure serialisation instances live at the serialisation boundary instead of on core types (this has bitten me in _every_ project of nontrivial size), and sometimes use https://hackage.haskell.org/package/ban-instance on core types to prevent accidental instances. |
| 01:43:19 | <talismanick> | Interesting. I'll be studying that, then. |
| 01:43:31 | <jackdk> | talismanick: Having predictable code for my colleagues is more important than re-inventing the JSON wheel, but if I needed something that aeson couldn't do (e.g., knowing the lexical order of keys within an object) I would probably teach myself https://hackage.haskell.org/package/waargonaut |
| 01:45:42 | × | troydm quits (~troydm@user/troydm) (Ping timeout: 256 seconds) |
| 01:48:30 | → | razetime joins (~Thunderbi@117.193.4.54) |
| 01:50:14 | × | fizbin__ quits (~fizbin@user/fizbin) (Ping timeout: 256 seconds) |
| 01:52:59 | × | juri_ quits (~juri@84-19-175-179.pool.ovpn.com) (Ping timeout: 260 seconds) |
| 01:53:02 | <jackdk> | talismanick: Sometimes typeclass-driven encoding/decoding is necessary (e.g., when doing servant-style typelevel stuff), which is why I suggested a separate tag type parameter on waargonaut's JsonEncode class. |
| 01:53:38 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 01:54:41 | × | talismanick quits (~talismani@campus-021-055.ucdavis.edu) (Ping timeout: 255 seconds) |
| 01:57:52 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 02:01:27 | geekosaur | sets mode -o geekosaur |
| 02:01:37 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 02:03:38 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 02:03:43 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds) |
| 02:03:45 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 02:04:17 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:fe01:28c6:d263:9ebf) (Remote host closed the connection) |
| 02:04:36 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:3e07:3355:d9d1:6eb5) |
| 02:07:42 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 02:10:00 | → | talismanick joins (~talismani@campus-021-055.ucdavis.edu) |
| 02:10:12 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 02:11:58 | → | xff0x_ joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 02:12:46 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 02:16:23 | → | mizlan joins (~mizlan@131.179.76.14) |
| 02:19:08 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 02:20:06 | → | jelewis2 joins (~lewisje@2001:470:1f11:14e:1753:f4c6:e607:e65f) |
| 02:22:36 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:c1c3:e297:674c:356d) (Remote host closed the connection) |
| 02:22:55 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:c1c3:e297:674c:356d) |
| 02:23:31 | × | lewisje quits (~lewisje@2001:470:1f11:14e:6808:94ac:b726:e7c2) (Ping timeout: 252 seconds) |
| 02:30:05 | × | thegeekinside quits (~thegeekin@189.217.82.244) (Read error: Connection reset by peer) |
| 02:31:45 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 02:31:47 | × | talismanick quits (~talismani@campus-021-055.ucdavis.edu) (Ping timeout: 268 seconds) |
| 02:37:59 | × | jackhill quits (~jackhill@kalessin.dragonsnail.net) (Ping timeout: 264 seconds) |
| 02:38:58 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds) |
| 02:39:11 | × | mizlan quits (~mizlan@131.179.76.14) (Ping timeout: 268 seconds) |
| 02:40:55 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 02:41:48 | × | codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
| 02:43:51 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 02:43:51 | jinsun | is now known as Guest7600 |
| 02:43:51 | × | Guest7600 quits (~jinsun@user/jinsun) (Killed (cadmium.libera.chat (Nickname regained by services))) |
| 02:43:51 | jinsun__ | is now known as jinsun |
| 02:55:34 | × | nehsou^ quits (~nehsou@76.145.190.81) (Remote host closed the connection) |
| 03:06:34 | → | dsrt^ joins (~dsrt@76.145.190.81) |
| 03:10:55 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 03:13:17 | → | codaraxis joins (~codaraxis@user/codaraxis) |
| 03:14:25 | <anatta> | how do you feel about expressions going in multiple directions? |
| 03:14:55 | → | mizlan joins (~mizlan@2607:f010:2e9:21:c62:66e9:fe12:84f6) |
| 03:15:47 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
| 03:16:13 | <anatta> | like this: myParser = Constructor <$> (spaces *> otherParser <* spaces) |
| 03:16:56 | <glguy> | Constructor <$ spaces <*> otherParser <* spaces |
| 03:17:16 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) |
| 03:18:06 | <anatta> | hm, yeah, maybe that's better |
| 03:18:56 | <anatta> | to me that still reads both ways because <*> goes LTR in my head, but it's possible I'm just not used to it |
| 03:19:54 | <glguy> | all the <$ <$> <* <*> *> operators associate left, so you just have to read the whole thing left to right to see what's been accumulated |
| 03:20:53 | → | bilegeek joins (~bilegeek@2600:1008:b047:ba16:b1d1:7621:aa43:a7a4) |
| 03:21:57 | <Axman6> | glguy: huh, I'd never thought of doing that, that's neat |
| 03:23:35 | × | segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 264 seconds) |
| 03:25:46 | → | instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net) |
| 03:33:04 | × | hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection) |
| 03:35:35 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 03:35:38 | × | barzo quits (~hd@31.223.41.44) (Ping timeout: 256 seconds) |
| 03:38:25 | × | superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 268 seconds) |
| 03:38:38 | <anatta> | on closer inspection I think I find my version easier to read |
| 03:39:36 | × | mizlan quits (~mizlan@2607:f010:2e9:21:c62:66e9:fe12:84f6) (Ping timeout: 256 seconds) |
| 03:40:47 | → | scoopahdoopah joins (~quassel@050-089-109-059.res.spectrum.com) |
| 03:41:13 | → | superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net) |
| 03:41:58 | → | jmorris joins (uid537181@id-537181.uxbridge.irccloud.com) |
| 03:41:58 | × | razetime quits (~Thunderbi@117.193.4.54) (Ping timeout: 272 seconds) |
| 03:42:23 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.) |
| 03:42:30 | <monochrom> | :) |
| 03:43:46 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 03:45:04 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat) |
| 03:45:46 | <glguy> | anatta: another minor topic, and this might not apply to your actual case if this is a synthetic example, but when building up a parser-combinator parser you'd generally only trim spaces off at the end of each thing |
| 03:46:30 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:4e8c::) |
| 03:47:03 | <monochrom> | In that case, Constructor <$> (openParen *> term <* closeParen) happens all the time. |
| 03:47:22 | <glguy> | then it can be better to go with things like: between openP closeP ... |
| 03:47:25 | <monochrom> | Alternatively openParen *> (Constrcutor <$> term) <* closeParen |
| 03:47:28 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:47:37 | <glguy> | or to name the wrapper for things that are between parentheses, rather than to repeat the pattern |
| 03:47:40 | <anatta> | glguy: In this case it was mathematical expressions, and I couldn't figure out where to put the spaces, so I just put them around the integers |
| 03:47:57 | <monochrom> | There is also whitespaces *> foo <* eof |
| 03:48:04 | <anatta> | I figured you wouldn't get spaces between operators and parentheses |
| 03:48:14 | <anatta> | so I thought it might be good enough |
| 03:48:36 | <anatta> | (it wasn't that serious though, so I didn't really think *a lot* about it) |
| 03:48:41 | <glguy> | the standard thing would be what monochom said at the outside and then every integer parser and token parser eats trailing spaces |
| 03:49:06 | <anatta> | I see |
| 03:49:18 | <Axman6> | and then your top level parser can be spaces *> expr |
| 03:49:31 | <anatta> | what about when you generate the parsers automatically? |
| 03:49:38 | <glguy> | this starts to matter in parser combinator libraries like megaparsec and parsec where they are optimized to prune alternatives as soon as any characters are consumed |
| 03:49:52 | <Axman6> | just follow the rule that each parser handles its own trailing whitespace and things get easier |
| 03:49:58 | <glguy> | You'd especially do it this way when generating them automatically so that your automatic generation scheme is likely to work |
| 03:50:09 | <anatta> | like, I don't have access to the operator parsers |
| 03:50:11 | <glguy> | less chance for someone to carefully think about where to add them |
| 03:50:18 | <anatta> | so I can't add whitespace to them |
| 03:50:58 | <glguy> | Oh, well I'm sure someone could contrive an example where you'd have to add extra whitespace handling |
| 03:51:10 | <Axman6> | generally if you're using somethat creates it for you, you'll be able to provide a token lexer |
| 03:51:26 | <Axman6> | something that* |
| 03:51:33 | <anatta> | sec, I can't remember what it was called and I'm at the wrong computer, let me find it |
| 03:51:46 | <Axman6> | and each token takes care of its own trailing whitespace |
| 03:51:51 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:51:51 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:51:51 | finn_elija | is now known as FinnElija |
| 03:52:10 | <anatta> | I was using this: |
| 03:52:12 | <anatta> | https://hackage.haskell.org/package/parsec-3.1.16.1/docs/Text-Parsec-Expr.html |
| 03:52:24 | <anatta> | with the buildExpressionParser |
| 03:52:52 | <glguy> | you'd definitely use trailing whitespace parsing in this case |
| 03:53:03 | <glguy> | because parsec relies on that for efficient parsing |
| 03:53:17 | <monochrom> | buildExpressionParser honours the skip-trailing-spaces convention. |
| 03:53:56 | <anatta> | hmhm, so I could just do e.g. |
| 03:54:09 | <anatta> | expr = buildExpressionParser table term; term = parens expr <|> int |
| 03:54:20 | <anatta> | and if my int parser only skips trailing spaces |
| 03:54:23 | <anatta> | it's fine? |
| 03:54:38 | <monochrom> | Your parens also need to skip trailing whitespaces. |
| 03:54:39 | <Axman6> | sounds likely |
| 03:54:46 | <monochrom> | But that's it. |
| 03:54:57 | <Axman6> | each lexeme needs to skip spaces |
| 03:55:28 | × | td_ quits (~td@83.135.9.4) (Ping timeout: 256 seconds) |
| 03:56:41 | <anatta> | hmhm, I'll play around with it a bit - I'm more used to writing a grammar and generating the parsers from that so this is interesting |
| 03:56:57 | → | td_ joins (~td@83.135.9.57) |
| 03:57:28 | <Axman6> | often writing your parser will end up looking very much like a grammar anyway |
| 04:00:09 | <anatta> | but you get "free lexing" if you just run alex/happy on your BNF grammar :p |
| 04:02:38 | → | phma_ joins (~phma@host-67-44-208-74.hnremote.net) |
| 04:06:22 | × | phma quits (phma@2001:5b0:211c:1148:cd31:3368:6dc4:8d0d) (Ping timeout: 252 seconds) |
| 04:06:23 | <anatta> | anyway, I'll sleep on it - glguy, monochrom, Axman6: thanks for patiently explaining stuff to me =) |
| 04:06:36 | → | azimut_ joins (~azimut@gateway/tor-sasl/azimut) |
| 04:07:14 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 04:11:31 | × | instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Quit: Lost terminal) |
| 04:12:19 | <Axman6> | Sleep well! |
| 04:15:50 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1) |
| 04:30:43 | × | bilegeek quits (~bilegeek@2600:1008:b047:ba16:b1d1:7621:aa43:a7a4) (Quit: Leaving) |
| 04:34:50 | → | razetime joins (~Thunderbi@117.193.4.54) |
| 04:45:16 | <Inst_> | go actually has a lot to admire |
| 04:45:27 | <Inst_> | not in the sense of the language, but the on-boarding materials |
| 04:45:42 | Inst_ | is now known as Inst |
| 04:46:04 | <Inst> | very nice interactive tutorials |
| 04:46:20 | <Inst> | i guess Python and Go are the languages to study for onboarding |
| 04:46:39 | <Inst> | https://go.dev/tour/welcome/1 |
| 04:46:42 | <Inst> | we have tryhaskell.org |
| 04:49:06 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 04:50:13 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 04:50:42 | → | hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com) |
| 04:52:26 | <maerwald[m]> | Inst: https://play-haskell.tomsmeding.com/play |
| 04:53:50 | <Inst> | this is shit |
| 04:53:58 | <Inst> | why isn't Haskell.org linking this? |
| 04:54:31 | <Inst> | they're still linked to tryhaskell.org via their playground |
| 04:55:49 | phma_ | is now known as phma |
| 04:55:57 | <Inst> | by shit, i mean, it's shit than haskell.org isn't linking or cloning it |
| 04:57:32 | <dsal> | go has a team incentivized to make people want to use go on production systems. |
| 04:57:59 | → | tsandstr joins (~user@2601:18b:8100:7300::524) |
| 04:59:18 | <energizer> | introductory tutorial aint the same thing as production systems |
| 04:59:21 | <tsandstr> | Quick question about parser combinators (I am playing with attoparsec). Is there an idiomatic way to write a parser which skips over *all* whitespace that it encounters? I can't help but feel like there is a better way than to scatter `skipSpaces` on every other line |
| 05:00:01 | <tsandstr> | I have laso thought about something like `sequence (intersperse skipSpace steps)` where `steps` is a list of parsers, but this feels ugly |
| 05:00:20 | <Inst> | yeah, but Haskell has HF |
| 05:00:28 | <Inst> | also, HF should want to clone The Go Programming Language |
| 05:00:45 | <Inst> | erm, port it to Haskell, they at least have SPJ on board |
| 05:01:04 | <Inst> | unless Addison Wesley trademarked "The foo Programming Language" |
| 05:01:35 | × | Volt_ quits (~Volt_@c-73-167-118-200.hsd1.ma.comcast.net) (Quit: ) |
| 05:02:05 | → | Volt_ joins (~Volt_@c-73-167-118-200.hsd1.ma.comcast.net) |
| 05:03:20 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 05:04:33 | <tsandstr> | Should I maybe define my own monad type with a bind operator that shoves a skipSpace in between everything? Or is that nonsense? |
| 05:06:12 | → | acidjnk joins (~acidjnk@p200300d6e715c4916947822429b47882.dip0.t-ipconnect.de) |
| 05:07:39 | → | troydm joins (~troydm@user/troydm) |
| 05:11:09 | → | meinside joins (uid24933@id-24933.helmsley.irccloud.com) |
| 05:13:11 | <dsal> | tsandstr: You generally parse an item with a "lexeme" that eats space after a token so the next token is ready to be parsed. |
| 05:15:00 | <tsandstr> | dsal: So, I would have some sort of function `keyword :: String -> Parser ()` that does something like `keyword s = string s <* skipSpace` |
| 05:15:31 | × | laalyn quits (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) (Quit: Client closed) |
| 05:16:26 | <tsandstr> | Or am I oversimplifying? |
| 05:19:42 | × | razetime quits (~Thunderbi@117.193.4.54) (Quit: See You Space Cowboy) |
| 05:20:39 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 260 seconds) |
| 05:22:33 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 05:31:48 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
| 05:36:40 | <Inst> | https://play-haskell.tomsmeding.com |
| 05:36:42 | <Inst> | what is this? |
| 05:36:56 | <Inst> | or rather, what's the advantage of the mergesort algorithm used here over other mergesorts? |
| 05:43:08 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 05:47:26 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 255 seconds) |
| 05:51:45 | × | jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:54:40 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 06:01:56 | <dsal> | tsandstr: https://hackage.haskell.org/package/megaparsec-9.3.0/docs/Text-Megaparsec-Byte-Lexer.html#v:lexeme |
| 06:04:16 | <dsal> | So you'd `lexeme keyword` where you needed a keyword and didn't care about eating stuff after it. Your lexeme function decides how space should be eaten in that context. |
| 06:04:32 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 06:06:46 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:10:07 | <Jadesheit[m]> | `foo = (/ 2) . (pred >>= (*))` is this readable? Why or why not? |
| 06:10:41 | × | acidjnk quits (~acidjnk@p200300d6e715c4916947822429b47882.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 06:10:41 | <glguy> | better to just write: foo x = (x * (x-1))/2 |
| 06:13:02 | <Jadesheit[m]> | yeah, I know how it expands, I'm just wondering whether it is readable |
| 06:13:05 | → | titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de) |
| 06:14:05 | <glguy> | I'd consider it strictly worse than writing it out directly |
| 06:14:26 | <glguy> | and lots of Haskellers won't know what it does without expending some effort |
| 06:15:38 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 06:22:37 | <Jadesheit[m]> | lets imagine a situation where we had x * (x - 1) alone |
| 06:22:56 | <Jadesheit[m]> | would you consider `foo = pred >>= (*)` to be worse still? |
| 06:23:14 | <Jadesheit[m]> | (looking for a genuine answer, not trying to argue) |
| 06:25:20 | <dsal> | It depends on your goals, I guess. What's your goal here? If it's "write the most readable code" then I don't think that's helping. |
| 06:25:56 | <Jadesheit[m]> | yeah, that makes sense |
| 06:25:58 | <Jadesheit[m]> | thank you |
| 06:26:41 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:3e07:3355:d9d1:6eb5) (Remote host closed the connection) |
| 06:27:05 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:346e:4e3b:9993:32a8) |
| 06:30:49 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:42:36 | → | kenran joins (~user@user/kenran) |
| 06:44:43 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 06:46:02 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 256 seconds) |
| 06:47:34 | → | tomku joins (~tomku@user/tomku) |
| 06:47:43 | → | gmg joins (~user@user/gehmehgeh) |
| 06:53:31 | → | talismanick joins (~talismani@2601:200:c181:4c40::1be2) |
| 07:08:08 | → | trev joins (~trev@user/trev) |
| 07:11:06 | → | vykt joins (~vykt@92.40.124.204.threembb.co.uk) |
| 07:11:15 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:5001:9128:80c0:62b0) |
| 07:11:28 | <vykt> | I know next to nothing about Haskell. What is it good for? |
| 07:12:01 | <vykt> | I've been considering learning it because functional programming sounds cool. |
| 07:17:10 | <jackdk> | Haskell is my favourite general-purpose programming language, because I think FP is a great paradigm for solving problems. Professionally, I use it mostly for back-end web services |
| 07:22:08 | <dsal> | Yeah, I use Haskell for any programming I need to do. I use at work for moving money around. |
| 07:22:15 | <dsal> | Haskell's nice because of all the things you can make not work. |
| 07:26:11 | <jackdk> | vykt: what do you think of when you say "functional programming", and do you have any questions that could help us focus our responses? |
| 07:32:18 | → | laalyn joins (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) |
| 07:32:44 | <[exa]> | vykt: we had this brainstorming session here a few years back finding widely-used software written in haskell, check out the logs (see topic) |
| 07:33:05 | <c_wraith> | I think Haskell is probably best for writing software. It's not great for building swimming pools or raising cattle. |
| 07:33:21 | <[exa]> | vykt: anyway everyone's favorite is I guess pandoc, parsing and manipulating even really complicated syntax structures is moreless straightforward in haskell |
| 07:34:49 | <[exa]> | vykt: ...at least compared to the usual gymnastics you're forced to do in mainstream languages for parsing stuff |
| 07:35:34 | → | mbuf joins (~Shakthi@49.204.129.175) |
| 07:35:49 | <c_wraith> | Within the software realm, I think haskell pays off best when you intend to work on a product that you maintain long-term. That's where its advantages pay off the most. (They pay off in other places too, but not all of them, and not to the same extent) |
| 07:37:24 | <jackdk> | I do think it's really good for quick hacky stuff, because you can avoid hacking up footguns |
| 07:37:48 | <c_wraith> | Oh, I can reintroduce all those footguns very quickly. :P |
| 07:38:16 | <c_wraith> | It's when I care *not* to that things go best :) |
| 07:39:39 | <[exa]> | yeah and the workflow "omgomg dep update broke things" --> "trivially fix the 10 type errors that compiler reported" --> "all okay" |
| 07:39:46 | <[exa]> | (reliably) |
| 07:43:12 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 07:46:10 | <vykt> | Thanks for the replies guys. |
| 07:46:20 | <vykt> | jackdk: No idea yet, I'm going into it blind. |
| 07:47:18 | → | mmhat joins (~mmh@p200300f1c7123cecee086bfffe095315.dip0.t-ipconnect.de) |
| 07:47:57 | <jackdk> | To me, functional programming means programming with pure functions: functions that have no side-effects, and whose outputs depend only on their inputs. Because Haskell takes this idea extremely seriously, there are a lot of consequences to this idea, and it can take a while to shake off old instincts about how to solve problems. |
| 08:10:22 | <maerwald[m]> | That's the theory |
| 08:10:55 | → | int-index joins (~Vladislav@2a00:1370:8178:5994:bd51:c650:be55:9635) |
| 08:12:10 | × | shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 256 seconds) |
| 08:12:29 | × | Volt_ quits (~Volt_@c-73-167-118-200.hsd1.ma.comcast.net) (Quit: ) |
| 08:13:11 | → | Volt_ joins (~Volt_@c-73-167-118-200.hsd1.ma.comcast.net) |
| 08:14:56 | × | kee quits (~~kee@user/wizzwizz4) (Ping timeout: 272 seconds) |
| 08:16:23 | × | sterni quits (~lukas@user/sterni) (Ping timeout: 264 seconds) |
| 08:19:34 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 08:21:35 | → | razetime joins (~Thunderbi@117.193.4.54) |
| 08:23:25 | × | mmhat quits (~mmh@p200300f1c7123cecee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8) |
| 08:25:14 | <merijn> | c_wraith: It also pays off with codebases you don't touch intermittently for over a year :p |
| 08:25:35 | <c_wraith> | is that not what maintenance is? :P |
| 08:27:13 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:29:01 | → | CiaoSen joins (~Jura@p200300c95723a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:31:55 | → | nschoe joins (~q@141.101.51.197) |
| 08:33:40 | <maerwald[m]> | The worst code I've ever worked with was written in Haskell. The above mentioned concepts don't shield from poor engineering. Rather they can enable good engineering |
| 08:34:16 | <maerwald[m]> | These days I'm more interested in what good engineering is and less in languages |
| 08:34:29 | → | kee joins (~~kee@user/wizzwizz4) |
| 08:35:20 | <merijn> | @quote Unknown in.any.language |
| 08:35:21 | <lambdabot> | Unknown says: Real programmers can write assembly code in any language. :-) |
| 08:35:52 | <merijn> | maerwald[m]: Well, if I'm the one responsible for doing good engineering, I care about languages which make that easier ;) |
| 08:41:21 | → | fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) |
| 08:44:35 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 08:48:50 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 08:49:33 | <lortabac> | maerwald[m]: theoretically I agree with you, but in practice I consistently find that my Haskell code is easier to maintain that my code written in other languages |
| 08:49:44 | <lortabac> | *than my code |
| 08:50:47 | <lortabac> | I have too much empirical evidence to dismiss this as a coincidence |
| 08:51:11 | <int-index> | maerwald[m]: what is good engineering? do you have books or other resources on this topic, either language agnostic or applicable in Haskell? |
| 08:51:21 | → | boxscape_ joins (~boxscape_@81.191.27.107) |
| 08:52:59 | <merijn> | int-index: If I (or maerwald[m] or anyone else) knew how to explicitly quantify and/or teach "good engineering" most of the world's software wouldn't be so terrible ;) |
| 08:53:28 | × | laalyn quits (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) (Quit: Client closed) |
| 08:54:46 | × | ft quits (~ft@p4fc2a257.dip0.t-ipconnect.de) (Quit: leaving) |
| 08:54:55 | <int-index> | merijn: not asking for a formal definition or a tutorial, but surely there must be case studies, examples and counterexamples |
| 08:55:07 | <int-index> | if the concept exists, we should be able to observe it |
| 08:55:18 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 08:56:28 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 08:59:09 | <energizer> | int-index: there are lots of people who claim to know how to identify and reproduce it. whether they're correct is more of a question |
| 08:59:13 | <merijn> | good engineering is like porn...I know it when I see it ;) |
| 09:00:41 | → | kuttenbrunzer joins (~kuttenbru@2a02:8108:8b80:1d48:a105:a414:232d:e96d) |
| 09:01:39 | × | kuttenbrunzer quits (~kuttenbru@2a02:8108:8b80:1d48:a105:a414:232d:e96d) (Read error: Connection reset by peer) |
| 09:08:28 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 09:09:01 | × | razetime quits (~Thunderbi@117.193.4.54) (Remote host closed the connection) |
| 09:11:19 | × | titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection) |
| 09:12:10 | × | talismanick quits (~talismani@2601:200:c181:4c40::1be2) (Ping timeout: 252 seconds) |
| 09:13:56 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:346e:4e3b:9993:32a8) (Ping timeout: 256 seconds) |
| 09:15:00 | → | romesrf joins (~romes@192.22.63.94.rev.vodafone.pt) |
| 09:19:42 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) (Remote host closed the connection) |
| 09:25:39 | <Guillaum[m]> | I have an interesting (well, from my point of view ;) problem. I do have a ByteStream (let say a Stream from streaming) which is only composed of pure operation (i.e. no stored internal effects). I do have a retry strategy (retry (useMyStream myStream)) where "retry" just indefinitely retry until the operation useMyStream succeed. Unfortunately, this retry strategy realizes the complete stream in memory (which is unfortunate, it uses 10 |
| 09:25:39 | <Guillaum[m]> | GiB of RAM as a linked list of small ByteString, so it kills my ram and GC efficency). Is there a way to "split" a reference (to myStream), so the consumer (useMyStream) will unfold lazyly the stream in O(1) memory, and the remaining reference will keep a "lazy" reference to the rest of the stream. |
| 09:28:28 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 09:32:41 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds) |
| 09:34:45 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 09:35:57 | → | avicenzi joins (~avicenzi@2a00:ca8:a1f:b004::c32) |
| 09:36:48 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 09:37:35 | → | califax joins (~califax@user/califx) |
| 09:39:18 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 260 seconds) |
| 09:40:20 | → | pagnol joins (~user@213-205-209-87.ftth.glasoperator.nl) |
| 09:42:22 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 09:44:07 | → | califax joins (~califax@user/califx) |
| 09:51:13 | → | MajorBiscuit joins (~MajorBisc@145.94.179.130) |
| 09:52:39 | → | alt-romes joins (~romes@192.22.63.94.rev.vodafone.pt) |
| 09:55:23 | × | romesrf quits (~romes@192.22.63.94.rev.vodafone.pt) (Ping timeout: 248 seconds) |
| 10:02:22 | <maerwald[m]> | int-index: don't have books. But there are recurring topics. I believe it's a lot about the ways you think about programs. Composition, control flow, abstraction layers, boundaries, effects, complexity, ... |
| 10:03:13 | <maerwald[m]> | Programmers usually build up intuition about these through negative (not positive) experience imo |
| 10:06:02 | <int-index> | I'll read yours if you write one :-) |
| 10:07:39 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 10:09:33 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 10:09:34 | <int-index> | The list of topics is interesting, but it doesn't tell me what you think counts as good (or bad) engineering with regards to those topics. |
| 10:10:02 | × | xff0x_ quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 256 seconds) |
| 10:10:39 | <maerwald[m]> | Yeah, I think we often go the wrong route trying to be very technical about metrics, like cyclomatic complexity |
| 10:10:40 | <maerwald[m]> | When in the end it's the programmer with his brain who needs to get it |
| 10:11:25 | <maerwald[m]> | Seeing the program as a form of communication as well |
| 10:14:43 | <lortabac> | perhaps some parts of what constitues good engineering are actually measurable |
| 10:15:00 | <int-index> | I've got some opinions on how code should or shouldn't be written, but I can't really tell if I have a feel for good engineering or if I just have... opinions. |
| 10:15:08 | <lortabac> | for example measuring how long it takes for a newcomer to understand the code |
| 10:15:41 | <int-index> | So you say that you're more interested in good engineering than languages, which is why I was hoping I could cross check my opinions against the ones of someone who actually put some thougts into what makes engineering good |
| 10:16:13 | <maerwald[m]> | Lots of thoughts, mostly unstructured though |
| 10:16:32 | × | troydm quits (~troydm@user/troydm) (Ping timeout: 272 seconds) |
| 10:16:54 | <merijn> | same :p |
| 10:17:22 | × | panovia quits (~user@user/siracusa) (Quit: Bye!) |
| 10:18:43 | <maerwald[m]> | https://www.cs.vu.nl/~wanf/pubs/wodes22-storm_surge_barrier.pdf |
| 10:18:44 | → | ubert1 joins (~Thunderbi@2a02:8109:abc0:6434:774d:958d:e54d:fb2f) |
| 10:18:54 | <maerwald[m]> | One of my favorites on this topic |
| 10:19:15 | <merijn> | ah, that's the one about the Deltawerken, right? |
| 10:20:11 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) |
| 10:20:31 | <maerwald[m]> | Don't know. But they had to approach the thing differently than a crazy blockchain startup |
| 10:21:13 | <maerwald[m]> | I think good engineering always cryztallizes when safety or security is involved |
| 10:21:15 | <merijn> | ah, yeah, that seems to be a shorter version of the longer report |
| 10:22:30 | <maerwald[m]> | E.g. the LANGSEC project that tried to define how to think of program input |
| 10:23:01 | <maerwald[m]> | And what it even means for a program to be "secure" |
| 10:23:24 | → | __monty__ joins (~toonn@user/toonn) |
| 10:23:40 | <maerwald[m]> | Maybe ChatGPT can answer all that and we'll go back watching Netflix. |
| 10:24:37 | <dminuoso> | Im already working to connect ChatGPT to Slack and Emacs, so I can just kickback and bingewatch Stargate SG1 all over again while getting paaid. |
| 10:24:43 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) (Ping timeout: 248 seconds) |
| 10:25:13 | <merijn> | dminuoso: Did you watch The Orville yet? |
| 10:25:22 | <dminuoso> | Of course, best Star Trek since TNG |
| 10:25:28 | <maerwald[m]> | ChatGPT will be writing the script for the next SG episode too |
| 10:25:51 | <merijn> | It's on my list, but so far I couldn't be arsed to get access to it :p |
| 10:25:54 | <maerwald[m]> | We've covered input and output |
| 10:26:06 | <maerwald[m]> | Cycle completed |
| 10:26:16 | <dminuoso> | merijn: It's more Star Trek than most Star Trek series. It's that good. |
| 10:26:20 | <merijn> | It's looking very much like a "yarrrrrr!" situation |
| 10:27:00 | <dminuoso> | maerwald[m]: Cunning. |
| 10:28:08 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:60c4:8c39:337d:f64b) |
| 10:28:08 | <dminuoso> | https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Tuple.html#t:Solo |
| 10:28:12 | <dminuoso> | Huh I just learned today this exists. |
| 10:28:41 | <dminuoso> | I guess that makes `Only` obsolete? |
| 10:28:43 | × | scoopahdoopah quits (~quassel@050-089-109-059.res.spectrum.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 10:29:01 | <dminuoso> | Ah not quite, thats a newtype rather than data. |
| 10:29:12 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 10:30:25 | → | bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:31:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 10:34:45 | <jackdk> | I just built ghc 8.10.7 and 9.2.4 for unimportant cross-compilation reasons, and the 9.2.4 build is so much faster. Mad props to whoever worked on that. |
| 10:36:29 | × | MajorBiscuit quits (~MajorBisc@145.94.179.130) (Ping timeout: 256 seconds) |
| 10:37:07 | → | zmt01 joins (~zmt00@user/zmt00) |
| 10:38:56 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 256 seconds) |
| 10:48:58 | × | mei quits (~mei@user/mei) (Killed (calcium.libera.chat (Nickname regained by services))) |
| 10:49:03 | → | mei joins (~mei@user/mei) |
| 10:52:39 | → | jespada_ joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
| 10:53:05 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 10:53:30 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 10:54:51 | → | zaquest joins (~notzaques@5.130.79.72) |
| 10:56:11 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds) |
| 11:05:59 | × | alt-romes quits (~romes@192.22.63.94.rev.vodafone.pt) (Ping timeout: 260 seconds) |
| 11:09:11 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 255 seconds) |
| 11:11:41 | × | jespada_ quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 11:12:22 | → | xff0x_ joins (~xff0x@2405:6580:b080:900:686d:5028:75b2:f9bc) |
| 11:14:14 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 11:14:59 | → | Midjak joins (~Midjak@82.66.147.146) |
| 11:21:20 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 255 seconds) |
| 11:22:00 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:60c4:8c39:337d:f64b) (Remote host closed the connection) |
| 11:22:19 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:649d:906:73a0:f4eb) |
| 11:22:23 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 11:23:03 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:27:15 | → | Felipe_ joins (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) |
| 11:27:21 | × | Felipe_ quits (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) (Client Quit) |
| 11:27:28 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 11:28:42 | × | Joao003 quits (~Joao003@2804:840:8311:d200:a956:d19c:27e1:d97d) (Remote host closed the connection) |
| 11:29:29 | → | Joao003 joins (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) |
| 11:44:00 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 11:44:53 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 11:45:09 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 11:45:58 | → | juri_ joins (~juri@84-19-175-179.pool.ovpn.com) |
| 11:46:25 | × | pagnol quits (~user@213-205-209-87.ftth.glasoperator.nl) (Remote host closed the connection) |
| 11:46:38 | → | pagnol joins (~user@213-205-209-87.ftth.glasoperator.nl) |
| 11:46:48 | → | califax joins (~califax@user/califx) |
| 11:49:08 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 255 seconds) |
| 11:52:14 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 11:56:34 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 12:00:48 | <lortabac> | maerwald[m]: if you are around... what was the trick to have multiple instances of HLS each with its own GHC version? |
| 12:01:19 | <lortabac> | I remember you told me to launch my editor with some env var |
| 12:01:57 | <lortabac> | it was something like 'GHC_VERSION=9.2.5 vim' |
| 12:08:38 | × | glguy quits (~glguy@libera/staff-emeritus/glguy) (Ping timeout: 272 seconds) |
| 12:09:36 | → | glguy joins (~glguy@libera/staff-emeritus/glguy) |
| 12:10:16 | × | glguy quits (~glguy@libera/staff-emeritus/glguy) (Read error: Connection reset by peer) |
| 12:10:57 | → | glguy joins (~glguy@libera/staff-emeritus/glguy) |
| 12:13:18 | × | leah2 quits (~leah@vuxu.org) (Ping timeout: 260 seconds) |
| 12:13:34 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8) |
| 12:14:58 | → | perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
| 12:19:17 | → | leah2 joins (~leah@vuxu.org) |
| 12:27:00 | <maerwald> | lortabac: what exactly are you trying to do? |
| 12:27:13 | <maerwald> | are you using ghcup? |
| 12:27:43 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 12:27:55 | <lortabac> | maerwald: I have two projects, using two different GHC versions |
| 12:28:11 | <lortabac> | I want to be able to work on both on them at the same time (in two editor instances of course) |
| 12:28:19 | <lortabac> | yes I use ghcup |
| 12:28:43 | <maerwald> | lortabac: haskell-language-server-wrapper should figure that out on its own |
| 12:28:52 | <maerwald> | so use that as the LSP executable |
| 12:28:59 | <lortabac> | I use it |
| 12:29:01 | <maerwald> | and? |
| 12:29:23 | <lortabac> | it calls the default 'ghc' command, which is a link to a specific version |
| 12:29:24 | <maerwald> | is the ghc version set in cabal.project? |
| 12:29:39 | <maerwald> | with-compiler: ghc-9.4.4 |
| 12:29:53 | <lortabac> | ah right, I can also set it in cabal.project |
| 12:30:04 | <maerwald> | otherwise: ghcup run --ghc 9.4.4 -- vim |
| 12:30:30 | <lortabac> | oh maybe that's what you had told me |
| 12:31:03 | <lortabac> | setting the version in cabal.project is probably simpler |
| 12:31:25 | <Axman6> | jackdk: GHC's performance over the last few years has improved a lot, I feel 8.10 was probably a low (high?) point in compilation times and a lot of effort has gone into the little constant factor changes that add up (hoping that my LLVM work at the moment will be one of those such changes for the very few people who need LLVM compilation) |
| 12:32:41 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 12:32:42 | <maerwald> | lortabac: if you want to set it as part of the startup script you should do: ghcup --offline run -q --ghc 9.4.4 -- <command> |
| 12:32:51 | <maerwald> | that will be fast without network calls |
| 12:33:42 | <lortabac> | maerwald: thanks |
| 12:37:19 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds) |
| 12:37:24 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 12:45:53 | → | MajorBiscuit joins (~MajorBisc@145.94.179.130) |
| 12:48:57 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Remote host closed the connection) |
| 12:49:21 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 12:49:59 | × | bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 12:50:56 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 12:51:52 | × | Teacup quits (~teacup@user/teacup) (Quit: Teacup) |
| 12:52:04 | → | bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex) |
| 12:55:56 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 13:00:34 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds) |
| 13:08:24 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 13:13:01 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 13:13:48 | × | notzmv quits (~zmv@user/notzmv) (Read error: Connection reset by peer) |
| 13:16:36 | → | troydm joins (~troydm@user/troydm) |
| 13:17:32 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 13:18:55 | → | notzmv joins (~zmv@user/notzmv) |
| 13:21:37 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 13:23:04 | → | kuttenbrunzer joins (~kuttenbru@2a02:8108:8b80:1d48:f5dc:d5b8:d2d1:f55c) |
| 13:23:59 | × | johnjaye quits (~pi@173.209.64.74) (Ping timeout: 246 seconds) |
| 13:25:29 | × | jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Remote host closed the connection) |
| 13:26:07 | → | jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
| 13:26:24 | → | johnjaye joins (~pi@173.209.64.74) |
| 13:27:05 | → | Teacup joins (~teacup@user/teacup) |
| 13:28:31 | × | Teacup quits (~teacup@user/teacup) (Client Quit) |
| 13:28:53 | → | Teacup joins (~teacup@user/teacup) |
| 13:29:33 | × | Joao003 quits (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) (Quit: Leaving) |
| 13:32:17 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds) |
| 13:32:45 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 13:34:17 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 13:40:25 | × | bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:52:03 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 265 seconds) |
| 13:59:30 | <jean-paul[m]> | Doing FFI to a C API with an output parameter, my Haskell code doesn't see the new value of the output - https://gist.github.com/exarkun/dd5dc9303ad8bc708369b4594baab741 - outputSizes is 0x0 before and after the call to zfec_encode. Did I do something wrong in the Haskell code? |
| 14:00:23 | <jean-paul[m]> | Uhh I read the point before the call, oops :( Thanks. |
| 14:00:39 | <Axman6> | Glad we could help! |
| 14:01:04 | <dminuoso> | Axman6: You were supposed to get unwarranted gratitude tomorrow. It's my turn today. |
| 14:02:22 | <Axman6> | I couldn't've done it without you dminuoso, you even get a double contraction for it |
| 14:02:36 | <dminuoso> | Beautiful |
| 14:04:32 | <Axman6> | jean-paul[m]: this is good news though, you have truly internalised the idea that the value of things should never change - you'll make a poor economist, but an excellent Haskeller |
| 14:04:50 | <jean-paul[m]> | :) |
| 14:06:15 | <Axman6> | A Haskeller knows the value of everything, eventually, and the cost of none |
| 14:12:08 | × | kuttenbrunzer quits (~kuttenbru@2a02:8108:8b80:1d48:f5dc:d5b8:d2d1:f55c) (Read error: Connection reset by peer) |
| 14:16:06 | × | dsrt^ quits (~dsrt@76.145.190.81) (Remote host closed the connection) |
| 14:16:43 | → | thegeekinside joins (~thegeekin@189.217.82.244) |
| 14:18:02 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 14:22:32 | × | thegeekinside quits (~thegeekin@189.217.82.244) (Remote host closed the connection) |
| 14:22:44 | → | thegeekinside joins (~thegeekin@189.217.82.244) |
| 14:22:48 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 14:23:52 | <Axman6> | Guillaum[m]: Can you share some more concrete code? I think I understand, but I have a feeling the answer if going to be that you'll need to take care of sharing references yourself |
| 14:25:19 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 14:25:36 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 256 seconds) |
| 14:30:36 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 14:31:10 | → | chele joins (~chele@user/chele) |
| 14:37:02 | angelz | Dunno |
| 14:39:01 | <int-index> | Axman6: since you're working on LLVM perf, could you take a look at https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9728? It may (or may not) improve the performance of CmmToLlvm |
| 14:42:23 | → | vektor joins (~vektor@IP-045136170253.dynamic.medianet-world.de) |
| 14:44:23 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 14:46:22 | → | califax joins (~califax@user/califx) |
| 14:47:42 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 14:50:26 | → | kadoban joins (~kadoban@user/kadoban) |
| 14:52:05 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 260 seconds) |
| 14:53:16 | <Cheery> | I'm looking for some reading. Anyone knows where to look? |
| 14:53:43 | <Cheery> | interested about programming languages, category theory, type theory |
| 14:55:11 | <stefan-_> | Cheery, https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ |
| 14:55:26 | <anatta> | depends on your level - but for programming languages I liked the dragon book |
| 14:55:32 | <anatta> | https://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811 |
| 14:55:49 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 14:55:56 | <dminuoso> | "Types and Programming Languages" by pierce is a great book on type theory and a touch on programming languages. |
| 14:56:30 | <dminuoso> | I didnt quite like the dragon book though |
| 14:56:34 | <Cheery> | I've read these all through. TAPL I supposed could read through again. |
| 14:57:05 | → | kurbus joins (~kurbus@user/kurbus) |
| 14:57:54 | <Axman6> | int-index: yeah I saw you'd done that - I would love to but I still haven't been able to find out how to measure performance of GHC, the performance metrics seem to be some kind of black art that I can't get it to compare different runs ever |
| 14:58:09 | × | pagnol quits (~user@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 255 seconds) |
| 14:59:18 | <Cheery> | anything really hard reading that goes beyond all this? |
| 15:00:10 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 15:00:41 | <geekosaur> | HoTT, if you want really hard 🙂 |
| 15:01:06 | <geekosaur> | @where hott |
| 15:01:06 | <lambdabot> | http://homotopytypetheory.org/book/ |
| 15:01:47 | <Cheery> | I've read it to about halfway and stalled. I could read it. |
| 15:02:07 | <Cheery> | I liked "Conceptual Mathematics: A First Introduction to Categories", I found it from baez' list. |
| 15:02:14 | <Cheery> | https://math.ucr.edu/home/baez/topos.html |
| 15:03:18 | <Cheery> | Well if I loosen the conditions I've given, eg. leaving plt, category theory, type theory aside, would you then have recommendations? |
| 15:04:17 | <Axman6> | Hacker's Delight is always a delight to read - a long way from what you seem to be after though |
| 15:05:51 | <Cheery> | looks fun. |
| 15:09:04 | × | inversed quits (~inversed@bcdcac82.skybroadband.com) (Ping timeout: 252 seconds) |
| 15:09:12 | → | mikoto-chan joins (~mikoto-ch@164.5.249.78) |
| 15:09:24 | <Axman6> | whenever I'm writing something that's performance critical and I have a feeling there's a branchless implementation, I'll head there. so many fun tricks |
| 15:10:04 | <Axman6> | I used some similar ideas in the previous attempt to make text use utf-8, and made some of the functions 100x faster |
| 15:11:55 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 15:13:50 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Read error: Connection reset by peer) |
| 15:15:21 | → | inversed joins (~inversed@bcdcac82.skybroadband.com) |
| 15:15:22 | <anatta> | I looked up Hacker's Delight on wikipedia, and in the list of "Further reading" they had this which sounds like a hit piece: |
| 15:15:26 | <anatta> | Anderson, Sean Eron, ed. (2009-11-26) [1997]. "Bit Twiddling Hacks" (...) |
| 15:16:09 | → | shriekingnoise joins (~shrieking@186.137.175.87) |
| 15:16:36 | Axman6 | is a bit twiddling hack |
| 15:17:59 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 15:18:47 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 15:24:49 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) |
| 15:25:04 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:25:29 | <int-e> | . o O ( oh god, was that an innuendo all along ) |
| 15:26:19 | → | nilcdr joins (~nilcdr@user/nilcdr) |
| 15:29:31 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) (Ping timeout: 260 seconds) |
| 15:31:59 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 255 seconds) |
| 15:32:40 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 15:39:14 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Client closed) |
| 15:41:36 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 15:41:54 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 15:44:00 | → | razetime joins (~Thunderbi@117.193.4.54) |
| 15:50:50 | × | MajorBiscuit quits (~MajorBisc@145.94.179.130) (Quit: WeeChat 3.6) |
| 15:52:52 | × | Arsen quits (arsen@managarm/dev/Arsen) (Changing host) |
| 15:52:52 | → | Arsen joins (arsen@gentoo/developer/managarm.dev.Arsen) |
| 15:55:37 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 15:59:29 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds) |
| 15:59:57 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 16:00:28 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 16:03:16 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 16:04:06 | <raehik> | Every time I write docs I google this, so I feel I should ask once and for all: what is the name for the `ReqClass a` in `instance ReqClass a => MainClass a where`? |
| 16:04:26 | <geekosaur> | constraint |
| 16:04:41 | <raehik> | pfft. oh my god I'm dumb |
| 16:04:42 | <dminuoso> | raehik: It's called contextof the instance declaration. |
| 16:04:48 | <dminuoso> | *context of the instance declaration |
| 16:04:54 | <raehik> | ohhhh but that's interesting, I keep thinking context |
| 16:05:18 | <dminuoso> | See https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/instances.html#instance-declarations-and-resolution |
| 16:05:55 | <dminuoso> | Similarly https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-630004.1 |
| 16:06:15 | <raehik> | thanks dminuoso, geekosaur |
| 16:06:23 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 16:06:29 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:07:08 | <dminuoso> | geekosaur's answer is still correct, but a constraint in instance declaration or class definition has that special name. |
| 16:07:18 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 16:07:40 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 16:08:43 | <raehik> | right. much happier with them than "superclass" which I keep thinking. some day I'll shake the rest of the OOP out |
| 16:08:52 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:5001:9128:80c0:62b0) (Quit: WeeChat 2.8) |
| 16:08:57 | <dminuoso> | superclass is also a thing. |
| 16:09:30 | <geekosaur> | although I prefer "prerequisite" |
| 16:09:36 | <dminuoso> | For a `class C a`, if `C a` appears as context for a class `D a`, then C is a superclass of D. |
| 16:09:36 | angelz | is now known as webmaster |
| 16:09:50 | <dminuoso> | There's a bunch of associated typing rules for that even |
| 16:09:56 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds) |
| 16:10:40 | → | cheater_ joins (~Username@user/cheater) |
| 16:10:58 | <dminuoso> | (ah well, its actually way more tricky than the previous statement, but its a good initial rough estimate) |
| 16:12:17 | <dminuoso> | Anyway, for the typing rules if you know `Ord a`, then that implies `Eq a` |
| 16:13:50 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 16:13:57 | cheater_ | is now known as cheater |
| 16:18:23 | × | vektor quits (~vektor@IP-045136170253.dynamic.medianet-world.de) (Quit: Client closed) |
| 16:19:14 | × | Volt_ quits (~Volt_@c-73-167-118-200.hsd1.ma.comcast.net) (Remote host closed the connection) |
| 16:23:28 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:649d:906:73a0:f4eb) (Ping timeout: 256 seconds) |
| 16:24:34 | × | nilcdr quits (~nilcdr@user/nilcdr) (Read error: Connection reset by peer) |
| 16:26:31 | × | mei quits (~mei@user/mei) (Quit: mei) |
| 16:27:02 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
| 16:27:31 | × | kronicmage quits (user90047@neotame.csclub.uwaterloo.ca) (Quit: WeeChat 3.0.1) |
| 16:27:45 | → | kronicmage joins (user37946@neotame.csclub.uwaterloo.ca) |
| 16:28:39 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 16:32:09 | × | chele quits (~chele@user/chele) (Quit: Leaving) |
| 16:38:15 | → | thyriaen joins (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) |
| 16:39:42 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 272 seconds) |
| 16:42:01 | → | myxokephale_ joins (~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) |
| 16:42:14 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 16:43:10 | × | myxokephale quits (~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Ping timeout: 252 seconds) |
| 16:44:18 | → | int-index-r joins (~Vladislav@2a00:1370:8178:5994:6490:ec14:6af:3fa6) |
| 16:44:48 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 16:48:11 | × | int-index quits (~Vladislav@2a00:1370:8178:5994:bd51:c650:be55:9635) (Ping timeout: 264 seconds) |
| 16:48:20 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 16:48:25 | → | hounded joins (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) |
| 16:48:32 | → | hounded_woodstoc joins (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) |
| 16:49:15 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) |
| 16:51:39 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 16:52:39 | × | ridcully quits (~ridcully@p508acd69.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 16:52:51 | → | ridcully joins (~ridcully@p508acd69.dip0.t-ipconnect.de) |
| 16:55:06 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 16:57:13 | ← | kadoban parts (~kadoban@user/kadoban) () |
| 16:57:13 | × | razetime quits (~Thunderbi@117.193.4.54) (Quit: See You Space Cowboy) |
| 17:00:03 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 17:00:19 | → | acidjnk joins (~acidjnk@p200300d6e715c4131152733c544888a6.dip0.t-ipconnect.de) |
| 17:01:05 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
| 17:01:20 | <zwro> | wait, is Eq or Ord the superclass? |
| 17:01:32 | <geekosaur> | Eq |
| 17:01:34 | <dminuoso> | Eq is the superclass of Ord |
| 17:01:52 | <zwro> | all is well then |
| 17:03:11 | <mauke> | all Ords are Eqs, but not all Eqs are Ords |
| 17:03:12 | <mauke> | and some Eqs are more Eq than others |
| 17:03:17 | → | acidjnk_new joins (~acidjnk@p200300d6e715c41381da8d03356c8335.dip0.t-ipconnect.de) |
| 17:03:35 | → | Joao003 joins (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) |
| 17:03:56 | × | acidjnk_new quits (~acidjnk@p200300d6e715c41381da8d03356c8335.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 17:04:34 | <zwro> | that's a classy joke |
| 17:05:21 | <Joao003> | what's the topic of the conversation here |
| 17:05:47 | <geekosaur> | [18 17:01:20] <zwro> wait, is Eq or Ord the superclass? |
| 17:05:56 | <mauke> | (specifically, the Eq instance for floating point numbers is a bit dodgy) |
| 17:06:17 | × | acidjnk quits (~acidjnk@p200300d6e715c4131152733c544888a6.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 17:06:19 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) (Remote host closed the connection) |
| 17:06:24 | <geekosaur> | discussing `class Eq a => Ord a where …` aka "superclass" constraints/contexts |
| 17:07:38 | → | acidjnk joins (~acidjnk@p200300d6e715c41325fe13a78d721b6b.dip0.t-ipconnect.de) |
| 17:07:40 | <zwro> | fixed point good, floating baaaad |
| 17:08:19 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 17:08:41 | × | trev quits (~trev@user/trev) (Remote host closed the connection) |
| 17:09:41 | × | ubert1 quits (~Thunderbi@2a02:8109:abc0:6434:774d:958d:e54d:fb2f) (Quit: ubert1) |
| 17:09:41 | <Rembane> | What's the fix point of floating point? And what's the point really? (Sorrysorrysorrysorry) |
| 17:10:22 | <anatta> | there was someone in the haskell discord the other day who was using floating point numbers as mcgyvered tuples and was upset that they got rounding errors |
| 17:10:24 | <zwro> | > fix ("sorry" <>) |
| 17:10:26 | <lambdabot> | "sorrysorrysorrysorrysorrysorrysorrysorrysorrysorrysorrysorrysorrysorrysorry... |
| 17:12:00 | <Joao003> | > fix (1 <>) |
| 17:12:02 | <lambdabot> | error: |
| 17:12:02 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M461655175536... |
| 17:12:02 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 17:12:17 | <Joao003> | > fix ("Hello, World!" <>) |
| 17:12:19 | <lambdabot> | "Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, Wor... |
| 17:12:20 | <zwro> | Joao003: use (:) |
| 17:12:28 | <Joao003> | > fix (1 (:)) |
| 17:12:30 | <lambdabot> | error: |
| 17:12:30 | <lambdabot> | • Could not deduce (Num ((a0 -> [a0] -> [a0]) -> a1 -> a1)) |
| 17:12:30 | <lambdabot> | (maybe you haven't applied a function to enough arguments?) |
| 17:12:40 | <zwro> | like this: |
| 17:12:41 | <Joao003> | > fix (1 :) |
| 17:12:42 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... |
| 17:12:47 | <zwro> | yup |
| 17:12:59 | <Joao003> | > "Hello, " <> "World!" |
| 17:13:01 | <lambdabot> | "Hello, World!" |
| 17:13:10 | <mauke> | > iterate sort [0/0, 1, 2, 0/0, 0, 5] |
| 17:13:13 | <lambdabot> | [[NaN,1.0,2.0,NaN,0.0,5.0],[0.0,5.0,NaN,1.0,2.0,NaN],[NaN,0.0,1.0,2.0,NaN,5.... |
| 17:13:49 | <anatta> | now listen here |
| 17:13:50 | <Joao003> | > repeat 1 |
| 17:13:53 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... |
| 17:14:12 | <zwro> | mauke: that's cruel |
| 17:14:25 | <Joao003> | <> is for string so it's for lists also |
| 17:14:28 | <Joao003> | right |
| 17:14:39 | <anatta> | <> is generalized ++ |
| 17:14:40 | <Joao003> | > [1, 2, 3] <> [4, 5, 6] |
| 17:14:42 | <lambdabot> | [1,2,3,4,5,6] |
| 17:14:59 | <Joao003> | > [1, 2, 3] ++ [4, 5, 6] |
| 17:15:00 | <lambdabot> | [1,2,3,4,5,6] |
| 17:15:09 | <Joao003> | for me they're all the same |
| 17:15:25 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 17:15:27 | <anatta> | :t (++) |
| 17:15:28 | <lambdabot> | [a] -> [a] -> [a] |
| 17:15:33 | <anatta> | :t (<>) |
| 17:15:35 | <lambdabot> | Semigroup a => a -> a -> a |
| 17:16:01 | <mauke> | > Just "do it" <> Just "dance" |
| 17:16:03 | <lambdabot> | Just "do itdance" |
| 17:16:28 | <Joao003> | > Just "do it" ++ Just " dance" |
| 17:16:30 | <lambdabot> | error: |
| 17:16:30 | <lambdabot> | • Couldn't match expected type ‘[a]’ |
| 17:16:30 | <lambdabot> | with actual type ‘Maybe [Char]’ |
| 17:16:35 | <Joao003> | obviously doesn't work |
| 17:16:44 | × | vykt quits (~vykt@92.40.124.204.threembb.co.uk) (Ping timeout: 246 seconds) |
| 17:16:57 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Quit: opticblast) |
| 17:17:13 | <Joao003> | > Left "will this" <> Right "work?" |
| 17:17:15 | <lambdabot> | Right "work?" |
| 17:17:16 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 17:17:22 | <Joao003> | oh it picked right |
| 17:17:31 | <Joao003> | > Left "will this" <> Left "work?" |
| 17:17:33 | <lambdabot> | Left "work?" |
| 17:17:44 | <Joao003> | it pick the rightmost one |
| 17:17:49 | <anatta> | > (++) <$> Just "part 1" <*> Just "part 2" |
| 17:17:51 | <lambdabot> | Just "part 1part 2" |
| 17:18:21 | <mauke> | > 1 <> 2 <> 3 :: Sum Int |
| 17:18:23 | <lambdabot> | Sum {getSum = 6} |
| 17:18:26 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Quit: Leaving) |
| 17:18:33 | <Joao003> | > (++) <$> Left "left and " <*> Right "right" |
| 17:18:34 | <lambdabot> | Left "left and " |
| 17:18:36 | <mauke> | > 1 <> 2 <> 3 :: Product Int |
| 17:18:38 | <lambdabot> | Product {getProduct = 6} |
| 17:18:48 | <Joao003> | spooky |
| 17:18:48 | → | vykt joins (~vykt@92.40.125.229.threembb.co.uk) |
| 17:18:56 | <zwro> | Joao003: You can think of Left and Right as False and True and (<>) as (||) |
| 17:19:23 | <zwro> | but annotated |
| 17:19:40 | <zwro> | it shortcircuits |
| 17:19:55 | <zwro> | False || x = x |
| 17:19:57 | <Joao003> | > (Right "right and " >>= (++)) "left" |
| 17:19:58 | <cstm[m]> | > Just "do it" <*> pure (<>) <*> Just "dance" |
| 17:19:59 | <lambdabot> | error: |
| 17:19:59 | <lambdabot> | • Couldn't match expected type ‘[Char] -> t’ |
| 17:19:59 | <lambdabot> | with actual type ‘Either a0 b0’ |
| 17:20:00 | <lambdabot> | error: |
| 17:20:00 | <lambdabot> | • Couldn't match type ‘[Char]’ |
| 17:20:01 | <lambdabot> | with ‘(a0 -> a0 -> a0) -> [Char] -> b’ |
| 17:20:05 | <mauke> | wait, Proxy has a Monoid instance? |
| 17:20:09 | <mauke> | that's a bit sus |
| 17:20:22 | <Joao003> | "sus" amogus moment |
| 17:20:43 | <cstm[m]> | > (<>) <$> Just "do it" <*> Just "dance" |
| 17:20:45 | <lambdabot> | Just "do itdance" |
| 17:21:04 | <Joao003> | > (Right "right and " >>= (<>)) Left "left" |
| 17:21:06 | <lambdabot> | error: |
| 17:21:06 | <lambdabot> | • Couldn't match expected type ‘(a1 -> Either a1 b1) |
| 17:21:06 | <lambdabot> | -> [Char] -> t’ |
| 17:21:11 | <Joao003> | > (Right "right and " >>= (<>))"left" |
| 17:21:13 | <lambdabot> | error: |
| 17:21:13 | <lambdabot> | • Couldn't match expected type ‘[Char] -> t’ |
| 17:21:13 | <lambdabot> | with actual type ‘Either a0 b0’ |
| 17:21:34 | <zwro> | Joao003: you can /msg lambdabot directly to avoid spamming the channel |
| 17:21:55 | → | titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de) |
| 17:22:00 | <Joao003> | zwro: me forgetting ghci exists: |
| 17:22:10 | <anatta> | Joao003: there is also <|> in Control.Applicative as another OR |
| 17:22:23 | <Joao003> | too many or gates |
| 17:22:31 | <anatta> | let's see if this works |
| 17:22:33 | <anatta> | @let import Control.Applicative |
| 17:22:35 | <lambdabot> | Defined. |
| 17:22:54 | <anatta> | > Nothing <|> Just "Something" |
| 17:22:56 | <lambdabot> | Just "Something" |
| 17:22:57 | <Joao003> | :t (|) |
| 17:22:59 | <lambdabot> | error: parse error on input ‘)’ |
| 17:23:15 | <Joao003> | :t (<|>) |
| 17:23:17 | <lambdabot> | Alternative f => f a -> f a -> f a |
| 17:23:45 | <Joao003> | > Left "not cool" <|> Right "cool" |
| 17:23:47 | <lambdabot> | Right "cool" |
| 17:24:07 | <Joao003> | > Left "not cool" <|> Left "not cool" |
| 17:24:09 | <lambdabot> | Left "not cool" |
| 17:24:23 | <Joao003> | or with alternatives |
| 17:25:15 | <zwro> | > Left 0 <|> Left 1 <|> Right 7 <|> Left 2 |
| 17:25:17 | <lambdabot> | error: |
| 17:25:17 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M745715984621... |
| 17:25:17 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 17:25:43 | zwro | sigh |
| 17:25:46 | <cstm[m]> | > Left (0 :: Int) <|> Left 1 <|> Right 7 <|> Left 2 |
| 17:25:48 | <lambdabot> | error: |
| 17:25:48 | <lambdabot> | • Could not deduce (Control.Monad.Trans.Error.Error Int) |
| 17:25:48 | <lambdabot> | arising from a use of ‘<|>’ |
| 17:26:08 | <Joao003> | how do you make the * send messages |
| 17:26:25 | <cstm[m]> | @zwro: It's because it can't deduce what the right branch is I think. |
| 17:26:25 | <lambdabot> | Unknown command, try @list |
| 17:26:48 | <cstm[m]> | so you have to do something like : |
| 17:26:48 | <cstm[m]> | > (Left 0 :: Either Int ()) <|> Left 1 <|> Right 7 <|> Left 2 |
| 17:26:50 | <lambdabot> | error: |
| 17:26:50 | <lambdabot> | • No instance for (Control.Monad.Trans.Error.Error Int) |
| 17:26:50 | <lambdabot> | arising from a use of ‘<|>’ |
| 17:26:55 | <dminuoso> | % :t (<|>) |
| 17:26:55 | <yahb2> | <interactive>:1:1: error: ; • Variable not in scope: <|> ; • Perhaps you meant one of these: ; ‘<*>’ (imported from Prelude), ‘<>’ (imported from Prelude), ; ‘<$>’ (imported... |
| 17:27:00 | <dminuoso> | :t (<|>) |
| 17:27:01 | <lambdabot> | Alternative f => f a -> f a -> f a |
| 17:27:16 | <Joao003> | % import Control.Applicative |
| 17:27:17 | <yahb2> | <no output> |
| 17:27:26 | <Joao003> | % :t (<|>) |
| 17:27:26 | <yahb2> | (<|>) :: Alternative f => f a -> f a -> f a |
| 17:27:37 | <dminuoso> | The Alternative instance is not from base |
| 17:28:01 | <Joao003> | dminuoso: yahb2 is separate from lambdabot |
| 17:28:11 | <dminuoso> | I know |
| 17:29:00 | <Joao003> | wait does this work |
| 17:29:05 | <Joao003> | @let one = 1 in one |
| 17:29:05 | <lambdabot> | Parse failed: Parse error: in |
| 17:29:05 | <dminuoso> | It just looks like there is some kind of `instance Control.Monad.Trans.Error.Error e => Alternative (Either e)` |
| 17:29:08 | <Joao003> | oh |
| 17:29:11 | <dminuoso> | Whatever that typeclass is. |
| 17:29:41 | <zwro> | wait |
| 17:29:58 | <zwro> | > (Left 0 :: Either Int Int) <|> (Left 1 :: Either Int Int) |
| 17:30:00 | <lambdabot> | error: |
| 17:30:00 | <lambdabot> | • No instance for (Control.Monad.Trans.Error.Error Int) |
| 17:30:00 | <lambdabot> | arising from a use of ‘<|>’ |
| 17:30:02 | × | remedan quits (~remedan@144.76.104.133) (Ping timeout: 265 seconds) |
| 17:30:16 | <zwro> | oh well |
| 17:30:21 | × | nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat) |
| 17:30:24 | <dminuoso> | Like I said. :) |
| 17:30:34 | <dminuoso> | The problem isnt the Right type, its the left type. |
| 17:30:44 | <dminuoso> | I just dont know what that `Error` typeclass is |
| 17:31:29 | <dminuoso> | :k Control.Monad.Trans.Error.Error |
| 17:31:30 | <lambdabot> | * -> Constraint |
| 17:31:36 | <cstm[m]> | Actually There is no `Alternative` instance defined for Either - that's why. https://hackage.haskell.org/package/base-4.17.0.0/docs/Control-Applicative.html#t:Alternative |
| 17:31:48 | <cstm[m]> | :info Alternative |
| 17:31:49 | <Joao003> | oh i guess it's failing so it's returning error and there's no error |
| 17:31:51 | <anatta> | it shouldn't be |
| 17:31:51 | <dminuoso> | cstm[m]: You cant determine that from that page. |
| 17:31:53 | × | mbuf quits (~Shakthi@49.204.129.175) (Quit: Leaving) |
| 17:31:56 | <anatta> | but it seems like it is here |
| 17:32:00 | <dminuoso> | cstm[m]: lambdabot has an orphan instance, clearly. |
| 17:32:21 | <zwro> | but it worked before |
| 17:32:35 | <zwro> | > Left "not cool" <|> Left "not cool" |
| 17:32:36 | <cstm[m]> | @dminuoso: why not? Instances are there under the typeclass. |
| 17:32:36 | <lambdabot> | Unknown command, try @list |
| 17:32:37 | <lambdabot> | Left "not cool" |
| 17:32:44 | <dminuoso> | zwro: yes, note now: |
| 17:32:52 | <dminuoso> | :t Left "not cool" <|> Left "not cool" |
| 17:32:53 | <lambdabot> | Either [Char] a |
| 17:32:54 | <cstm[m]> | > :info Alternative |
| 17:32:56 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
| 17:33:13 | <dminuoso> | zwro: And presumably an `instance Control.Monad.Trans.Error.Error [Char]`, or on `[a]` exists |
| 17:33:21 | ← | tsandstr parts (~user@2601:18b:8100:7300::524) (Killed buffer) |
| 17:33:25 | <mauke> | cstm: *some* instances are there under the typeclass |
| 17:33:27 | <dminuoso> | cstm[m]: only the typeclass instances known in that package. |
| 17:33:45 | <dminuoso> | cstm[m]: hackage doesnt feed hackage wide information into haddock. |
| 17:33:49 | <zwro> | well, ghci is giving me `No instance for (Alternative (Either String)) ...` |
| 17:33:53 | <Joao003> | guys |
| 17:33:55 | <zwro> | so idk what the hell is going on |
| 17:33:58 | <dminuoso> | the haddock is, mostly, just on a per-package basis. |
| 17:34:01 | <anatta> | yeah I can't run it locally either |
| 17:34:04 | <dminuoso> | zwro: yes, your ghci is not lambdabot |
| 17:34:16 | <Joao003> | you can use maxBound / minBound to determine if the user's machine is 32-bit or 64-bit |
| 17:34:24 | <cstm[m]> | Yes - but instances for types provided by base are always implemented in any library. |
| 17:34:36 | <cstm[m]> | @dminuoso:libera.chat: ^^ |
| 17:34:36 | <lambdabot> | Unknown command, try @list |
| 17:34:42 | <mauke> | Joao003: no, you can't (in general) |
| 17:35:11 | <mauke> | I mean, you probably can with how Int is currently implemented in ghc |
| 17:35:21 | <Joao003> | if the compiler is 32-bit / 64-bit |
| 17:35:25 | <mauke> | but I don't think that's a formal requirement |
| 17:35:55 | <Joao003> | my comp is 64-bit so it's appearing as approximately 9 quintillion |
| 17:36:09 | <zwro> | > (maxBound :: Int) == 9223372036854775807 -- lol |
| 17:36:11 | <lambdabot> | True |
| 17:36:45 | <Joao003> | > maxBound :: Integer -- doesn't exist (probably) |
| 17:36:46 | <lambdabot> | error: |
| 17:36:46 | <lambdabot> | • No instance for (Bounded Integer) |
| 17:36:46 | <lambdabot> | arising from a use of ‘maxBound’ |
| 17:37:07 | <Joao003> | see the difference between int and integer |
| 17:37:22 | <mauke> | > (maxBound :: Int32) == 9223372036854775807 |
| 17:37:23 | <lambdabot> | False |
| 17:37:28 | × | dequbed quits (~dequbed@banana-new.kilobyte22.de) (Quit: bye!) |
| 17:37:32 | <glguy> | % GHC.Platform.Host.hostPlatformArch |
| 17:37:32 | <yahb2> | ArchX86_64 |
| 17:37:46 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 17:37:47 | <glguy> | There's the GHC-specific way to check |
| 17:37:51 | <Joao003> | > GHC.Platform.Host.hostPlatformArch |
| 17:37:52 | <lambdabot> | error: |
| 17:37:53 | <lambdabot> | Not in scope: ‘GHC.Platform.Host.hostPlatformArch’ |
| 17:37:53 | <lambdabot> | No module named ‘GHC.Platform.Host’ is imported. |
| 17:38:08 | <glguy> | lambdabot doesn't expose that |
| 17:38:28 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 17:38:31 | <zwro> | none of this is confusing at all |
| 17:38:32 | <Joao003> | yahb2 is running on arch |
| 17:38:37 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
| 17:38:38 | <Joao003> | x86_64 |
| 17:38:50 | <Joao003> | if you wanna know my pc is x64 |
| 17:39:07 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 17:39:15 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Client Quit) |
| 17:39:22 | <mauke> | > (-1 :: Int32) == 9223372036854775807 |
| 17:39:24 | <lambdabot> | True |
| 17:39:50 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 17:39:54 | <Joao003> | > (-1 :: Int64) == 2147483647 |
| 17:39:56 | <lambdabot> | False |
| 17:40:07 | <Joao003> | > (-1 :: Int64) == (2147483647 :: Int32) |
| 17:40:09 | <lambdabot> | error: |
| 17:40:09 | <lambdabot> | • Couldn't match expected type ‘Int64’ with actual type ‘Int32’ |
| 17:40:09 | <lambdabot> | • In the second argument of ‘(==)’, namely ‘(2147483647 :: Int32)’ |
| 17:40:31 | → | dequbed joins (~dequbed@banana-new.kilobyte22.de) |
| 17:40:31 | <zwro> | Joao003: ArchX86_64 is not a reference to the Arch Linux distro |
| 17:40:39 | <Joao003> | ik |
| 17:40:45 | <zwro> | oh ok |
| 17:40:59 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 17:41:19 | <Joao003> | :k a -> a -> a |
| 17:41:20 | <lambdabot> | error: Not in scope: type variable ‘a’ |
| 17:41:20 | <lambdabot> | error: Not in scope: type variable ‘a’ |
| 17:41:20 | <lambdabot> | error: Not in scope: type variable ‘a’ |
| 17:41:28 | <Joao003> | NOT IN SCOPE 3X |
| 17:41:51 | <Joao003> | guys is there a function to extract out of a monad |
| 17:41:54 | <geekosaur> | surprised it didn't jam them all into one line like it usually does |
| 17:42:07 | <geekosaur> | not unless the monad provides one |
| 17:42:26 | → | barzo joins (~hd@31.223.41.44) |
| 17:42:31 | <geekosaur> | in particular the only way to get something "out of" IO is (>>=) |
| 17:42:34 | × | CiaoSen quits (~Jura@p200300c95723a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 17:42:40 | → | mmhat joins (~mmh@p200300f1c7123cecee086bfffe095315.dip0.t-ipconnect.de) |
| 17:42:42 | <Joao003> | you have either id id for Either |
| 17:42:50 | <anatta> | fromMaybe |
| 17:42:53 | zwro | thinks comonads |
| 17:43:23 | <zwro> | :t extract |
| 17:43:24 | <lambdabot> | error: Variable not in scope: extract |
| 17:43:32 | <Joao003> | > let extractEither = either id id in extractEither (Right 3) |
| 17:43:34 | <lambdabot> | 3 |
| 17:43:53 | <[exa]> | Joao003: there is no "generic" one (imagine e.g. extracting stuff from Const) |
| 17:44:07 | <Joao003> | imagine extracting values from Lists |
| 17:44:13 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 17:44:18 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Ping timeout: 272 seconds) |
| 17:44:20 | → | nek0 joins (~nek0@2a01:4f8:222:2b41::12) |
| 17:44:30 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds) |
| 17:44:59 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 17:45:00 | <anatta> | there are lots of immoral ways of extracting from lists though |
| 17:45:14 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 17:45:33 | <zwro> | :t Control.Comonad.extract |
| 17:45:35 | <lambdabot> | Control.Comonad.Comonad w => w a -> a |
| 17:45:55 | → | Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
| 17:46:42 | <anatta> | :t head |
| 17:46:43 | <lambdabot> | [a] -> a |
| 17:46:46 | <anatta> | :t (!!) |
| 17:46:48 | <lambdabot> | [a] -> Int -> a |
| 17:46:54 | <anatta> | so sad |
| 17:47:45 | <Joao003> | > head' = (!! 0) in head' [1..3] |
| 17:47:47 | <lambdabot> | <hint>:1:7: error: parse error on input ‘=’ |
| 17:47:52 | <Joao003> | > let head' = (!! 0) in head' [1..3] |
| 17:47:55 | <lambdabot> | 1 |
| 17:48:33 | <anatta> | you can write |
| 17:48:45 | <anatta> | > [1..3] !! 0 |
| 17:48:46 | <lambdabot> | 1 |
| 17:49:01 | <anatta> | but the question is whether you should |
| 17:49:09 | <anatta> | !! is partial |
| 17:49:35 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 255 seconds) |
| 17:49:59 | <anatta> | > [1..3] !! 3 |
| 17:50:01 | <lambdabot> | *Exception: Prelude.!!: index too large |
| 17:50:19 | <anatta> | you might get crashes |
| 17:50:22 | <Joao003> | > [1..] !! 1000000 |
| 17:50:24 | <lambdabot> | 1000001 |
| 17:50:31 | <Joao003> | > [1..] !! 1000000000000000000000000000000000000 |
| 17:50:33 | <lambdabot> | *Exception: Prelude.!!: negative index |
| 17:50:44 | <Joao003> | wth int wraparound |
| 17:51:00 | <Joao003> | > [1..] !! (1000000000000000000000000000000000000 :: Integer) |
| 17:51:03 | <lambdabot> | error: |
| 17:51:03 | <lambdabot> | • Couldn't match expected type ‘Int’ with actual type ‘Integer’ |
| 17:51:03 | <lambdabot> | • In the second argument of ‘(!!)’, namely |
| 17:51:07 | <Joao003> | lol |
| 17:51:29 | <Joao003> | > [1..] !! (1000000000000000000000000000000000000 :: Int128) |
| 17:51:31 | <lambdabot> | error: |
| 17:51:31 | <lambdabot> | Not in scope: type constructor or class ‘Int128’ |
| 17:51:31 | <lambdabot> | Perhaps you meant one of these: |
| 17:51:51 | × | Joao003 quits (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) (Quit: Leaving) |
| 17:51:52 | × | thyriaen quits (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Ping timeout: 256 seconds) |
| 17:52:57 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 17:57:53 | × | nschoe quits (~q@141.101.51.197) (Quit: Switching off) |
| 17:58:58 | → | econo joins (uid147250@user/econo) |
| 17:59:35 | → | segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
| 18:00:31 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) |
| 18:00:56 | → | kurbus joins (~kurbus@user/kurbus) |
| 18:02:22 | × | zwro quits (~z@user/zero) (Ping timeout: 252 seconds) |
| 18:06:15 | × | myxokephale_ quits (~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Remote host closed the connection) |
| 18:06:32 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 18:06:57 | → | myxokephale joins (~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) |
| 18:08:39 | × | codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
| 18:12:27 | → | akegalj joins (~akegalj@141-136-136-225.dsl.iskon.hr) |
| 18:15:17 | → | zero joins (~z@user/zero) |
| 18:17:56 | × | mmhat quits (~mmh@p200300f1c7123cecee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 18:18:19 | → | mmhat joins (~mmh@p200300f1c7123ce0ee086bfffe095315.dip0.t-ipconnect.de) |
| 18:19:59 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Ping timeout: 260 seconds) |
| 18:21:35 | → | Joao003 joins (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) |
| 18:21:42 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 18:23:43 | <EvanR> | !! is only partial if you pass in the wrong input relative to the list |
| 18:23:51 | <EvanR> | it's only illegal if you get caught |
| 18:24:39 | <EvanR> | sounds stupid but this is how dynamically typed real life cubical programming even works |
| 18:27:02 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 18:27:25 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 18:27:43 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 18:31:26 | <anatta> | I prefer dropping n and pattern matching |
| 18:32:30 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Client closed) |
| 18:32:45 | <anatta> | but it's not a hard rule, I just lean towards it |
| 18:33:52 | <EvanR> | when !! would work (because there's proof you used it right), it's more succint than drop + pattern match. If there is no proof, drop + pattern match is still wrong |
| 18:33:58 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 18:34:10 | <EvanR> | since you have to deal with the "impossible" empty case |
| 18:38:48 | <anatta> | Yes, but it forces you to think about and specify what you want, and it's not really less code if you have to wrap !! in checks anyway |
| 18:39:03 | <anatta> | I dunno, I think it's neater |
| 18:40:06 | <EvanR> | I'm only talking about cases where !! doesn't require checks |
| 18:40:19 | <EvanR> | actually in cases where putting checks would be nonsense |
| 18:41:10 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 18:42:07 | <EvanR> | as an example, the algorithm explicitly creates a list of size n, then creates i which must be less than n, then indexes into the list with i. |
| 18:43:32 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 18:43:35 | <EvanR> | (also i >= 0. All by virtue of the algorithm an not an explicit check. And the proof is on this napkin. Because we don't have the type system for it) |
| 18:47:05 | <anatta> | as I said, it's not a hard rule for me - but I'd say I have seen more code with partial functions I think should have been avoided than I have seen code I think would have been better with more partial functions |
| 18:47:26 | <Hecate> | https://nullprogram.com/blog/2023/01/18/ |
| 18:47:31 | <Hecate> | ah, another standard arrives |
| 18:48:00 | Rembane | waves appropriate xkcd strip around |
| 18:48:00 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 18:48:01 | × | barzo quits (~hd@31.223.41.44) (Ping timeout: 252 seconds) |
| 18:48:05 | <Hecate> | exactly |
| 18:48:13 | <Hecate> | didn't we have a discussion about pkg-config lately btw? |
| 18:48:32 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Ping timeout: 256 seconds) |
| 18:49:39 | <geekosaur> | yep |
| 18:50:48 | × | avicenzi quits (~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 256 seconds) |
| 18:51:25 | → | remedan joins (~remedan@144.76.104.133) |
| 18:54:03 | → | barzo joins (~hd@31.223.41.44) |
| 18:54:42 | × | mmhat quits (~mmh@p200300f1c7123ce0ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8) |
| 18:54:58 | <geekosaur> | so this is not so much another standard as it is a reimplementation of an existing one |
| 18:55:22 | <geekosaur> | (seriously, I had no idea the implementation of pkg-config was so baroque) |
| 18:59:25 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) (Remote host closed the connection) |
| 19:02:38 | <EvanR> | build systems ;_; |
| 19:02:44 | → | gmg joins (~user@user/gehmehgeh) |
| 19:04:30 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 19:05:05 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) |
| 19:05:48 | <mauke> | <Hecate> "https://nullprogram.com/blog/202..." <- I'm not at the end yet, but I don't really like the code in there |
| 19:06:48 | <mauke> | for example, #define SIZEOF(x) (Size)(sizeof(x)) uses parens where you don't need them, but is missing parens where you do need them |
| 19:06:49 | <mauke> | this is like C macro 101 |
| 19:07:04 | <dminuoso> | cstm[m]: Sure, and Im saying the instance in lambdabot comes from some module outside of `base`. |
| 19:07:34 | × | titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection) |
| 19:08:02 | <dminuoso> | re pkg-config, I think its one of the saner standards I wish more packages would adhere to. |
| 19:08:07 | → | irrgit__ joins (~irrgit@89.47.234.74) |
| 19:08:13 | <mauke> | similarly, the `S` macro only works (= produces correct code) with string literals, but makes no attempt to verify this (it could have used `"" s ""` in its body) |
| 19:10:56 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Read error: Connection reset by peer) |
| 19:11:08 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 19:11:19 | × | irrgit_ quits (~irrgit@146.70.27.250) (Ping timeout: 260 seconds) |
| 19:11:46 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 19:13:54 | <voidzero> | the book get programming with haskell - work through a huge chapter on how to process binary data aand in the end the code doesn't even work and there's no way to find out where the problem is |
| 19:13:59 | <voidzero> | i am so fed up with this stupid book |
| 19:14:05 | <voidzero> | it is so full of sloppy errors |
| 19:14:12 | voidzero | bangs head to desk |
| 19:14:14 | × | Cale quits (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Ping timeout: 272 seconds) |
| 19:14:24 | <Hecate> | oh that's not good |
| 19:14:32 | <Hecate> | voidzero: have you checked the errata for the book btw? |
| 19:14:40 | <Hecate> | I believe there's a system at Manning to report such things |
| 19:14:55 | → | Guest45 joins (~Guest45@94.120.126.185) |
| 19:15:04 | <voidzero> | Yeah. There's a forum where you can do that. It's filled to the brim with bugs, errors and whatnot |
| 19:15:11 | <voidzero> | do they not have editors and proofreaders? |
| 19:15:18 | → | Cale joins (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) |
| 19:15:22 | <Hecate> | holy shit |
| 19:16:40 | <voidzero> | it goes from ridiculous stuff like ligatures not working - like the character 'fi' so everywhere where there is a certain font and they have 'find', it looks like '□nd' |
| 19:16:50 | <voidzero> | in the print version that is |
| 19:17:24 | <Hecate> | wow I'm really to discover this about the book |
| 19:17:47 | <voidzero> | to working through an entire chapter on how to combine T.Text with B.ByteString and then later referring to BC.ByteString out of nowhere (sloppy), and ending up compiling code that, when executes, gives the following error |
| 19:17:50 | × | Guest45 quits (~Guest45@94.120.126.185) (Client Quit) |
| 19:17:53 | <voidzero> | *** Exception: Cannot decode byte '\xcc': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream |
| 19:18:36 | <voidzero> | it's ever so slightly annoyink :) |
| 19:18:44 | <voidzero> | </rant> |
| 19:18:57 | <voidzero> | is there a way in ghci to trace functions? |
| 19:19:36 | → | trev joins (~trev@user/trev) |
| 19:19:41 | <opqdonut> | yeah the ghci debugger is pretty nice |
| 19:19:57 | <geekosaur> | https://downloads.haskell.org/ghc/9.4.1/docs/users_guide/ghci.html#tracing-and-history |
| 19:20:12 | <opqdonut> | https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html#the-ghci-debugger |
| 19:20:15 | <opqdonut> | beat me to it |
| 19:21:11 | <voidzero> | thanks |
| 19:21:47 | <geekosaur> | there's also the ghc-vis package which plugs into ghci to visualize evaluation |
| 19:22:06 | <voidzero> | the example in the book has you stream a binary MARC file ('60s library data) and process it, output it to a html file |
| 19:22:41 | <voidzero> | but I just tried to process one single record to prevent the exception - and even the single record doesn't print to html |
| 19:23:20 | <voidzero> | at this point I kinda feel like daffy duck bouncing off screen screaming cuckoo until the credits roll |
| 19:25:25 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 19:25:32 | <voidzero> | because it took me 4 hours to type everything over by hand |
| 19:26:13 | <EvanR> | voidzero, if you can, use utf8 decoder that returns an Either and doesn't assume input is valid utf8 |
| 19:26:39 | <EvanR> | unless you have a proof lying around that it is valid for some reason |
| 19:26:40 | <mauke> | or better, don't decode binary data as utf-8 text? |
| 19:28:09 | <voidzero> | Yes I've seen that said before so I was a bit uncertain. But the book said, "MARC records are in a binary format that also makes heavy use of Unicode to properly store character encodings" |
| 19:28:38 | <EvanR> | well... sounds like that doesn't count as proof |
| 19:28:50 | <voidzero> | "To use MARC records, you have to be careful about separating when you’re working with bytes from when you’re working with text. This is a perfect problem to explore all you’ve learned in this unit!" :)) |
| 19:28:57 | <opqdonut> | when I was writing my course I was kind of wishing for a tool that would let me write a source file and tests for it, and then somehow declaratively embed certain definitions or parts inside the text |
| 19:29:15 | <EvanR> | yeah so so parts of the data are supposedly UTF-8, but even then, you don't really know |
| 19:29:20 | <EvanR> | some parts* |
| 19:29:26 | <mauke> | that sounds like literate programming |
| 19:29:29 | <opqdonut> | literate programming is great when it's ok to be code-first, but I wanted to concentrate on the text and just ensure my examples were consistent |
| 19:29:30 | <voidzero> | Agree. You don't really know. |
| 19:29:56 | <opqdonut> | I mean, for a blog post, literate programming is great, for introductory material, maybe a bit less great |
| 19:30:08 | <mauke> | huh? |
| 19:30:43 | <mauke> | how is literate programming code-first? |
| 19:31:10 | <opqdonut> | you need to "show" all the code, and it's usually also done in the same order as the code |
| 19:31:27 | <mauke> | that's not literate programming, then |
| 19:31:28 | <opqdonut> | and it can be difficult to have multiple versions of the same function (and to still test them all) |
| 19:31:47 | <[exa]> | mauke: in some languages they have comments converted to text, not code blocks converted to code |
| 19:31:54 | <opqdonut> | yeah I guess with knuth's stuff (weave? what was it?) you could present the code out-of-order, but with your typical .lhs it's very ordered |
| 19:32:12 | <geekosaur> | weave and tangle |
| 19:32:23 | <mauke> | I wouldn't call .lhs literate programming |
| 19:32:42 | <opqdonut> | ok then |
| 19:33:12 | <mauke> | Knuth was all about didactic presentation, which almost necessarily means "out of order" for the code |
| 19:33:20 | <opqdonut> | yeah |
| 19:43:21 | → | CiaoSen joins (~Jura@p200300c95723a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 19:45:06 | → | panovia joins (~user@user/siracusa) |
| 19:45:46 | × | mikoto-chan quits (~mikoto-ch@164.5.249.78) (Ping timeout: 256 seconds) |
| 19:47:50 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 260 seconds) |
| 19:50:49 | → | mei joins (~mei@user/mei) |
| 19:51:29 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 19:53:07 | → | uics joins (~uics@91.150.188.137) |
| 19:53:11 | → | tremon joins (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) |
| 19:53:23 | ← | uics parts (~uics@91.150.188.137) (#haskell) |
| 19:56:58 | <Joao003> | .lhs is more of a "comment without --" style |
| 19:57:08 | → | ub joins (~Thunderbi@146.70.116.178) |
| 19:58:37 | × | ubert quits (~Thunderbi@p200300ecdf264e0169c651b6116f6648.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 19:59:22 | <voidzero> | ok I found someone who published their source code to the same module so now I can compare |
| 19:59:48 | <voidzero> | if it was my bad then I will admit it and eat crow np |
| 19:59:54 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) |
| 20:00:23 | → | ubert joins (~Thunderbi@146.70.116.146) |
| 20:01:38 | × | ub quits (~Thunderbi@146.70.116.178) (Ping timeout: 256 seconds) |
| 20:02:26 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 20:03:48 | <voidzero> | at least their code does output the right html so it is starting to look like it |
| 20:03:56 | voidzero | gets his napkin |
| 20:04:05 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1812:9885:2ce4:4618) (Ping timeout: 246 seconds) |
| 20:12:19 | <voidzero> | got it. The book has yet another typo that caused it to fail |
| 20:12:20 | <voidzero> | phew |
| 20:12:23 | voidzero | releases the crow |
| 20:12:35 | <voidzero> | fly bird fly |
| 20:12:58 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 20:14:01 | <mauke> | what was the typo? |
| 20:19:32 | → | PianoMan54 joins (~Guest5@81.78.231.0) |
| 20:20:23 | <Hecate> | or an idiom |
| 20:21:00 | → | thyriaen joins (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) |
| 20:21:51 | <voidzero> | getDirectory record = B.take directoryLength afterLeader where directoryLength = getDirectoryLength record ; afterLeader = B.drop leaderLength record |
| 20:22:10 | <voidzero> | here, afterLeader is the culprit, it should be afterLeader B.drop directoryLength record |
| 20:23:39 | × | PianoMan54 quits (~Guest5@81.78.231.0) (Quit: Client closed) |
| 20:31:54 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Remote host closed the connection) |
| 20:32:28 | → | ft joins (~ft@p4fc2a257.dip0.t-ipconnect.de) |
| 20:32:30 | × | trev quits (~trev@user/trev) (Remote host closed the connection) |
| 20:32:32 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 20:33:08 | <Joao003> | (>>=) :: [a] -> (a -> [b]) -> [b] is just concatMap |
| 20:35:56 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 20:36:50 | × | int-index-r quits (~Vladislav@2a00:1370:8178:5994:6490:ec14:6af:3fa6) (Quit: Konversation terminated!) |
| 20:36:59 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 20:38:16 | <mauke> | flip concatMap, but yes |
| 20:38:24 | → | caryhartline joins (~caryhartl@2603-8080-6a0e-8d88-8c3d-f560-b5e7-981d.res6.spectrum.com) |
| 20:40:03 | × | Joao003 quits (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) (Quit: Leaving) |
| 20:42:00 | → | Joao003 joins (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) |
| 20:42:13 | <monochrom> | Yes this inspired the name "flatMap". |
| 20:42:39 | → | gentauro joins (~gentauro@user/gentauro) |
| 20:45:32 | × | mei quits (~mei@user/mei) (Quit: mei) |
| 20:46:10 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 260 seconds) |
| 20:50:32 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 20:51:29 | × | Joao003 quits (~Joao003@2804:840:8311:d200:c41b:789b:8754:5281) (Read error: Connection reset by peer) |
| 20:52:22 | → | remedan_ joins (~remedan@ip-89-177-74-251.bb.vodafone.cz) |
| 20:54:26 | → | mikoto-chan joins (~mikoto-ch@164.5.249.78) |
| 20:56:14 | × | vykt quits (~vykt@92.40.125.229.threembb.co.uk) (Ping timeout: 268 seconds) |
| 20:56:33 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 20:57:42 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 255 seconds) |
| 20:58:01 | → | vykt joins (~vykt@92.40.125.142.threembb.co.uk) |
| 21:00:11 | <dsal> | I like `foldMap` |
| 21:00:51 | → | Guest53 joins (~Guest53@2600:1700:80:4ec0:1cec:2236:2eaa:ca5c) |
| 21:02:03 | <EvanR> | :t foldMap |
| 21:02:04 | <lambdabot> | (Foldable t, Monoid m) => (a -> m) -> t a -> m |
| 21:02:35 | <EvanR> | :t (>>=) |
| 21:02:36 | <lambdabot> | Monad m => m a -> (a -> m b) -> m b |
| 21:03:12 | <EvanR> | :t join |
| 21:03:13 | <lambdabot> | Monad m => m (m a) -> m a |
| 21:03:27 | <EvanR> | joinMap |
| 21:04:01 | <EvanR> | except flat is better than join |
| 21:04:06 | × | Guest53 quits (~Guest53@2600:1700:80:4ec0:1cec:2236:2eaa:ca5c) (Client Quit) |
| 21:05:29 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 268 seconds) |
| 21:07:50 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:09:16 | → | Bocaneri joins (~sauvin@user/Sauvin) |
| 21:09:41 | Bocaneri | is now known as Guest5498 |
| 21:10:03 | × | remedan quits (~remedan@144.76.104.133) (Read error: Connection reset by peer) |
| 21:10:05 | <voidzero> | Ok, looks like I was wrong on my issue again |
| 21:10:12 | <voidzero> | I'm gonna give this another look after some good sleep |
| 21:10:17 | <voidzero> | that crow might come back to haunt me |
| 21:11:54 | × | Sauvin quits (~sauvin@user/Sauvin) (Ping timeout: 256 seconds) |
| 21:12:48 | → | remedan joins (~remedan@144.76.104.133) |
| 21:15:52 | × | remedan quits (~remedan@144.76.104.133) (Read error: Connection reset by peer) |
| 21:16:28 | <voidzero> | ok. I was wrong. I don't know what happened. |
| 21:16:33 | <voidzero> | come 'ere crow |
| 21:19:37 | <geekosaur> | go get that sleep |
| 21:21:32 | × | mikoto-chan quits (~mikoto-ch@164.5.249.78) (Read error: Connection reset by peer) |
| 21:22:03 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 21:22:45 | <EvanR> | threadDelay (8 * 3600 * 1000000) |
| 21:24:10 | → | phma_ joins (phma@2001:5b0:211f:9e88:7b45:ac5a:b196:43f5) |
| 21:25:55 | × | phma quits (~phma@host-67-44-208-74.hnremote.net) (Read error: Connection reset by peer) |
| 21:26:35 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 248 seconds) |
| 21:29:17 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 21:30:07 | × | thyriaen quits (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Remote host closed the connection) |
| 21:37:24 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 21:38:12 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 21:43:12 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 21:44:08 | <JonathanWatson[m> | is there any way to use this datatype from generics-sop where the kind l is not Type? |
| 21:44:12 | JonathanWatson[m | uploaded an image: (13KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/zYgyubIFxwLDBArYgiLPYWLM/image.png > |
| 21:44:31 | <JonathanWatson[m> | newtype ((f :: l -> Type) :.: (g :: k -> l)) (p :: k) |
| 21:45:24 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 21:45:36 | <JonathanWatson[m> | typically you get the functor by giving a type constructor like Maybe but then I think you always end up with Type on the right |
| 21:46:17 | <JonathanWatson[m> | and you can't use type families because I don't think type families can be partially applied |
| 21:46:35 | <JonathanWatson[m> | but maybe you can do something with promotion? |
| 21:50:32 | → | Umeaboy joins (~Umeaboy@94-255-145-133.cust.bredband2.com) |
| 21:50:47 | <JonathanWatson[m> | Ok yeah I think you can use things like 'Just |
| 21:51:07 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 21:53:55 | × | fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Ping timeout: 252 seconds) |
| 21:54:04 | → | mei joins (~mei@user/mei) |
| 21:54:35 | <Umeaboy> | Hi! I would like some help to resolve this issue if possible: https://pastebin.com/i2xAtzHc |
| 21:54:47 | <Umeaboy> | I used ghcup to install cabal. |
| 21:55:30 | <geekosaur> | "/usr/bin/ld.gold: error: cannot find -lgmp" |
| 21:55:36 | <geekosaur> | install the system gmp package |
| 21:55:42 | <Umeaboy> | OK. |
| 21:55:46 | <Umeaboy> | I'll do that. |
| 21:56:27 | <geekosaur> | (devel ppackage if your system makes such distinctions; on my ubuntu system it's libgmp-dev) |
| 21:56:53 | <monochrom> | ghcup would have detected your linux distro and pointed out the exact package name for that. |
| 21:57:23 | <monochrom> | But humans have selective vision and selective memory to block out that. |
| 21:59:09 | <Umeaboy> | geekosaur: https://pastebin.com/R3CMEpKL |
| 21:59:26 | <Umeaboy> | So libgmp-devel it is. |
| 21:59:34 | <monochrom> | Yeah. |
| 22:00:15 | <Umeaboy> | monochrom: Well, full distro support for Mageia isn't added yet. I've begun to add it to the docs, but that's it. |
| 22:00:32 | <monochrom> | OK fair. Sorry. |
| 22:01:31 | <geekosaur> | the downside of tools that try to figure that stuff out for you |
| 22:01:38 | <Umeaboy> | Yeah. |
| 22:01:51 | <geekosaur> | it'll be out of date again next week when the next 10 linux distros come out 🙂 |
| 22:02:08 | <monochrom> | GPT is supposed to help... |
| 22:03:00 | × | akegalj quits (~akegalj@141-136-136-225.dsl.iskon.hr) (Quit: leaving) |
| 22:03:17 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
| 22:03:17 | × | jwiegley quits (~jwiegley@2600:1700:cf00:db0:3c2b:7b2b:9a29:78) (Quit: ZNC - http://znc.in) |
| 22:03:34 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 22:05:42 | → | johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 22:09:43 | × | biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer) |
| 22:12:36 | → | biberu joins (~biberu@user/biberu) |
| 22:16:15 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
| 22:17:19 | <Umeaboy> | I thought that the configure script would find ghc since it's added to PATH. |
| 22:17:38 | <Umeaboy> | Hmmmmmmmmm. Apparently it isn't. |
| 22:17:53 | <Umeaboy> | Strange install behavior from ghcup. |
| 22:18:13 | <Umeaboy> | I did choose Y to add it to PATH when asked. |
| 22:19:01 | <Umeaboy> | All I see in ~/.bashrc is: [ -f "/home/kristoffer/.ghcup/env" ] && source "/home/kristoffer/.ghcup/env" # ghcup-env |
| 22:19:32 | <monochrom> | That takes effect in new shell sessions. |
| 22:20:03 | <monochrom> | You can also check the content of /home/kristoffer/.ghcup/env to see if it's doing the right thing. |
| 22:20:06 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
| 22:20:37 | → | johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 22:20:53 | <monochrom> | You can also use bash command "type ghc" to see if a shell session has it. |
| 22:24:27 | <jackdk> | And/or run `. ~/.ghcup/env` to source it into your current shell |
| 22:25:28 | → | titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de) |
| 22:26:08 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 252 seconds) |
| 22:28:16 | × | caryhartline quits (~caryhartl@2603-8080-6a0e-8d88-8c3d-f560-b5e7-981d.res6.spectrum.com) (Remote host closed the connection) |
| 22:31:28 | × | [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
| 22:31:36 | → | [Leary] joins (~Leary]@user/Leary/x-0910699) |
| 22:34:38 | × | CiaoSen quits (~Jura@p200300c95723a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 22:36:12 | × | tremon quits (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in) |
| 22:36:20 | → | CiaoSen joins (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 22:37:52 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 22:38:34 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 22:38:39 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 22:41:22 | phma_ | is now known as phma |
| 22:41:38 | × | CiaoSen quits (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 22:43:00 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 255 seconds) |
| 22:57:19 | → | mizlan joins (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) |
| 22:59:58 | oldfashionedcow | is now known as GeneralKenobi |
| 23:09:24 | <Umeaboy> | If I can build using hadrian locally I should be able to use any spec file to build the same version of ghc right? |
| 23:09:43 | × | titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection) |
| 23:12:14 | × | xff0x_ quits (~xff0x@2405:6580:b080:900:686d:5028:75b2:f9bc) (Ping timeout: 265 seconds) |
| 23:12:35 | × | mizlan quits (~mizlan@2607:f010:2a7:1005:cca3:e028:1e9b:60c9) (Ping timeout: 260 seconds) |
| 23:12:39 | → | xff0x_ joins (~xff0x@2405:6580:b080:900:1b7c:cb8c:e680:938e) |
| 23:14:29 | → | mizlan joins (~mizlan@89.46.114.82) |
| 23:23:26 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 23:27:56 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 23:29:44 | × | mizlan quits (~mizlan@89.46.114.82) (Ping timeout: 260 seconds) |
| 23:32:28 | → | mizlan joins (~mizlan@169.150.203.47) |
| 23:32:49 | × | Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 23:34:04 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 23:35:44 | <Umeaboy> | Is there no map to see all the packages I need to build and install to build a GHC rpm? |
| 23:36:04 | <Umeaboy> | I'm talking about from step 1 to the last step. |
| 23:36:11 | <Umeaboy> | Like a mindmap of sorts- |
| 23:36:52 | <Umeaboy> | I mean....... cabal-rpm needs ghc packages to build. |
| 23:36:59 | <Umeaboy> | For instance..... ghc-rpm-macros |
| 23:37:03 | <monochrom> | I think the GHC wiki has something? |
| 23:37:35 | × | acidjnk quits (~acidjnk@p200300d6e715c41325fe13a78d721b6b.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 23:38:20 | <Umeaboy> | monochrom: Not specifically for rpm to my knowledge. |
| 23:38:32 | <Umeaboy> | I may be blind though. I am building GHC locally. |
| 23:39:35 | → | Guest75 joins (~Guest75@178.141.138.233) |
| 23:39:42 | × | mizlan quits (~mizlan@169.150.203.47) (Ping timeout: 255 seconds) |
| 23:41:10 | × | xff0x_ quits (~xff0x@2405:6580:b080:900:1b7c:cb8c:e680:938e) (Ping timeout: 260 seconds) |
| 23:41:37 | <Guest75> | Hello. When starting with the following two lines (if I really choose to use recursion schemes for my project), how do I futher impement Eq, Show and also Generic (need for Aeson — from/to JSON conversion) for List https://paste.tomsmeding.com/jg9xHo78 ? |
| 23:42:57 | → | xff0x_ joins (~xff0x@178.255.149.135) |
| 23:43:13 | → | mizlan joins (~mizlan@169.150.203.43) |
| 23:47:10 | × | barzo quits (~hd@31.223.41.44) (Ping timeout: 256 seconds) |
| 23:47:31 | <geekosaur> | you can try standalone deriving |
| 23:48:46 | × | [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
| 23:49:16 | <geekosaur> | but I think that might not work on type synonyms, and if you don't get them automatically then you probably can't |
| 23:49:19 | → | [Leary] joins (~Leary]@user/Leary/x-0910699) |
| 23:51:20 | <jackdk> | I think this is why the `recursion-schemes` library has the `Base` type family, to convert between fixpoint types and their corresponding functor |
| 23:51:38 | × | mizlan quits (~mizlan@169.150.203.43) (Ping timeout: 272 seconds) |
| 23:53:11 | <Guest75> | geekosaur: aha, it all semes that I can't just get it without some nice {-# ... #-} |
| 23:53:30 | <Guest75> | jackdk: Is there an example? |
| 23:53:40 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:5c56:4f57:55a9:a6ea) |
| 23:54:26 | <Guest75> | However I think it's all the stuff like "Eq1" |
| 23:55:38 | <Guest75> | thanks geekosaur jackdk ! I think in the end I'll just use shortest approach (not having write instances by hand) but supporting all the typeclasses I need (quite a bit) |
| 23:56:34 | × | xff0x_ quits (~xff0x@178.255.149.135) (Ping timeout: 260 seconds) |
| 23:56:42 | × | infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 252 seconds) |
| 23:56:55 | <geekosaur> | you can derive Generic with an extension, but again for the base type not the fixpoint |
| 23:57:06 | <geekosaur> | (the derivation is less than ideal but works) |
| 23:57:46 | <geekosaur> | don't recall but I think there's some TH that can derive the …1 typeclasses? |
| 23:57:49 | → | infinity0 joins (~infinity0@pwned.gg) |
| 23:58:07 | <jackdk> | geekosaur: correct: https://hackage.haskell.org/package/deriving-compat |
| 23:58:09 | → | xff0x_ joins (~xff0x@2405:6580:b080:900:1b7c:cb8c:e680:938e) |
All times are in UTC on 2023-01-18.