<    April 2017    >
Su Mo Tu We Th Fr Sa  
 2  3  4  5  6  7  8  
 9 10 11 12 13 14 15  
16 17 18 19 20 21 22  
23 24 25 26 27 28 29  
00:06 \Mike joined
00:06 eacameron joined
00:09 Durbley joined
00:10 eacamero_ joined
00:13 eacameron joined
00:15 hyponoia joined
00:16 dni- joined
00:18 <hyponoia> I'm building a simple ETL tool for mySQL. Any pros-and-cons/war stories about yeshql and esqueleto would be welcomed.
00:19 eacameron joined
00:19 Rodya_ joined
00:25 argent0 joined
00:26 eacameron joined
00:35 abhiroop joined
00:45 argent0_ joined
00:51 hoffmeyer joined
00:51 contiver_ joined
00:52 andyhoang joined
01:05 Rodya_ joined
01:05 vaibhavsagar joined
01:07 conal joined
01:09 contiver joined
01:17 sherub1 joined
01:22 eacameron joined
01:24 abhiroop joined
01:25 eacamero_ joined
01:32 peterbecich joined
01:47 takle joined
01:52 hoffmeyer joined
01:54 systemfault joined
01:58 conal joined
02:00 takle joined
02:01 peterbecich joined
02:04 louispan_ joined
02:04 <hyponoia> part/
02:04 hyponoia left
02:05 dni- joined
02:09 Mikan joined
02:10 takle joined
02:10 Guest22844 joined
02:10 Guest22844 joined
02:14 exferenceBot joined
02:15 peterbecich joined
02:19 hexagoxel joined
02:23 takle joined
02:29 andyhoang joined
02:33 abhiroop joined
02:38 takle joined
02:40 peterbecich joined
02:46 takle joined
02:49 <geppettodivacin> :t filter -- jayjam124
02:49 <lambdabot> (a -> Bool) -> [a] -> [a]
02:52 takle joined
02:53 hoffmeyer joined
03:01 takle joined
03:12 takle joined
03:24 takle joined
03:25 sherub1 joined
03:27 blissdev joined
03:35 takle joined
03:42 abhiroop joined
03:44 takle joined
03:47 peterbecich joined
03:53 hoffmeyer joined
03:54 dni- joined
03:56 takle joined
04:00 gpolitis joined
04:01 micro_ joined
04:18 alexelcu joined
04:19 eacameron joined
04:22 <alexelcu> Hi, I'm on a chapter 8 exercise and being obsessed with formatting and expressivity, was wondering if there's a neater way to write that code.
04:22 <alexelcu> Pasted at: http://lpaste.net/354312
04:25 takle joined
04:28 conal joined
04:30 eacameron joined
04:34 conal joined
04:34 <glguy> alexelcu: If you're looking at formatting topics, error $ (show n) ++ " is not a digit"
04:34 <glguy> doesn't need the ()s
04:34 <glguy> or could be cleaned up as: error (show n ++ " is not a digit")
04:35 <glguy> concat and intersperse together is intercalate
04:36 <alexelcu> glguy: ah, thanks, I don't have my priorities straight yet :)
04:37 eacameron joined
04:43 eacameron joined
04:46 takle joined
04:52 Levex joined
04:53 abhiroop joined
04:54 yellowj joined
04:54 hoffmeyer joined
04:56 Elsi joined
05:00 abhiroop joined
05:01 takle joined
05:01 DataComputist joined
05:03 malaclyps joined
05:05 abhiroop joined
05:06 peterbecich joined
05:08 takle joined
05:08 delexi joined
05:16 takle joined
05:24 Rodya_ joined
05:26 geppettodivacin joined
05:31 Jackoe joined
05:34 takle joined
05:34 cur8or joined
05:38 moei joined
05:41 andyhoang joined
05:41 geekosaur joined
05:42 takle joined
05:42 Levex joined
05:43 dni- joined
05:43 alexelcu joined
05:46 cur8or_ joined
05:50 uglyfigurine joined
05:55 hoffmeyer joined
05:55 ThomasLocke joined
05:55 ThomasLocke joined
05:55 meandi_2 joined
05:56 takle joined
05:56 peterbecich joined
05:59 sypwex joined
06:08 Gurkenglas joined
06:08 takle joined
06:09 sherub1 joined
06:10 sistvan joined
06:15 Gurkenglas_ joined
06:17 harfangk joined
06:18 Gurkenglas_ joined
06:19 takle joined
06:22 douglascorrea joined
06:26 Rodya_ joined
06:30 Pupnik joined
06:30 kritzcreek_ joined
06:31 uglyfigurine joined
06:32 takle joined
06:34 <abhiroop> has anybody encountered this error: "Haskell process command errored with: (error "Unexpected response from haskell process.")" while working in haskell mode in emacs
06:41 Gloomy joined
06:41 govg joined
06:46 takle joined
06:53 thc202 joined
06:54 DataComputist joined
06:55 DataComputist joined
06:55 geppettodivacin joined
06:55 DataComputist joined
06:55 DataComputist joined
06:56 hoffmeyer joined
06:57 DataComputist joined
07:06 takle joined
07:06 <rockfruit> I've seen something that looks idiomatic but which I don't understand. A string is defined as myColor = "#777777". Then later, in a record, it is used like this: , activeColor = "" ++ myColor ++ "". The guy who wrote this config, by all appearances, knew what he was about. What's with the extra "" ++'s?
07:07 <rockfruit> They're everywhere in this file, so it looks like some kind of defense.
07:08 mattyw joined
07:09 slomo joined
07:11 uglyfigurine joined
07:12 <MarcelineVQ> looks entirely redundant as written, do you have a link?
07:12 <rockfruit> yeah, an xmonad config at https://wiki.haskell.org/Xmonad/Config_archive/And1's_xmonad.hs
07:12 <rockfruit> they're all literals, so appear to all be redundant. I can understand them in some language that allows type coersion...
07:13 slomo joined
07:15 <MarcelineVQ> as far as I can tell they're just regular String, based on defaultXPConfig, so if it's idiomatic then it's an xmonad idiom rather than a general haskell one
07:15 <rockfruit> right, thanks. It's the only time I've seen them in an xmonad config, so I guess this chap's brain just works like that.
07:15 <MarcelineVQ> > "" ++ "foo" ++​""
07:15 <lambdabot> <hint>:1:15: error: lexical error at character '\8203'
07:16 <MarcelineVQ> oops did I zero-point space
07:16 <MarcelineVQ> > "" ++ "foo" ++ ""
07:16 <lambdabot> "foo"
07:16 govg joined
07:16 <rockfruit> what is zero-point space when it's at home?
07:18 <MarcelineVQ> I ​just happen to have a zero width space bound on my keyboard because it's fun to use but sometimes it gets used by accident
07:18 <rockfruit> I tried that line above (the ++"" one) in ghci, it works as I thought it would
07:18 <rockfruit> ah :)
07:18 takle joined
07:26 uglyfigurine joined
07:26 takle joined
07:28 Rodya_ joined
07:30 <rockfruit> a few minutes of searching and reading have convinced me that there are some pretty odd ideas of what is "fun" out there in the world.
07:30 <MarcelineVQ> oh yes
07:31 Durz0 joined
07:32 dni- joined
07:34 mattyw_ joined
07:42 abhiroop_ joined
07:43 eacameron joined
07:51 uglyfigurine joined
07:51 eacameron joined
07:54 abhiroop joined
07:56 hoffmeyer joined
07:57 peterbecich joined
07:58 louispan joined
07:59 takle joined
08:03 t0by joined
08:03 t0by joined
08:06 uglyfigurine joined
08:14 eacameron joined
08:22 sphere joined
08:22 merijn joined
08:23 takle joined
08:28 pdgwien joined
08:29 grdryn joined
08:31 uglyfigurine joined
08:44 uglyfigurine joined
08:48 azahi joined
08:57 hoffmeyer joined
08:59 peterbecich joined
09:05 zero_byte joined
09:10 uglyfigurine joined
09:16 yellowj joined
09:20 Iceland_jack joined
09:21 dni- joined
09:29 Rodya_ joined
09:31 abhiroop_ joined
09:40 <vaibhavsagar> I'm working through https://github.com/data61/lets-lens and having trouble with `product` in OpticPolyLens, can anyone give me a hint?
09:41 <vaibhavsagar> typed holes haven't provided any insight
09:44 mattyw joined
09:50 uglyfigurine joined
09:52 <vaibhavsagar> looked at the solution, no way I would have come up with that on my own
09:54 abhiroop joined
09:58 hoffmeyer joined
09:59 lithie joined
10:01 peterbecich joined
10:02 wedens_ joined
10:07 mattyw joined
10:09 myrkraverk joined
10:17 exferenceBot joined
10:29 louispan joined
10:30 eacameron joined
10:40 dni- joined
10:45 Pupnik_ joined
10:57 sphere joined
10:58 Levex joined
10:59 hoffmeyer joined
11:02 peterbecich joined
11:04 <__rgn> is pure of ((->) r) same as const
11:04 nacon joined
11:04 nacon joined
11:04 nacon joined
11:04 nacon joined
11:05 <dibblego> __rgn: yes, it has to be, by the type
11:07 <__rgn> how can i say in ghci that i want to use pure in context of (->) r
11:07 <dibblego> just use pure
11:07 <__rgn> but it can't know from context if there is no context
11:08 <__rgn> can i do like (pure:: a -> (r -> a)) $ 1
11:08 <dibblego> you can do that
11:08 <dibblego> or, you can not do that; it's the same thing
11:08 <__rgn> how?
11:09 <__rgn> const 1 returns a function, pure 1 returns 1
11:09 <dibblego> the latter of what you just said, is not true
11:09 <__rgn> > pure 1
11:09 <dibblego> const 1 is just a specialisation of pure 1
11:09 <lambdabot> error:
11:09 <lambdabot> • Ambiguous type variables ‘f0’, ‘a0’ arising from a use of ‘show_M81067...
11:09 <lambdabot> prevents the constraint ‘(Show (f0 a0))’ from being solved.
11:09 <__rgn> > import Control.Applicative; pure 1
11:09 <lambdabot> <hint>:1:1: error: parse error on input ‘import’
11:10 <dibblego> that's ghci, trying to show the result, which is ambiguous
11:11 <__rgn> http://ix.io/pH6
11:11 <__rgn> i don't see how these are the same thing
11:11 <dibblego> they are not the same; one specialises the other
11:11 <dibblego> you are doing an additional thing there, by evaluating it with show
11:12 <__rgn> yeah, the function
11:12 ljc joined
11:12 <__rgn> > or, you can not do that; it's the same thing
11:12 <lambdabot> <hint>:1:3: error: parse error on input ‘,’
11:13 <dibblego> λ> pure 7 "abc"
11:13 <dibblego> 7
11:13 <dibblego> λ> const 7 "abc"
11:13 <dibblego> 7
11:13 <__rgn> hmmmm
11:14 <__rgn> pure 7 :: (Num a, Applicative f) => f a
11:14 <__rgn> i don't get this
11:16 <dibblego> what type would you expect?
11:16 <__rgn> (pure 7) actually returns some kind of functor?
11:16 <merijn> :t pure
11:16 <lambdabot> Applicative f => a -> f a
11:16 <__rgn> of what applicative instance is (pure 7)?
11:17 <merijn> __rgn: All of them
11:17 <dibblego> it returns a value of the type (f a) where (f) is Applicative and (a) is Num
11:17 <dibblego> ((->) r) is an Applicative
11:20 <__rgn> i'm missing something
11:22 <__rgn> so i can also have 7 in a functor that is of no specific instance of functor?
11:23 <dibblego> pure :: a -> f a
11:23 <dibblego> now replace (f) with ((->) r)
11:23 <dibblego> pure :: a -> ((->) r) a
11:23 <__rgn> i know this
11:23 <dibblego> this is just syntax for
11:23 <dibblego> pure :: a -> (r -> a)
11:23 <dibblego> this is just syntax for
11:23 <dibblego> pure :: a -> r -> a
11:23 <dibblego> ((->) r) is just one value for (f) that works
11:24 <__rgn> yes
11:24 ederign joined
11:24 <__rgn> what is f in (pure 7)?
11:25 <dibblego> it is not yet specified
11:25 <__rgn> there we go...
11:25 <__rgn> interesting
11:25 <dibblego> what is the element type in reverse?
11:26 <__rgn> a
11:26 <dibblego> for anything
11:26 <__rgn> so how do you make (pure 7) an instance of some applicative
11:27 <dibblego> the type inferencer will specialise as necessary
11:27 <dibblego> λ> pure 7 ++ [2,3,4]
11:27 <dibblego> [7,2,3,4]
11:28 <__rgn> how do i check in ghci what pure 7 does in context of [2,3,4]
11:28 <__rgn> like :t pure :: f => []
11:28 <__rgn> or something
11:28 <dibblego> you'd have to specialise it with the type
11:30 <__rgn> :t pure :: a -> [a]
11:30 <lambdabot> a -> [a]
11:30 Rodya_ joined
11:31 <merijn> lambdabot has `asAppliedTo`
11:31 <merijn> :t pure 7 `asAppliedTo` "foo"
11:31 <lambdabot> Num b => [Char] -> b
11:32 <merijn> Also, there's typed holes, but I dunno if lambdabot supports those
11:32 <merijn> Although those don't help with finding out the type of pure, I suppose
11:34 <__rgn> just wondering how to learn more about the applicative instance used if i see something like pure 7 ++ [1,2,3]
11:38 <dibblego> λ> :i Applicative
11:38 <dibblego> instance Applicative [] -- Defined in ‘GHC.Base’
11:38 <dibblego> go looking in GHC.Base
11:40 <__rgn> ah
11:42 pbrant joined
11:44 <__rgn> thanks dibblego and merijn, think i'm done with this particular rabbit hole
11:51 Pupnik joined
12:00 irons_ joined
12:02 Levex joined
12:04 snowcrshd joined
12:04 peterbecich joined
12:06 sypwex joined
12:06 NeverDie joined
12:09 sypwex joined
12:11 hoffmeyer joined
12:21 galderz joined
12:28 vmeson joined
12:30 vmeson joined
12:31 Rodya_ joined
12:32 vmeson joined
12:36 eacameron joined
12:36 vmeson joined
12:38 vmeson joined
12:39 jathan joined
12:41 vmeson joined
12:44 vmeson joined
12:46 vmeson joined
12:47 eacameron joined
12:51 vmeson joined
12:52 eacameron joined
12:54 mengu joined
12:55 vmeson joined
12:56 vmeson joined
12:58 eacameron joined
12:58 vmeson joined
12:58 <__rgn> if you think of this as a Reader, (+) <$> (+1) <*> (*2) $ 2
12:58 <__rgn> 2 is the "environment", yes?
12:58 <Iceland_jack> yeah
13:01 <__rgn> why do we even need the newtype?
13:01 <__rgn> it seems to make it more complicated
13:01 <mniip> which newtype?
13:01 <__rgn> Reader
13:01 <mniip> what library defines such a newtype
13:02 <mniip> in mtl/transformers you have type Reader r = ReaderT r Identity
13:02 <__rgn> not sure, but Reader is often described as "newtype wrapper for ((->) r)"
13:02 sypwex joined
13:03 <mniip> well I don't remember seeing it in any actual code
13:03 <mniip> indeed such a newtype is an unnecesasry complication
13:05 eacameron joined
13:05 peterbecich joined
13:05 galderz joined
13:08 <__rgn> heh, so i'm struggling to understand something that is not particularly useful
13:09 zgrepc joined
13:11 hoffmeyer joined
13:12 eacameron joined
13:17 eacameron joined
13:17 chlong joined
13:27 vmeson joined
13:28 vmeson joined
13:30 Sose joined
13:32 vmeson joined
13:32 Rodya_ joined
13:36 vmeson joined
13:41 hdeshev joined
13:41 vmeson joined
13:43 wei2912 joined
13:45 Big_G joined
13:58 acarrico joined
14:00 harfangk joined
14:03 Jackoe joined
14:07 andyhoang joined
14:07 peterbecich joined
14:12 hoffmeyer joined
14:12 contiver joined
14:15 developernotes joined
14:20 developernotes joined
14:23 developernotes joined
14:26 developernotes joined
14:33 Jackoe joined
14:36 Jackoe joined
14:36 carlomagno joined
14:39 Jackoe joined
14:40 sherub1 joined
14:48 levex_ joined
14:55 <jayjam124> is there a way to fix indentation errors quickly in Notepad++?
15:01 conal joined
15:04 chlong joined
15:05 marvin2 joined
15:06 guampa joined
15:08 peterbecich joined
15:12 Rodya_ joined
15:13 hoffmeyer joined
15:13 uglyfigurine joined
15:16 contiver joined
15:28 andyhoang1 joined
15:29 <bitemyapp> Hey y'all, I'm trying to up my default-ulimit in the Docker for Mac's daemon JSON config
15:29 <bitemyapp> The documentation shows an empty map {} for `default-ulimit` but searching around the Github repository isn't getting me a consistent answer for what the map should look like
15:30 <bitemyapp> could anyone tell me what I'm supposed to put in there?
15:31 <bitemyapp> oh wait
15:31 <bitemyapp> I'm not in #docker
15:31 <bitemyapp> dagnabbit
15:31 <bitemyapp> bamboozled again
15:32 boris_rh joined
15:35 <sshine> ;-)
15:35 <sshine> tried to fool you real hard there.
15:35 <Iceland_jack> (>'-')> <('_'<) ^('_')\- \m/(-_-)\m/ <( '-')> \_( .")> <( ._.)-`
15:35 chlong joined
15:35 <bitemyapp> well
15:35 <bitemyapp> if anyone knows the answer
15:35 <bitemyapp> pls halp
15:35 <bitemyapp> I hate dealing with Docker.
15:36 skeet70 joined
15:40 mthek joined
15:57 contiver joined
15:58 vmesons joined
16:02 w4and0er96 joined
16:02 WarmCookie joined
16:06 DataComputist joined
16:07 <jayjam124> https://puu.sh/vabxY/95b4f19802.png
16:07 <jayjam124> https://pastebin.com/DNXFSyCN
16:08 <jayjam124> I have this code that I've done but I'm not sure what to print out with showStr, can anyone help me out?
16:08 <jayjam124> the first link is my task but I'm really stuck
16:08 <jayjam124> it's the last bit
16:10 peterbecich joined
16:10 WarmCookie joined
16:14 hoffmeyer joined
16:19 cschneid_ joined
16:25 contiver_ joined
16:27 andyhoang1 joined
16:31 yellowj joined
16:43 contiver joined
16:49 Rodya_ joined
16:54 Levex joined
16:56 <Gurkenglas_> jayjam124, what did the program you're given to complete look like?
16:57 <jayjam124> well as you can see that isi what it looks like now
16:57 <jayjam124> but the initial template was this:
16:57 <jayjam124> https://pastebin.com/kp2wDyWi
17:00 abhiroop joined
17:01 <jayjam124> I just dunno how to make it interactive really
17:01 uglyfigurine joined
17:01 <jayjam124> I did get some help for this but Haskell is not my strong point, that's why I'm here
17:02 uglyfigurine joined
17:03 <Gurkenglas_> "any occurence is removed" <- they mean all occurences, or any one occurence? The first seems more natural but then they wouldn't have needed the "if the typed digit is present" clause
17:04 <jayjam124> any one
17:04 <jayjam124> anything
17:04 <Gurkenglas> (coz your filter removes all)
17:05 <jayjam124> what do you think it is?
17:05 <Gurkenglas> I'm not sure, I would implement both such that it's easy for them to choose a variant
17:06 <jayjam124> so the way my program stands now
17:06 <jayjam124> nothing will happen basically?
17:06 <jayjam124> because I don't think adding a variant is right either
17:07 <Gurkenglas> The filter stuff would remove all occurences of a character, the variant im proposing would only remove one
17:07 <Gurkenglas> "guessednumberlist" <- the "guesses" are made by the computer? (is english your first language?)
17:08 <jayjam124> yah it is I just type the first thing that comes into my head
17:08 <jayjam124> I'll let you read it for a bit and for you to ask me questions
17:08 <jayjam124> then I'll ask how to get this working, if that's best do you reckon?
17:08 <Gurkenglas> Wherever you put a call of showStr, the parameter should be guessednumberlist
17:09 <jayjam124> right
17:10 <Gurkenglas> You'll probably want to output it each time it changes
17:11 peterbecich joined
17:12 <Gurkenglas> Each time 'loop' is called corresponds to one time the list changes, so outputting there sounds like it should work out
17:13 <jayjam124> if length newguesslist > 10 then return() else loop msgchan guesschan guesscount newguesslist showStr guessednumberlist
17:13 <jayjam124> like this?
17:13 <Gurkenglas> I think I'll need to see the line breaks in there to decide whether that's okay. Use lpaste.net
17:13 <jayjam124> sure, you want me to paste the whole code?
17:14 <Gurkenglas> k
17:14 <jayjam124> https://pastebin.com/RFv6hH36
17:14 <jayjam124> it's just all on one line basically
17:14 <Gurkenglas> That's not lpaste.net, and I expected line breaks there :D
17:15 <jayjam124> sorry
17:15 <jayjam124> so used to Pastebin
17:15 <jayjam124> lol
17:15 hoffmeyer joined
17:15 <Gurkenglas> This calls loop with the parameters msgchan, guesschan, guesscount, newguesslist, showStr and guessednumberlist
17:15 <Gurkenglas> Did you write any of that?
17:15 <jayjam124> http://lpaste.net/6377021927608811520
17:15 <jayjam124> I did with some help yes
17:15 <jayjam124> actually I did write it, but with gguidance
17:16 <jayjam124> I struggle to think in this paradigm, with object orientated I'm a lot better
17:16 <jayjam124> more experience
17:17 <Gurkenglas> If that syntax worked like you want, this would output the current list each time a digit is added
17:17 <jayjam124> plus last time I touched Haskell was months ago so it's pretty rusty, especially with University switching you around so many diff languages
17:17 <jayjam124> can be confusing
17:17 <Gurkenglas> What about when the user removes digits?
17:17 <jayjam124> right I get an error
17:17 <jayjam124> http://puu.sh/vah8m/eedb13178b.png\
17:18 <jayjam124> http://puu.sh/vah8m/eedb13178b.png
17:18 <jayjam124> doesn't like the indentation I think
17:18 sypwex joined
17:18 <jayjam124> but the thing is if I don't add the showStr stuff on that line it works ok, no output though ofc
17:18 <Gurkenglas> When you want to do two things in a place where you have the opportunity to do one thing, you usually use a do block to turn the two into one
17:19 <jayjam124> right I just dropped it down
17:19 <jayjam124> http://puu.sh/vahd3/d289b0f3bd.png
17:19 <jayjam124> no errors now but no output
17:25 <jayjam124> am I even placing it in the right place?
17:32 peterbecich joined
17:36 <Gurkenglas> jayjam124, this outputs the list after the recursion is done, ie when the last call to loop is done
17:37 <jayjam124> I thought it keeps looping here if the newguesslist isn't 10?
17:37 <jayjam124> the base case is the return()
17:38 <Gurkenglas> Right and if it keeps looping that means the showStr will be delayed untill it stops looping
17:38 <jayjam124> ahhhh
17:38 <jayjam124> so I gotta put it before?
17:38 <jayjam124> if length newguesslist > 10 then return() else showStr guessednumberlist loop msgchan guesschan guesscount newguesslist
17:40 <Gurkenglas> (heres how it currently looks http://sketchtoy.com/68005284 )
17:40 <Gurkenglas> "else do showStr guessednumberlist; loop msgchan guesschan" (you can use semicolons instead of newlines in do blocks)
17:41 alexelcu joined
17:42 <jayjam124> http://puu.sh/vaiqH/d282beb025.png ?
17:42 <jayjam124> nope
17:42 <jayjam124> don't read that
17:42 <jayjam124> http://puu.sh/vaisR/29931c7715.png this
17:42 <Cale> Perhaps you want to have some things on each branch of the if?
17:43 <Cale> Or do you really always want to loop?
17:43 <jayjam124> always want to loop pretty mcuh
17:43 <Gurkenglas> Cale, they only loop if the list isnt longer than 10 yet
17:43 hoffmeyer joined
17:44 <Gurkenglas> Except in the new version, but that's by mistake :D
17:44 <jayjam124> well you want to loop until it's greater than 10 yah
17:44 <jayjam124> how does that look Gurkenglas?
17:44 <Cale> So does it depend on the conditional or not?
17:44 <Cale> I would expect something like:
17:44 <Gurkenglas> Indent the second line of the new do block until its as far right as the showStr part
17:44 <Cale> if length newguesslist > 10
17:44 <Gurkenglas> And I said the ; is an alternative to the newline, so take it out if youre using another line
17:44 <Cale> then showStr ...
17:45 <Cale> else loop ...
17:45 machinedgod joined
17:45 <Gurkenglas> Cale, no that would only showStr once when he stops looping
17:45 <jayjam124> sorr yeah
17:45 <Gurkenglas> jayjam124, I would put the showStr line above the "msg <- takeMVar msgchan" so you show the list before each time you start waiting for the next event
17:45 <Cale> oh, well, I don't actually know what the program is meant to do
17:46 <Cale> But in any case, it's common to guard the recursion with some sort of conditional
17:46 <jayjam124> http://puu.sh/vaiFF/2188583c8e.png
17:46 <jayjam124> Gurkenglas?
17:46 <Cale> also, the number of O(n) operations here bothers me, but I'll try really hard to ignore that
17:47 <Gurkenglas> jayjam124, now dont show another time within the case, and put the loop back into the else
17:48 <jayjam124> all on one line?
17:48 nick_h joined
17:50 <jayjam124> http://puu.sh/vaiTc/61aad9bba9.png
17:51 Rodya_ joined
17:55 carlomagno joined
17:56 conal joined
17:58 carlomagno joined
18:03 <Gurkenglas> Yea should work
18:03 <jayjam124> and it should print out stuff when I call main?
18:03 <Gurkenglas> I mean, if nothing else is broken. Let's say I fail to forsee that this fails.
18:04 <jayjam124> http://puu.sh/vajII/5945b9873e.png nothing
18:04 <jayjam124> wtf?
18:04 <Gurkenglas> Try putting showStr "asd" and the like in places to see what code gets run
18:06 <Gurkenglas> Whereever it says "do" followed by a further-right indentation level, you can insert a 'showStr "foo"' line at that same further-right indentation level and it should keep compiling
18:07 <Gurkenglas> (Right at the start of main, for example)
18:13 contiver joined
18:16 t0by joined
18:17 uglyfigurine joined
18:18 dni- joined
18:21 mengu joined
18:22 <jayjam124> I tried putting showStr "aaa" at the top of main and nothing comesout
18:22 <jayjam124> gurkenglas
18:22 <jayjam124> Gurkenglass
18:22 <jayjam124> *
18:23 <Gurkenglas> Try a hello world program, or ripping out all the other code until only a hello world program is left
18:23 <geekosaur> so, just to make sure you're getting the same behavior you would get when compiling it, try using ":main" instead of just "main"
18:24 <jayjam124> what would this accomplish?
18:25 <jayjam124> http://ideone.com/mJNs30
18:25 <jayjam124> works now
18:26 uglyfigurine joined
18:26 <geekosaur> ghci is not the same as compiling and running a program. ":main" tells ghci to provide the same environment that runghc would, instead of its normal interactive environment. this sometimes matters for things like thread behavior
18:26 <Gurkenglas> Now you can pick a spot halfway between the code that surprisingly doesnt work and the code that works, and repeat until the difference is small enough that even we can figure it out
18:29 <jayjam124> getting a bit confused really
18:29 <jayjam124> like I don't see how I can figure what I need to do out
18:31 <jayjam124> I don't see any differences
18:31 <jayjam124> apart from there being a lot more code
18:32 abhiroop_ joined
18:32 andyhoang1 joined
18:33 <Gurkenglas> Me neither! But there has to be some point where it goes from not working to working, and this "binary search" helps find that point, and then we can look at that point and see how it might cause the problem.
18:34 <jayjam124> yeah
18:34 expo873 joined
18:34 <Gurkenglas> It might be easier to remove code from the large version than adding code to the small version.
18:34 <jayjam124> hard assignment I got to say it
18:35 <Gurkenglas> Nah, this is just debugging, a side quest that pops up regardless of the assignment
18:35 <jayjam124> been on it for ages now
18:35 <jayjam124> I am starting to worry a bit as well
18:35 <jayjam124> deadline in like 13 hours
18:36 <Gurkenglas> I would have expected you to be familiar with this sort of stuff from whatever language you hail from, this should be pretty universal
18:36 <jayjam124> yeah it is but last time I touched Haskell was 4 months ago
18:37 <jayjam124> and this syntax is really not what I'm used to
18:37 <jayjam124> so I've forgotten a lot of it
18:37 <Gurkenglas> By the way, you could try putting the large version back in and seeing whether it not working was a fluke.
18:37 <jayjam124> someone such as yourself that uses it a lot would know how to handle it
18:37 alexelcu joined
18:38 malaclyps joined
18:38 <Gurkenglas> (The one that is most likely to put something on the screen, the one with the output straight at the start of the main, which we were most surprised to see silent, as is customary in these cases.)
18:40 <Gurkenglas> For example, I could imagine that whatever program you hand your code to stays silent if the program you give it doesn't halt, like some online services do
18:40 Zialus joined
18:41 <Gurkenglas> Try taking the large version and removing the initial call to loop
18:42 <jayjam124> if length newguesslist > 10 then return() else loop msgchan guesschan guesscount newguesslist
18:42 <jayjam124> drop the else stuff?
18:43 vmesons joined
18:44 azahi joined
18:45 <jayjam124> I'm not sure which line you refer to
18:45 <jayjam124> there's multiple loops
18:46 gspia joined
18:47 hoffmeyer joined
18:48 <Gurkenglas> By initial I mean the first one that's called in the program, the one in main
18:49 <jayjam124> loop chan guesschan 0 []
18:49 <jayjam124> that one?
18:49 <Gurkenglas> yep
18:49 <jayjam124> C:\Users\Administrator\Downloads\Template.hs:26:3:
18:49 <jayjam124> The last statement in a 'do' block must be an expression
18:49 <jayjam124> _ <- forkIO (genThread chan guesschan)
18:49 <jayjam124> Failed, modules loaded: none.
18:49 <jayjam124> Prelude>
18:50 <Gurkenglas> ugh, replace that loop line with return () then
18:50 <* geekosaur> would use void instead of _ <-
18:50 <Gurkenglas> If that makes the showStr at the start of main work, that's interesting
18:50 <geekosaur> @index void
18:50 <lambdabot> Foreign.Marshal.Error, Foreign.Marshal, Foreign, Foreign.Safe, Foreign.Marshal.Safe, Data.Functor, Control.Monad
18:50 <jayjam124> aaa gets printed
18:50 <jayjam124> it works
18:51 danny_ joined
18:51 <jayjam124> if return() is not placed then it won't do anything
18:51 <jayjam124> if return() is there it will
18:51 <jayjam124> I'm not sure what you're thinking but I'll go along with it
18:52 <Gurkenglas> if return () is not placed then the program doesnt compile in the first place, as opposed to not doing anything, right?
18:53 <jayjam124> it always compiles
18:53 <jayjam124> but nothing outputs
18:53 <jayjam124> so if I have loop chan guesschan 0 []
18:53 <jayjam124> it will compile but showStr "aaa" will not output
18:53 <Gurkenglas> What about the <jayjam124> C:\Users\Administrator\Downloads\Template.hs:26:3: thing just now
18:53 <jayjam124> if I comment loop chan...
18:53 <jayjam124> and have return showStr "aaa" will return
18:53 <jayjam124> what do you mean?
18:54 <jayjam124> that's just showStr in Main without much
18:54 <jayjam124> that works
18:54 <Gurkenglas> You said "<jayjam124> C:\Users\Administrator\Downloads\Template.hs:26:3:" "<jayjam124> The last statement in a 'do' block must be an expression" "<jayjam124> _ <- forkIO (genThread chan guesschan)" which looks like it not compiling
18:54 <Gurkenglas> Do you have Teamviewer?
18:54 <jayjam124> yup
18:55 <Gurkenglas> gimme id+pw in query
18:55 <jayjam124> done
18:55 <Gurkenglas> I have received nothing of the sort
18:56 <Akii> @karma+ Gurkenglas
18:56 <lambdabot> Gurkenglas's karma raised to 5.
18:56 <jayjam124> sorry
18:56 <jayjam124> @karma+ Gurkenglas
18:56 <lambdabot> Gurkenglas's karma raised to 6.
18:57 Levex joined
19:03 levex_ joined
19:04 albertus1 joined
19:23 Levex joined
19:26 abhiroop joined
19:33 uglyfigurine joined
19:33 merijn joined
19:35 andyhoang1 joined
19:36 levex_ joined
19:39 mattyw joined
19:41 contiver_ joined
19:45 lithie joined
19:45 Levex joined
19:53 Sose_ joined
19:56 iAmerikan joined
20:07 thallada joined
20:07 dni- joined
20:23 thallada joined
20:24 abhiroop joined
20:36 andyhoang1 joined
20:42 louispan joined
20:43 Jackoe joined
20:43 Jackoe joined
20:44 abhiroop joined
20:53 Rodya_ joined
20:54 kadoban joined
20:56 conal joined
20:58 <MarcelineVQ> jayjam124: getting it figured out?
20:58 shayan_ joined
20:58 <jayjam124> yes figured it out now
20:58 <jayjam124> Gurkenglas was really nice and helpful with me
20:58 <jayjam124> explained it step by step
20:59 <jayjam124> how do you give karma?
20:59 <MarcelineVQ> you did it earlier :>
20:59 <MarcelineVQ> @karma+ Gurkenglas
20:59 <lambdabot> Gurkenglas's karma raised to 7.
20:59 <jayjam124> ah but not hthe outputting
20:59 <jayjam124> that was harder tbh
20:59 <jayjam124> @karma+ Gurkenglas
20:59 <lambdabot> Gurkenglas's karma raised to 8.
20:59 <jayjam124> @karma+ MarcelineVQ
20:59 <lambdabot> MarcelineVQ's karma raised to -49.
20:59 <jayjam124> -49? XD
20:59 <MarcelineVQ> :>
21:00 <jayjam124> @karma+ geppettodivac
21:00 <lambdabot> geppettodivac's karma raised to 1.
21:00 peterbecich joined
21:00 zaquest joined
21:12 uglyfigurine joined
21:13 kadoban_ joined
21:16 Rodya_ joined
21:26 Jackoe joined
21:34 louispan joined
21:36 andyhoang1 joined
21:37 ljc joined
21:41 peterbecich joined
21:43 govg joined
21:47 cur8or joined
21:49 mengu joined
21:50 <mengu> g'night
21:50 <Akii> ohai
21:52 hiratara joined
21:55 cur8or joined
21:56 dni- joined
22:00 peterbecich joined
22:04 jmiven joined
22:10 gpolitis joined
22:11 irons_ joined
22:15 cur8or_ joined
22:31 hiratara joined
22:37 andyhoang1 joined
22:38 takle joined
22:39 uglyfigurine joined
22:42 jayjam124 joined
22:58 <CuriousErnestBro> (λx.λy.xyy)(λa.a)b = λx.(λy.xyy)(λa.a)b ?
22:58 <CuriousErnestBro> I haven't seen this double dot notation before
22:59 <CuriousErnestBro> no wait that doesn't make sense
22:59 <monochrom> Do not think of it as double dot.
23:00 <CuriousErnestBro> what is this then?
23:00 <monochrom> You have a lambda expression. Inside it there is a sub-expression that also happens to be a lambda expression.
23:01 <CuriousErnestBro> ah ok
23:01 <monochrom> If you see "1 + (2+3)" you do not think that it is a new double-plus thing. You just think nesting.
23:03 jarshwah_ joined
23:03 <CuriousErnestBro> how would you apply this? it isn't exactly (λxy.xyy) is it
23:04 <CuriousErnestBro> and if you think of λy.xyy as the body you have the problem that you have 2 inputs, namely (λa.a) and b
23:06 <* CuriousErnestBro> doesn't get it :/
23:09 <monochrom> "(λx.λy.xyy) P Q" is a legal thing, and it simplifies to "P Q Q". See that it is true first.
23:10 <monochrom> If you have no problem with that, the you're just looking at P = (λa.a), Q = b.
23:10 <monochrom> But if you have problem with that, then that is the problem you need to address first before using something big for P or for Q.
23:10 <CuriousErnestBro> I agree if you replace it with (λxy.xyy)
23:11 <CuriousErnestBro> so they're equivalent
23:11 <CuriousErnestBro> ?
23:11 <monochrom> OK, (λxy.xyy) is shorthand for (λx.λy.xyy).
23:11 <CuriousErnestBro> that's what I wanted to know, thanks!!
23:11 <monochrom> In fact "(λx.λy.xyy) M" is legal too, it simplifies to (λy. M y y)
23:12 <CuriousErnestBro> in the book they explained that (λxy.xyy) is shorthand for (λx.(λy.xyy)), guess I got confused there
23:13 zero_byte joined
23:22 cschneid_ joined
23:22 <CuriousErnestBro> (λa.a)bb = bb?
23:24 <MarcelineVQ> yes
23:26 louispan joined
23:38 andyhoang1 joined
23:45 dni- joined
23:48 <CuriousErnestBro> λx.λy.xyy = λx(λy).xyy, what's this notation on the right hand side?
23:49 peterbecich joined
23:49 louispan joined
23:49 <monochrom> I don't know. We don't write it like that.
23:50 <monochrom> It is either λx.(λy.xyy) if we're paranoid, or λx.λy.xyy if we have mutual understanding of the convention
23:51 systemfault joined
23:56 <CuriousErnestBro> hmm ok
23:57 <CuriousErnestBro> the book is using this all over for some reason
23:58 merijn joined