Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 713 714 715 716 717 718 719 720 721 722 723 .. 5022
502,152 events total
2020-10-18 15:17:32 × ephemera_ quits (~E@122.34.1.187) (Ping timeout: 258 seconds)
2020-10-18 15:17:39 <merijn> It's ambiguous because you, presumably imported the text version of putStrLn
2020-10-18 15:17:46 <AWizzArd> But is there a good reason why only on type class methods some dispatching/inference can occur?
2020-10-18 15:17:47 <merijn> But the string version is in Prelude
2020-10-18 15:18:07 <merijn> AWizzArd: Yes. That reason being: We don't want to go insane
2020-10-18 15:18:19 <AWizzArd> (-:
2020-10-18 15:18:32 <merijn> AWizzArd: "it's easy, just dispatch on the type!"
2020-10-18 15:18:36 <merijn> Which seems easy enough
2020-10-18 15:18:41 <AWizzArd> si
2020-10-18 15:18:44 Kipras_ joins (~Kipras@78-56-235-39.static.zebra.lt)
2020-10-18 15:18:47 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-18 15:18:50 <merijn> Until you consider polymorphic types, typeclasses and how they all interact
2020-10-18 15:18:54 <phadej> if you want to dispatch on type, write a typeclass :)
2020-10-18 15:19:16 <phadej> type-directed-name-resolution doesn't mix well with type-classes
2020-10-18 15:19:22 <AWizzArd> phadej: yes yes, that would help, agreed. I just wonder why this magic doesn’t work on non-method functions.
2020-10-18 15:19:24 Amras joins (~Amras@unaffiliated/amras0000)
2020-10-18 15:19:32 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-18 15:19:41 <phadej> or rather, "no one really thought about it, whether these can be mixed"
2020-10-18 15:19:49 <AWizzArd> k
2020-10-18 15:19:52 ephemera_ joins (~E@122.34.1.187)
2020-10-18 15:19:57 <AWizzArd> It just isn’t a trivial thing is what I take away.
2020-10-18 15:20:01 <geekosaur> there have been multiple discussions of "type directed name resolution"
2020-10-18 15:20:13 <phadej> AWizzArd: boring answer is that "name resolution" happens before type-checking
2020-10-18 15:20:20 × Kipras_ quits (~Kipras@78-56-235-39.static.zebra.lt) (Read error: Connection reset by peer)
2020-10-18 15:20:33 <merijn> AWizzArd: There's two factors: one beyond the trivial case you list it's very hard to figure out how the resolution should happen
2020-10-18 15:20:34 <phadej> and no sane person want to mix them in GHC :)
2020-10-18 15:20:38 <phadej> s/mix/combine/
2020-10-18 15:21:05 <merijn> AWizzArd: And, much more importantly, if you do figure out the resolution method you now have to *memorise and remember it to read any Haskell ever*
2020-10-18 15:21:08 <AWizzArd> pjb: compare this with your `title` uses.
2020-10-18 15:21:11 <davean> if it didn't happen before, what would you be type checking?
2020-10-18 15:21:32 <merijn> AWizzArd: You end up in Scala implicit territory where reordering imports changes how implicits are resolved and changes the behaviour of code
2020-10-18 15:21:47 <merijn> AWizzArd: Which seems like the kinda thing sane people would like to avoid :)
2020-10-18 15:21:56 matp joins (~matp@185.163.110.116)
2020-10-18 15:21:57 <AWizzArd> merijn: uh, yess, didn’t know that one (:
2020-10-18 15:21:58 avdb joins (~avdb@ip-213-49-61-171.dsl.scarlet.be)
2020-10-18 15:22:25 × kipras quits (~Kipras@78-56-235-39.static.zebra.lt) (Ping timeout: 264 seconds)
2020-10-18 15:24:22 <merijn> AWizzArd: C++ does support this via overloading and it's *hell*
2020-10-18 15:24:33 <phadej> I think you can have sane-ish type-directed name resolution, but in the `putStrLn ("Hallo" :: Text)` it won't work
2020-10-18 15:24:41 ericsagnes joins (~ericsagne@2405:6580:0:5100:8084:b111:4aaf:f484)
2020-10-18 15:24:48 <merijn> I need 2 more phds to be able to confidently know what overload gets picked in all scenarios
2020-10-18 15:25:15 <merijn> So, instead, everyone relies on "it mostly does the right thing, usually, so cross your fingers you don't mess up"
2020-10-18 15:25:23 <phadej> e.g. it will effectively stop by saying "there are two functions named putStrLn, I cannot proceed"
2020-10-18 15:25:45 <merijn> Of course C++ has the added "fun" that there's also implicit conversions, so it might do a conversion *and then* decide which overload to take
2020-10-18 15:26:20 <merijn> I'd rather just add a qualified import and not have to think about ad hoc resolution schemes :)
2020-10-18 15:26:24 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-18 15:26:38 boristheblade joins (~boristheb@37-219-58-2.nat.bb.dnainternet.fi)
2020-10-18 15:26:39 × xff0x quits (~fox@2001:1a81:53f8:9f00:1de1:3046:a1d5:380a) (Quit: xff0x)
2020-10-18 15:26:41 <merijn> mpickering: ping?
2020-10-18 15:26:42 <AWizzArd> merijn: right
2020-10-18 15:27:21 <monochrom> Oh, C++ overloading. I thought you were talking about Haskell overlapping instances. :)
2020-10-18 15:27:37 <merijn> AWizzArd: Anyway, if you go to the GHC wiki or google for haskell and "type directed name resolution" you should find a bunch of discussions on the topic. But in the end the consensus has always been "this is probably adding more pain than it removes"
2020-10-18 15:28:22 <monochrom> IIRC C++'s resolution is very detailedly spelt out but it is lengthy and interwined, it takes lawyers.
2020-10-18 15:28:23 <AWizzArd> Oki, makes sense!
2020-10-18 15:28:25 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-18 15:28:45 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-18 15:28:45 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-18 15:28:45 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-18 15:29:03 <hpc> the @quote-y way to say it is after a certain point, type directed name resolution always resolves the name to "oh jesus" :D
2020-10-18 15:30:03 <merijn> It's like "a better Num hierarchy" everyone agrees we should have a better one, but actually making one turns out to be surprisingly hard :p
2020-10-18 15:30:16 <monochrom> @quote wrexem resolution
2020-10-18 15:30:17 <lambdabot> wrexem says: "Its not my fault that your resolution is messed up because you are blind"
2020-10-18 15:30:37 <merijn> monochrom: *everything* takes lawyers in C++
2020-10-18 15:30:58 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-18 15:31:06 <merijn> I have some C++ code using an initialiser list that worked fine 3 years ago, but it's refusing to compile now and I'll be damned if I know why not...
2020-10-18 15:31:20 <phadej> you can stick to core guidelines though, and then life will be easier
2020-10-18 15:31:23 <merijn> The code hasn't changed in all that time, so must be something in clang *and* g++
2020-10-18 15:31:43 <monochrom> This is why my prof said to keep the old compiler and the old OS.
2020-10-18 15:32:02 <monochrom> You may also need to keep the old hardware.
2020-10-18 15:33:32 × ephemera_ quits (~E@122.34.1.187) (Quit: No Ping reply in 180 seconds.)
2020-10-18 15:34:01 ephemera_ joins (~E@122.34.1.187)
2020-10-18 15:34:07 × avdb quits (~avdb@ip-213-49-61-171.dsl.scarlet.be) (Quit: WeeChat 2.9)
2020-10-18 15:34:45 berberman_ joins (~berberman@unaffiliated/berberman)
2020-10-18 15:35:23 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 244 seconds)
2020-10-18 15:35:23 <merijn> monochrom: My own damn fold for not having the compile step in my code so I forgot how I ever compiled it 3 years ago... >.>
2020-10-18 15:35:30 xff0x joins (~fox@2001:1a81:53f8:9f00:217d:12db:12d5:cd4c)
2020-10-18 15:35:38 <merijn> Automate all the things!
2020-10-18 15:35:52 <merijn> s/fold/fault
2020-10-18 15:35:57 <merijn> clearly to tired to English
2020-10-18 15:36:19 <phadej> having --std... argument helps :)
2020-10-18 15:36:31 <phadej> at least C++ has that, so there is a chance to compile old code with new compiler
2020-10-18 15:36:32 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-18 15:36:39 <merijn> phadej: oh, I always use -std
2020-10-18 15:36:49 <phadej> merijn: it helps to write it down too :)
2020-10-18 15:37:55 <merijn> phadej: This is a leftover from the dark early days where I just migrated my codebase from python to Haskell
2020-10-18 15:38:42 × stefan-_ quits (~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-18 15:39:10 stefan-__ joins (~cri@42dots.de)
2020-10-18 15:39:30 <merijn> phadej: My happiness is proportional to the percentage of orange in this plot: http://files.inconsistent.nl/sloc-time.png :p
2020-10-18 15:40:02 × ephemera_ quits (~E@122.34.1.187) (Ping timeout: 256 seconds)
2020-10-18 15:40:45 × dirediresalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2020-10-18 15:41:01 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2020-10-18 15:41:13 × frdg quits (47b88ff9@pool-71-184-143-249.bstnma.fios.verizon.net) (Remote host closed the connection)
2020-10-18 15:41:31 ephemera_ joins (~E@122.34.1.187)
2020-10-18 15:41:32 dirediresalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-10-18 15:42:00 contiver joins (~contiver@84-115-64-51.wifi.dynamic.surfer.at)
2020-10-18 15:43:03 <xsperry> to be fair, breaking changes happen in haskell world a lot more than in the C++ world
2020-10-18 15:53:28 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-18 15:53:38 GyroW joins (~GyroW@d54c03e98.access.telenet.be)
2020-10-18 15:53:38 × GyroW quits (~GyroW@d54c03e98.access.telenet.be) (Changing host)
2020-10-18 15:53:38 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-18 15:54:50 × jchia__ quits (~jchia@58.32.37.146) (Read error: Connection reset by peer)

All times are in UTC.