Search Haskell Channel Logs

Saturday, February 4, 2017

#haskell channel featuring markasoftware, Rotaerk, dramforever, Welkin, mniip, Sinestro,

Welkin 2017-02-04 16:46:31
this is a good article so far http://www.parsonsmatt.org/2016/07/14/rank_n_classy_limited_effects.html
markasoftware 2017-02-04 16:47:21
why don't more major corporations use Yesod for servers if it's so fast?
markasoftware 2017-02-04 16:47:25
couldn't it save them a lot of money?
Welkin 2017-02-04 16:47:43
markasoftware: you mean Warp
Welkin 2017-02-04 16:47:47
yesod is not the server
markasoftware 2017-02-04 16:47:50
yep
markasoftware 2017-02-04 16:47:55
still new to yesod
markasoftware 2017-02-04 16:47:59
and warp
Welkin 2017-02-04 16:48:07
it's because languages and tools are not chosen based on logic alone
Welkin 2017-02-04 16:48:30
sure, it is one of the fastest severs around beside running on bare nginx
Welkin 2017-02-04 16:48:43
but companies are bureaucratic organizations
Welkin 2017-02-04 16:49:41
why do so many companies still run on php?
Welkin 2017-02-04 16:49:50
obviously not for technical reasons
markasoftware 2017-02-04 16:50:51
makes sense, lot easier to find php devs than haskell
Welkin 2017-02-04 16:51:10
(but most php devs will be terrible)
Welkin 2017-02-04 16:51:23
and almost all haskell devs are going to be the best
Welkin 2017-02-04 16:51:35
so it's not a clear tradeoff
Welkin 2017-02-04 16:51:47
bus then again, business people make the decisions
Welkin 2017-02-04 16:51:50
but*
Sinestro 2017-02-04 16:53:59
With the expression table parser in `parsers`, does anyone know how to make it fail when an unknown operator is used?
Welkin 2017-02-04 16:54:28
what parser?
Sinestro 2017-02-04 16:55:09
trifecta, underneath
Welkin 2017-02-04 16:57:22
Sinestro: is this what you are looking for?
Welkin 2017-02-04 16:57:23
https://hackage.haskell.org/package/parsers-0.12.4/docs/Text-Parser-Combinators.html#v:unexpected
Sinestro 2017-02-04 16:58:05
No, I knew about that, the problem is that I can't see a way to trap operators that aren't in the table
Welkin 2017-02-04 16:58:59
https://hackage.haskell.org/package/trifecta-1.6.2.1/docs/Text-Trifecta-Result.html#v:failed
Welkin 2017-02-04 16:59:08
that could work?
Welkin 2017-02-04 16:59:44
I have't used trifecta, so I'm not too familiar with it
Sinestro 2017-02-04 17:02:13
That'd be ugly, but it's the best thing I see right now
dramforever 2017-02-04 17:02:13
Q: Is there a good tutorial on 'syntax transformations' using Template Haskell?
Sinestro 2017-02-04 17:02:24
Gonna step away from that for now
Sinestro 2017-02-04 17:02:35
dramforever: define transformations?
dramforever 2017-02-04 17:02:42
By syntax transformation I mean something like $(transform [| user code |])
dramforever 2017-02-04 17:02:59
And by
dramforever 2017-02-04 17:03:30
And by 'good tutorial' I mean a guide through best practices, etc
Welkin 2017-02-04 17:03:39
http://research.microsoft.com/en-us/um/people/simonpj/papers/meta-haskell/meta-haskell.pdf
Welkin 2017-02-04 17:03:45
there is one of the papers on templayte haskell by spj
Welkin 2017-02-04 17:04:18
all of his papers are very easy to read and written in a tutorial style
dramforever 2017-02-04 17:04:20
Tutorials I find are usually for emitting Haskell code
dramforever 2017-02-04 17:04:41
Hmm, SPJ's tutorial is definitely going to have something I need
Welkin 2017-02-04 17:05:06
there us also the ghc user guide https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#template-haskell
Welkin 2017-02-04 17:05:13
is*
mniip 2017-02-04 17:05:39
so um
mniip 2017-02-04 17:05:45
does anyone have an example of a weak monad?
Welkin 2017-02-04 17:05:58
mniip: what is that?
mniip 2017-02-04 17:06:13
a monad that is not strong?
Welkin 2017-02-04 17:06:22
never heard of it
dramforever 2017-02-04 17:06:31
something something Category Theory something something
Welkin 2017-02-04 17:06:37
if it satisfies the monad laws, it's a monad o.o
mniip 2017-02-04 17:06:42
well you do know what strong monads are?
Welkin 2017-02-04 17:06:49
nope
dramforever 2017-02-04 17:07:29
It's mumble mumble Category Theory mumble mumble
Rotaerk 2017-02-04 17:08:02
not as interesting as cat theory
mniip 2017-02-04 17:09:08
well, if we have a monoidal category, then a monad M is strong if you have a NT A*TB-> T(A*B)
mniip 2017-02-04 17:09:11
natural in A and B
mniip 2017-02-04 17:09:41
oh well and some commutative diagrams
Welkin 2017-02-04 17:10:19
I'm not familiar with your notation
mniip 2017-02-04 17:11:21
oh wait
mniip 2017-02-04 17:11:26
well, if we have a monoidal category, then a monad T is strong if you have a NT A*TB-> T(A*B)
mniip 2017-02-04 17:11:33
there we go
mniip 2017-02-04 17:11:42
* being the tensor product in the monoidal category
dramforever 2017-02-04 17:16:18
Welkin: looks greay
dramforever 2017-02-04 17:16:21
*great
dramforever 2017-02-04 17:17:20
So now I just need to learn Language.Haskell.TH by heart and start working :/
Rotaerk 2017-02-04 17:24:21
dramforever, or just start working and learn it as you use it
Welkin 2017-02-04 17:25:19
jump right in
Welkin 2017-02-04 17:25:27
the water's fine
Welkin 2017-02-04 17:26:12
I think everyone goes through that phase where they think that is they simply memorize a book (or the rules) about something, then they will be able to do it flawlessly
Welkin 2017-02-04 17:26:19
if they*
Welkin 2017-02-04 17:26:37
which is obviously not true
dramforever 2017-02-04 17:27:41
Ok
dramforever 2017-02-04 17:31:05
I guess I'll start with basic constructs and add support for more as I develop it