Logs: freenode/#haskell
| 2020-10-19 20:07:54 | <crestfallen> | ..> :t pure @[] ((*), (+)) what would you do with with this setting? hyperisco |
| 2020-10-19 20:08:18 | <hyperisco> | that is a ghci command that asks what the type of pure @[] ((*), (+)) is |
| 2020-10-19 20:08:58 | → | mirrorbird joins (~psutcliff@m83-187-163-53.cust.tele2.se) |
| 2020-10-19 20:09:24 | <crestfallen> | yes, but that's all I have from that "lesson" online. I don't know how you would go about using something of that type. |
| 2020-10-19 20:09:27 | <hyperisco> | do you know the difference between ghci and ghc? have you written a Haskell program in a file and compiled it? |
| 2020-10-19 20:10:13 | <crestfallen> | many times to varying effect |
| 2020-10-19 20:10:52 | <crestfallen> | could you show me some examples where that type is used in some way? |
| 2020-10-19 20:11:02 | <hyperisco> | I am not sure how to answer that sort of question… if you do not see a use for it, then don't use it :) |
| 2020-10-19 20:11:33 | <hyperisco> | I do not have any reason to use that type either |
| 2020-10-19 20:12:33 | <crestfallen> | I'm learning haskell from textbooks and online. I don't need haskell for anything except pure learning |
| 2020-10-19 20:12:36 | <geekosaur> | there are uses but they can usually be avoided |
| 2020-10-19 20:12:40 | <hyperisco> | but if we wanted to make something up… lets say I had two lists of numbers and a list of operations |
| 2020-10-19 20:13:05 | <crestfallen> | ok.. |
| 2020-10-19 20:13:10 | <hyperisco> | > [x `op` y | x <- [0..2], y <- [0..2], z <- [(+),(*)]] |
| 2020-10-19 20:13:12 | <lambdabot> | error: |
| 2020-10-19 20:13:12 | <lambdabot> | • Couldn't match type ‘Unwrapped s0’ with ‘Unwrapped s’ |
| 2020-10-19 20:13:12 | <lambdabot> | Expected type: [Unwrapped s] |
| 2020-10-19 20:13:43 | <hyperisco> | > [x `op` y | x <- [0..2], y <- [0..2], op <- [(+),(*)]] -- should always talk to lambdabot first... |
| 2020-10-19 20:13:43 | → | karanlikmadde joins (~karanlikm@2a01:c22:a46a:b400:3c0d:995b:be0c:192) |
| 2020-10-19 20:13:45 | <lambdabot> | [0,0,1,0,2,0,1,0,2,1,3,2,2,0,3,2,4,4] |
| 2020-10-19 20:14:06 | <hyperisco> | well that is not using a tuple of operations I guess |
| 2020-10-19 20:14:11 | <hyperisco> | exercise for you :P |
| 2020-10-19 20:14:59 | <gattytto> | this is what I like about haskell, makes me feel like my first dev class, every time xD |
| 2020-10-19 20:15:42 | → | GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-19 20:15:43 | × | GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-19 20:15:43 | → | GyroW_ joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-19 20:16:40 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 260 seconds) |
| 2020-10-19 20:19:02 | → | Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2020-10-19 20:20:20 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-10-19 20:20:47 | <crestfallen> | so a pretty basic list comprehension hyperisco .. that much I get |
| 2020-10-19 20:20:49 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 260 seconds) |
| 2020-10-19 20:21:25 | <hyperisco> | if you just want to study and not actually do anything with a computer language, why not try Agda? |
| 2020-10-19 20:21:52 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-19 20:21:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2020-10-19 20:22:24 | <dminuoso> | hyperisco: Haha. |
| 2020-10-19 20:22:57 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-10-19 20:23:26 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-19 20:28:25 | <hyperisco> | crestfallen, I reckon whatever you were reading was just picking arbitrary examples, they probably were not claiming they were important |
| 2020-10-19 20:28:27 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Quit: cosimone) |
| 2020-10-19 20:30:50 | × | Amras quits (~Amras@unaffiliated/amras0000) (Remote host closed the connection) |
| 2020-10-19 20:32:03 | <crestfallen> | hyperisco: not a programmer, just an older person trying to keep intellectually active. I find haskell very interesting. I don't have a STEM background. just teaching myself. thanks kindly for your patient help. |
| 2020-10-19 20:33:00 | × | Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 260 seconds) |
| 2020-10-19 20:33:25 | × | geekosaur quits (ac3a8c68@172.58.140.104) (Remote host closed the connection) |
| 2020-10-19 20:33:47 | <hyperisco> | you can get a more distilled presentation of these ideas if you study the mathematical roots, if that is more so what you are interested in |
| 2020-10-19 20:34:30 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 2020-10-19 20:34:40 | <hyperisco> | being a pragmatic programming language, Haskell has a lot of features that make it convenient for creating real computer programs, but sometimes at the cost of clarity |
| 2020-10-19 20:34:41 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
| 2020-10-19 20:35:10 | × | p8m_ quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 256 seconds) |
| 2020-10-19 20:35:28 | → | Kaivo joins (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) |
| 2020-10-19 20:35:46 | <hyperisco> | you might like "lambda calculus" or "term rewriting" or "proof theory" for instance |
| 2020-10-19 20:38:18 | <crestfallen> | hyperisco: I've gone through a bunch of GADT, some proving , types as propositions - programs as proofs stuff. type unification (which I love). the little things, like @[] can be toughest for me. don't know why. like that was just incomplete notes of mine. sorry |
| 2020-10-19 20:39:21 | → | Amras joins (~Amras@unaffiliated/amras0000) |
| 2020-10-19 20:39:50 | <hyperisco> | well see that is one of those Haskell blemishes (imo) … the intention of Haskell is to infer all types, but as Haskell programmers started pushing the boundaries, types became ambiguous or not inferrable |
| 2020-10-19 20:40:49 | <hyperisco> | TypeApplications walks back a bit from the intention of inferring all types… what you could do before was pass type proxies, or sometimes you could annotate |
| 2020-10-19 20:40:56 | × | s00pcan quits (~chris@107.181.165.217) (Ping timeout: 260 seconds) |
| 2020-10-19 20:41:17 | × | StoneToad quits (~StoneToad@199-167-119-214.ppp.storm.ca) (Ping timeout: 265 seconds) |
| 2020-10-19 20:41:39 | → | p8m_ joins (p8m@gateway/vpn/protonvpn/p8m) |
| 2020-10-19 20:41:41 | → | StoneToad_ joins (~StoneToad@199-167-119-214.ppp.storm.ca) |
| 2020-10-19 20:41:50 | <crestfallen> | still not sure how your example of the list comprehension applies to using pure @[]. like how that relates in Applicative hyperisco |
| 2020-10-19 20:42:04 | <dolio> | Haskell has never been able to infer all types, I think. |
| 2020-10-19 20:42:08 | × | p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 272 seconds) |
| 2020-10-19 20:42:17 | <hyperisco> | pure @[] (*) = [(*)] so I just wrote [(*)] |
| 2020-10-19 20:42:49 | → | s00pcan joins (~chris@075-133-056-178.res.spectrum.com) |
| 2020-10-19 20:42:53 | <hyperisco> | if you meant to ask why you would ever use pure @[] and not just pure then it would probably only be because the type could not be inferred |
| 2020-10-19 20:43:29 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 2020-10-19 20:43:37 | <hyperisco> | dolio, maybe but I think it fair to say that you are meant to lean on inference as much as possible. It is seen as a good thing, mrore is bertter |
| 2020-10-19 20:43:50 | <dolio> | Yeah, that's definitely true. |
| 2020-10-19 20:43:51 | <hyperisco> | more is better |
| 2020-10-19 20:45:43 | <dolio> | TypeApplications do seem like an odd design in light of a lot of other stuff. I think they could have been a nicer syntax for things people were already doing. |
| 2020-10-19 20:45:49 | <hyperisco> | crestfallen, but you can also say (:[]) which is shorter and also the same thing |
| 2020-10-19 20:46:40 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-10-19 20:46:42 | <dolio> | Like `@[] :: Proxy# []` or something. |
| 2020-10-19 20:48:10 | <hyperisco> | I think it is fairly clear if you view it from Core, you're just explicitly passing type arguments as is done in Core |
| 2020-10-19 20:48:55 | <dolio> | Yeah, but importing core notions directly into the surface syntax isn't necessarily a consistent design. |
| 2020-10-19 20:49:30 | <hyperisco> | true, but I think proxies themselves are inconsistent |
| 2020-10-19 20:50:28 | hackage | tzdata 0.2.20201016.0 - Time zone database (as files and as a module) https://hackage.haskell.org/package/tzdata-0.2.20201016.0 (MihalyBarasz) |
| 2020-10-19 20:50:33 | × | sfvm quits (~sfvm@37.228.215.148) (Quit: off to the basement, mixing up the medicine) |
| 2020-10-19 20:50:36 | <hyperisco> | well at least with a hardline view that types should be inferred… we're accepting more and more explicit type arguments as time goes on |
| 2020-10-19 20:51:28 | hackage | phonetic-languages-rhythmicity 0.1.1.0 - Allows to estimate the rhythmicity metrices for the text (usually, the Ukrainian poetic one) https://hackage.haskell.org/package/phonetic-languages-rhythmicity-0.1.1.0 (OleksandrZhabenko) |
| 2020-10-19 20:51:35 | <dolio> | You can't do anything about that except remove certain features. |
| 2020-10-19 20:52:00 | → | danso joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 2020-10-19 20:52:01 | × | stree quits (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) (Quit: Caught exception) |
| 2020-10-19 20:52:08 | <hyperisco> | if/when dependent Haskell lands that will fly in the face of everything before |
| 2020-10-19 20:52:17 | → | stree joins (~stree@50-108-72-205.adr01.mskg.mi.frontiernet.net) |
| 2020-10-19 20:54:37 | × | isovector1 quits (~isovector@172.103.216.166) (Remote host closed the connection) |
| 2020-10-19 20:54:49 | <hyperisco> | my personal bet is that McBride wins and the future is just types |
| 2020-10-19 20:55:00 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-10-19 20:56:04 | <maerwald> | I think the future is lax strong structural typing with immutable functional architectures and strict by default semantics |
| 2020-10-19 20:56:46 | <hyperisco> | well I am going out a ways when I say "future", not saying what the immediate next thing is |
| 2020-10-19 20:56:52 | <hyperisco> | what is lax strong structural typing? |
| 2020-10-19 20:57:01 | <maerwald> | I just made that up |
| 2020-10-19 20:57:12 | <maerwald> | But something in between purescript and typescript |
| 2020-10-19 20:58:40 | → | bartemius joins (~bartemius@109-252-19-142.nat.spd-mgts.ru) |
| 2020-10-19 20:59:07 | × | danvet_ quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 2020-10-19 20:59:44 | <crestfallen> | maerwald: whatever you do don't drop it on your foot. |
| 2020-10-19 20:59:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2020-10-19 20:59:46 | <hyperisco> | my prediction is based on the assumption that we will progress from more to less work for the human programmer, and the way to do that is for the programmer to say what they want rather than how to get what they want |
| 2020-10-19 20:59:49 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-19 21:00:01 | × | ggainey quits (~ggainey@185.204.1.185) () |
| 2020-10-19 21:00:30 | <maerwald> | I think more expressive language go backwards to the goal |
All times are in UTC.