shapr 2017-02-08 05:45:18
orion: https://hackage.haskell.org/package/hsemail ?
tlahtoani 2017-02-08 05:45:24
Would learn you a Haskell for great good be a good starting point for a beginner?
shapr 2017-02-08 05:45:42
tlahtoani: I'm a huge fan of haskellbook.com, but it's also $60
shapr 2017-02-08 05:46:03
learn you a haskell is one of the good free options, but some of it isn't up to date anymore
tlahtoani 2017-02-08 05:46:38
Is it a print book?
Profpatsch 2017-02-08 05:46:42
I'm sure edwardk has written that class somewhere already.
tlahtoani 2017-02-08 05:47:00
I kinda need a print book
jaspervdj 2017-02-08 05:49:07
What's a good regex library to use these days? I haven't looked at the space in a while.
jaspervdj 2017-02-08 05:49:29
I'd prefer something which doesn't need C libraries, and UTF-8 support is a must.
tlahtoani 2017-02-08 05:49:51
Pcre is best
Jaxan 2017-02-08 05:50:22
I want to define generic instances for one of my type classes. I a bit puzzled at the f :.: g (composition) type. For what kind of data types is the composition used?
shapr 2017-02-08 05:50:38
tlahtoani: I know graham hutton's Programming in Haskell was recently updated to the second edition, but I've only read the 1st edition.
Jaxan 2017-02-08 05:51:06
I experimented with some algebraic data types, but they only had :*: and :+:
glguy 2017-02-08 05:51:27
Jaxan: It's used when implementing the Rep1 type family from GHC.Generics for datatypes that use composition
orion 2017-02-08 05:51:28
shapr: Thank you.
glguy 2017-02-08 05:51:50
Jaxan: Rep1 is paired up with Generic1. You won't see :.: used with normal Generic
shapr 2017-02-08 05:52:27
Speaking of which, I keep thinking Turtle's grep command accepts regexes, but I think it wants parsec-style parsers.
Jaxan 2017-02-08 05:52:52
glguy: ah, I see. The [Class]1 things are a bit above my head still... So I'm ignoring them.
lpaste_ 2017-02-08 05:53:08
glguy pasted "generic1 example for Jaxan" at http://lpaste.net/352231
jaspervdj 2017-02-08 05:53:09
tlahtoani: Yeah, but I've looked into building pcre on windows and it seems like a lot of pain.
glguy 2017-02-08 05:53:28
Jaxan: well, maybe get on your toes and peek at that paste, then:)
tlahtoani 2017-02-08 05:55:46
I saw a thing on guards and matching which got me super interested in Haskell
Jaxan 2017-02-08 05:56:06
glguy: thanks, that makes sense.
shapr 2017-02-08 05:57:31
tlahtoani: I still prefer haskellbook.com, but it looks like graham hutton's recently updated book is popular: https://www.amazon.com/Programming-Haskell-Graham-Hutton/dp/1316626229/
Jaxan 2017-02-08 05:58:21
glguy: Say I'm writing a Foo typeclass. Does implementing something for :.: makes sense without a Foo1 class?
tsahyt 2017-02-08 05:58:49
hello, I'm playing around with reactive-banana after having had some time with AFRP. As a first simple example I just want a running time counter (getTime Monotonic) as output. I can use fromPoll to build a Behavior for that value, but then I can't print it. How can I poll into an Event?
glguy 2017-02-08 05:59:36
Jaxan: :.: only makes sense if you intend to derive your implementations with to1 and from1
glguy 2017-02-08 05:59:51
If you're using to and from, then you can forget about :.:
Jaxan 2017-02-08 06:00:05
Ok, then I understand
tlahtoani 2017-02-08 06:00:50
Haskell book is not print though
shapr 2017-02-08 06:01:24
tlahtoani: yes, but still totally worth it.
CuriousErnestBro 2017-02-08 06:02:33
jaspervdj, mind if I send you a PM?
tsahyt 2017-02-08 06:02:41
basically I'd like an Event Int as an event stream of ticks.
jaspervdj 2017-02-08 06:02:54
CuriousErnestBro: no, go ahead!
tsahyt 2017-02-08 06:08:17
hmm, it seems there really is no way to actually generate an event stream this way, as it only works via AddHandlers and that only works with callback mechanisms
janos 2017-02-08 06:15:39
Hi, can somebody explain me, what a type ((:) * Text ([] *)) means?
janos 2017-02-08 06:15:56
especially: the * 's ?!
janos 2017-02-08 06:16:42
when applying (:) this results in * Text : ([] *) right?
janos 2017-02-08 06:16:51
but what does the * stand for?
glguy 2017-02-08 06:16:54
janos: The * is a kind
glguy 2017-02-08 06:17:11
You're seeing a type with an explicit kind application
janos 2017-02-08 06:17:37
:k Text
lambdabot 2017-02-08 06:17:39
error:
lambdabot 2017-02-08 06:17:39
Not in scope: type constructor or class 'Text'
janos 2017-02-08 06:17:58
something like these "type"s ?
janos 2017-02-08 06:18:10
(sorry for thus noob questions :D )
glguy 2017-02-08 06:18:29
As a "noob" you shouldn't really have to deal with those, I'd think. Where are you seeing them?
janos 2017-02-08 06:18:43
glguy: in the spock webserver library
janos 2017-02-08 06:19:16
glguy: any idea where I could read more about this stuff?
glguy 2017-02-08 06:20:05
The relevant extension here would be DataKinds
janos 2017-02-08 06:21:39
glguy: thank you, I'll look into it and try to understand it :)
glguy 2017-02-08 06:22:01
The (:) and [] here aren't the normal value ones
tsahyt 2017-02-08 06:22:19
should one use gtk or gi-gtk for a new project these days?
glguy 2017-02-08 06:22:24
They've been "lifted" to the type level
glguy 2017-02-08 06:22:52
tsahyt: I recently switched a small project from gtk to gi-gtk and liked how it went
glguy 2017-02-08 06:23:06
afaik they're both active projects
tsahyt 2017-02-08 06:23:07
glguy: I've only used gtk so far, what does gi-gtk do differently?
glguy 2017-02-08 06:24:31
it tries to be less clever, it's "just" a direct binding to all of the gtk api machine generated from the gobject introspection information
glguy 2017-02-08 06:24:51
and then it uses the new OverloadedLabels extension to try and make it nicer to use "methods" on gtk objects
tsahyt 2017-02-08 06:24:59
hmm sounds interesting
tsahyt 2017-02-08 06:25:01
thanks!
glguy 2017-02-08 06:25:17
My experience trying to use the gtk package as that it's support for list views was buggy and incomplete
glguy 2017-02-08 06:25:29
and that was the main thing I needed
glguy 2017-02-08 06:25:56
https://github.com/glguy/CookieCalculator/blob/master/gui/Main.hs
glguy 2017-02-08 06:26:38
I have some code there for using GHC.Generics to match a Haskell record with a glade file that you might find helpful
glguy 2017-02-08 06:27:48
Note that there is in fact documentation for the gi-* packages on hackage, but you have to look for it
glguy 2017-02-08 06:27:49
http://hackage.haskell.org/package/gi-gtk-3.0.11/docs/
glguy 2017-02-08 06:28:26
Hackage consults the .cabal file for the module list when building the table of contents, but gi-* uses dynamically generated modules
tsahyt 2017-02-08 06:29:21
oh that's why, I was already wondering
tsahyt 2017-02-08 06:29:42
is the entire gi-* stuff all generated then?
Zowlyfon 2017-02-08 06:31:34
tsahyt, you talk!
tsahyt 2017-02-08 06:32:05
I do indeed
Ikarus 2017-02-08 06:32:45
Hi, does anyone have a tutorial for create an expression parser with lexer/tokenizer with Parsec?
cocreature 2017-02-08 06:35:26
Ikarus: I don't know of a full tutorial, but there is an example at the bottom of https://hackage.haskell.org/package/parsec-3.1.11/docs/Text-Parsec-Expr.html
tsahyt 2017-02-08 06:35:49
does anyone here have experience with the wires package?
unyu 2017-02-08 06:38:23
There was a library with a type similar to Either, except its constructors were This, That and These. I forget what the library was called, though. Anyone remembers?
unyu 2017-02-08 06:38:44
Errr, never mind. Found it.
Ikarus 2017-02-08 06:38:51
thanks cocreature
pikajude 2017-02-08 06:43:39
unyu: in future, you can use hayoo
pikajude 2017-02-08 06:43:44
http://hayoo.fh-wedel.de/?query=These