Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 580 581 582 583 584 585 586 587 588 589 590 .. 5022
502,152 events total
2020-10-11 23:36:18 nbloomf joins (~nbloomf@2600:1700:83e0:1f40:b5b9:ec51:2bb2:42cb)
2020-10-11 23:38:18 × snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-11 23:38:59 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2020-10-11 23:40:19 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-11 23:43:45 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds)
2020-10-11 23:43:46 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-11 23:43:46 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-11 23:43:46 GyroW_ joins (~GyroW@unaffiliated/gyrow)
2020-10-11 23:43:51 conal joins (~conal@64.71.133.70)
2020-10-11 23:44:21 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
2020-10-11 23:46:10 × falafel quits (~falafel@2605:e000:1527:d491:1ccf:5c8d:7928:e9cc) (Remote host closed the connection)
2020-10-11 23:46:24 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
2020-10-11 23:46:29 falafel joins (~falafel@2605:e000:1527:d491:1ccf:5c8d:7928:e9cc)
2020-10-11 23:49:50 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
2020-10-11 23:51:57 hackage churros 0.1.0.1 - Channel/Arrow based streaming computation library. https://hackage.haskell.org/package/churros-0.1.0.1 (LyndonMaydwell)
2020-10-11 23:56:07 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-11 23:56:17 GyroW joins (~GyroW@d54c03e98.access.telenet.be)
2020-10-11 23:56:17 × GyroW quits (~GyroW@d54c03e98.access.telenet.be) (Changing host)
2020-10-11 23:56:17 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-11 23:56:47 <proofofme> cabal install cabal-install, yeah? I did this, checked the version and it's the same one still hmmm
2020-10-11 23:57:05 <koz_> proofofme: What platform are you on?
2020-10-11 23:57:08 <koz_> (as in, which OS?)
2020-10-11 23:57:12 <proofofme> MacOS
2020-10-11 23:57:16 <koz_> Use ghcup.
2020-10-11 23:57:24 <koz_> To get a working toolchain.
2020-10-11 23:57:26 <koz_> Always and forever.
2020-10-11 23:57:49 <koz_> Since that'll not only do this for you, with sensible versions, it'll also show you what you have and when it becomes old.
2020-10-11 23:57:58 polyrain joins (~polyrain@2001:8003:e501:6901:1d4a:4b8a:8ea1:adc0)
2020-10-11 23:57:58 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds)
2020-10-12 00:00:01 × openstackstatus1 quits (~openstack@185.163.110.116) ()
2020-10-12 00:00:10 × atk quits (~Arch-TK@ircpuzzles/staff/Arch-TK) (Quit: Well this is unexpected.)
2020-10-12 00:00:11 × falafel quits (~falafel@2605:e000:1527:d491:1ccf:5c8d:7928:e9cc) (Ping timeout: 244 seconds)
2020-10-12 00:00:34 atk joins (~Arch-TK@ircpuzzles/staff/Arch-TK)
2020-10-12 00:00:56 zoom8484 joins (44beb1c9@068-190-177-201.res.spectrum.com)
2020-10-12 00:01:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-10-12 00:02:02 <zoom8484> basic question regarding how the list type is able to construct a list value using syntax like [5]
2020-10-12 00:02:11 <zoom8484> the list type is defined as: data [] a = [] | a : [a]
2020-10-12 00:02:28 <Axman6> it's syntax sugar
2020-10-12 00:02:31 <zoom8484> I've read that [5] is syntactic sugar for 5:[]
2020-10-12 00:02:38 <koz_> Yeah, basically this.
2020-10-12 00:02:53 <zoom8484> but is that sugar built into the compiler or is it derived the from list data definition
2020-10-12 00:03:03 <monochrom> built into the compiler
2020-10-12 00:03:04 <Axman6> it;s defined as part of the language
2020-10-12 00:03:07 falafel joins (~falafel@2605:e000:1527:d491:1ccf:5c8d:7928:e9cc)
2020-10-12 00:03:18 <Axman6> so a haskell compiler has to support it
2020-10-12 00:03:29 <zoom8484> thanks. is it specific to only [], or is it available for my own types as well, of course using different symbols
2020-10-12 00:03:45 <Axman6> sort of
2020-10-12 00:03:46 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-12 00:03:59 <monochrom> Unavailable for your own types.
2020-10-12 00:04:17 <Axman6> we have the OVerloadedLists extensions which lets you construct things using list syntax
2020-10-12 00:04:33 <zoom8484> hmm, so even though the data type is really a library-defined type, there is hard-coded logic in the compiler to handle this specific case of it
2020-10-12 00:04:52 <Axman6> so you can write [('a',True),('b',False)] :: Map Char Bool
2020-10-12 00:05:00 <Axman6> yes
2020-10-12 00:05:12 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-12 00:05:24 <zoom8484> ok, thanks. just wanted to make sure I wasn't missing some magic in the data declaration for the list type
2020-10-12 00:05:31 <monochrom> Actually "data [] a = [] | a : [a]" cannot be library-defined either.
2020-10-12 00:05:51 <zoom8484> it's defined in GHC.Types. Is that considered "built-in"
2020-10-12 00:05:56 <Axman6> there is a lot of magic magic when it comes to making lists feel familliar
2020-10-12 00:06:33 <Axman6> s/magic magic/magic/
2020-10-12 00:07:26 <monochrom> I don't know what GHC.Types does, but you go through the Haskell grammar and there is no way "data [] a = [] | a : [a]" is correct syntax.
2020-10-12 00:07:38 <zoom8484> i got that via :i [] in ghci
2020-10-12 00:07:42 <monochrom> s/correct/legal/
2020-10-12 00:08:32 <Axman6> zoom8484: youy're right to be confused - all of this is only legal because the standard says it is, and it's inconsistent with every other data type definition
2020-10-12 00:08:45 <proofofme> `curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh` <= I did this. `cabal --version` says the same thing still :(
2020-10-12 00:09:02 <Axman6> you can't make your own list by saying data <> a = <> | a :+ <a> for example
2020-10-12 00:09:16 <Axman6> proofofme: how did you install cabal initially?
2020-10-12 00:09:23 <monochrom> It's easy to check. "data Maybe a = Nothing | Just a", this is library-defined but even if the library didn't have it, you could have entered this yourself. In fact you can enter it right into ghci and it will be gladly accepted.
2020-10-12 00:09:28 <ski> non-standard data constructor name `[]', non-standard type constructor name `[]', syntactic sugar for lists of definite length `[a,b,c,...y,z]', syntactic sugar for list types `[T]', list comprehensions `[E | x <- L,let {...},G]', `OverloadedLists' extension
2020-10-12 00:09:34 chenshen joins (~chenshen@2620:10d:c090:400::5:228b)
2020-10-12 00:09:34 <proofofme> I think homebrew maybe? idr
2020-10-12 00:09:47 <monochrom> Now try "data [] a = [] | a : [a]", that will be a syntax error left right and centre.
2020-10-12 00:09:54 <Axman6> proofofme: well start by uninstalling it from homebrew
2020-10-12 00:10:20 <Axman6> monochrom: I love the inconsistency of using both [] a and [a]
2020-10-12 00:10:36 <monochrom> "[a]" is very intuitive.
2020-10-12 00:10:44 <ski> "intuitive"
2020-10-12 00:10:52 <monochrom> It's why I doubt everything intuitive. 90% probably of being wrong.
2020-10-12 00:10:52 <koz_> proofofme: You have to then use ghcup to install cabal.
2020-10-12 00:11:12 <Axman6> exept when people start writing f [a] = ... expecting a to represent all the a's (or something)
2020-10-12 00:11:15 <monochrom> If it's intuitive it's BS. Change my mind.
2020-10-12 00:11:27 hackage churros 0.1.0.2 - Channel/Arrow based streaming computation library. https://hackage.haskell.org/package/churros-0.1.0.2 (LyndonMaydwell)
2020-10-12 00:11:30 <ski> Axman6 : i wonder why people do that ..
2020-10-12 00:11:33 × chenshen quits (~chenshen@2620:10d:c090:400::5:228b) (Client Quit)
2020-10-12 00:11:38 <Axman6> yeah I see it a lot
2020-10-12 00:11:42 <monochrom> For example every mixfix syntax!
2020-10-12 00:11:52 <MarcelineVQ> at least it's not agda, where [a] is an identifier, like xs, and [ a ] is a list of a single a, like [x]
2020-10-12 00:11:55 <ski> i guess people want to represent the type (or some aspect of it), in the identifier name
2020-10-12 00:12:01 <ski> BASIC,Perl,..
2020-10-12 00:12:12 <Axman6> when I was teaching firsty years it qwas very common for students to get stuck in "I'm using a list, therefore I MUST use square brackets"
2020-10-12 00:12:19 <ski> (people even say `strlen()' when they mean `strlen' ..)
2020-10-12 00:12:45 <ski> Axman6 : the faster they get out of that, the better, imho
2020-10-12 00:13:02 <Axman6> indeed
2020-10-12 00:13:05 <proofofme> https://gist.github.com/begriffs/6408415 would something like this work, and then rerun the ghcup command?
2020-10-12 00:13:19 <ski> iirc, i saw some suggestion for allowing some syntax with square backets, as an alternative to `x : xs' .. not really a fan of that idea
2020-10-12 00:13:34 <Axman6> I think we might have changed the course to use data List a = Nil | Cons a (List a) at least for a few weeks at the beginning
2020-10-12 00:13:39 <ski> (Prolog,Erlang, and (iirc) Clean, does that)
2020-10-12 00:14:25 <Axman6> proofofme: if you haven't done anything, that will probably be a decent start, but if you used homebrew you will also need to uninstall ghc and cabal from there too
2020-10-12 00:14:28 <ski> MarcelineVQ : hah, yea ..
2020-10-12 00:14:42 <Axman6> ski: yeah I always found that gross
2020-10-12 00:14:53 <ski> MarcelineVQ : sometimes i name proofs of propositions, that way, in Agda, by removing the spaces
2020-10-12 00:14:58 <Axman6> but syntax is hard. all we need is trees and opaque hashes

All times are in UTC.