Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-23 17:40:32 conal joins (~conal@66.115.157.94)
2020-11-23 17:40:35 × conal quits (~conal@66.115.157.94) (Client Quit)
2020-11-23 17:40:44 <xerox_> maerwald: it starts back up trying ot compile, over and over, after that message
2020-11-23 17:40:49 <b7471> i will first watch the online lecture and the try again
2020-11-23 17:40:57 <b7471> to understand all of this
2020-11-23 17:41:00 <b7471> i hope
2020-11-23 17:41:10 <b7471> i will be able within one year
2020-11-23 17:41:15 <b7471> to make sense of all this
2020-11-23 17:41:24 <b7471> ist really horrible and bad
2020-11-23 17:41:39 mrus joins (~mrus@128.199.8.231)
2020-11-23 17:41:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-23 17:42:29 kritzefitz joins (~kritzefit@212.86.56.80)
2020-11-23 17:43:07 <ski> b7471 : you're welcome to ask questions here, if anything is unclear
2020-11-23 17:45:02 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 264 seconds)
2020-11-23 17:45:25 <xerox_> maerwald: coc.nvim helpfully says "the server has crashed 5 times I won't run it again", vscode just goes head on never stopping
2020-11-23 17:45:26 <b7471> how to read the variable
2020-11-23 17:45:29 <b7471> that i declared
2020-11-23 17:45:35 <b7471> the variable x
2020-11-23 17:46:07 <b7471> :t x
2020-11-23 17:46:08 <lambdabot> Expr
2020-11-23 17:46:27 <geekosaur6> if you're in ghci or equivalent, just enter x at the prompt
2020-11-23 17:47:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2020-11-23 17:48:22 <maerwald> xerox_: no idea, I don't use HLS on ghcup codebase frequently
2020-11-23 17:48:31 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
2020-11-23 17:48:42 <maerwald> maybe try to write a different hie.yaml
2020-11-23 17:48:52 <xerox_> I was looking for some way to figure out where imported stuff is from
2020-11-23 17:49:04 <xerox_> not married to it, just what I thought of, is there anything else I could use?
2020-11-23 17:50:14 alp joins (~alp@2a01:e0a:58b:4920:ece0:78fb:1f80:8fc7)
2020-11-23 17:52:05 × lxsameer quits (lxsameer@gateway/vpn/protonvpn/lxsameer) (Ping timeout: 256 seconds)
2020-11-23 17:52:12 × boxscape47 quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: Connection closed)
2020-11-23 17:52:45 geekosaur joins (ac3a5347@172.58.83.71)
2020-11-23 17:54:51 <ski> b7471 : if you have an interactor, where you can enter expressions and get feedback, you should probably be able to just write the variable name `x' in there (assuming `x' is defined globally in your source file)
2020-11-23 17:55:21 <b7471> i am using an online interpreter
2020-11-23 17:55:24 <ski> it seems <https://repl.it/> requires a login ?
2020-11-23 17:55:28 <b7471> called ripl .it
2020-11-23 17:55:28 <ski> yes
2020-11-23 17:55:29 × geekosaur6 quits (ac3a5347@172.58.83.71) (Ping timeout: 245 seconds)
2020-11-23 17:55:40 <b7471> am i logged in
2020-11-23 17:56:09 <ski> if you're using <https://repl.it/>, i'd guess so ?
2020-11-23 17:56:47 <ski> (when i click on "Start coding", it asks me to sign up)
2020-11-23 17:57:06 lucasb joins (uid333435@gateway/web/irccloud.com/x-detutdhidmcqqrwp)
2020-11-23 17:57:50 <maerwald> xerox_: let me try
2020-11-23 17:57:52 <b7471> i signed up to that
2020-11-23 17:58:01 <b7471> now i am experimenting with it a bit
2020-11-23 17:58:14 <ski> if you write
2020-11-23 17:58:15 <b7471> i declared a few variables as you told me to
2020-11-23 17:58:17 <ski> x :: Int
2020-11-23 17:58:19 <ski> x = 42
2020-11-23 17:58:31 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 260 seconds)
2020-11-23 17:58:39 <b7471> yes a was successful in adding two variables together
2020-11-23 17:58:44 <ski> in the part of the editor where you write programs, that should define `x' as a variable in global scope
2020-11-23 17:59:09 <ski> if you write e.g.
2020-11-23 17:59:22 <ski> cube :: Int -> Int
2020-11-23 17:59:28 <ski> cube x = x * x * x
2020-11-23 18:00:04 <b7471> what does this mean: cube :: Int -> Int
2020-11-23 18:00:10 <ski> then this should define a function, called `cube'. the `x' here is unrelated to the previous `x'. this `x' here is a local parameter name, local to the `cube' function definition
2020-11-23 18:00:21 <xerox_> maerwald: I am getting implicit-hie to see if it creates an entry for 3rdparty/
2020-11-23 18:00:28 geekosaur96 joins (ac3a5347@172.58.83.71)
2020-11-23 18:00:34 conal joins (~conal@66.115.157.94)
2020-11-23 18:00:35 <b7471> ok?
2020-11-23 18:00:37 <ski> it means that `cube' is a function that consumes an `Int' as input parameter, and produces an `Int' as output result
2020-11-23 18:00:48 <b7471> aha
2020-11-23 18:00:52 <b7471> ok
2020-11-23 18:00:59 <ski> you could define e.g.
2020-11-23 18:01:04 <ski> isEven :: Int -> Bool
2020-11-23 18:01:12 <ski> isEven n = n `mod` 2 == 0
2020-11-23 18:01:50 <maerwald> xerox_: I don't seem to have this problem
2020-11-23 18:01:54 <ski> to define a function (a "predicate"), that given an `Int' as input, gives a `Bool'ean result, being `True' if the input was an even integer, and `False' otherwise (i.e. when it was odd)
2020-11-23 18:01:57 <monochrom> xerox_: If you mean "I imported 10 modules, one of them gives me f, I want to find out which", I first try ":info f", usually it's good enough. Bu its can answer can be cryptic. When I feel like a big hammer, I use GHC's -ddump-minimal-imports
2020-11-23 18:02:56 <maerwald> xerox_: but I have a cabal.project.local with this content https://paste.tomsmeding.com/Qo3YwsbF
2020-11-23 18:02:59 × geekosaur quits (ac3a5347@172.58.83.71) (Ping timeout: 245 seconds)
2020-11-23 18:03:02 <b7471> and what would this expression mean: fourEqual :: Int -> Int -> Int -> Int -> Bool
2020-11-23 18:03:03 <ski> b7471 : so the type of the input parameter comes before (to the left of) the `->', and the type of output result comes after (to the right of) it, in a type signature of a function
2020-11-23 18:03:07 <b7471> thats our homework
2020-11-23 18:03:29 <ski> yes, that means that it accepts four inputs, all of type `Int', and gives back a `Bool'ean as output
2020-11-23 18:03:32 × incertia_ quits (~incertia@d4-50-26-103.nap.wideopenwest.com) (Quit: ZNC 1.7.5 - https://znc.in)
2020-11-23 18:03:55 <maerwald> xerox_: also make sure 8.10.2 is the default ghc symlink... I believe there were issues with hls when the project ghc isn't the default one
2020-11-23 18:03:55 <b7471> ok i will try to enter that on ripl
2020-11-23 18:04:00 <ski> fourEqual :: Int -> Int -> Int -> Int -> Bool
2020-11-23 18:04:04 <ski> fourEqual x y z w = ..x..y..z..w..
2020-11-23 18:04:35 <ski> (you'll have to replace `..x..y..z..w..' by some actual code expression that checks when those four inputs are all equal)
2020-11-23 18:04:59 <ski> (of course you can choose other parameter names than `x',`y',`z',`w', if you prefer)
2020-11-23 18:05:41 <shapr> xerox_: Are the same person who wrote GoA?
2020-11-23 18:05:54 <ski> the lines with `::' in them are called "type signatures". then lines with `=' in them are "defining equations" (or simply "definitions")
2020-11-23 18:06:11 incertia joins (~incertia@d4-50-26-103.nap.wideopenwest.com)
2020-11-23 18:06:28 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
2020-11-23 18:06:29 <xerox_> shapr: I am hi buddy (:
2020-11-23 18:06:40 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-23 18:06:40 <shapr> hi hi hi! I haven't seen you since AngloHaskell!
2020-11-23 18:06:45 <xerox_> I know!
2020-11-23 18:06:52 <xerox_> that was a good time
2020-11-23 18:07:09 <shapr> Yeah, lots of fun. It's been a few years though
2020-11-23 18:07:41 <shapr> xerox_: 20th anniversary of #haskell in ~20 weeks!
2020-11-23 18:07:41 <xerox_> many years at this point in fact… how time flies
2020-11-23 18:07:45 shapr hops cheerfully
2020-11-23 18:07:54 <shapr> xerox_: are you writing Haskell for a living these days?
2020-11-23 18:07:55 <xerox_> hopefully on a monocycle
2020-11-23 18:08:05 <shapr> haha, yes!
2020-11-23 18:08:10 <xerox_> nope! for fun, setting it up to do advent of code :D
2020-11-23 18:08:19 <shapr> that does sound like fun!

All times are in UTC.