erisco 2017-02-03 19:45:18
a circular definition probably resulting from class defaults
dmwit 2017-02-03 19:46:53
jpgarcia: There's currently no way to do that, sorry.
dmwit 2017-02-03 19:47:23
jpgarcia: That said, I think people are generally friendly to the extensions+imports block that inevitably clutters up the start of any literate Haskell.
dramforever 2017-02-03 19:48:49
The lhs isn't literate enough obviously
nshepperd 2017-02-03 19:50:08
I don't know about prolog, but SAT programs like minisat can be a lot more efficient than naively listing all possibilities as one might in the list monad. because they can use clever heuristics and substitute things into other things iirc
nshepperd 2017-02-03 19:51:33
(I wish for a nicer haskell library for encoding arbitrary problems into SAT so I can outsource the backtracking/solving/magic :)
erisco 2017-02-03 19:51:47
nshepperd, I am using sbv
dmwit 2017-02-03 19:52:24
nshepperd: http://hackage.haskell.org/package/ersatz ?
erisco 2017-02-03 19:53:33
so now the question is how I recreate a :< Succ a
shtuka 2017-02-03 19:53:37
thanks! @dmiles and dmwit
nshepperd 2017-02-03 19:54:09
I saw ersatz before. I couldn't understand how to use ersatz back then :/ maybe I should try again
erisco 2017-02-03 19:54:52
sbv lets you use popular solvers like z3
erisco 2017-02-03 19:55:18
you write regular Haskell... ish... and it solves it
dmwit 2017-02-03 19:55:29
Yep. sbv is pretty brilliant
erisco 2017-02-03 19:56:11
not so bad generating the problems as you just have to swap out some operators for equivalents
erisco 2017-02-03 19:57:05
you have to then take some fairly crude solutions and map them back to your domain though
dmwit 2017-02-03 19:57:35
Looks like ersatz can call out to popular solvers, too.
nshepperd 2017-02-03 19:57:35
interesting. I'll give sbv a go
dmwit 2017-02-03 19:57:51
Dunno whether it's *just* a front-end or whether it tries to implement a solver itself, too.
shtuka 2017-02-03 19:58:56
Which IDE would you suggest for Windows and GHC?
dmwit 2017-02-03 19:59:05
vim
dmwit 2017-02-03 19:59:21
Or emacs, I guess, if you already know it.
erisco 2017-02-03 19:59:26
I'm a pleb and I use Notepad++
dmwit 2017-02-03 19:59:29
But vim is objectively superior. ;-)
shtuka 2017-02-03 19:59:31
please not emacs or vim ...
dramforever 2017-02-03 20:04:25
shtuka: atom
shtuka 2017-02-03 20:05:23
thx@atom
dramforever 2017-02-03 20:05:35
If you ask me I would say there's nothing comparable to an IDE yet
mniip 2017-02-03 20:05:53
ok so
Cale 2017-02-03 20:06:14
dramforever: What about leksah?
mniip 2017-02-03 20:06:22
what exactly is a strong monad in a profunctor bicategory
Cale 2017-02-03 20:06:26
I haven't really used it, but it looked pretty ide-like
erisco 2017-02-03 20:06:42
that is a good description of it i.e. "ide-like"
dramforever 2017-02-03 20:06:47
Could have been a bias
mniip 2017-02-03 20:06:56
or rather, given I'm not very familiar with higher CT, how does the concept of strength expand to monoids in the endo-profunctor category?
dramforever 2017-02-03 20:07:00
but last time I tried it it just hang
dramforever 2017-02-03 20:07:08
hang pretty reliably
erisco 2017-02-03 20:07:31
well that's a common IDE feature
mniip 2017-02-03 20:07:53
are we talking about an A x F(X, Y) ---> F(A x X, A x Y) nt?
erisco 2017-02-03 20:08:03
especially when running the debugger, for some reason
dramforever 2017-02-03 20:08:14
It it's 'hanger' than jetbrains stuff
Cale 2017-02-03 20:08:29
mniip: https://en.wikipedia.org/wiki/Strong_monad spells it out
dramforever 2017-02-03 20:08:43
Debugging is like a 'major WTF' of Haskell actually
dramforever 2017-02-03 20:08:50
because single-stepping is non-existent
mniip 2017-02-03 20:08:56
Cale, yeah but profunctors
mniip 2017-02-03 20:09:01
arrows, not monads
dramforever 2017-02-03 20:09:18
Uh, in some sense
mniip 2017-02-03 20:09:40
hmm
mniip 2017-02-03 20:09:44
that NT above made no sense
Ke 2017-02-03 20:09:45
dramforever: very often tracing is much faster than single steppinh
dramforever 2017-02-03 20:09:56
Oh sorry, I think I meant stack trace
erisco 2017-02-03 20:10:20
I just get lost in the endless stack
erisco 2017-02-03 20:10:42
you go so many levels deep and can't remember anymore why it is even here
dramforever 2017-02-03 20:10:59
It's really like non-existent
shtuka 2017-02-03 20:11:17
how does one install the haskell IDE for Atom on Windows?
erisco 2017-02-03 20:11:37
you search plugins for "haskell" and install most of the stuff you find, iirc
dramforever 2017-02-03 20:12:05
Remember to install ghc-mod
dramforever 2017-02-03 20:12:12
and if that fails *don't* ask me
erisco 2017-02-03 20:12:16
and set up the config so Atom knows where it is
erisco 2017-02-03 20:12:24
my problem was that it continually broke
erisco 2017-02-03 20:13:26
and fyi Atom was benched as the slowest editor ever :P
shtuka 2017-02-03 20:13:26
thanks, I will try
dramforever 2017-02-03 20:15:14
so leksah isn't really on stackage
shtuka 2017-02-03 20:16:04
I installed ide-haskell and haskell-ghc-mod, but when I open a file named main.hs, there is no syntax highlighting and not option to run the code
erisco 2017-02-03 20:16:53
you have to configure the ide-haskell plugin so it can find ghc-mod
dramforever 2017-02-03 20:16:53
You need to take 'install most of the stuff you find' seriously
erisco 2017-02-03 20:17:43
also I think it only kicks in when it finds a .cabal package file but I could be mistaken
Cale 2017-02-03 20:18:08
shtuka: Try pressing Ctrl+Shift+L and choosing Haskell
shtuka 2017-02-03 20:18:35
Cale: there is no Haskell to select
Cale 2017-02-03 20:18:39
okay
dramforever 2017-02-03 20:18:46
I have autocomplete-haskell, haskell-ghc-mod, ide-haskell, ide-haskell-cabal, language-haskell
Cale 2017-02-03 20:18:53
That's odd, does it not come with Haskell support to begin with?
dramforever 2017-02-03 20:18:56
shtuka: You didn't install 'language-haskell' right?
mniip 2017-02-03 20:19:00
Cale, any idea?
dramforever 2017-02-03 20:19:50
Oh, Hey new Absolute Beginner (tm) here :)
dramforever 2017-02-03 20:20:11
shtuka: Welcome :)
Cale 2017-02-03 20:21:45
mniip: Maybe I don't understand the question. You have a monoidal category of profunctors, the definition of a monad in that is the same as the definition of monad in any category, and the definition of strong monad to use is the one on the Wikipedia page I linked...
mniip 2017-02-03 20:22:13
Cale, take a category C
mniip 2017-02-03 20:22:30
a monad in C is a monoid in (End(C), ., 1)
shtuka 2017-02-03 20:22:50
syntax highlighting does now work in Atom.
mniip 2017-02-03 20:22:56
but we're talking about monoids in (Prof(C), ., 1)
dramforever 2017-02-03 20:23:05
shtuka: https://github.com/Gabriel439/post-rfc/blob/master/sotu.md#ide-support
mniip 2017-02-03 20:23:14
which according to some people here are what arrows are
dramforever 2017-02-03 20:23:26
shtuka: Are you familiar with the command line?
mniip 2017-02-03 20:23:27
the question is how does the concept of monadic strength expand to this
shtuka 2017-02-03 20:23:44
dramforever: I am using Windows 10 64
dramforever 2017-02-03 20:24:10
What programming languages have you learned before?
shtuka 2017-02-03 20:24:11
when I try to build my .hs file, I get the error "No cabal file found"
shtuka 2017-02-03 20:24:13
C++
dramforever 2017-02-03 20:24:45
does 'g++ -O2 -Wall -o prog.exe prog.cpp' scare you off?
Cale 2017-02-03 20:26:01
mniip: Ah, okay. I wasn't understanding the setting correctly. Here: http://www-kb.is.s.u-tokyo.ac.jp/~asada/papers/arrStrMnd.pdf
mniip 2017-02-03 20:26:20
dramforever, not as much as
mniip 2017-02-03 20:26:24
g++.exe -O2 -Wall -o prog.exe prog.cpp
Cale 2017-02-03 20:26:27
mniip: The strength will just be a 2-cell of a particular type
Cale 2017-02-03 20:26:44
mniip: It'll be perfectly analogous to the situation with strength being a natural transformation in Cat
mniip 2017-02-03 20:26:45
Cale, could you explain without invoking higher ct
Cale 2017-02-03 20:26:57
no?
mniip 2017-02-03 20:27:00
uhhhuh
shtuka 2017-02-03 20:27:02
dramforever: no
Cale 2017-02-03 20:27:19
Well, I suppose we can explain what 2-cells in Prof are
shtuka 2017-02-03 20:27:21
I did cabal init in my main.hs directory, and it seems to work now
mniip 2017-02-03 20:27:27
what's a cell
erisco 2017-02-03 20:27:44
as I said, you need a .cabal package file for the plugin to kick in
dramforever 2017-02-03 20:27:55
shtuka: Oh wait, which book/tutorial/whatever are you using to learn Haskell?
Cale 2017-02-03 20:28:08
mniip: a generic term for something like an object or arrow
shtuka 2017-02-03 20:28:12
http://learnyouahaskell.com
Cale 2017-02-03 20:28:12
Objects are 0-cells
Cale 2017-02-03 20:28:15
Arrows are 1-cells
dramforever 2017-02-03 20:28:16
most tutorials tell you how to get a Haskell environment running
shtuka 2017-02-03 20:28:20
@dramforever
lambdabot 2017-02-03 20:28:20
Unknown command, try @list
dramforever 2017-02-03 20:28:27
shtuka: Just do what they say
mniip 2017-02-03 20:28:47
Cale, I don't see a pattern
Cale 2017-02-03 20:28:52
But then you might have 2-cells which go between pairs of 1-cells, and 3-cells would go between pairs of 2-cells and so on.
erisco 2017-02-03 20:28:53
I just type ghci and what else do you need :P
mniip 2017-02-03 20:29:06
ah
Cale 2017-02-03 20:29:23
For example, for Cat, the 0-cells are categories, the 1-cells are functors, and the 2-cells are natural transformations
shtuka 2017-02-03 20:29:36
ghci works for me, but I want an IDE
mniip 2017-02-03 20:29:41
ok
dramforever 2017-02-03 20:29:44
:(
shtuka 2017-02-03 20:30:00
building the Haskell.exe works now
mniip 2017-02-03 20:30:01
so in prof we have what
Cale 2017-02-03 20:30:04
For Prof, the 0-cells are categories, the 1-cells are profunctors, and the 2-cells are "dinatural transformations".
mniip 2017-02-03 20:30:14
dinatural transformations
mniip 2017-02-03 20:30:15
yeah
mniip 2017-02-03 20:30:24
but wait
Cale 2017-02-03 20:30:30
https://en.wikipedia.org/wiki/Dinatural_transformation
mniip 2017-02-03 20:30:33
aren't profunctors the 0-cells in Prof
dramforever 2017-02-03 20:30:40
shtuka: Sorry we don't really have that
Cale 2017-02-03 20:30:53
no
mniip 2017-02-03 20:31:03
isn't a profunctor category like a [-, -] functor category?
shtuka 2017-02-03 20:31:11
dramforever: what do we not have?
mniip 2017-02-03 20:31:25
ok, so Prof is more similar to Cat than to End?
Cale 2017-02-03 20:31:30
yeah
dramforever 2017-02-03 20:31:30
A very good IDE
mniip 2017-02-03 20:31:36
okay
shtuka 2017-02-03 20:31:40
OK. I'm fine with Atom.
Cale 2017-02-03 20:32:46
shtuka: There's a program called ghcid which will continually report errors in your program as you save it.
Cale 2017-02-03 20:33:22
ghcid, a text editor, and ghci are typically enough of an IDE for my sake :P
mniip 2017-02-03 20:33:31
Cale, hmm, is dinatural transformation a more generic version of a natural transformation in case of a profunctor?
Cale 2017-02-03 20:33:58
mniip: It's an analogous concept, but it's hard to say that it's "more generic"
Cale 2017-02-03 20:34:01
It's just different
mniip 2017-02-03 20:34:05
I mean,
mniip 2017-02-03 20:34:24
an NT on profunctors would be eta_X,Y : F(X, Y) -> G(X, Y)
mniip 2017-02-03 20:34:56
this one only makes use of F(X, X)
mniip 2017-02-03 20:35:24
any NT on profunctors is a DT
mniip 2017-02-03 20:35:40
(it looks like, I haven't checked the diagram thoroughly)
Cale 2017-02-03 20:35:47
oh wait a minute
Cale 2017-02-03 20:36:00
It looks like this paper doesn't even want that
Cale 2017-02-03 20:36:23
You can indeed just use natural transformations there
mniip 2017-02-03 20:36:32
it does mention DT in Definition 1
Cale 2017-02-03 20:37:10
On the next page, it says that 2-cells of profunctors are just natural transformations.
Cale 2017-02-03 20:38:31
(When I was looking up what category the paper was talking about, the fact that they mention dinatural transformations right away threw me off too)
mniip 2017-02-03 20:40:46
okay
mniip 2017-02-03 20:41:01
so we have Prof where 2-cells are dinatural transformations
shtuka 2017-02-03 20:42:27
can I also interpret .hs files from Atom? I don't want to compile everything.
mniip 2017-02-03 20:42:42
Cale, when does strength come into play