Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 969 970 971 972 973 974 975 976 977 978 979 .. 18029
1,802,826 events total
2021-07-16 02:29:20 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 258 seconds)
2021-07-16 02:29:21 niHiggim joins (~niHiggim@2600:1700:3d41:8600::27)
2021-07-16 02:30:24 <elf_fortrez> i want to learn the unit circle first so that i try to do the spiral by myself
2021-07-16 02:30:42 <Axman6> look at the Diagrams package
2021-07-16 02:30:50 <oso> seems reasonable
2021-07-16 02:31:00 <elf_fortrez> or Geometry pachage
2021-07-16 02:31:59 <elf_fortrez> I guess a lazy language attracts lazy people
2021-07-16 02:32:22 <Axman6> All developers should be lazy, why would you want to do more work than you have to?
2021-07-16 02:32:27 <elf_fortrez> quoting Larry Perl
2021-07-16 02:32:32 <oso> i both identify with that and feel like i've put more work into learning haskell than anything else
2021-07-16 02:33:01 <elf_fortrez> I guess I am too lazy right now to use a search engine
2021-07-16 02:33:12 <elf_fortrez> i would like to see more code
2021-07-16 02:33:19 <elf_fortrez> and learn from context
2021-07-16 02:34:36 <elf_fortrez> i should set the example
2021-07-16 02:34:40 <oso> i'd send you the code i'm working on but 1) it has no comments and 2) it has nothing to do with diagrams
2021-07-16 02:34:47 retroid_ joins (~retro@97e2ba5d.skybroadband.com)
2021-07-16 02:37:10 <elf_fortrez> why comment when the code is self explanatory
2021-07-16 02:37:46 <davean> To misslead the gullible
2021-07-16 02:38:02 <oso> because when you write code only you and god know what it does, and after some time away from it only god does
2021-07-16 02:38:04 <davean> It catches the people who don't read the code :)
2021-07-16 02:49:39 <dsal> comments are where you put excuses for not writing better code.
2021-07-16 02:50:03 <dsal> (which sometimes is hard enough that it's easier to just write a comment describing why you didn't do something more obvious)
2021-07-16 02:52:33 <elf_fortrez> i forgot maintaining code is the hardest pard
2021-07-16 02:53:01 <dsal> Sometimes I write functions just to give clearer names to concepts I intend to use. e.g., I wanted `justM :: Monad m => (a -> m ()) -> Maybe a -> m ()` because I was doing something like that a few places and that seemed easier. Turns out, the implementation is just `justM = traverse_` but the signature is the important part. If I just wrote `traverse_` everywhere, it might be less clear.
2021-07-16 02:53:51 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 255 seconds)
2021-07-16 02:54:05 <elf_fortrez> thanks
2021-07-16 03:00:01 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-16 03:02:23 × chexum quits (~chexum@gateway/tor-sasl/chexum) (Ping timeout: 244 seconds)
2021-07-16 03:02:57 gzj joins (~GZJ0X@199.193.127.138.16clouds.com)
2021-07-16 03:06:55 chexum joins (~chexum@gateway/tor-sasl/chexum)
2021-07-16 03:07:55 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
2021-07-16 03:08:26 × Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 255 seconds)
2021-07-16 03:09:20 × pesada quits (~agua@2804:18:43:3e21:1:0:20af:708a) (Ping timeout: 255 seconds)
2021-07-16 03:11:35 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 255 seconds)
2021-07-16 03:12:22 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-07-16 03:16:00 Erutuon joins (~Erutuon@user/erutuon)
2021-07-16 03:16:01 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-16 03:17:12 agua joins (~agua@2804:18:44:4e2:1:0:22a7:ebf6)
2021-07-16 03:17:42 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds)
2021-07-16 03:18:23 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-07-16 03:18:28 × oxide quits (~lambda@user/oxide) (Ping timeout: 272 seconds)
2021-07-16 03:20:24 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 255 seconds)
2021-07-16 03:24:49 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
2021-07-16 03:25:10 × Guest21 quits (~Guest21@50.47.115.102) (Quit: Client closed)
2021-07-16 03:25:37 chexum_ joins (~chexum@gateway/tor-sasl/chexum)
2021-07-16 03:28:44 × chexum quits (~chexum@gateway/tor-sasl/chexum) (Ping timeout: 244 seconds)
2021-07-16 03:35:47 × MidAutumnMoon9 quits (~MidAutumn@user/midautumnmoon) (Quit: Leaving for a break - theLounge)
2021-07-16 03:36:23 MidAutumnMoon9 joins (~MidAutumn@user/midautumnmoon)
2021-07-16 03:40:29 × alx741 quits (~alx741@181.196.68.89) (Quit: alx741)
2021-07-16 03:44:08 andrews joins (~andrews@user/andrews)
2021-07-16 03:44:20 <andrews> can someone explain what this means
2021-07-16 03:44:20 <andrews> ageOn :: Planet -> Float -> Float
2021-07-16 03:44:41 <dibblego> ageOn has the type, given a Planet, returns a function of the type Float to Float
2021-07-16 03:45:24 <andrews> Has the type?
2021-07-16 03:45:31 <dibblego> yes, :: means "has the type"
2021-07-16 03:45:47 <andrews> oh
2021-07-16 03:46:38 <andrews> any idea what this means
2021-07-16 03:46:39 <andrews> module SpaceAge (Planet(..), ageOn) where
2021-07-16 03:47:03 <dibblego> module SpaceAge, exports Planet and its constructors, ageOn, and the module definition follows
2021-07-16 03:47:20 <andrews> oh
2021-07-16 03:50:19 <dsal> andrews: Do you have a larger thing you're trying to do? It's going to be hard to learn Haskell by asking the meaning of small bits of syntax at a time. :)
2021-07-16 03:50:42 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 252 seconds)
2021-07-16 03:51:54 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-07-16 03:52:16 <andrews> https://paste.tomsmeding.com/scvB8sC2
2021-07-16 03:52:27 <andrews> I still don't understand the function signature
2021-07-16 03:52:47 <andrews> ageOn :: Planet -> Float -> Float
2021-07-16 03:52:55 <dsal> Do you know any other languages?
2021-07-16 03:53:00 <andrews> yes
2021-07-16 03:54:04 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-07-16 03:54:06 allbery_b joins (~geekosaur@xmonad/geekosaur)
2021-07-16 03:59:06 <Axman6> andrews: x :: y means "x has type y", in C it would be somilar to say y x; so foo :: Int says hat foo is an Int (equifalent to int foo; in C, java etc). when the type l;ooks like a -> b, that means it is a function which takes an a and returns a b. in the case of a -> b -> c, that is the same as a -> (b -> c), a.k.a, a function which takes an a and returns a function,, which takes a b and returns a c
2021-07-16 04:00:03 <Axman6> gosh, I should learn to type
2021-07-16 04:00:19 <dsal> Especially if you expect to write Haskell.
2021-07-16 04:00:48 <Axman6> nah, GHC's got my back there. English is the language that lets me down
2021-07-16 04:01:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-16 04:01:47 <andrews> No instance for (Eq Planet) arising from a use of `=='
2021-07-16 04:02:30 <Axman6> that means there isn't an instance of the Eq class for the type Planet. this is usually fixed by adding `deriving (Eq)` to the definition of Planet
2021-07-16 04:02:40 <dsal> Yes, Planet has no Eq instance, so you won't be able to use == on it. You probably won't need to, though.
2021-07-16 04:04:02 <Axman6> and in haskell, class is more like an interface or protocol in other languages. it has nothing to do with the OOP ideas of a class
2021-07-16 04:04:39 <Axman6> @src Eq
2021-07-16 04:04:40 <lambdabot> class Eq a where
2021-07-16 04:04:40 <lambdabot> (==), (/=) :: a -> a -> Bool
2021-07-16 04:05:35 <andrews> can I check if a function argument is a particular instance of a custom data set?
2021-07-16 04:06:00 <andrews> like data Planet = Mercury | Venus etc
2021-07-16 04:06:02 <Axman6> I don't understand what that question means
2021-07-16 04:06:13 <dsal> > let f True = "yes"; f False = "no" in f True
2021-07-16 04:06:14 <lambdabot> "yes"
2021-07-16 04:07:22 <dsal> You don't need Eq for that, but you can just replace the variable capture with the specific constructor in the function definition, then make a new one for the next Planet. e.g., what I did above.
2021-07-16 04:07:39 <dsal> (I use ; here, but you'd use a newline in your code)
2021-07-16 04:08:26 <Axman6> andrews: are you following a haskell tutorial? you seem to be missing a lot of the fundamentals of the language, and that mioght be a good place to start
2021-07-16 04:09:34 <dibblego> looks like exorcism.io
2021-07-16 04:12:41 <dmj`> this planet has no equal
2021-07-16 04:13:20 <Axman6> All planets are unique
2021-07-16 04:16:04 <dmj`> nix-shell -p exercism --run 'exercism download --exercise=space-age --track=haskell'
2021-07-16 04:16:08 <dmj`> found the question
2021-07-16 04:16:58 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-07-16 04:17:36 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-07-16 04:22:24 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
2021-07-16 04:24:37 <andrews> I mean /j #haskell-beginners
2021-07-16 04:24:42 <andrews> j #haskell-beginners

All times are in UTC.