Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 565 566 567 568 569 570 571 572 573 574 575 .. 5022
502,152 events total
2020-10-11 02:29:23 todda7 joins (~torstein@athedsl-218389.home.otenet.gr)
2020-10-11 02:29:25 <ski> Rembane : Standford course ?
2020-10-11 02:30:06 <ski> dolio : "GHCs capability to both inline or let-float, is that not using the symmetric proprety of equality?","mmm.. no I guess not","Well, but transitivity is assumed by the fact that the simplifier could repeatedly inline, and it's valid because equivalence is transitive." -- that's about `=', not about `=='
2020-10-11 02:30:29 theDon joins (~td@94.134.91.169)
2020-10-11 02:31:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-10-11 02:33:47 × yahb quits (xsbot@haskell/bot/yahb) (Ping timeout: 240 seconds)
2020-10-11 02:35:53 <Tario> lemmih: That would return a Nothing in case of being invalid or Just "John", in this case, correct?
2020-10-11 02:36:11 <lemmih> Tario: Yeah, I think so.
2020-10-11 02:36:31 <Tario> I think that works, I'm going to give it a try in a bit in my tiny personal project
2020-10-11 02:36:40 × lemmih quits (~lemmih@2406:3003:2072:44:a0ec:19b9:a607:ec5) (Remote host closed the connection)
2020-10-11 02:36:45 <Tario> Thank you!
2020-10-11 02:36:54 dead10cc joins (63f22acf@gateway/web/cgi-irc/kiwiirc.com/ip.99.242.42.207)
2020-10-11 02:37:20 lemmih joins (~lemmih@2406:3003:2072:44:7cf8:46a0:1918:e607)
2020-10-11 02:37:52 <Tario> I'm going to give it a try shortly, Thank you, lemmih!
2020-10-11 02:38:41 thir joins (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de)
2020-10-11 02:38:49 yahb joins (xsbot@haskell/bot/yahb)
2020-10-11 02:41:39 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-11 02:44:35 × todda7 quits (~torstein@athedsl-218389.home.otenet.gr) (Ping timeout: 240 seconds)
2020-10-11 02:46:47 × thir quits (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-11 02:49:09 snakemas1 joins (~snakemast@213.100.206.23)
2020-10-11 02:49:53 chenshen joins (~chenshen@2620:10d:c090:400::5:3beb)
2020-10-11 02:51:30 × chenshen quits (~chenshen@2620:10d:c090:400::5:3beb) (Client Quit)
2020-10-11 02:53:45 × snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-11 02:53:58 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 246 seconds)
2020-10-11 03:00:16 emmanuel` joins (~user@2604:2000:1382:ce03:45b7:e6dc:91ed:9e53)
2020-10-11 03:00:40 × dead10cc quits (63f22acf@gateway/web/cgi-irc/kiwiirc.com/ip.99.242.42.207) (Quit: Connection closed)
2020-10-11 03:02:35 × mrchampion quits (~mrchampio@216-211-57-41.dynamic.tbaytel.net) (Quit: Leaving)
2020-10-11 03:04:14 arguapacha joins (uid134895@gateway/web/irccloud.com/x-sboxpzndwsrzuwvp)
2020-10-11 03:05:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-11 03:06:51 × arguapacha quits (uid134895@gateway/web/irccloud.com/x-sboxpzndwsrzuwvp) (Client Quit)
2020-10-11 03:08:44 × barzo quits (~sosal@212.154.68.77) (Read error: Connection reset by peer)
2020-10-11 03:10:20 <dsal> Tario: The simplest way is probably just to make a type that has the matching fields and let Aeson populate a value for you. The easiest way is probably lens-aeson.
2020-10-11 03:11:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-10-11 03:11:34 <Tario> dsal: ok, that I think I can do
2020-10-11 03:11:42 Dungdv joins (3abba8c1@gateway/web/cgi-irc/kiwiirc.com/ip.58.187.168.193)
2020-10-11 03:12:05 <dsal> λ> "{ \"name\": \"John\", \"age\" : 54}" ^? key "name" . _String -> Just "John"
2020-10-11 03:12:26 <Tario> I'll explain with more detail in my other device (who's also connected to the channel, but by the name of Kiraaa)
2020-10-11 03:12:34 <Kiraaaa> ok im here
2020-10-11 03:12:41 <dsal> Hey, we were just talking about you.
2020-10-11 03:12:59 mrchampion joins (~mrchampio@216-211-57-41.dynamic.tbaytel.net)
2020-10-11 03:13:04 <Kiraaaa> really?
2020-10-11 03:15:20 <Kiraaaa> for a tiny login, POST endpoint, I was thinking of creating a data type like this,
2020-10-11 03:15:24 <Kiraaaa> data LoginData = LoginData {
2020-10-11 03:15:26 <Kiraaaa> email :: Text
2020-10-11 03:15:28 <Kiraaaa> , password :: Text
2020-10-11 03:15:30 <dolio> ski: I think you tagged the wrong person.
2020-10-11 03:15:31 <Kiraaaa> }
2020-10-11 03:15:58 <ski> oh
2020-10-11 03:16:01 <ski> so i did, sorry
2020-10-11 03:16:17 <ski> dminuoso ^
2020-10-11 03:16:20 <Kiraaaa> with the following instances:
2020-10-11 03:16:23 <Kiraaaa> instance FromJSON LoginData
2020-10-11 03:16:24 ski 's a bit sleepy ..
2020-10-11 03:16:24 <Kiraaaa> instance ToJSON LoginData
2020-10-11 03:17:03 <Kiraaaa> so inside my POST handler, I wanted to perform the following:
2020-10-11 03:17:14 <Kiraaaa> my login POST handler*
2020-10-11 03:18:42 <Kiraaaa> pass a Handler Value, obtain the inputted json body with requirecheckjsonbody :: Handler LoginData (not sure if this was the right choice)
2020-10-11 03:19:08 <Kiraaaa> sort of like this:
2020-10-11 03:19:10 <Kiraaaa> postUserLoginR :: Handler Value
2020-10-11 03:19:11 <Kiraaaa> postUserLoginR = do
2020-10-11 03:19:13 <Kiraaaa> newLogin <- requireCheckJsonBody :: Handler Value
2020-10-11 03:19:25 <Kiraaaa> (ignore the last Handler Value, it should be Handler LoginData in my mind)
2020-10-11 03:19:30 <dsal> You can use a pastebin if you have a bunch of stuff you want to share without flooding out the whole channel.
2020-10-11 03:19:41 <Kiraaaa> oh
2020-10-11 03:19:56 <Kiraaaa> will do, it will be better
2020-10-11 03:22:02 <Kiraaaa> https://pastebin.com/gVwZiH2Z
2020-10-11 03:23:15 <Kiraaaa> so this was my attempt at getting the json body from a POST request for a simple login, for now I wanted to obtain the email from the object, and perform a query to obtain an user binded to that email address
2020-10-11 03:23:47 chenshen joins (~chenshen@2620:10d:c090:400::5:3beb)
2020-10-11 03:25:24 <Kiraaaa> leading up to this: https://pastebin.com/CBrSPXPT
2020-10-11 03:25:33 × chenshen quits (~chenshen@2620:10d:c090:400::5:3beb) (Client Quit)
2020-10-11 03:28:33 jedws joins (~jedws@121.209.161.98)
2020-10-11 03:28:39 <Kiraaaa> however, that did not work
2020-10-11 03:30:19 <Kiraaaa> (due to type errors between Value and HashMap Text Value)
2020-10-11 03:32:10 mdunnio joins (~mdunnio@208.59.170.5)
2020-10-11 03:32:30 × nbloomf quits (~nbloomf@2600:1700:83e0:1f40:e0e4:9afc:2bf1:eaf9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-11 03:33:13 × taurux quits (~taurux@net-188-216-43-131.cust.vodafonedsl.it) (Ping timeout: 264 seconds)
2020-10-11 03:35:04 taurux joins (~taurux@net-188-152-104-194.cust.vodafonedsl.it)
2020-10-11 03:39:51 <Kiraaaa> this is where I got stuck, thinking on how to parse that value from the JSON (or any value from its key)
2020-10-11 03:41:17 × djellemah quits (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54) (Ping timeout: 260 seconds)
2020-10-11 03:41:53 × mdunnio quits (~mdunnio@208.59.170.5) (Ping timeout: 260 seconds)
2020-10-11 03:43:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-11 03:44:54 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-11 03:47:49 drbean joins (~drbean@TC210-63-209-144.static.apol.com.tw)
2020-10-11 03:49:12 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
2020-10-11 03:49:53 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
2020-10-11 03:52:30 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
2020-10-11 03:53:15 gxt joins (~gxt@gateway/tor-sasl/gxt)
2020-10-11 03:54:07 × falafel quits (~falafel@2605:e000:1527:d491:1ccf:5c8d:7928:e9cc) (Ping timeout: 260 seconds)
2020-10-11 03:54:08 × carlomagno quits (~cararell@inet-hqmc01-o.oracle.com) (Remote host closed the connection)
2020-10-11 03:54:18 × Dungdv quits (3abba8c1@gateway/web/cgi-irc/kiwiirc.com/ip.58.187.168.193) (Ping timeout: 258 seconds)
2020-10-11 03:56:57 carlomagno joins (~cararell@inet-hqmc01-o.oracle.com)
2020-10-11 04:01:32 × berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in)
2020-10-11 04:02:07 berberman joins (~berberman@unaffiliated/berberman)
2020-10-11 04:04:08 __ngua joins (~rory@2402:800:6379:81de:c01f:8864:9ffb:a477)
2020-10-11 04:04:46 <Kiraaaa> *back to Tario (other device)
2020-10-11 04:04:49 × emmanuel` quits (~user@2604:2000:1382:ce03:45b7:e6dc:91ed:9e53) (Ping timeout: 272 seconds)
2020-10-11 04:04:57 chenshen joins (~chenshen@2620:10d:c090:400::5:3beb)
2020-10-11 04:04:57 <Tario> back
2020-10-11 04:05:03 × Kiraaaa quits (~Kira@201.192.165.173) (Quit: WeeChat 2.9)
2020-10-11 04:07:39 × chenshen quits (~chenshen@2620:10d:c090:400::5:3beb) (Client Quit)

All times are in UTC.