Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,213 events total
2021-07-22 00:01:53 <sm> I wouldn't be surprised if there's a vscode haskell feature/extension to run tests continuously, too
2021-07-22 00:02:11 <sm> if not, there ought to be
2021-07-22 00:03:27 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 245 seconds)
2021-07-22 00:04:28 <arkanoid> doctest! Interesting! I've been doing those for a while in my imperative past, but I've developed some kind of skepticism for huge source code files made 80% of comments (just general speaking, I have almost zero experience with haskell and functional programming in general)
2021-07-22 00:05:09 <arkanoid> my stack environment doesn not have ghcid executable
2021-07-22 00:05:27 <geekosaur> ghcid is a separate package
2021-07-22 00:06:23 <geekosaur> it's a little thing that runs ghci on your package every time something changes, to catch newly introduced bugs
2021-07-22 00:06:36 retroid_ joins (~retro@97e2ba5d.skybroadband.com)
2021-07-22 00:07:31 <arkanoid> this is sweet! I'm going to try this right now
2021-07-22 00:07:47 × mthvedt quits (uid501949@id-501949.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
2021-07-22 00:08:45 jmorris joins (uid433911@id-433911.stonehaven.irccloud.com)
2021-07-22 00:09:50 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
2021-07-22 00:10:24 Atum_ joins (~IRC@user/atum/x-2392232)
2021-07-22 00:10:42 favonia joins (~favonia@user/favonia)
2021-07-22 00:11:44 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-22 00:12:39 <arkanoid> well it seems doing the same thing I'm getting from vscode + extension, but having it separately in a terminal enables tmux with vim + ghcid! Thanks a lot
2021-07-22 00:13:30 × retroid_ quits (~retro@97e2ba5d.skybroadband.com) (Ping timeout: 240 seconds)
2021-07-22 00:16:34 <monochrom> My http://www.vex.net/~trebla/haskell/forwardconstraint/ForwardConstraint.hs is 90% comments.
2021-07-22 00:20:16 × shutdown_-h_now quits (~arjan@82-75-187-100.cable.dynamic.v4.ziggo.nl) (Ping timeout: 256 seconds)
2021-07-22 00:20:22 × ph88^ quits (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
2021-07-22 00:20:52 <Boarders> I am converting some code from MonadReader to MonadState
2021-07-22 00:21:00 <Boarders> is there a convenient way to update the local function
2021-07-22 00:21:09 <Boarders> at present I am writing three lines where I use modifying
2021-07-22 00:21:16 <Boarders> but wondered if there is something slicker
2021-07-22 00:21:25 <Boarders> (modifying from lens but that part doesn't matter)
2021-07-22 00:22:56 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds)
2021-07-22 00:23:32 Erutuon joins (~Erutuon@user/erutuon)
2021-07-22 00:24:15 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-22 00:26:06 shutdown_-h_now joins (~arjan@82-75-187-100.cable.dynamic.v4.ziggo.nl)
2021-07-22 00:28:00 <sm> you can always keep doctests in a separate file. downside is you probably won't write tests
2021-07-22 00:32:02 <adamCS> stateLocal f x = do {old <- get; modify f; result <- x; put old; return result; }
2021-07-22 00:32:24 <adamCS> Boarders: ^. But I think you already are doing something like that?
2021-07-22 00:34:08 hexfive joins (~eric@50.35.83.177)
2021-07-22 00:35:45 × spirgel_ quits (spirgel@gateway/vpn/protonvpn/spirgel) ()
2021-07-22 00:36:20 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2021-07-22 00:42:42 earthy joins (~arthurvl@2001:984:275b:1:ba27:ebff:fea0:40b0)
2021-07-22 00:42:44 <Boarders> that is my conclusion too adamCS
2021-07-22 00:42:46 <Boarders> thanks
2021-07-22 00:43:12 <arkanoid> I feel like using pack and unpack functions too much while forcing my functions to handle text manipulation using the Text type instead of String
2021-07-22 00:44:06 <arkanoid> can I use (head:tail) pattern patch for Text too?
2021-07-22 00:44:15 <arkanoid> *match
2021-07-22 00:44:58 <geekosaur> no
2021-07-22 00:45:07 <dsal> arkanoid: yeah (though not with that syntax). But also, don't use string
2021-07-22 00:45:21 <Boarders> adamCS: do you know if this will be massively wasteful computationally?
2021-07-22 00:46:00 <PotatoHatsue> use Text.uncons with ViewPatterns
2021-07-22 00:46:05 <sm> i don't agree with blanket "don't use string", everything is a trade off
2021-07-22 00:46:22 <dsal> stripPrefix :: Text -> Text -> Maybe Text
2021-07-22 00:46:32 <arkanoid> dsal: but if I have to make first character uppercase, would you still use Text?
2021-07-22 00:46:41 <dsal> Well, if you're converting between string and text a lot, you could just not use text. :)
2021-07-22 00:47:51 <dsal> > T.toTitle (T.pack "there's a thing for title stuff")
2021-07-22 00:47:53 <lambdabot> "There's A Thing For Title Stuff"
2021-07-22 00:47:57 <dsal> Otherwise, you could just make the thing you need.
2021-07-22 00:48:07 <h98> anyone know if something like this is possible with quantifiers? https://paste.tomsmeding.com/ZBwdMcJB (question at the bottom)
2021-07-22 00:48:32 <dsal> (I use String a lot, but, you know... 🤠)
2021-07-22 00:49:10 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2021-07-22 00:49:17 <sm> when string is good, use string. for newcomers, given current haskell ecosystem, string is great
2021-07-22 00:50:09 <arkanoid> what do you mean by "given curent haskell ecosystem"?
2021-07-22 00:50:19 <arkanoid> is it polluted?
2021-07-22 00:50:22 <dsal> String is the default and lots of stuff uses it.
2021-07-22 00:50:39 <dsal> Also, Text isn't the only alternative to String and sometimes Text is wrong.
2021-07-22 00:50:52 × shutdown_-h_now quits (~arjan@82-75-187-100.cable.dynamic.v4.ziggo.nl) (Ping timeout: 256 seconds)
2021-07-22 00:51:07 <arkanoid> What doesn it mean "Subject to fusion"?
2021-07-22 00:51:15 <sm> string works out of the box and is easy to understand. text doesn't and isn't
2021-07-22 00:51:29 <dsal> arkanoid: fusion is optimization magic
2021-07-22 00:51:58 <dsal> e.g., `map f . filter g` can be fused into a single pass
2021-07-22 00:52:09 <arkanoid> sm: I am feeling exactly that, like not being in the place where a newbie should be
2021-07-22 00:52:11 <sm> once you're using a lot of libs with text based apis it's different
2021-07-22 00:58:37 shutdown_-h_now joins (~arjan@82-75-187-100.cable.dynamic.v4.ziggo.nl)
2021-07-22 01:01:01 × xkuru quits (~xkuru@user/xkuru) (Quit: Unvirtualizing)
2021-07-22 01:01:54 <arkanoid> what's the correct function to join/concat [String] into String without separator?
2021-07-22 01:02:12 <arkanoid> kinda flat?
2021-07-22 01:02:17 × viluon quits (uid453725@id-453725.brockwell.irccloud.com) (Quit: Connection closed for inactivity)
2021-07-22 01:02:18 <geekosaur> concat?
2021-07-22 01:02:24 <sm> really what we need is a default TextString that scales smoothly from drop dead easy and simple to industrial strength
2021-07-22 01:02:32 × waleee quits (~waleee@h-98-128-228-119.na.cust.bahnhof.se) (Ping timeout: 252 seconds)
2021-07-22 01:02:37 <geekosaur> :t concat
2021-07-22 01:02:38 <lambdabot> Foldable t => t [a] -> [a]
2021-07-22 01:02:58 <infinisil> :t join
2021-07-22 01:02:59 <lambdabot> Monad m => m (m a) -> m a
2021-07-22 01:03:18 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-22 01:06:10 <arkanoid> thanks
2021-07-22 01:06:48 <geekosaur> there's also mconcat which is a little more general
2021-07-22 01:06:50 chris_ joins (~chris@81.96.113.213)
2021-07-22 01:06:52 <geekosaur> :t mconcat
2021-07-22 01:06:53 <lambdabot> Monoid a => [a] -> a
2021-07-22 01:08:22 <infinisil> :t fold
2021-07-22 01:08:23 <lambdabot> (Foldable t, Monoid m) => t m -> m
2021-07-22 01:08:28 <infinisil> Or even more general ^
2021-07-22 01:10:09 <arkanoid> I've yet to face Monoids/Monads/Applications, but they are the main reason I'm teaching myself haskell (I want to be a better imperative programmer by learning how to push effects on the edge)
2021-07-22 01:10:49 <arkanoid> to match the first, the second and the tail is (a,(b,tail)) ?
2021-07-22 01:11:30 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2021-07-22 01:11:43 <dsal> arkanoid: fold
2021-07-22 01:12:13 Guest84 joins (~Guest84@199.19.226.242)
2021-07-22 01:12:20 <dsal> I'm slow today.
2021-07-22 01:12:22 <dibblego> (a:b:tail)
2021-07-22 01:12:37 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
2021-07-22 01:13:08 <jeetelongname> ??
2021-07-22 01:13:46 × h98 quits (~h98@187.83.249.216.dyn.smithville.net) (Quit: Client closed)
2021-07-22 01:14:12 <geekosaur> I think they were first asking in the context of Text, not String?
2021-07-22 01:15:08 <arkanoid> now I've reverted to String

All times are in UTC.