Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-18 03:24:35 <Shiranai> haha thanks
2021-03-18 03:24:54 <Shiranai> was looking for alternatives to the state monad but I'll just use that I guess
2021-03-18 03:24:54 <Cale> Shiranai: Everything that would be state, you could just pass as arguments to your function.
2021-03-18 03:26:44 <Shiranai> Cale: I thought about that approach for a bit, the lexer would have to be a recursive function in that case. Everytime calling itself with its current line, current char, current token, the list of token and the rest of the text to parse (at a minimum)
2021-03-18 03:26:50 <Cale> Shiranai: and then instead of updating the state, you call another function with modified arguments (or maybe the same function)
2021-03-18 03:27:40 <slack1256> There are inneficient implementations of parser combinators that are just the state monad :-P , you could make the full jump lol.
2021-03-18 03:28:05 <Cale> You wouldn't necessarily have to have the list of tokens as an argument, unless you have need of going back and modifying tokens you've already read
2021-03-18 03:28:21 <Cale> Instead, you could just emit the list as you go
2021-03-18 03:30:05 slack1256 discovered he has been misusing other-modules his whole life.
2021-03-18 03:30:45 × Feuermagier quits (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) (Ping timeout: 265 seconds)
2021-03-18 03:31:43 × pjb quits (~t@2a01cb04063ec500180c10bfcb2533c4.ipv6.abo.wanadoo.fr) (Ping timeout: 265 seconds)
2021-03-18 03:34:07 plutoniix joins (~q@184.82.209.205)
2021-03-18 03:36:56 brandly joins (~brandly@c-73-68-15-46.hsd1.ma.comcast.net)
2021-03-18 03:37:45 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-18 03:38:45 × drbean quits (~drbean@TC210-63-209-174.static.apol.com.tw) (Read error: Connection reset by peer)
2021-03-18 03:38:51 <lemmih> How do you misuse other-modules?
2021-03-18 03:38:57 × cods quits (~fred@unaffiliated/cods) (Ping timeout: 264 seconds)
2021-03-18 03:39:16 hexfive joins (~hexfive@50.35.83.177)
2021-03-18 03:39:27 × __minoru__shirae quits (~shiraeesh@109.166.59.216) (Ping timeout: 256 seconds)
2021-03-18 03:39:27 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-18 03:39:57 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-18 03:40:39 drbean joins (~drbean@TC210-63-209-182.static.apol.com.tw)
2021-03-18 03:41:46 <slack1256> Now I think there are mostly for data-dir/data-file related code, such as the Paths_library autogenerated module.
2021-03-18 03:42:23 <slack1256> If you don't export the module via exposed-modules, you cannot test them on the test-suite. Plus they don't get included in the haddock documentation.
2021-03-18 03:46:18 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-18 03:46:32 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-18 03:51:45 × theDon quits (~td@94.134.91.246) (Ping timeout: 246 seconds)
2021-03-18 03:53:45 average joins (uid473595@gateway/web/irccloud.com/x-movoojltrrxlptod)
2021-03-18 03:53:46 theDon joins (~td@muedsl-82-207-238-114.citykom.de)
2021-03-18 03:55:38 × brandly quits (~brandly@c-73-68-15-46.hsd1.ma.comcast.net) (Ping timeout: 260 seconds)
2021-03-18 03:55:54 <Shiranai> Cale: could you please elaborate on how the list of tokens is not necessary as an argument?
2021-03-18 03:56:27 <Shiranai> if it is a list, after processing the nth token, shouldn't I have the base list to append it to it?
2021-03-18 03:57:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-18 03:57:31 geowiesnot_bis joins (~user@87-89-181-157.abo.bbox.fr)
2021-03-18 03:58:47 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2021-03-18 04:00:02 × haasn quits (~nand@mpv/developer/haasn) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
2021-03-18 04:00:02 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-03-18 04:00:09 zaquest joins (~notzaques@5.128.210.178)
2021-03-18 04:01:10 specdrake joins (~anurag@203.192.236.225)
2021-03-18 04:01:15 <specdrake> Hello
2021-03-18 04:01:20 haasn joins (~nand@mpv/developer/haasn)
2021-03-18 04:01:30 <Axman6> Hello!
2021-03-18 04:01:54 <specdrake> Why is the haskell-gsoc irc chat so inactive?
2021-03-18 04:02:18 <specdrake> Is there some other primary means of communication?
2021-03-18 04:02:35 <specdrake> (Apart from mailing list and IRC)
2021-03-18 04:02:55 cheater1 joins (~user@unaffiliated/cheater)
2021-03-18 04:03:18 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 256 seconds)
2021-03-18 04:03:19 <Axman6> Those are good questions that I have no answer for
2021-03-18 04:03:19 cheater1 is now known as cheater
2021-03-18 04:03:43 <specdrake> Oh okay
2021-03-18 04:05:13 Rudd0 joins (~Rudd0@185.189.115.103)
2021-03-18 04:05:32 <Cale> Shiranai: foo input blah blah = TokenToEmit : foo depletedInput other stuff
2021-03-18 04:05:38 cods joins (~fred@82-65-232-44.subs.proxad.net)
2021-03-18 04:05:59 <Cale> Shiranai: You just produce the list elements immediately as you determine them
2021-03-18 04:06:27 <Cale> Shiranai: It's also much more efficient, since you don't have to accumulate the list of tokens in reverse and then reverse it at the end
2021-03-18 04:06:47 <Cale> (or what would be horrible for performance, continually append to the end of the list)
2021-03-18 04:06:48 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-18 04:07:07 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-18 04:07:25 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-18 04:07:33 <Cale> Shiranai: Does that make sense?
2021-03-18 04:09:53 × andreas31 quits (~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 268 seconds)
2021-03-18 04:10:18 × geowiesnot_bis quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds)
2021-03-18 04:11:31 brandly joins (~brandly@c-73-68-15-46.hsd1.ma.comcast.net)
2021-03-18 04:11:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2021-03-18 04:11:48 andreas31 joins (~andreas@gateway/tor-sasl/andreas303)
2021-03-18 04:15:34 lozenge_ joins (~lozenge@117.222.64.120)
2021-03-18 04:18:16 bitmagie joins (~Thunderbi@200116b8060fe700383a25a1bbfaa0e2.dip.versatel-1u1.de)
2021-03-18 04:20:04 × howdoi quits (uid224@gateway/web/irccloud.com/x-lmfzccdglbgutamn) (Quit: Connection closed for inactivity)
2021-03-18 04:20:27 × bitmagie quits (~Thunderbi@200116b8060fe700383a25a1bbfaa0e2.dip.versatel-1u1.de) (Client Quit)
2021-03-18 04:20:27 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-18 04:20:43 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-18 04:21:19 ejjfunky joins (7da36f81@125.163.111.129)
2021-03-18 04:27:38 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Ping timeout: 264 seconds)
2021-03-18 04:27:46 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 268 seconds)
2021-03-18 04:29:38 toorevitimirp joins (~tooreviti@117.182.183.55)
2021-03-18 04:31:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-18 04:35:19 × myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 265 seconds)
2021-03-18 04:35:50 × dhruvasagar quits (~dhruvasag@49.207.63.69) (Quit: WeeChat 3.0.1)
2021-03-18 04:38:10 × augnun quits (~augnun@2804:14c:658b:41bb:765b:76f0:4857:5bd2) (Quit: WeeChat 3.1)
2021-03-18 04:40:00 teardown joins (~user@gateway/tor-sasl/mrush)
2021-03-18 04:40:10 lozenge_ parts (~lozenge@117.222.64.120) ()
2021-03-18 04:40:35 × zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-18 04:43:04 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-18 04:43:31 × valdyn quits (valdyn@c6a7cbb3.vpn.njalla.net) (Quit: leaving)
2021-03-18 04:43:40 valdyn joins (valdyn@c6a7cba1.vpn.njalla.net)
2021-03-18 04:44:55 <Shiranai> Cale: Sorry for the late response, I am not understanding. Could you please show some example code? I.e. let's say that the `nextToken` function successfully gets the next token, how would you use that to "produce the list elements immediately"?
2021-03-18 04:45:31 <Shiranai> Up till now I thought that accumulating in reverse would be the most efficient
2021-03-18 04:54:23 hackage ory-kratos 0.0.5.9 - API bindings for Ory Kratos https://hackage.haskell.org/package/ory-kratos-0.0.5.9 (njaremko)
2021-03-18 04:57:26 <Cale> Shiranai: nextToken "" = []; nextToken input = t : nextToken input' where (t, input') = splitFirstToken input
2021-03-18 04:58:17 <Shiranai> ohhhhhhhhhhhhh
2021-03-18 04:58:18 <Cale> This is more efficient than accumulating across the entire input before being able to return any part of the result
2021-03-18 04:58:27 shad0w_ joins (a0ca2598@160.202.37.152)
2021-03-18 04:58:31 <Cale> You can get the first token with only a single splitFirstToken
2021-03-18 04:58:53 <Shiranai> I see, thank you, I just got back into haskell and forgot some techniques, really nice
2021-03-18 04:58:58 <Cale> Well, calling this nextToken was wrong, I should have called it tokens :)
2021-03-18 04:59:01 <shad0w_> cale: not if its a NFT : p
2021-03-18 04:59:38 <Shiranai> Thanks again, see you later, have a good day/night
2021-03-18 04:59:45 × Shiranai quits (beed0de4@gateway/web/cgi-irc/kiwiirc.com/ip.190.237.13.228) (Quit: Connection closed)
2021-03-18 04:59:51 <Cale> shad0w_: NFT's are like getting a blue ribbon for participation at summer camp and then thinking that it's worth 68 million dollars
2021-03-18 05:00:55 <shad0w_> Cale: what's sad is that statement can't be ruled out as a possible scenario. sigh.

All times are in UTC.