merijn 2017-02-06 02:45:18
dramforever: No, tmux inside Terminal.app
dramforever 2017-02-06 02:45:29
Uh, whatever
merijn 2017-02-06 02:45:33
dramforever: I think tmux by default keeps like 5k lines of scrollback
merijn 2017-02-06 02:45:40
I rarely need more
dramforever 2017-02-06 02:45:53
And now you need more. WTF.
dramforever 2017-02-06 02:46:29
'Or maybe not...', exactly
merijn 2017-02-06 02:46:53
tbh, I don't wanna deal with >5k lines of source code in terminal scrollback anyway :p
ertes 2017-02-06 02:46:59
scrollback isn't exactly the most convenient thing in the world anyway
ertes 2017-02-06 02:47:26
most terminal emulators can't even get searching right
merijn 2017-02-06 02:49:14
There's no "both" in Data.Bifunctor?
Ford_Prefect 2017-02-06 02:49:15
Hi again
Ford_Prefect 2017-02-06 02:49:24
I'm using Aeson and genericParseJSON
Ford_Prefect 2017-02-06 02:49:40
And was wondering if extraneous keys should be an error (they seem to not be)
Ford_Prefect 2017-02-06 02:49:50
Or if there's a way to make them be an error
ertes 2017-02-06 02:49:55
:t join bimap
lambdabot 2017-02-06 02:49:57
Bifunctor p => (c -> d) -> p c c -> p d d
dramforever 2017-02-06 02:54:08
:t both
lambdabot 2017-02-06 02:54:10
(Data.Bitraversable.Bitraversable r, Applicative f) => (a -> f b) -> r a a -> f (r b b)
merijn 2017-02-06 02:54:20
dramforever: That one's from lens, afaik
Tuplanolla 2017-02-06 02:54:24
:t over both -- It's actually this.
dramforever 2017-02-06 02:54:26
no, screw it...
lambdabot 2017-02-06 02:54:26
Data.Bitraversable.Bitraversable r => (a -> b) -> r a a -> r b b
dramforever 2017-02-06 02:54:48
'Bitraversable' no, no
Tuplanolla 2017-02-06 02:55:36
Yes, yes. It requires `Bifunctor`.
mahmoudgebril 2017-02-06 03:03:16
9 11 attacks, Did USA do it itself or it just let it happen?
mahmoudgebril 2017-02-06 03:03:16
Did USA administration murder 3000 American citizen in 9 11 attacks to justify starting a war against iraq?
mahmoudgebril 2017-02-06 03:03:16
If al-qaeda did it, why go to kill 2 million Iraqi?
mahmoudgebril 2017-02-06 03:03:16
http://creatvchaos.blogspot.com.eg/ https://creatvchaos.wordpress.com/
mahmoudgebril 2017-02-06 03:03:16
Some of the benefits Americans say they achieved after 9 11 attacks include:
mahmoudgebril 2017-02-06 03:03:16
*constant flow of oil, which price is in continuous decline. Trump said he will simply take the Iraqi oil, and when he was told that Iraqi oil belongs to iraq he said there is no iraq(after usa destroyed it ).
mahmoudgebril 2017-02-06 03:03:17
*Invasion of afghanstan with construction of not less than 14 american military base which give a close eye on china.
mahmoudgebril 2017-02-06 03:03:17
*Removal of potential threat to isreal represented in iraq which throw isreal with more than 30 rocket after American assault on iraq during 2nd gulf war.
merijn 2017-02-06 03:06:49
@where ops
lambdabot 2017-02-06 03:06:49
byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw monochrom quicksilver Saizan shachaf shapr ski
shapr 2017-02-06 03:07:37
too late
tfc 2017-02-06 03:10:49
i am trying to do a http POST request with Network.Curl. And i need the html body response string from that. i am currently looking at the Network.Curl documentation, but it is confusing, and i do not see how to do it. anyone who did this before?
shapr 2017-02-06 03:11:36
tfc: perhaps wreq has better documentation?
opqdonut 2017-02-06 03:12:06
tfc: you get a CurlResponse_ object with curlGetResponse_, then you get the body from that with respBody
tfc 2017-02-06 03:12:31
shapr: does wreq allow me to do what curl can do with "--anyauth -u user:pass" ?
tfc 2017-02-06 03:12:46
opqdonut: yeah that's what i am currently looking for, but with POST...
opqdonut 2017-02-06 03:13:23
tfc: it looks like you should use perform_with_response_ if you want to POST with results
tfc 2017-02-06 03:13:52
opqdonut: ok, i will try to get it to work. thx for the pointer.
opqdonut 2017-02-06 03:14:15
or perhaps do_curl_ is a bit easier
tfc 2017-02-06 03:17:15
opqdonut: for both, the first parameter is a "Curl" typed value. the documentation off that type is just empty, so i do not even see how to construct any Curl value. that is confusing again.
tfc 2017-02-06 03:19:51
opqdonut: in the source code of that package i see mkCurl :: CurlH -> IO Curl. So that would help me constructing that Curl value, but i don't get the "data CurlH = Ptr Curl_" type which that one needs as parameter. still too new to haskell
tfc 2017-02-06 03:21:27
opqdonut: ok nvm found the "initialize :: IO Curl" function.
BernhardPosselt 2017-02-06 03:28:43
lets say ive got a binary tree like this: data Tree a = Nil | Node (Tree a) a (Tree a)
BernhardPosselt 2017-02-06 03:28:53
how do i get the left element of a node?
BernhardPosselt 2017-02-06 03:29:10
leftNode Nil = Nil
BernhardPosselt 2017-02-06 03:29:10
leftNode Node (Tree a) a (Tree a) =
BernhardPosselt 2017-02-06 03:29:15
im a bit stuck at pattern matching :D
BernhardPosselt 2017-02-06 03:29:26
can i assign a variable to the Tree a?
Atlantic778 2017-02-06 03:29:30
Hi! Is there a standard type for BitVectors? So, I need ~O(1) access by key (index) and "bit packing" for Booleans. I was reading about sequences, arrays, lists and Data.Vector but I'm not really sure what would be the right choice.
tdammers 2017-02-06 03:30:15
BernhardPosselt: you can pattern match on Node left item right
tdammers 2017-02-06 03:30:24
leftNode (Node left item right) = left
tdammers 2017-02-06 03:30:30
leftNode Nil = Nil
tdammers 2017-02-06 03:30:52
for the first line, it's considered good style to use _ for the parts of the pattern that you don't use
tdammers 2017-02-06 03:30:55
sp
tdammers 2017-02-06 03:30:57
so
tdammers 2017-02-06 03:31:02
leftNode (Node left _ _) = left
shapr 2017-02-06 03:31:13
Atlantic778: Data.BitVector?
tdammers 2017-02-06 03:33:19
BernhardPosselt: the line you wrote there, leftNode Node (Tree a) a (Tree a), does not work, firstly because of precedence issues, but secondly because Tree is a type constructor, not a value constructor
BernhardPosselt 2017-02-06 03:34:19
ok
BernhardPosselt 2017-02-06 03:35:23
so can i restrict it to types
BernhardPosselt 2017-02-06 03:36:04
i mean what if i had something like data Tree a = Nil | Node (Tree a) a (Tree a) | Node Nil a Nil
BernhardPosselt 2017-02-06 03:36:57
then leftNode (Node left _ _) = left would be ambiguous right?
Atlantic778 2017-02-06 03:37:05
shapr: yes, something like that. Does it do the bit packing? I can't find that info in the docs. And, if I understand it correctly, I can obtain Data.BitVector by installing the bv package?
tdammers 2017-02-06 03:37:12
you can't have the same constructor name in your type twice
shapr 2017-02-06 03:37:26
Atlantic778: yes, it's in the bv package
merijn 2017-02-06 03:37:31
Anyway know if I can either get persistent to generate newtypes or somehow get something that can both construct/inspect a datatype? I have like 5 datatype which are essentially newtypes around Text, but I can't write "generic" code that works for all of them, sadly :\
BernhardPosselt 2017-02-06 03:37:35
ok, so I'd need to use something other than Node, correct?
tdammers 2017-02-06 03:37:36
also Nil is not a type constructor, so you can't have Node Nil a Nil as a constructor definition
BernhardPosselt 2017-02-06 03:37:42
like
BernhardPosselt 2017-02-06 03:38:05
data Tree a = Nil | Node (Tree a) a (Tree a) | SomethingElse (Tree a) a (Tree a)
tdammers 2017-02-06 03:38:05
Node Nil "Hello" Nil :: Tree String -- would be valid though
tdammers 2017-02-06 03:38:16
yes, you could have that
Atlantic778 2017-02-06 03:38:32
shapr: thanks! Also, do you know maybe what's the closest thing to this in the "standard haskell distribution"? (ghci?)
shapr 2017-02-06 03:39:04
Atlantic778: closest thing to what?
Atlantic778 2017-02-06 03:41:57
shapr: closest thing to bit vectors. Constant access time (as contstant it can get, of course), at least. Sequences?
merijn 2017-02-06 03:42:46
record accessors aren't first class either, are they? :\
shapr 2017-02-06 03:42:47
Atlantic778: I'd suggest Vector for that
Atlantic778 2017-02-06 03:43:20
shapr: but that's also an external package, isn't it? I'm sorry, I'm sometimes restricted to use external packages.
Atlantic778 2017-02-06 03:43:42
restricted to not use, I can't use them*
shapr 2017-02-06 03:44:16
Yes, it is an external library.