Logs: freenode/#haskell
| 2021-04-27 12:44:11 | × | ddella___ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection) |
| 2021-04-27 12:45:01 | → | simplegauss joins (~simplegau@2001:19f0:ac01:247:5400:ff:fe5c:689f) |
| 2021-04-27 12:45:10 | → | ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-27 12:45:25 | × | domenkozar[m] quits (domenkozar@gateway/shell/matrix.org/x-rrfutzikoxlnrwmv) (Changing host) |
| 2021-04-27 12:45:25 | → | domenkozar[m] joins (domenkozar@NixOS/user/domenkozar) |
| 2021-04-27 12:48:08 | → | nicholasbulka joins (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) |
| 2021-04-27 12:48:09 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 268 seconds) |
| 2021-04-27 12:48:15 | → | hypercube joins (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) |
| 2021-04-27 12:49:11 | × | ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 240 seconds) |
| 2021-04-27 12:51:18 | → | Tario joins (~Tario@201.192.165.173) |
| 2021-04-27 12:52:45 | → | tmciver joins (~tmciver@cpe-172-101-46-34.maine.res.rr.com) |
| 2021-04-27 12:55:33 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 2021-04-27 12:56:08 | → | thonkpod joins (~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) |
| 2021-04-27 12:56:56 | × | Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Remote host closed the connection) |
| 2021-04-27 12:57:14 | → | Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) |
| 2021-04-27 12:58:42 | × | jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 2021-04-27 12:59:04 | → | knupfer joins (~Thunderbi@dynamic-046-114-150-151.46.114.pool.telefonica.de) |
| 2021-04-27 12:59:11 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-79-166.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 2021-04-27 12:59:29 | → | jonathanx joins (~jonathan@h-176-109.A357.priv.bahnhof.se) |
| 2021-04-27 13:01:27 | × | simplegauss quits (~simplegau@2001:19f0:ac01:247:5400:ff:fe5c:689f) (Ping timeout: 260 seconds) |
| 2021-04-27 13:01:37 | × | knupfer quits (~Thunderbi@dynamic-046-114-150-151.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
| 2021-04-27 13:02:23 | × | thonkpod quits (~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) (Ping timeout: 260 seconds) |
| 2021-04-27 13:06:07 | × | mmfood quits (~mmfood@94.234.53.15) (Ping timeout: 240 seconds) |
| 2021-04-27 13:06:23 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 2021-04-27 13:10:20 | → | mmfood joins (~mmfood@185.176.246.69) |
| 2021-04-27 13:12:15 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-27 13:12:31 | → | mmfood_1 joins (~mmfood@185.176.246.118) |
| 2021-04-27 13:15:29 | × | mmfood quits (~mmfood@185.176.246.69) (Ping timeout: 265 seconds) |
| 2021-04-27 13:16:52 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 2021-04-27 13:18:55 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:5cb2:e875:5c51:8e43) |
| 2021-04-27 13:20:59 | → | simplegauss joins (~simplegau@2001:19f0:ac01:247:5400:ff:fe5c:689f) |
| 2021-04-27 13:22:58 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 2021-04-27 13:23:45 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:5cb2:e875:5c51:8e43) (Ping timeout: 250 seconds) |
| 2021-04-27 13:27:06 | → | thonkpod joins (~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) |
| 2021-04-27 13:28:30 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-04-27 13:33:51 | → | gaff joins (~user@49.207.195.160) |
| 2021-04-27 13:34:45 | → | xkapastel joins (uid17782@gateway/web/irccloud.com/x-wfrommuaxtjqnxrn) |
| 2021-04-27 13:34:52 | mnrmnaugh | is now known as awk |
| 2021-04-27 13:34:57 | <ulidtko> | what's the way to install a package in both .a and .so versions? |
| 2021-04-27 13:35:08 | <ulidtko> | I keep forgetting the incantation for that |
| 2021-04-27 13:35:23 | <ulidtko> | -static -dynamic-too flag to GHC or what? |
| 2021-04-27 13:35:26 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2021-04-27 13:36:20 | <gaff> | i want to call a polymorphic function, say f :: Ord a => [a] -> [a] -> [a] with different type annotations in the same code (like let result :: [Int] = f [1..3] [5..10] in .... is there a way to do it? |
| 2021-04-27 13:37:08 | <ulidtko> | gaff, yes, use {-# LANGUAGE ScopedTypeVariables #-} then you use type specialization in any subexpression |
| 2021-04-27 13:37:34 | <ulidtko> | let result = f [1..3] [5..10] :: [Int] would work |
| 2021-04-27 13:37:47 | <gaff> | ulidtko: what i mean is that i want to call f with [Int], then [Char], etc. |
| 2021-04-27 13:37:53 | <ulidtko> | yes understood |
| 2021-04-27 13:38:16 | → | Lycurgus joins (~niemand@98.4.118.65) |
| 2021-04-27 13:38:54 | <gaff> | the problem i found is that once assign a type annotation, the compiler infers that type. you can change the type in the next call to f. |
| 2021-04-27 13:39:16 | <gaff> | you can not change the type anymore |
| 2021-04-27 13:39:28 | <ulidtko> | you can |
| 2021-04-27 13:39:34 | <ulidtko> | let me show, just a sec |
| 2021-04-27 13:39:39 | <gaff> | ok |
| 2021-04-27 13:39:44 | × | hypercube quits (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 260 seconds) |
| 2021-04-27 13:39:57 | → | Valion joins (~Valion@api.ivido.nl) |
| 2021-04-27 13:41:24 | <ulidtko> | gaff, https://i.imgur.com/QjBQRy1.png |
| 2021-04-27 13:41:28 | <gaff> | ok |
| 2021-04-27 13:43:52 | <gaff> | ok, thank you. i remember trying the same thing but for some reason the comiler growled. let me try it out again with your idea. |
| 2021-04-27 13:44:12 | → | tanuki joins (~quassel@173.168.178.1) |
| 2021-04-27 13:44:13 | <gaff> | ulidtko: thanks. i will get back if i see any more issues. |
| 2021-04-27 13:44:48 | → | proofofkeags joins (~proofofke@97-118-239-55.hlrn.qwest.net) |
| 2021-04-27 13:45:37 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 2021-04-27 13:46:17 | → | wavemode joins (~wavemode@097-070-075-143.res.spectrum.com) |
| 2021-04-27 13:46:20 | awk | is now known as mnrmnaugh |
| 2021-04-27 13:46:24 | × | wavemode quits (~wavemode@097-070-075-143.res.spectrum.com) (Remote host closed the connection) |
| 2021-04-27 13:46:39 | → | timCF joins (~i.tkachuk@254-149-20-81.sta.estpak.ee) |
| 2021-04-27 13:47:52 | → | Sgeo joins (~Sgeo@ool-18b9875e.dyn.optonline.net) |
| 2021-04-27 13:49:20 | × | drbean_ quits (~drbean@TC210-63-209-217.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
| 2021-04-27 13:49:26 | <pjb> | Hey I have an idea! Wouldn't it be simplier if the function f could take sequences of any type? (defun f (x y) (concatenate 'list x y)) (list (f '(1 2 3) '(4 5 6)) (f '(1.1 2.2 3.3) '(4.4 5.5 6.6))) #| --> ((1 2 3 4 5 6) (1.1 2.2 3.3 4.4 5.5 6.6)) |# /just asking |
| 2021-04-27 13:49:48 | <timCF> | Hello! Does anybody know "eager" equivalent of `ExceptT e m a` which will not stop computation in case of Left, but will continue accumulating errors in some sort of monoid. Basically I want transformer like `Semigroup e => ValidationT e m a` |
| 2021-04-27 13:51:04 | <ulidtko> | WriterT?.. |
| 2021-04-27 13:51:33 | × | Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds) |
| 2021-04-27 13:52:24 | × | bitmagie quits (~Thunderbi@200116b80690c300997cabc9cf9a1ff7.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2021-04-27 13:53:25 | <geekosaur> | http://hackage.haskell.org/package/monad-chronicle ? |
| 2021-04-27 13:54:36 | <maerwald> | yes, chronicle/These |
| 2021-04-27 13:54:58 | → | zmijunkie joins (~Adium@87.122.222.91) |
| 2021-04-27 13:55:50 | <timCF> | geekosaur: maerwald: thanks a lot guys! This kind of stuff I was not able to learn from "Learn You a Haskell" :) |
| 2021-04-27 13:56:12 | × | zmijunkie1 quits (~Adium@109.90.32.89) (Ping timeout: 240 seconds) |
| 2021-04-27 13:56:45 | <xsperry> | > let f = (<>) in (f [1, 2, 3] [4, 5, 6], f [1.1, 2.2, 3.3] [4.4, 5.5, 6.6]) -- pjb |
| 2021-04-27 13:56:47 | <lambdabot> | ([1,2,3,4,5,6],[1.1,2.2,3.3,4.4,5.5,6.6]) |
| 2021-04-27 13:57:14 | <gaff> | ulidtko: can you type annotate the function itself? i mean do something like this: g (f :: [Int] -> [Int]), and then within g, you have g f = q f. likewise, do g (f :: [Char] -> [Char]), g f = q f. here q passes the right type of data to f based on its type. this does not seem possible. |
| 2021-04-27 13:57:15 | <pjb> | Ah nice. Then you don't need to specify the type. |
| 2021-04-27 13:58:31 | <ulidtko> | gaff, you can't pattern-match on types in haskell. your [Int] -> [Int] or [Char] -> [Char] must go into f's *signature*, not implementation. |
| 2021-04-27 13:59:04 | <gaff> | ulidtko: i see. |
| 2021-04-27 13:59:33 | <ulidtko> | perhaps if you uncovered what you're trying to achieve, there could be a way |
| 2021-04-27 13:59:50 | → | HannaM joins (~quassel@p54849510.dip0.t-ipconnect.de) |
| 2021-04-27 14:00:02 | → | thblt joins (~thblt@unaffiliated/thblt) |
| 2021-04-27 14:00:43 | <gaff> | basiccally, i am running quickcheck on a sort function, and i want to sort different types that are instances of Ord, like Char, Int, etc |
| 2021-04-27 14:01:35 | <ulidtko> | you'd need to list out all the types you want to test on explicitly |
| 2021-04-27 14:01:53 | <gaff> | right now i am just sort [Int]. of course i can manually go in there type a different type annotation, but that is pain. i was wondering if there was a way to do it for different types. |
| 2021-04-27 14:03:21 | <xsperry> | pjb, it can be also used with Maybe a, where a is a semigroup |
| 2021-04-27 14:03:29 | <xsperry> | > Just "foo" <> Just "bar" |
| 2021-04-27 14:03:31 | <lambdabot> | Just "foobar" |
| 2021-04-27 14:03:37 | <xsperry> | or even with functions that return Semigroup, ie: |
| 2021-04-27 14:04:10 | <gaff> | ulidtko: when you say you can't pattern match on type signatures -- is that because types are determined at compile time? |
| 2021-04-27 14:04:11 | <xsperry> | > sortBy (comparing length <> comparing id) (words "a aa b bb c cc z") |
| 2021-04-27 14:04:13 | <lambdabot> | ["a","b","c","z","aa","bb","cc"] |
| 2021-04-27 14:04:41 | → | zardoz2 joins (~bc8134e3@217.29.117.252) |
| 2021-04-27 14:05:12 | → | jao joins (~jao@pdpc/supporter/professional/jao) |
| 2021-04-27 14:05:36 | <thblt> | I have a (finite) bunch of objects that link to each other (let's say books and their authors). Is it reasonable/idiomatic to store the objects in some sort of indexed container (eg `Map Int Object`) and have those links represented as indexes? Eg newtype ObjectId = Int; data Book = Book { author :: Int, title :: String}? (The actual model is more complex, just wanted to know if it makes sense) |
All times are in UTC.