Search Haskell Channel Logs

Thursday, March 9, 2017

#haskell channel featuring Aruro, Theophane, geekosaur, kuribas, maerwald, dolio, and 16 others.

cdornan 2017-03-09 09:46:49
Profpatsch: the idea with reflex is that it should become the goto API for regex-base, the defacto regex framework for these last 10 years, so it is logical at least
ezyang 2017-03-09 09:47:49
"reflex" haha
cdornan 2017-03-09 09:49:04
How about turning that around -- could be good that there is a serious effort to produce a definitive regex package
Cale 2017-03-09 09:50:02
cdornan: Wait, someone is naming a regex-related package "reflex"?
Cale 2017-03-09 09:50:13
~trademark issues~
cdornan 2017-03-09 09:50:17
ezyang: I have cut down deps on library and added escape functions
blackdog 2017-03-09 09:50:38
that's gonna be kinda confusing
cdornan 2017-03-09 09:50:59
Noooo -- that was my autocorrector
Cale 2017-03-09 09:51:10
ah, good
cdornan 2017-03-09 09:51:38
Package is called "regex"
geekosaur 2017-03-09 09:51:53
someone fatfingered "refex" at a guess. they must be borrowing my fingers :p
cdornan 2017-03-09 09:52:30
Fat autocorrector!
dolio 2017-03-09 09:52:37
You need really fat fingers to hit l when trying to hit f.
Cale 2017-03-09 09:52:39
Well, the main reason that regex-base hadn't seen any love is because Haskell programmers mostly don't use regexes for anything
maerwald 2017-03-09 09:52:55
they should
johnw 2017-03-09 09:52:57
although, they probably would, if they were asy to use
Cale 2017-03-09 09:52:58
(apart from via other tools, like text editors and sed)
geekosaur 2017-03-09 09:52:59
neh, they typoed regex as refex and autoincorrect added the l to get a word
johnw 2017-03-09 09:53:19
spending 30 mins trying to figure out regexps in Haskell usually leads people to Parsec as a simpler alternative
cdornan 2017-03-09 09:53:29
I agree -- a mistake , as I say in my blog post
Cale 2017-03-09 09:53:31
I can imagine some use cases where you'd want *actual* regular expressions, for performance reasons
geekosaur 2017-03-09 09:53:38
althogh re regex, see recent -cafe message
Cale 2017-03-09 09:53:39
(due to the ability to compile to DFAs)
maerwald 2017-03-09 09:53:43
Cale: no, for complexity reasons
Cale 2017-03-09 09:53:50
Yes
maerwald 2017-03-09 09:53:53
don't make your recognizer more complex than your input language
maerwald 2017-03-09 09:54:00
that's a security principle, not a performance thing
geekosaur 2017-03-09 09:55:34
I have snarked here about the Text.Regex interface being intended to push people as far away from regexes as possible
Cale 2017-03-09 09:57:01
Well, parser combinator based parsers aren't necessarily of higher complexity anyway
johnw 2017-03-09 09:58:20
I remember as a young Haskeller reaching for regexs, only to pull back a bloody stump
maerwald 2017-03-09 09:58:20
computationally yes
johnw 2017-03-09 09:58:20
and the problem is, even when you've figured out the interface, they don't really get any easier to use
Cale 2017-03-09 09:58:20
Yeah, regex-base is terrible, and if someone really needs regular expressions, they should probably build something else.
muesli4 2017-03-09 09:58:20
tapirus: My solution was actually wrong, am I correct that you want something like this? http://codepad.org/xVRPCH2t
ezyang 2017-03-09 09:58:20
I don't understand why we don't just have regular expression combinators
geekosaur 2017-03-09 09:58:20
regex-applicative?
ezyang 2017-03-09 09:58:21
people complain all the time about regexes being unreadable
ezyang 2017-03-09 09:58:21
sure :)
johnw 2017-03-09 09:58:21
I like regex-applicative for building up complex regex expressions
geekosaur 2017-03-09 09:58:21
also, the counternark to Text.Regex is how often we get someone who first asks how to use it, then asks what regex they want...
cdornan 2017-03-09 09:58:21
Was just going to say regex-applicative
johnw 2017-03-09 09:58:21
so says ^e(dward)z\.?yang$
geekosaur 2017-03-09 09:58:21
which *ought* to be a hint that maybe reaching for regex is not the right answer
maerwald 2017-03-09 09:58:21
the demonization of regular expressions in the haskell community is a consequence of the fact that parser combinators are more elegant to do in haskell
muesli4 2017-03-09 09:58:21
tapirus: Basically, when the suffix stays below a reference value it is seen as lower (above -> higher, on the reference value -> equal).
cdornan 2017-03-09 09:58:53
All true but not having conventional high quality regex API is not good in my experience
hexagoxel 2017-03-09 09:58:56
no, the usual notation to express regular expression does not leave room to write comments. this is in contrast with haskell's philosophy of writing extensive documentation for all code.
johnw 2017-03-09 09:58:57
Cale: and in the Perl scripts I use to patch the results of Coq's unverified extractor, thus resulting in complete confidence
Cale 2017-03-09 09:59:03
lol
Cale 2017-03-09 09:59:27
hexagoxel: lol
Aruro 2017-03-09 09:59:48
are there many commercial standalone haskell apps ? beside hledger and haskell studio for mac ?
maerwald 2017-03-09 09:59:50
johnw: I don't understand. error messages in parser combinators are rarely clear
Cale 2017-03-09 10:00:05
Aruro: Do they also have to be open source?
maerwald 2017-03-09 10:00:08
ofc, depends on the library
johnw 2017-03-09 10:00:26
maerwald: that exactly my point; they are less clear the more general the combinators
Aruro 2017-03-09 10:01:04
Cale: no, just haskell
Aruro 2017-03-09 10:01:15
only requirement it has to be an "app" not "We are doing consulting"
ezyang 2017-03-09 10:01:28
to me, the bigger problem with string regexes is lack of compositionality
Cale 2017-03-09 10:03:12
Most money is in web development these days
blackdog 2017-03-09 10:03:16
do you mean SaaS stuff?
johnw 2017-03-09 10:03:19
the best feature of regexs is how much they can liven up any IRC channel
johnw 2017-03-09 10:03:42
Cale: you'd think the Web would have been fully developed by now
Cale 2017-03-09 10:03:49
haha
blackdog 2017-03-09 10:03:56
johnw: think growth as in cancer
Cale 2017-03-09 10:03:57
Well, we're working on it
Aruro 2017-03-09 10:04:13
like even commercial modeling software, or even SaaS buiseness applications
Cale 2017-03-09 10:04:14
Hopefully we can get things to a place where it's not such a big effort
blackdog 2017-03-09 10:04:26
Aruro: sure. betterteam.com is in haskell.
blackdog 2017-03-09 10:04:33
the point is, you wouldn't know unless somebody told you.
Aruro 2017-03-09 10:05:11
i mean what stops developers to use haskell for end user programs?
Aruro 2017-03-09 10:05:22
excluding - cloud,services and such
Xe 2017-03-09 10:05:26
Aruro: managers
Cale 2017-03-09 10:05:29
Aruro: Almost nobody sells those at all?
Aruro 2017-03-09 10:05:45
why? i bout ntfs driver for mac from paragon, seems ok.
Aruro 2017-03-09 10:05:51
bought*
Cale 2017-03-09 10:06:26
I guess on Mac, there are some things which inexplicably cost money but which would ordinarily be part of your OS
geekosaur 2017-03-09 10:06:59
r/o ntfs driver is built in, later releases have a hidden partial r/w support option
blackdog 2017-03-09 10:07:17
it's just way easier to make money by putting your code on a server, rather than dealing with licensing etc.
Aruro 2017-03-09 10:07:46
so licensing is one of the issues?
dolio 2017-03-09 10:08:03
It's an issue with writing software.
geekosaur 2017-03-09 10:08:04
this isn;t so inexplicable because r/w ntfs info used to require microsoft nda. linux emulated it via an ugly hack (which basically meant do stuff and let ntfs journaling sort it out on the next windows boot. yes, this worked about as well as you could expect)
kuribas 2017-03-09 10:09:43
blackdog: GUI's support isn't the best in haskell.
ongy 2017-03-09 10:10:08
I'd say the haskell ecosystem makes it annoying to distribute licensed software, since dependencies have licenses all over the place and nobody cares
Aruro 2017-03-09 10:10:46
take alphasheets, their task is perfect for an app, but it will be webservice ? they do have some haskell coding there
kuribas 2017-03-09 10:10:51
ongy: most haskell libraries are BSD.
ongy 2017-03-09 10:10:56
I have seen a package (some library bindings) that has a conflicting license to the library. Which the author explicitly states
maerwald 2017-03-09 10:11:03
unfortunately
ongy 2017-03-09 10:11:06
kuribas: except for the (l)gpl ones
Cale 2017-03-09 10:11:07
ongy: Which package?
ongy 2017-03-09 10:11:19
I don't remember which one. I don't think I ended up using it
Cale 2017-03-09 10:11:36
Note that you can distribute BSD bindings to a GPL library, so long as you don't distribute the GPLed library with it.
dolio 2017-03-09 10:11:37
The majority of programmers don't care about licenses, regardless of which language they use.
maerwald 2017-03-09 10:11:38
people just seem to use what random thing "cabal init" suggests (which is BSD-3 afair)
maerwald 2017-03-09 10:11:48
and that's a pity
Theophane 2017-03-09 10:12:36
`stack legal` could be very useful ;)
ongy 2017-03-09 10:13:11
Cale: it was something like this. But it's a bit more annoying if someone intended to distribute it the usual windows way with libraries included
Cale 2017-03-09 10:13:11
Whatever you're making bindings to might as well be proprietary from your perspective if you're not distributing the code.
Theophane 2017-03-09 10:13:11
(or `cabal legal`)
Cale 2017-03-09 10:13:11
ongy: That's true.
kuribas 2017-03-09 10:13:11
ongy: how is that different from any other language?
Xe 2017-03-09 10:13:20
kuribas: unlike php you don't need to dencrypt your source code at runtime
Xe 2017-03-09 10:13:32
(such monsters do exist in this world)
ongy 2017-03-09 10:13:37
kuribas: I have seen *less* of that in the C(++) ecosystem. But maybe I just cared less
ongy 2017-03-09 10:14:04
it's not language specific, but I feel like nobody cares. because for the main usecase (user downloads from hackage/stackage and builds/links themself) it doesn't matter
jle` 2017-03-09 10:14:06
huh didn't realize that hackagebot has been gone for over three months now
jle` 2017-03-09 10:14:15
i'll miss that little bot
jle` 2017-03-09 10:14:22
rest in peace hackagebot
ongy 2017-03-09 10:14:32
but if someone wanted to use it commercially and distribute binaries with *batteries included* (or for windows) things get hairy
maerwald 2017-03-09 10:14:54
why?
Aruro 2017-03-09 10:15:02
even for support scheme? like donate and spport me?
maerwald 2017-03-09 10:15:19
ongy: why would that be a problem?
Cale 2017-03-09 10:15:55
Well, ongy has a point -- the fact that you can't figure out from the license on the Haskell binding what to do about the library it's a binding to might be a bit annoying if you have a ton of dependencies to go through.
Cale 2017-03-09 10:16:17
But I dunno, packaging stuff for Windows already seems like a pain.
Aruro 2017-03-09 10:16:30
linux users have money too
Aruro 2017-03-09 10:16:32
:)
Aruro 2017-03-09 10:16:49
question is where is haskell monetization ecosystem? even in form of donations
Cale 2017-03-09 10:17:24
It comes from various startups and other companies who pay us to build reliable software
blackdog 2017-03-09 10:17:26
kuribas: yeah, that's what i meant - we haven't concentrated behind a single framework or approach, so no single codebase gets the work.
blackdog 2017-03-09 10:18:10
(which isn't a criticism, it's just not obvious what the best way forward is, and bluntly without a large base of people writing gui software nobody's that interested)
kuribas 2017-03-09 10:18:41
blackdog: I think it's more of a lack of interest in GUI code in general.
ongy 2017-03-09 10:18:41
maerwald: I have no example, but if there was a package that depended on another one and they have incompatible licenses, distributing binaries wouldn't be possible to my understanding
blackdog 2017-03-09 10:18:41
Aruro: i tend to think the easiest path is just writing fast, safe web apps.
maerwald 2017-03-09 10:18:43
ongy: probably, I just didn't understand what "commercially" has to do with that
ongy 2017-03-09 10:19:17
maerwald: most others don't give a damn, or just put it on hackage aswell and don't distribute binaries
kuribas 2017-03-09 10:19:38
blackdog: maybe because people think pure functional isn't a good much for the imperative nature of GUIs?
ongy 2017-03-09 10:19:50
blackdog: I think you can drop both fast and safe there....
ongy 2017-03-09 10:20:13
Aruro: I don't think there's any monetization options on hackage (or anywhere) maybe some people have donation buttons on their project websites
Aruro 2017-03-09 10:20:38
yeah, hledger has, would be interesting to hear his feedback
ongy 2017-03-09 10:20:43
if I ever get a userbase that's bigger than the people I know, I may put something up aswell
blackdog 2017-03-09 10:21:37
ongy: why?
blackdog 2017-03-09 10:21:57
i mean, just by default you're going to have faster safer code than your average rubyist.
blackdog 2017-03-09 10:22:08
(i know this because i am a very average rubyist)
ongy 2017-03-09 10:22:10
have you seen the web? I doesn't look like safe and fast are a requirement these days. It's good to have, but...
ystael 2017-03-09 10:22:45
ongy: distinguish "requirement for running a business" from "requirement for making something you would actually want to work on" :)
ongy 2017-03-09 10:22:53
oh and I'm mixing safe and secure again. But still applies even for safe
ongy 2017-03-09 10:23:09
ystael: The starting question was about the money :)
ystael 2017-03-09 10:23:35
oh, yes, I see
Aruro 2017-03-09 10:23:47
about economy of haskell codebase
Aruro 2017-03-09 10:23:58
money support/motivation
Aruro 2017-03-09 10:24:25
hledger is not distributed on windows, so windows pain seems real.
maerwald 2017-03-09 10:25:24
it's ok to not support windows
maerwald 2017-03-09 10:25:41
it's an unethical operating system, taking away pretty much all user freedoms
ongy 2017-03-09 10:25:44
for GHC there's a few people that are payed by companies. Microsoft research for example
ystael 2017-03-09 10:25:59
Is it OK to advertise jobs in here?
ongy 2017-03-09 10:27:13
people do from time to time. But IRC may not be the best platform to do so (volatile, and with a fast-ish channel like this not many people will see it)
ezyang 2017-03-09 10:28:26
cdornan: You mispelled regex as reflex on Reddit too :P
cdornan 2017-03-09 10:30:02
ezyang: Corrected -- thanks!
tapirus 2017-03-09 10:41:47
why does compare [EQ] (repeat EQ) return LT?
jle` 2017-03-09 10:41:47
> "hi" < "hill"
lambdabot 2017-03-09 10:41:47
True
jle` 2017-03-09 10:41:47
it's dictionary ordering
jle` 2017-03-09 10:41:47
would "hi" or "hill" come first in a dictionary?
blackdog 2017-03-09 10:41:47
i guess that's the same question as compare [] (repeat EQ), really.
tapirus 2017-03-09 10:41:47
hmm
blackdog 2017-03-09 10:42:35
wait, jle` 's explanation is better, ignore me
tapirus 2017-03-09 10:42:35
I guess intuitvely I expected it to behave as zipWith (compare) [EQ] (repeat EQ)
glguy 2017-03-09 10:42:35
jle`: How heavy do you suppose this dictionary containing infinitely long words would be?
jle` 2017-03-09 10:42:35
so it should return an [Ordering] ?
tapirus 2017-03-09 10:42:35
but yeah, I get jle`s's explanation
jle` 2017-03-09 10:42:42
:t compare
lambdabot 2017-03-09 10:42:44
Ord a => a -> a -> Ordering
monochrom 2017-03-09 10:42:45
Intuition is fantasy.
jle` 2017-03-09 10:42:52
compare returns an Ordering, not an 'a'
jle` 2017-03-09 10:44:23
tapirus: what would you have expected the answer to be?
nitrix 2017-03-09 10:46:31
Can someone with a reasonable understanding of decision trees (used as classifiers) kind of breif me on the minimal operations (decisions) the tree needs to support to perform its classification work?
nitrix 2017-03-09 10:46:54
The inputs are doubles in the range [0, 1]. I'm guessing X > Y and X * Y > Z ?
nitrix 2017-03-09 10:46:57
Is this the most minimal?