Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 961 962 963 964 965 966 967 968 969 970 971 .. 18028
1,802,798 events total
2021-07-15 16:00:22 burnsidesLlama joins (~burnsides@dhcp168-025.wadham.ox.ac.uk)
2021-07-15 16:01:26 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-07-15 16:03:34 × juhp quits (~juhp@128.106.188.66) (Quit: juhp)
2021-07-15 16:03:48 juhp joins (~juhp@128.106.188.66)
2021-07-15 16:04:41 × burnsidesLlama quits (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Ping timeout: 255 seconds)
2021-07-15 16:06:50 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds)
2021-07-15 16:07:38 safinaskar joins (~user@109.252.90.89)
2021-07-15 16:07:47 <safinaskar> please, help me find video on functional programming!
2021-07-15 16:08:04 <safinaskar> in this video speaker showed "realloc" function from C language
2021-07-15 16:08:13 chomwitt joins (~Pitsikoko@ppp-94-67-202-202.home.otenet.gr)
2021-07-15 16:08:14 <safinaskar> and said that
2021-07-15 16:10:05 <safinaskar> realloc API is actually multiplexed, that realloc behaves as malloc when given one set of parameters and behaves as free if we pass another set of parameters
2021-07-15 16:10:10 <safinaskar> so, please give me this video
2021-07-15 16:10:23 <safinaskar> the speaker concluded that we all should use functional programming
2021-07-15 16:11:42 <glguy> safinaskar: What you've described isn't something I've seen before, but it doesn't appear to have anything to do with functional programming
2021-07-15 16:11:47 anandprabhu joins (~anandprab@94.202.243.198)
2021-07-15 16:12:38 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-15 16:14:44 × keutoi quits (~keutoi@157.47.109.43) (Ping timeout: 272 seconds)
2021-07-15 16:15:08 <safinaskar> glguy: yes, but he also talked about functional programming
2021-07-15 16:16:06 norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net)
2021-07-15 16:16:14 keutoi joins (~keutoi@223.237.18.142)
2021-07-15 16:16:30 × nschoe quits (~quassel@178.251.84.79) (Ping timeout: 265 seconds)
2021-07-15 16:16:44 zyklotomic joins (~ethan@2604:a880:800:10::79f:8001)
2021-07-15 16:17:09 chris_ joins (~chris@81.96.113.213)
2021-07-15 16:17:19 <zyklotomic> say I have a data TestData = VerA { fieldA : Int, fieldB :: Int} | VerB { fieldB :: Int }
2021-07-15 16:17:30 <glguy> You have a TestData
2021-07-15 16:17:45 <zyklotomic> shouldn't it be the case that f :: TestData -> Int; f = fieldA doesnt' compile
2021-07-15 16:17:49 <zyklotomic> but it becomes a runtime error
2021-07-15 16:18:51 <glguy> fieldA throws a runtime error if you use it on a VerB constructor
2021-07-15 16:19:15 <zyklotomic> yeah
2021-07-15 16:19:26 <zyklotomic> shouldnt it not compile in the first place
2021-07-15 16:19:40 <glguy> No, it's defined to throw a runtime error
2021-07-15 16:19:54 × anandprabhu quits (~anandprab@94.202.243.198) (Quit: Leaving)
2021-07-15 16:19:58 <glguy> I wouldn't recommend defining that datatype, but if you do that's the behavior
2021-07-15 16:20:07 <c_wraith> Ideally record selectors wouldn't be allowed with multiple constructors, but I wasn't in charge of allowing that. :P
2021-07-15 16:20:49 <c_wraith> So we just have to tell people it's a bad idea, instead of letting the compiler reject it.
2021-07-15 16:20:50 <zyklotomic> are there existing issues created on this
2021-07-15 16:21:06 <zyklotomic> i'm not sure what to name it
2021-07-15 16:21:12 <c_wraith> It's not a bug
2021-07-15 16:21:17 <zyklotomic> multiple constructor record selectors
2021-07-15 16:21:30 <zyklotomic> yeah i'm not saying it is a bug, but if people have created an issue saying they disagree with it
2021-07-15 16:21:41 <glguy> There's not really a voting system like that
2021-07-15 16:22:16 <zyklotomic> or like at least brought it up
2021-07-15 16:22:20 × chomwitt quits (~Pitsikoko@ppp-94-67-202-202.home.otenet.gr) (Ping timeout: 272 seconds)
2021-07-15 16:22:24 <c_wraith> there's the GHC proposals system. GHC has broken with the language spec as the result of proposals before. Even in terms of removing things like n+k patterns.
2021-07-15 16:22:37 stevenxl joins (uid133530@id-133530.highgate.irccloud.com)
2021-07-15 16:22:43 <stevenxl> Hello party people.
2021-07-15 16:22:55 <c_wraith> But this is probably a harder sell than that.
2021-07-15 16:22:56 stevenxl Quick question - is there no trim function for bytestring?
2021-07-15 16:23:29 <glguy> stevenxl: there's dropWhile and dropWhileEnd
2021-07-15 16:23:53 <c_wraith> there's nothing named "trim" because bytestrings aren't intended to be treated as textual data.
2021-07-15 16:23:58 chomwitt joins (~Pitsikoko@2a02:587:dc04:e00:12c3:7bff:fe6d:d374)
2021-07-15 16:24:03 × _xor quits (~xor@74.215.46.133) (Ping timeout: 258 seconds)
2021-07-15 16:24:08 <glguy> but bytestrings don't hold text, but if you're using Char8 module: https://hackage.haskell.org/package/bytestring-0.11.1.0/docs/Data-ByteString-Char8.html#v:strip
2021-07-15 16:24:13 <c_wraith> ... despite the whole .Char8 module
2021-07-15 16:24:17 stevenxl Maybe we can put it in the Char8 module.
2021-07-15 16:24:52 × pritambaral quits (~pritam@user/pritambaral) (Ping timeout: 272 seconds)
2021-07-15 16:25:10 stevenxl Oh - I thought that existed. Maybe we need that same function in lazy.bytestring.
2021-07-15 16:25:13 stevenxl .char8
2021-07-15 16:25:17 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3))
2021-07-15 16:26:01 <zyklotomic> glguy: ye i meant smth like the proposal system
2021-07-15 16:26:12 <zyklotomic> ah i see ok, ig i'll just avoid it then
2021-07-15 16:26:22 <zyklotomic> not like partial functions don't exist
2021-07-15 16:26:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-15 16:26:33 Guest47 joins (~Guest47@2a01:cb15:81e5:f00:2c94:41d0:be2a:116c)
2021-07-15 16:26:33 × dajoer quits (~david@user/gvx) (Quit: leaving)
2021-07-15 16:27:03 <lechner> Hi, I finally wrote my first production program (for Debian infrastructure) and would appreciate your suggestions to a newbie. Thanks! https://dpaste.org/oZkp
2021-07-15 16:27:32 stevenxl lechner: congrats!
2021-07-15 16:28:22 × Guest4643 quits (~felix@83.8.55.241.ipv4.supernova.orange.pl) (Quit: WeeChat 3.1)
2021-07-15 16:28:51 Atum_ joins (IRC@user/atum/x-2392232)
2021-07-15 16:29:15 <zyklotomic> lechner: that looks really cool, what does it do
2021-07-15 16:29:15 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 255 seconds)
2021-07-15 16:29:43 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Remote host closed the connection)
2021-07-15 16:29:44 <zyklotomic> in the context of Debian too
2021-07-15 16:29:49 Gurkenglas_ is now known as Gurkenglas
2021-07-15 16:29:59 pritambaral joins (~pritam@user/pritambaral)
2021-07-15 16:30:00 myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net)
2021-07-15 16:30:29 <lechner> zyklotomic: it collects data for lintian.debian.org from automated runners via ZeroMQ and stores the results on disk
2021-07-15 16:32:17 stevenxl https://youtu.be/tAD1V8bHm_0
2021-07-15 16:32:20 <arkanoid> Hello! Noob question (just studying the subject). Is monad the way-to-go to handle side effects / errors in functional programming, or are there new/better strategies?
2021-07-15 16:32:43 safinaskar parts (~user@109.252.90.89) ()
2021-07-15 16:32:51 <zyklotomic> i've heard of algebraic effects being cool recently, but not very familiar with them
2021-07-15 16:33:24 hgolden_ joins (~hgolden2@cpe-172-114-84-61.socal.res.rr.com)
2021-07-15 16:33:27 <maerwald> so you want something cool?
2021-07-15 16:33:51 × hgolden_ quits (~hgolden2@cpe-172-114-84-61.socal.res.rr.com) (Client Quit)
2021-07-15 16:35:38 <[exa]> lechner: looks cool! on L75 you might want to just mconcat a list of the strings, or perhaps `intercalate` them. The temporary bindings look kinda removable to me.
2021-07-15 16:36:27 prite joins (~pritam@user/pritambaral)
2021-07-15 16:36:33 <lechner> [exa]: yeah, that's an eye sore. what are temporary bindings, please?
2021-07-15 16:36:47 <[exa]> lechner: map ($task) [Task.source_name, Task.source_version, Task.release, ...]
2021-07-15 16:37:08 × pritambaral quits (~pritam@user/pritambaral) (Ping timeout: 252 seconds)
2021-07-15 16:37:10 <arkanoid> no, I'm not an haskell programmer so I don't know any alternative. I'm just learning FP to apply the concepts I need into the imperative world that I know. For example I'm trying to isolate effects, and while I've found a proper way to enforce the lack of side effects at compile time, I'm trying to identify a strategy to program the case where errors and side effects needs to be cosidered. So far
2021-07-15 16:37:11 <arkanoid> I've just encoutered monads, but I don't know if there's anything else I should consider on this topic
2021-07-15 16:37:11 <lechner> followed by intercalate?
2021-07-15 16:38:08 <[exa]> lechner: basically, the `let`s there rename a 2-word something to 1-word something, and the second word in the definition is kinda repeated...so it seems like a natural place to compress some code :]
2021-07-15 16:39:14 burnsidesLlama joins (~burnsides@dhcp168-025.wadham.ox.ac.uk)
2021-07-15 16:39:47 <[exa]> lechner: anyway, `intercalate` is a nice way to do concat with separators
2021-07-15 16:40:46 eight joins (~eight@user/eight)
2021-07-15 16:41:10 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-15 16:41:39 <[exa]> lechner: and l91: you might want to be explicit about the args shape, e.g. with `[configPath] <- getArgs` or `(configPath:_) <- getArgs`
2021-07-15 16:41:47 chris_ joins (~chris@81.96.113.213)

All times are in UTC.