Logs on 2020-11-17 (freenode/#haskell)
| 00:00:02 | × | shrug quits (~shrug@178.239.168.171) () |
| 00:00:56 | <dolio> | :) |
| 00:01:18 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:8491:5fed:8d7f:daad) |
| 00:02:28 | × | conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.) |
| 00:03:31 | <monochrom> | Some of the recursion schemes enjoy very handy theorems. If you know your function fits a recursion scheme, then your function enjoys its theorems. This is a proof re-use. |
| 00:04:12 | → | conal joins (~conal@66.115.176.210) |
| 00:04:26 | × | cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Ping timeout: 265 seconds) |
| 00:04:47 | → | vacm joins (~vacwm@70.23.92.191) |
| 00:05:13 | <monochrom> | For example for lists: foldr op z . map f = foldr (\x r -> op (f x) r) z. |
| 00:05:54 | <monochrom> | If you wrote your own recursion instead of that foldr, you may or may not spot that property as easily, and you may or may not have an easy time proving it. |
| 00:07:39 | <dolio> | Well, as always, my advice is not, "don't use folds ever." It is, "don't try to force yourself to structure all your code around folds regardless of context." |
| 00:08:07 | <monochrom> | But my overall opinion is: cata and ana and Ralf Hinze's "adjoint folds and unfolds" are all you need to know for 99% of the cases. |
| 00:08:16 | × | quarters quits (~quarters@unaffiliated/quarters) (Ping timeout: 256 seconds) |
| 00:09:05 | <monochrom> | Outside that, the rest look like very niche and hair-splitting. |
| 00:09:51 | <monochrom> | Even the adjoint folds and unfolds, if you have to conjure a very contrived obscure adjoint functor, you're stretching it, the benefit becomes slim. |
| 00:10:37 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:465:234f:7cb8:28a5) (Ping timeout: 260 seconds) |
| 00:11:46 | → | jedws joins (~jedws@101.184.175.183) |
| 00:11:53 | × | srk quits (sorki@unaffiliated/srk) (Ping timeout: 256 seconds) |
| 00:11:55 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 00:12:23 | → | lucard joins (c8dd9d33@200.221.157.51) |
| 00:12:24 | → | jiribenes_ joins (~jiribenes@rosa.jiribenes.com) |
| 00:12:33 | <lucard> | Hello all, im working on the book Haskell programming form first principles, and i was wondering if you guys know any repo with test cases for exercises in the book. Any idea? |
| 00:12:47 | × | jiribenes quits (~jiribenes@rosa.jiribenes.com) (Read error: Connection reset by peer) |
| 00:12:49 | × | Adluc quits (Adluc@base48.cz) (Ping timeout: 272 seconds) |
| 00:13:16 | jiribenes_ | is now known as jiribenes |
| 00:14:06 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 265 seconds) |
| 00:15:23 | → | Adluc joins (Adluc@base48.cz) |
| 00:19:25 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 264 seconds) |
| 00:19:46 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving) |
| 00:21:10 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 246 seconds) |
| 00:22:04 | → | Amras joins (~Amras@unaffiliated/amras0000) |
| 00:22:41 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:3325:bf75:6ec4:84a6) |
| 00:25:33 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 00:25:54 | → | srk joins (sorki@unaffiliated/srk) |
| 00:27:12 | × | conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.) |
| 00:28:00 | hackage | iproute 1.7.10 - IP Routing Table https://hackage.haskell.org/package/iproute-1.7.10 (KazuYamamoto) |
| 00:29:24 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 272 seconds) |
| 00:31:57 | <dsal> | lucard: I think you're supposed to write those yourself. |
| 00:32:31 | <dsal> | Fun Haskell fact: once your code compiles, it does exactly whatever you thought it should do. |
| 00:33:02 | → | hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 00:33:14 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 00:33:44 | × | lucard quits (c8dd9d33@200.221.157.51) (Remote host closed the connection) |
| 00:33:51 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 00:34:23 | × | hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
| 00:36:02 | × | solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 00:37:58 | × | avn quits (~avn@78-56-108-78.static.zebra.lt) (Ping timeout: 246 seconds) |
| 00:38:31 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 00:40:03 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds) |
| 00:42:33 | → | nineonine joins (~textual@50.216.62.2) |
| 00:43:50 | → | shatriff_ joins (~vitaliish@176.52.219.10) |
| 00:43:50 | × | shatriff quits (~vitaliish@176.52.219.10) (Read error: Connection reset by peer) |
| 00:43:59 | → | avn joins (~avn@78-56-108-78.static.zebra.lt) |
| 00:44:35 | → | conal joins (~conal@66.115.176.210) |
| 00:46:59 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 00:48:49 | × | Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 264 seconds) |
| 00:50:38 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:8491:5fed:8d7f:daad) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:57:00 | hackage | flashblast 0.0.7.0 - Generate language learning flashcards from video. https://hackage.haskell.org/package/flashblast-0.0.7.0 (locallycompact) |
| 00:59:00 | hackage | flashblast 0.0.8.0 - Generate language learning flashcards from video. https://hackage.haskell.org/package/flashblast-0.0.8.0 (locallycompact) |
| 00:59:07 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:8491:5fed:8d7f:daad) |
| 01:04:14 | × | mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Remote host closed the connection) |
| 01:06:02 | × | borne quits (~fritjof@200116b864b5430099e934deb93b1409.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 01:06:13 | × | xsperry quits (~as@unaffiliated/xsperry) (Ping timeout: 264 seconds) |
| 01:06:18 | × | fryguybob quits (~fryguybob@cpe-74-65-31-113.rochester.res.rr.com) (Ping timeout: 265 seconds) |
| 01:06:38 | × | Martinsos quits (~user@cpe-188-129-116-164.dynamic.amis.hr) (Ping timeout: 260 seconds) |
| 01:07:20 | → | shadow__ joins (~shadow@192.12.149.141) |
| 01:07:30 | × | shadow__ quits (~shadow@192.12.149.141) (Client Quit) |
| 01:08:10 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 01:08:18 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:08:33 | × | renzhi quits (~renzhi@2607:fa49:655f:e600::28da) (Ping timeout: 272 seconds) |
| 01:09:13 | × | wildtrees quits (wildtrees@gateway/vpn/protonvpn/wildtrees) (Quit: Leaving) |
| 01:11:20 | × | LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 01:11:20 | → | wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:12:26 | × | wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 01:12:49 | × | conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.) |
| 01:13:58 | → | conal joins (~conal@66.115.176.210) |
| 01:13:58 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 01:14:32 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 01:14:53 | wroathe_ | is now known as wroathe |
| 01:16:38 | → | conal joins (~conal@66.115.176.210) |
| 01:18:22 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 01:22:05 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds) |
| 01:23:45 | → | vacm joins (~vacwm@70.23.92.191) |
| 01:26:31 | → | fryguybob joins (~fryguybob@cpe-74-65-31-113.rochester.res.rr.com) |
| 01:27:36 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 01:28:20 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 01:28:42 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:29:31 | → | ironmarx joins (~ironmarx@139.28.218.148) |
| 01:31:49 | → | Lord_of_Life_ joins (~Lord@46.217.219.70) |
| 01:32:18 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 260 seconds) |
| 01:36:57 | → | justsomeguy joins (~justsomeg@216.186.218.241) |
| 01:36:57 | × | justsomeguy quits (~justsomeg@216.186.218.241) (Changing host) |
| 01:36:57 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 01:42:13 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 01:42:15 | <justsomeguy> | So I just found out that you can use let bindings in list comprehensions, like “[x^2 | let n = 3, x <- [1..n]]”. Is there anything special about them? Why the dedicated syntax? |
| 01:43:33 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@66.115.189.204) |
| 01:43:51 | <davean> | justsomeguy: what dedicated syntax? |
| 01:44:32 | <dolio> | Same reason as let inside do. |
| 01:44:33 | <sshine> | justsomeguy, let-expressions in list comprehensions are much like let-expressions in do-notation |
| 01:45:14 | <sshine> | justsomeguy, considering list comprehensions are monadic, it's not very special. but I guess you could ask why remove the "in" inside do notation? |
| 01:45:59 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 01:46:07 | <justsomeguy> | Yes, the absence of “in” kind of threw me off. |
| 01:46:33 | <davean> | justsomeguy: its not removed specificly there |
| 01:46:39 | <davean> | justsomeguy: theres no 'in' in do notation. |
| 01:46:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:48:12 | <sshine> | justsomeguy, you can think of list comprehensions as being syntax sugar for list monads. and you can extend list comprehension syntax to other monads than list using -XMonadComprehensions: https://gitlab.haskell.org/ghc/ghc/-/wikis/monad-comprehensions |
| 01:48:51 | justsomeguy | does a web search for do notation |
| 01:49:13 | <dsal> | @undo do { results <- web } |
| 01:49:13 | <lambdabot> | <unknown>.hs:1:22:Parse error: Last statement in a do-block must be an expression |
| 01:49:39 | <dsal> | damn. Have to do something with those results. |
| 01:49:43 | × | tmciver quits (~tmciver@cpe-172-101-40-226.maine.res.rr.com) (Ping timeout: 272 seconds) |
| 01:50:19 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 01:50:21 | → | vacm joins (~vacwm@70.23.92.191) |
| 01:51:03 | → | tmciver joins (~tmciver@cpe-172-101-40-226.maine.res.rr.com) |
| 01:51:04 | <sshine> | ah |
| 01:51:11 | <sshine> | I learned something. |
| 01:51:14 | <sshine> | > do { x <- [1..10]; let {y = 3}; return (x * y) } |
| 01:51:16 | <lambdabot> | [3,6,9,12,15,18,21,24,27,30] |
| 01:51:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 01:51:47 | <sshine> | so those inner curly braces aren't necessary if I use do-notation without the curly braces (those are only necessary because I want to one-line it on IRC.) |
| 01:52:36 | <sshine> | but because let-expressions allow for separate ;-separated bindings (let foo = 2; bar = 3 in ...), I have to disambiguate the ; as a do-separating ; and not a let-binding-separating ;. |
| 01:52:39 | <sshine> | sheesh. :) |
| 01:52:57 | <sshine> | do x <- [1..10] |
| 01:53:00 | <sshine> | let y = 3 |
| 01:53:04 | <sshine> | return (x * y) |
| 01:53:49 | <sshine> | > [ x * y | x <- [1..10], let y = 3 ] -- vs. this |
| 01:53:51 | <lambdabot> | [3,6,9,12,15,18,21,24,27,30] |
| 01:54:12 | <dsal> | @undo [ x * y | x <- [1..10], let y = 3 ] |
| 01:54:12 | <lambdabot> | concatMap (\ x -> let { y = 3} in [x * y]) [1 .. 10] |
| 01:54:21 | <dolio> | Well, also, the scoping is more suited to the situation. You don't need to nest another do block inside the let. |
| 01:54:31 | <dolio> | And for comprehensions it'd be even more annoying. |
| 01:55:03 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 01:58:50 | <sshine> | justsomeguy, I think the missing "in" comes from do-notation fitting one action per line with implicit monad bind operator in-between each line. so since do-notation has special syntax wrt. interpreting linebreaks, removing the "in" that would otherwise make a let-expression float onto the next line removes an ambiguity that would otherwise occur when the next line is indented the same: is it another |
| 01:58:56 | <sshine> | stand-alone action, or is it the continuation of the let-in-binding on the line before? |
| 02:02:25 | <sshine> | justsomeguy, https://gist.github.com/sshine/0dac23b35e19b1ea0aed7a9e6d215c30 |
| 02:03:31 | <sshine> | justsomeguy, removing the "in" in do-blocks is not so nice because now you have two syntaxes and that's confusing, but not removing the "in" in do-blocks is kinda less nice. |
| 02:04:43 | <justsomeguy> | Very interesting. Thanks for the explanation, sshine :) |
| 02:04:54 | <sshine> | yw. |
| 02:05:44 | <sshine> | (and yeah, the fact that "in" is omissible in list-comprehension syntax is a side-effect of this, I think, since you don't have the actual indentation problem there.) |
| 02:07:39 | <sshine> | maybe dolio thinks it's more of a problem somehow. |
| 02:08:01 | <sshine> | I don't really ever use list-comprehensions, so maybe that's the case. :) |
| 02:08:05 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 02:08:39 | × | lucasb quits (uid333435@gateway/web/irccloud.com/x-ezcrumvhrckwfdja) (Quit: Connection closed for inactivity) |
| 02:09:20 | <dolio> | Well, presumably you can do `[ (y, z) | x <- ... , let y = ..., ...]` But turning that into nested comprehensions is annoying. |
| 02:10:06 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 02:10:25 | <dolio> | It would be something like `[ p | x <- ..., p <- let y = ... in [ (y, z) | ... ]]` |
| 02:12:05 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit) |
| 02:12:51 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 02:15:57 | → | christo joins (~chris@81.96.113.213) |
| 02:16:12 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 02:17:18 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 02:20:43 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 260 seconds) |
| 02:20:55 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:21:08 | × | _xor quits (~xor@74.215.46.133) (Read error: Connection reset by peer) |
| 02:21:59 | → | _xor joins (~xor@74.215.46.133) |
| 02:22:40 | × | m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 265 seconds) |
| 02:24:42 | → | vacm joins (~vacwm@70.23.92.191) |
| 02:25:11 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:29:35 | × | moet quits (~moet@mobile-166-137-178-187.mycingular.net) (Ping timeout: 256 seconds) |
| 02:30:21 | → | conal joins (~conal@66.115.176.210) |
| 02:31:21 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 02:31:24 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 02:32:52 | → | conal joins (~conal@66.115.176.210) |
| 02:36:32 | <koz_> | Someone in here (maybe monochrom?) mentioned recently that the {mega,atto}parsec 'satisfy' can be implemented in the context of Selective (i.e. not full Monad). They claimed this is backed by research - could I please get a link? |
| 02:36:48 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 02:37:25 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 02:37:26 | → | toorevitimirp joins (~tooreviti@117.182.180.118) |
| 02:41:16 | <MarcelineVQ> | idk if it covers satisfy deeply but https://mpickering.github.io/papers/parsley-icfp.pdf is about parsers which use Selective to inform compile-time decisions |
| 02:42:13 | <koz_> | MarcelineVQ: Thanks - it's a start. |
| 02:42:55 | × | xff0x quits (~fox@2001:1a81:529e:a500:7f56:5167:60df:e24a) (Ping timeout: 272 seconds) |
| 02:44:31 | → | xff0x joins (~fox@2001:1a81:52d5:6a00:5952:5bb0:2bc9:4930) |
| 02:53:25 | × | haritz quits (~hrtz@unaffiliated/haritz) (Ping timeout: 240 seconds) |
| 02:55:54 | → | haritz joins (~hrtz@62.3.70.206) |
| 02:55:54 | × | haritz quits (~hrtz@62.3.70.206) (Changing host) |
| 02:55:54 | → | haritz joins (~hrtz@unaffiliated/haritz) |
| 02:59:54 | × | Aquazi quits (uid312403@gateway/web/irccloud.com/x-paizsduyeybkbeqa) (Quit: Connection closed for inactivity) |
| 03:00:01 | × | ironmarx quits (~ironmarx@139.28.218.148) () |
| 03:00:46 | × | toorevitimirp quits (~tooreviti@117.182.180.118) (Remote host closed the connection) |
| 03:01:15 | → | toorevitimirp joins (~tooreviti@117.182.180.118) |
| 03:01:55 | → | Guest48480 joins (~luka@217.146.82.202) |
| 03:04:44 | → | drbean joins (~drbean@TC210-63-209-59.static.apol.com.tw) |
| 03:06:50 | → | elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
| 03:09:32 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 03:14:39 | × | shatriff_ quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 03:14:55 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 03:15:10 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 03:15:27 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 03:15:46 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 03:16:16 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 03:16:18 | <monochrom> | That was me alright. I learned of Selective from https://dl.acm.org/doi/10.1145/3341694 |
| 03:16:31 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 03:17:04 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 03:17:24 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 03:17:53 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 03:18:41 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 03:18:45 | <monochrom> | "satisfy pred = anyChar >>= \c -> if pred c then pure c else empty" is pretty much in line with the ping-pong example. |
| 03:19:53 | → | conal joins (~conal@66.115.176.210) |
| 03:20:05 | × | rzmt quits (~rzmt@87-92-180-112.rev.dnainternet.fi) (Ping timeout: 240 seconds) |
| 03:22:26 | → | rzmt joins (~rzmt@87-92-180-112.rev.dnainternet.fi) |
| 03:23:48 | → | jedws joins (~jedws@101.184.175.183) |
| 03:24:02 | × | acidjnk_new quits (~acidjnk@p200300d0c718f648045012e87868ed0b.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 03:24:39 | × | cgfuh quits (~cgfuh@181.167.191.58) (Quit: WeeChat 2.9) |
| 03:26:30 | × | argent0 quits (~argent0@168.227.98.83) (Remote host closed the connection) |
| 03:27:03 | → | Shadowraith joins (~user@192.12.149.141) |
| 03:29:11 | × | Shadowraith quits (~user@192.12.149.141) (Read error: Connection reset by peer) |
| 03:30:10 | → | Shadowraith joins (~user@192.12.149.141) |
| 03:30:28 | → | acidjnk_new joins (~acidjnk@p200300d0c718f647bc583fb9dc736f42.dip0.t-ipconnect.de) |
| 03:30:53 | <Shadowraith> | hi! im trying to convert output of a monad to a string (which it already should be) so im confused |
| 03:31:14 | <Axman6> | that sounds like quite a confused question, cah you share some code? |
| 03:31:17 | <Axman6> | can* |
| 03:31:26 | <Shadowraith> | here is what the code is, i want to have it out put to a file |
| 03:31:28 | <Shadowraith> | yeh ofc |
| 03:31:34 | <Shadowraith> | http://0x0.st/i51b.txt |
| 03:31:35 | <Axman6> | @where paste |
| 03:31:35 | <lambdabot> | Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com |
| 03:31:41 | <Axman6> | thanks, too quick for me :) |
| 03:31:51 | <Shadowraith> | ;) |
| 03:32:18 | <Axman6> | I can;t see anything monadic there |
| 03:32:21 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:8491:5fed:8d7f:daad) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:32:21 | <monochrom> | There is no monad in that code. |
| 03:32:23 | <Shadowraith> | oh what |
| 03:32:29 | <Shadowraith> | the \x isnt a monad?? |
| 03:32:32 | <Axman6> | it's just a function |
| 03:32:34 | <Axman6> | no |
| 03:32:37 | <Shadowraith> | i thought that was a lambda... XD |
| 03:32:37 | <monochrom> | It's just a lambda. |
| 03:32:37 | <Axman6> | that's a lambda |
| 03:32:39 | <Shadowraith> | frk me |
| 03:32:40 | <Shadowraith> | im sorry |
| 03:32:49 | <Shadowraith> | i still dont know how to get it to work tho.. Xd |
| 03:33:01 | <Axman6> | your code is the same as writing: ppLayout x = case x of ... |
| 03:33:11 | <Axman6> | what isn't working? |
| 03:33:25 | <Shadowraith> | io $ appendFile "/tmp/.xmonad-layout-log" (ppLayout) |
| 03:33:29 | <Shadowraith> | trying to do this |
| 03:33:37 | <Shadowraith> | but its saying something bout a string |
| 03:33:40 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 246 seconds) |
| 03:33:50 | <monochrom> | What is "io"? |
| 03:33:54 | <Axman6> | what is the tyoe of appendFile? |
| 03:34:14 | <Shadowraith> | being honest i have no idea at all, i thought that might have been a normal function |
| 03:34:28 | <Axman6> | and what type does ppLayout have? (I know the ansxwer, I need to know if you do :) |
| 03:34:38 | <Shadowraith> | should be string right? |
| 03:34:46 | <Axman6> | nope, it's definitely a function |
| 03:34:52 | <Shadowraith> | function is a type? |
| 03:34:55 | <Axman6> | yes |
| 03:35:03 | <Shadowraith> | gosh C stop interfering in my head haha |
| 03:35:03 | <Axman6> | :t toUpper |
| 03:35:05 | <lambdabot> | Char -> Char |
| 03:35:10 | <Axman6> | :t show |
| 03:35:11 | <lambdabot> | Show a => a -> String |
| 03:35:28 | <Axman6> | I can tell you that ppLayout :: String -> String |
| 03:35:37 | <Shadowraith> | OH |
| 03:35:42 | <Axman6> | it needs to be passed a string, which you aren't doing |
| 03:35:43 | <Shadowraith> | ok i understand that |
| 03:35:52 | <Shadowraith> | i understand the type now |
| 03:35:59 | <Shadowraith> | oh so i have to pass it |
| 03:36:03 | <Axman6> | where are you expecting the string "Hidden Tall" to come from? |
| 03:36:15 | <Shadowraith> | layouts somewhere... |
| 03:37:32 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:5d4c:3718:c0a8:9f94) |
| 03:37:33 | <Shadowraith> | im not exactly sure how to grab that |
| 03:38:31 | × | superstar64 quits (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection) |
| 03:38:52 | <monochrom> | Who would be providing the input string? |
| 03:40:24 | <Shadowraith> | xmonad layout, see what i did is because im not using dynamicPP anymore, i stole these lines from my dynamicLogHook function and was trying to do it without dynamicPP |
| 03:42:07 | <Axman6> | what is dynamicPP? |
| 03:42:17 | <Axman6> | you're going to have to share more code for us to be able to help you |
| 03:42:25 | × | obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Remote host closed the connection) |
| 03:42:36 | <Shadowraith> | https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Hooks-DynamicLog.html |
| 03:42:38 | × | todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 264 seconds) |
| 03:42:52 | × | conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.) |
| 03:43:09 | <Shadowraith> | im sorry ik, im trying but im not all there yet at all with haskell |
| 03:43:36 | → | obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl) |
| 03:43:38 | <Axman6> | that's fine, we're happy to help, but ywe also can't work in the dark. most of us don't use Xmonad |
| 03:43:39 | → | plutoniix joins (~q@175.176.222.7) |
| 03:44:13 | <Shadowraith> | ik i appreciate it a ton, if i understood haskell a lil better it would be easier to explain |
| 03:44:44 | × | livvy quits (~livvy@gateway/tor-sasl/livvy) (Remote host closed the connection) |
| 03:44:49 | <Shadowraith> | so what dynamicLog does is compile a bunch of different things from the program together into one file (im pretty sure) |
| 03:44:57 | <Shadowraith> | layouts, workspaces, etc |
| 03:45:26 | <Shadowraith> | i already have workspaces everywhere, and just want layouts to a file but not 100% sure how to do that |
| 03:45:28 | <Axman6> | do you want to use dynamicLogWithPP which lets you customise things? |
| 03:45:42 | <Shadowraith> | if that is the best option then yes |
| 03:45:46 | <Axman6> | I don't really understand how files come into it |
| 03:46:02 | <Shadowraith> | i think it exports to a file so that a separate program can use it |
| 03:46:14 | <Shadowraith> | for my instance: my bar: polybar |
| 03:46:15 | × | star_cloud quits (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 03:46:44 | × | lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (card.freenode.net (Nickname regained by services))) |
| 03:46:49 | <Axman6> | I would guess that you can do something like: dynamicLogWithPP def{ ppLayout = \x -> case x of ... } |
| 03:46:52 | → | lagothrix joins (~lagothrix@unaffiliated/lagothrix) |
| 03:47:08 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:47:35 | <Shadowraith> | ooh yes i have that now, works with this `dynamicLogWithPP = def { ... }` |
| 03:47:41 | <Axman6> | that is taking the defaults (which is what defaultPP contains but is deprecated in favout of def from Data.Default), and then overriding ppLayout |
| 03:47:53 | <Axman6> | no, you shouldn't have an = in there |
| 03:48:09 | <Shadowraith> | oh i think it gave an error before, lemme try again |
| 03:48:10 | <Axman6> | def {... } is an argument to dynamicLogWithPP |
| 03:48:41 | <Shadowraith> | xmonad.hs:465:1: error: |
| 03:48:41 | <Shadowraith> | Parse error: module header, import declaration |
| 03:48:41 | <Shadowraith> | or top-level declaration expected. |
| 03:48:41 | <Shadowraith> | | |
| 03:50:04 | × | Sgeo_ quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
| 03:50:32 | → | Sgeo_ joins (~Sgeo@ool-18b982ad.dyn.optonline.net) |
| 03:50:47 | → | conal joins (~conal@66.115.176.210) |
| 03:51:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 03:51:44 | → | star_cloud joins (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) |
| 03:52:17 | → | spatchkaa joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) |
| 03:52:51 | <Shadowraith> | 465 | dynamicLogWithPP def |
| 03:54:28 | <Shadowraith> | | ^^^^^^^^^^^^^^^^^^^^... |
| 03:54:28 | <Shadowraith> | |
| 03:54:28 | × | Shadowraith quits (~user@192.12.149.141) (Remote host closed the connection) |
| 03:54:37 | → | Shadowraith joins (~user@192.12.149.141) |
| 03:54:38 | × | theDon quits (~td@94.134.91.49) (Ping timeout: 260 seconds) |
| 03:54:48 | <Shadowraith> | just noticed there is a dynamicLogString function? |
| 03:54:59 | <Axman6> | without seeing more of your file I have no idea what you're going |
| 03:55:37 | <Shadowraith> | do you want the whole thing? |
| 03:55:42 | <Axman6> | sure |
| 03:55:51 | <Shadowraith> | http://0x0.st/i51L.txt |
| 03:56:03 | <Shadowraith> | its in the log hook |
| 03:56:20 | → | theDon joins (~td@muedsl-82-207-238-136.citykom.de) |
| 03:56:45 | <Axman6> | Can you use the paste website from above? syntax highlighting helps a lot |
| 03:56:57 | <Shadowraith> | oh im sorry that was a keybind i had |
| 03:57:05 | <Shadowraith> | @where paste |
| 03:57:05 | <lambdabot> | Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com |
| 03:58:19 | → | resolve joins (~resolve@139.28.218.148) |
| 03:58:51 | × | Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 03:59:07 | → | Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 03:59:09 | <Shadowraith> | https://paste.tomsmeding.com/b8Y135W6 |
| 03:59:30 | <Shadowraith> | sorry,was too large to even copy from vim lol so had to use a gui editor :ree: |
| 04:01:01 | <Axman6> | ok, look more closely at what's happening in the screen1LogHook example, you've forgotten to copy some quite important stuff |
| 04:01:10 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:01:18 | <Axman6> | what code have you added? |
| 04:02:22 | <Axman6> | I don't really understand what you're trying to do with dynamicLogString |
| 04:02:47 | <Shadowraith> | that was just testing, the dynamicLogString (originally dynamicLogWithPP) |
| 04:02:50 | <Axman6> | but it looks very suspicious since that's the name of something that XMonad defines, so you're shadowing its definition |
| 04:03:02 | <Shadowraith> | the dbus stuff i want rid of, as to why i commented that out |
| 04:03:30 | <Axman6> | I think what you want to so is: myLogHook = dynamicLogString def{ ppLayout = \x -> case x of ... } |
| 04:04:50 | <Shadowraith> | can i append it to the end cuz i need the ewmh line |
| 04:04:57 | <Shadowraith> | like with a $ |
| 04:06:29 | → | falafel joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
| 04:07:02 | <Axman6> | try https://paste.tomsmeding.com/CohO6Z58 |
| 04:07:09 | × | ajmcmiddlin quits (sid284402@gateway/web/irccloud.com/x-czsnahqqucihfqdx) (Ping timeout: 272 seconds) |
| 04:07:27 | <Axman6> | I don't really understand what you're trying to do with the appendFile call, but it feels like that is probably being taken care of for you |
| 04:07:45 | <Shadowraith> | shoot i copied the ld instead of \x, that was a testto |
| 04:08:10 | × | DTZUZU quits (~DTZUZU@207.81.171.116) (Read error: Connection reset by peer) |
| 04:08:10 | <Shadowraith> | myLogHook = ewmhDesktopsLogHookCustom (map unmarshallWindowSpace . namedScratchpadFilterOutWorkspace) |
| 04:08:13 | <Shadowraith> | what about this line? |
| 04:08:39 | <Axman6> | comment it out? I have no idea what it's doing |
| 04:08:46 | → | ajmcmiddlin joins (sid284402@gateway/web/irccloud.com/x-esnyudzmonhtpktj) |
| 04:08:57 | <Shadowraith> | i need that line, its handling my workspace output |
| 04:09:03 | × | davetapley quits (sid666@gateway/web/irccloud.com/x-vyeiyfxfsraauowv) (Ping timeout: 272 seconds) |
| 04:09:12 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 04:09:35 | <Axman6> | then you may be out of luck, at least as far as I can see. taking a look though |
| 04:10:42 | × | vk3wtf quits (~doc@203.221.224.44) (Quit: WeeChat 2.7.1) |
| 04:10:57 | <Axman6> | what is this case statement you've written supposed to be doing? |
| 04:10:59 | → | davetapley joins (sid666@gateway/web/irccloud.com/x-xjppgfjbvjpedrys) |
| 04:11:09 | × | conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.) |
| 04:11:13 | → | vk3wtf joins (~doc@203.221.224.44) |
| 04:11:22 | <Shadowraith> | where is a case statement? |
| 04:11:26 | <Shadowraith> | apologies.. |
| 04:11:42 | <Axman6> | case x of -- Changes layout name to be displayed |
| 04:11:43 | <Axman6> | "Hidden Tall" |
| 04:12:13 | <Shadowraith> | gotcha, that is to convert the names of my layouts to a string for polybar to use |
| 04:12:20 | <Shadowraith> | with special polybar formats |
| 04:12:47 | <Shadowraith> | the first string isthe layout being grabbed the secondis what is to be sent to pbar |
| 04:12:54 | <Shadowraith> | u prob knew that hto |
| 04:13:04 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 04:13:04 | <Axman6> | ok, I thnk you might be best off to ask in #xmonad, this is getting very Xmonad specific more than Haskell specific |
| 04:13:27 | <Shadowraith> | hm ur probably right |
| 04:13:38 | <Shadowraith> | i originally thought it was more haskell based |
| 04:13:53 | <Shadowraith> | cuz i thought \x was a monad :joy: |
| 04:14:07 | × | gaze__ quits (sid387101@gateway/web/irccloud.com/x-dzzzzpxfnvpkwdhs) (Ping timeout: 272 seconds) |
| 04:15:23 | × | mpickering quits (sid78412@gateway/web/irccloud.com/x-pmxjkbnlbuqckyae) (Ping timeout: 272 seconds) |
| 04:15:23 | × | scav quits (sid309693@gateway/web/irccloud.com/x-oovxzuxjybuelhjk) (Ping timeout: 272 seconds) |
| 04:16:30 | <Shadowraith> | hold up maybe this is haskell to |
| 04:16:55 | <Shadowraith> | lets say the input to the case function is `S.layout` |
| 04:17:17 | × | jokester_ quits (~mono@unaffiliated/jokester) (Ping timeout: 272 seconds) |
| 04:17:17 | × | moobar quits (sid171730@gateway/web/irccloud.com/x-ctnyphywvjgsbjzl) (Ping timeout: 272 seconds) |
| 04:17:21 | <Shadowraith> | i should be able to get a string then since i have an input |
| 04:17:23 | × | texasmynsted quits (~texasmyns@212.102.45.103) (Ping timeout: 260 seconds) |
| 04:17:42 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 04:18:00 | → | jokester_ joins (~mono@unaffiliated/jokester) |
| 04:18:28 | → | mpickering joins (sid78412@gateway/web/irccloud.com/x-qzzyeuirciixjhoi) |
| 04:18:43 | → | scav joins (sid309693@gateway/web/irccloud.com/x-vgaroajuvhbcvqch) |
| 04:18:47 | → | gaze__ joins (sid387101@gateway/web/irccloud.com/x-ddrtdboykpdfifpr) |
| 04:20:16 | → | moobar joins (sid171730@gateway/web/irccloud.com/x-svksvglonzzyzxxy) |
| 04:20:36 | <Axman6> | I don't understand the question |
| 04:20:40 | <Axman6> | what's S.layout? |
| 04:21:13 | <Shadowraith> | i think that is the layout name |
| 04:21:43 | × | dgpratt quits (sid193493@gateway/web/irccloud.com/x-ckplobyhmsyazopr) (Ping timeout: 272 seconds) |
| 04:21:43 | → | conal joins (~conal@66.115.176.210) |
| 04:22:00 | <Axman6> | it doesn't show up in your code anywhere |
| 04:22:31 | <Shadowraith> | S is from a module |
| 04:22:38 | <Shadowraith> | StackSet |
| 04:22:59 | <Axman6> | it also seems to be Search? |
| 04:23:02 | → | DTZUZU joins (~DTZUZU@207.81.171.116) |
| 04:23:17 | → | dgpratt joins (sid193493@gateway/web/irccloud.com/x-eisigjveajsvarno) |
| 04:23:20 | <Axman6> | in fact it is XMonad.Actions.Search in the code you pasted |
| 04:23:37 | <Axman6> | XMonad.StackSet is W |
| 04:23:47 | <Shadowraith> | oh goodness then W.layout is prob what i meant |
| 04:24:15 | × | simony quits (sid226116@gateway/web/irccloud.com/x-wzcrwnktljnyyivi) (Ping timeout: 272 seconds) |
| 04:25:15 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 04:25:31 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:3325:bf75:6ec4:84a6) (Ping timeout: 272 seconds) |
| 04:25:38 | → | Shadorain joins (uid453914@gateway/web/irccloud.com/x-gzynpbjvpqrgaqml) |
| 04:26:15 | → | simony joins (sid226116@gateway/web/irccloud.com/x-keowsotekzgqfqdf) |
| 04:26:27 | → | codeAlways joins (uid272474@gateway/web/irccloud.com/x-dbuczpztyxqztxlt) |
| 04:26:40 | × | Shadowraith quits (~user@192.12.149.141) (Remote host closed the connection) |
| 04:26:47 | × | scav quits (sid309693@gateway/web/irccloud.com/x-vgaroajuvhbcvqch) (Ping timeout: 272 seconds) |
| 04:26:57 | <Shadorain> | Btw I'm Shadowraith |
| 04:27:27 | <Axman6> | :thumbsup: |
| 04:28:07 | → | conal joins (~conal@66.115.176.210) |
| 04:28:07 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 04:28:18 | → | scav joins (sid309693@gateway/web/irccloud.com/x-jqpiftkzlvsswiha) |
| 04:29:42 | → | conal joins (~conal@66.115.176.210) |
| 04:29:42 | × | conal quits (~conal@66.115.176.210) (Client Quit) |
| 04:31:54 | <Shadorain> | So if I'm able to grab what I need which is a string (the name of layout) then I can do whzt I originally wanted which was output the format string to a file |
| 04:32:52 | × | falafel quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds) |
| 04:37:24 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:c078:1a2e:5eb7:90ae) |
| 04:37:32 | → | Shadowraith joins (~user@192.12.149.141) |
| 04:37:47 | × | acidjnk_new quits (~acidjnk@p200300d0c718f647bc583fb9dc736f42.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 04:39:46 | → | vacm joins (~vacwm@70.23.92.191) |
| 04:40:08 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 260 seconds) |
| 04:41:57 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 260 seconds) |
| 04:43:15 | × | gaze__ quits (sid387101@gateway/web/irccloud.com/x-ddrtdboykpdfifpr) (Ping timeout: 272 seconds) |
| 04:43:15 | → | pfurla joins (~pfurla@185.108.105.66) |
| 04:44:49 | → | moet joins (~moet@mobile-166-137-178-107.mycingular.net) |
| 04:46:16 | → | gaze__ joins (sid387101@gateway/web/irccloud.com/x-ieppxqjdwpehesld) |
| 04:47:31 | → | pfurla_ joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 04:48:18 | × | pfurla quits (~pfurla@185.108.105.66) (Ping timeout: 260 seconds) |
| 04:50:07 | × | crdrost quits (~crdrost@c-98-207-102-156.hsd1.ca.comcast.net) (Quit: This computer has gone to sleep) |
| 04:50:42 | → | lpy joins (~nyd@unaffiliated/elysian) |
| 04:54:39 | × | benl23 quits (sid284234@gateway/web/irccloud.com/x-nkfumgpyqgaploty) (Ping timeout: 272 seconds) |
| 04:54:49 | → | benl23 joins (sid284234@gateway/web/irccloud.com/x-zcormuhggyweibpr) |
| 05:01:06 | × | ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 272 seconds) |
| 05:04:09 | × | PoliticsII______ quits (sid193551@gateway/web/irccloud.com/x-svzvwktexytphjlp) (Ping timeout: 272 seconds) |
| 05:04:09 | × | kozowu quits (uid44796@gateway/web/irccloud.com/x-dylrnyglhpjycwlc) (Ping timeout: 272 seconds) |
| 05:05:25 | × | Tritlo quits (sid58727@gateway/web/irccloud.com/x-dlcmyhezzzrcdorg) (Ping timeout: 272 seconds) |
| 05:05:35 | → | Tritlo joins (sid58727@gateway/web/irccloud.com/x-qngdkegzmhgdhfhg) |
| 05:05:41 | → | PoliticsII______ joins (sid193551@gateway/web/irccloud.com/x-ykrgnddgnwhyshpo) |
| 05:05:49 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 05:05:51 | → | igokaskowitz joins (~IceChat95@ool-45742c14.dyn.optonline.net) |
| 05:06:41 | × | lally quits (sid388228@gateway/web/irccloud.com/x-zbzgkwpcudviljpk) (Ping timeout: 272 seconds) |
| 05:06:51 | → | lally joins (sid388228@gateway/web/irccloud.com/x-lkvfvytrcbfmnwwv) |
| 05:08:28 | → | kozowu joins (uid44796@gateway/web/irccloud.com/x-ehcrldadbfrqmeyx) |
| 05:08:53 | → | falafel joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
| 05:13:39 | × | elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 272 seconds) |
| 05:14:43 | × | igokaskowitz quits (~IceChat95@ool-45742c14.dyn.optonline.net) (Quit: Hello, 911? Yeah, it's caught in the window this time.) |
| 05:14:46 | → | coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) |
| 05:15:27 | → | igokaskowitz joins (~IceChat95@ool-45742c14.dyn.optonline.net) |
| 05:15:50 | × | igokaskowitz quits (~IceChat95@ool-45742c14.dyn.optonline.net) (Client Quit) |
| 05:16:11 | × | star_cloud quits (~star_clou@ec2-34-217-37-165.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 05:16:24 | × | moet quits (~moet@mobile-166-137-178-107.mycingular.net) (Quit: leaving) |
| 05:17:27 | × | typetetris quits (sid275937@gateway/web/irccloud.com/x-hwvkvbbozbkfoprj) (Ping timeout: 272 seconds) |
| 05:19:05 | → | star_cloud joins (~star_clou@ec2-34-217-191-210.us-west-2.compute.amazonaws.com) |
| 05:20:37 | × | idnar quits (sid12240@gateway/web/irccloud.com/x-wvmmnuuotscagfyx) (Ping timeout: 272 seconds) |
| 05:20:59 | → | typetetris joins (sid275937@gateway/web/irccloud.com/x-qxznjjpwpuernjtq) |
| 05:21:37 | → | idnar joins (sid12240@gateway/web/irccloud.com/x-nahgmbtmyvioqrjv) |
| 05:21:44 | × | star_cloud quits (~star_clou@ec2-34-217-191-210.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 05:22:33 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@ppp-223-24-92-243.revip6.asianet.co.th) |
| 05:24:25 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 05:27:07 | → | day_ joins (~Unknown@unaffiliated/day) |
| 05:27:35 | × | typetetris quits (sid275937@gateway/web/irccloud.com/x-qxznjjpwpuernjtq) (Ping timeout: 272 seconds) |
| 05:29:39 | → | typetetris joins (sid275937@gateway/web/irccloud.com/x-msdsoshziggpwxpy) |
| 05:29:44 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 05:30:13 | × | day quits (~Unknown@unaffiliated/day) (Ping timeout: 246 seconds) |
| 05:30:13 | day_ | is now known as day |
| 05:31:27 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-89-20.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 05:32:01 | × | heyj quits (sid171370@gateway/web/irccloud.com/x-xrqocrtckuflwvgl) (Ping timeout: 272 seconds) |
| 05:32:20 | → | heyj joins (sid171370@gateway/web/irccloud.com/x-lqaivrzgirobqwkd) |
| 05:33:54 | → | ggole joins (~ggole@2001:8003:8119:7200:c9ed:f9f6:bc08:34bd) |
| 05:34:59 | × | Shadowraith quits (~user@192.12.149.141) (Read error: Connection reset by peer) |
| 05:35:57 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-89-20.w86-212.abo.wanadoo.fr) |
| 05:38:00 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-89-20.w86-212.abo.wanadoo.fr) (Client Quit) |
| 05:38:21 | × | heyj quits (sid171370@gateway/web/irccloud.com/x-lqaivrzgirobqwkd) (Ping timeout: 272 seconds) |
| 05:42:05 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@ppp-223-24-92-243.revip6.asianet.co.th) (Ping timeout: 240 seconds) |
| 05:47:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:51:39 | × | Adeon quits (sid418992@gateway/web/irccloud.com/x-zshgawryroibgclt) (Ping timeout: 272 seconds) |
| 05:52:14 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 05:55:49 | → | Adeon joins (sid418992@gateway/web/irccloud.com/x-plwafdhgynwzbsxy) |
| 05:56:25 | → | bitmagie joins (~Thunderbi@200116b80683a800c96883fdde0ec4cc.dip.versatel-1u1.de) |
| 05:57:22 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 06:00:02 | × | resolve quits (~resolve@139.28.218.148) () |
| 06:01:35 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 06:03:15 | × | berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
| 06:03:37 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 06:06:24 | × | buterthebuddha quits (~user@35.1.134.251) (Ping timeout: 256 seconds) |
| 06:06:36 | → | christo joins (~chris@81.96.113.213) |
| 06:06:36 | → | danvet_ joins (~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453) |
| 06:09:15 | → | heyj joins (sid171370@gateway/web/irccloud.com/x-ofkusdzepocmjaiw) |
| 06:14:25 | → | tput joins (~tput@S0106a84e3fe54613.ed.shawcable.net) |
| 06:15:10 | → | idhugo__ joins (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) |
| 06:16:26 | × | zfnmxt quits (~zfnmxt@unaffiliated/zfnmxt) (Remote host closed the connection) |
| 06:16:55 | → | Shadowraith joins (~user@192.12.149.141) |
| 06:16:59 | × | newhoggy quits (sid198874@gateway/web/irccloud.com/x-terspefkrxdigoxr) (Ping timeout: 272 seconds) |
| 06:17:14 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@66.115.189.204) (Ping timeout: 256 seconds) |
| 06:17:14 | × | catern quits (~catern@catern.com) (Ping timeout: 256 seconds) |
| 06:17:14 | → | zfnmxt joins (~zfnmxt@unaffiliated/zfnmxt) |
| 06:17:37 | <Shadowraith> | https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Util-Loggers.html |
| 06:17:39 | <Shadowraith> | check this out |
| 06:17:40 | → | supercoven joins (~Supercove@dsl-hkibng31-54fae2-107.dhcp.inet.fi) |
| 06:17:41 | × | supercoven quits (~Supercove@dsl-hkibng31-54fae2-107.dhcp.inet.fi) (Max SendQ exceeded) |
| 06:17:46 | <Shadowraith> | there is a logLayout function! |
| 06:17:55 | → | supercoven joins (~Supercove@dsl-hkibng31-54fae2-107.dhcp.inet.fi) |
| 06:18:08 | <Shadowraith> | i just have to tear it apart and somehow get it to log to a file! |
| 06:19:28 | → | newhoggy joins (sid198874@gateway/web/irccloud.com/x-qhmnnfjnjtcmfiay) |
| 06:23:30 | × | caubert quits (~mrbentari@207.246.80.112) (Quit: WeeChat 2.9) |
| 06:25:19 | × | gaussian quits (8cb4f058@gateway/web/cgi-irc/kiwiirc.com/ip.140.180.240.88) (Quit: Connection closed) |
| 06:25:29 | → | alp joins (~alp@2a01:e0a:58b:4920:814b:3b2:301a:4777) |
| 06:25:29 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:28:24 | × | stree quits (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) (Quit: Caught exception) |
| 06:28:41 | → | stree joins (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) |
| 06:29:00 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:32:12 | → | catern joins (~catern@104.131.201.120) |
| 06:36:38 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 06:37:25 | → | mrbentarikau joins (~mrbentari@207.246.80.112) |
| 06:38:08 | mrbentarikau | is now known as caubert |
| 06:38:25 | → | christo joins (~chris@81.96.113.213) |
| 06:39:29 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:5d4c:3718:c0a8:9f94) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:39:37 | × | noecho quits (~noecho@static.143.42.203.116.clients.your-server.de) (Quit: ZNC - http://znc.in) |
| 06:40:10 | → | noecho joins (~noecho@2a01:4f8:1c0c:80ee::4223) |
| 06:42:26 | × | Shadowraith quits (~user@192.12.149.141) (Ping timeout: 272 seconds) |
| 06:44:01 | × | drbean quits (~drbean@TC210-63-209-59.static.apol.com.tw) (Ping timeout: 256 seconds) |
| 06:44:26 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@ppp-27-55-77-167.revip3.asianet.co.th) |
| 06:44:51 | × | tnks quits (sid412124@gateway/web/irccloud.com/x-foyfefzalmzctfnv) (Ping timeout: 272 seconds) |
| 06:45:00 | → | tnks joins (sid412124@gateway/web/irccloud.com/x-zbyszpuhbbhjdzks) |
| 06:45:23 | × | Shadorain quits (uid453914@gateway/web/irccloud.com/x-gzynpbjvpqrgaqml) (Quit: Connection closed for inactivity) |
| 06:51:07 | × | xff0x quits (~fox@2001:1a81:52d5:6a00:5952:5bb0:2bc9:4930) (Ping timeout: 260 seconds) |
| 06:51:43 | → | xff0x joins (~fox@2001:1a81:52d5:6a00:633e:9aec:a495:3349) |
| 06:55:33 | → | afb joins (~afb@185.163.110.116) |
| 06:55:47 | × | falafel quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds) |
| 06:58:09 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 06:59:05 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@ppp-27-55-77-167.revip3.asianet.co.th) (Ping timeout: 240 seconds) |
| 07:01:18 | → | Sanchayan joins (~Sanchayan@122.178.226.239) |
| 07:04:10 | → | jedws joins (~jedws@101.184.175.183) |
| 07:08:55 | × | yogani quits (sid42623@gateway/web/irccloud.com/x-xmbuoxasmdpiyyri) (Ping timeout: 272 seconds) |
| 07:09:46 | → | yogani joins (sid42623@gateway/web/irccloud.com/x-rolajygghowodpbd) |
| 07:10:05 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 256 seconds) |
| 07:10:15 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 07:12:19 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 07:15:14 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:15:15 | × | alp quits (~alp@2a01:e0a:58b:4920:814b:3b2:301a:4777) (Ping timeout: 272 seconds) |
| 07:16:38 | × | idhugo__ quits (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) (Ping timeout: 272 seconds) |
| 07:16:47 | → | chaosmasttter joins (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) |
| 07:17:25 | × | alx741 quits (~alx741@186.178.110.6) (Ping timeout: 240 seconds) |
| 07:17:46 | → | stree_ joins (~stree@50-108-91-191.adr01.mskg.mi.frontiernet.net) |
| 07:18:45 | × | lpy quits (~nyd@unaffiliated/elysian) (Quit: lpy) |
| 07:18:48 | × | stree quits (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) (Ping timeout: 260 seconds) |
| 07:18:49 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 07:19:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 07:22:31 | → | hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) |
| 07:23:14 | → | dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) |
| 07:27:24 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-pvtzxvglhmvabpwf) (Quit: Connection closed for inactivity) |
| 07:29:28 | → | drbean joins (~drbean@TC210-63-209-182.static.apol.com.tw) |
| 07:29:41 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 07:30:16 | → | Ariakenom joins (~Ariakenom@h-82-196-111-82.NA.cust.bahnhof.se) |
| 07:31:43 | × | Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds) |
| 07:32:07 | → | alx741 joins (~alx741@181.196.68.148) |
| 07:34:28 | × | bitmagie quits (~Thunderbi@200116b80683a800c96883fdde0ec4cc.dip.versatel-1u1.de) (Quit: bitmagie) |
| 07:36:09 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 272 seconds) |
| 07:39:01 | hackage | telegram-bot-simple 0.3.5 - Easy to use library for building Telegram bots. https://hackage.haskell.org/package/telegram-bot-simple-0.3.5 (swamp_agr) |
| 07:39:03 | × | Sanchayan quits (~Sanchayan@122.178.226.239) (Quit: leaving) |
| 07:45:48 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 07:47:14 | → | _noblegas joins (uid91066@gateway/web/irccloud.com/x-urdkltrndaedsfvo) |
| 07:49:21 | → | chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) |
| 07:49:43 | × | darjeeling_ quits (~darjeelin@122.245.208.31) (Ping timeout: 260 seconds) |
| 07:50:24 | × | nineonine quits (~textual@50.216.62.2) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:50:57 | → | nineonine joins (~textual@50.216.62.2) |
| 07:52:10 | × | Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 07:52:41 | → | Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 07:55:34 | → | andreabedini[m] joins (andreabedi@gateway/shell/matrix.org/x-mbuhwpnbmozobgqs) |
| 07:55:47 | × | nineonine quits (~textual@50.216.62.2) (Ping timeout: 272 seconds) |
| 07:57:58 | × | grimgnr quits (~user@94.19.246.43) (Remote host closed the connection) |
| 07:58:14 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 08:00:09 | → | Franciman joins (~francesco@host-82-56-223-169.retail.telecomitalia.it) |
| 08:02:08 | → | Martinsos joins (~user@cpe-188-129-116-164.dynamic.amis.hr) |
| 08:03:23 | → | PacoV joins (~pcoves@16.194.31.93.rev.sfr.net) |
| 08:03:27 | <PacoV> | Hi there. |
| 08:03:47 | <andreabedini[m]> | hi PacoV |
| 08:04:08 | × | hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9) |
| 08:04:23 | <PacoV> | I've this type `Data.HashMap.String.HashMap String String` and I need to make it derive from Data.Binary.Binary to use it in Hakyll. |
| 08:04:41 | <PacoV> | I've absolutely no idea how to do this. |
| 08:05:15 | <PacoV> | I see that Data.HashMap.Map k e derives from Binary if k and e do too. |
| 08:05:32 | <PacoV> | But why not the strict version? |
| 08:05:58 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 256 seconds) |
| 08:06:01 | <PacoV> | https://hackage.haskell.org/package/binary-0.10.0.0/docs/src/Data.Binary.Class.html#line-645 |
| 08:06:11 | → | darjeeling_ joins (~darjeelin@122.245.208.31) |
| 08:06:13 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
| 08:08:10 | <andreabedini[m]> | I don't think there's any particular reason, perhaps suggest the author of the package to add an instance for strict maps too? if this is blocking you, you can always roll your own |
| 08:08:40 | <c_wraith> | They're not different data types |
| 08:09:04 | <c_wraith> | Data.HashMap.Strict.HashMap and Data.HashMap.HashMap are the same data type |
| 08:09:27 | <PacoV> | I'm new enough to Haskell not to know how to roll my own tbh. |
| 08:09:31 | <c_wraith> | the difference is the functions exported by their respective modules to work on them |
| 08:09:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:10:18 | → | alp joins (~alp@88.126.45.36) |
| 08:10:51 | <PacoV> | c_wraith: Data.Hash |
| 08:11:11 | <PacoV> | c_wraith: Data.HashMap.Map and Data.HashMap.String.HashMap are not the same right? |
| 08:11:24 | <andreabedini[m]> | right, I forgot how it works. Both the .Lazy and the .Strict module re-export the same Map data type from .Internal |
| 08:11:31 | <c_wraith> | Data.HashMap.String doesn't exist |
| 08:11:38 | <PacoV> | I need the strict version of the map as I read it from a yaml file. |
| 08:11:42 | <c_wraith> | I presume you mean Data.HashMap.Strict |
| 08:11:46 | <PacoV> | Typo, sorry. |
| 08:11:53 | <PacoV> | Force of the habbit :-) |
| 08:13:41 | <c_wraith> | Both Data.HashMap.Strict and Data.HashMap.Lazy re-export Data.HashMap.Internal for their HashMap type |
| 08:13:51 | <c_wraith> | The difference is the functions, not the types |
| 08:14:43 | × | tolt quits (~weechat-h@li219-154.members.linode.com) (Ping timeout: 246 seconds) |
| 08:15:22 | <c_wraith> | The problem I can see is that neither binary nor unordered-containers depends on the other, so neither one can have the instance you want |
| 08:15:30 | × | hyperfekt quits (end@bnc.hyperfekt.net) (Ping timeout: 265 seconds) |
| 08:15:30 | × | motte quits (~weechat@unaffiliated/motte) (Ping timeout: 265 seconds) |
| 08:15:31 | <c_wraith> | If there is such an instance, it's orphaned in another package |
| 08:16:45 | × | shachaf quits (~shachaf@unaffiliated/shachaf) (Remote host closed the connection) |
| 08:16:47 | → | motte joins (~weechat@unaffiliated/motte) |
| 08:16:53 | → | shachaf joins (~shachaf@unaffiliated/shachaf) |
| 08:17:08 | <PacoV> | Not sure what on orphaned package is yet. |
| 08:17:47 | <c_wraith> | instances are orphans if they're not defined with either the type or the class |
| 08:18:05 | → | tolt joins (~weechat-h@li219-154.members.linode.com) |
| 08:18:30 | <PacoV> | This code http://ix.io/2Erx gives me http://ix.io/2Erz. |
| 08:18:52 | <c_wraith> | I don't see any package that suggests by its name or short description that it provides such an instance |
| 08:19:31 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 08:19:42 | <PacoV> | I'm okay to write my own. |
| 08:19:54 | <PacoV> | I juste don't know how :-/ |
| 08:19:57 | <c_wraith> | Binary has instances for containers, not unordered-containers |
| 08:20:03 | <c_wraith> | is there any reason you can't use that? |
| 08:20:17 | → | hyperfekt joins (end@bnc.hyperfekt.net) |
| 08:20:18 | <c_wraith> | (there's rarely a reason to require unordered-containers) |
| 08:20:46 | × | Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 08:20:54 | × | iteratee quits (~kyle@162.211.154.4) (Read error: Connection reset by peer) |
| 08:20:55 | <merijn> | c_wraith: Usually the reason people have is "HashMaps are faster!!", which is a sentiment I blame on Python and JS :p |
| 08:21:03 | → | iteratee joins (~kyle@162.211.154.4) |
| 08:21:04 | <PacoV> | Well, the strict map is in unordered and I need the strict one to read it using Data.Yaml. |
| 08:21:21 | <PacoV> | I don't care about performances here. |
| 08:21:30 | <PacoV> | My maps will be small anyway. |
| 08:22:38 | → | Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 08:22:41 | → | ocamler joins (3263cbdb@50.99.203.219) |
| 08:22:59 | <c_wraith> | Ah. "depending on a library written by someone who thinks hashing is automatically fast" is the second-most common reason |
| 08:23:23 | <c_wraith> | Converting between the types is a one-liner, if you don't count the imports |
| 08:23:28 | <ocamler> | anyone know if a way to pattern match on a file stream lazily, so that I can for example match on |
| 08:23:57 | <PacoV> | c_wraith: I'll look into this. |
| 08:24:03 | <dminuoso> | ocamler: You'd use a streaming library. |
| 08:24:08 | <ocamler> | "s" : ":" : a : b : c : xs |
| 08:24:37 | <ocamler> | and it will read constant space |
| 08:24:38 | <dminuoso> | You can also use lazy IO and just pattern match like that, but streaming tends to give less headaches |
| 08:24:40 | <c_wraith> | depending on how sloppy you want to be.... readFile gives you that. |
| 08:24:42 | <dminuoso> | Then streaming. |
| 08:24:47 | <dminuoso> | If you want constant space. |
| 08:24:49 | <dminuoso> | No way around it |
| 08:25:25 | <dminuoso> | Look into conduit, pipe, streaming, etc |
| 08:25:30 | <c_wraith> | meh. streaming libraries don't guarantee constant space either. If you generate an arbitrary-size data structure, they use arbitrary space |
| 08:25:30 | <ocamler> | i see, nd pointers to a library? does conduit work here |
| 08:25:38 | → | britva joins (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) |
| 08:25:45 | <ocamler> | ah yeah in my case messages are constant sized |
| 08:25:54 | × | britva quits (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) (Client Quit) |
| 08:25:57 | <dminuoso> | Sure, conduit would work |
| 08:26:29 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 08:26:38 | → | britva joins (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) |
| 08:26:40 | × | ocamler quits (3263cbdb@50.99.203.219) (Remote host closed the connection) |
| 08:27:02 | × | britva quits (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) (Client Quit) |
| 08:27:07 | → | ocamler joins (3263cbdb@50.99.203.219) |
| 08:27:40 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 08:27:43 | <PacoV> | c_wraith: there is no function is the libs right, I've to write it. |
| 08:27:58 | × | ocamler quits (3263cbdb@50.99.203.219) (Remote host closed the connection) |
| 08:28:03 | <c_wraith> | It's just toList and fromList |
| 08:28:08 | × | drbean quits (~drbean@TC210-63-209-182.static.apol.com.tw) (Ping timeout: 256 seconds) |
| 08:29:09 | <dminuoso> | c_wraith: That's just necessity vs sufficiency. It is necessary to use a streaming library if you want constant-space. :p |
| 08:29:09 | <c_wraith> | https://hackage.haskell.org/package/unordered-containers-0.2.13.0/docs/Data-HashMap-Strict.html#v:toList and https://hackage.haskell.org/package/containers-0.6.4.1/docs/Data-Map-Strict.html#v:fromList |
| 08:29:15 | <dminuoso> | But certainly not sufficient. |
| 08:29:51 | <c_wraith> | Meh, I'm perfectly capable of using readFile in constant space - and perfectly capable of bailing out and saying it's the wrong tool for some problems. |
| 08:29:56 | → | Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 08:31:07 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Remote host closed the connection) |
| 08:31:27 | → | Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 08:32:00 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Client Quit) |
| 08:32:29 | × | cinimod_ quits (uid93893@gateway/web/irccloud.com/x-wrzxrzpvqphwukyg) (Quit: Connection closed for inactivity) |
| 08:32:29 | <dminuoso> | Well yeah, perhaps necessary is a bit too strong. But it's a lot more hassle to guarantee constant space because you have to be mindful of strictness, about accidentally leaving references |
| 08:32:37 | → | Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 08:32:47 | → | Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 08:32:55 | × | Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Remote host closed the connection) |
| 08:32:55 | <dminuoso> | (And the GHC simplifier can stab you in the back if it creates sharing where you dont expect it to) |
| 08:33:36 | <dminuoso> | It's hard to guarantee constant space and deterministic behavior with lazy IO |
| 08:33:52 | × | ulidtko quits (~ulidtko@193.111.48.79) (Read error: Connection reset by peer) |
| 08:35:03 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 08:35:23 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 08:35:26 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Client Quit) |
| 08:35:43 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 08:35:48 | × | nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 272 seconds) |
| 08:36:01 | → | borne joins (~fritjof@200116b8641c82003b6e7a122d52ed4c.dip.versatel-1u1.de) |
| 08:37:07 | × | Sgeo_ quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
| 08:37:31 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 08:40:07 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:c078:1a2e:5eb7:90ae) (Ping timeout: 272 seconds) |
| 08:40:41 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 08:42:06 | × | Feuermagier_ quits (~Feuermagi@213.178.26.41) (Quit: Leaving) |
| 08:42:16 | → | Feuermagier joins (~Feuermagi@213.178.26.41) |
| 08:45:33 | × | p3n_ quits (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:48:28 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 08:49:03 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:49:25 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 08:52:10 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:bab2:cd00:4d2d:7b87) |
| 08:52:43 | → | m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) |
| 08:52:45 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 08:54:46 | → | ulidtko joins (~ulidtko@193.111.48.79) |
| 08:55:35 | → | raichoo joins (~raichoo@213.240.178.58) |
| 08:56:01 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 08:56:53 | → | jedws joins (~jedws@101.184.175.183) |
| 08:56:57 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-zpttjkkcshfghzwp) (Quit: Connection closed for inactivity) |
| 08:57:23 | → | teddpole joins (~teddpole7@2404:ab80:b:19c0:19e5:eb0d:10d8:2984) |
| 08:58:51 | ← | teddpole parts (~teddpole7@2404:ab80:b:19c0:19e5:eb0d:10d8:2984) () |
| 09:00:01 | × | afb quits (~afb@185.163.110.116) () |
| 09:00:04 | × | Fernando-Basso[m quits (fernando-b@gateway/shell/matrix.org/x-wqwrqhbwxnrfqluo) (Quit: Idle for 30+ days) |
| 09:02:34 | → | Aquazi joins (uid312403@gateway/web/irccloud.com/x-fwnbgopbizdwfbcr) |
| 09:02:39 | → | Yumasi joins (~guillaume@2a01cb09b06b29ead46a3aeadfb0149b.ipv6.abo.wanadoo.fr) |
| 09:03:08 | → | kuribas joins (~user@ptr-25vy0ia86bt3ifa9hy0.18120a2.ip6.access.telenet.be) |
| 09:03:08 | → | jespada joins (~jespada@90.254.245.49) |
| 09:03:40 | <kuribas> | is considered good practice to use empty type classes as constraints? |
| 09:04:10 | <dminuoso> | Considering I haven't it used in practice anywhere.. |
| 09:04:16 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 09:04:20 | <dminuoso> | *seen it |
| 09:04:38 | <kuribas> | it's to see if a relation between phantom types holds |
| 09:04:51 | <opqdonut> | yeah that sounds about right |
| 09:05:10 | <opqdonut> | empty type families are common once you start doing type-level programming |
| 09:05:29 | <kuribas> | opqdonut: what's an empty type family? |
| 09:05:53 | → | _ashbreeze_ joins (~mark@72-161-253-71.dyn.centurytel.net) |
| 09:05:54 | <dminuoso> | I guess its similar to things like `data Direction = Left | Right`, it still falls prey to boolean blindness because it doesn't carry any proofs aroud. |
| 09:05:56 | <opqdonut> | err I mean non-associated type families, which are kinda equivalent to type classes with no contents (methods) |
| 09:06:47 | <kuribas> | opqdonut: you mean a boolean valued type family? |
| 09:06:56 | <opqdonut> | so something like `concat :: (Add k m n) => Vec k a -> Vec m a -> Vec n a` for length-indexed lists |
| 09:07:16 | <opqdonut> | no, I'm confused, ignore me |
| 09:07:25 | × | ashbreeze quits (~mark@184-157-32-219.dyn.centurytel.net) (Ping timeout: 264 seconds) |
| 09:07:32 | <opqdonut> | that would be `n ~ (Add k m)` or so with type families |
| 09:07:35 | <kuribas> | here Add k m n is a type class constraint no? |
| 09:07:46 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 09:07:47 | <opqdonut> | yeah, I wrote the class equivalent |
| 09:07:53 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds) |
| 09:08:37 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 09:08:42 | → | p3n joins (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) |
| 09:08:42 | <dminuoso> | In general empty typeclasses feel not very useful because you can't do much with them |
| 09:08:48 | × | jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:09:12 | <dminuoso> | The fact that two things relate does imply some fact on the value level |
| 09:09:24 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 09:09:32 | <dminuoso> | kuribas: Are these plain single typeclasses or MPTC? |
| 09:09:38 | <kuribas> | then I would have 'True ~ IsSubClass k1 k2 => Object k2 -> Attribute k1 t -> m t |
| 09:09:40 | <kuribas> | dminuoso: MPTC |
| 09:09:43 | <dminuoso> | kuribas: with fundeps? |
| 09:09:49 | <kuribas> | dminuoso: no |
| 09:09:53 | × | PacoV quits (~pcoves@16.194.31.93.rev.sfr.net) (Quit: leaving) |
| 09:09:54 | → | Netsu joins (5f84a760@96-167-132-95.pool.ukrtel.net) |
| 09:10:16 | → | PacoV joins (~pcoves@16.194.31.93.rev.sfr.net) |
| 09:10:18 | <PacoV> | Hi again. |
| 09:10:39 | <PacoV> | I now have this code http://ix.io/2ErU/haskell and this error http://ix.io/2ErW |
| 09:10:58 | <PacoV> | What does it mean `use a standalone 'deriving instance' declaration` here? |
| 09:11:02 | <Netsu> | Hello. Are type constraint synonym and typeclass alias semantically the same? |
| 09:11:29 | <PacoV> | As I now have a lazy Map String String, why can't it derive from Binary? |
| 09:11:40 | <kuribas> | PacoV: it means it cannot derive the Binary instance |
| 09:11:52 | <dminuoso> | PacoV: GND doesnt magically figure out things, it just "pierces the newtype wrapper" |
| 09:11:56 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 09:12:04 | <kuribas> | PacoV: because LTranslation is not an instance of Binary |
| 09:12:26 | <dminuoso> | So when "the thing contained has some instance" then GND lets you "copy" the instance for the newtype wrapper. But it requires the contained thing to already have that instance |
| 09:12:34 | <dminuoso> | PacoV: At any rate. For binary, dont use typeclasses. |
| 09:12:38 | <dminuoso> | Use put/get directly |
| 09:12:59 | <dminuoso> | (It's the one big wart of the library) |
| 09:13:07 | <PacoV> | dminuoso: But, Map String String derives from Binary. |
| 09:13:15 | <Netsu> | like `type MyAlias m = (MonadA m, MonadB m)` and `class (MonadA m, MonadB m) => MyAlias m`. Is it the same, or second approach more nominal and require explicit instance declaration on the such constrained type? |
| 09:13:25 | <kuribas> | PacoV: maybe you want this? http://hackage.haskell.org/package/binary-instances-1 |
| 09:13:32 | × | Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Remote host closed the connection) |
| 09:13:37 | <dminuoso> | Netsu: They are not the same |
| 09:13:40 | <Netsu> | Would instanced be resolved in same way in both cases |
| 09:13:47 | → | Axman6 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 09:13:56 | <dminuoso> | Netsu: MyAlias *implies* MonadA and MonadB, so its stronger |
| 09:14:05 | <dminuoso> | Say, there could be things MonadA and MonadB but not MyAlias |
| 09:14:44 | <dminuoso> | And it does indeed require explicit instances |
| 09:14:49 | → | enoq joins (~textual@194-208-146-143.lampert.tv) |
| 09:15:07 | <dminuoso> | Even if MyAlias is empty, GHC couldnt magically just induce instances from that. What if MyAlias demands extra laws? |
| 09:15:51 | <dminuoso> | Netsu: Also the superclass version is more composable |
| 09:16:27 | <dminuoso> | Oh, it's not. Interesting TIL |
| 09:16:39 | <PacoV> | kuribas: that looks good. I'll see how to use it. Simply import Data.Binary.Instances.UnorderedContainers ? |
| 09:16:41 | <kuribas> | dminuoso: In my case, the difference on value level is that one will be that without the constraint, you can generate queries which will generate an error. However that is on the remote service, not in my program. |
| 09:16:47 | <kuribas> | PacoV: yes |
| 09:17:03 | <PacoV> | And, if I get you people right, |
| 09:17:09 | → | christo joins (~chris@81.96.113.213) |
| 09:17:09 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 09:17:14 | <PacoV> | i've to remove the newtype wrapper. |
| 09:17:45 | <Netsu> | dminuoso: thank you a lot! Could you describe in more details, please? So first case (type constraint alias) -- it equal. And second one (type class) -- it just implies? |
| 09:18:05 | <kuribas> | dminuoso: if I fetch an attribute for an object of the wrong class, the remote server will return an error. |
| 09:19:00 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 09:19:01 | → | logicmoo joins (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 09:19:08 | × | dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 256 seconds) |
| 09:19:26 | → | sakirious2 joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) |
| 09:20:34 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 09:21:05 | → | pdxleif_ joins (~pdxleif@ec2-54-68-166-10.us-west-2.compute.amazonaws.com) |
| 09:21:14 | × | pdxleif quits (~pdxleif@ec2-54-68-166-10.us-west-2.compute.amazonaws.com) (Ping timeout: 265 seconds) |
| 09:21:30 | pdxleif_ | is now known as pdxleif |
| 09:21:43 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 265 seconds) |
| 09:21:43 | × | sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Ping timeout: 265 seconds) |
| 09:21:43 | sakirious2 | is now known as sakirious |
| 09:22:12 | × | Rembane quits (~Rembane@li346-36.members.linode.com) (Ping timeout: 265 seconds) |
| 09:22:37 | → | Rembane joins (~Rembane@li346-36.members.linode.com) |
| 09:25:38 | × | PragCypher quits (~cypher@li1507-98.members.linode.com) (Quit: ZNC 1.7.5 - https://znc.in) |
| 09:25:52 | → | PragCypher joins (~cypher@li1507-98.members.linode.com) |
| 09:26:19 | → | petersen_ joins (~petersen@redhat/juhp) |
| 09:26:49 | × | morbeus quits (vhamalai@gateway/shell/tkk.fi/x-ufpngpdloddgzoih) (Ping timeout: 246 seconds) |
| 09:26:56 | → | morbeus joins (vhamalai@gateway/shell/tkk.fi/x-sygopmpjleahuvxk) |
| 09:27:10 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 246 seconds) |
| 09:27:46 | → | mniip_ joins (~mniip@freenode/staff/mniip) |
| 09:27:49 | petersen_ | is now known as petersen |
| 09:28:04 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 09:31:52 | × | mniip quits (~mniip@freenode/staff/mniip) (Ping timeout: 619 seconds) |
| 09:38:14 | <PacoV> | It works! |
| 09:38:25 | <PacoV> | \o/ Yeah \o/ |
| 09:38:29 | <PacoV> | Thanks all! |
| 09:40:00 | <PacoV> | Damn... Same problem with Writable now... |
| 09:40:33 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 09:40:34 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 09:43:00 | <PacoV> | Wich was easy, it works. |
| 09:43:12 | × | ArsenArsen quits (~Arsen@kshare/developer/ArsenArsen) (Changing host) |
| 09:43:12 | → | ArsenArsen joins (~Arsen@fsf/member/ArsenArsen) |
| 09:43:48 | × | berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
| 09:44:06 | × | xsperry quits (~as@unaffiliated/xsperry) () |
| 09:44:28 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 09:44:31 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 09:50:33 | <dminuoso> | Netsu: Right. If a class constraint is satisfied, that implies the superclass constraints. |
| 09:50:37 | × | CindyLinz quits (~cindy_utf@112.121.78.20) (Ping timeout: 264 seconds) |
| 09:50:46 | → | CindyLinz joins (~cindy_utf@112.121.78.20) |
| 09:51:23 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 09:51:44 | <Netsu> | thanks |
| 09:52:15 | × | Netsu quits (5f84a760@96-167-132-95.pool.ukrtel.net) (Remote host closed the connection) |
| 09:54:46 | × | codeAlways quits (uid272474@gateway/web/irccloud.com/x-dbuczpztyxqztxlt) (Quit: Connection closed for inactivity) |
| 09:55:12 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 09:55:38 | → | oldsk00l joins (~znc@ec2-18-130-254-135.eu-west-2.compute.amazonaws.com) |
| 09:56:07 | × | oldsk00l_ quits (~znc@ec2-18-130-254-135.eu-west-2.compute.amazonaws.com) (Ping timeout: 256 seconds) |
| 09:56:40 | → | hardaker joins (~hardaker@193.56.252.12) |
| 09:56:42 | × | Deewiant quits (~deewiant@de1.ut.deewiant.iki.fi) (Ping timeout: 256 seconds) |
| 09:57:43 | → | Deewiant joins (~deewiant@de1.ut.deewiant.iki.fi) |
| 09:57:51 | → | jollygood2 joins (~bc8165ab@217.29.117.252) |
| 10:00:00 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 10:01:10 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 10:03:46 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 10:04:28 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 10:05:23 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 10:10:17 | × | rprije quits (~rprije@124.148.131.132) (Ping timeout: 256 seconds) |
| 10:11:23 | → | mniip joins (~mniip@freenode/staff/mniip) |
| 10:15:22 | × | mniip_ quits (~mniip@freenode/staff/mniip) (Ping timeout: 619 seconds) |
| 10:18:17 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds) |
| 10:18:38 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 10:20:47 | × | jzl quits (~jzl@unaffiliated/jzl) (Ping timeout: 260 seconds) |
| 10:23:19 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 10:23:48 | × | sveit quits (~sveit@2001:19f0:ac01:247:5400:ff:fe5c:689f) (Quit: Bye) |
| 10:24:13 | × | toorevitimirp quits (~tooreviti@117.182.180.118) (Remote host closed the connection) |
| 10:24:17 | → | sveit joins (~sveit@2001:19f0:ac01:247:5400:ff:fe5c:689f) |
| 10:26:13 | → | toorevitimirp joins (~tooreviti@117.182.180.118) |
| 10:27:32 | × | chaosmasttter quits (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 10:31:50 | → | mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com) |
| 10:32:20 | × | Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Quit: Leaving) |
| 10:32:22 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) |
| 10:32:38 | → | Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 10:33:43 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Ping timeout: 240 seconds) |
| 10:34:33 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 10:34:50 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 10:36:33 | × | PacoV quits (~pcoves@16.194.31.93.rev.sfr.net) (Quit: leaving) |
| 10:45:02 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 10:47:06 | × | raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal) |
| 10:48:46 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 10:49:16 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 10:50:42 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection) |
| 10:55:08 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 10:57:54 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 265 seconds) |
| 10:59:30 | hackage | haskoin-core 0.17.2 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.2 (jprupp) |
| 10:59:30 | × | alp quits (~alp@88.126.45.36) (Ping timeout: 260 seconds) |
| 11:03:06 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 11:03:30 | <nut> | is bytestring a list of word8? |
| 11:03:43 | <nut> | in the bytestring package |
| 11:03:50 | <merijn> | nut: Define "is" |
| 11:04:56 | <merijn> | Conceptually? Maybe. Is it implemented as a list? Definitely not. |
| 11:04:56 | <nut> | well, i have a utf-8 string and i want to keep until it sees a \n |
| 11:05:24 | <nut> | I don't know how to represent \n in Word8 |
| 11:05:25 | <merijn> | nut: Pretend the "String" part of ByteString doesn't exist |
| 11:05:28 | <merijn> | ByteString = Bytes |
| 11:05:50 | <merijn> | If you have unicode text, then you don't want ByteString |
| 11:06:02 | → | alp joins (~alp@2a01:e0a:58b:4920:8024:df57:dcb5:b452) |
| 11:06:20 | <nut> | then I check the bytestring APIs, and I realize that conceptually a Bytestring is a list of Word8 |
| 11:06:33 | <nut> | Which would you recommend? |
| 11:06:47 | <merijn> | nut: You probably want "decodeUtf8' :: ByteString -> Either UnicodeException Text" :) |
| 11:06:50 | <merijn> | https://hackage.haskell.org/package/text-1.2.4.0/docs/Data-Text-Encoding.html#v:decodeUtf8-39- |
| 11:07:11 | <merijn> | Alternatively, you can use decodeUtf8With to explicitly specify how to handle decoding errors |
| 11:07:16 | Unhammerd | is now known as Unhammer |
| 11:07:30 | <nut> | But I see there's also the Data.ByteString.Lazy.Char8 |
| 11:07:56 | <merijn> | https://github.com/quchen/articles/blob/master/fbut.md#bytestringchar8-is-bad |
| 11:07:58 | <nut> | I thought that's supposed to be useful for mixed texual and binary data |
| 11:08:12 | <nut> | Ok let me dig in |
| 11:08:16 | <merijn> | nut: Char8 is a great way to silently corrupt your data! :) |
| 11:09:06 | <nut> | So go with the text package right? |
| 11:09:34 | <merijn> | nut: Text is almost always the right choice when you're, well, dealing with text :p |
| 11:10:14 | × | acidjnk_new quits (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 11:10:21 | <merijn> | Plus conversion to/from String (via pack/unpack) and to/from ByteString (via Data.Text.Encoding) is easy and well-defined |
| 11:10:21 | <nut> | thx for the tip |
| 11:11:04 | <merijn> | :t Data.Text.takeWhile |
| 11:11:05 | <lambdabot> | (Char -> Bool) -> Data.Text.Internal.Text -> Data.Text.Internal.Text |
| 11:11:11 | <merijn> | :t Data.Text.takeWhile (=='\n') |
| 11:11:12 | <lambdabot> | Data.Text.Internal.Text -> Data.Text.Internal.Text |
| 11:11:23 | <merijn> | nut: That solves your problem right away ;) |
| 11:11:32 | <merijn> | eh |
| 11:11:41 | <merijn> | takeWhile (/='\n'), of course :p |
| 11:11:53 | <nut> | nice |
| 11:14:49 | × | solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Read error: Connection reset by peer) |
| 11:15:23 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 11:15:47 | → | zenzike joins (uid257060@gateway/web/irccloud.com/x-ekbwjbhyjbwovlhi) |
| 11:26:41 | × | alp quits (~alp@2a01:e0a:58b:4920:8024:df57:dcb5:b452) (Ping timeout: 272 seconds) |
| 11:27:36 | <zenzike> | I was looking at `RandomGen` and saw that `next` is deprecated due to poor performance. That makes sense if the default naive definition is used. However, it seems that `splitmix` provides its own `nextInt` which seems fine and is used in the instance of `StdGen` (which is `SMGen`). Am I missing something obvious? |
| 11:28:25 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 11:30:28 | → | raichoo joins (~raichoo@213.240.178.58) |
| 11:31:07 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:33:02 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:bab2:cd00:4d2d:7b87) (Ping timeout: 264 seconds) |
| 11:35:16 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 11:36:33 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 11:37:00 | hackage | haskoin-store-data 0.38.1 - Data for Haskoin Store https://hackage.haskell.org/package/haskoin-store-data-0.38.1 (jprupp) |
| 11:38:00 | hackage | haskoin-store 0.38.1 - Storage and index for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-store-0.38.1 (jprupp) |
| 11:38:59 | <dminuoso> | nut: Just to show how ByteString <> String confusion can be very surprising. Do you know how ByteString has an IsString instance, such that you can use OverloadedStrings for ByteString? |
| 11:40:24 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 11:42:00 | <kuribas> | do you have a stragegy for versioning data? |
| 11:42:43 | <kuribas> | an easy way I came up with was: simply update the data type, but pass a version number to functions. |
| 11:42:57 | → | chaosmasttter joins (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) |
| 11:43:31 | <kuribas> | so for sum types I could simply add clauses. |
| 11:43:33 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:43:38 | × | Guest48480 quits (~luka@217.146.82.202) (Remote host closed the connection) |
| 11:44:03 | <kuribas> | then each function has a "rest clause" that raises an error: myFun _ = error "unsupported field." |
| 11:44:36 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:d6bc:df2c:ba38:451b) |
| 11:46:36 | × | tput quits (~tput@S0106a84e3fe54613.ed.shawcable.net) (Read error: Connection reset by peer) |
| 11:46:48 | <kuribas> | but then the burden to not break previous code is on the programmer. |
| 11:47:30 | hackage | microlens 0.4.12.0 - A tiny lens library with no dependencies https://hackage.haskell.org/package/microlens-0.4.12.0 (Artyom) |
| 11:48:31 | hackage | microlens-platform 0.4.2, microlens-ghc 0.4.13, microlens-th 0.4.3.7 (Artyom): https://qbin.io/came-wage-exrj |
| 11:50:23 | hekkaidekapus_ | is now known as hekkaidekapus |
| 11:50:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 11:52:03 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:52:33 | → | drbean joins (~drbean@TC210-63-209-36.static.apol.com.tw) |
| 11:53:55 | × | drbean quits (~drbean@TC210-63-209-36.static.apol.com.tw) (Client Quit) |
| 11:55:11 | × | Ariakenom quits (~Ariakenom@h-82-196-111-82.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
| 11:55:28 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds) |
| 12:00:02 | × | hardaker quits (~hardaker@193.56.252.12) () |
| 12:00:50 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 12:01:46 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 12:04:17 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 12:04:50 | × | Alleria_ quits (~AllahuAkb@2604:2000:1484:26:b962:7f95:ab02:6d5a) (Ping timeout: 264 seconds) |
| 12:05:22 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 246 seconds) |
| 12:08:01 | → | Ariakenom joins (~Ariakenom@h-158-174-22-49.NA.cust.bahnhof.se) |
| 12:08:10 | × | sdx32 quits (~sdx23@unaffiliated/sdx23) (Ping timeout: 256 seconds) |
| 12:14:03 | → | Alleria_ joins (~AllahuAkb@2604:2000:1484:26:217f:16b3:ceaa:d387) |
| 12:15:34 | → | p0a joins (~user@unaffiliated/p0a) |
| 12:21:54 | × | plutoniix quits (~q@175.176.222.7) (Quit: Leaving) |
| 12:22:20 | → | lahwran joins (~lahwran@185.163.110.116) |
| 12:23:50 | <merijn> | kuribas: My strategy is, convert old data to latest format on input and write code only against the latest format |
| 12:24:16 | <merijn> | kuribas: The problem becomes limited to 1) detecting old input formats and 2) writing conversion logic |
| 12:24:49 | <kuribas> | merijn: we have the opposite problem. When we do computations, we should not use new computations on old data, only new data. |
| 12:25:15 | <kuribas> | merijn: because otherwise the customer will be surprised their data changed. |
| 12:25:27 | × | lahwran quits (~lahwran@185.163.110.116) (Remote host closed the connection) |
| 12:25:38 | <kuribas> | so I want some versioning system where I can pass the version number to the computation, and it picks the right version. |
| 12:25:45 | <merijn> | That's the same problem, except you can skip conversion forwards :p |
| 12:26:03 | <kuribas> | and the compotation is a GADT describing what needs to be done (and can be serialized to disk). |
| 12:26:38 | sphalerite | is now known as LinuxHackerman |
| 12:26:51 | LinuxHackerman | is now known as sphalerite |
| 12:27:02 | <kuribas> | merijn: you mean, convert to the latest format, but have custom logic for each version? |
| 12:27:30 | <kuribas> | I wonder how to make it manageable... |
| 12:28:05 | <lortabac> | kuribas: you need a way to convert from any version to the latest one |
| 12:28:06 | <opqdonut> | that's the question various sql migration libraries have been trying to answer for ages |
| 12:28:10 | <dminuoso> | 13:23:50 merijn | kuribas: My strategy is, convert old data to latest format on input and write code only against the latest format |
| 12:28:12 | <dminuoso> | 13:24:49 kuribas | merijn: we have the opposite problem. When we do computations, we should not use new computations on old data, only new data. |
| 12:28:14 | <dminuoso> | How is that opposite? |
| 12:28:20 | <dminuoso> | It sounds *exactly* like whe merijn suggests |
| 12:28:45 | <opqdonut> | keeping around rich enough test data for all those conversions is the hard part in my experience |
| 12:28:52 | <kuribas> | dminuoso: because the old logic should remain exactly the same |
| 12:28:53 | <opqdonut> | the slow code bloat in itself isn't that bad |
| 12:29:39 | <kuribas> | dminuoso: it's not new logic against old data, it's old logic against new data. |
| 12:29:55 | <lortabac> | kuribas: if you only add and remove fields (never modify) it is more manageable |
| 12:30:03 | <dminuoso> | opqdonut: I dont think its that complex of a problem. We just maintain a list `[Migration]` where `data Migration = Migration { migVersion :: Integer, migQuery :: Connection -> IO () }`, imho most "migration libraries" are just overengineered solutions because people seem to be afraid to write 5 lines of code for themselves. |
| 12:30:48 | <kuribas> | lortabac: that's a way of course. If I modify a function, represented by SomeFun in the GADT, I could make a new one SomeFunV2 when I modify SomeFun. |
| 12:30:56 | → | idhugo joins (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) |
| 12:32:28 | <lortabac> | kuribas: most of the time when you add a new field the conversion function will simply provide some default value (ex. Nothing) on the fields that were missing |
| 12:32:46 | <opqdonut> | dminuoso: I agree |
| 12:33:40 | → | Guest92179 joins (~ericb2@185.204.1.185) |
| 12:34:06 | <lortabac> | then you have to ensure that the new logic does not do anything new when that field has the default value |
| 12:34:15 | <merijn> | kuribas: That just means you need a "Map Version YourComputation" and do a lookup |
| 12:34:52 | <merijn> | kuribas: I wouldn't bother with fancy polymorphic solutions, just keep a copy of each old version in a separate module and call as appropriate |
| 12:35:07 | <kuribas> | merijn: or just compute :: Version -> ComputationExpression -> Result |
| 12:35:53 | <merijn> | Either way, although having a data structure might be more convenient to keep up to date |
| 12:36:00 | hackage | hmatrix 0.20.1 - Numeric Linear Algebra https://hackage.haskell.org/package/hmatrix-0.20.1 (DominicSteinitz) |
| 12:36:12 | <merijn> | kuribas: https://github.com/merijn/Belewitte/tree/master/benchmark-analysis/src/Schema/Model |
| 12:36:15 | <merijn> | kuribas: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Schema/Model.hs#L71-L215 |
| 12:36:50 | <merijn> | kuribas: You can skip the data migration and instead dispatch |
| 12:36:51 | <kuribas> | merijn: right, I could import the functions that haven't changed from the previous version... |
| 12:37:18 | <merijn> | kuribas: Whenever I change the schema, I copy the old schema into a new V<n> module and import it qualified, then call it |
| 12:37:41 | <merijn> | You get a lot of modules, but maintenance is a breeze (i.e. there is none :p) |
| 12:38:11 | <kuribas> | the only worry I have is that you'ld need to dig through different versions of the module to find the implementation... |
| 12:38:49 | × | danvet_ quits (~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453) (Quit: Leaving) |
| 12:39:14 | <kuribas> | for example I have sumNumbers :: [Double] -> Double which hasn't changed from V3 through V1, then I would need to look in V3, then V2, then V1... |
| 12:39:37 | <kuribas> | well I guess emacs or vscode where to find it... |
| 12:39:50 | → | Amras joins (~Amras@unaffiliated/amras0000) |
| 12:39:58 | <kuribas> | merijn: alright, I'll give it a try :) |
| 12:41:40 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 12:43:59 | <Axman6> | kuribas: have you seen what acid-state/the library it uses does? |
| 12:44:02 | × | Ariakenom quits (~Ariakenom@h-158-174-22-49.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
| 12:44:04 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Client Quit) |
| 12:44:54 | → | Ariakenom joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) |
| 12:46:32 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 12:47:55 | <kuribas> | Axman6: yes, some time ago, I don't remember it that well. |
| 12:47:59 | <kuribas> | but I prefer a simple solution |
| 12:49:46 | <merijn> | safe-copy |
| 12:50:05 | <merijn> | Axman6: But that's basically the same scheme I proposed, but with TH |
| 12:50:56 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 12:56:18 | <kuribas> | I prefer boring haskell :) |
| 12:57:03 | Lord_of_Life_ | is now known as Lord_of_Life |
| 12:57:43 | × | raichoo quits (~raichoo@213.240.178.58) (Read error: Connection reset by peer) |
| 12:58:17 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 12:59:09 | × | xff0x quits (~fox@2001:1a81:52d5:6a00:633e:9aec:a495:3349) (Ping timeout: 272 seconds) |
| 12:59:54 | → | xff0x joins (~fox@2001:1a81:52d5:6a00:7dc4:a65f:e69e:5679) |
| 12:59:59 | → | raichoo joins (~raichoo@213.240.178.58) |
| 13:00:34 | <aplainzetakind> | What do I need to do to make a local library available to a v2-style build environment (specifically asking for xmonad-contrib to build xmonad from the repo). |
| 13:01:38 | <merijn> | aplainzetakind: As in you have package A and B both locally, with A depending on the local copy of B? |
| 13:02:11 | <aplainzetakind> | Yes. |
| 13:02:33 | <merijn> | You'll want a cabal.project/cabal.project.local file |
| 13:02:35 | <merijn> | aplainzetakind: https://cabal.readthedocs.io/en/latest/nix-local-build.html#local-versus-external-packages |
| 13:02:37 | <__monty__> | aplainzetakind: I think you'll want to add a package stanza in cabal.project. |
| 13:02:45 | → | texasmynsted joins (~texasmyns@212.102.45.118) |
| 13:02:55 | <aplainzetakind> | Thanks. |
| 13:02:56 | <merijn> | https://cabal.readthedocs.io/en/latest/cabal-project.html#specifying-the-local-packages |
| 13:04:30 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 13:05:39 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 13:05:40 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:5d4c:3718:c0a8:9f94) |
| 13:06:19 | × | _noblegas quits (uid91066@gateway/web/irccloud.com/x-urdkltrndaedsfvo) (Quit: Connection closed for inactivity) |
| 13:08:53 | × | Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 265 seconds) |
| 13:09:07 | × | raichoo quits (~raichoo@213.240.178.58) (Read error: Connection reset by peer) |
| 13:09:21 | → | raichoo joins (~raichoo@213.240.178.58) |
| 13:10:52 | → | m0b10s joins (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) |
| 13:12:45 | × | supercoven quits (~Supercove@dsl-hkibng31-54fae2-107.dhcp.inet.fi) (Ping timeout: 240 seconds) |
| 13:14:11 | <m0b10s> | Hi, just one question, if i have a tuple and i need to take one element “index i” but i have difrent types on the tuple, is it possible to take the element índex x with just one function? |
| 13:19:18 | <p0a> | m0b10s: It should be, tuples don't need to have the same type |
| 13:19:25 | × | idhugo quits (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) (Ping timeout: 272 seconds) |
| 13:19:48 | <p0a> | m0b10s: for example, fst (1, 'a') ==> 1 |
| 13:20:11 | <merijn> | No, I think he wants a numerical indexing to extract from a tuple |
| 13:20:19 | <merijn> | And the answer is "no, you can't write that" |
| 13:20:35 | <hc> | I think you can, with 'hacks'... |
| 13:20:35 | <merijn> | At least, not without a bunch of super ugly nightmarish extensions and mess |
| 13:20:52 | <hc> | like fun :: Int -> Tuple -> Maybe a |
| 13:21:05 | <hc> | where fun returns either a Just a or Nothing if the types don't match |
| 13:22:12 | <dminuoso> | % (1, 'a') ^. _2 |
| 13:22:13 | <yahb> | dminuoso: 'a' |
| 13:22:14 | × | m0b10s quits (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) (Quit: Connection closed) |
| 13:22:19 | <dminuoso> | % (1, 123, "foobar") ^. _2 |
| 13:22:19 | <yahb> | dminuoso: 123 |
| 13:22:28 | <dminuoso> | % (1, "str, 123, 'a') ^. _2 |
| 13:22:29 | <yahb> | dminuoso: ; <interactive>:159:26: error: lexical error in string/character literal at end of input |
| 13:22:31 | → | m0b10s joins (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) |
| 13:22:35 | <dminuoso> | % (1, "str", 123, 'a') ^. _2 |
| 13:22:35 | <yahb> | dminuoso: "str" |
| 13:22:37 | <dminuoso> | m0b10s: This? |
| 13:23:37 | → | PacoV joins (~pcoves@16.194.31.93.rev.sfr.net) |
| 13:23:42 | <PacoV> | Hey again! |
| 13:24:04 | <hc> | % :t (^.) |
| 13:24:04 | <yahb> | hc: forall {s} {a}. s -> Getting a s a -> a |
| 13:24:16 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Read error: Connection reset by peer) |
| 13:24:19 | <hc> | dminuoso: this will fail hard when the types don't match? |
| 13:24:27 | <hc> | % (1, "str") ^. _1 == "foo" |
| 13:24:27 | <yahb> | hc: ; <interactive>:162:2: error:; * No instance for (Num [Char]) arising from the literal `1'; * In the expression: 1; In the first argument of `(^.)', namely `(1, "str")'; In the first argument of `(==)', namely `(1, "str") ^. _1' |
| 13:24:29 | <hc> | ah :) |
| 13:24:44 | <m0b10s> | diminuoso, it’s that, but in a funcion... i think the “maybe” type is what i’m looking for! =) |
| 13:24:54 | → | prez joins (~prez@unaffiliated/prez) |
| 13:24:57 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 13:24:58 | <m0b10s> | ty hc |
| 13:25:18 | <PacoV> | Thanks to you I was able to write http://ix.io/2EsV/haskell which is supposed to be a clean rewrite at my take in I18n of Hakyll that you can find here https://gitlab.com/swi18ng/swi18ng |
| 13:25:33 | <dminuoso> | m0b10s: well you can just |
| 13:25:41 | <PacoV> | Now, the real question : why is the new code failing on yaml parsing? |
| 13:25:42 | <dminuoso> | % getFirst = (^. _1) |
| 13:25:43 | <yahb> | dminuoso: |
| 13:25:46 | <dminuoso> | % :t getFirst -- m0b10s |
| 13:25:46 | <yahb> | dminuoso: forall {s} {b}. Field1 s s b b => s -> b |
| 13:25:52 | <xerox_> | curl ghcup ... Unknown architecture: arm64 ... aw :| |
| 13:25:56 | × | enoq quits (~textual@194-208-146-143.lampert.tv) (Ping timeout: 240 seconds) |
| 13:25:57 | <dminuoso> | Admittedly, the type is awkward, but it works! |
| 13:26:42 | → | LaserShark joins (~LaserShar@s91904426.blix.com) |
| 13:26:53 | <dminuoso> | hc: What do you mean "fail hard"? |
| 13:27:08 | <p0a> | will `data List = Null | List a (List b)' with your own (!!) for it work? |
| 13:27:13 | <hc> | m0b10s: have a look at https://hackage.haskell.org/package/vault , that's where i got the idea |
| 13:27:23 | <maerwald> | xerox_: wip |
| 13:27:28 | <hc> | dminuoso: I mean a run time error, I guess |
| 13:27:33 | <dminuoso> | p0a: If you implement a Field1 instance for it, sure |
| 13:27:42 | <Orbstheorem> | Hi o/ Why are ReaderT classes injective? I would like to run two Readers under the same monadstack. |
| 13:27:46 | <xerox_> | maerwald: makes sense :) |
| 13:27:49 | <maerwald> | xerox_: https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/12 |
| 13:27:51 | <dminuoso> | Orbstheorem: Because newtypes are injective? |
| 13:28:37 | <dminuoso> | Orbstheorem: Is "injective" really the word you mean to use here? |
| 13:28:59 | <dminuoso> | In principle, you can run two ReaderT if you want, nothing prevents you from that. |
| 13:29:03 | → | enoq joins (~textual@194-208-146-143.lampert.tv) |
| 13:29:50 | <prez> | @free x :: (((a -> b) -> b) -> c) -> c |
| 13:29:50 | <lambdabot> | (forall q f1. (forall f2 f3. g . f2 = f3 . f => g (q f2) = f1 f3) => h (k q) = p f1) => h (x k) = x p |
| 13:30:02 | <dminuoso> | Orbstheorem: It's probably better to just use `ReaderT (e1, e2)` instead of multiple ReaderT though |
| 13:30:09 | <Orbstheorem> | dminuoso: Maybe injective is not the right word then. I see `MonadReader r m | m -> r` in the class definition. |
| 13:30:14 | <dminuoso> | That's a functional dependency |
| 13:30:22 | <Orbstheorem> | Oh, my bad. |
| 13:30:25 | <dminuoso> | Also note that MonadReader /= ReaderT |
| 13:30:34 | <dminuoso> | Albeit related, they are very much different things |
| 13:30:53 | <Orbstheorem> | Yes, I'm probably a bit distracted :( |
| 13:31:16 | <dminuoso> | Orbstheorem: Anyway. Use ReaderT with a tuple. |
| 13:31:23 | <dminuoso> | Or data if you have even more things |
| 13:31:27 | <Orbstheorem> | Anyways, I want to run `MonadReader Foo m` and `MonadReader Bar m` under the same monad stack. |
| 13:32:00 | <dminuoso> | data Env = Env { envA :: A, envB :: B, envC :: C }; newtype T a = T { runT :: ReaderT Env (...) } |
| 13:32:07 | <dminuoso> | Orbstheorem: ^- use that. either with data or (,) |
| 13:32:38 | <dminuoso> | You can mix that with lens/optics and classy lenses (or at least mimic it) for convenient access |
| 13:32:48 | <dminuoso> | say |
| 13:32:50 | <p0a> | m0b10s: right, so you can stack tuples like (1, ('a', ("b", ⊥))) and then write (!!) 0 (x,_) = x ; (!!) n (_, xs) = !! (n - 1) xs |
| 13:32:55 | <reactormonk> | If I have a Recursive and a Corecursive instance for my AST structure (with recursion-schemes) can I write a Traversal' lens with these? |
| 13:33:06 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:5d4c:3718:c0a8:9f94) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:33:37 | <Orbstheorem> | Maybe there's something I fail to see, but that would imply that my consumers need to be aware of the structure of `Env` instead of just its components. |
| 13:34:08 | → | Sanchayan joins (~Sanchayan@122.182.198.33) |
| 13:34:13 | <dminuoso> | Orbstheorem: It depends, either they need to be aware of Env, or you can use classy lenses (or something akin to them) |
| 13:34:17 | <dminuoso> | so say |
| 13:34:34 | <dminuoso> | % data Foo { _fooInt :: Int; _fooChar :: Char } |
| 13:34:34 | <yahb> | dminuoso: ; <interactive>:165:26: error: parse error on input `;' |
| 13:34:41 | <dminuoso> | % data Foo = Foo { _fooInt :: Int; _fooChar :: Char } |
| 13:34:41 | <yahb> | dminuoso: ; <interactive>:166:32: error: parse error on input `;' |
| 13:34:45 | × | Sanchayan quits (~Sanchayan@122.182.198.33) (Remote host closed the connection) |
| 13:34:52 | <dminuoso> | % data Foo = Foo { _fooInt :: Int, _fooChar :: Char } |
| 13:34:53 | <yahb> | dminuoso: |
| 13:34:58 | <m0b10s> | p0a, what would be the signature in that case? |
| 13:35:11 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 13:35:15 | → | brodie_ joins (~brodie@207.53.253.137) |
| 13:35:35 | → | son0p joins (~son0p@181.136.122.143) |
| 13:35:42 | <dminuoso> | % $(makeLenses ''Foo) |
| 13:35:42 | <yahb> | dminuoso: ; <interactive>:173:3: error:; * Couldn't match type `[Dec]' with `Exp'; Expected type: ExpQ; Actual type: DecsQ; * In the expression: makeLenses ''Foo; In the untyped splice: $(makeLenses ''Foo) |
| 13:35:50 | brodie_ | is now known as brodie |
| 13:36:11 | <dminuoso> | Orbstheorem: err, see https://hackage.haskell.org/package/optics-th-0.3.0.2/docs/Optics-TH.html#v:makeClassy |
| 13:36:13 | <Axman6> | Orbstheorem: if you go the lens route, you end up with code that looks like: foo :: (HadFoo r, HasBar r, MonadReader r m) => m Thing, which you can then access (assuming you have used classy lenses) with do theFoo <- view foo; theBar <- view bar |
| 13:36:29 | <p0a> | m0b10s: oh yeah, of course that is the issue :) Sorry, my solution doesn't work |
| 13:36:46 | <Orbstheorem> | Axman6: Yes, that's what I feared. |
| 13:36:51 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 13:36:58 | <dminuoso> | Orbstheorem: You can mimic classy lenses without going all in on lenses. |
| 13:37:02 | <dminuoso> | Say by writing |
| 13:37:09 | × | brodie quits (~brodie@207.53.253.137) (Client Quit) |
| 13:37:16 | <dminuoso> | class HasFoo e where foo :: e -> Foo |
| 13:37:22 | <dminuoso> | class HasBar e where bar :: e -> Bar |
| 13:37:26 | <Axman6> | it's quite pleasant to use, because your code only declares what parts of the environment it needs to know about, and can't access anything it doesn't declare, meaning you know know more about what your code can do, and you don't need to define a data type which everything depends on |
| 13:37:27 | <Orbstheorem> | Yes, I've manually implemented it with `MonadReader a m, Convertible a Foo` in the past. |
| 13:37:34 | <dminuoso> | And then you can just write `do f <- asks foo` |
| 13:37:42 | <dminuoso> | No lens needed, same idea |
| 13:38:05 | <Orbstheorem> | Oh well. |
| 13:38:09 | <Orbstheorem> | Thanks ^^ |
| 13:38:23 | <Orbstheorem> | I think I'll go the classy way just to learn lenses. |
| 13:38:48 | <xerox_> | maerwald: was it you that posted ghc-9.1.0.20201110-aarch-apple-darwin.tar.xz? |
| 13:39:08 | <maerwald> | posted? |
| 13:39:14 | × | m0b10s quits (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) (Quit: Connection closed) |
| 13:39:16 | → | vacm joins (~vacwm@70.23.92.191) |
| 13:39:19 | <xerox_> | I forget who linked me to it |
| 13:39:24 | <Axman6> | in the mail |
| 13:39:27 | <Axman6> | :) |
| 13:39:41 | → | nbloomf joins (~nbloomf@76.217.43.73) |
| 13:39:54 | × | p0a quits (~user@unaffiliated/p0a) (Quit: bye) |
| 13:40:14 | <Axman6> | xerox_: could have been angerman or bgamari |
| 13:40:35 | <xerox_> | oh yeah angerman thanks |
| 13:40:39 | <xerox_> | I wonder how one uses it :) |
| 13:41:00 | <angerman> | xerox_: https://www.dropbox.com/s/jskw2pjpkhquj4g/ghc-9.1.0.20201110-aarch64-apple-darwin.tar.xz?dl=0 |
| 13:41:11 | → | m0b10s joins (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) |
| 13:41:13 | <xerox_> | angerman: can I pm you? |
| 13:41:31 | <prez> | @free it :: Applicative f => f ((((a -> b) -> b) -> c) -> c) |
| 13:41:31 | <lambdabot> | Extra stuff at end of line |
| 13:41:32 | <angerman> | xerox_: unpack, ./configure --prefix=/path/to/install/in, make install |
| 13:42:01 | × | tromp_ quits (~tromp@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer) |
| 13:42:11 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 13:42:18 | <angerman> | xerox_: how you'd use any other ghc binary distribution. You'll want to bootstrap cabal after that using that ghc to provision some usable environment. Do note though that 9.1 is an in-flight build. |
| 13:42:33 | <xerox_> | angerman: have been spoiled by ghcup |
| 13:43:03 | <m0b10s> | Don’t know if you got the message but:Thank you all for the help! I have some ideas, time to press keys =) (i got dc’d sry) |
| 13:43:16 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 240 seconds) |
| 13:43:16 | <angerman> | xerox_: it's really only meant as a PoC for a aarch64/darwin NCG build. A lot of packages will likely complain about bounds |
| 13:43:33 | × | m0b10s quits (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) (Client Quit) |
| 13:43:33 | <xerox_> | NCG standing for? |
| 13:43:39 | <angerman> | xerox_: if all you want is to use ghc on arm macs, you can just use x86_64/darwin builds. Rosetta does just fine. |
| 13:44:04 | <xerox_> | I see, native code generation, avoiding llvm now I remember |
| 13:44:06 | <prez> | @free it :: f ((((a -> b) -> b) -> c) -> c) |
| 13:44:06 | <lambdabot> | Extra stuff at end of line |
| 13:44:07 | <angerman> | xerox_: native code generator backend (as opposed to the llvm backend); the pretty much only benefit is that it's substantially faster. |
| 13:44:57 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 13:45:00 | → | m0b10s joins (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) |
| 13:45:18 | × | m0b10s quits (53dff9cb@gateway/web/cgi-irc/kiwiirc.com/ip.83.223.249.203) (Client Quit) |
| 13:48:31 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 13:48:54 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds) |
| 13:50:11 | × | is_null quits (~jpic@pdpc/supporter/professional/is-null) (Remote host closed the connection) |
| 13:50:33 | × | nbloomf quits (~nbloomf@76.217.43.73) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:50:45 | → | fendor joins (~fendor@178.115.128.157.wireless.dyn.drei.com) |
| 13:51:05 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds) |
| 13:53:27 | × | LaserShark quits (~LaserShar@s91904426.blix.com) (Remote host closed the connection) |
| 13:55:11 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 13:55:30 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 13:56:00 | hackage | ghc-events 0.14.0 - Library and tool for parsing .eventlog files from GHC https://hackage.haskell.org/package/ghc-events-0.14.0 (MitsutoshiAoe) |
| 13:56:34 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:57:23 | → | Suigintou joins (~Suigintou@92.223.89.101) |
| 13:57:35 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 13:57:39 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 13:58:38 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 13:58:54 | → | christo joins (~chris@81.96.113.213) |
| 13:59:53 | → | vacm joins (~vacwm@70.23.92.191) |
| 13:59:55 | <xerox_> | angerman: that was a good suggestion thanks |
| 14:00:17 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 14:02:24 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 14:04:07 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 14:05:31 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 14:10:00 | hackage | require 0.4.10 - Scrap your qualified import clutter https://hackage.haskell.org/package/require-0.4.10 (NickSeagull) |
| 14:12:09 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 14:14:04 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:15:45 | × | enoq quits (~textual@194-208-146-143.lampert.tv) (Ping timeout: 240 seconds) |
| 14:17:19 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 14:18:36 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 14:18:48 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 14:18:55 | → | brodie joins (~brodie@207.53.253.137) |
| 14:21:03 | → | mlugg joins (c3c2162d@195.194.22.45) |
| 14:22:34 | → | Tario joins (~Tario@201.192.165.173) |
| 14:23:08 | <mlugg> | How does GHC flatten pattern matches (specifically, in case expressions) when converting to Core? Is there a neat algorithm for it? |
| 14:23:22 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) |
| 14:23:36 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 14:25:24 | <lortabac> | mlugg: https://www.microsoft.com/en-us/research/uploads/prod/1987/01/slpj-book-1987-r90.pdf |
| 14:25:33 | <lortabac> | there is a chapter about pattern-matching |
| 14:25:37 | <PacoV> | Hey again. |
| 14:26:00 | <PacoV> | I need to use `toStrict` from bytestring. |
| 14:26:04 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-bqvxxtetbbtbyhwi) (Quit: Connection closed for inactivity) |
| 14:26:08 | <PacoV> | But also pandoc. |
| 14:26:23 | <PacoV> | Pandoc uses the 0.10 and toStrict is in 0.11 |
| 14:26:34 | <PacoV> | How am I supposed to deal with that? |
| 14:26:41 | <merijn> | toStrict is in 0.10 too |
| 14:26:50 | <merijn> | 0.11 just exported it from another module |
| 14:27:11 | → | sebben joins (~sebastian@dslb-092-076-026-123.092.076.pools.vodafone-ip.de) |
| 14:27:18 | × | sebben quits (~sebastian@dslb-092-076-026-123.092.076.pools.vodafone-ip.de) (Client Quit) |
| 14:27:19 | <PacoV> | Module ‘Data.ByteString.Char8’ does not export ‘toStrict’ |
| 14:27:22 | <PacoV> | Said ghc. |
| 14:27:25 | <merijn> | iirc, toStrict/fromStrict are only exported from Data.ByteString.Lazy before 0.11 and as of 0.11 also from Data.ByteString |
| 14:27:43 | <merijn> | PacoV: Because you're importing it from the wrong module |
| 14:27:45 | <mlugg> | lortabac: Ah thanks, much appreciated |
| 14:27:52 | <merijn> | Also https://github.com/quchen/articles/blob/master/fbut.md#bytestringchar8-is-bad |
| 14:29:40 | <PacoV> | I'd use whatever you want. But telling someone who's new to Haskell that something is bad won't help. |
| 14:30:15 | <PacoV> | Well, for this one, the article tells what to do. |
| 14:30:19 | <PacoV> | So, my bad. |
| 14:30:25 | <merijn> | :p |
| 14:30:57 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds) |
| 14:32:29 | <merijn> | Even if you decide you want to just ignore errors going via Text and "decodeUtf8With" is better, because you at least get to *pick* how to ignore them (i.e. replace with unicode "missing character", silently drop, replace with something else |
| 14:32:33 | <merijn> | ) |
| 14:34:29 | → | enoq joins (~textual@194-208-146-143.lampert.tv) |
| 14:35:31 | hackage | criterion 1.5.9.0 - Robust, reliable performance measurement and analysis https://hackage.haskell.org/package/criterion-1.5.9.0 (ryanglscott) |
| 14:38:50 | × | darjeeling_ quits (~darjeelin@122.245.208.31) (Ping timeout: 260 seconds) |
| 14:39:27 | <PacoV> | I'll follow you article as soon as |
| 14:39:36 | <PacoV> | I'll follow you article as soon as I understand it. |
| 14:39:42 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 14:40:18 | <merijn> | PacoV: How familiar are you with the difference between "unicode" and "encodings representing unicode"? |
| 14:42:56 | <PacoV> | Not familiar at all at the moment :-/ |
| 14:43:39 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 272 seconds) |
| 14:43:43 | <merijn> | PacoV: Ah, then you probably will want to read this (which applies to basically all programming languages): https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ |
| 14:45:32 | × | mr_yogurt quits (~mr_yogurt@5.61.211.35.bc.googleusercontent.com) (Ping timeout: 256 seconds) |
| 14:46:13 | <PacoV> | Ho, I remember reading this a while ago. |
| 14:46:21 | <PacoV> | I'll give it a second read. |
| 14:46:30 | <PacoV> | Thanks! |
| 14:46:47 | <PacoV> | BTW, my code works like a charm! |
| 14:47:34 | × | mlugg quits (c3c2162d@195.194.22.45) (Ping timeout: 245 seconds) |
| 14:47:35 | <PacoV> | Time to go buy some food before my better half comes back and I'll read those two articles! Thanks again! |
| 14:49:16 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 14:51:18 | <int-e> | . o O ( "works like a charm" -- if you believe in it strongly enough, under the right circumstances, after a ritual sacrifice ) |
| 14:52:32 | → | mr_yogurt joins (~mr_yogurt@5.61.211.35.bc.googleusercontent.com) |
| 14:52:50 | → | darjeeling_ joins (~darjeelin@122.245.211.11) |
| 14:52:56 | <hekkaidekapus> | merijn: You are apparently on a roll, carry on over at <https://github.com/haskell/haskell-language-server/pull/602>. |
| 14:53:21 | <merijn> | ... |
| 14:53:38 | <hekkaidekapus> | heh |
| 14:53:46 | × | bjobjo quits (~bjobjo@2a01:79c:cebf:d688::9e6) (Read error: Connection reset by peer) |
| 14:53:49 | <fendor> | hekkaidekapus, did I do it wrong? |
| 14:53:58 | <merijn> | fendor: Well, yes |
| 14:54:00 | → | bjobjo joins (~bjobjo@2a01:79c:cebf:d688::9e6) |
| 14:54:10 | <fendor> | welp, I tried |
| 14:54:33 | <hekkaidekapus> | fendor: Sorry, I’m short on time. But merijn will take care of you :) |
| 14:54:36 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 14:54:38 | <merijn> | with-utf8 is a terrible package that makes me wanna stab people |
| 14:54:54 | <fendor> | it was recommended on that reddit thread >_> |
| 14:55:19 | <merijn> | Yes, because the internet is filled with clueless people >.> |
| 14:55:19 | <int-e> | stabbing, hmm, does it have lenses? |
| 14:55:44 | <merijn> | fendor: The problem is there is a no-win scenario |
| 14:56:07 | <int-e> | locales are a terrible idea |
| 14:56:22 | <merijn> | fendor: Basically, *some* systems have broken environments/configurations were the encoding isn't specified, then causes GHC to open handles with the wrong encoding leading to encoding errors |
| 14:56:50 | <fendor> | right, so far I understood it |
| 14:57:01 | <merijn> | fendor: The problem with "always UTF-8" is that it intentionally breaks for everyone who has a properly configured system with encoding different than utf-8 |
| 14:57:05 | <int-e> | for files, the encoding should be part of the file, not implicit in the environment |
| 14:57:42 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 14:58:13 | <int-e> | merijn: there is no such thing :P |
| 14:58:23 | <merijn> | fendor: So if someone in Japan is using a UTF-16 (or UTF-32) configuration system wide or something, then you are now unable to open their files, because they're not UTF-8, but you're overriding the environment |
| 14:58:33 | <fendor> | and in this case, the error is more likely that the encoding of the stdout handle is wrong and it should suffice to explicitly set it, right? |
| 14:58:41 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:95c1:f982:82e4:2d79) |
| 14:58:43 | <merijn> | int-e: "encodings should be part of the file" <- sure, agreed, but that's not the world we live in |
| 14:59:04 | <merijn> | "intentionally breaking a feature that has existed for over 30 years to control this" is not the right solution |
| 14:59:24 | <merijn> | fendor: Well, but how do you know what encoding the terminal connected to stdout expects? |
| 14:59:37 | × | brodie quits (~brodie@207.53.253.137) (Quit: brodie) |
| 14:59:54 | <merijn> | fendor: You can set stdout to UTF-8 and write stuff to it, but if the terminal connected to stdout doesn't *expect* utf-8, you're outputting garbage |
| 15:00:01 | × | Suigintou quits (~Suigintou@92.223.89.101) () |
| 15:00:12 | <fendor> | right. |
| 15:00:51 | → | brodie joins (~brodie@207.53.253.137) |
| 15:01:00 | <merijn> | The only standard way to figure out what the terminal expects is to check the locale, which is what GHC does to figure out the right encoding |
| 15:01:21 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 15:01:32 | <int-e> | I'd be okay with the locale specifying what happens on terminals... it even makes sense. But AFAICS it tends to be used for everything else as well, including files that may be transferred between systems, and that makes it a huge mess unless everybody agrees on the same encoding. |
| 15:01:34 | <fendor> | so, this is a user error that the user needs to fix? |
| 15:01:53 | → | christo joins (~chris@81.96.113.213) |
| 15:02:10 | <merijn> | There was a related discussion on GHC gitlab, lemme look it up |
| 15:02:26 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Max SendQ exceeded) |
| 15:02:44 | <merijn> | How do I search for tickets I commented on on gitlab? |
| 15:02:51 | × | jollygood2 quits (~bc8165ab@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout)) |
| 15:02:56 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 15:03:06 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
| 15:03:12 | → | renzhi joins (~renzhi@2607:fa49:655f:e600::28da) |
| 15:04:06 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Max SendQ exceeded) |
| 15:04:08 | → | Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net) |
| 15:04:37 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 15:05:02 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 15:05:21 | <merijn> | fendor: Related discussion: https://gitlab.haskell.org/ghc/ghc/-/issues/17755 |
| 15:05:46 | <merijn> | fendor: In essence the problem is that the use has his/her locale unset and/or set to the 'C' locale, which errors on non-ascii |
| 15:06:19 | <fendor> | merijn, thanks will read it later! |
| 15:06:21 | → | SanchayanMaity joins (~Sanchayan@106.201.35.233) |
| 15:07:34 | <merijn> | fendor: As for the issue you reference in the PR that is a cursed problem anyway |
| 15:07:36 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 15:08:00 | hackage | http-client 0.7.3 - An HTTP client engine https://hackage.haskell.org/package/http-client-0.7.3 (MichaelSnoyman) |
| 15:08:13 | <merijn> | fendor: The problem there is "can't open a file with an umlaut in the path" and I can already tell you know it's *impossible* to correctly and robustly fix/avoid this problem |
| 15:08:26 | <fendor> | merijn, you make me sad :( |
| 15:08:37 | <fendor> | thanks for the explanation! I have a better understanding now! |
| 15:08:47 | <merijn> | fendor: Linux (possibly all of posix) has made the retarded choice to say paths are "unspecified bytes not containg NUL or /" |
| 15:09:01 | hackage | http-client-openssl 0.3.3 - http-client backend using the OpenSSL library. https://hackage.haskell.org/package/http-client-openssl-0.3.3 (MichaelSnoyman) |
| 15:09:15 | <merijn> | fendor: Since there is no encoding information in the filesystem/file API you have no clue what encoding was used to create the file |
| 15:09:42 | × | SanchayanMaity quits (~Sanchayan@106.201.35.233) (Client Quit) |
| 15:09:44 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 272 seconds) |
| 15:09:51 | <merijn> | And even if you know that the file was created with UTF-8 and you are using UTF-8 you *still* can't reliably open it |
| 15:10:01 | → | SanchayanMaity joins (~Sanchayan@106.201.35.233) |
| 15:10:17 | <merijn> | Because ü has (at least?) two representations. As a single codepoint and as a composed codepoint |
| 15:10:31 | <merijn> | And the produced byte encoding in UTF-8 is different for those two |
| 15:10:59 | <merijn> | So depending on *how* the user types in ü you may get different byte sequence and thus non-existent paths |
| 15:11:02 | <merijn> | Fun times! |
| 15:11:12 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 15:11:55 | <merijn> | Windows was much smarter in specifying NTFS paths to be UTF-16 with a defined normalisation scheme, so you can unambiguously know how to access paths with unicode characters |
| 15:13:11 | <merijn> | fendor: Making people sad is what I do. People tell me what they wanna do in the POSIX API and then I spend 10 minutes telling them they're fundamentally doomed because everything is terrible :) |
| 15:14:38 | <__monty__> | Fun fact, linux and macOS tend to default to opposite normalization schemes for filenames, lots of fun to be had with rsync between those systems. |
| 15:16:17 | → | Lycurgus joins (~niemand@cpe-45-46-134-163.buffalo.res.rr.com) |
| 15:16:25 | × | darjeeling_ quits (~darjeelin@122.245.211.11) (Ping timeout: 264 seconds) |
| 15:16:29 | × | brodie quits (~brodie@207.53.253.137) (Quit: brodie) |
| 15:18:33 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 256 seconds) |
| 15:18:55 | <nut> | I have an English dictionary file encoded as utf8. There's also an index file giving the offset for each word. If I use Data.Text.IO to read in the dicionary, how can I make use of the offset info for an efficient lookup? |
| 15:18:58 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 15:20:06 | <merijn> | nut: offset in *what* |
| 15:20:21 | <nut> | offset in the dictionary |
| 15:20:47 | <nut> | so that when people do lookup, they dont' have to pass the dictionary again and again |
| 15:20:49 | <Lycurgus> | likely byte offset in a flat file |
| 15:20:52 | <merijn> | offset in what? bytes? unicode codepoints? characters? lines? |
| 15:20:57 | <nut> | bytes |
| 15:21:23 | <merijn> | You can't really index Text in terms of bytes |
| 15:21:49 | <nut> | ah, then it could be character, let me check |
| 15:21:50 | <merijn> | You can read it as ByteString, do byte indexing on that, then selectively decode text starting from an offset |
| 15:22:02 | <merijn> | nut: If it's character you're doomed too :) |
| 15:22:05 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 15:22:07 | <dolio> | Once it's in Text all the offsets could be wrong anyway. |
| 15:23:12 | <nut> | so for a Data.Text string, there's no way to move some kind of pointer within the string right? |
| 15:23:35 | <merijn> | nut: You can index Text "by codepoint", maybe |
| 15:24:08 | → | Entertainment joins (~entertain@104.246.132.210) |
| 15:24:22 | <nut> | so basically fseek equivalent |
| 15:24:38 | <merijn> | nut: The real, honest answer is that: in every single programming language indexing strings is a broken clusterfuck you cannot rely on to do anything sensible (even though it may appear to do something sensible if you only ever look at ascii) |
| 15:25:19 | → | conal joins (~conal@64.71.133.70) |
| 15:25:22 | → | nados joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 15:25:41 | <nut> | The offset idea does seem efficient. Without it, how do Haskell manage quick lookup? |
| 15:26:02 | × | SanchayanMaity quits (~Sanchayan@106.201.35.233) (Quit: leaving) |
| 15:26:20 | <merijn> | nut: Like I said, if the offset is in bytes you can easily read a bytestring and index that and then decode to Text "on demand" |
| 15:26:21 | → | SanchayanMaity joins (~Sanchayan@106.201.35.233) |
| 15:26:34 | <nut> | ok I see |
| 15:26:46 | <nut> | So i'll use the bytestring package instead of text |
| 15:26:54 | → | Deide joins (~Deide@217.155.19.23) |
| 15:26:59 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 15:27:02 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 15:27:15 | → | is_null joins (~jpic@pdpc/supporter/professional/is-null) |
| 15:27:27 | <nut> | You gave me the hint to use text instead of bytestring a few hours ago before i went to the dentist |
| 15:27:28 | <merijn> | nut: More practically for a deictionary I'd just read in the entire thing and create a Map |
| 15:27:35 | × | SanchayanMaity quits (~Sanchayan@106.201.35.233) (Client Quit) |
| 15:27:45 | → | conal joins (~conal@64.71.133.70) |
| 15:27:50 | → | SanchayanMaity joins (~Sanchayan@106.201.35.233) |
| 15:28:27 | <nut> | merijn: that would mean in memory lookup |
| 15:28:39 | <nut> | merijn: How would you then serialize the thing? |
| 15:28:55 | × | SanchayanMaity quits (~Sanchayan@106.201.35.233) (Client Quit) |
| 15:29:03 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 265 seconds) |
| 15:29:12 | → | SanchayanMaity joins (~Sanchayan@106.201.35.233) |
| 15:29:38 | <merijn> | nut: I'd just write the entire thing to disk at once and read it in at once |
| 15:30:06 | <merijn> | Rather than dynamically indexing an open file. You *can* dynamically index the file, but that doesn't seem worth it unless it's truly massive |
| 15:30:56 | <nut> | Most dictionary files I;ve seem have some sofisticated file formate |
| 15:31:04 | → | Guest_85 joins (5181d645@host81-129-214-69.range81-129.btcentralplus.com) |
| 15:31:22 | <nut> | Such as the stardcit file formate or dictd.org |
| 15:31:57 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-asjzblgwwtdcvjsz) |
| 15:32:18 | <nut> | It's not massive, a few hundred M only. But I want to find out for the sake of learning |
| 15:32:23 | <merijn> | nut: Ah, but *that* sounds more like a different question, that sounds like "how would I parse complicated/sophisticated file formats into something usable?" |
| 15:33:25 | <nut> | Those file formats are design to have less disk access times and at the same time quick search time |
| 15:33:53 | <merijn> | @hoogle hSeek |
| 15:33:53 | <lambdabot> | System.IO hSeek :: Handle -> SeekMode -> Integer -> IO () |
| 15:33:53 | <lambdabot> | GHC.IO.Handle hSeek :: Handle -> SeekMode -> Integer -> IO () |
| 15:33:53 | <lambdabot> | UnliftIO.IO hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m () |
| 15:33:55 | <merijn> | @hoogle hGet |
| 15:33:55 | <lambdabot> | Data.ByteString hGet :: Handle -> Int -> IO ByteString |
| 15:33:55 | <lambdabot> | Data.ByteString.Char8 hGet :: Handle -> Int -> IO ByteString |
| 15:33:55 | <lambdabot> | Data.ByteString.Lazy hGet :: Handle -> Int -> IO ByteString |
| 15:34:18 | × | SanchayanMaity quits (~Sanchayan@106.201.35.233) (Quit: leaving) |
| 15:34:22 | <nut> | Indeed, at first I though there would be a Data.Text.hSeek |
| 15:34:30 | → | darjeeling_ joins (~darjeelin@122.245.211.11) |
| 15:34:36 | <merijn> | nut: If you open a file Handle you can use hSeek to jump to offsets to read bytes from there in the file, the same way you would in other languages |
| 15:34:38 | → | SanchayanMaity joins (~Sanchayan@106.201.35.233) |
| 15:34:39 | × | toorevitimirp quits (~tooreviti@117.182.180.118) (Remote host closed the connection) |
| 15:34:57 | × | morbeus quits (vhamalai@gateway/shell/tkk.fi/x-sygopmpjleahuvxk) (Remote host closed the connection) |
| 15:34:59 | <merijn> | nut: You might also be interested in: |
| 15:35:01 | <merijn> | @hackage binary |
| 15:35:01 | <lambdabot> | https://hackage.haskell.org/package/binary |
| 15:35:19 | <merijn> | nut: Which is a library for decoding ByteString into custom data |
| 15:35:39 | <merijn> | @hackage attoparsec |
| 15:35:39 | <lambdabot> | https://hackage.haskell.org/package/attoparsec |
| 15:36:28 | <dolio> | You can just use the hSeek from base. Text doesn't need to provide its own. |
| 15:36:52 | <merijn> | dolio: Of course hSeek and then trying to read a String is *also* cursed :p |
| 15:37:08 | <nut> | There is no hSeek from base |
| 15:37:18 | <merijn> | System.IO.hSeek ? |
| 15:37:24 | <nut> | at least not from Prelude |
| 15:37:45 | <dolio> | Prelude doesn't export everything in base. |
| 15:37:48 | <nut> | i see |
| 15:39:17 | × | SanchayanMaity quits (~Sanchayan@106.201.35.233) (Client Quit) |
| 15:39:28 | <merijn> | Prelude only exports a fraction of base :) |
| 15:39:28 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Read error: Connection timed out) |
| 15:43:22 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:d6bc:df2c:ba38:451b) (Ping timeout: 260 seconds) |
| 15:44:15 | × | Guest_85 quits (5181d645@host81-129-214-69.range81-129.btcentralplus.com) (Remote host closed the connection) |
| 15:44:30 | hackage | hedn 0.3.0.2 - EDN parsing and encoding https://hackage.haskell.org/package/hedn-0.3.0.2 (AlexanderBondarenko) |
| 15:44:49 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 15:45:17 | → | idhugo joins (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) |
| 15:46:37 | × | MarcelineVQ quits (~anja@198.254.202.72) (Ping timeout: 260 seconds) |
| 15:48:16 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 15:50:09 | → | MarcelineVQ joins (~anja@198.254.202.72) |
| 15:51:33 | × | Franciman quits (~francesco@host-82-56-223-169.retail.telecomitalia.it) (Quit: Leaving) |
| 15:53:15 | <tomjaguarpaw> | merijn: Compact regions didn't help with my GC problem in the end because I realised my test cases are also generating large amounts of data! However, I did manage to combine your System.Mem.performGC and GHC.Stats suggestions with RTS options to good effect: https://stackoverflow.com/a/64878595/997606 |
| 15:54:25 | → | knupfer joins (~Thunderbi@i59F7FFD9.versanet.de) |
| 15:55:24 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:9c16:5b76:e160:ad6d) |
| 15:55:41 | → | jfredett joins (~jfredett@178.162.212.214) |
| 15:56:34 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 15:56:46 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 15:57:14 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 15:58:51 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-89-20.w86-212.abo.wanadoo.fr) |
| 16:00:03 | → | carlomagno1 joins (~cararell@148.87.23.11) |
| 16:00:03 | × | carlomagno quits (~cararell@148.87.23.10) (Remote host closed the connection) |
| 16:00:26 | → | Rudd0 joins (~Rudd0@185.189.115.98) |
| 16:02:23 | <merijn> | tomjaguarpaw: Well, to be fair,if your code is producing lots of data, then perhaps including it in your benchmarks isn't so wrong :p |
| 16:04:41 | → | nuncanada joins (~dude@179.235.160.168) |
| 16:05:01 | → | christo joins (~chris@81.96.113.213) |
| 16:05:12 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 16:05:38 | → | asthasr joins (~asthasr@162.210.29.120) |
| 16:07:30 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 16:07:40 | → | christo_ joins (~chris@81.96.113.213) |
| 16:07:42 | × | christo quits (~chris@81.96.113.213) (Read error: Connection reset by peer) |
| 16:08:16 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 16:08:49 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 16:09:16 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
| 16:10:13 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 16:10:21 | × | christo_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 16:10:47 | × | acidjnk_new quits (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 16:11:07 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 16:11:41 | → | hseg joins (~gesh@185.120.126.113) |
| 16:13:16 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 16:13:35 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds) |
| 16:13:39 | → | Tario joins (~Tario@201.192.165.173) |
| 16:14:25 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 16:15:13 | → | nineonine joins (~textual@S01061cabc0b095f3.vf.shawcable.net) |
| 16:16:14 | → | conal joins (~conal@64.71.133.70) |
| 16:16:39 | × | nineonine quits (~textual@S01061cabc0b095f3.vf.shawcable.net) (Client Quit) |
| 16:17:23 | → | royal_screwup219 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 16:26:09 | → | bitmagie joins (~Thunderbi@200116b80683a800c96883fdde0ec4cc.dip.versatel-1u1.de) |
| 16:28:10 | ← | hseg parts (~gesh@185.120.126.113) ("WeeChat 2.9") |
| 16:28:31 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 16:29:48 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 16:32:47 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:33:51 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 16:34:14 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 16:34:41 | × | bitmagie quits (~Thunderbi@200116b80683a800c96883fdde0ec4cc.dip.versatel-1u1.de) (Quit: bitmagie) |
| 16:35:40 | → | Sose__ joins (sid429738@gateway/web/irccloud.com/x-vdewfreqbfmetfxe) |
| 16:36:45 | Sose__ | is now known as Sose |
| 16:39:30 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 16:39:52 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 16:40:55 | <tomjaguarpaw> | Yes, but I want to benchmark the algorithm more than the code. |
| 16:41:46 | <sshine> | CI/GitHub Actions question: I have a bunch of individual Haskell projects in the same repo. I'd like if they shared cache since they all use the same stack resolver. right now actions/cache@v2 uses key: ${{ matrix.resolver }}-${{ hashFiles('projects/*/package.yaml') }}, which means that if any one project file changes, the cache is invalidated for all exercises. |
| 16:43:22 | <sshine> | wait, never mind. :) |
| 16:43:29 | → | p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
| 16:43:58 | × | Lycurgus quits (~niemand@cpe-45-46-134-163.buffalo.res.rr.com) (Quit: Exeunt) |
| 16:43:59 | × | incertia quits (~incertia@d60-65-215-180.col.wideopenwest.com) (Ping timeout: 272 seconds) |
| 16:46:29 | × | p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection) |
| 16:47:54 | → | incertia joins (~incertia@d60-65-215-180.col.wideopenwest.com) |
| 16:50:07 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection) |
| 16:51:02 | → | nineonine joins (~textual@S01061cabc0b095f3.vf.shawcable.net) |
| 16:52:20 | × | idhugo quits (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 16:52:24 | <davean> | tomjaguarpaw: The amount of data produced is a core part of the alhorithm, but you can try to seperate your code's inefficiency out. |
| 16:52:37 | <davean> | tomjaguarpaw: the limiting factor on many, if not most, algs though is their memory usage. |
| 16:52:46 | → | idhugo joins (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) |
| 16:53:33 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 16:55:23 | → | codeAlways joins (uid272474@gateway/web/irccloud.com/x-twiappljqzzzwfyb) |
| 16:55:23 | → | v_m_v_ joins (~vm_v@2a02:aa12:3200:6480:fc4f:fb56:796a:9a4a) |
| 16:56:00 | → | j12866 joins (~j12866@cpe-45-47-128-180.nycap.res.rr.com) |
| 16:56:14 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 16:56:16 | × | nineonine quits (~textual@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds) |
| 16:58:20 | → | Chi1thangoo joins (~Chi1thang@87.112.60.168) |
| 16:59:23 | × | chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 17:01:08 | → | conal joins (~conal@64.71.133.70) |
| 17:02:19 | × | borne quits (~fritjof@200116b8641c82003b6e7a122d52ed4c.dip.versatel-1u1.de) (Quit: WeeChat 2.9) |
| 17:05:41 | → | sszark joins (~sszark@h-213-180.A392.priv.bahnhof.se) |
| 17:05:55 | → | lucasb joins (uid333435@gateway/web/irccloud.com/x-gwvbkmucegxpihno) |
| 17:06:07 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-eaonyjbsdauymoqz) |
| 17:06:12 | × | valdyn quits (~valdyn@host-88-217-143-53.customer.m-online.net) (Ping timeout: 265 seconds) |
| 17:06:22 | × | raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal) |
| 17:11:22 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 17:12:25 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection) |
| 17:16:29 | → | crdrost joins (~crdrost@2601:646:8280:85f0:7445:34ce:4342:d2eb) |
| 17:18:37 | <sszark> | how do i install a package with cabal from github? |
| 17:19:04 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 17:19:47 | <merijn> | sszark: "It Depends", are we talking "I wanna install an executable", "I want to develop against an unreleased dependency", or "I wanna install it to make accessible everywhere on my system"? |
| 17:19:49 | → | Hanma[m] joins (hanmamatri@gateway/shell/matrix.org/x-okkoowimutlrlfkb) |
| 17:20:01 | hackage | microlens-th 0.4.3.8 - Automatic generation of record lenses for microlens https://hackage.haskell.org/package/microlens-th-0.4.3.8 (Artyom) |
| 17:21:55 | <sszark> | merijn: i'm trying to install the git version of this. and yes, i would like it to be accessible globally. https://github.com/xmonad/xmonad-contrib |
| 17:22:17 | <merijn> | And you have cabal-install >3.0? |
| 17:23:36 | <sszark> | I have 3.2 merijn |
| 17:24:36 | <merijn> | sszark: Then the answer is "there's no real easy way to do that". But according to that repo's readme you need to use git version of xmonad too, in which case you can go into your git clone of xmonad and create a cabal.project file using: https://cabal.readthedocs.io/en/latest/cabal-project.html#specifying-packages-from-remote-version-control-locations |
| 17:26:48 | <sszark> | Ah, i'll have a look. thanks merijn |
| 17:28:56 | <geekosaur> | the ideal way to do it is to set up a project which uses an environment, and use a build script that references the environment so you don't have to install globally. I think there's an example in the xmonad-testing repo |
| 17:29:35 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 272 seconds) |
| 17:31:36 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 17:32:49 | × | j12866 quits (~j12866@cpe-45-47-128-180.nycap.res.rr.com) (Quit: WeeChat 2.8) |
| 17:33:20 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 17:36:10 | × | incertia quits (~incertia@d60-65-215-180.col.wideopenwest.com) (Ping timeout: 265 seconds) |
| 17:37:53 | × | enoq quits (~textual@194-208-146-143.lampert.tv) (Quit: Textual IRC Client: www.textualapp.com) |
| 17:38:18 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 17:39:15 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 17:40:24 | × | ggole quits (~ggole@2001:8003:8119:7200:c9ed:f9f6:bc08:34bd) (Quit: Leaving) |
| 17:41:30 | hackage | ngx-export-tools-extra 0.5.8.0 - More extra tools for Nginx haskell module https://hackage.haskell.org/package/ngx-export-tools-extra-0.5.8.0 (lyokha) |
| 17:42:55 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 17:44:03 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection) |
| 17:44:22 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 17:44:24 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Read error: Connection reset by peer) |
| 17:44:26 | × | royal_screwup219 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 17:44:34 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 17:44:42 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 17:44:44 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Read error: Connection reset by peer) |
| 17:45:04 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 17:45:05 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Read error: Connection reset by peer) |
| 17:45:23 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 17:45:25 | × | Yumasi quits (~guillaume@2a01cb09b06b29ead46a3aeadfb0149b.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds) |
| 17:45:26 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection) |
| 17:45:46 | → | stackdimes joins (~stackdime@85.203.46.103) |
| 17:46:26 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 17:47:21 | → | juuandyy joins (~juuandyy@90.166.144.65) |
| 17:48:16 | × | dusty_pacer quits (~pi@2600:6c50:80:2f4a:e9d0:6569:1cea:d1d4) (Remote host closed the connection) |
| 17:48:16 | × | dustypacer quits (~pi@137-025-112-171.res.spectrum.com) (Remote host closed the connection) |
| 17:48:43 | × | juuandyy quits (~juuandyy@90.166.144.65) (Client Quit) |
| 17:48:46 | × | sdrodge quits (~sdrodge@unaffiliated/sdrodge) (Ping timeout: 260 seconds) |
| 17:48:56 | → | juuandyy joins (~juuandyy@90.166.144.65) |
| 17:50:57 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 17:52:19 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 17:52:27 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 17:53:31 | × | idhugo quits (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) (Quit: Leaving) |
| 17:54:13 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 17:55:00 | hackage | easy-args 0.1.0 - Parses command line arguments https://hackage.haskell.org/package/easy-args-0.1.0 (jlamothe) |
| 17:55:18 | × | klardotsh quits (~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net) (Ping timeout: 260 seconds) |
| 18:00:01 | × | jfredett quits (~jfredett@178.162.212.214) () |
| 18:00:30 | → | knupfer1 joins (~Thunderbi@200116b8248c3e001dd00f63aeb782c8.dip.versatel-1u1.de) |
| 18:00:30 | × | knupfer quits (~Thunderbi@i59F7FFD9.versanet.de) (Read error: Connection reset by peer) |
| 18:00:31 | knupfer1 | is now known as knupfer |
| 18:01:00 | × | knupfer quits (~Thunderbi@200116b8248c3e001dd00f63aeb782c8.dip.versatel-1u1.de) (Read error: Connection reset by peer) |
| 18:01:10 | → | knupfer joins (~Thunderbi@200116b8248c3e001cba42276e90907c.dip.versatel-1u1.de) |
| 18:02:55 | → | klardotsh joins (~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net) |
| 18:03:28 | × | carlomagno1 quits (~cararell@148.87.23.11) (Remote host closed the connection) |
| 18:07:16 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 18:07:42 | <koz_> | :t fromIntegral |
| 18:07:43 | <lambdabot> | (Integral a, Num b) => a -> b |
| 18:08:08 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 18:09:25 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds) |
| 18:10:15 | × | juuandyy quits (~juuandyy@90.166.144.65) (Ping timeout: 256 seconds) |
| 18:10:42 | <monochrom> | Don't forget that realToFrac covers many other cases. (And also overlaps with fromIntegral for some cases, e.g., Int -> Integer, Int -> Double) |
| 18:14:33 | × | xff0x quits (~fox@2001:1a81:52d5:6a00:7dc4:a65f:e69e:5679) (Ping timeout: 272 seconds) |
| 18:16:08 | → | xff0x joins (~fox@2001:1a81:52d5:6a00:7dc4:a65f:e69e:5679) |
| 18:18:03 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 18:18:28 | → | AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl) |
| 18:19:31 | → | carlomagno joins (~cararell@148.87.23.11) |
| 18:20:16 | × | kuribas quits (~user@ptr-25vy0ia86bt3ifa9hy0.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 18:21:02 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 18:21:58 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 18:22:31 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-hhaciizupxxisicz) |
| 18:26:20 | → | dead10cc joins (~rg@2607:fea8:2c40:307:7a35:e25c:842c:6c52) |
| 18:29:27 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 18:29:37 | × | knupfer quits (~Thunderbi@200116b8248c3e001cba42276e90907c.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 18:30:18 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 260 seconds) |
| 18:30:38 | × | Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 18:31:56 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 18:32:44 | × | v_m_v_ quits (~vm_v@2a02:aa12:3200:6480:fc4f:fb56:796a:9a4a) (Remote host closed the connection) |
| 18:32:48 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 18:36:01 | hackage | haskoin-core 0.17.3 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.3 (jprupp) |
| 18:37:10 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 18:40:05 | → | falafel joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
| 18:40:14 | <merijn> | Anyone know if cabal files allow conditional blocks on the top level? it seems not |
| 18:41:19 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds) |
| 18:41:34 | <Uniaika> | never saw such a thing, but doesn't mean it cannot |
| 18:42:29 | <merijn> | ah, rats |
| 18:42:32 | <merijn> | "Conditional blocks may appear anywhere inside a library or executable section." |
| 18:42:54 | <merijn> | I've been hosed by own abuse of data-files! |
| 18:43:14 | × | dead10cc quits (~rg@2607:fea8:2c40:307:7a35:e25c:842c:6c52) (Ping timeout: 264 seconds) |
| 18:44:06 | × | bliminse quits (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) (Ping timeout: 256 seconds) |
| 18:44:21 | <merijn> | I had symlinks to files relative to my project, which works with cabal v2-run, but sadly borks the install command it seems >.> |
| 18:45:08 | → | bliminse joins (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) |
| 18:50:31 | hackage | haskoin-node 0.17.1 - P2P library for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-node-0.17.1 (jprupp) |
| 18:51:46 | → | conal joins (~conal@64.71.133.70) |
| 18:52:46 | × | stackdimes quits (~stackdime@85.203.46.103) (Quit: WeeChat 2.9) |
| 18:53:29 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:54:26 | → | foursaph joins (~sergiu@dynamic-077-008-009-052.77.8.pool.telefonica.de) |
| 18:54:42 | → | dead10cc joins (~rg@2607:fea8:2c40:307:1703:4aa6:d428:f7e7) |
| 18:54:42 | × | chaosmasttter quits (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 18:55:45 | <merijn> | Anyone happen to have an "ancient" cabal-install lyying around? (i.e. pre 3.0) |
| 18:55:52 | → | doitux|mob joins (~doitux|mo@195.206.169.184) |
| 18:55:58 | × | bliminse quits (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) (Ping timeout: 260 seconds) |
| 18:56:38 | <monochrom> | ghcup knows 2.4.1.0 |
| 18:56:56 | → | bliminse joins (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) |
| 18:57:04 | <tomjaguarpaw> | I have 2.2.0.0. Debian stable user! |
| 18:57:14 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 18:57:15 | <merijn> | monochrom: I don't have ghcup :p |
| 18:57:18 | <monochrom> | I can send you a copy, but I think you would trust ghcup more than trust me |
| 18:57:37 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer) |
| 18:57:39 | <monochrom> | Ah, ghcup just downloads it from some haskell.org URL, I can isolate that. |
| 18:57:40 | <merijn> | monochrom: That was more of a "and is willing to quickly test something trivial for me" kinda question :p |
| 18:58:00 | hackage | hakyll-images 1.0.0 - Hakyll utilities to work with images https://hackage.haskell.org/package/hakyll-images-1.0.0 (LaurentRDC) |
| 18:58:10 | → | Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 18:58:12 | <monochrom> | pretty sure the cost of communicating what to test > the cost of testing it yourself |
| 18:58:15 | <tomjaguarpaw> | merijn: Sure |
| 18:58:35 | <merijn> | tomjaguarpaw: If you add a line "data-files: foo/*" to any cabal file you have where foo is non-empty, does it error out? |
| 18:59:06 | <tomjaguarpaw> | With what command? v2-build, say? |
| 18:59:13 | <merijn> | anything, tbh |
| 18:59:24 | <monochrom> | https://downloads.haskell.org/~cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz |
| 18:59:29 | <merijn> | The question is whether the cabal format allows that at all |
| 18:59:35 | <merijn> | monochrom: Nice, but I don't use linux ;) |
| 18:59:47 | <merijn> | At least not when I can help it :p |
| 19:00:24 | tomjaguarpaw | is surprised to learn that cabal version 2 doesn't support v2- prefixes |
| 19:00:25 | <monochrom> | I think mac would be https://downloads.haskell.org/~cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-apple-darwin-sierra.tar.xz |
| 19:00:48 | <merijn> | tomjaguarpaw: Those were added in 2.4 I think, before then it was new- |
| 19:00:49 | <tomjaguarpaw> | merijn: It doesn't error out before erroring out about broken packages ... |
| 19:00:58 | <merijn> | hmm |
| 19:01:02 | <tomjaguarpaw> | Ah yes, I remember now |
| 19:01:13 | <merijn> | Cursed documentation disagreeing with reality |
| 19:01:46 | <tomjaguarpaw> | And new-build seems to be progressing fine |
| 19:02:11 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 19:02:52 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 19:02:55 | <merijn> | This is against the claims of the documentation...sadness |
| 19:03:13 | <tomjaguarpaw> | What does the documentation say? |
| 19:03:19 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds) |
| 19:03:20 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 19:03:21 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 19:03:43 | <tomjaguarpaw> | Oh, cabal sdist /does/ error |
| 19:03:47 | <merijn> | You can have wildcards without extension at all |
| 19:03:52 | <merijn> | s/can/can't |
| 19:04:09 | <monochrom> | "If a wildcard is used, it must be used with an extension, so data-files: data/* is not allowed." |
| 19:04:11 | <tomjaguarpaw> | cabal: invalid file glob 'foo/*'. Wildcards '*' are only allowed in place of |
| 19:04:11 | <tomjaguarpaw> | the file name, not in the directory name or file extension. If a wildcard is |
| 19:04:11 | <tomjaguarpaw> | used it must be with an file extension. |
| 19:04:26 | <tomjaguarpaw> | (but with cabal sdist only, cabal new-build doesn't show the error) |
| 19:04:54 | <monochrom> | Oh, generally a lot of these rules are unenforced until sdist |
| 19:05:28 | <merijn> | ah, cabal check also complains about it |
| 19:05:37 | <monochrom> | Another one is if you forget your other-modules: field, you only get bitten when sdist decides to not include your source code. |
| 19:06:06 | <merijn> | monochrom: That's why haskell-ci only tests via sdist+unpack |
| 19:06:44 | <sclv> | i thought the new warn home modules stuff warns about missing other modules nowadays |
| 19:07:03 | <sclv> | its all part of the messy legacy of how cabal relies in part on ghc's module discovery instead of doing its own entirely |
| 19:07:07 | <merijn> | sclv: You have to use a ghc that's new enough |
| 19:07:25 | × | Ariakenom quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Quit: Leaving) |
| 19:10:20 | × | foursaph quits (~sergiu@dynamic-077-008-009-052.77.8.pool.telefonica.de) (Quit: leaving) |
| 19:11:13 | <merijn> | Fortunately, I don't have to care about properly packaging this code, so who cares :p |
| 19:13:42 | <merijn> | All problems can be solved by caring less and lowering your standards! Whoo! \o/ |
| 19:13:56 | <monochrom> | :) |
| 19:14:21 | <monochrom> | Will you also be using "cabal install" down the road? Because that's another time data-files: really counts. |
| 19:14:41 | <merijn> | monochrom: Well, that's actually were I ran into it not working |
| 19:14:45 | <monochrom> | But if not, if you're just going "cabal run", I think you're set. |
| 19:14:49 | <merijn> | monochrom: But I have a simple life hack |
| 19:15:00 | <merijn> | monochrom: Just don't list the data files at all! |
| 19:15:36 | <merijn> | I only need them for some codepaths I don't care about now anyway |
| 19:15:44 | <monochrom> | I wonder how hard it is to enlist "*.dat *.txt *.bin" |
| 19:16:05 | <merijn> | monochrom: they're symlinks :p |
| 19:16:43 | <monochrom> | OK I begin to fathom how much you meant "abuse" now. |
| 19:17:28 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 256 seconds) |
| 19:18:51 | <merijn> | monochrom: I have a make based build system that ends up calling cabal, but the Haskell code needs access to C++ build artifacts, so I have relative symlinks in data-files that point to the right executables/objects :p |
| 19:19:10 | → | Ariakenom joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) |
| 19:19:27 | → | chaosmasttter joins (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) |
| 19:19:50 | monochrom | cries |
| 19:19:59 | <monochrom> | This makes baby jesus cry. |
| 19:20:35 | <merijn> | monochrom: It's simple, don't ever try to install or sdist :) |
| 19:21:05 | × | spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Ping timeout: 240 seconds) |
| 19:21:10 | × | nuncanada quits (~dude@179.235.160.168) (Read error: Connection reset by peer) |
| 19:22:36 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 19:22:41 | <merijn> | monochrom: If people want robuster packaging that works beyond "clone the repo and run make" they should spend more funding on engineering in academia :p |
| 19:23:13 | <monochrom> | You already have a makefile so I suppose it is not a stretch to add "make install" and script its Turing-complete behaviour to your heart's content. |
| 19:23:32 | <merijn> | monochrom: Ah, see I have a simpler solution |
| 19:23:34 | <monochrom> | and even "make run" |
| 19:23:44 | <merijn> | monochrom: "just don't allow installs" |
| 19:23:57 | <monochrom> | BTW why symlinks, why not hardlinks? |
| 19:24:16 | <merijn> | monochrom: That doesn't work across git clones |
| 19:24:21 | <monochrom> | Oh darn |
| 19:24:28 | <merijn> | monochrom: Since the symlinks are in VCS, the build artifacts aren't |
| 19:24:46 | → | britva joins (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) |
| 19:24:52 | <monochrom> | I guess this is what people mean by "sweet spot" |
| 19:24:55 | <merijn> | monochrom: Actually, my actual solution is much more genius/maddening/depressing than make run :p |
| 19:25:06 | <monochrom> | Actually make it Pareto optimum hahaha |
| 19:25:22 | <merijn> | monochrom: I have differently named symlinks to 1 script: https://github.com/merijn/Belewitte/blob/master/cabal-run.sh |
| 19:25:45 | <merijn> | monochrom: Which use make to find the right directory/executables, then invokes cabal v2-run based on the name of the symlink :p |
| 19:25:47 | <monochrom> | "any tiny pertubation from this seemingly awkward arrangement, you would be actually worse off" |
| 19:25:58 | → | servo joins (servo@41.141.56.25) |
| 19:26:15 | × | carlomagno quits (~cararell@148.87.23.11) (Quit: Leaving.) |
| 19:26:21 | <merijn> | monochrom: "organically grown" :p |
| 19:26:31 | → | foursaph_ joins (~foursaph@dynamic-077-008-009-052.77.8.pool.telefonica.de) |
| 19:27:16 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 240 seconds) |
| 19:27:17 | <monochrom> | I have understood the trick of arg[0]-dependent behaviour for a long time. That one isn't too bad. |
| 19:27:24 | <merijn> | monochrom: tbh, aside from the fact the cabal/data-files interaction with make is insane it's stunningly robust. |
| 19:27:59 | <servo> | hi |
| 19:28:21 | <merijn> | monochrom: I've have cloned this repo to 7+ machines macOS & linux and it works flawlessly each time if the small handful of prerequisites (mostly GHC, cabal, gmake and a non-ancient clang/gcc) are installed |
| 19:28:47 | → | christo joins (~chris@81.96.113.213) |
| 19:29:22 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Quit: cosimone) |
| 19:29:23 | <merijn> | monochrom: I had to somehow turn it into something that my promotor can robustly check out and run without needing to know anything about Haskell besides "download these binaries here" and in the sense it's worked :p |
| 19:30:02 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 19:30:04 | × | foursaph_ quits (~foursaph@dynamic-077-008-009-052.77.8.pool.telefonica.de) (Client Quit) |
| 19:30:19 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Read error: Connection reset by peer) |
| 19:31:47 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) |
| 19:32:21 | × | Takumo quits (takumo@unaffiliated/takumokatekari) (Quit: WeeChat 2.8) |
| 19:33:20 | → | nuncanada joins (~dude@179.235.160.168) |
| 19:34:04 | → | foursaph joins (4d080934@dynamic-077-008-009-052.77.8.pool.telefonica.de) |
| 19:34:12 | × | foursaph quits (4d080934@dynamic-077-008-009-052.77.8.pool.telefonica.de) (Remote host closed the connection) |
| 19:34:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 19:34:38 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 19:35:14 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 19:35:43 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds) |
| 19:36:35 | × | Guest92179 quits (~ericb2@185.204.1.185) (Remote host closed the connection) |
| 19:37:43 | <tomjaguarpaw> | What is a promotor? |
| 19:38:43 | × | son0p quits (~son0p@181.136.122.143) (Quit: leaving) |
| 19:38:45 | <tomsmeding> | phd thesis adviser? |
| 19:38:50 | <merijn> | tomjaguarpaw: As in doctoral supervisor |
| 19:40:34 | <tomjaguarpaw> | Aha |
| 19:42:01 | hackage | haskoin-store 0.38.2 - Storage and index for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-store-0.38.2 (jprupp) |
| 19:43:00 | hackage | arxiv 0.0.2 - A client for the Arxiv API https://hackage.haskell.org/package/arxiv-0.0.2 (TobiasSchoofs) |
| 19:43:30 | → | st8less joins (~st8less@2603:a060:11fd:0:68fe:5aed:dd91:2111) |
| 19:46:35 | → | vacm joins (~vacwm@70.23.92.191) |
| 19:46:38 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 19:47:36 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 19:48:53 | → | v_m_v_ joins (~vm_v@31-10-157-87.cgn.dynamic.upc.ch) |
| 19:49:15 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 19:50:07 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:9c16:5b76:e160:ad6d) (Ping timeout: 260 seconds) |
| 19:50:53 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 19:51:55 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 19:52:06 | → | nineonine joins (~textual@50.216.62.2) |
| 19:52:49 | → | conal joins (~conal@64.71.133.70) |
| 19:55:50 | × | dead10cc quits (~rg@2607:fea8:2c40:307:1703:4aa6:d428:f7e7) (Ping timeout: 264 seconds) |
| 19:56:44 | → | kaeru joins (~kaeru@185.163.110.116) |
| 19:58:24 | → | spatchkaa joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) |
| 19:58:25 | × | AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving) |
| 20:01:46 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
| 20:02:11 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:94c2:72b2:8a99:7096) |
| 20:03:34 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 20:04:31 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 20:04:35 | → | raichoo joins (~raichoo@dslb-178-009-065-096.178.009.pools.vodafone-ip.de) |
| 20:07:18 | → | dead10cc joins (~rg@2607:fea8:2c40:307:78ba:7ae3:3565:1092) |
| 20:08:36 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 20:12:47 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 20:12:48 | × | v_m_v_ quits (~vm_v@31-10-157-87.cgn.dynamic.upc.ch) (Remote host closed the connection) |
| 20:14:25 | × | servo quits (servo@41.141.56.25) (Ping timeout: 240 seconds) |
| 20:15:50 | → | v_m_v_ joins (~vm_v@2a02:aa12:3200:6480:fc4f:fb56:796a:9a4a) |
| 20:15:51 | → | ntqz joins (ntqz@75.175.141.156) |
| 20:17:28 | → | bgamari_ joins (~bgamari@2001:470:e438::1) |
| 20:18:27 | × | doitux|mob quits (~doitux|mo@195.206.169.184) (Remote host closed the connection) |
| 20:18:41 | ← | dead10cc parts (~rg@2607:fea8:2c40:307:78ba:7ae3:3565:1092) ("Konversation terminated!") |
| 20:19:19 | → | vacm joins (~vacwm@70.23.92.191) |
| 20:21:46 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 20:23:36 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 20:26:40 | → | Franciman joins (~francesco@host-82-56-223-169.retail.telecomitalia.it) |
| 20:28:01 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 20:29:45 | × | jamestmartin quits (~james@jtmar.me) (Quit: ZNC 1.8.1+deb1 - https://znc.in) |
| 20:30:27 | × | nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Remote host closed the connection) |
| 20:30:51 | → | nados joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 20:30:55 | → | knupfer joins (~Thunderbi@200116b8248c3e000ccc3cfffed69552.dip.versatel-1u1.de) |
| 20:30:55 | × | knupfer quits (~Thunderbi@200116b8248c3e000ccc3cfffed69552.dip.versatel-1u1.de) (Client Quit) |
| 20:31:13 | → | knupfer joins (~Thunderbi@200116b8248c3e00587246ff6e545e09.dip.versatel-1u1.de) |
| 20:31:29 | → | u0_a298 joins (~user@47.206.148.226) |
| 20:32:51 | → | Alex1 joins (~Alex@185.163.110.116) |
| 20:33:03 | × | v_m_v_ quits (~vm_v@2a02:aa12:3200:6480:fc4f:fb56:796a:9a4a) (Remote host closed the connection) |
| 20:34:18 | → | jamestmartin joins (james@jtmar.me) |
| 20:35:23 | × | vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 20:36:46 | → | zephyz joins (~zephyz@4e69715d.skybroadband.com) |
| 20:36:55 | × | jamestmartin quits (james@jtmar.me) (Client Quit) |
| 20:37:11 | → | jamestmartin joins (james@jtmar.me) |
| 20:40:03 | → | sdx23 joins (~sdx23@unaffiliated/sdx23) |
| 20:41:13 | × | britva quits (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) (Quit: This computer has gone to sleep) |
| 20:42:37 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 20:43:23 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds) |
| 20:43:57 | <nut> | why do people derive Generic? |
| 20:44:25 | × | jamestmartin quits (james@jtmar.me) (Quit: ZNC 1.8.2+deb1 - https://znc.in) |
| 20:44:41 | → | jamestmartin joins (~james@jtmar.me) |
| 20:45:03 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 20:45:08 | <merijn> | Because handwriting sucks? :p |
| 20:45:42 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 20:46:13 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 20:46:14 | <nut> | I see this after deriving Generic: instance NFData Implementation |
| 20:46:31 | <nut> | is it related to this instance? for the data Implementation |
| 20:46:50 | <nut> | I mean Generic and NFData instance, are they related? |
| 20:47:08 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Client Quit) |
| 20:47:54 | <nut> | The data 'Implementation', is just a normal algebraic type without fancy data entries |
| 20:48:08 | × | jamestmartin quits (~james@jtmar.me) (Client Quit) |
| 20:48:24 | → | jamestmartin joins (james@jtmar.me) |
| 20:48:34 | <tomjaguarpaw> | If the NFData instance doesn't have a body then yes, I guess it is filled in with defaults from Generic. |
| 20:49:22 | × | knupfer quits (~Thunderbi@200116b8248c3e00587246ff6e545e09.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 20:49:40 | × | jamestmartin quits (james@jtmar.me) (Client Quit) |
| 20:49:56 | → | jamestmartin joins (~james@jtmar.me) |
| 20:50:08 | <nut> | I see, tomjaguarpaw , indeed it doens't have a body |
| 20:50:18 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds) |
| 20:51:08 | × | jamestmartin quits (~james@jtmar.me) (Client Quit) |
| 20:51:09 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 20:51:19 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 20:51:25 | → | jamestmartin joins (~james@jtmar.me) |
| 20:51:42 | × | Alleria_ quits (~AllahuAkb@2604:2000:1484:26:217f:16b3:ceaa:d387) (Ping timeout: 260 seconds) |
| 20:53:17 | <tomjaguarpaw> | It will be filled in the with default implementation you see at http://hackage.haskell.org/package/deepseq-1.4.4.0/docs/Control-DeepSeq.html#v:rnf (the one with Generic in the signature) |
| 20:55:30 | → | conal joins (~conal@64.71.133.70) |
| 20:55:30 | × | u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer) |
| 20:55:31 | → | Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 20:55:45 | → | u0_a298 joins (~user@47.206.148.226) |
| 20:56:04 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 20:56:16 | × | ntqz quits (ntqz@75.175.141.156) (Remote host closed the connection) |
| 20:59:28 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 21:00:01 | × | Alex1 quits (~Alex@185.163.110.116) () |
| 21:02:38 | × | jamestmartin quits (~james@jtmar.me) (Quit: ZNC 1.8.2+deb1 - https://znc.in) |
| 21:02:54 | → | jamestmartin joins (james@jtmar.me) |
| 21:04:36 | × | bliminse quits (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) (Ping timeout: 240 seconds) |
| 21:06:21 | → | vacm joins (~vacwm@70.23.92.191) |
| 21:07:31 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 21:09:57 | → | knupfer joins (~Thunderbi@i59F7FFD9.versanet.de) |
| 21:12:01 | × | u0_a298 quits (~user@47.206.148.226) (Remote host closed the connection) |
| 21:12:28 | → | u0_a298 joins (~user@47.206.148.226) |
| 21:12:29 | → | mirrorbird joins (~psutcliff@89.40.182.158) |
| 21:14:37 | × | chaosmasttter quits (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) (Quit: WeeChat 2.9) |
| 21:14:37 | × | u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer) |
| 21:14:45 | → | abrar joins (~abrar@static-108-30-103-121.nycmny.fios.verizon.net) |
| 21:14:54 | → | u0_a298 joins (~user@47.206.148.226) |
| 21:16:56 | × | u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer) |
| 21:17:02 | × | abrar quits (~abrar@static-108-30-103-121.nycmny.fios.verizon.net) (Client Quit) |
| 21:17:14 | → | u0_a298 joins (~user@47.206.148.226) |
| 21:18:30 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 265 seconds) |
| 21:19:06 | × | dhouthoo quits (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9) |
| 21:19:45 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds) |
| 21:19:55 | → | Tario joins (~Tario@201.192.165.173) |
| 21:21:56 | × | u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer) |
| 21:21:56 | → | havenwood1 joins (~havenwood@185.204.1.185) |
| 21:22:13 | → | u0_a298 joins (~user@47.206.148.226) |
| 21:24:51 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 21:28:28 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds) |
| 21:28:43 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 21:29:03 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 21:34:54 | × | crdrost quits (~crdrost@2601:646:8280:85f0:7445:34ce:4342:d2eb) (Quit: This computer has gone to sleep) |
| 21:36:04 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:36:23 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 21:38:28 | → | livvy joins (~livvy@gateway/tor-sasl/livvy) |
| 21:38:29 | × | u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer) |
| 21:38:50 | → | u0_a298 joins (~user@47.206.148.226) |
| 21:38:57 | → | sdrodge joins (~sdrodge@unaffiliated/sdrodge) |
| 21:39:13 | × | mirrorbird quits (~psutcliff@89.40.182.158) (Ping timeout: 264 seconds) |
| 21:39:17 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 21:40:13 | → | abrar joins (~abrar@static-108-30-103-121.nycmny.fios.verizon.net) |
| 21:40:14 | × | bgamari_ quits (~bgamari@2001:470:e438::1) (Ping timeout: 264 seconds) |
| 21:40:16 | → | bgamari joins (~bgamari@72.65.101.76) |
| 21:40:24 | → | conal joins (~conal@64.71.133.70) |
| 21:40:24 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 21:40:32 | × | nuncanada quits (~dude@179.235.160.168) (Read error: Connection reset by peer) |
| 21:40:34 | × | abrar quits (~abrar@static-108-30-103-121.nycmny.fios.verizon.net) (Client Quit) |
| 21:40:50 | → | conal joins (~conal@64.71.133.70) |
| 21:41:11 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 21:42:08 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 21:42:20 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 21:44:36 | <koz_> | You can use derived Generic instances to autoderive a bunch of things, including NFData. There's also Hashable and Binary, as well as the aeson type classes that come to mind. |
| 21:47:21 | × | u0_a298 quits (~user@47.206.148.226) (Read error: Connection reset by peer) |
| 21:47:45 | → | u0_a298 joins (~user@47.206.148.226) |
| 21:49:18 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 21:49:27 | × | falafel quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds) |
| 21:50:03 | <koz_> | :t (*>) |
| 21:50:06 | <lambdabot> | Applicative f => f a -> f b -> f b |
| 21:50:14 | <koz_> | :t ($>) |
| 21:50:16 | <lambdabot> | error: |
| 21:50:16 | <lambdabot> | • Variable not in scope: $> |
| 21:50:16 | <lambdabot> | • Perhaps you meant one of these: |
| 21:50:24 | <koz_> | % :t ($>) |
| 21:50:24 | <yahb> | koz_: forall {f :: * -> *} {a} {b}. Functor f => f a -> b -> f b |
| 21:54:19 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 272 seconds) |
| 21:55:31 | × | tdhttt quits (~tdhttt@2600:8802:2203:2500:24c4:3660:b516:981e) (Remote host closed the connection) |
| 21:55:32 | × | zephyz quits (~zephyz@4e69715d.skybroadband.com) (Read error: Connection reset by peer) |
| 21:55:32 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 21:57:29 | → | Tario joins (~Tario@201.192.165.173) |
| 21:57:30 | × | knupfer quits (~Thunderbi@i59F7FFD9.versanet.de) (Ping timeout: 260 seconds) |
| 21:58:32 | → | rprije joins (~rprije@124.148.131.132) |
| 21:59:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 22:00:36 | → | nuncanada joins (~dude@179.235.160.168) |
| 22:02:19 | → | alp joins (~alp@2a01:e0a:58b:4920:ac08:1079:c3a9:84b6) |
| 22:04:29 | → | bliminse joins (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) |
| 22:05:43 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 22:06:01 | hackage | j 0.2.1.0 - J in Haskell https://hackage.haskell.org/package/j-0.2.1.0 (vmchale) |
| 22:06:59 | <unclechu> | hey, consider this piece of code: `data SBackend (β ∷ Backend (α ∷ Operation))`. `β` is “type”, `Backend α` is “kind” but `Operation` called here? |
| 22:08:03 | <unclechu> | s/but/but what/ |
| 22:08:20 | <Cale> | It depends on what the type of Backend is |
| 22:08:22 | <monochrom> | also kind |
| 22:08:46 | <Cale> | Oh, yeah, I suppose regardless, it must be a kind |
| 22:08:47 | <edwardk> | TypeInType made types and kinds basically the same thing |
| 22:08:50 | <unclechu> | “kind of kind”? |
| 22:09:25 | → | conal joins (~conal@64.71.133.70) |
| 22:09:31 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 22:09:58 | → | falafel joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
| 22:10:37 | <monochrom> | Very simply, if "Foo :: Bar" is legal, and you have no problem with saying that Foo is a type, then you have no problem saying that Bar is a kind. |
| 22:10:39 | <edwardk> | but since types have a few more things they can be than kinds do it is worth keeping the distinction. that being a kind of kind is actually picks up the limitations on kinds, so its just a kind. |
| 22:10:54 | → | iqubic joins (~user@2601:602:9500:4870:3952:b8cb:aec4:a935) |
| 22:10:57 | <edwardk> | monochrom++ |
| 22:11:00 | <unclechu> | Cale: it depends on a constructors, isn’t it? e.g. `β → SBackend (Backend 'Render)` |
| 22:11:03 | × | raichoo quits (~raichoo@dslb-178-009-065-096.178.009.pools.vodafone-ip.de) (Quit: Lost terminal) |
| 22:11:37 | <Orbstheorem> | Hello o/ How do I add `etc` as a dependency with flag `yaml` to my package.yaml? |
| 22:11:53 | <edwardk> | unclechu: it doesn't need to have constructors you could always leave a variable free to quantify over Operations, even if there are none |
| 22:12:16 | <unclechu> | monochrom: but `Foo` in that context is not “type” but “kind” |
| 22:12:50 | × | codeAlways quits (uid272474@gateway/web/irccloud.com/x-twiappljqzzzwfyb) (Quit: Connection closed for inactivity) |
| 22:12:56 | × | mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 240 seconds) |
| 22:13:11 | <edwardk> | unclechu: TypeInType made it possible to use types as kinds, the distinction is mostly eliminated, like i said |
| 22:13:50 | <monochrom> | α is a type (specifically a type parameter), and "α ∷ Operation", so Operation is a kind. |
| 22:15:25 | × | livvy quits (~livvy@gateway/tor-sasl/livvy) (Remote host closed the connection) |
| 22:16:20 | <monochrom> | Well I guess you're really asking what if Foo::Bar in which Foo is already at the kind level. Then what edwardk said. If Foo is a kind then Bar is a kind too. |
| 22:17:30 | <monochrom> | In Agda it would be that Bar is one level above Foo. In GHC those levels are all merged. |
| 22:18:04 | → | livvy joins (~livvy@gateway/tor-sasl/livvy) |
| 22:18:41 | → | crdrost joins (~crdrost@c-98-207-102-156.hsd1.ca.comcast.net) |
| 22:20:17 | × | u0_a298 quits (~user@47.206.148.226) (Ping timeout: 272 seconds) |
| 22:20:34 | <Cale> | unclechu: What's the kind of Backend? |
| 22:21:48 | <dolio> | Well, that would probably not be the perspective in Agda. Arguably the 'term vs. type vs. kind' thing in Haskell is a distinction of syntactic categories, and Agda just gets rid of that. |
| 22:21:51 | <monochrom> | Yeah, that can be a much more useful piece of information than simple dichotomies. |
| 22:22:10 | <unclechu> | Cale: `(α :: Operation) → Type` |
| 22:22:17 | <dolio> | You could have all the 'levels' like Agda and also have a distinction of syntactic categories. |
| 22:22:30 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 22:23:08 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:23:58 | → | conal joins (~conal@64.71.133.70) |
| 22:24:06 | <unclechu> | hackage links to this 404 page https://cabal.readthedocs.io/installing-packages.html#controlling-flag-assignments about using package flags |
| 22:24:23 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 22:26:43 | → | zephyz joins (~zephyz@4e69715d.skybroadband.com) |
| 22:27:17 | <zephyz> | How do I get an Exp out of a Pat in Template Haskell? I just want to return the variable that was given in argument in a lambda |
| 22:27:31 | hackage | subG 0.2.0.0 - Some extension to the Foldable and Monoid classes. https://hackage.haskell.org/package/subG-0.2.0.0 (OleksandrZhabenko) |
| 22:31:59 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 22:33:47 | <monochrom> | If the pattern is really just a variable, you will be seeing "VarP n", where n::Name, no? |
| 22:34:15 | <monochrom> | Then the expression version of that variable is VarE n, no? |
| 22:34:20 | <zephyz> | Ah Yes |
| 22:34:38 | <zephyz> | is there a way to get the `Name` out of a `Pat`? |
| 22:34:48 | × | Franciman quits (~francesco@host-82-56-223-169.retail.telecomitalia.it) (Quit: Leaving) |
| 22:34:59 | <monochrom> | "the" sounds wrong. |
| 22:35:13 | × | asthasr quits (~asthasr@162.210.29.120) (Quit: asthasr) |
| 22:35:19 | <monochrom> | Some patterns don't have any variable. Some other patterns have a million. What "the"? |
| 22:35:45 | <zephyz> | You're asking this as if I already know about the APi |
| 22:36:14 | <zephyz> | how can I tell if a pattern can have multiple variables? or conversly, how can I make sur emy patterns only have 1 variable? |
| 22:36:27 | <monochrom> | No. You are supposed to know all the infinitely many legal patterns first. |
| 22:37:07 | <monochrom> | You already know the name "Pat" so you can easily look up how many dozens of data constructors it has. |
| 22:38:09 | <zephyz> | Geez thanks I guess I'll just keep reading undocumented TH source, thanks |
| 22:38:39 | <monochrom> | I never read the source. I have only seen the doc. |
| 22:39:26 | <zephyz> | it's literally the same, there is no documentation about how to use it, just constructors https://hackage.haskell.org/package/template-haskell-2.16.0.0/docs/Language-Haskell-TH.html#t:Pat |
| 22:39:42 | <monochrom> | Language.Haskell.TH.Syntax |
| 22:39:48 | <zephyz> | but now I see what you mean, "TupP" can have multple names |
| 22:40:16 | <monochrom> | I trust that you know you can start with https://hackage.haskell.org/package/template-haskell-2.16.0.0/ |
| 22:40:50 | <monochrom> | Alternatively, if you say "hoogle didn't tell me any other URL", well then that's why I never use hoogle either. |
| 22:41:32 | <zephyz> | great thanks, but if someone's gonna tell me "just read the docs" I'd rather not ask at all |
| 22:43:19 | <monochrom> | Damn right. |
| 22:43:35 | × | Ariakenom quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Quit: Leaving) |
| 22:43:43 | <monochrom> | If a question is already answered by the docs, I would rather no one ask it at all. |
| 22:43:45 | × | spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Ping timeout: 240 seconds) |
| 22:44:38 | × | m4lvin quits (~m4lvin@w4eg.de) (Quit: m4lvin) |
| 22:44:47 | → | Deide joins (~Deide@217.155.19.23) |
| 22:44:59 | → | m4lvin joins (~m4lvin@w4eg.de) |
| 22:45:37 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 272 seconds) |
| 22:46:36 | <zephyz> | are you braindead? how can you expect every beginner to have read every single piece of haskell code in the universe before they ask a question? Especially when the documentation you talk about is literaly just type signatures with no indication on how to use them |
| 22:48:40 | <_deepfire> | Given 'type Fallible = Either Foo'; how could it be that: Couldn't match expected type ‘Either Foo Blah’ with actual type ‘Fallible Blah’ ? |
| 22:49:16 | × | Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 240 seconds) |
| 22:49:40 | <monochrom> | Could you post some self-contained code that reproduces that? |
| 22:50:15 | <_deepfire> | Not easily, unfortunately.. that'd take some time to work through. |
| 22:50:22 | <Axman6> | I assume, without looking at the definitions, that the type for patterns contains a list, which implies it could have zero to infinite sub patterns, which include variables |
| 22:51:16 | <_deepfire> | In any case, it's already reassuring that this isn't supposed to be normal behavior -- I was thinking I'm going mad.. |
| 22:51:34 | <monochrom> | Then the explanation lies elsewhere. |
| 22:55:21 | <Axman6> | zephyz: to be honest, we don't really expect a beginner to be looking at template haskell at all, since to understand it requires understanding Haskell quite well. Looking at the docs for Pat, it looks like the docs do a great job explaining what the type is and represents |
| 22:57:29 | <zephyz> | Axman6 Cool thanks |
| 22:58:27 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 23:01:37 | <unclechu> | it is still impossible in GHC to use higher-order type families? i mean that i can’t use partially applied type family as an argument for another type family |
| 23:02:32 | <dolio> | I don't think you should expect to be able to do that. |
| 23:04:03 | <monochrom> | _deepfire: Maybe do you have a name clash of two distinct "Foo"s hanging around? |
| 23:04:31 | <unclechu> | dolio: why not? |
| 23:04:51 | <unclechu> | it would be extremely useful and straightforward |
| 23:05:19 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 23:05:41 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 23:05:41 | <unclechu> | i could reduce amount of type families a lot by using “polymorphic” type famillies |
| 23:05:47 | <dolio> | Because type families are definition by recursive matching on types, and type families are not generators the kind of types. |
| 23:05:52 | → | inkbottle joins (~inkbottle@aaubervilliers-654-1-104-55.w86-212.abo.wanadoo.fr) |
| 23:06:17 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-89-20.w86-212.abo.wanadoo.fr) (Ping timeout: 265 seconds) |
| 23:07:44 | <unclechu> | dolio: maybe then i should expect instead to have an another way to define “type-level functions”? |
| 23:08:18 | <unclechu> | or maybe i should expect dependent types implementation in GHC so this ability would be delivered with it? |
| 23:09:32 | <unclechu> | does it makes sense? i’m probably not the only one who wants to define type-level `fmap` |
| 23:09:36 | × | nuncanada quits (~dude@179.235.160.168) (Read error: Connection reset by peer) |
| 23:09:50 | <_deepfire> | monochrom: no, it turns out that 'cabal clean' fixed it.. |
| 23:10:13 | <monochrom> | Hrm that's a strange one indeed. |
| 23:10:24 | <dolio> | Term-level functions don't allow this, either. You can't write definitions by higher-order matching against arbitrary other functions. |
| 23:10:47 | <_deepfire> | I'm using a bit old cabal 3.0, so that might explain the occasional roughness.. |
| 23:11:20 | <monochrom> | Standard tech support drone script: 1. have you saved? 2. have you cabal cleaned? 3. have you tried rebooting? 4. have you read the docs? |
| 23:11:25 | <unclechu> | dolio: but i’m not trying to do any matching, i just use variables to use them as functions |
| 23:12:40 | <unclechu> | dolio: i can reformulate my question as: is it still impossible in GHC to define `fmap`/`map` in type-level? |
| 23:14:23 | <_deepfire> | monochrom: yeah.. : -) |
| 23:15:31 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 23:15:51 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 23:19:41 | → | servo joins (~servo@41.92.32.131) |
| 23:21:28 | <dolio> | Oh, I see what you mean. I'm not sure if they're attempting to deliver that before all the dependent type stuff. |
| 23:22:24 | → | conal joins (~conal@64.71.133.70) |
| 23:25:09 | <monochrom> | I haven't checked whether map is definable or not. I worry more about possible use sites. At the use sites, you cannot have type-level lambda, you cannot have partially applied Haskell 2010 type aliases (so nevermind type families), so your map is not going to enjoy much desired use. |
| 23:32:42 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:34:39 | <dolio> | I guess I would check if LiberalTypeSynonyms works, but I would guess it won't. |
| 23:34:55 | <dolio> | I mean, it works, but not for that, I assume. |
| 23:36:06 | → | nuncanada joins (~dude@179.235.160.168) |
| 23:36:42 | ← | iqubic parts (~user@2601:602:9500:4870:3952:b8cb:aec4:a935) ("ERC (IRC client for Emacs 28.0.50)") |
| 23:37:03 | <dolio> | Of course, it couldn't possibly work except for concrete lists. |
| 23:39:13 | × | DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Ping timeout: 264 seconds) |
| 23:41:06 | <dolio> | I would also guess they aren't trying to provide this before whatever dependent type plan goes through, because with the current type checker, you'd probably be guaranteed to have to use a bunch of explicit type annotations on anything that used this. |
| 23:41:15 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 23:41:56 | <dolio> | Type applications, even. |
| 23:42:22 | <dolio> | But maybe I'm wrong about that. |
| 23:45:27 | → | xerox__ joins (~xerox@unaffiliated/xerox) |
| 23:45:38 | × | nineonine quits (~textual@50.216.62.2) (Read error: Connection reset by peer) |
| 23:46:01 | <unclechu> | monochrom: actually you can have partially applied type family if it’s kind is `Constraint` if i’m not mistaken |
| 23:46:46 | → | wroathe_ joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) |
| 23:47:03 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
| 23:47:19 | <dolio> | I'd be surprised. |
| 23:48:20 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 256 seconds) |
| 23:48:39 | wroathe_ | is now known as wroathe |
| 23:48:46 | xerox__ | is now known as xerox_ |
| 23:49:49 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 23:50:35 | <unclechu> | maybe i’m mixing up something in my memory. i just remember some conclusion i made from long ago |
| 23:51:28 | → | Sonderblade joins (~helloman@94.191.137.65.mobile.tre.se) |
| 23:52:02 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 23:54:54 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:55:14 | <Axman6> | there's a trick where you define a class which has other classes as superclasses, and have a single instance, is that what you're talking about? |
| 23:55:16 | <unclechu> | hmm... maybe i mean type-classes back then, not type families |
| 23:55:25 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 23:55:30 | <unclechu> | > f :: (a ~ MonadReader Int, m ~ b IO) => Proxy m -> String; f Proxy = mempty |
| 23:55:32 | <lambdabot> | <hint>:1:58: error: <hint>:1:58: error: parse error on input ‘;’ |
| 23:55:43 | <unclechu> | > f :: (a ~ MonadReader Int, m ~ b IO) => Proxy m -> String |
| 23:55:44 | <lambdabot> | error: |
| 23:55:44 | <lambdabot> | • Could not deduce (FromExpr [Char]) arising from a use of ‘f’ |
| 23:55:44 | <lambdabot> | from the context: (a ~ MonadReader Int, m ~ b1 IO) |
| 23:55:45 | <Axman6> | class (Foo a, Bar a) => Baz a; instance (Foo a, Bar a) => Baz a |
| 23:56:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:56:46 | <unclechu> | > f :: (a ~ MonadReader Int, m ~ a IO) => Proxy m -> String |
| 23:56:48 | <lambdabot> | error: |
| 23:56:48 | <lambdabot> | • Could not deduce (FromExpr [Char]) arising from a use of ‘f’ |
| 23:56:48 | <lambdabot> | from the context: (a ~ MonadReader Int, m ~ a IO) |
| 23:56:59 | <unclechu> | anyway, that works in ghci |
| 23:58:01 | hackage | predicate-typed 0.7.4.4 - Predicates, Refinement types and Dsl https://hackage.haskell.org/package/predicate-typed-0.7.4.4 (gbwey) |
| 23:59:14 | <unclechu> | Axman6: i was talking about type families explicitly. what i want is if i have a `type family (x :: a) :: b` i want to make `type family (x :: [a]) :: [b]` of it without adding a new type family |
| 23:59:44 | × | ystael quits (~ystael@209.6.50.55) (Ping timeout: 256 seconds) |
All times are in UTC on 2020-11-17.