Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-31 22:32:25 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2021-03-31 22:35:29 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2021-03-31 22:39:18 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-03-31 22:40:12 × borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 246 seconds)
2021-03-31 22:42:37 borne joins (~fritjof@vpn05.bremen.freifunk.net)
2021-03-31 22:43:05 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2021-03-31 22:43:17 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Client Quit)
2021-03-31 22:43:55 × michalz quits (~user@185.246.204.56) (Remote host closed the connection)
2021-03-31 22:45:18 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds)
2021-03-31 22:46:12 cmeans joins (0cbb7484@12.187.116.132)
2021-03-31 22:46:21 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-03-31 22:48:26 <cmeans> Hi, newbie to Haskell...going through Youtube videos at present...got a random question...is there a way to declare a type of List that has a fixed length?
2021-03-31 22:48:55 <cmeans> Sort of, type Row a = [a], length [a] == 7
2021-03-31 22:49:17 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2021-03-31 22:50:18 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2021-03-31 22:52:07 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 252 seconds)
2021-03-31 22:52:25 zaquest joins (~notzaques@5.128.210.178)
2021-03-31 22:53:41 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
2021-03-31 22:54:50 <hpc> is this a "point me at a package" question or a "how would it work" question?
2021-03-31 22:55:42 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2021-03-31 22:55:48 × molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Remote host closed the connection)
2021-03-31 22:55:59 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 246 seconds)
2021-03-31 22:56:20 molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846)
2021-03-31 22:56:57 × notzmv quits (~zmv@unaffiliated/zmv) (Read error: Connection reset by peer)
2021-03-31 22:58:57 argento joins (~argent0@191.81.225.82)
2021-03-31 23:00:07 <cmeans> More of a can it be done, if it even makes sense, and if so, how.
2021-03-31 23:00:52 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2021-03-31 23:00:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-03-31 23:01:03 nbloomf joins (~nbloomf@2600:1700:ad14:3020:513e:9602:428e:657f)
2021-03-31 23:01:21 Guest89795 joins (~zmv@unaffiliated/zmv)
2021-03-31 23:01:34 <cmeans> I'm a seasoned programmer, but new to functional programming.
2021-03-31 23:01:46 <hpc> so, it does make sense
2021-03-31 23:02:07 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:513e:9602:428e:657f) (Client Quit)
2021-03-31 23:02:09 <hpc> and the generalization of that idea is one of my favorite topics in computer science
2021-03-31 23:02:17 <cmeans> OK, I'm ahead by 1.
2021-03-31 23:02:17 × stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds)
2021-03-31 23:02:32 <hpc> the thing to google is "dependent types", meaning types that depend on values
2021-03-31 23:02:36 × molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 258 seconds)
2021-03-31 23:02:59 <cmeans> Excellent.  I'm off.  Thanks hpc.
2021-03-31 23:03:09 <hpc> or in other words, type-level functions that take value-level things as parameters
2021-03-31 23:03:14 <hpc> :D
2021-03-31 23:03:43 <cmeans> =L
2021-03-31 23:03:46 × finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection)
2021-03-31 23:04:34 × conal_ quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-31 23:05:03 nbloomf joins (~nbloomf@2600:1700:ad14:3020:9ef:d80a:d8b:a18d)
2021-03-31 23:05:22 × mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew)
2021-03-31 23:05:50 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 268 seconds)
2021-03-31 23:06:39 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-03-31 23:07:25 finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-03-31 23:07:47 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-31 23:08:07 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-31 23:09:11 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-03-31 23:09:17 Guest89795 is now known as notzmv
2021-03-31 23:09:57 × argento quits (~argent0@191.81.225.82) (Quit: leaving)
2021-03-31 23:10:41 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 260 seconds)
2021-03-31 23:15:27 stree joins (~stree@68.36.8.116)
2021-03-31 23:16:54 × tionos quits (~tionos@185.173.235.27) (Quit: leaving)
2021-03-31 23:17:23 tionos joins (~tionos@2a0b:b7c4:1:731::1)
2021-03-31 23:17:24 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-03-31 23:18:09 Tario joins (~Tario@201.192.165.173)
2021-03-31 23:21:42 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2021-03-31 23:22:41 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
2021-03-31 23:25:10 <dmwit> ?pl \n -> scanl (\v i -> v * (n-i+1) `div` i) 1 [1..n]
2021-03-31 23:25:10 <lambdabot> ap (flip scanl 1 . flip ((.) . (*)) . join . (div .) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1)
2021-03-31 23:25:36 <dmwit> ?let f = \n -> scanl (\v i -> v * (n-i+1) `div` i) 1 [1..n]; g = ap (flip scanl 1 . flip ((.) . (*)) . join . (div .) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1)
2021-03-31 23:25:38 <lambdabot> Defined.
2021-03-31 23:25:42 <dmwit> > f 10
2021-03-31 23:25:43 <lambdabot> error:
2021-03-31 23:25:43 <lambdabot> Ambiguous occurrence ‘f’
2021-03-31 23:25:43 <lambdabot> It could refer to
2021-03-31 23:25:47 <dmwit> ?undefine
2021-03-31 23:25:47 <lambdabot> Undefined.
2021-03-31 23:25:57 <dmwit> ?let pointful = \n -> scanl (\v i -> v * (n-i+1) `div` i) 1 [1..n]; pointless = ap (flip scanl 1 . flip ((.) . (*)) . join . (div .) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1)
2021-03-31 23:25:58 <lambdabot> Defined.
2021-03-31 23:26:01 <dmwit> > pointful 10
2021-03-31 23:26:03 <lambdabot> [1,10,45,120,210,252,210,120,45,10,1]
2021-03-31 23:26:04 <dmwit> > pointless 10
2021-03-31 23:26:05 <lambdabot> [1,10,40,80,80,80,0,0,0,0,0]
2021-03-31 23:26:23 <dmwit> ?
2021-03-31 23:27:12 Guest41032 joins (~laudiacay@67.176.215.84)
2021-03-31 23:27:30 <hpc> :t pointful
2021-03-31 23:27:31 <lambdabot> Integral a => a -> [a]
2021-03-31 23:27:34 <hpc> :t pointless
2021-03-31 23:27:35 <lambdabot> Integral a => a -> [a]
2021-03-31 23:27:35 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
2021-03-31 23:27:40 <hpc> oh wait, duh
2021-03-31 23:27:52 molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846)
2021-03-31 23:29:16 <dmwit> Ah, I bet this is the bug:
2021-03-31 23:29:22 <dmwit> ?pl \x y z -> x * y `div` z
2021-03-31 23:29:22 <lambdabot> (. div) . (.) . (*)
2021-03-31 23:29:29 <dmwit> ?pl \x y z -> x * (y `div` z)
2021-03-31 23:29:29 <lambdabot> (. div) . (.) . (*)
2021-03-31 23:29:57 <hpc> > 6 * 4 `div` 3
2021-03-31 23:29:59 <lambdabot> 8
2021-03-31 23:30:01 <dmwit> ?pl \n -> scanl (\v i -> (v * (n-i+1)) `div` i) 1 [1..n]
2021-03-31 23:30:01 <lambdabot> ap (flip scanl 1 . flip flip id . (liftM2 div .) . flip ((.) . (*)) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1)
2021-03-31 23:30:19 <hpc> > ((. div) . (.) . (*)) 6 4 3
2021-03-31 23:30:21 <lambdabot> 6
2021-03-31 23:30:24 <hpc> fun
2021-03-31 23:30:30 <dmwit> ?let pointless' = ap (flip scanl 1 . flip flip id . (liftM2 div .) . flip ((.) . (*)) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1)

All times are in UTC.