magicman 2017-02-21 06:47:28
Is there an existing library for scheduling and descheduling IO actions at a specific time?
magicman 2017-02-21 06:48:49
hcron sounded promising, but I can only see a way to create a schedule, but not actually run it.
phadej 2017-02-21 06:52:19
magicman: i'm not aware of anything wrapped in standalone lib, if you find one please tell me too
phadej 2017-02-21 06:54:03
magicman: there is https://github.com/haskell/hackage-server/blob/master/Distribution/Server/Framework/Cron.hs inside hackage-server
k_p__ 2017-02-21 06:54:47
Hey everyone. I am trying to learn Haskell. I have a lot fo experience with FP (Scala, Clojure, Elixir) what is the best way for me to learn. I've found this https://github.com/bitemyapp/learnhaskell and have also looked at Real World Haskell && Learn you a haskell.
magicman 2017-02-21 06:55:15
I mean, I could hack up something myself with a PQueue, threadDelay, forkIO, and more MVars than is good for a person, but I feel that it'd either be clunky, or fall apart at the earliest thrown exception.
Tuplanolla 2017-02-21 06:55:33
Learn You a Haskell might be a good tour for you, k_p__.
Tuplanolla 2017-02-21 06:55:53
You can probably read it in an afternoon or two.
k_p__ 2017-02-21 06:56:38
Tuplanolla: Thanks! However I always tend to read the books and never really commit to writing code. That kind of why I like the CIS194 course. But there really isn't a way to verify that I am writing decent code.
phadej 2017-02-21 06:56:59
magicman: well, you can start with the Cron.hs from hackage-server than, it's done that hacking for you :)
Tuplanolla 2017-02-21 06:57:34
You can post your creations here for review, k_p__.
magicman 2017-02-21 06:58:03
phadej: Yeah, it looks like a usable basis. Not too many heavy imports, that's always good. Thanks!
kadoban 2017-02-21 06:58:04
k_p__: I like http://haskellbook.com/ a lot. Or if you don't do that, the cis194 thing is fine. I'd recommend against trying to learn just from LYAH by itself.
Tuplanolla 2017-02-21 06:59:40
I think those are needlessly basic and exercise-heavy for someone with "a lot of experience", kadoban.
Wizek 2017-02-21 07:00:20
Hey! I think these two datatypes are cool! `Printed` and `CShow`: https://gist.github.com/Wizek/d5807fdd3b2f67622dd9b5a0b6187b40 Anyone agrees/disagrees?
kadoban 2017-02-21 07:01:01
I don't, unless their "lot of experience" is actually in haskell, which wasn't in the list, they'll still have lots to learn. And exercises will help keep it moving smoothly along.
srhb 2017-02-21 07:02:09
k_p__: Don't worry about decent, that will be much easier to figure out with the basics solidly out of the way :)
k_p__ 2017-02-21 07:04:22
too cool for upper bounds?
k_p__ 2017-02-21 07:04:48
on like the version?
hexagoxel 2017-02-21 07:05:16
i mean (s)he published a package with no appropriate upper bounds on one or more of its dependencies.
k_p__ 2017-02-21 07:05:47
ah thats what I thought it meant. Maybe they just always wanted the latest version for soem reason though.
k_p__ 2017-02-21 07:11:39
so I haven't really looked much into how Haskell does its package system. Is it more like a Node.js system, Java with jars, or c with lib(.a) files?
phadej 2017-02-21 07:12:23
k_p__: it's more of Clojure jars with the source code
nil_ 2017-02-21 07:12:31
Tuplanolla: how do you read LYAH "in an afternoon"?
phadej 2017-02-21 07:12:37
but not Node.js (at it allows multiple versions of same package)
Tuplanolla 2017-02-21 07:13:02
By knowing most of the concepts already, nil_?
srhb 2017-02-21 07:13:09
k_p__: I don't think there's any binary distribution except via system package managers or Nix.
Tuplanolla 2017-02-21 07:13:47
It's just syntax and type system specifics that are different wrt other fp languages.
nil_ 2017-02-21 07:13:50
Tuplanolla: oh, that certainly helps. Still, it's not /that/ short. Or maybe I'm just a slow reader.
k_p__ 2017-02-21 07:14:16
Interesting, and the libaries are kept locally in the same folder as the project or are they kept in a central location somewhere?
srhb 2017-02-21 07:14:26
k_p__: Depends what solution you use.
k_p__ 2017-02-21 07:14:45
srhb: Lets assume stack, since thats what I heard people use?
srhb 2017-02-21 07:14:53
k_p__: Both cabal and stack support project local sandboxes with sharing.
srhb 2017-02-21 07:15:08
cabal-install, I should say
k_p__ 2017-02-21 07:15:32
Interesting, so kinda like python's virtualenv but not as annoying to use I hope.
srhb 2017-02-21 07:15:56
A lot of people seem to like it. :)
srhb 2017-02-21 07:16:01
Stack is especially popular these days.
tfc[m] 2017-02-21 07:16:30
stack is great
k_p__ 2017-02-21 07:16:33
Typical language package managers building on top of another right?
srhb 2017-02-21 07:16:59
k_p__: I think the rivalry between cabal-install and stack has been both a boon and a curse. I use neither, so who am I to say...
srhb 2017-02-21 07:17:12
(Well, I do use cabal-install, but not that functionality)
phadej 2017-02-21 07:17:52
k_p__: the package manager has a bit of wrong sound in it, they are build tools
phadej 2017-02-21 07:18:02
which happen to know how to download dependencies
phadej 2017-02-21 07:18:08
but you cannot really "manage" anything
maerwald 2017-02-21 07:18:09
they are both package managers
maerwald 2017-02-21 07:18:15
poor ones though
k_p__ 2017-02-21 07:18:49
SBT in the Scala world is a build tool too but still does package managment. Even though its so slow.
phadej 2017-02-21 07:19:33
well, I guess it's up to definiton
phadej 2017-02-21 07:19:44
dpkg is a package manager, sbt is a build tool
maerwald 2017-02-21 07:20:04
sbt is a package manager, it installs packages and doesn't just build your project
maerwald 2017-02-21 07:20:10
make is a build tool
k_p__ 2017-02-21 07:20:30
I agree with maerwald's sentiment.
phadej 2017-02-21 07:21:01
maerwald: well, sbt downloads the artifacts, thru maven, but maven calls itself "build manager" :)
k_p__ 2017-02-21 07:21:22
Sounds like a bunch of semantics
phadej 2017-02-21 07:23:08
well, stack doesn't have stack uninstall or stack list (of what installed)
phadej 2017-02-21 07:23:10
etc.
phadej 2017-02-21 07:23:17
e.g. if I say stack install happy
maerwald 2017-02-21 07:23:31
that's why they are both poor package managers
phadej 2017-02-21 07:23:47
... and I rather not call them such to begin with :)
phadej 2017-02-21 07:24:42
to me they are build tools (which do a bit more too)
maerwald 2017-02-21 07:25:54
then you have no word for build tools that cannot install packages
phadej 2017-02-21 07:27:09
even make can if you write proper build-targets ;)
maerwald 2017-02-21 07:27:31
no, make has no knowledge of packages
maerwald 2017-02-21 07:28:10
make is also a language, yes
maerwald 2017-02-21 07:28:18
but you won't call C a build tool, would you?
phadej 2017-02-21 07:29:58
maerwald: if the "package managment" is up to download source zips from the internet, it's not even a lot of coding in the Make-world
maerwald 2017-02-21 07:32:41
then you've created a make-based package manager
maerwald 2017-02-21 07:34:23
I don't understand your confusion
maerwald 2017-02-21 07:35:24
FreeBSD basically did that
phadej 2017-02-21 07:40:32
there i'd say haskell /libraries/, I used xmonad from debian testing and was quite happy with it
phadej 2017-02-21 07:40:45
and completely different setup for the development work
maerwald 2017-02-21 07:40:50
that applies only to binary distros then
phadej 2017-02-21 07:41:01
(it's kind of nice they don't interfere)
maerwald 2017-02-21 07:41:14
on source distros you have to install (just like in cabal/stack) all libraries to get xmonad
hexagoxel 2017-02-21 07:41:23
bennofs: ghc-pkg is a cli around a package db, which is just a specific db, isn't it?