Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 962 963 964 965 966 967 968 969 970 971 972 .. 18028
1,802,789 events total
2021-07-15 16:42:30 sm2n joins (~sm2n@user/sm2n)
2021-07-15 16:42:30 × chris_ quits (~chris@81.96.113.213) (Read error: Connection reset by peer)
2021-07-15 16:42:32 chris____ joins (~chris@81.96.113.213)
2021-07-15 16:43:30 × burnsidesLlama quits (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Ping timeout: 240 seconds)
2021-07-15 16:44:08 × cheater1 quits (~Username@84-115-12-132.cable.dynamic.surfer.at) (Changing host)
2021-07-15 16:44:08 cheater1 joins (~Username@user/cheater)
2021-07-15 16:44:40 × jippiedoe quits (~david@2a02-a44c-e14e-1-e2c4-23e8-2d6f-bdbb.fixed6.kpn.net) (Ping timeout: 246 seconds)
2021-07-15 16:47:57 <lechner> [exa]: what do those to, please?
2021-07-15 16:49:51 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
2021-07-15 16:51:14 <[exa]> lechner: the `[configPath] <- getArgs` will bind the single argument to "variable" configPath. Which is basically what you do now, except it will fail if any extra arguments are present (see the list of args needs to have 1 item precisely)
2021-07-15 16:51:49 <[exa]> lechner: the other variant `(configPath : _) <- getArgs` does precisely the same, except it reads better (and shorter) to me than using `head`
2021-07-15 16:52:15 <[exa]> (precisely the same as your code, not as the above)
2021-07-15 16:54:01 × xff0x quits (~xff0x@2001:1a81:5396:d100:8e8d:3ad4:f4d0:67e9) (Quit: xff0x)
2021-07-15 16:55:15 <lechner> [exa]: thanks! what does the sigil do in the map ($task) above please?
2021-07-15 16:56:43 × jlamothe quits (~jlamothe@198.251.60.157) (Remote host closed the connection)
2021-07-15 16:57:16 × chris____ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-15 16:58:27 <lechner> or, can i insert a space? coming from Perl it looks funny
2021-07-15 16:59:05 mceldeen joins (~igloo@71-33-221-91.hlrn.qwest.net)
2021-07-15 16:59:17 chris_ joins (~chris@81.96.113.213)
2021-07-15 16:59:32 <glguy> lechner: $ is an operator, ($x) is a "section" that is short for (\y -> y $ x)
2021-07-15 17:00:06 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-15 17:00:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-07-15 17:01:40 flareon joins (~flareon@117.222.66.126)
2021-07-15 17:04:16 × mceldeen quits (~igloo@71-33-221-91.hlrn.qwest.net) (Ping timeout: 252 seconds)
2021-07-15 17:04:41 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 268 seconds)
2021-07-15 17:04:49 <[exa]> there should actually be an operator that encodes this nicely
2021-07-15 17:06:04 × ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
2021-07-15 17:06:33 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-07-15 17:06:36 <boxscape> lechner: inserting a space between $ and the function is indeed very common
2021-07-15 17:06:41 chris_ joins (~chris@81.96.113.213)
2021-07-15 17:06:48 <[exa]> hm it's `[Task.this, Task.that, Task.... ] <$~> task`, the operator is in Data.Functor.Syntax, but I guess it's better to leave the code readable without searching hoogle
2021-07-15 17:06:51 <boxscape> s/function/value
2021-07-15 17:07:54 × jiribenes quits (~jiribenes@rosa.jiribenes.com) (Ping timeout: 240 seconds)
2021-07-15 17:09:06 myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net)
2021-07-15 17:12:43 × jess quits (~jess@libera/staff/jess) ()
2021-07-15 17:13:53 × keutoi quits (~keutoi@223.237.18.142) (Quit: leaving)
2021-07-15 17:14:40 smichel17_ is now known as smichel17
2021-07-15 17:15:14 × peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Remote host closed the connection)
2021-07-15 17:15:28 peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi)
2021-07-15 17:18:15 × curiousgay quits (~curiousgg@77-120-144-167.kha.volia.net) (Remote host closed the connection)
2021-07-15 17:19:21 × Guest47 quits (~Guest47@2a01:cb15:81e5:f00:2c94:41d0:be2a:116c) (Quit: Client closed)
2021-07-15 17:20:02 curiousgay joins (~curiousga@77-120-144-167.kha.volia.net)
2021-07-15 17:20:07 <lechner> [exa] boxscape glguy: thanks for all your help!
2021-07-15 17:20:33 burnsidesLlama joins (~burnsides@dhcp168-025.wadham.ox.ac.uk)
2021-07-15 17:20:56 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-15 17:21:29 <lechner> Hi, can this printf be replaced with a putStrLn, please? I'm getting type errors involving IO https://dpaste.org/D4xj#L76
2021-07-15 17:22:10 <[exa]> wouldn't just `putStrLn $ "Received " ++ fileName` work?
2021-07-15 17:22:33 <lechner> i missed the sigil
2021-07-15 17:22:42 chris_ joins (~chris@81.96.113.213)
2021-07-15 17:22:45 <[exa]> "sigil" you mean $ right ?
2021-07-15 17:23:05 <lechner> yeah, is that the wrong name?
2021-07-15 17:23:34 <[exa]> $ means something like "the rest of the expression is in parentheses"
2021-07-15 17:23:50 <lechner> i do know that
2021-07-15 17:23:53 <[exa]> well people usually call it a dollar, given the pop use of the symbol :D
2021-07-15 17:24:36 <lechner> being in america i try to be respectful and inclusive
2021-07-15 17:25:13 <[exa]> ah okay :]
2021-07-15 17:26:06 × burnsidesLlama quits (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Ping timeout: 265 seconds)
2021-07-15 17:26:33 <lechner> Hi, is it possible to have two statements in a case branch? (inside do)
2021-07-15 17:28:23 <[exa]> yeah, open another `do` ?
2021-07-15 17:29:23 <[exa]> or use some operators as with `do`, you can do e.g. `putStrLn "xxx" >> putStrLn "yyy"` in one line without `do`
2021-07-15 17:29:55 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-07-15 17:30:00 <dminuoso> lechner: Key thing to realize is that do-expressions are expressions! :)
2021-07-15 17:30:31 <lechner> except i have been told they are not that great
2021-07-15 17:30:45 mc47 joins (~mc47@xmonad/TheMC47)
2021-07-15 17:30:54 × kadobanana quits (~mud@user/kadoban) (Remote host closed the connection)
2021-07-15 17:31:19 kadobanana joins (~mud@user/kadoban)
2021-07-15 17:32:26 × elf_fortrez quits (~elf_fortr@adsl-72-50-4-51.prtc.net) (Quit: Client closed)
2021-07-15 17:33:09 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 255 seconds)
2021-07-15 17:33:40 × Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 268 seconds)
2021-07-15 17:34:24 Guest984 joins (~Guest9@43.241.144.126)
2021-07-15 17:37:05 pesada joins (~agua@177.79.106.52)
2021-07-15 17:38:39 <flareon> if i say `import Foo.Bar`, i should be able to access any function inside the module `Foo.Bar` (say Foo.Bar.Baz.Quux.hello) irrespective of whether i can actually say `import Foo.Bar.Baz.Quux`. am i correct?
2021-07-15 17:38:44 × agua quits (~agua@2804:14c:8793:8e2f:99df:d2fc:1544:f08e) (Ping timeout: 255 seconds)
2021-07-15 17:39:08 <Ariakenom> lechner: do? do is great! maybe someone told you that it's good to understand the >>= as well. that is a advice sometimes given to beginners. but there's no problem with do.
2021-07-15 17:40:39 agua joins (~agua@2804:14c:8793:8e2f:99df:d2fc:1544:f08e)
2021-07-15 17:41:28 <boxscape> flareon: that sounds wrong to me
2021-07-15 17:42:36 elf_fortrez joins (~elf_fortr@adsl-72-50-4-188.prtc.net)
2021-07-15 17:44:40 × pesada quits (~agua@177.79.106.52) (Ping timeout: 272 seconds)
2021-07-15 17:44:43 <lechner> Haskell is such a joy! The code is concise, plus it does so much for type safety and detecting missing JSON fields. Thanks everyone!
2021-07-15 17:44:45 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-15 17:45:04 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2021-07-15 17:45:11 <lechner> probably faster than my current scripts, too
2021-07-15 17:45:56 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2021-07-15 17:46:14 jiribenes joins (~jiribenes@rosa.jiribenes.com)
2021-07-15 17:47:05 <boxscape> flareon: importantly a function Foo.Bar.Baz.Quux.hello is *not* in the module Foo.Bar, it's in the module Foo.Bar.Baz.Quux
2021-07-15 17:48:03 burnsidesLlama joins (~burnsides@client-8-82.eduroam.oxuni.org.uk)
2021-07-15 17:52:30 ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de)
2021-07-15 17:52:51 <flareon> boxscape: module hierarchies do *not* ensure recursive imports. if i `import Foo.Bar`, i only get the functions in `Foo.Bar` and not any functions in `Foo.Bar.Quux`. am i correct?
2021-07-15 17:53:11 <boxscape> flareon: that's correct
2021-07-15 17:53:23 × Null_A quits (~null_a@2601:645:8700:2290:e9c6:7ad4:aa07:6319) ()
2021-07-15 17:53:32 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-07-15 17:53:33 <flareon> boxscape: what purpose do module hierarchies serve then?
2021-07-15 17:53:43 <boxscape> flareon: often, you will find libraries where Foo.Bar reexports Foo.Bar.Quux though, so in those cases it happens to look like that
2021-07-15 17:54:04 <flareon> boxscape: but it's not guaranteed?
2021-07-15 17:55:02 <boxscape> flareon: right, it's not guaranteed. I would say the point of hierarchical module names is just to make it easier to organize your code in a sensible structure, without saying anything about exports or imports
2021-07-15 17:55:03 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-15 17:56:28 <flareon> boxscape: so technically, `Data.Map.Strict` could easily have been `Data.StrictMap` and nothing would change from the caller's point of view except for the name. the developer would have to put it in a different hierarchy in code. am i correct?
2021-07-15 17:56:45 <boxscape> that's right
2021-07-15 17:57:33 <boxscape> you could imagine a world where imports work like you suggested, but arguably it would be less expressive, since you couldn't get back the current behavior, but you can emulate that behavior currently by reexporting inner modules as I mentioned above
2021-07-15 17:57:45 <flareon> boxscape: that was profoundly helpful. i don't know if i missed it, but i didn't explicity read this written somewhere. thanks!

All times are in UTC.