Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-10 21:55:09 Stanley00 joins (~stanley00@unaffiliated/stanley00)
2020-11-10 21:55:55 <pjb> Well, if you sell the cake to yourself, you can also have it, but not entirely, since then you'll have to pay to the state value added tax, and income tax.
2020-11-10 21:56:10 neiluj joins (~jco@167.198.204.77.rev.sfr.net)
2020-11-10 21:58:03 lucente joins (~lucente@141.98.255.154)
2020-11-10 21:58:16 leungbk joins (~user@2605:e000:1315:706:c5ee:55b1:3703:cac)
2020-11-10 21:58:28 <monochrom> For Dijkstra's algorithm, the input graph format being as a bunch of adjacency lists is fairly uncontroversial, and it really doesn't matter what you use for "list" because you're just traversing it in one direction.
2020-11-10 21:59:16 <monochrom> The hard part though is what you use to track "has this vertex been visited?" and to track the priority queue.
2020-11-10 21:59:25 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds)
2020-11-10 21:59:56 bennofs1 joins (~benno@dslb-094-222-086-095.094.222.pools.vodafone-ip.de)
2020-11-10 22:00:01 <monochrom> To be fair, the priority queue part is annoying even in imperative languages with mutable data structures.
2020-11-10 22:01:05 <monochrom> Because you have to support the operation "look up by vertex (emphatically not by priority) and bump down it's priority".
2020-11-10 22:01:31 <koz_> monochrom: Yeah, changeKey is something that I remember my own data structures course being incredibly glib about.
2020-11-10 22:01:33 <monochrom> Most textbooks, especially the imperative ones, simply gross over it.
2020-11-10 22:01:45 <koz_> monochrom: 'Gross' over it is 100% the right term.
2020-11-10 22:02:01 × neiluj quits (~jco@167.198.204.77.rev.sfr.net) (Ping timeout: 264 seconds)
2020-11-10 22:02:42 <monochrom> Well, they don't gross over "if you already have the address of the node, how to bump down its priority". But they simply refuse to mention "how to find that address in the first place". It's bordering on scamming.
2020-11-10 22:03:14 <monochrom> IMO only Ralf Hinze's "priority search queue" does justice to this topic.
2020-11-10 22:03:28 thir joins (~thir@p200300f27f0b7e00894576386620b0d0.dip0.t-ipconnect.de)
2020-11-10 22:04:01 × mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 265 seconds)
2020-11-10 22:04:36 × wroathe_ quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
2020-11-10 22:04:50 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-11-10 22:06:08 <koz_> monochrom: It goes beyond 'bordering'. I'd argue it's more 'crossing the border then setting up camp on the other side'.
2020-11-10 22:06:28 <koz_> The argument I saw amounts to basically yelling 'POINTERS LOL' and that's about it.
2020-11-10 22:07:52 neiluj joins (~jco@167.198.204.77.rev.sfr.net)
2020-11-10 22:07:56 <justsomeguy> To insert an element into the middle of a list, don't you still have to do mutation (of previous cons cells link to the next element)? It seems to me that there is still some mutation, even though you can share more of the structure.
2020-11-10 22:08:06 <koz_> justsomeguy: You copy everything preceding it.
2020-11-10 22:08:13 invaser joins (~Thunderbi@31.148.23.125)
2020-11-10 22:08:15 <koz_> Then tail-share the rest.
2020-11-10 22:08:58 × mbomba quits (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca) (Ping timeout: 260 seconds)
2020-11-10 22:09:30 <justsomeguy> This is kind of fun :)
2020-11-10 22:11:05 mbomba joins (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca)
2020-11-10 22:11:17 × thir quits (~thir@p200300f27f0b7e00894576386620b0d0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-11-10 22:11:40 × mbomba quits (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca) (Client Quit)
2020-11-10 22:11:43 × conal quits (~conal@198.8.81.208) (Quit: Computer has gone to sleep.)
2020-11-10 22:12:49 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
2020-11-10 22:14:23 conal joins (~conal@198.8.81.208)
2020-11-10 22:14:25 × conal quits (~conal@198.8.81.208) (Client Quit)
2020-11-10 22:15:42 × ransom quits (~c4264035@2601:285:201:6720:446:a45f:fd1d:62c1) (Ping timeout: 260 seconds)
2020-11-10 22:16:27 <lucente> hey, I have completed tic-tac-toe, expect for some minor errors in loop. Could you give me a hand? Particular problem is explained right on the end of comment inside the code. Code: https://ideone.com/XuLTsy
2020-11-10 22:16:59 × jmcarthur quits (~jmcarthur@2601:86:500:2a40:db56:5d66:5919:c95d) (Ping timeout: 272 seconds)
2020-11-10 22:18:25 ransom joins (~c4264035@c-67-176-3-106.hsd1.co.comcast.net)
2020-11-10 22:18:25 × neiluj quits (~jco@167.198.204.77.rev.sfr.net) (Ping timeout: 260 seconds)
2020-11-10 22:19:18 neiluj joins (~jco@167.198.204.77.rev.sfr.net)
2020-11-10 22:20:09 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-11-10 22:21:53 invaser joins (~Thunderbi@31.148.23.125)
2020-11-10 22:22:18 britva joins (~britva@31.10.157.156)
2020-11-10 22:22:37 <hekkaidekapus> lucente: Add these 3 lines at the top of your file:
2020-11-10 22:22:39 <hekkaidekapus> module Main ( main ) where
2020-11-10 22:22:48 <hekkaidekapus> main :: IO ()
2020-11-10 22:22:56 <hekkaidekapus> main = pure ()
2020-11-10 22:25:12 × Franciman quits (~francesco@host-82-56-223-169.retail.telecomitalia.it) (Quit: Leaving)
2020-11-10 22:25:13 <merijn> lucente: 10 dollars says the missing 8,8 is due to lack of final newline and line-buffered stdout :p
2020-11-10 22:25:20 <merijn> Try using putStrLn instead of putStr
2020-11-10 22:25:21 <lucente> hekkaidekapus, done. I write haskell in emacs and load it to ghci.. so I don't get my hands on working with main
2020-11-10 22:26:07 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-10 22:26:58 phaul joins (~phaul@ruby/staff/phaul)
2020-11-10 22:27:05 <hekkaidekapus> lucente: Those lines are fixing this error: `The IO action ‘main’ is not defined in module ‘Main’` from your pasted code.
2020-11-10 22:28:14 <merijn> lucente: As for some general other tips: "ticktack" would probably look nicer if you ditch the if/then/else and use guards, the parentheses on line 59 are all redundant (although, even better would again be to get rid of the if/then/else)
2020-11-10 22:28:19 × ransom quits (~c4264035@c-67-176-3-106.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-10 22:29:05 <hekkaidekapus> And `concat . map = concatMap`.
2020-11-10 22:29:11 × luke quits (~luke@bitnomial/staff/luke) (Quit: sleep)
2020-11-10 22:29:21 <merijn> I'm guessing the inverted output is due to a logical error in the order you traverse the list, but I'm too lazy to be bothered to think it through
2020-11-10 22:31:05 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 265 seconds)
2020-11-10 22:32:02 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds)
2020-11-10 22:33:10 × neiluj quits (~jco@167.198.204.77.rev.sfr.net) (Ping timeout: 256 seconds)
2020-11-10 22:33:21 <lucente> merijn, putStrLn gave me the same result
2020-11-10 22:34:05 ransom joins (~c4264035@c-67-176-3-106.hsd1.co.comcast.net)
2020-11-10 22:34:17 neiluj joins (~jco@167.198.204.77.rev.sfr.net)
2020-11-10 22:34:26 <lucente> hekkaidekapus, my def of concat works alright
2020-11-10 22:34:59 nbloomf joins (~nbloomf@2600:1700:ad14:3020:68e3:2348:6146:33b5)
2020-11-10 22:35:14 <hekkaidekapus> Yeah, it is just a superficial observation along the lines of redundant brackets.
2020-11-10 22:35:45 <lucente> thanks for the input guys, however the problem with reversed tic tacs and my under competence the lacks of borders still remains
2020-11-10 22:37:18 argent0 joins (~argent0@168.227.98.80)
2020-11-10 22:37:30 hackage co-log-json 0.0.1.0 - Structured messages support in co-log ecosystem. https://hackage.haskell.org/package/co-log-json-0.0.1.0 (AlexanderVershilov)
2020-11-10 22:37:59 <lucente> I have added the main dec as you pointed out however it is not needed when compiled in ghci. The code doesn't look as something the authors had been dreaming of while they were creating it, but at the moment I just want to make it functional.
2020-11-10 22:38:43 phaul joins (~phaul@ruby/staff/phaul)
2020-11-10 22:38:54 <hekkaidekapus> Oh, someone else wrote the code?
2020-11-10 22:39:07 × britva quits (~britva@31.10.157.156) (Quit: This computer has gone to sleep)
2020-11-10 22:39:33 <hekkaidekapus> By the way, do: `main = pp (ticktack (8, 8) [(1, 1), (8, 8), (2, 2), (3, 3), (4, 2), (3, 2)])`
2020-11-10 22:40:02 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-11-10 22:40:20 <hekkaidekapus> to make main useful a bit. But if it is not your code, let’s stop here. Rather, ask what you don’t understand.
2020-11-10 22:40:35 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
2020-11-10 22:41:15 × xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 256 seconds)
2020-11-10 22:41:58 × grumble quits (~Thunderbi@freenode/staff/grumble) (Quit: I /quit and all I got to keep was this lousy quit message!)
2020-11-10 22:42:18 × neiluj quits (~jco@167.198.204.77.rev.sfr.net) (Remote host closed the connection)
2020-11-10 22:42:25 <hekkaidekapus> Here is a question for you for instance: why did adding main::IO() fix the compilation error?
2020-11-10 22:42:35 neiluj joins (~jco@167.198.204.77.rev.sfr.net)
2020-11-10 22:42:41 × fendor quits (~fendor@178.115.129.26.wireless.dyn.drei.com) (Remote host closed the connection)
2020-11-10 22:43:03 <koz_> Another question: is this homework?
2020-11-10 22:43:09 <hekkaidekapus> heh
2020-11-10 22:43:21 <lucente> hekkaidekapus, I meant authors of Haskell
2020-11-10 22:43:51 grumble joins (~Thunderbi@freenode/staff/grumble)
2020-11-10 22:44:37 × Ariakenom quits (~Ariakenom@h-82-196-111-82.NA.cust.bahnhof.se) (Quit: Leaving)
2020-11-10 22:44:59 <lucente> hekkaidekapus, The very output from the input you posted above is shown in comment section in the code. Because for some reason the compiler won't process the input I give to it. The output shown in comment is equal to what my terminal pops out
2020-11-10 22:45:17 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Client Quit)
2020-11-10 22:45:38 <hekkaidekapus> lucente: You have 2 questions so far. We are waiting…
2020-11-10 22:46:25 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds)
2020-11-10 22:46:27 <lucente> It fixed the comp error, because the web compiler required it. Most likely because it doesn't use ghci, so it needs to be declared at the start
2020-11-10 22:46:28 <koz_> hekkaidekapus: Async (Answer, Maybe Answer) :P
2020-11-10 22:46:55 <lucente> Not gonna lie, it's a homework.

All times are in UTC.