Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-03 03:14:50 <Georgia> yeah
2021-04-03 03:15:26 <hololeap> the first list ends up being just the list itself, since it is taking the first element from each inner list of `tails`
2021-04-03 03:15:55 <hololeap> but it is passing the list of lists that `tails` generates to `draw` as the variable `t`
2021-04-03 03:16:03 <Georgia> right
2021-04-03 03:16:03 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 268 seconds)
2021-04-03 03:16:18 <hololeap> therefore... it's confusing and i'm honestly having a bit of trouble with it
2021-04-03 03:16:21 <hololeap> :)
2021-04-03 03:16:21 <Georgia> and this keeps fragmenting out / breaking into more branches until we call draw _ 0
2021-04-03 03:16:33 <Georgia> at which point the empty list is returned
2021-04-03 03:16:39 <Georgia> or list of an empty list
2021-04-03 03:16:50 <Georgia> which is appended to each branch
2021-04-03 03:16:56 <Georgia> and we get a resulting string
2021-04-03 03:17:06 <Georgia> How on Earth did someone come up with this
2021-04-03 03:17:27 <hololeap> oh, no
2021-04-03 03:17:27 <Georgia> Thanks for the help
2021-04-03 03:17:31 <Georgia> Oh?
2021-04-03 03:17:40 <hololeap> t isn't the list of lists that `tails` generates
2021-04-03 03:17:48 <Georgia> t is an element from it
2021-04-03 03:17:59 <Georgia> and we call draw on each of those elements?
2021-04-03 03:18:12 <hololeap> right, it corresponds with the _current_ list that is currently being "pointed" to
2021-04-03 03:18:18 <Georgia> mhm
2021-04-03 03:18:25 <Georgia> so we have some branching
2021-04-03 03:19:07 <Georgia> for each "tail", we get the first element of the tail and then append the call to (draw tail, (n - 1))
2021-04-03 03:20:29 <Georgia> What I'm now trying to understand is why tails is called but only the first element is taken from it
2021-04-03 03:21:01 <Georgia> is that done to iterate over each element in the list??
2021-04-03 03:21:43 <Georgia> at the same time as calling draw on its tails, I guess
2021-04-03 03:27:10 XorSwap joins (~me@wnpgmb016qw-ds01-123-1.dynamic.bellmts.net)
2021-04-03 03:29:22 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-04-03 03:29:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-04-03 03:30:47 <hololeap> take `draw [1,2,3] 2` for example
2021-04-03 03:30:59 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
2021-04-03 03:31:09 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
2021-04-03 03:31:36 <hololeap> it appends 1 to `draw [1,2,3] 1` which appends `1 : 1` to draw [1,2,3] 0` which ends up with [1,1]
2021-04-03 03:32:13 <hololeap> then it appends 1 to `draw [2,3] 1` which appends `1 : 2` to `draw [2,3] 0` which ends up being [1,2]
2021-04-03 03:32:24 <hololeap> and so on
2021-04-03 03:33:27 <hololeap> it starts over at `2 : draw [2,3] 1` at some point giving [2,2] and [2,3]
2021-04-03 03:34:43 <hololeap> finally starting over at `3 : draw [3] 1` giving the last result of [3,3]
2021-04-03 03:34:59 × carlomagno quits (~cararell@148.87.23.10) (Ping timeout: 252 seconds)
2021-04-03 03:35:01 <Georgia> I got it
2021-04-03 03:35:06 <Georgia> Drew it out on some paper
2021-04-03 03:35:10 <Georgia> thanks!
2021-04-03 03:35:21 <hololeap> np! like i said, tricky :)
2021-04-03 03:37:34 × ajc quits (~ajc@69.231.232.79) (Remote host closed the connection)
2021-04-03 03:37:58 ajc joins (~ajc@69.231.232.79)
2021-04-03 03:40:37 conal joins (~conal@64.71.133.70)
2021-04-03 03:42:19 chenin joins (bab724b4@186.183.36.180)
2021-04-03 03:44:09 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:38ef:e5ed:8c96:cda5) (Ping timeout: 246 seconds)
2021-04-03 03:45:37 × Guest15978 quits (~felix@46.183.103.8) (Quit: WeeChat 3.0.1)
2021-04-03 03:45:56 carlomagno joins (~cararell@148.87.23.11)
2021-04-03 03:46:50 tpefreedom joins (627dbde6@98.125.189.230)
2021-04-03 03:47:58 × crestfallen quits (~john@128.32.176.159) (Ping timeout: 240 seconds)
2021-04-03 03:53:08 × Georgia quits (c634aeb5@198.52.174.181) (Quit: Connection closed)
2021-04-03 03:55:46 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 240 seconds)
2021-04-03 03:57:21 ericsagn1 joins (~ericsagne@2405:6580:0:5100:d0a0:d77a:4eaa:16c)
2021-04-03 04:02:36 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-04-03 04:03:05 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-04-03 04:04:09 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-04-03 04:26:30 v01d4lph4 joins (~v01d4lph4@223.190.20.92)
2021-04-03 04:29:23 motilio joins (~motilio@189.162.152.162)
2021-04-03 04:29:27 × gienah quits (~mwright@gentoo/developer/gienah) (Read error: Connection reset by peer)
2021-04-03 04:30:25 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-04-03 04:31:17 × v01d4lph4 quits (~v01d4lph4@223.190.20.92) (Ping timeout: 268 seconds)
2021-04-03 04:32:23 × alx741 quits (~alx741@181.196.68.6) (Quit: alx741)
2021-04-03 04:34:31 virmaha joins (43a131fc@c-67-161-49-252.hsd1.ca.comcast.net)
2021-04-03 04:35:13 chenin parts (bab724b4@186.183.36.180) ()
2021-04-03 04:36:11 <virmaha> Hello, I recently read few articles about functional programming and loved the ideas presented. I am primarily a c++ programmer and I was confused how to apply or think about functional logic
2021-04-03 04:36:38 <virmaha> in scenario like follows :
2021-04-03 04:37:48 <virmaha> I run a thread which pings all my classes every 1 minutes. On each ping, each class will run some logic. But at random intervals, I've to give "events" to these classes
2021-04-03 04:37:57 <virmaha> and the classes will respond to those events in their own way
2021-04-03 04:38:10 <virmaha> how to go about such dynamic scenarios? Can someone guide?
2021-04-03 04:39:37 <sm[m]> Probably you'd use the async package to manage your threads
2021-04-03 04:40:04 <virmaha> sm[m] : all my code is in c++ but I want high level ideas about formulating the logic/design
2021-04-03 04:42:36 <sm[m]> Your main thread forks a bunch of children ? Then loops sending one minute pings and random events to them all ?
2021-04-03 04:42:46 dyeplexer joins (~lol@unaffiliated/terpin)
2021-04-03 04:45:14 <virmaha> currently, it holds instances of class in vector and iterates over them
2021-04-03 04:47:06 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
2021-04-03 04:47:23 molehillish joins (~molehilli@2600:8800:8d06:1800:c5e2:b955:ecac:f7f3)
2021-04-03 04:47:38 vicfred_ joins (vicfred@gateway/vpn/mullvad/vicfred)
2021-04-03 04:49:41 solvr joins (57e3c46d@87.227.196.109)
2021-04-03 04:49:58 × vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Ping timeout: 240 seconds)
2021-04-03 04:50:56 × pie_ quits (~pie_bnc]@unaffiliated/pie-/x-0787662) (Read error: Connection reset by peer)
2021-04-03 04:51:13 × vicfred_ quits (vicfred@gateway/vpn/mullvad/vicfred) (Client Quit)
2021-04-03 04:51:59 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
2021-04-03 04:52:04 gienah joins (~mwright@gentoo/developer/gienah)
2021-04-03 04:53:13 pie_ joins (~pie_bnc]@unaffiliated/pie-/x-0787662)
2021-04-03 04:53:59 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection)
2021-04-03 04:54:35 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
2021-04-03 04:55:19 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-nbhjseffckoxomyo) (Quit: Connection closed for inactivity)
2021-04-03 04:56:11 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection)
2021-04-03 04:57:15 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
2021-04-03 04:57:43 vicfred joins (vicfred@gateway/vpn/mullvad/vicfred)
2021-04-03 04:59:41 stree joins (~stree@68.36.8.116)
2021-04-03 05:02:54 × solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed)
2021-04-03 05:03:04 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:543a:a17f:f67d:8caf) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-04-03 05:13:22 Stuff joins (2f935245@47.147.82.69)
2021-04-03 05:13:38 × Stuff quits (2f935245@47.147.82.69) (Client Quit)
2021-04-03 05:15:01 Poyo[m] joins (stikynotha@gateway/shell/matrix.org/x-zqknqggecavokhat)
2021-04-03 05:15:23 × motilio quits (~motilio@189.162.152.162) (Remote host closed the connection)
2021-04-03 05:20:02 × molehillish quits (~molehilli@2600:8800:8d06:1800:c5e2:b955:ecac:f7f3) (Remote host closed the connection)
2021-04-03 05:23:27 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Quit: rcirc on GNU Emacs 27.2)

All times are in UTC.