JonReed 2017-03-09 09:06:23
stelleg1: I don't think so. But there is .ghci file thaht can be used to load them automatically
JonReed 2017-03-09 09:06:37
stelleg1: https://downloads.haskell.org/~ghc/7.2.2/docs/html/users_guide/ghci-dot-files.html
stelleg1 2017-03-09 09:06:38
thanks
JonReed 2017-03-09 09:10:55
Can anybody provide me a working example of providing defaults in a lens way. How to make this `[42] ^? ix 0` to return not `Maybe Int` but `Int`. I know how to do this with Maps `Map.empty ^.at "key" . non 0`, but my brain can't process how to do it with lists
tapirus 2017-03-09 09:14:32
I'm trying to sort two lists in a way that's slightly different from lexicographic order. As an example, 'compare [LT,GT] [LT,GT,LT,...]' 'compare [LT,GT] [LT,GT,EQ,...]' and 'compare [LT,GT] [LT,GT,GT,...]' all return LT. I'd like them to return LT, EQ, and GT respectively. Is there any simple way of doing this?
johnw 2017-03-09 09:15:03
JonReed: Use ^?!
JonReed 2017-03-09 09:16:31
johnw: But how to provide default? This will error out instead
JonReed 2017-03-09 09:16:59
johnw: I want it to return default value if Nothing is encountered
JonReed 2017-03-09 09:17:31
I know how to do it non-lens way with fromMaybe 42 $ .. lens stuff here
JonReed 2017-03-09 09:17:46
but the lens way escapes me
Profpatsch 2017-03-09 09:18:46
Concerning the regex package (which was announced a bit ago)
SexHendrix 2017-03-09 09:22:23
is there a way to do solids of revolution numerically
SexHendrix 2017-03-09 09:23:05
ive written a program that does integrals numerically given function and limits
SexHendrix 2017-03-09 09:23:20
can it do revolutions the same way?
tapirus 2017-03-09 09:23:32
muesli4: cheers, looking at this
lpaste_ 2017-03-09 09:30:46
Noobie22 pasted "Easy question" at http://lpaste.net/353360
lpaste_ 2017-03-09 09:31:03
Noobie22 revised "Easy question": "Easy question" at http://lpaste.net/353360
jle` 2017-03-09 09:32:29
noobie22: did you have a question? :)
Profpatsch 2017-03-09 09:34:50
"remains the best example of developing regular expressions at scale"
Profpatsch 2017-03-09 09:34:54
I'm scared now.
Profpatsch 2017-03-09 09:35:16
But it could be pretty handy for shell contexts.
AWizzArd 2017-03-09 09:36:27
How would one typically represent a configuration in Haskell? data Config = { key1::Int, key2::[Float], …, keyN::SomeType } ?
Tuplanolla 2017-03-09 09:36:36
@hackage dry-run
lambdabot 2017-03-09 09:36:36
http://hackage.haskell.org/package/dry-run
Tuplanolla 2017-03-09 09:36:49
This would also be a great package name.
maerwald 2017-03-09 09:37:11
AWizzArd: how's that question answerable. There's no such thing as a typical way of something like that
AWizzArd 2017-03-09 09:38:01
maerwald: well, I am thinking of Hashmap vs own data type, with a certain number of key/value pairs.
AWizzArd 2017-03-09 09:38:37
Is access to fields of a data type with 84 fields efficient?
maerwald 2017-03-09 09:38:56
I think darcs does it
Tuplanolla 2017-03-09 09:39:13
You can split it up into smaller parts that tend to change together, AWizzArd.
SexHendrix 2017-03-09 09:40:16
> let lucky n | mod n 7 == 0 = "LUCKY" | otherwise = "out of luck"; lucky' n = lucky <$> [0..n] in lucky' 10
lambdabot 2017-03-09 09:40:18
["LUCKY","out of luck","out of luck","out of luck","out of luck","out of luc...