InHale 2017-02-10 14:47:33
hi guys, I know this is the wrong channel but could someone help me with a c++ issue? It's more logic I think so language shouldnt matter too much
Lokathor 2017-02-10 14:47:48
well we do love logic
InHale 2017-02-10 14:47:55
haha
Welkin 2017-02-10 14:47:57
have you tried #c++ ?
InHale 2017-02-10 14:48:00
ok let me paste it
jle` 2017-02-10 14:48:07
ask the question first and we'll see if it is suitable
InHale 2017-02-10 14:48:07
yeah but I cant talk in that channe;l
Lokathor 2017-02-10 14:48:07
but we might tell you how to write it in Haskell instead :3
InHale 2017-02-10 14:48:14
haha
InHale 2017-02-10 14:48:31
well I am checking if randomly generated numbers are prime or not and keeping a count for each
glguy 2017-02-10 14:48:43
Sorry, this is the wrong channel for C++ help.
InHale 2017-02-10 14:48:58
but I dont think I did it right because my counters are always showing the non-prime as 3
Lokathor 2017-02-10 14:49:28
ah, you want to use StateT possibly, sounds like there's a few values you're juggling at once
monochrom 2017-02-10 14:49:36
Could you rewrite it in Haskell? That might fix the bug.
InHale 2017-02-10 14:49:47
Lol, has to be c++
Lokathor 2017-02-10 14:49:54
that's the bug right there
InHale 2017-02-10 14:49:57
brb, laptop about to die
monochrom 2017-02-10 14:50:23
Use C++ to write a simple Haskell interpreter. Then you have fulfilled the requirement.
jle` 2017-02-10 14:51:19
write it in haskell and ask us to fix the haskell code, then translate it back into c++
kgadek 2017-02-10 14:51:22
or write a Haskell->C++ compiler in Haskell. Then write an assignment in Haskell, transpile and you're done
Lokathor 2017-02-10 14:54:17
might be easier to make a Cmm to C++ compiler?
kgadek 2017-02-10 14:54:53
hmm, now that I'm thinking about it, LLVM output just might be it for generating C++
Lokathor 2017-02-10 14:57:21
is there a LLVM -> C++ reverse translator that's any good?
InHale 2017-02-10 14:58:31
didnt make it to the charger lol
InHale 2017-02-10 14:58:36
Anyway
InHale 2017-02-10 14:58:48
Would anyone mind looking at the code?
InHale 2017-02-10 14:59:00
Or the prime checking function, rather.
Lokathor 2017-02-10 14:59:19
we can check any haskell version of it that you care to write
kgadek 2017-02-10 14:59:25
InHale: I think this is C++ question, not about logic per se
monochrom 2017-02-10 15:00:01
"logic" has many different meantings.
monochrom 2017-02-10 15:00:15
To most laypersons it just means "thinking".
kgadek 2017-02-10 15:00:48
anyway, InHale: did you try at ##c++ ?
InHale 2017-02-10 15:01:06
Yes, nobody can chat in there for some reason
InHale 2017-02-10 15:01:28
and Haskel was the friendliest channel I had used a little while ago so I thought someone might know C++ here
monochrom 2017-02-10 15:01:35
create a new channel. pm everyone there to invite.
kgadek 2017-02-10 15:01:51
or let's just jump to ##c++
Welkin 2017-02-10 15:01:54
lol really? c++ is muted?
monochrom 2017-02-10 15:02:06
You feel that we're great procrastinators right?
InHale 2017-02-10 15:02:06
I cant talk in there, and I dont see others talking
kgadek 2017-02-10 15:02:07
I'm there now anyway
kgadek 2017-02-10 15:02:19
you're not in the channel
InHale 2017-02-10 15:02:32
I am now
kgadek 2017-02-10 15:02:32
i.e. I don't see you on user list
kgadek 2017-02-10 15:02:38
k
Lokathor 2017-02-10 15:02:40
InHale, sounds like you might need to DC and reconnect to freenode
Lokathor 2017-02-10 15:02:48
get things cleared up
InHale 2017-02-10 15:02:51
It's always like that in that channel for me
InHale 2017-02-10 15:03:07
cannot send to channel ##c++
sandonfuge 2017-02-10 15:03:45
Would you guys mind telling me a good place to study Haskell?
InHale 2017-02-10 15:04:03
I see your text, but I can't reply lol kgadek
sm 2017-02-10 15:04:14
sandonfuge: where have you tried so far ?
Lokathor 2017-02-10 15:04:25
sandonfuge, like a physical location?
sandonfuge 2017-02-10 15:04:43
Sorry how do I whisper again
Welkin 2017-02-10 15:05:12
@where learnhaskell -- sandonfuge
lambdabot 2017-02-10 15:05:12
https://github.com/bitemyapp/learnhaskell
kgadek 2017-02-10 15:05:14
InHale: my guess is that you're not a registered user. It's simple
kgadek 2017-02-10 15:05:15
https://freenode.net/kb/answer/registration
sandonfuge 2017-02-10 15:05:29
I have tried "Learn you a Haskell for a great good", codewars and youtube
sm 2017-02-10 15:05:45
sandonfuge: how about Haskell Tutorial And Cookbook
Welkin 2017-02-10 15:05:50
go to the link above
sandonfuge 2017-02-10 15:05:58
And no I don't mean a physical location
sandonfuge 2017-02-10 15:07:08
I haven't tried Haskell Tutorial and Cookbook, and thanks for the link I'll check it out
Lokathor 2017-02-10 15:07:13
sandonfuge, http://www.seas.upenn.edu/~cis194/spring13/lectures.html this course has homeworks that are quite good at teaching you how to use haskell
sandonfuge 2017-02-10 15:08:12
Great! Thank you guys so much
sandonfuge 2017-02-10 15:08:33
It's just that no matter how much I study the language I always feel like I know nothing lol
sm 2017-02-10 15:09:05
don't forget to use it
sm 2017-02-10 15:09:07
(also)
Welkin 2017-02-10 15:09:24
sandonfuge: that's how it works, until you actually write a program
Lokathor 2017-02-10 15:09:33
consider writing some small programs, which will help you focus on things to learn with practical applications, which is usually how people remember stuff
Welkin 2017-02-10 15:09:45
I felt useless with it until I actually built a non-trivial web application with yesod
Welkin 2017-02-10 15:10:02
now it feels very natural
kgadek 2017-02-10 15:28:25
fyi: there is ##C++-basic. I suspect this piece of info could get handy sometimes