Search Haskell Channel Logs

Monday, January 30, 2017

#haskell channel featuring reactormonk, Arguggi, systadmin, opqdonut, merijn, cocreature,

orzo 2017-01-29 22:50:38
does cabal pass -O by default? The --help says n=1 is default for the --enable-optimization option, but it's ambiguous what happens when you don't pass that
cocreature 2017-01-29 22:51:09
orzo: afaik, it does pass -O by default
orzo 2017-01-29 22:52:24
well maybe it does usually, but i actually have "optimization: False" in my .cabal/cofnig
orzo 2017-01-29 22:52:43
probably was tired of slow compiles
cocreature 2017-01-29 22:52:55
if you disable optimizations, cabal will obviously disable them :)
orzo 2017-01-29 22:54:26
i had a memory leak earlier and i fixed it, but it was primarily just putting some strictness annotations. I wonder if an optimization pass would have eliminated it anyway
cocreature 2017-01-29 22:55:11
I'm not a big fan of relying on optimizations to infer strictness. it's too easy to make a small change to your program and break them even if they did work before
orzo 2017-01-29 22:56:09
so its probably good practice to fix memory leaks in a -O0 build
Arguggi 2017-01-29 23:12:18
Hello, I'm trying to use ekg behind nginx ( mainly for https), proxy_pass usually works (I'm using it to serve my servant code), but now I'm getting "No handler accepted "/" ", some details here: http://lpaste.net/3083176968179417088 , any idea why?
systadmin 2017-01-29 23:20:53
What's a good Haskell book for reference?
sdx23 2017-01-29 23:28:47
systadmin: reference? I'd rather say docs on hackage.
MarcelineVQ 2017-01-29 23:31:16
systadmin: depends what you're referencing, the language report is great general reference https://www.haskell.org/onlinereport/haskell2010/
reactormonk 2017-01-29 23:35:10
Is there a specific type for ascii-only characters?
opqdonut 2017-01-29 23:35:48
Char8
opqdonut 2017-01-29 23:36:08
as used by Data.ByteString
opqdonut 2017-01-29 23:36:48
hmm no, it's not a type, it's just the name of the module http://hackage.haskell.org/package/bytestring-0.10.8.1/docs/Data-ByteString-Char8.html
opqdonut 2017-01-29 23:37:29
there's Data.Word.Word8 for bytes, but I'm not sure where to find Character interop for that
merijn 2017-01-29 23:40:03
opqdonut: You are hurting my very soul
opqdonut 2017-01-29 23:40:12
sorry
merijn 2017-01-29 23:40:24
What does "Character interop for Word8" even mean
opqdonut 2017-01-29 23:41:12
e.g. ascii :: Character -> Maybe Word8, unAscii :: Word8 -> Character
merijn 2017-01-29 23:41:13
Because it sounds like something that makes me sad >.>
merijn 2017-01-29 23:41:58
There's 'ord' and 'chr' but using those means you deserve all the misery you get :p
merijn 2017-01-29 23:42:01
:t ord
lambdabot 2017-01-29 23:42:03
Char -> Int
merijn 2017-01-29 23:42:03
:t chr
lambdabot 2017-01-29 23:42:05
Int -> Char
opqdonut 2017-01-29 23:42:05
yeah
opqdonut 2017-01-29 23:43:05
https://hackage.haskell.org/package/text-1.2.2.1/docs/Data-Text-Encoding.html has utf8 utils for Bytestring<->Text, i.e. Word8<->Character conversions
opqdonut 2017-01-29 23:43:34
but I don't see ascii stuff
merijn 2017-01-29 23:44:06
What do you need/want ASCII for?
opqdonut 2017-01-29 23:44:21
I don't, I was just replying to reactormonk
merijn 2017-01-29 23:44:44
I didn't necessarily mean you, I just missed the original question
reactormonk 2017-01-29 23:45:00
merijn, OAuth tokens via JSON