Search Haskell Channel Logs

Thursday, February 2, 2017

#haskell channel featuring AWizzArd, kadoban, ski, sm, Clarinerd, infandum,

ski 2017-02-02 06:45:17
sssilver : a language extension. basically a form of "dynamic scope", if you're familiar with that (e.g. default in Emacs Lisp. usually present (though not default) in other Lisps (Scheme,Common Lisp)). exceptions are treated in the same dynamic way, as are other dynamic context setup and teardown stuff
Cale 2017-02-02 06:45:33
and, well, actually, you may want to define multiplication by a constant and multiplication by x before you try to define multiplication generally
Cale 2017-02-02 06:46:00
(Just because those are both easy and will help you to define the full polynomial multiplication)
Cale 2017-02-02 06:47:22
sssilver: It might not feel elegant at first, but when you go to test your program, or when you're reading the code later, it will be helpful that it's obvious which things depend on that parameter.
Clarinerd 2017-02-02 06:47:52
Cale:I figured as much. And I know that way back in discrete math we came up with formulas for something similar, so worst case I can use that as a springboard, in addition to what you mentioned
Cale 2017-02-02 06:53:22
sssilver: Basically, in my experience, I have never regretted just passing stuff as a parameter. It can become a little annoying if you end up with a function with a dozen parameters or something, but you just look at where those parameters are going and package them up into a smaller number of records. You can use ReaderT if it eventually becomes apparent that nearly everything needs the same parameter, and you're already using a
Cale 2017-02-02 06:53:22
custom monad for some other reason, so the additional transformer isn't a big deal -- but I would advise against doing that straight away.
infandum 2017-02-02 06:54:52
How do I remove old stackage repositories? Like lts-7.8 or whatnot
infandum 2017-02-02 06:55:09
from my computer, all of the packages build with those
infandum 2017-02-02 06:55:22
and those ghcs (I can always download them some other time)
sm 2017-02-02 06:59:48
infandum: you can manually delete all the lts-X
sm 2017-02-02 07:00:17
unfortunately you can't just remove a few and expect stack to keep working
infandum 2017-02-02 07:00:19
sm: Aren't they scattered about in .stack?
sm 2017-02-02 07:01:23
they're under there somewhere, yes, but easy enough to find with du -sh *
sm 2017-02-02 07:02:53
what I meant is that if you're on lts-7 and don't care about older lts, you can safely remove lts-[56]*, but you should keep all the lts-7* (or delete them all and let stack recreate just one)
sm 2017-02-02 07:03:41
likewise if you don't care about nightlies, you could delete all of those without harming your lts
sm 2017-02-02 07:04:41
there's on open issue for a cleanup feature, somewhere
Clarinerd 2017-02-02 07:05:18
Thank you everyone for your help.
infandum 2017-02-02 07:07:30
because right now it's taking up 13 gigs
sm 2017-02-02 07:08:12
sure.. the big stuff is under ~/.stack/snapshots/ARCH/
kadoban 2017-02-02 07:08:28
infandum: If you're okay with a little rebuilding, you can just nuke it all. Just save your configs, I think they're ~/.stack/config.yaml and ~/.stack/globla-project/stack.yaml
infandum 2017-02-02 07:08:56
I mean I have it all the way back to lts-3
infandum 2017-02-02 07:08:58
haha
infandum 2017-02-02 07:09:13
nightlies from 2015
infandum 2017-02-02 07:09:15
phew
sm 2017-02-02 07:09:22
12G here.. time to clear some nightlies
infandum 2017-02-02 07:10:40
it grows on ya
sm 2017-02-02 07:13:33
doh.. busted my db
sm 2017-02-02 07:13:40
drat you infandum :)
infandum 2017-02-02 07:13:44
EXACTLY! That's what worried me
infandum 2017-02-02 07:13:44
haha
infandum 2017-02-02 07:13:49
time for a restart
sm 2017-02-02 07:14:23
I removed all nightlies and lts-[2-5]
sm 2017-02-02 07:14:38
I read that lts versions are independent. Maybe not ?
infandum 2017-02-02 07:16:09
I thought they were
infandum 2017-02-02 07:16:14
unless they share the same ghc?
sm 2017-02-02 07:16:34
maybe that's it
kadoban 2017-02-02 07:17:10
It's confusing and difficult to remove only some without breaking existing packages. You're better off either just leaving them all or nuking the whole thing.
sm 2017-02-02 07:33:17
sigh
fragamus 2017-02-02 07:41:49
does frege offer hindley-milner
AWizzArd 2017-02-02 07:43:03
fragamus: hi
AWizzArd 2017-02-02 07:43:09
I think yes.
fragamus 2017-02-02 07:43:19
bueno
fragamus 2017-02-02 07:43:23
thank you
AWizzArd 2017-02-02 07:43:25
It should be very similar to Haskell 2010.
AWizzArd 2017-02-02 07:43:44
I also just discovered it recently.
fragamus 2017-02-02 07:43:58
tail recursion optimization in frege?
AWizzArd 2017-02-02 07:44:16
I don't know, but I think yes.
AWizzArd 2017-02-02 07:44:23
I did not really try it out yet.