Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 836 837 838 839 840 841 842 843 844 845 846 .. 18025
1,802,415 events total
2021-07-07 09:54:26 <sshine> haskl, writing a Forth interpreter in Haskell is a rewarding exercise. :)
2021-07-07 09:54:55 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
2021-07-07 09:54:59 <sshine> haskl, https://github.com/exercism/haskell/tree/main/exercises/practice/forth
2021-07-07 09:55:00 <darklambda> interesting.. i haven't tried forth yet
2021-07-07 09:55:02 oxide joins (~lambda@user/oxide)
2021-07-07 09:55:21 <darklambda> oooh.. there's forth in exercism?
2021-07-07 09:55:50 <haskl> it's also just a wildly different way of thinking about programming. i decided i wanted to do it after haskell really opened me up to the different ways of thinking about code. but i also have to checkout all these cool proof-driven languages people keep talking about in haskell circles
2021-07-07 09:55:54 <sshine> haskl, the example solution doesn't use MonadState, so you could extend it that way, too.
2021-07-07 09:56:07 <haskl> darklambda, oh i definitely have to try that
2021-07-07 09:56:16 <darklambda> so far i've only tried rust, c++, c#(blazor), f#(bolero) for web assembly
2021-07-07 09:56:17 <sshine> darklambda, there's a generic forth interpreter exercise that the Haskell track also specifies, yes.
2021-07-07 09:56:38 <darklambda> let me check the exercism for forth :-)
2021-07-07 09:56:54 <haskl> oh yeah i was thinking about using monadstate for the forth interpreter
2021-07-07 09:57:13 <haskl> then i learned abou tdefining forth words and i had to take a break
2021-07-07 09:57:37 <darklambda> ooh.. the forth exercise is classified as hard
2021-07-07 09:57:52 <darklambda> it's still locked in my list.. :-)
2021-07-07 09:58:21 <sshine> haskl, as in, the interpreter extends its own list of what words are available to use?
2021-07-07 09:58:39 <sshine> darklambda, they're all available in GitHub. ;)
2021-07-07 09:58:50 × ptr_frac7al quits (~longlong@user/ptr-frac7al/x-0038398) (Ping timeout: 272 seconds)
2021-07-07 09:58:57 <haskl> sshine, yep defined between : and ;
2021-07-07 09:59:31 <darklambda> ah https://github.com/exercism/haskell/blob/main/exercises/practice/forth/src/Forth.hs
2021-07-07 10:00:15 <sshine> darklambda, the unlocking mechanism works better if you assume that there are enough mentors to give timely feedback; I don't know how populated the Haskell feedback mentor staff is right now, since I quit the project around when they started language policing.
2021-07-07 10:00:45 <Rembane> sshine: What language policing did they do?
2021-07-07 10:01:07 <sshine> Rembane, censoring Slack messages that used "guys" as a gender-neutral plural.
2021-07-07 10:01:32 <Rembane> sshine: Oh. That kind of languages. I thought they threw out C# or something.
2021-07-07 10:02:06 <darklambda> ah... i just checked my haskell exercism... i noticed that i'm not in mentor mode... lol... i think i used haskel previously to practice problems.. then apply the same solution in the elm track (which i have in mentored mode)
2021-07-07 10:03:17 <darklambda> Rembrane, there's also a C# track...
2021-07-07 10:03:22 <darklambda> :-)
2021-07-07 10:03:58 <sshine> Rembane, hehe :) I don't think they threw out any languages. but they do run Exercism v3 quite differently than v1/v2. it used to be run as a federation, but now it's more centralised, e.g. most of the git history in the haskell repo was wiped due to carelessly moving files, whereas that repo in particular had a style of deeply linking issues and PRs to retain a history of documenting every single choice
2021-07-07 10:04:04 <sshine> point.
2021-07-07 10:04:52 ptr_frac7al joins (~longlong@user/ptr-frac7al/x-0038398)
2021-07-07 10:05:16 <sshine> I preferred to work on it when I had the freedom to practice a high standard of documentation. :-D I learned a lot doing that.
2021-07-07 10:05:27 × derelict quits (~derelict@user/derelict) (Ping timeout: 252 seconds)
2021-07-07 10:05:45 <Rembane> sshine: Got it. I suppose they can run it any way they want but regardless of what style they choose it will attract some people and repel others.
2021-07-07 10:05:49 <darklambda> documentation as in code comments or markdown?
2021-07-07 10:06:55 <sshine> darklambda, as in git commit messages and interlinking with GitHub issues/PRs that carry discussion.
2021-07-07 10:07:04 <darklambda> ah
2021-07-07 10:07:24 <sshine> Rembane, yup, it's just a different style of organisation now.
2021-07-07 10:08:25 × Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Read error: Connection reset by peer)
2021-07-07 10:08:45 kayprish joins (~kayprish@cable-188-2-229-172.dynamic.sbb.rs)
2021-07-07 10:09:15 Vajb joins (~Vajb@n2hz3gq4auh6ltn9l-2.v6.elisa-mobile.fi)
2021-07-07 10:09:22 × ptr_frac7al quits (~longlong@user/ptr-frac7al/x-0038398) (Ping timeout: 240 seconds)
2021-07-07 10:11:00 ptr_frac7al joins (~longlong@user/ptr-frac7al/x-0038398)
2021-07-07 10:12:25 <kamy> if I haven't defined some function f yet, but I have a call to 'f (length xs)' somewhere in my code, is there a way to get GHC to tell me about the inferred type 'f :: Int -> t1' but still let me load the other stuff in the file into ghci? if I don't define f at all, I get the inferred type in the error message but obviously the file won't compile
2021-07-07 10:12:26 <kamy> at all, but if I do 'f n = undefined' and compile with -ddump-tc I just get 'f :: forall p a. p -> a'... wondering if there's a way to sort this out with typed holes or something
2021-07-07 10:13:23 <sshine> kamy, f = _
2021-07-07 10:13:34 <sshine> kamy, https://downloads.haskell.org/~ghc/7.10.1/docs/html/users_guide/typed-holes.html
2021-07-07 10:13:56 <sshine> oops, old compiler
2021-07-07 10:14:15 <sshine> kamy, https://wiki.haskell.org/GHC/Typed_holes
2021-07-07 10:15:49 coldmountain joins (sid484352@id-484352.brockwell.irccloud.com)
2021-07-07 10:15:53 × ptr_frac7al quits (~longlong@user/ptr-frac7al/x-0038398) (Ping timeout: 268 seconds)
2021-07-07 10:18:19 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cdb:cabc:a7c7:75c9)
2021-07-07 10:21:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-07-07 10:22:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-07 10:22:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cdb:cabc:a7c7:75c9) (Ping timeout: 246 seconds)
2021-07-07 10:25:55 peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi)
2021-07-07 10:26:44 jippiedoe joins (~david@2a02-a44c-e14e-1-bdc0-a007-878c-4e7a.fixed6.kpn.net)
2021-07-07 10:27:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-07-07 10:28:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-07 10:29:33 <kamy> sshine, thanks for the link :) unfortunately the info about taking an Int still seems to be lost somewhere along the way: f = _ gives an inferred type f :: t, and f n = _ gives an inferred type f :: p -> t
2021-07-07 10:32:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-07-07 10:33:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-07 10:34:54 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2021-07-07 10:38:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-07-07 10:39:52 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-07 10:40:02 juhp joins (~juhp@128.106.188.66)
2021-07-07 10:45:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-07-07 10:45:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-07 10:48:36 yauhsien joins (~yauhsien@61-231-39-135.dynamic-ip.hinet.net)
2021-07-07 10:49:44 derelict joins (~derelict@user/derelict)
2021-07-07 10:52:32 × Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 258 seconds)
2021-07-07 10:53:30 × yauhsien quits (~yauhsien@61-231-39-135.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
2021-07-07 10:55:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-07-07 10:56:49 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-07 11:02:27 lavaman joins (~lavaman@98.38.249.169)
2021-07-07 11:05:01 × derelict quits (~derelict@user/derelict) (Ping timeout: 246 seconds)
2021-07-07 11:05:38 <tomsmeding> kamy: presumably the other way round?
2021-07-07 11:05:53 <tomsmeding> oh wait, yes the inferred type of f would be that
2021-07-07 11:06:34 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
2021-07-07 11:06:35 <tomsmeding> I think GHC typechecks global definitions independently, so the usage of f with an Int argument doesn't propagate to the type checking of te global f
2021-07-07 11:06:50 AlexNoo_ joins (~AlexNoo@178.34.162.146)
2021-07-07 11:07:01 <tomsmeding> hm, it does seem to
2021-07-07 11:08:41 <kamy> ah, that makes sense
2021-07-07 11:08:41 × Vajb quits (~Vajb@n2hz3gq4auh6ltn9l-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2021-07-07 11:08:50 <tomsmeding> kamy: perhaps passing -fdefer-type-errors to GHC can be some substitute for what you want?
2021-07-07 11:09:16 yauhsien joins (~yauhsien@61-231-39-135.dynamic-ip.hinet.net)
2021-07-07 11:10:00 <tomsmeding> the information seems to propagate "late"; GHC does notice if there's a type error, but if the definition of 'f' is generic enough, at instantiation of that right-hand side of 'f' the specific information isn't there yet
2021-07-07 11:10:10 × AlexZenon quits (~alzenon@178.34.162.171) (Ping timeout: 258 seconds)
2021-07-07 11:10:10 × Alex_test quits (~al_test@178.34.162.171) (Ping timeout: 258 seconds)
2021-07-07 11:10:46 × AlexNoo quits (~AlexNoo@178.34.162.171) (Ping timeout: 268 seconds)
2021-07-07 11:11:15 Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi)
2021-07-07 11:15:11 Alex_test joins (~al_test@178.34.162.146)
2021-07-07 11:15:30 AlexZenon joins (~alzenon@178.34.162.146)
2021-07-07 11:16:10 × jippiedoe quits (~david@2a02-a44c-e14e-1-bdc0-a007-878c-4e7a.fixed6.kpn.net) (Ping timeout: 240 seconds)
2021-07-07 11:16:37 <kamy> tomsmeding: looks like -fdefer-type-errors does what I wanted, thank you!
2021-07-07 11:21:08 × azeem quits (~azeem@176.201.33.66) (Ping timeout: 252 seconds)
2021-07-07 11:21:40 azeem joins (~azeem@176.201.33.66)
2021-07-07 11:21:58 ahdyt joins (~ahdyt@103.105.35.90)
2021-07-07 11:24:32 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2021-07-07 11:26:39 × kamy quits (~kamy@83-245-253-38-nat-p.elisa-mobile.fi) (Quit: Client closed)

All times are in UTC.